houyaf 3 gadi atpakaļ
vecāks
revīzija
b6a859c1ff
100 mainītis faili ar 594 papildinājumiem un 1276 dzēšanām
  1. 21 19
      src/api/system/docApi.js
  2. 11 10
      src/api/system/groupCatApi.js
  3. 2 6
      src/components/ChecklistCatSelector/index.vue
  4. 2 6
      src/components/ChecklistSelector/index.vue
  5. 4 13
      src/components/ChecklistTargetConfig/ChecklistSelected.vue
  6. 4 13
      src/components/ChecklistTargetConfig/ChecklistUnselected.vue
  7. 2 6
      src/components/ClientSelector/index.vue
  8. 2 6
      src/components/EntGridSelector/index.vue
  9. 2 6
      src/components/EquipmentCatSelector/index.vue
  10. 2 6
      src/components/GridSelector/index.vue
  11. 2 6
      src/components/GroupCatSelector/index.vue
  12. 2 6
      src/components/GroupSelector/index.vue
  13. 2 6
      src/components/JobSelector/index.vue
  14. 6 14
      src/components/MapLayerConfig/example.vue
  15. 6 16
      src/components/MapLayerConfig/index.vue
  16. 6 10
      src/components/MapSelector/index.vue
  17. 2 6
      src/components/MsgCatSelector/index.vue
  18. 2 6
      src/components/OcSelector/index.vue
  19. 2 6
      src/components/OrgCatSelector/index.vue
  20. 2 6
      src/components/PositionSelector/index.vue
  21. 2 6
      src/components/UserSelector/index.vue
  22. 2 6
      src/components/WorkFlow/ActivityHandleRecord.vue
  23. 6 10
      src/layout/components/Message/index.vue
  24. 2 2
      src/layout/components/Navbar.vue
  25. 0 23
      src/router/modules/system.js
  26. 2 2
      src/store/modules/user.js
  27. 1 1
      src/utils/request.js
  28. 8 16
      src/views/aqpt/alert/activity/Handle.vue
  29. 20 32
      src/views/aqpt/alert/activity/Submit.vue
  30. 6 14
      src/views/aqpt/alert/components/AlertList.vue
  31. 2 6
      src/views/aqpt/alert/components/Details.vue
  32. 2 6
      src/views/aqpt/alert/components/LeftCounter.vue
  33. 10 22
      src/views/aqpt/checkTask/manage/CheckTask.vue
  34. 6 14
      src/views/aqpt/checkTask/manage/CheckTaskList.vue
  35. 3 7
      src/views/aqpt/checkTask/manage/Details.vue
  36. 2 6
      src/views/aqpt/checkTask/manage/LeftCounter.vue
  37. 2 6
      src/views/aqpt/checkTask/manage/TaskEvent.vue
  38. 4 8
      src/views/aqpt/checkTask/manage/check/CheckResult.vue
  39. 12 28
      src/views/aqpt/checkTask/manage/check/Handle.vue
  40. 4 8
      src/views/aqpt/checkTask/manage/check/Transfer.vue
  41. 11 21
      src/views/aqpt/checkTask/plan/components/CheckDef.vue
  42. 9 19
      src/views/aqpt/checkTask/plan/components/CheckDefList.vue
  43. 6 8
      src/views/aqpt/checkTask/plan/components/RiskPointList.vue
  44. 2 6
      src/views/aqpt/checkTask/record/LeftCounter.vue
  45. 6 14
      src/views/aqpt/checkTask/record/RecordList.vue
  46. 2 6
      src/views/aqpt/components/CheckCatSelector/index.vue
  47. 2 6
      src/views/aqpt/components/CtrlLevelSelector/index.vue
  48. 2 6
      src/views/aqpt/components/DangerCatSelector/index.vue
  49. 2 6
      src/views/aqpt/components/MeasureTypeSelector/index.vue
  50. 2 6
      src/views/aqpt/components/RiskPointCatSelector/index.vue
  51. 2 6
      src/views/aqpt/components/RiskPointSelector/index.vue
  52. 8 16
      src/views/aqpt/danger/activity/Accept.vue
  53. 8 16
      src/views/aqpt/danger/activity/Rectify.vue
  54. 8 16
      src/views/aqpt/danger/activity/Review.vue
  55. 7 16
      src/views/aqpt/danger/activity/Submit.vue
  56. 6 14
      src/views/aqpt/danger/components/DangerList.vue
  57. 3 7
      src/views/aqpt/danger/components/Details.vue
  58. 2 6
      src/views/aqpt/danger/components/LeftCounter.vue
  59. 10 22
      src/views/aqpt/equipment/components/Equipment.vue
  60. 10 22
      src/views/aqpt/equipment/components/EquipmentCat.vue
  61. 6 13
      src/views/aqpt/equipment/components/EquipmentList.vue
  62. 8 16
      src/views/aqpt/equipment/components/LeftCat.vue
  63. 10 22
      src/views/aqpt/hazard/components/Hazard.vue
  64. 15 23
      src/views/aqpt/hazard/components/HazardTree.vue
  65. 10 22
      src/views/aqpt/hazard/components/Measure.vue
  66. 6 15
      src/views/aqpt/hazard/components/MeasureList.vue
  67. 11 24
      src/views/aqpt/hazard/components/Risk.vue
  68. 6 14
      src/views/aqpt/hazard/components/RiskList.vue
  69. 5 9
      src/views/aqpt/map/index.vue
  70. 10 22
      src/views/aqpt/map/map.vue
  71. 23 35
      src/views/aqpt/panorama/index.vue
  72. 9 19
      src/views/aqpt/profile/components/Ent.vue
  73. 2 6
      src/views/aqpt/profile/components/EntProfile.vue
  74. 3 7
      src/views/aqpt/report/dangerReport.vue
  75. 4 8
      src/views/aqpt/report/dutyChecklist.vue
  76. 3 5
      src/views/aqpt/report/gridChecklist.vue
  77. 5 10
      src/views/aqpt/report/measureChecklist.vue
  78. 6 15
      src/views/aqpt/riskpoint/art/RiskPointArt.vue
  79. 6 14
      src/views/aqpt/riskpoint/art/SelectArt.vue
  80. 8 13
      src/views/aqpt/riskpoint/basic/BasicInfo.vue
  81. 3 7
      src/views/aqpt/riskpoint/checklist/Details.vue
  82. 6 14
      src/views/aqpt/riskpoint/checklist/RiskPointChecklist.vue
  83. 6 15
      src/views/aqpt/riskpoint/checklist/SelectChecklist.vue
  84. 13 25
      src/views/aqpt/riskpoint/components/RiskPoint.vue
  85. 5 13
      src/views/aqpt/riskpoint/hazard/RiskPointHazard.vue
  86. 19 31
      src/views/aqpt/riskpoint/hazard/SelectHazard.vue
  87. 11 27
      src/views/aqpt/riskpoint/index.vue
  88. 2 4
      src/views/aqpt/riskpoint/mapLayer/index.vue
  89. 6 14
      src/views/aqpt/riskpoint/photo/index.vue
  90. 10 22
      src/views/aqpt/setting/alertType/alertType.vue
  91. 6 14
      src/views/aqpt/setting/alertType/index.vue
  92. 10 22
      src/views/aqpt/setting/checkCat/component/CheckCat.vue
  93. 6 14
      src/views/aqpt/setting/checkCat/index.vue
  94. 6 14
      src/views/aqpt/setting/ctrlLevel/ctrlLevel.vue
  95. 3 5
      src/views/aqpt/setting/ctrlLevel/index.vue
  96. 10 22
      src/views/aqpt/setting/dangerCat/dangerCat.vue
  97. 6 14
      src/views/aqpt/setting/dangerCat/index.vue
  98. 10 24
      src/views/aqpt/setting/equipmentCat/equipmentCat.vue
  99. 6 14
      src/views/aqpt/setting/equipmentCat/index.vue
  100. 6 14
      src/views/aqpt/setting/measureType/index.vue

+ 21 - 19
src/api/system/docApi.js

@@ -3,19 +3,20 @@ import request from '@/utils/request'
 /**
  * 文件分类列表
  * @param data
- * @returns {AxiosPromise}
+ * @returns
  */
