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