zhengnaiwen_citu 6 kuukautta sitten
vanhempi
commit
c1d680c67d
1 muutettua tiedostoa jossa 10 lisäystä ja 9 poistoa
  1. 10 9
      src/views/system/workflow/workflowApproved.vue

+ 10 - 9
src/views/system/workflow/workflowApproved.vue

@@ -12,8 +12,8 @@
       >
         <el-form-item label="处理对象" required :prop="`items.${index}.handleType`">
           <el-select v-model="item.handleType" placeholder="请选择处理对象" @change="onChange(item)">
-            <el-option label="指定人" :value="0"></el-option>
-            <el-option label="指定部室岗位" :value="1"></el-option>
+            <el-option label="指定人" value="0"></el-option>
+            <el-option label="指定部室岗位" value="1"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="处理方" required :prop="`items.${index}.handleValue`">
@@ -22,8 +22,8 @@
             :ref="`cascader_${index}`"
             placeholder="请选择处理方"
             :show-all-levels="false"
-            :props="item.handleType === 0 ? personOptions : organizationProp"
-            :options="item.handleType === 0 ? personOrganizationTree : postOrganizationTree"
+            :props="item.handleType === '0' ? personOptions : organizationProp"
+            :options="item.handleType === '0' ? personOrganizationTree : postOrganizationTree"
             @change="onChangeCascader(item, `cascader_${index}`)"
           ></el-cascader>
         </el-form-item>
@@ -67,7 +67,7 @@ export default {
         items: [
           {
             key: 0,
-            handleType: 0,
+            handleType: '0',
             handleValue: null,
             handleValueData: {}
           }
@@ -104,8 +104,8 @@ export default {
         this.formValues.items = item.workFlowTmplateItems.map((e, index) => {
           return {
             handleType: e.handleType,
-            handleValue: e.handleValue,
-            handleValueData: {}, // 回显
+            handleValue: e.handleType === '0' ? e.handleValue.userId : e.handleValue.postName,
+            handleValueData: e.handleValue, // 回显
             key: index
           }
         })
@@ -117,7 +117,7 @@ export default {
       this.key++
       this.formValues.items.push({
         key: this.key,
-        handleType: 0,
+        handleType: '0',
         handleValue: null,
         handleValueData: {}
       })
@@ -167,7 +167,7 @@ export default {
     },
     // 提交参数格式化
     onChangeCascader (item, ref) {
-      if (item.handleType === 0) {
+      if (item.handleType === '0') {
         item.handleValueData = {
           userId: item.handleValue
         }
@@ -196,6 +196,7 @@ export default {
             }
           })
           this.$message.success('保存成功')
+          this.$refs.dialog.close()
         } catch (error) {
           this.$message.error(error)
         }