|
@@ -141,9 +141,9 @@
|
|
|
<div v-show="radio1 === '2'">
|
|
|
<el-form label-position="top" class="aForm">
|
|
|
<el-form-item label="添加子表单">
|
|
|
- <el-button type="primary" icon="plus" round @click="selectHandle(5, form.nodeAssigneeList)">选择子表单</el-button>
|
|
|
+ <el-button type="primary" icon="plus" round @click="selectHandle(5, form.actionUrl)">选择子表单</el-button>
|
|
|
<div class="tags-list">
|
|
|
- <el-tag v-for="(user, index) in form.nodeAssigneeList" :key="user.id" closable @close="delUser(index)">{{ user.name }}</el-tag>
|
|
|
+ <el-tag v-for="(user, index) in form.actionUrl" :key="user.id" closable @close="delFormTemplate(index)">{{ user.name }}</el-tag>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
|
|
@@ -252,6 +252,10 @@ export default {
|
|
|
// 上次setType 为 选择成员 or 角色时 对 nodeAssigneeList 重置
|
|
|
this.form.nodeAssigneeList = []
|
|
|
}
|
|
|
+ if ([5].includes(oldType)) {
|
|
|
+ // 上次setType 为 选择成员 or 角色时 对 nodeAssigneeList 重置
|
|
|
+ this.form.actionUrl = []
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -273,8 +277,8 @@ export default {
|
|
|
})
|
|
|
return { label: item.label, id: item.id, opera: opera }
|
|
|
})
|
|
|
- this.$log('这里打印出表单设计中的值===', JSON.stringify(operateTable))
|
|
|
this.form.extendConfig = { formConfig: operateTable }
|
|
|
+ this.form.actionUrl = this.form?.actionUrl ? [this.form.actionUrl] : [] // 这里后台只要一个对象,前端为了保持一致用数组包裹
|
|
|
this.drawer = true
|
|
|
},
|
|
|
editTitle(refName) {
|
|
@@ -322,6 +326,9 @@ export default {
|
|
|
if (!_form.nodeAssigneeList || !_form.nodeAssigneeList.length) return this.$message.warning('请选择角色')
|
|
|
}
|
|
|
|
|
|
+ if ( _form.actionUrl && _form.actionUrl.length ) {
|
|
|
+ _form.actionUrl = _form.actionUrl[0]
|
|
|
+ }
|
|
|
this.emit(_form)
|
|
|
this.drawer = false
|
|
|
},
|
|
@@ -334,8 +341,12 @@ export default {
|
|
|
delRole(index) {
|
|
|
this.form.nodeAssigneeList.splice(index, 1)
|
|
|
},
|
|
|
+ delFormTemplate(index) {
|
|
|
+ this.form.actionUrl.splice(index, 1)
|
|
|
+ },
|
|
|
selectHandle(type, data) {
|
|
|
- // type: 1人员, 3角色
|
|
|
+ // type: 1人员, 3角色 5子表单
|
|
|
+ console.log(data, '===selectHandle--')
|
|
|
this.select(type, data)
|
|
|
},
|
|
|
toText(nodeConfig) {
|