Przeglądaj źródła

bug修改,流程编辑调整

zhangjie 3 lat temu
rodzic
commit
accd871bd4

+ 0 - 24
src/modules/base/components/ModifyFlow.vue

@@ -38,21 +38,6 @@
           ></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item prop="modelType" label="指定审批人类型:">
-        <el-select
-          v-model="modalForm.modelType"
-          style="width:100%"
-          placeholder="请选择流程指定审批人类型"
-          :disabled="isEdit"
-        >
-          <el-option
-            v-for="(val, key) in FLOW_MODEL_TYPE"
-            :key="key"
-            :value="key"
-            :label="val"
-          ></el-option>
-        </el-select>
-      </el-form-item>
     </el-form>
     <div slot="footer">
       <el-button type="primary" :disabled="isSubmit" @click="submit"
@@ -118,13 +103,6 @@ export default {
             message: "请选择流程类型",
             trigger: "change"
           }
-        ],
-        modelType: [
-          {
-            required: true,
-            message: "请选择流程指定审批人类型",
-            trigger: "change"
-          }
         ]
       }
     };
@@ -135,8 +113,6 @@ export default {
         this.modalForm = this.$objAssign(initModalForm, val);
       } else {
         this.modalForm = { ...initModalForm };
-        const flowTypes = Object.keys(FLOW_TYPE);
-        if (flowTypes.length === 1) this.modalForm.type = flowTypes[0];
       }
     },
     visibleChange() {

+ 45 - 5
src/modules/base/components/ModifyFlowDetail.vue

@@ -22,6 +22,30 @@
         </div>
       </div>
 
+      <div class="part-box part-box-pad" style="padding-bottom: 5px">
+        <el-form
+          ref="modalFormComp"
+          :model="flowInfo"
+          :rules="rules"
+          label-width="140px"
+        >
+          <el-form-item prop="modelType" label="指定审批人类型:">
+            <el-select
+              v-model="flowInfo.modelType"
+              placeholder="请选择流程指定审批人类型"
+              @change="initFlowNodes"
+            >
+              <el-option
+                v-for="(val, key) in FLOW_MODEL_TYPE"
+                :key="key"
+                :value="key"
+                :label="val"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+      </div>
+
       <div class="flow-box">
         <div class="flow-content">
           <div class="flow-main">
@@ -377,6 +401,7 @@ import { deepCopy } from "../../../plugins/utils";
 import { flowDetail, updateFlowDetail } from "../api";
 import SelectUserDialog from "./SelectUserDialog";
 import SelectRoleDialog from "./SelectRoleDialog";
+import { FLOW_MODEL_TYPE } from "../../../constants/enumerate";
 
 const initFlowInfo = {
   id: null,
@@ -423,6 +448,7 @@ export default {
     return {
       modalIsShow: false,
       isSubmit: false,
+      FLOW_MODEL_TYPE,
       initNodes: [
         {
           id: "1",
@@ -482,6 +508,15 @@ export default {
       APPROVE_USER_SELECT_RANGE: {
         ALL: "全单位",
         ROLE: "指定角色"
+      },
+      rules: {
+        modelType: [
+          {
+            required: true,
+            message: "请选择流程指定审批人类型",
+            trigger: "change"
+          }
+        ]
       }
     };
   },
@@ -500,11 +535,13 @@ export default {
         this.toSelectNode(this.nodes[1]);
       } else {
         this.flowInfo = this.$objAssign(initFlowInfo, val);
-        this.nodes = deepCopy(this.initNodes);
-        // this.toSelectNode(this.nodes[1]);
-        this.toAddNode(this.nodes[0].id);
+        this.initFlowNodes();
       }
     },
+    initFlowNodes() {
+      this.nodes = deepCopy(this.initNodes);
+      this.toAddNode(this.nodes[0].id);
+    },
     visibleChange() {
       this.initData(this.instance);
     },
@@ -637,6 +674,11 @@ export default {
       return true;
     },
     async submit() {
+      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
+      if (!valid) return;
+
+      if (!this.checkData()) return;
+
       if (this.isSubmit) return;
       const result = await this.$confirm(
         `确定要发布流程【${this.instance.name}】吗?`,
@@ -647,8 +689,6 @@ export default {
       ).catch(() => {});
       if (result !== "confirm") return;
 
-      if (!this.checkData()) return;
-
       this.nodes.forEach(node => {
         const dom = document.getElementById(`node-${node.id}`);
         node.w = dom.clientWidth;

+ 6 - 0
src/modules/exam/components/createExamAndPrintTask/CreateExamAndPrintTask.vue

@@ -241,6 +241,12 @@ export default {
       this.nextFlowTaskResult = this.flowList[nextFlowNodeIndex];
     },
     initData() {
+      this.IS_NEED_SELECT_APPROVE_USER = false;
+      this.nextFlowTaskResult = {};
+      this.approveUsers = [];
+      this.userLimitCount = 1;
+      this.userFilterRoles = [];
+
       const infoExamTaskDetail = Object.assign({}, initExamTaskDetail, {
         includePaper: this.examRule.includePaper,
         review: this.examRule.review,

+ 0 - 15
src/modules/exam/components/lins.txt

@@ -1,15 +0,0 @@
-approveIds: null
-approveRoleIds: null
-approveUserCountType: "MORE"
-approveUserNames: null
-approveUserSelectRange: "ROLE"
-approveUserSelectRoles: [{id: "190470915627155456", name: "测试课组长1"}]
-0: {id: "190470915627155456", name: "测试课组长1"}
-id: "190470915627155456"
-name: "测试课组长1"
-approveUserType: "USER"
-flowId: "236874146733096960"
-modelType: "APPROVE_SET"
-setup: 3
-taskKey: "usertask2"
-taskName: "审核人"

+ 1 - 0
src/modules/exam/views/TaskApplyManage.vue

@@ -161,6 +161,7 @@
             <el-button
               v-if="
                 scope.row.auditStatus === 'AUDITING' &&
+                  scope.row.setup === 2 &&
                   checkPrivilege('link', 'end')
               "
               class="btn-danger"