仿钉钉流程设计器-修复一些问题

This commit is contained in:
jason
2024-04-28 21:53:34 +08:00
parent ee895d0752
commit 0d8d043250
6 changed files with 54 additions and 34 deletions

View File

@ -5,6 +5,7 @@
import { SimpleProcessDesigner } from '@/components/SimpleProcessDesignerV2/src/';
import { getModel } from '@/api/bpm/model'
import { getForm, FormVO } from '@/api/bpm/form'
import { handleTree } from '@/utils/tree'
import * as RoleApi from '@/api/system/role'
import * as DeptApi from '@/api/system/dept'
import * as PostApi from '@/api/system/post'
@ -21,6 +22,7 @@ const roleOptions = ref<RoleApi.RoleVO[]>([]) // 角色列表
const postOptions = ref<PostApi.PostVO[]>([]) // 岗位列表
const userOptions = ref<UserApi.UserVO[]>([]) // 用户列表
const deptOptions = ref<DeptApi.DeptVO[]>([]) // 部门列表
const deptTreeOptions = ref()
const userGroupOptions = ref<UserGroupApi.UserGroupVO[]>([]) // 用户组列表
provide('formFields', formFields)
provide('formType', formType)
@ -29,6 +31,7 @@ provide('postList', postOptions)
provide('userList', userOptions)
provide('deptList', deptOptions)
provide('userGroupList', userGroupOptions)
provide('deptTree', deptTreeOptions)
onMounted( async () => {
const bpmnModel = await getModel(modelId);
if (bpmnModel) {
@ -45,7 +48,9 @@ onMounted( async () => {
userOptions.value = await UserApi.getSimpleUserList()
// 获得部门列表
deptOptions.value = await DeptApi.getSimpleDeptList()
console.log('index deptOptions value is' , deptOptions.value)
deptTreeOptions.value = handleTree(deptOptions.value as DeptApi.DeptVO[], 'id');
// 用户组列表
userGroupOptions.value = await UserGroupApi.getUserGroupSimpleList()
})