Browse Source

履职计划缺陷修复

jiawuxian 1 năm trước cách đây
mục cha
commit
6120ad602e

+ 6 - 0
src/assets/styles/ruoyi.scss

@@ -404,3 +404,9 @@
  .el-descriptions-item__label.is-bordered-label{
    color:#333!important;
  }
+
+ .requiredlabel::before{
+	content: "*";
+	color:red;
+	margin-right: 4px;
+  }

+ 1 - 1
src/views/check/dialog.edit.vue

@@ -259,7 +259,7 @@
             />
           </el-form-item>
         </el-form>
-        <el-button @click="openSelect">选择检查内容</el-button>
+        <el-button @click="openSelect"><span class="requiredlabel">选择检查内容</span> </el-button>
         <el-button @click="deleteSelected">批量删除</el-button>
         <el-table
           :data="tableData"

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

@@ -205,7 +205,9 @@
             />
           </el-form-item>
         </el-form>
-        <el-button @click="openSelect">选择履职内容</el-button>
+        <el-button @click="openSelect"
+          ><span class="requiredlabel">选择履职内容</span></el-button
+        >
         <el-button @click="deleteSelected">批量删除</el-button>
         <el-table
           :data="tableData"
@@ -217,7 +219,6 @@
             type="selection"
             :selectable="handleSelectable"
           ></el-table-column>
-
           <el-table-column prop="ruleName" label="履职手册"> </el-table-column>
           <el-table-column prop="itemName" label="履职项"> </el-table-column>
           <el-table-column prop="pointName" label="履职内容" width="300px">
@@ -496,9 +497,9 @@ export default {
       //停用和使用中的任务,只能编辑名称和履职内容
       // let f = this.formData;
       //
-      let r= !(
+      let r = !(
         this.formData.planStatus == null || this.formData.planStatus == "0"
-      )
+      );
       return r;
     },
     //省联社履职内容不能删除
@@ -797,7 +798,7 @@ export default {
       this.$refs.DialogSelect.show(this.getIteamF());
     },
     onSubmit() {
-      this.$refs.form.validate(async (isValidate) => {
+      this.$refs.form.validate(async (isValidate) => {        
         if (!isValidate) return;
         this.loading = true;
         // this.formData.planStatus = 0;
@@ -819,21 +820,18 @@ export default {
         }
         this.formData.roleList =
           this.selectedValues.length == 0 ? null : this.selectedValues;
-
         //停用、使用中编辑
-        if (this.formData.planStatus > 0) {
-          this.$refs["DialogThreeState"].show(
-            "本周期未完成任务是否使用新的任务内容?",
-            (state) => {
-              if (state == 0 || state == 1) {
-                this.update(this.formData, state == 1);
-              } else {
-                this.loading = false;
-              }
-            }
-          );
-        } else {
+debugger
+        if (this.formData.planStatus =="1" ) {
+          if (this.formData.taskHasCompleted == 1) {
+            this.update(this.formData, false);
+          } else {
+            this.update(this.formData, true);
+          }
+        } else if (this.formData.planStatus == "2") {
           this.update(this.formData, false);
+        } else {
+          this.update(this.formData,false);
         }
       });
     },

+ 24 - 15
src/views/resumption/plan/index.vue

@@ -564,23 +564,32 @@ export default {
       let msg = "";
       if (row.planStatus == 0) {
         msg = "是否立即生成任务?";
+        this.$refs["DialogThreeState"].show(msg, (state) => {
+          if (state == 0 || state == 1) {
+            this.loading = true;
+            api
+              .distribute(selectList, state == 1)
+              .then((response) => {
+                this.getList();
+                this.loading = false;
+              })
+              .catch(() => {
+                this.loading = false;
+              });
+          }
+        });
       } else {
-        msg = "任务内容是否从当前周期生效";
+        this.loading = true;
+        api
+          .distribute(selectList, false)
+          .then((response) => {
+            this.getList();
+            this.loading = false;
+          })
+          .catch(() => {
+            this.loading = false;
+          });
       }
-      this.$refs["DialogThreeState"].show(msg, async (state) => {
-        if (state == 0 || state == 1) {
-          this.loading = true;
-          await api
-            .distribute(selectList, state == 1)
-            .then((response) => {
-              this.getList();
-              this.loading = false;
-            })
-            .catch(() => {
-              this.loading = false;
-            });
-        }
-      });
     },
     async getRolesByOrg() {
       await allRole().then((res) => {