jiangbiao 2 år sedan
förälder
incheckning
bb674eecb4

+ 6 - 6
ui/src/views/base/device/index.vue

@@ -506,14 +506,14 @@ export default {
     handleUpdate(row) {
       this.reset();
       const devId = row.devId || this.ids
-      if (row.approveStatus != 0) {
-        MessageBox.alert('已送审/已审核的数据不可修改!', '注意!', {
-          confirmButtonText: '确定',
-        })
-        return;
-      }
       getDevice(devId).then(response => {
         this.form = response.data;
+        if (this.form.approveStatus != 0) {
+          MessageBox.alert('已送审/已审核的数据不可修改!', '注意!', {
+            confirmButtonText: '确定',
+          })
+          return;
+        }
         getAllRegion(this.form.plantId).then(response => {
             this.regionOperation = response.data;
             console.log(this.regionOperation)

+ 6 - 6
ui/src/views/base/plant/index.vue

@@ -383,15 +383,15 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      if (row.approveStatus!=0){
-        MessageBox.alert('已送审/已审核的数据不可修改!', '注意!', {
-          confirmButtonText: '确定',
-        })
-        return;
-      }
       const plantId = row.plantId || this.ids
       getPlant(plantId).then(response => {
         this.form = response.data;
+        if (this.form.approveStatus!=0){
+          MessageBox.alert('已送审/已审核的数据不可修改!', '注意!', {
+            confirmButtonText: '确定',
+          })
+          return;
+        }
         this.open = true;
         this.title = "修改装置";
       });

+ 6 - 6
ui/src/views/base/point/index.vue

@@ -1089,14 +1089,14 @@ export default {
     handleUpdate(row) {
       this.reset();
       const pointId = row.pointId || this.ids
-      if (row.approveStatus != 0) {
-        MessageBox.alert('已送审/已审核的数据不可删除!', '注意!', {
-          confirmButtonText: '确定',
-        })
-        return
-      }
       getPoint(pointId).then(response => {
         this.form = response.data;
+        if (this.form.approveStatus != 0) {
+          MessageBox.alert('已送审/已审核的数据不可修改!', '注意!', {
+            confirmButtonText: '确定',
+          })
+          return;
+        }
         getAllRegion(this.form.plantId).then(response => {
             this.regionOperation = response.data;
           }

+ 6 - 6
ui/src/views/base/region/index.vue

@@ -449,14 +449,14 @@ export default {
     handleUpdate(row) {
       this.reset();
       const regionId = row.regionId || this.ids
-      if (row.approveStatus != 0) {
-        MessageBox.alert('已送审/已审核的数据不可修改!', '注意!', {
-          confirmButtonText: '确定',
-        })
-        return;
-      }
       getRegion(regionId).then(response => {
         this.form = response.data;
+        if (this.form.approveStatus != 0) {
+          MessageBox.alert('已送审/已审核的数据不可修改!', '注意!', {
+            confirmButtonText: '确定',
+          })
+          return;
+        }
         this.open = true;
         this.title = "修改区域";
       });

+ 6 - 6
ui/src/views/check/laws/index.vue

@@ -299,16 +299,16 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      if (row.status==1){
-        MessageBox.alert('匹配中的法规不可修改!', '注意!', {
-          confirmButtonText: '确定',
-        })
-        return;
-      }
       this.reset();
       const id = row.id || this.ids
       getLaws(id).then(response => {
         this.form = response.data;
+        if (this.form.status==1){
+          MessageBox.alert('匹配中的法规不可修改!', '注意!', {
+            confirmButtonText: '确定',
+          })
+          return;
+        }
         this.open = true;
         this.title = "修改法规";
       });

+ 7 - 6
ui/src/views/task/inspection/index.vue

@@ -478,17 +478,18 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      if (row.status != 0) {
-        MessageBox.alert('已分配的任务不可修改!', '注意!', {
-          confirmButtonText: '确定',
-        })
-        return
-      }
+      console.log(row)
       this.reset();
       this.isEdit=true;
       const id = row.id || this.ids
       getInspection(id).then(response => {
         this.form = response.data;
+        if (this.form.status != 0) {
+          MessageBox.alert('已分配的任务不可修改!', '注意!', {
+            confirmButtonText: '确定',
+          })
+          return
+        }
         this.open = true;
         this.title = "修改检测任务";
       });

+ 6 - 6
ui/src/views/task/repair/index.vue

@@ -464,16 +464,16 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      if (row.status != 0) {
-        MessageBox.alert('已分配的任务不可修改!', '注意!', {
-          confirmButtonText: '确定',
-        })
-        return
-      }
       this.reset();
       const id = row.id || this.ids
       getRepair(id).then(response => {
         this.form = response.data;
+        if (this.form.status != 0) {
+          MessageBox.alert('已分配的任务不可修改!', '注意!', {
+            confirmButtonText: '确定',
+          })
+          return
+        }
         this.open = true;
         this.title = "修改维修任务";
       });