浏览代码

调整代码结构

jiawuxian 1 年之前
父节点
当前提交
daccd55835
共有 2 个文件被更改,包括 77 次插入82 次删除
  1. 4 0
      src/views/resumption/plan/dialog.edit.vue
  2. 73 82
      src/views/resumption/plan/index.vue

+ 4 - 0
src/views/resumption/plan/dialog.edit.vue

@@ -20,6 +20,7 @@
             <el-col :span="6">
               <el-form-item prop="planName" label="任务名称:">
                 <el-input
+                  :disabled="canEdit()"
                   v-model.trim="formData.planName"
                   :maxlength="50"
                   name="planName"
@@ -499,6 +500,9 @@ export default {
       let r = !(
         this.formData.planStatus == null || this.formData.planStatus == "0"
       );
+
+      //行社不能编辑省联社计划的名称;省联社也不能单独编辑子计划的名称
+      r &= (this.formData.planOfOrgId==this.orgId)
       return r;
     },
     //省联社履职内容不能删除

+ 73 - 82
src/views/resumption/plan/index.vue

@@ -112,40 +112,41 @@
                   clearable
                 />
               </el-form-item>
-              <el-row>
-                <el-button
-                  type="primary"
-                  icon="el-icon-search"
-                  size="mini"
-                  @click="getList"
-                  >搜索</el-button
-                >
-                <el-button
-                  type="primary"
-                  icon="el-icon-refresh"
-                  size="mini"
-                  @click="resetQuery"
-                  >重置</el-button
-                >
-                <el-button
-                  type="primary"
-                  icon="el-icon-plus"
-                  size="mini"
-                  @click="handleAdd()"
-                  v-hasPermi="['core:plan:edit']"
-                  >新增任务</el-button
-                >
-                <right-toolbar
-                  :showSearch.sync="showSearch"
-                  @queryTable="getList"
-                ></right-toolbar>
-              </el-row>
+
               <!-- <el-row :gutter="10" >
             <el-col :span="1.5"> </el-col>
 
 
           </el-row> -->
             </el-form>
+            <el-row>
+              <el-button
+                type="primary"
+                icon="el-icon-search"
+                size="mini"
+                @click="getList"
+                >搜索</el-button
+              >
+              <el-button
+                type="primary"
+                icon="el-icon-refresh"
+                size="mini"
+                @click="resetQuery"
+                >重置</el-button
+              >
+              <el-button
+                type="primary"
+                icon="el-icon-plus"
+                size="mini"
+                @click="handleAdd()"
+                v-hasPermi="['core:plan:edit']"
+                >新增任务</el-button
+              >
+              <right-toolbar
+                :showSearch.sync="showSearch"
+                @queryTable="getList"
+              ></right-toolbar>
+            </el-row>
           </div>
           <!--    按纽    -->
 
@@ -296,17 +297,6 @@
                   v-hasPermi="['core:plan:distribute']"
                   >下发</el-button
                 >
-
-                <!-- <el-button
-                  size="mini"
-                  type="text"
-                  icon="el-icon-arrow-down"
-                  v-if="newcheckCanPublish(r.row)"
-                  @click="newshowDialogDistribute(r.row)"
-                  v-hasPermi="['system:user:remove']"
-                  >下发</el-button
-                > -->
-
                 <el-button
                   size="mini"
                   type="text"
@@ -602,44 +592,7 @@ export default {
           this.loading = false;
         });
     },
-    async getRolesByOrg() {
-      await allRole().then((res) => {
-        // console.info(res);
-        this.resumptionRoles = res.data;
-      });
-    },
-    getList() {
-      this.loading = true;
-      this.queryParams.roleList = [];
-      if (
-        this.queryParams.resumptionRole != null &&
-        this.queryParams.resumptionRole != ""
-      ) {
-        this.queryParams.roleList.push(this.queryParams.resumptionRole);
-      }
-
-      console.info(this.dict.type);
-      api
-        .list(this.queryParams)
-        .then((response) => {
-          this.pageData = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        })
-        .catch(() => {
-          this.loading = false;
-        });
-    },
-    getDefaultKey(key) {
-      this.queryParams.orgId = key;
-      this.getList();
-    },
-    handleAdd(id, other = {}) {
-      this.$refs.editDialog.show(id, other);
-    },
-    onEdit(id, other = {}) {
-      this.$refs.editDialog.show(id, other);
-    },
+    
     onHSPlanDistribute(row) {
       let msg = "";
       if (row.planStatus == 0) {
@@ -649,7 +602,7 @@ export default {
       }
 
       if (row.planStatus == 0) {
-        msg = "请选择立即生成或下周期开始生成任务?";
+        msg = "请选择下发后立即生成或下周期生成任务?";
         this.$refs["DialogThreeState"].show(
           msg,
           (state) => {
@@ -660,14 +613,14 @@ export default {
           {
             yesText: "立即生成",
             noText: "下周期",
-            cancelText: "取消下发",
+            cancelText: "取消",
           }
         );
       } else if (row.planStatus == 2) {
         this.$modal
-          .confirm("因存在已完成任务,本次任务下发仅支持下周期生成任务", {
-            confirmButtonText: "下周期",
-            canelButtonText: "取消下发",
+          .confirm("因存在已完成任务,是否确定从下周期生成任务", {
+            confirmButtonText: "确定",
+            canelButtonText: "取消",
           })
           .then(() => {
             this.distributeHS(row.id, false);
@@ -721,6 +674,44 @@ export default {
       //     this.$refs.dialogDistribute.show(row);
       //   });
     },
+    async getRolesByOrg() {
+      await allRole().then((res) => {
+        // console.info(res);
+        this.resumptionRoles = res.data;
+      });
+    },
+    getList() {
+      this.loading = true;
+      this.queryParams.roleList = [];
+      if (
+        this.queryParams.resumptionRole != null &&
+        this.queryParams.resumptionRole != ""
+      ) {
+        this.queryParams.roleList.push(this.queryParams.resumptionRole);
+      }
+
+      console.info(this.dict.type);
+      api
+        .list(this.queryParams)
+        .then((response) => {
+          this.pageData = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    getDefaultKey(key) {
+      this.queryParams.orgId = key;
+      this.getList();
+    },
+    handleAdd(id, other = {}) {
+      this.$refs.editDialog.show(id, other);
+    },
+    onEdit(id, other = {}) {
+      this.$refs.editDialog.show(id, other);
+    },
     async onDel(row) {
       let msg = "";
       if (row.planStatus == 0) {