|
@@ -128,7 +128,7 @@
|
|
|
style="width: 70%"
|
|
|
:show-search="true"
|
|
|
:filter-option="BaseTool.ANTD.selectFilterOption"
|
|
|
- v-model="roleIdList"
|
|
|
+ v-decorator="['roleIdsList', {rules: [{required: false, message: '流程变量不能为空'}]}]"
|
|
|
mode="multiple">
|
|
|
<a-select-option
|
|
|
v-for="item in roleList"
|
|
@@ -174,8 +174,6 @@
|
|
|
import pick from 'lodash.pick'
|
|
|
import { addActivitiUserModel, updateActivitiUserModel } from '@/api/activiti/user-model'
|
|
|
import UserSelectModal from '@/views/upms/user/modules/UserSelectModal'
|
|
|
-import { getDeptTree } from '@/api/upms/dept'
|
|
|
-import { queryRole } from '@/api/upms/role'
|
|
|
export default {
|
|
|
name: 'BaseActivitiUserModel',
|
|
|
components: {
|
|
@@ -187,32 +185,35 @@ export default {
|
|
|
modalTitle: null,
|
|
|
form: this.$form.createForm(this),
|
|
|
visible: false,
|
|
|
- treeData: [],
|
|
|
roleIdList: [],
|
|
|
checkedKeys: [],
|
|
|
autoExpandParent: true,
|
|
|
expandedKeys: [],
|
|
|
selectedKeys: [],
|
|
|
- roleList: [],
|
|
|
+ roleIdsList: [],
|
|
|
// 下拉框map
|
|
|
typeMap: {},
|
|
|
visibleOne: true
|
|
|
}
|
|
|
},
|
|
|
- props: {},
|
|
|
+ props: {
|
|
|
+ roleList: {
|
|
|
+ type: Array,
|
|
|
+ default: () => ({})
|
|
|
+ },
|
|
|
+ treeData: {
|
|
|
+ type: Array,
|
|
|
+ default: () => ({})
|
|
|
+ }
|
|
|
+ },
|
|
|
created () {
|
|
|
// 下拉框map
|
|
|
this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.ACTIVITI_USER_MODEL_TYPE)
|
|
|
- getDeptTree().then(res => {
|
|
|
- this.treeData = res.data
|
|
|
- })
|
|
|
- queryRole({ status: 1 }).then(res => {
|
|
|
- this.roleList = res.data
|
|
|
- })
|
|
|
},
|
|
|
methods: {
|
|
|
base (record) {
|
|
|
this.visible = true
|
|
|
+ this.form.resetFields()
|
|
|
// 如果是空标识添加
|
|
|
if (this.BaseTool.Object.isBlank(record)) {
|
|
|
this.modalTitle = '添加'
|
|
@@ -223,7 +224,11 @@ export default {
|
|
|
if (!this.BaseTool.Object.isBlank(record.sbList)) {
|
|
|
this.sbList = JSON.parse(record.sbList)
|
|
|
}
|
|
|
+ /* if (!this.BaseTool.Object.isBlank(record.roleIdList)) {
|
|
|
+ record.roleIdList = JSON.parse(record.roleIdList)
|
|
|
+ } */
|
|
|
// 日期处理
|
|
|
+ // setFieldsValue(pick(record, ['id', 'reModelId', 'name', 'type', 'assignee', 'roleId', 'deptId', 'realName', 'formVariable', 'remark', 'roleIdsList']))
|
|
|
this.$nextTick(() => {
|
|
|
setFieldsValue(Object.assign(pick(record, [
|
|
|
'id',
|
|
@@ -235,7 +240,8 @@ export default {
|
|
|
'deptId',
|
|
|
'realName',
|
|
|
'formVariable',
|
|
|
- 'remark'
|
|
|
+ 'remark',
|
|
|
+ 'roleIdsList'
|
|
|
])))
|
|
|
})
|
|
|
},
|
|
@@ -248,7 +254,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
// 日期处理
|
|
|
- values.roleIdList = JSON.stringify(this.roleIdList)
|
|
|
+ values.roleIdList = JSON.stringify(values.roleIdsList)
|
|
|
if (this.BaseTool.String.isBlank(values.id)) {
|
|
|
addActivitiUserModel(values)
|
|
|
.then(() => {
|