|
@@ -142,7 +142,9 @@
|
|
<el-form label-position="top" class="aForm">
|
|
<el-form label-position="top" class="aForm">
|
|
<el-form-item label="添加子表单">
|
|
<el-form-item label="添加子表单">
|
|
<el-button type="primary" icon="plus" round @click="selectHandle(5, form.actionUrl)">选择子表单</el-button>
|
|
<el-button type="primary" icon="plus" round @click="selectHandle(5, form.actionUrl)">选择子表单</el-button>
|
|
- {{ form.actionUrl }}
|
|
|
|
|
|
+ <div class="tags-list">
|
|
|
|
+ <el-tag v-for="(user, index) in form.actionUrl" :key="user.id" closable @close="delFormTemplate(index)">{{ user.name }}</el-tag>
|
|
|
|
+ </div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="表单权限">
|
|
<el-form-item label="表单权限">
|
|
@@ -252,7 +254,7 @@ export default {
|
|
}
|
|
}
|
|
if ([5].includes(oldType)) {
|
|
if ([5].includes(oldType)) {
|
|
// 上次setType 为 选择成员 or 角色时 对 nodeAssigneeList 重置
|
|
// 上次setType 为 选择成员 or 角色时 对 nodeAssigneeList 重置
|
|
- this.form.actionUrl = null
|
|
|
|
|
|
+ this.form.actionUrl = []
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -276,7 +278,14 @@ export default {
|
|
return { label: item.label, id: item.id, opera: opera }
|
|
return { label: item.label, id: item.id, opera: opera }
|
|
})
|
|
})
|
|
this.form.extendConfig = { formConfig: operateTable }
|
|
this.form.extendConfig = { formConfig: operateTable }
|
|
- this.form.actionUrl = this.form?.actionUrl ? this.form.actionUrl : null // 这里后台只要一个对象,前端为了保持一致用数组包裹
|
|
|
|
|
|
+ // 将后台给的 actionUrl 重新组装
|
|
|
|
+ const newActionUrl = this.form?.actionUrl
|
|
|
|
+ if (newActionUrl) {
|
|
|
|
+ const val = newActionUrl.join(':')
|
|
|
|
+ this.form.actionUrl = [{ id: val[0], name: val[1] }]
|
|
|
|
+ } else {
|
|
|
|
+ this.form.actionUrl = []
|
|
|
|
+ }
|
|
this.drawer = true
|
|
this.drawer = true
|
|
},
|
|
},
|
|
editTitle(refName) {
|
|
editTitle(refName) {
|
|
@@ -323,9 +332,11 @@ export default {
|
|
// 选择角色
|
|
// 选择角色
|
|
if (!_form.nodeAssigneeList || !_form.nodeAssigneeList.length) return this.$message.warning('请选择角色')
|
|
if (!_form.nodeAssigneeList || !_form.nodeAssigneeList.length) return this.$message.warning('请选择角色')
|
|
}
|
|
}
|
|
- // if (_form.actionUrl && _form.actionUrl.length) {
|
|
|
|
- // _form.actionUrl = _form.actionUrl[0]
|
|
|
|
- // }
|
|
|
|
|
|
+ if (_form.actionUrl && _form.actionUrl.length) {
|
|
|
|
+ // _form.actionUrl = _form.actionUrl[0]
|
|
|
|
+ const { id, name } = _form.actionUrl[0]
|
|
|
|
+ _form.actionUrl = `${id}:${name}`
|
|
|
|
+ }
|
|
this.emit(_form)
|
|
this.emit(_form)
|
|
this.drawer = false
|
|
this.drawer = false
|
|
},
|
|
},
|
|
@@ -339,11 +350,10 @@ export default {
|
|
this.form.nodeAssigneeList.splice(index, 1)
|
|
this.form.nodeAssigneeList.splice(index, 1)
|
|
},
|
|
},
|
|
delFormTemplate(index) {
|
|
delFormTemplate(index) {
|
|
- // this.form.actionUrl.splice(index, 1)
|
|
|
|
|
|
+ this.form.actionUrl.splice(index, 1)
|
|
},
|
|
},
|
|
selectHandle(type, data) {
|
|
selectHandle(type, data) {
|
|
// type: 1人员, 3角色 5子表单
|
|
// type: 1人员, 3角色 5子表单
|
|
- console.log(data, '===selectHandle--')
|
|
|
|
this.select(type, data)
|
|
this.select(type, data)
|
|
},
|
|
},
|
|
toText(nodeConfig) {
|
|
toText(nodeConfig) {
|