-export function getDirByList() {
+export function getDirByList(data) {
   return request({
-    url: '/doc/dir/',
-    method: 'GET'
+    url: '/doc/dir',
+    method: 'GET',
+    params: data
   })
 }
 
 /**
  * 文件分类详情
- * @param data
- * @returns {AxiosPromise}
+ * @param dirId
+ * @returns
  */
 export function getDir(dirId) {
   return request({
@@ -27,7 +28,7 @@ export function getDir(dirId) {
 /**
  * 文件分类详情
  * @param data
- * @returns {AxiosPromise}
+ * @returns
  */
 export function createDir(data) {
   return request({
@@ -40,7 +41,7 @@ export function createDir(data) {
 /**
  * 文件分类详情
  * @param data
- * @returns {AxiosPromise}
+ * @returns
  */
 export function updateDir(data) {
   return request({
@@ -52,8 +53,8 @@ export function updateDir(data) {
 
 /**
  * 文件分类详情
- * @param data
- * @returns {AxiosPromise}
+ * @param dirId
+ * @returns
  */
 export function deleteDir(dirId) {
   return request({
@@ -64,8 +65,9 @@ export function deleteDir(dirId) {
 
 /**
  * 移动分类
- * @param data
- * @returns {AxiosPromise}
+ * @param dirId
+ * @param type
+ * @returns
  */
 export function moveDir(dirId, type) {
   return request({
@@ -78,7 +80,7 @@ export function moveDir(dirId, type) {
 /**
  * 文件列表
  * @param data
- * @returns {AxiosPromise}
+ * @returns
  */
 export function getFileByPage(data) {
   return request({
@@ -90,8 +92,8 @@ export function getFileByPage(data) {
 
 /**
  * 文件详情
- * @param data
- * @returns {AxiosPromise}
+ * @param fileId
+ * @returns
  */
 export function getFile(fileId) {
   return request({
@@ -103,7 +105,7 @@ export function getFile(fileId) {
 /**
  * 文件详情
  * @param data
- * @returns {AxiosPromise}
+ * @returns
  */
 export function createFile(data) {
   return request({
@@ -116,7 +118,7 @@ export function createFile(data) {
 /**
  * 文件详情
  * @param data
- * @returns {AxiosPromise}
+ * @returns
  */
 export function updateFile(data) {
   return request({
@@ -128,8 +130,8 @@ export function updateFile(data) {
 
 /**
  * 文件详情
- * @param data
- * @returns {AxiosPromise}
+ * @param fileId
+ * @returns
  */
 export function deleteFile(fileId) {
   return request({

+ 11 - 10
src/api/system/groupCatApi.js

@@ -3,19 +3,20 @@ import request from '@/utils/request'
 /**
  * 列表查询
  * @param data
- * @returns {AxiosPromise}
+ * @returns
  */
-export function getGroupCatByList() {
+export function getGroupCatByList(data) {
   return request({
     url: '/group/cat',
-    method: 'GET'
+    method: 'GET',
+    params: data
   })
 }
 
 /**
  * 分页查询
  * @param data
- * @returns {AxiosPromise}
+ * @returns
  */
 export function getGroupCatByPage(data) {
   return request({
@@ -27,8 +28,8 @@ export function getGroupCatByPage(data) {
 
 /**
  * 基于ID查询
- * @param data
- * @returns {AxiosPromise}
+ * @param id
+ * @returns
  */
 export function getGroupCatById(id) {
   return request({
@@ -40,7 +41,7 @@ export function getGroupCatById(id) {
 /**
  * 添加
  * @param data
- * @returns {AxiosPromise}
+ * @returns
  */
 export function createGroupCat(data) {
   return request({
@@ -53,7 +54,7 @@ export function createGroupCat(data) {
 /**
  * 更新
  * @param data
- * @returns {AxiosPromise}
+ * @returns
  */
 export function updateGroupCat(data) {
   return request({
@@ -65,8 +66,8 @@ export function updateGroupCat(data) {
 
 /**
  * 删除
- * @param data
- * @returns {AxiosPromise}
+ * @param groupCatId
+ * @returns
  */
 export function deleteGroupCatById(groupCatId) {
   return request({

+ 2 - 6
src/components/ChecklistCatSelector/index.vue

@@ -44,12 +44,8 @@ export default {
     // 检查表清单
     initChecklistCatData() {
       getChecklistCatByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.checklistCatList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.checklistCatList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/components/ChecklistSelector/index.vue

@@ -44,12 +44,8 @@ export default {
     // 检查表清单
     initChecklistData() {
       getChecklistByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.checklistList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.checklistList = data
       }).catch((error) => {
         console.log(error)
       })

+ 4 - 13
src/components/ChecklistTargetConfig/ChecklistSelected.vue

@@ -64,13 +64,9 @@ export default {
       this.dialogVisible = true
       this.listLoading = true
       getChecklistTargetByList(this.conditions).then((resp) => {
-        const { code, data, msg } = resp
+        const { data } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -88,13 +84,8 @@ export default {
     handleDelete(data) {
       const { targetId, checklistId } = data
       deleteChecklistTargetById(targetId, checklistId).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.loadData()
-          this.$emit('actionUpdate')
-        } else {
-          this.$message.error(msg)
-        }
+        this.loadData()
+        this.$emit('actionUpdate')
       }).catch((error) => {
         console.log(error)
       })

+ 4 - 13
src/components/ChecklistTargetConfig/ChecklistUnselected.vue

@@ -83,13 +83,9 @@ export default {
       this.dialogVisible = true
       this.listLoading = true
       getChecklistSelectByList(this.conditions).then((resp) => {
-        const { code, data, msg } = resp
+        const { data } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -109,13 +105,8 @@ export default {
       const { checklistId } = data
       this.formData.checklistId = checklistId
       createChecklistTarget(this.formData).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.loadData()
-          this.$emit('actionUpdate')
-        } else {
-          this.$message.error(msg)
-        }
+        this.loadData()
+        this.$emit('actionUpdate')
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/components/ClientSelector/index.vue

@@ -45,12 +45,8 @@ export default {
     // 检查表清单
     initClientData() {
       getClientByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.clientList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.clientList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/components/EntGridSelector/index.vue

@@ -67,12 +67,8 @@ export default {
     // 网格列表
     initGridData() {
       getGridByList({}).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.gridList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.gridList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/components/EquipmentCatSelector/index.vue

@@ -44,12 +44,8 @@ export default {
     // 检查表清单
     initEquipCatData() {
       getEquipmentCatByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.equipCatList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.equipCatList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/components/GridSelector/index.vue

@@ -67,12 +67,8 @@ export default {
     // 网格列表
     initGridData() {
       getGridByList({}).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.gridList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.gridList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/components/GroupCatSelector/index.vue

@@ -44,12 +44,8 @@ export default {
     // 检查表清单
     initGroupCatData() {
       getGroupCatByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.groupCatList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.groupCatList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/components/GroupSelector/index.vue

@@ -57,12 +57,8 @@ export default {
     // 初始化部门数据
     initGroupData() {
       getGroupView().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.groupData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.groupData = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/components/JobSelector/index.vue

@@ -51,12 +51,8 @@ export default {
     // Job列表
     initJobData() {
       getActiveJobByList(this.conditions).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.jobList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.jobList = data
       }).catch((error) => {
         console.log(error)
       })

+ 6 - 14
src/components/MapLayerConfig/example.vue

@@ -65,13 +65,9 @@ export default {
     // 初始化
     getData() {
       getMapLayerById(this.conditions.layerId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.viewData = data
-          this.setRasterLayer()
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.viewData = data
+        this.setRasterLayer()
       }).catch((error) => {
         console.log(error)
       })
@@ -180,13 +176,9 @@ export default {
       const obj = {}
       obj.mapId = this.mapId
       getMapLayerByList(obj).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.mapLayerList = data
-          this.initMapLayers()
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.mapLayerList = data
+        this.initMapLayers()
       }).catch((error) => {
         console.log(error)
       })

+ 6 - 16
src/components/MapLayerConfig/index.vue

@@ -63,13 +63,9 @@ export default {
     // 初始化
     getData() {
       getMapLayerById(this.conditions.layerId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.viewData = data
-          this.setRasterLayer()
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.viewData = data
+        this.setRasterLayer()
       }).catch((error) => {
         console.log(error)
       })
@@ -165,13 +161,9 @@ export default {
       const obj = {}
       obj.mapId = this.mapId
       getMapLayerByList(obj).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.mapLayerList = data
-          this.initMapLayers()
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.mapLayerList = data
+        this.initMapLayers()
       }).catch((error) => {
         console.log(error)
       })
@@ -217,8 +209,6 @@ export default {
     font-size: 18px;
     font-weight: bold;
     color: #FFFFFF;
-
-    font-weight: bold;
   }
   .tool-bar {
     height: 60px;

+ 6 - 10
src/components/MapSelector/index.vue

@@ -46,16 +46,12 @@ export default {
     // 检查表清单
     initMapData() {
       getMapByList({}).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.mapList = data
-          if (data && data.length > 0) {
-            const node = data[0]
-            this.mapId = node.mapId
-            this.setVal(node)
-          }
-        } else {
-          this.$message.error(msg)
+        const { data } = resp
+        this.mapList = data
+        if (data && data.length > 0) {
+          const node = data[0]
+          this.mapId = node.mapId
+          this.setVal(node)
         }
       }).catch((error) => {
         console.log(error)

+ 2 - 6
src/components/MsgCatSelector/index.vue

@@ -44,12 +44,8 @@ export default {
     // Init Measure Type List
     initMsgCatListData() {
       getMsgCatByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.msgCatList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.msgCatList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/components/OcSelector/index.vue

@@ -43,12 +43,8 @@ export default {
   methods: {
     initOcData() {
       getOcByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.ocList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.ocList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/components/OrgCatSelector/index.vue

@@ -43,12 +43,8 @@ export default {
   methods: {
     initOrgCatList() {
       getOrgCatByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.orgCatList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.orgCatList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/components/PositionSelector/index.vue

@@ -59,12 +59,8 @@ export default {
     // 岗位列表
     initPositionData() {
       selectPositionByList(this.conditions).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.positionList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.positionList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/components/UserSelector/index.vue

@@ -76,12 +76,8 @@ export default {
     // 初始化用户列表
     initUserListData() {
       getUserList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.userList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.userList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/components/WorkFlow/ActivityHandleRecord.vue

@@ -87,12 +87,8 @@ export default {
       this.listLoading = true
       getWorkflowById(wfInsId).then((resp) => {
         this.listLoading = false
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.flowData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.flowData = data
       })
     }
   }

+ 6 - 10
src/layout/components/Message/index.vue

@@ -166,12 +166,10 @@ export default {
     getSentMsg() {
       this.listLoading = true
       getMsgSentByPage(this.conditions).then((resp) => {
-        const { code, data, total } = resp
+        const { data, total } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.total = total
-          this.viewData.msgList = data
-        }
+        this.total = total
+        this.viewData.msgList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -180,12 +178,10 @@ export default {
     getReceivedMsg(data) {
       this.listLoading = true
       getMsgReceivedByPage(this.conditions).then((resp) => {
-        const { code, data, total } = resp
+        const { data, total } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.conditions.total = total
-          this.viewData.msgList = data
-        }
+        this.conditions.total = total
+        this.viewData.msgList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 2
src/layout/components/Navbar.vue

@@ -113,7 +113,7 @@ export default {
   mounted() {
     this.getUnReadMsg()
     this.initSideMenu()
-    this.initsideTab()
+    this.initSideTab()
   },
   methods: {
     getUnReadMsg() {
@@ -127,7 +127,7 @@ export default {
       sideMenuTabList = sideMenuTabList.filter(item => permits.includes(item.permit))
       this.sideMenuTabList = sideMenuTabList
     },
-    initsideTab() {
+    initSideTab() {
       let index = 0
       if (this.isNotNull(localStorage.getItem('tabIndex'))) {
         index = parseFloat(localStorage.getItem('tabIndex'))

+ 0 - 23
src/router/modules/system.js

@@ -1,4 +1,3 @@
-
 import Layout from '@/layout/index'
 
 const systemRouter = [
@@ -354,27 +353,6 @@ const systemRouter = [
     },
     children: [
       {
-        path: 'entCat',
-        component: () => import('@/views/system/setting/entCat/index'),
-        name: 'system_setting_ent_cat',
-        meta: { title: '企业类别', noCache: true, permit: 'system_setting_ent_cat' }
-      },
-
-      {
-        path: 'orgCat',
-        component: () => import('@/views/system/setting/orgCat/index'),
-        name: 'system_setting_org_cat',
-        meta: { title: '机构类别', noCache: true, permit: 'system_setting_org_cat' }
-      },
-
-      {
-        path: 'partnerCat',
-        component: () => import('@/views/system/setting/partnerCat/index'),
-        name: 'system_setting_partner_cat',
-        meta: { title: '合作伙伴类别', noCache: true, permit: 'system_setting_partner_cat' }
-      },
-
-      {
         path: 'groupCat',
         component: () => import('@/views/system/setting/groupCat/index'),
         name: 'system_setting_group_cat',
@@ -401,7 +379,6 @@ const systemRouter = [
       }
     ]
   },
-
   {
     path: '/test',
     component: Layout,

+ 2 - 2
src/store/modules/user.js

@@ -81,7 +81,7 @@ const actions = {
     return new Promise((resolve, reject) => {
       getPermit(state.token).then(response => {
         const { code, data } = response
-        if (code !== 0) {
+        if (code !== 200) {
           reject('用户信息验证失败,请重新登录!')
           return
         }
@@ -99,7 +99,7 @@ const actions = {
     return new Promise((resolve, reject) => {
       logout().then(response => {
         const { code, data } = response
-        if (code !== 0) {
+        if (code !== 200) {
           reject('退出系统出错,请联系管理员!')
           return
         }

+ 1 - 1
src/utils/request.js

@@ -37,7 +37,7 @@ service.interceptors.request.use(
 service.interceptors.response.use(
   response => {
     const res = response.data
-    if (res.code !== 0) {
+    if (res.code !== 200) {
       // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
       if (res.code === 401) {
         // to re-login

+ 8 - 16
src/views/aqpt/alert/activity/Handle.vue

@@ -126,14 +126,10 @@ export default {
       this.resetFormData()
       this.dialogVisible = true
       getAlertById(alertId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.viewData = data
-          this.$refs.WFlow.get(alertId)
-          this.$refs.ActivityHandleRecord.getData(alertId)
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.viewData = data
+        this.$refs.WFlow.get(alertId)
+        this.$refs.ActivityHandleRecord.getData(alertId)
       }).catch((error) => {
         console.log(error)
       })
@@ -172,14 +168,10 @@ export default {
       this.formData.handleMeasure = flow.data.actionRemark
       this.formData.status = flow.status
       handleAlert(this.formData).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.dialogVisible = false
-          this.$message.success(msg)
-          this.$emit('formSuccess')
-        } else {
-          this.$message.error(msg)
-        }
+        const { msg } = resp
+        this.dialogVisible = false
+        this.$message.success(msg)
+        this.$emit('formSuccess')
       }).catch((error) => {
         console.log(error)
       })

+ 20 - 32
src/views/aqpt/alert/activity/Submit.vue

@@ -158,17 +158,13 @@ export default {
       this.dialogVisible = true
 
       startAlert().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.flowData = data
-          this.formData.wfDefId = data.wfDefId
-          this.formData.wfInsId = data.wfInsId
-          this.formData.activityDefId = data.activityIns.activityDefId
-          this.formData.activityInsId = data.activityIns.activityInsId
-          this.formData.activityCode = data.activityIns.activityCode
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.flowData = data
+        this.formData.wfDefId = data.wfDefId
+        this.formData.wfInsId = data.wfInsId
+        this.formData.activityDefId = data.activityIns.activityDefId
+        this.formData.activityInsId = data.activityIns.activityInsId
+        this.formData.activityCode = data.activityIns.activityCode
       }).catch((error) => {
         console.log(error)
       })
@@ -179,19 +175,15 @@ export default {
       this.resetFormData()
       this.dialogVisible = true
       getAlertById(alertId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.formData = data.data
-          const flow = data.flow
-          this.flowData = flow
-          this.formData.wfDefId = flow.wfDefId
-          this.formData.wfInsId = flow.wfInsId
-          this.formData.activityDefId = flow.activityIns.activityDefId
-          this.formData.activityInsId = flow.activityIns.activityInsId
-          this.formData.activityCode = flow.activityIns.activityCode
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data.data
+        const flow = data.flow
+        this.flowData = flow
+        this.formData.wfDefId = flow.wfDefId
+        this.formData.wfInsId = flow.wfInsId
+        this.formData.activityDefId = flow.activityIns.activityDefId
+        this.formData.activityInsId = flow.activityIns.activityInsId
+        this.formData.activityCode = flow.activityIns.activityCode
       }).catch((error) => {
         console.log(error)
       })
@@ -237,14 +229,10 @@ export default {
       this.$refs[formName].validate((valid) => {
         if (valid) {
           handleAlert(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.formSuccess()
-              this.$message.success(msg)
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.formSuccess()
+            this.$message.success(msg)
           }).catch((error) => {
             console.log(error)
           })

+ 6 - 14
src/views/aqpt/alert/components/AlertList.vue

@@ -106,14 +106,10 @@ export default {
       const params = { ...this.conditions, ...conds }
       this.listLoading = true
       getAlertByPage(params).then((resp) => {
-        const { code, data, total, msg } = resp
+        const { data, total } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -150,13 +146,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteAlertById(alertId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         }).catch((error) => {
           console.log(error)
         })

+ 2 - 6
src/views/aqpt/alert/components/Details.vue

@@ -180,12 +180,8 @@ export default {
     getData(alertId) {
       this.resetFormData()
       getAlertById(alertId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.viewData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.viewData = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/views/aqpt/alert/components/LeftCounter.vue

@@ -139,12 +139,8 @@ export default {
     // fetch data
     getData() {
       getAlertCounter().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          if (data) this.counter = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.counter = data
       }).catch((error) => {
         console.log(error)
       })

+ 10 - 22
src/views/aqpt/checkTask/manage/CheckTask.vue

@@ -173,12 +173,8 @@ export default {
       this.actionType = ACTION_UPDATE
       this.dialogVisible = true
       getCheckTaskById(taskId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.formData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data
       }).catch((error) => {
         console.log(error)
       })
@@ -207,28 +203,20 @@ export default {
           switch (this.actionType) {
             case ACTION_ADD:
               createCheckTask(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })
               break
             case ACTION_UPDATE:
               updateCheckTask(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })

+ 6 - 14
src/views/aqpt/checkTask/manage/CheckTaskList.vue

@@ -231,13 +231,9 @@ export default {
       this.listLoading = true
       getCheckTaskByPage(this.conditions).then((resp) => {
         this.listLoading = false
-        const { code, data, total, msg } = resp
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data, total } = resp
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -289,13 +285,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteCheckTaskById(taskId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         }).catch((error) => {
           console.log(error)
         })

+ 3 - 7
src/views/aqpt/checkTask/manage/Details.vue

@@ -266,13 +266,9 @@ export default {
       this.conditions.checklistId = checklistId
       this.dialogVisible = true
       getCheckTaskViewById(checklistId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.title = data.taskTitle
-          this.viewData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.title = data.taskTitle
+        this.viewData = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/views/aqpt/checkTask/manage/LeftCounter.vue

@@ -142,12 +142,8 @@ export default {
     // fetch data
     getData() {
       getCheckTaskCounter().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.counter = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.counter = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/views/aqpt/checkTask/manage/TaskEvent.vue

@@ -75,12 +75,8 @@ export default {
     // Fetch Event Data
     getEventList(data) {
       getTaskEventByTaskId(data).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.eventList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.eventList = data
       }).catch((error) => {
         console.log(error)
       })

+ 4 - 8
src/views/aqpt/checkTask/manage/check/CheckResult.vue

@@ -86,14 +86,10 @@ export default {
       this.$refs[formName].validate((valid) => {
         if (valid) {
           updateCheckTaskDoingItem(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.formSuccess()
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
           }).catch((error) => {
             console.log(error)
           })

+ 12 - 28
src/views/aqpt/checkTask/manage/check/Handle.vue

@@ -289,13 +289,9 @@ export default {
     getData() {
       const checklistId = this.conditions.checklistId
       handleCheckTask(checklistId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.title = data.taskTitle
-          this.viewData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.title = data.taskTitle
+        this.viewData = data
       }).catch((error) => {
         console.log(error)
       })
@@ -323,13 +319,9 @@ export default {
         type: 'warning'
       }).then(() => {
         batchUpdateCheckTaskDoingItem(taskId, checkResult).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.$message.success(msg)
-            this.getData()
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.$message.success(msg)
+          this.getData()
         }).catch((error) => {
           console.log(error)
         })
@@ -347,13 +339,9 @@ export default {
         type: 'warning'
       }).then(() => {
         cancelCheckTask(taskId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.$message.success(msg)
-            this.formSuccess()
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.$message.success(msg)
+          this.formSuccess()
         }).catch((error) => {
           console.log(error)
         })
@@ -371,13 +359,9 @@ export default {
         type: 'warning'
       }).then(() => {
         completeCheckTask(taskId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.$message.success((msg))
-            this.formSuccess()
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.$message.success((msg))
+          this.formSuccess()
         }).catch((error) => {
           console.log(error)
         })

+ 4 - 8
src/views/aqpt/checkTask/manage/check/Transfer.vue

@@ -92,14 +92,10 @@ export default {
       this.$refs[formName].validate((valid) => {
         if (valid) {
           transferCheckTask(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.formSuccess()
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
           }).catch((error) => {
             console.log(error)
           })

+ 11 - 21
src/views/aqpt/checkTask/plan/components/CheckDef.vue

@@ -157,11 +157,9 @@ export default {
       this.actionType = ACTION_UPDATE
       this.dialogVisible = true
       getCheckDefById(riskPointId, checkDefId).then((resp) => {
-        const { code, data } = resp
-        if (code === 0) {
-          this.formData = data
-          this.$set(this.userSelObj, 'value', data.accountId)
-        }
+        const { data } = resp
+        this.formData = data
+        this.$set(this.userSelObj, 'value', data.accountId)
       }).catch((error) => {
         console.log(error)
       })
@@ -193,14 +191,10 @@ export default {
           switch (this.actionType) {
             case ACTION_ADD:
               createCheckDef(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })
@@ -208,14 +202,10 @@ export default {
 
             case ACTION_UPDATE:
               updateCheckDef(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })

+ 9 - 19
src/views/aqpt/checkTask/plan/components/CheckDefList.vue

@@ -132,11 +132,9 @@ export default {
       this.listLoading = true
       getCheckDefByList(this.conditions).then((resp) => {
         this.listLoading = false
-        const { code, data, count } = resp
-        if (code === 0) {
-          this.conditions.total = count
-          this.dataList = data
-        }
+        const { data, count } = resp
+        this.conditions.total = count
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -164,13 +162,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteCheckDefById(riskPointId, checkDefId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         }).catch((error) => {
           console.log(error)
         })
@@ -183,13 +177,9 @@ export default {
     handlerChangeStatus(status, data) {
       const { riskPointId, checkDefId } = data
       updateCheckDefStatus(riskPointId, checkDefId, status).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.getData()
-          this.$message.success(msg)
-        } else {
-          this.$message.error(msg)
-        }
+        const { msg } = resp
+        this.getData()
+        this.$message.success(msg)
       }).catch((error) => {
         console.log(error)
       })

+ 6 - 8
src/views/aqpt/checkTask/plan/components/RiskPointList.vue

@@ -60,14 +60,12 @@ export default {
   methods: {
     getData() {
       getRiskPointByList({ 'isActive': 1 }).then((resp) => {
-        const { code, data } = resp
-        if (code === 0) {
-          this.treeData = data
-          if (data.length > 0) {
-            const node = data[0]
-            this.handleTreeInit(node)
-            this.checkDefault.push(node.riskPointId)
-          }
+        const { data } = resp
+        this.treeData = data
+        if (data.length > 0) {
+          const node = data[0]
+          this.handleTreeInit(node)
+          this.checkDefault.push(node.riskPointId)
         }
       }).catch((error) => {
         console.log(error)

+ 2 - 6
src/views/aqpt/checkTask/record/LeftCounter.vue

@@ -164,12 +164,8 @@ export default {
     // 初始化数据
     getData() {
       getCheckRecordCounter().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.checkRecordCounter = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.checkRecordCounter = data
       }).catch((error) => {
         console.log(error)
       })

+ 6 - 14
src/views/aqpt/checkTask/record/RecordList.vue

@@ -245,14 +245,10 @@ export default {
     getData() {
       this.listLoading = true
       getCheckRecordByPage(this.conditions).then((resp) => {
-        const { code, data, total, msg } = resp
+        const { data, total } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -261,13 +257,9 @@ export default {
     handleExport() {
       this.downloadLoading = true
       getCheckRecordByList(this.conditions).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.exportList = data
-          this.exportExcel()
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.exportList = data
+        this.exportExcel()
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/views/aqpt/components/CheckCatSelector/index.vue

@@ -44,12 +44,8 @@ export default {
     // 检查表清单
     initCheckCatData() {
       getCheckCatByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.checkCatList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.checkCatList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/views/aqpt/components/CtrlLevelSelector/index.vue

@@ -43,12 +43,8 @@ export default {
     // 管控层级列表
     initCtrlLevelData() {
       getCtrlLevelByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.ctrlLevelList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.ctrlLevelList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/views/aqpt/components/DangerCatSelector/index.vue

@@ -44,12 +44,8 @@ export default {
     // 检查表清单
     initDangerCatData() {
       getDangerCatByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.dangerCatList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.dangerCatList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/views/aqpt/components/MeasureTypeSelector/index.vue

@@ -44,12 +44,8 @@ export default {
     // Init Measure Type List
     initMeasureTypeListData() {
       getMeasureTypeByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.measureTypeList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.measureTypeList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/views/aqpt/components/RiskPointCatSelector/index.vue

@@ -42,12 +42,8 @@ export default {
     // Init Risk Point Category List
     initRiskPointCatData() {
       getRiskPointCatByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.riskPointCatList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.riskPointCatList = data
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/views/aqpt/components/RiskPointSelector/index.vue

@@ -44,12 +44,8 @@ export default {
     // Init User List
     initRiskPointListData() {
       getRiskPointByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.riskPointList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.riskPointList = data
       }).catch((error) => {
         console.log(error)
       })

+ 8 - 16
src/views/aqpt/danger/activity/Accept.vue

@@ -141,14 +141,10 @@ export default {
       this.resetFormData()
       this.dialogVisible = true
       getDangerById(dangerId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.viewData = data
-          this.$refs.WFlow.get(dangerId)
-          this.$refs.ActivityHandleRecord.getData(dangerId)
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.viewData = data
+        this.$refs.WFlow.get(dangerId)
+        this.$refs.ActivityHandleRecord.getData(dangerId)
       }).catch((error) => {
         console.log(error)
       })
@@ -185,14 +181,10 @@ export default {
       this.formData.acceptRemark = flow.data.actionRemark
       this.formData.attachList = flow.data.attachList
       handleDanger(this.formData).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.dialogVisible = false
-          this.$message.success(msg)
-          this.formSuccess()
-        } else {
-          this.$message.error(msg)
-        }
+        const { msg } = resp
+        this.dialogVisible = false
+        this.$message.success(msg)
+        this.formSuccess()
       }).catch((error) => {
         console.log(error)
       })

+ 8 - 16
src/views/aqpt/danger/activity/Rectify.vue

@@ -166,14 +166,10 @@ export default {
       this.resetFormData()
       this.dialogVisible = true
       getDangerById(dangerId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.viewData = data
-          this.$refs.WFlow.get(dangerId)
-          this.$refs.ActivityHandleRecord.getData(dangerId)
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.viewData = data
+        this.$refs.WFlow.get(dangerId)
+        this.$refs.ActivityHandleRecord.getData(dangerId)
       }).catch((error) => {
         console.log(error)
       })
@@ -215,14 +211,10 @@ export default {
       this.formData.rectifyRemark = flow.data.actionRemark
       this.formData.attachList = flow.data.attachList
       handleDanger(this.formData).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.dialogVisible = false
-          this.$message.success(msg)
-          this.formSuccess()
-        } else {
-          this.$message.error(msg)
-        }
+        const { msg } = resp
+        this.dialogVisible = false
+        this.$message.success(msg)
+        this.formSuccess()
       }).catch((error) => {
         console.log(error)
       })

+ 8 - 16
src/views/aqpt/danger/activity/Review.vue

@@ -146,14 +146,10 @@ export default {
       this.resetFormData()
       this.dialogVisible = true
       getDangerById(dangerId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.viewData = data
-          this.$refs.WFlow.get(dangerId)
-          this.$refs.ActivityHandleRecord.getData(dangerId)
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.viewData = data
+        this.$refs.WFlow.get(dangerId)
+        this.$refs.ActivityHandleRecord.getData(dangerId)
       }).catch((error) => {
         console.log(error)
       })
@@ -191,14 +187,10 @@ export default {
       this.formData.reviewRemark = flow.data.actionRemark
       this.formData.attachList = flow.data.attachList
       handleDanger(this.formData).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.dialogVisible = false
-          this.$message.success(msg)
-          this.$emit('formSuccess')
-        } else {
-          this.$message.error(msg)
-        }
+        const { msg } = resp
+        this.dialogVisible = false
+        this.$message.success(msg)
+        this.$emit('formSuccess')
       }).catch((error) => {
         console.log(error)
       })

+ 7 - 16
src/views/aqpt/danger/activity/Submit.vue

@@ -187,13 +187,9 @@ export default {
       this.resetFormData()
       this.dialogVisible = true
       getDangerById(dangerId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.formData = data
-          this.$refs.WFlow.get(dangerId)
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data
+        this.$refs.WFlow.get(dangerId)
       }).catch((error) => {
         console.log(error)
       })
@@ -240,7 +236,6 @@ export default {
 
     // 提交
     handleCommand(flow) {
-      console.log(flow)
       const attachList = flow.data.attachList
       this.formData.status = flow.status
       this.formData.submitRemark = flow.data.actionRemark
@@ -252,14 +247,10 @@ export default {
         this.formData.sceneIcon = attach.fileIcon
       }
       handleDanger(this.formData).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.$emit('formSuccess')
-          this.dialogVisible = false
-          this.$message.success(msg)
-        } else {
-          this.$message.error(msg)
-        }
+        const { msg } = resp
+        this.$emit('formSuccess')
+        this.dialogVisible = false
+        this.$message.success(msg)
       }).catch((error) => {
         console.log(error)
       })

+ 6 - 14
src/views/aqpt/danger/components/DangerList.vue

@@ -237,14 +237,10 @@ export default {
     getData() {
       this.listLoading = true
       getDangerByPage(this.conditions).then((resp) => {
-        const { code, data, total, msg } = resp
+        const { data, total } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -265,13 +261,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteDangerById(dangerId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.$message.success(msg)
-            this.getData()
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.$message.success(msg)
+          this.getData()
         }).catch((error) => {
           console.log(error)
         })

+ 3 - 7
src/views/aqpt/danger/components/Details.vue

@@ -145,13 +145,9 @@ export default {
     // Fetch Data
     getData(dangerId) {
       getDangerById(dangerId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.viewData = data
-          this.$refs.ActivityHandleRecord.getData(dangerId)
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.viewData = data
+        this.$refs.ActivityHandleRecord.getData(dangerId)
       }).catch((error) => {
         console.log(error)
       })

+ 2 - 6
src/views/aqpt/danger/components/LeftCounter.vue

@@ -160,12 +160,8 @@ export default {
     // 初始化
     getData() {
       getDangerCounter().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.dangerCounter = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.dangerCounter = data
       }).catch((error) => {
         console.log(error)
       })

+ 10 - 22
src/views/aqpt/equipment/components/Equipment.vue

@@ -113,12 +113,8 @@ export default {
       this.actionType = ACTION_UPDATE
       this.dialogVisible = true
       getEquipmentById(equipId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.formData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data
       }).catch((error) => {
         console.log(error)
       })
@@ -144,14 +140,10 @@ export default {
           switch (this.actionType) {
             case ACTION_ADD:
               createEquipment(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })
@@ -159,14 +151,10 @@ export default {
 
             case ACTION_UPDATE:
               updateEquipment(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })

+ 10 - 22
src/views/aqpt/equipment/components/EquipmentCat.vue

@@ -74,12 +74,8 @@ export default {
       this.actionType = ACTION_UPDATE
       this.dialogVisible = true
       getEquipmentCatById(equipCatId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.formData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data
       }).catch((error) => {
         console.log(error)
       })
@@ -100,14 +96,10 @@ export default {
           switch (this.actionType) {
             case ACTION_ADD:
               createEquipmentCat(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })
@@ -115,14 +107,10 @@ export default {
 
             case ACTION_UPDATE:
               updateEquipmentCat(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })

+ 6 - 13
src/views/aqpt/equipment/components/EquipmentList.vue

@@ -116,12 +116,10 @@ export default {
     getData() {
       this.listLoading = true
       getEquipmentByPage(this.conditions).then((resp) => {
-        const { code, data, total } = resp
+        const { data, total } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.dataList = data
-          this.total = total
-        }
+        this.dataList = data
+        this.total = total
       }).catch((error) => {
         console.log(error)
       })
@@ -147,13 +145,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteEquipmentById(equipId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         }).catch((error) => {
           console.log(error)
         })
@@ -177,7 +171,6 @@ export default {
     font-size: 16px;
     font-weight: bold;
     color: #FFFFFF;
-    font-weight: bold;
     background: linear-gradient(0deg, #FFFFFF 0%, #98A8B7 100%);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;

+ 8 - 16
src/views/aqpt/equipment/components/LeftCat.vue

@@ -68,15 +68,11 @@ export default {
   methods: {
     getData() {
       getEquipmentCatByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.treeData = data
-          if (data.length > 0) {
-            this.checkedKeys.push(data[0].equipCatId)
-            this.handleTreeInit(data[0])
-          }
-        } else {
-          this.$message.error(msg)
+        const { data } = resp
+        this.treeData = data
+        if (data.length > 0) {
+          this.checkedKeys.push(data[0].equipCatId)
+          this.handleTreeInit(data[0])
         }
       }).catch((error) => {
         console.log(error)
@@ -126,13 +122,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteEquipmentCatById(equipCatId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.$message.success(msg)
-            this.getData()
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.$message.success(msg)
+          this.getData()
         }).catch((error) => {
           console.log(error)
         })

+ 10 - 22
src/views/aqpt/hazard/components/Hazard.vue

@@ -100,12 +100,8 @@ export default {
       this.actionType = ACTION_UPDATE
       this.dialogVisible = true
       getHazardById(hazardId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.formData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data
       }).catch((error) => {
         console.log(error)
       })
@@ -131,14 +127,10 @@ export default {
           switch (this.actionType) {
             case ACTION_ADD:
               createHazard(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })
@@ -146,14 +138,10 @@ export default {
 
             case ACTION_UPDATE:
               updateHazard(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })

+ 15 - 23
src/views/aqpt/hazard/components/HazardTree.vue

@@ -66,22 +66,18 @@ export default {
   methods: {
     getData() {
       getHazardByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          const temp = toTree(data, {
-            value: 'hazardId',
-            name: 'hazardTitle',
-            pValue: 'parentId'
-          }, {
-            value: 'hazardId',
-            name: 'hazardTitle',
-            pValue: 'parentId'
-          })
-          this.treeData = temp
-          if (temp.length > 0) { this.handleTreeInit(temp[0]) }
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        const temp = toTree(data, {
+          value: 'hazardId',
+          name: 'hazardTitle',
+          pValue: 'parentId'
+        }, {
+          value: 'hazardId',
+          name: 'hazardTitle',
+          pValue: 'parentId'
+        })
+        this.treeData = temp
+        if (temp.length > 0) { this.handleTreeInit(temp[0]) }
       }).catch((error) => {
         console.log(error)
       })
@@ -136,13 +132,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteHazard(hazardId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         }).catch((error) => {
           console.log(error)
         })

+ 10 - 22
src/views/aqpt/hazard/components/Measure.vue

@@ -102,12 +102,8 @@ export default {
       this.actionType = ACTION_UPDATE
       this.dialogVisible = true
       getHazardRiskMeasureById(hazardId, riskId, measureId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.formData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data
       }).catch((error) => {
         console.log(error)
       })
@@ -131,14 +127,10 @@ export default {
           switch (this.actionType) {
             case ACTION_ADD:
               createHazardRiskMeasure(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })
@@ -146,14 +138,10 @@ export default {
 
             case ACTION_UPDATE:
               updateHazardRiskMeasure(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })

+ 6 - 15
src/views/aqpt/hazard/components/MeasureList.vue

@@ -102,13 +102,9 @@ export default {
       this.listLoading = true
       getHazardRiskMeasureByList(this.conditions).then((resp) => {
         this.listLoading = false
-        const { code, data, total, msg } = resp
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data, total } = resp
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -146,13 +142,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteHazardRiskMeasureById(hazardId, riskId, measureId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         }).catch((error) => {
           console.log(error)
         })
@@ -174,7 +166,6 @@ export default {
     font-weight: bold;
     color: #FFFFFF;
 
-    font-weight: bold;
     background: linear-gradient(0deg, #FFFFFF 0%, #98A8B7 100%);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;

+ 11 - 24
src/views/aqpt/hazard/components/Risk.vue

@@ -161,14 +161,9 @@ export default {
       this.actionType = ACTION_UPDATE
       this.dialogVisible = true
       getHazardRiskById(hazardId, riskId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.formData = data
-          this.formData.positionId = strArr2NumArr(data.positionIdList.split(','))
-          console.log('this.formData.positionId', this.formData.positionId.toString())
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data
+        this.formData.positionId = strArr2NumArr(data.positionIdList.split(','))
       }).catch((error) => {
         console.log(error)
       })
@@ -196,14 +191,10 @@ export default {
             case ACTION_ADD:
               this.formData.positionIdList = this.formData.positionId.toString()
               createHazardRisk(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })
@@ -212,14 +203,10 @@ export default {
             case ACTION_UPDATE:
               this.formData.positionIdList = this.formData.positionId.toString()
               updateHazardRisk(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })

+ 6 - 14
src/views/aqpt/hazard/components/RiskList.vue

@@ -149,13 +149,9 @@ export default {
       this.listLoading = true
       getHazardRiskByPage(this.conditions).then((resp) => {
         this.listLoading = false
-        const { code, msg, data, total } = resp
-        if (code === 0) {
-          this.dataList = data
-          this.total = total
-        } else {
-          this.$message.error(msg)
-        }
+        const { data, total } = resp
+        this.dataList = data
+        this.total = total
       }).catch((error) => {
         console.log(error)
       })
@@ -202,13 +198,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteHazardRiskById(hazardId, riskId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         }).catch((error) => {
           console.log(error)
         })

+ 5 - 9
src/views/aqpt/map/index.vue

@@ -75,12 +75,10 @@ export default {
     getData() {
       this.listLoading = true
       getMapByPage(this.conditions).then((resp) => {
-        const { code, data, total } = resp
+        const { data, total } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        }
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -113,10 +111,8 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteMapById(mapId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.getData()
-          }
+          const { msg } = resp
+          this.getData()
           this.$message({
             type: 'success',
             message: msg

+ 10 - 22
src/views/aqpt/map/map.vue

@@ -112,12 +112,8 @@ export default {
       this.resetFormData()
       this.dialogVisible = true
       getMapById(mapId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.formData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data
       }).catch((error) => {
         console.log(error)
       })
@@ -155,14 +151,10 @@ export default {
       switch (actionType) {
         case ACTION_ADD:
           createMap(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.formSuccess()
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
           }).catch((error) => {
             console.log(error)
           })
@@ -170,14 +162,10 @@ export default {
 
         case ACTION_UPDATE:
           updateMap(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.formSuccess()
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
           }).catch((error) => {
             console.log(error)
           })

+ 23 - 35
src/views/aqpt/panorama/index.vue

@@ -253,23 +253,19 @@ export default {
     // 初始化数据
     getOverview() {
       getPanoramaOverview().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          if (!data) return
-          this.riskPointCounter = data.riskPointCounter
-          this.todayTaskList = data.todayTaskList
-          this.todayTaskTotal = data.todayTaskTotal
-          this.mapLayerList = data.mapLayerList
-          if (data.dangerCounter) this.dangerCounter = data.dangerCounter
-          this.dangerList = data.dangerList
-          this.warningList = data.warningList
-          this.warningTotal = data.warningTotal
-          this.last30DayCounter = data.last30DayCounter
-          if (this.last30DayCounter) {
-            this.$refs['FullMonthChart'].initCharts(this.last30DayCounter)
-          }
-        } else {
-          this.$message.error(msg)
+        const { data } = resp
+        if (!data) return
+        this.riskPointCounter = data.riskPointCounter
+        this.todayTaskList = data.todayTaskList
+        this.todayTaskTotal = data.todayTaskTotal
+        this.mapLayerList = data.mapLayerList
+        if (data.dangerCounter) this.dangerCounter = data.dangerCounter
+        this.dangerList = data.dangerList
+        this.warningList = data.warningList
+        this.warningTotal = data.warningTotal
+        this.last30DayCounter = data.last30DayCounter
+        if (this.last30DayCounter) {
+          this.$refs['FullMonthChart'].initCharts(this.last30DayCounter)
         }
       }).catch((error) => {
         console.log(error)
@@ -279,17 +275,13 @@ export default {
     // 初始化地图
     getMapData() {
       getMapByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.mapList = data
-          if (data.length <= 0) return
-          const map1 = data[0]
-          this.mapId = map1.mapId
-          this.mapRasterLayer = map1.mapRasterLayer
-          this.initMap()
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.mapList = data
+        if (data.length <= 0) return
+        const map1 = data[0]
+        this.mapId = map1.mapId
+        this.mapRasterLayer = map1.mapRasterLayer
+        this.initMap()
       }).catch((error) => {
         console.log(error)
       })
@@ -325,13 +317,9 @@ export default {
       const obj = {}
       obj.mapId = this.mapId
       getMapLayerByList(obj).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.mapLayerList = data
-          this.initMapLayers()
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.mapLayerList = data
+        this.initMapLayers()
       }).catch((error) => {
         console.log(error)
       })

+ 9 - 19
src/views/aqpt/profile/components/Ent.vue

@@ -462,12 +462,8 @@ export default {
     // Init Ent Category List
     initEntCatList() {
       getEntCatByList().then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.entCatList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.entCatList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -490,11 +486,9 @@ export default {
       this.initEntCatList()
       this.dialogVisible = true
       getEntProfile().then((resp) => {
-        const { code, data } = resp
-        if (code === 0) {
-          this.formData = data
-          this.viewData.cityCode = this.formData.entXzqhdm.split(',')
-        }
+        const { data } = resp
+        this.formData = data
+        this.viewData.cityCode = this.formData.entXzqhdm.split(',')
       }).catch((error) => {
         console.log(error)
       })
@@ -547,14 +541,10 @@ export default {
         if (valid) {
           this.formData.entXzqhdm = this.viewData.cityCode.join(',')
           updateEntProfile(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.$emit('formSuccess')
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.$emit('formSuccess')
           }).catch((error) => {
             console.log(error)
           })

+ 2 - 6
src/views/aqpt/profile/components/EntProfile.vue

@@ -271,12 +271,8 @@ export default {
     getData() {
       this.dialogVisible = true
       getEntProfile().then((resp) => {
-        const { code, msg, data } = resp
-        if (code === 0) {
-          this.viewData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.viewData = data
       }).catch((error) => {
         console.log(error)
       })

+ 3 - 7
src/views/aqpt/report/dangerReport.vue

@@ -114,13 +114,9 @@ export default {
       this.listLoading = true
       getDangerReport(this.conditions).then((resp) => {
         this.listLoading = false
-        const { code, data, total, msg } = resp
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data, total } = resp
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })

+ 4 - 8
src/views/aqpt/report/dutyChecklist.vue

@@ -71,14 +71,10 @@ export default {
     getData() {
       this.listLoading = true
       getDutyChecklist(this.conditions).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.listLoading = false
-          this.title = data.checklistTitle
-          this.tableData = this.formatTable(data)
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.listLoading = false
+        this.title = data.checklistTitle
+        this.tableData = this.formatTable(data)
       }).catch((error) => {
         console.log(error)
       })

+ 3 - 5
src/views/aqpt/report/gridChecklist.vue

@@ -117,12 +117,10 @@ export default {
     getData() {
       this.listLoading = true
       getGridChecklist(this.conditions).then((resp) => {
-        const { code, data, total } = resp
+        const { data, total } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        }
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })

+ 5 - 10
src/views/aqpt/report/measureChecklist.vue

@@ -120,16 +120,11 @@ export default {
     getData() {
       this.listLoading = true
       getMeasureChecklist(this.conditions).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.listLoading = false
-          // this.viewData = data
-          this.tableData = this.tableSortfn(data, 'riskPointTitle')// riskPointId
-          this.rowspan()
-          // this.total=res
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.listLoading = false
+        // this.viewData = data
+        this.tableData = this.tableSortfn(data, 'riskPointTitle')// riskPointId
+        this.rowspan()
       }).catch((error) => {
         console.log(error)
       })

+ 6 - 15
src/views/aqpt/riskpoint/art/RiskPointArt.vue

@@ -99,13 +99,9 @@ export default {
       }
       getRiskPointArtByList(this.conditions).then((resp) => {
         this.listLoading = false
-        const { code, data, total, msg } = resp
-        if (code === 0) {
-          this.conditions.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data, total } = resp
+        this.conditions.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -120,13 +116,9 @@ export default {
     handleDelete(data) {
       const { riskPointId, artId } = data
       deleteRiskPointArtById(riskPointId, artId).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.getData()
-          this.$message.success(msg)
-        } else {
-          this.$message.error(msg)
-        }
+        const { msg } = resp
+        this.getData()
+        this.$message.success(msg)
       }).catch((error) => {
         console.log(error)
       })
@@ -152,7 +144,6 @@ export default {
     font-weight: bold;
     color: #FFFFFF;
 
-    font-weight: bold;
     background: linear-gradient(0deg, #FFFFFF 0%, #98A8B7 100%);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;

+ 6 - 14
src/views/aqpt/riskpoint/art/SelectArt.vue

@@ -96,13 +96,9 @@ export default {
     getData() {
       this.listLoading = true
       getSelectArtByPage(this.conditions).then((resp) => {
-        const { code, data, msg } = resp
+        const { data } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -122,14 +118,10 @@ export default {
       obj.riskPointId = this.conditions.riskPointId
       obj.artId = artId
       createRiskPointArt(obj).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.getData()
-          this.$message.success(msg)
-          this.formSuccess()
-        } else {
-          this.$message.error(msg)
-        }
+        const { msg } = resp
+        this.getData()
+        this.$message.success(msg)
+        this.formSuccess()
       }).catch((error) => {
         console.log(error)
       })

+ 8 - 13
src/views/aqpt/riskpoint/basic/BasicInfo.vue

@@ -120,19 +120,14 @@ export default {
     getData() {
       const riskPointId = this.conditions.riskPointId
       getRiskPointDetailById(riskPointId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          // eslint-disable-next-line no-unused-vars
-          const { riskPointId, riskPointPhoto, mapLayer } = data
-          this.viewData = data
-          this.$nextTick(() => {
-            this.$refs['RiskPointPhoto'].load(riskPointId, riskPointPhoto)
-            // console.log(mapLayer)
-            // this.$refs['RiskPointMapLayer'].load(riskPointId, mapLayer)
-          })
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        const { riskPointId, riskPointPhoto } = data
+        this.viewData = data
+        this.$nextTick(() => {
+          this.$refs['RiskPointPhoto'].load(riskPointId, riskPointPhoto)
+          // console.log(mapLayer)
+          // this.$refs['RiskPointMapLayer'].load(riskPointId, mapLayer)
+        })
       }).catch((error) => {
         console.log(error)
       })

+ 3 - 7
src/views/aqpt/riskpoint/checklist/Details.vue

@@ -161,13 +161,9 @@ export default {
       this.conditions.checklistId = checklistId
       this.dialogVisible = true
       getRiskPointCheckListViewById(riskPointId, checklistId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.title = data.checklistTitle
-          this.viewData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.title = data.checklistTitle
+        this.viewData = data
       }).catch((error) => {
         console.log(error)
       })

+ 6 - 14
src/views/aqpt/riskpoint/checklist/RiskPointChecklist.vue

@@ -94,13 +94,9 @@ export default {
       this.listLoading = true
       getChecklistTargetByList(this.conditions).then((resp) => {
         this.listLoading = false
-        const { code, data, total, msg } = resp
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data, total } = resp
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -118,13 +114,9 @@ export default {
     handleDelete(data) {
       const { targetId, checklistId } = data
       deleteChecklistTargetById(targetId, checklistId).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.getData()
-          this.$message.success(msg)
-        } else {
-          this.$message.error(msg)
-        }
+        const { msg } = resp
+        this.getData()
+        this.$message.success(msg)
       }).catch((error) => {
         console.log(error)
       })

+ 6 - 15
src/views/aqpt/riskpoint/checklist/SelectChecklist.vue

@@ -95,13 +95,9 @@ export default {
     getData() {
       this.listLoading = true
       getSelectChecklistByPage(this.conditions).then((resp) => {
-        const { code, data, msg } = resp
+        const { data } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -121,14 +117,10 @@ export default {
       obj.riskPointId = this.conditions.riskPointId
       obj.checklistId = checklistId
       createRiskPointChecklist(obj).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.getData()
-          this.$message.success(msg)
-          this.formSuccess()
-        } else {
-          this.$message.error(msg)
-        }
+        const { msg } = resp
+        this.getData()
+        this.$message.success(msg)
+        this.formSuccess()
       }).catch((error) => {
         console.log(error)
       })
@@ -166,7 +158,6 @@ export default {
     font-weight: bold;
     color: #FFFFFF;
 
-    font-weight: bold;
     background: linear-gradient(0deg, #FFFFFF 0%, #98A8B7 100%);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;

+ 13 - 25
src/views/aqpt/riskpoint/components/RiskPoint.vue

@@ -191,17 +191,13 @@ export default {
       this.actionType = ACTION_UPDATE
       this.dialogVisible = true
       getRiskPointById(riskPointId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          if (data.activeStartTime) {
-            data.temporary = 1
-          } else {
-            data.temporary = 0
-          }
-          this.formData = data
+        const { data } = resp
+        if (data.activeStartTime) {
+          data.temporary = 1
         } else {
-          this.$message.error(msg)
+          data.temporary = 0
         }
+        this.formData = data
       }).catch((error) => {
         console.log(error)
       })
@@ -230,14 +226,10 @@ export default {
           switch (this.actionType) {
             case ACTION_ADD:
               createRiskPoint(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })
@@ -245,14 +237,10 @@ export default {
 
             case ACTION_UPDATE:
               updateRiskPoint(this.formData).then((resp) => {
-                const { code, msg } = resp
-                if (code === 0) {
-                  this.dialogVisible = false
-                  this.$message.success(msg)
-                  this.formSuccess()
-                } else {
-                  this.$message.error(msg)
-                }
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
               }).catch((error) => {
                 console.log(error)
               })

+ 5 - 13
src/views/aqpt/riskpoint/hazard/RiskPointHazard.vue

@@ -115,13 +115,9 @@ export default {
         console.log('error: Basic没风险点')
       }
       getRiskPointHazardViewByList(this.conditions).then((resp) => {
-        const { code, data, msg } = resp
+        const { data } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.viewData.hazardList = data
-        } else {
-          this.$message.error(msg)
-        }
+        this.viewData.hazardList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -137,13 +133,9 @@ export default {
       const { hazardId } = data
       const riskPointId = this.conditions.riskPointId
       deleteRiskPointHazardById(riskPointId, hazardId).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.getData()
-          this.$message.success(msg)
-        } else {
-          this.$message.error(msg)
-        }
+        const { msg } = resp
+        this.getData()
+        this.$message.success(msg)
       }).catch((error) => {
         console.log(error)
       })

+ 19 - 31
src/views/aqpt/riskpoint/hazard/SelectHazard.vue

@@ -185,22 +185,18 @@ export default {
       const obj = {}
       obj.riskPointId = this.riskPointId
       getSelectHazardByList(obj).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          const temp = toTree(data, {
-            value: 'hazardId',
-            name: 'hazardTitle',
-            pValue: 'parentId'
-          }, {
-            value: 'hazardId',
-            name: 'hazardTitle',
-            pValue: 'parentId'
-          })
-          this.treeData = temp
-          if (temp.length > 0) { this.hazardSelChange(temp[0]) }
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        const temp = toTree(data, {
+          value: 'hazardId',
+          name: 'hazardTitle',
+          pValue: 'parentId'
+        }, {
+          value: 'hazardId',
+          name: 'hazardTitle',
+          pValue: 'parentId'
+        })
+        this.treeData = temp
+        if (temp.length > 0) { this.hazardSelChange(temp[0]) }
       }).catch((error) => {
         console.log(error)
       })
@@ -214,13 +210,9 @@ export default {
       this.listLoading = true
       getHazardRiskByPage(this.conditions).then((resp) => {
         this.listLoading = false
-        const { code, msg, data, total } = resp
-        if (code === 0) {
-          this.dataList = data
-          this.total = total
-        } else {
-          this.$message.error(msg)
-        }
+        const { data, total } = resp
+        this.dataList = data
+        this.total = total
       }).catch((error) => {
         console.log(error)
       })
@@ -232,14 +224,10 @@ export default {
       obj.riskPointId = this.riskPointId
       obj.hazardId = this.conditions.hazardId
       createRiskPointHazard(obj).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.getData()
-          this.$message.success(msg)
-          this.formSuccess()
-        } else {
-          this.$message.error(msg)
-        }
+        const { msg } = resp
+        this.getData()
+        this.$message.success(msg)
+        this.formSuccess()
       }).catch((error) => {
         console.log(error)
       })

+ 11 - 27
src/views/aqpt/riskpoint/index.vue

@@ -199,13 +199,9 @@ export default {
       const settingId = 1
       this.listLoading = true
       getSettingById(settingId).then((resp) => {
-        const { code, msg, data } = resp
+        const { data } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.miniUrl = data.settingValue
-        } else {
-          this.$message.error(msg)
-        }
+        this.miniUrl = data.settingValue
       }).catch((error) => {
         console.log(error)
       })
@@ -215,13 +211,9 @@ export default {
       this.listLoading = true
       getRiskPointByPage(this.conditions).then((resp) => {
         this.listLoading = false
-        const { code, data, total, msg } = resp
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data, total } = resp
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -390,13 +382,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteRiskPointById(riskPointId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         }).catch((error) => {
           console.log(error)
         })
@@ -428,13 +416,9 @@ export default {
         formData.type = type
         console.log('formData', formData)
         batchUpdateRiskPoint(formData).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         }).catch((error) => {
           console.log(error)
         })

+ 2 - 4
src/views/aqpt/riskpoint/mapLayer/index.vue

@@ -90,10 +90,8 @@ export default {
     },
     getMapLayerList() {
       getMapLayerByList().then((resp) => {
-        const { code, data } = resp
-        if (code === 0) {
-          this.viewData.mapLayer = data
-        }
+        const { data } = resp
+        this.viewData.mapLayer = data
       })
     },
     // 设置地图背景图

+ 6 - 14
src/views/aqpt/riskpoint/photo/index.vue

@@ -44,13 +44,9 @@ export default {
       const formData = new FormData()
       formData.append('file', file)
       uploadFile(formData).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.formData.riskPointPhoto = data.path
-          this.updateRiskPointPhoto()
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData.riskPointPhoto = data.path
+        this.updateRiskPointPhoto()
       }).catch((error) => {
         console.log(error)
       })
@@ -59,13 +55,9 @@ export default {
     // 更新风险点现场照片
     updateRiskPointPhoto() {
       updateRiskPoint(this.formData).then((resp) => {
-        const { code, msg } = resp
-        if (code === 0) {
-          this.dialogVisible = false
-          this.$message.success(msg)
-        } else {
-          this.$message.error(msg)
-        }
+        const { msg } = resp
+        this.dialogVisible = false
+        this.$message.success(msg)
       }).catch((error) => {
         console.log(error)
       })

+ 10 - 22
src/views/aqpt/setting/alertType/alertType.vue

@@ -65,12 +65,8 @@ export default {
       this.resetFormData()
       this.dialogVisible = true
       getAlertTypeById(id).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.formData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data
       }).catch((error) => {
         console.log(error)
       })
@@ -103,14 +99,10 @@ export default {
       switch (actionType) {
         case ACTION_ADD:
           createAlertType(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.formSuccess()
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
           }).catch((error) => {
             console.log(error)
           })
@@ -118,14 +110,10 @@ export default {
 
         case ACTION_UPDATE:
           updateAlertType(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.formSuccess()
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
           }).catch((error) => {
             console.log(error)
           })

+ 6 - 14
src/views/aqpt/setting/alertType/index.vue

@@ -78,14 +78,10 @@ export default {
     getData() {
       this.listLoading = true
       getAlertTypeByPage(this.conditions).then((resp) => {
-        const { code, data, total, msg } = resp
+        const { data, total } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -111,13 +107,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteAlertTypeById(alertTypeId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         }).catch((error) => {
           console.log(error)
         })

+ 10 - 22
src/views/aqpt/setting/checkCat/component/CheckCat.vue

@@ -69,12 +69,8 @@ export default {
       this.resetFormData()
       this.dialogVisible = true
       getCheckCatById(id).then((resp) => {
-        const { code, msg, data } = resp
-        if (code === 0) {
-          this.formData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data
       }).catch((error) => {
         console.log(error)
       })
@@ -107,14 +103,10 @@ export default {
       switch (actionType) {
         case ACTION_ADD:
           createCheckCat(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.formSuccess()
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
           }).catch((error) => {
             console.log(error)
           })
@@ -122,14 +114,10 @@ export default {
 
         case ACTION_UPDATE:
           updateCheckCat(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.formSuccess()
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
           }).catch((error) => {
             console.log(error)
           })

+ 6 - 14
src/views/aqpt/setting/checkCat/index.vue

@@ -80,13 +80,9 @@ export default {
       this.listLoading = true
       getCheckCatByPage(this.conditions).then((resp) => {
         this.listLoading = false
-        const { code, msg, data, total } = resp
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data, total } = resp
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -118,13 +114,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteCheckCatById(checkCatId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.$message.success(msg)
-            this.getData()
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.$message.success(msg)
+          this.getData()
         }).catch((error) => {
           console.log(error)
         })

+ 6 - 14
src/views/aqpt/setting/ctrlLevel/ctrlLevel.vue

@@ -59,12 +59,8 @@ export default {
       this.resetFormData()
       this.dialogVisible = true
       getCtrlLevelById(id).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.formData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data
       }).catch((error) => {
         console.log(error)
       })
@@ -84,14 +80,10 @@ export default {
       this.$refs[formName].validate((valid) => {
         if (valid) {
           updateCtrlLevel(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.formSuccess()
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
           }).catch((error) => {
             console.log(error)
           })

+ 3 - 5
src/views/aqpt/setting/ctrlLevel/index.vue

@@ -76,11 +76,9 @@ export default {
       this.listLoading = true
       getCtrlLevelByList(this.conditions).then((resp) => {
         this.listLoading = false
-        const { code, data, total } = resp
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        }
+        const { data, total } = resp
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })

+ 10 - 22
src/views/aqpt/setting/dangerCat/dangerCat.vue

@@ -68,12 +68,8 @@ export default {
       this.resetFormData()
       this.dialogVisible = true
       getDangerCatById(id).then((resp) => {
-        const { code, msg, data } = resp
-        if (code === 0) {
-          this.formData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data
       }).catch((error) => {
         console.log(error)
       })
@@ -106,14 +102,10 @@ export default {
       switch (actionType) {
         case ACTION_ADD:
           createDangerCat(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.formSuccess()
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
           }).catch((error) => {
             console.log(error)
           })
@@ -121,14 +113,10 @@ export default {
 
         case ACTION_UPDATE:
           updateDangerCat(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.formSuccess()
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
           }).catch((error) => {
             console.log(error)
           })

+ 6 - 14
src/views/aqpt/setting/dangerCat/index.vue

@@ -79,13 +79,9 @@ export default {
       this.listLoading = true
       getDangerCatByPage(this.conditions).then((resp) => {
         this.listLoading = false
-        const { code, msg, data, total } = resp
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data, total } = resp
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -117,13 +113,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteDangerCat(dangerCatId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.$message.success(msg)
-            this.getData()
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.$message.success(msg)
+          this.getData()
         }).catch((error) => {
           console.log(error)
         })

+ 10 - 24
src/views/aqpt/setting/equipmentCat/equipmentCat.vue

@@ -64,17 +64,12 @@ export default {
 
     // Show Edit Model
     showEditModel(id) {
-      console.log('id-->', id)
       this.actionType = ACTION_UPDATE
       this.resetFormData()
       this.dialogVisible = true
       getEquipmentCatById(id).then((resp) => {
-        const { code, msg, data } = resp
-        if (code === 0) {
-          this.formData = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data } = resp
+        this.formData = data
       }).catch((error) => {
         console.log(error)
       })
@@ -107,14 +102,10 @@ export default {
       switch (actionType) {
         case ACTION_ADD:
           createEquipmentCat(this.formData).then((resp) => {
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.formSuccess()
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
           }).catch((error) => {
             console.log(error)
           })
@@ -122,15 +113,10 @@ export default {
 
         case ACTION_UPDATE:
           updateEquipmentCat(this.formData).then((resp) => {
-            console.log('this.formData', this.formData)
-            const { code, msg } = resp
-            if (code === 0) {
-              this.dialogVisible = false
-              this.$message.success(msg)
-              this.formSuccess()
-            } else {
-              this.$message.error(msg)
-            }
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
           }).catch((error) => {
             console.log(error)
           })

+ 6 - 14
src/views/aqpt/setting/equipmentCat/index.vue

@@ -79,13 +79,9 @@ export default {
       this.listLoading = true
       getEquipmentCatByPage(this.conditions).then((resp) => {
         this.listLoading = false
-        const { code, msg, data, total } = resp
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data, total } = resp
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -118,13 +114,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteEquipmentCatById(equipCatId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.$message.success(msg)
-            this.getData()
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.$message.success(msg)
+          this.getData()
         }).catch((error) => {
           console.log(error)
         })

+ 6 - 14
src/views/aqpt/setting/measureType/index.vue

@@ -73,14 +73,10 @@ export default {
     getData() {
       this.listLoading = true
       getMeasureTypeByList(this.conditions).then((resp) => {
-        const { code, data, total, msg } = resp
+        const { data, total } = resp
         this.listLoading = false
-        if (code === 0) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -106,13 +102,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteMeasureTypeById(measureTypeId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 0) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         }).catch((error) => {
           console.log(error)
         })

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels