Procházet zdrojové kódy

Merge remote-tracking branch 'origin/V0.0.4' into V0.0.4

jingyuanchao před 1 rokem
rodič
revize
ccc404c7ca

+ 9 - 18
src/views/resumption/plan/dialog.edit.vue

@@ -25,7 +25,7 @@
                   name="planName"
                   placeholder="请输入任务名称"
                   clearable
-                  style="width:217px"
+                  style="width: 217px"
                 />
               </el-form-item>
             </el-col>
@@ -491,24 +491,15 @@ export default {
           break;
       }
     },
-    //编辑内容判断
-    // isChildren() {
-    //   // console.log(this.formData.distributePlanStatus,"distributePlanStatus")
-    //   //计划所属机构id等于当前机构id并且不存在已完成或者已逾期或者
-    //   //计划所属机构类型不等于行社并且不存在已完成或者已逾期或者
-    //   //新增
-    //   if (
-    //     (this.formData.planCreateOrgId == this.orgId &&
-    //       this.formData.hasEdit != 1) ||
-    //     (this.formData.planOfOrgType != 3 && this.formData.hasEdit != 1) ||
-    //     this.id == null
-    //   ) {
-    //     return false;
-    //   } else return true;
-    // },
+
     canEdit() {
       //停用和使用中的任务,只能编辑名称和履职内容
-      return !(this.formData.planStatus==null || this.formData.plansStatus==0);
+      // let f = this.formData;
+      //
+      let r= !(
+        this.formData.planStatus == null || this.formData.planStatus == "0"
+      )
+      return r;
     },
     //省联社履职内容不能删除
     getshenglianshe(row) {
@@ -836,7 +827,7 @@ export default {
             (state) => {
               if (state == 0 || state == 1) {
                 this.update(this.formData, state == 1);
-              }else{
+              } else {
                 this.loading = false;
               }
             }

+ 10 - 6
src/views/resumption/plan/index.vue

@@ -561,7 +561,6 @@ export default {
     //   return false;
     // },
     sel(selectList, row) {
-      this.loading = true;
       let msg = "";
       if (row.planStatus == 0) {
         msg = "是否立即生成任务?";
@@ -570,12 +569,17 @@ export default {
       }
       this.$refs["DialogThreeState"].show(msg, async (state) => {
         if (state == 0 || state == 1) {
-          await api.distribute(selectList, state == 1).then((response) => {
-            this.getList();
-          });
+          this.loading = true;
+          await api
+            .distribute(selectList, state == 1)
+            .then((response) => {
+              this.getList();
+              this.loading = false;
+            })
+            .catch(() => {
+              this.loading = false;
+            });
         }
-
-        this.loading = false;
       });
     },
     async getRolesByOrg() {