luojun hace 1 año
padre
commit
60c7a24741

+ 11 - 2
src/views/check/dialog.edit.vue

@@ -802,17 +802,23 @@ export default {
     },
     onSubmit() {
       this.$refs.form.validate(async (isValidate) => {
+        if (!isValidate) return;
+        this.loading = true;
+        let status=0;
         // console.log(this.formData.hasEdit,"this.formData.hasEdit")
         this.formData.planCreateOrgId = this.orgId;
         this.formData.planCreateOrgName = this.orgName;
+        status=this.formData.planStatus;
         this.formData.planStatus = 0;
-        if (!isValidate) return;
+
         this.formData.rulePointList =
           this.tableData == null ? [] : this.tableData;
+          let rols=this.formData.roleList;
+          let rolis=this.formData.roleIds;
         this.formData.roleList = null;
         this.formData.roleIds =
           this.selectedValues.length == 0 ? null : this.selectedValues;
-        this.loading = true;
+        
         if (this.formData.planCycle == 6) {
           this.formData.buildTaskNow = true;
         }
@@ -824,6 +830,9 @@ export default {
             this.onHide();
           })
           .catch((err) => {
+            this.formData.roleList=rols;
+            this.formData.roleIds=rolis;
+            this.formData.planStatus=status;
             this.loading = false;
             // console.log(err,"err")
           });

+ 19 - 6
src/views/resumption/plan/dialog.edit.vue

@@ -6,7 +6,7 @@
       :visible.sync="isShow"
       width="1500px"
     >
-      <div class="page-body">
+      <div class="page-body" v-loading="loading">
         <el-form
           :model="formData"
           :rules="formDataRules"
@@ -302,6 +302,7 @@ export default {
     // let o=statusOptions;
     // debugger
     return {
+      loading: false,
       parentCount: 1,
       buildTime: null,
       isSubmitting: false,
@@ -804,12 +805,14 @@ export default {
     },
     onSubmit() {
       this.$refs.form.validate(async (isValidate) => {
+        if (!isValidate) return;
+        this.loading = true;
         // this.formData.planStatus = 0;
         this.isSubmitting = true;
         // this.formData.note = this.formData.description;
         this.formData.planCreateOrgId = this.orgId;
         this.formData.planCreateOrgName = this.orgName;
-        if (!isValidate) return;
+      
         this.formData.itemList = this.tableData == null ? [] : this.tableData;
         //新需求,自动填充角色
         if (
@@ -823,10 +826,20 @@ export default {
         }
         this.formData.roleList =
           this.selectedValues.length == 0 ? null : this.selectedValues;
-        await api.update(this.formData);
-        this.isSubmitting = false;
-        this.$emit("success");
-        this.onHide();
+
+        await api.update(this.formData).then((data) => {
+          this.isSubmitting = false;
+            this.loading = false;
+            this.$emit("success");
+            this.onHide();
+          })
+          .catch((err) => {
+            this.loading = false;
+            // console.log(err,"err")
+          });
+        
+        // this.$emit("success");
+        // this.onHide();
       });
     },
     handleRolesChange(val) {

+ 10 - 1
src/views/safetyBook/dialog.edit.vue

@@ -221,7 +221,16 @@ export default {
       };
     },
     removeRow(row) {
-      this.tableData = this.tableData.filter((item) => item !== row);
+      this.$modal
+        .confirm("是否确认删除?")
+        .then(function () {})
+        .then(() => {
+          this.tableData = this.tableData.filter((item) => item !== row);
+          this.$modal.msgSuccess("删除成功");
+        });
+
+      // this.tableData.splice(index, 1);
+    
     },
     reset() {
       return {

+ 1 - 0
src/views/system/dept/index.vue

@@ -479,6 +479,7 @@ export default {
         checkSub: true,
         type: null,
         code: null,
+        isLock:null,
       },
       // 表单参数
       form: {},