diff --git a/src/api/user-boot/dept.ts b/src/api/user-boot/dept.ts index 50639cf1..3839c30f 100644 --- a/src/api/user-boot/dept.ts +++ b/src/api/user-boot/dept.ts @@ -1,4 +1,5 @@ import request from '@/utils/request' +import createAxios from '@/utils/request' export function getAreaTree(data: any) { return request({ @@ -58,4 +59,24 @@ export function deptTreeSelector() { }) } +/** + * 部门分页 + */ +export function deptList(data:any) { + return request({ + url: '/user-boot/dept/list', + method: 'POST', + data + }) +} + + +// 根据id获取所有部门信息 +export function getDeptListByIds(data:any) { + return request({ + url: '/user-boot/dept/getDeptListByIds', + method: 'POST', + data + }) +} diff --git a/src/api/user-boot/role.ts b/src/api/user-boot/role.ts index ae1a09f8..e6293632 100644 --- a/src/api/user-boot/role.ts +++ b/src/api/user-boot/role.ts @@ -30,4 +30,25 @@ export function roleList(id: number) { url: '/user-boot/role/selectRoleDetail?id=' + id, method: 'post' }) -} \ No newline at end of file +} + +/** + * 全部角色 + */ +export function allRoleList(data:any) { + return createAxios({ + url: '/user-boot/role/allRoleList', + method: 'GET' + }) +} + +// 根据id获取所有角色信息 +export function getRoleListByIds(data:any) { + return createAxios({ + url: '/user-boot/role/getRoleListByIds', + method: 'POST', + data + }) +} + + diff --git a/src/api/user-boot/user.ts b/src/api/user-boot/user.ts index e8b2b644..6231fb8f 100644 --- a/src/api/user-boot/user.ts +++ b/src/api/user-boot/user.ts @@ -162,3 +162,14 @@ export function listAllUserByDeptId(data:any) { }) } +// 根据id获取所有用户信息 +export function getUserListByIds(data:any) { + return request({ + url: '/user-boot/user/getUserListByIds', + method: 'POST', + data + }) +} + + + diff --git a/src/views/system/workflow/model/modelDesign.vue b/src/views/system/workflow/model/modelDesign.vue index e1f3a73f..d82b8f5c 100644 --- a/src/views/system/workflow/model/modelDesign.vue +++ b/src/views/system/workflow/model/modelDesign.vue @@ -25,8 +25,10 @@ executionListenerSelectorForCustomEvent, taskListenerSelector } from '@/api/workflow-boot/model' - import { deptTreeSelector } from '@/api/user-boot/dept' + import { deptList, deptTreeSelector, getDeptListByIds } from '@/api/user-boot/dept' import { flwTemplatePrintSelector, flwTemplateSnSelector } from '@/api/workflow-boot/template' + import { allRoleList, getRoleListByIds } from '@/api/user-boot/role' + import { getUserListByIds, listAllUserByDeptId } from '@/api/user-boot/user' // 模型设计器的值 const modelDesignData = ref({}) @@ -113,46 +115,46 @@ return Promise.resolve(orgTree) }) }, - // orgPageApi: (param) => { - // return modelApi.modelOrgListSelector(param).then((data) => { - // return Promise.resolve(data) - // }) - // }, - // rolePageApi: (param) => { - // return modelApi.modelRoleSelector(param).then((data) => { - // return Promise.resolve(data) - // }) - // }, + orgPageApi: (param) => { + return deptList(param).then((data) => { + return Promise.resolve(data) + }) + }, + rolePageApi: (param) => { + return allRoleList(param).then((data) => { + return Promise.resolve(data) + }) + }, // posPageApi: (param) => { // return modelApi.modelPositionSelector(param).then((data) => { // return Promise.resolve(data) // }) // }, - // userPageApi: (param) => { - // return modelApi.modelUserSelector(param).then((data) => { - // return Promise.resolve(data) - // }) - // }, - // checkedUserListApi: (param) => { - // return userCenterApi.userCenterGetUserListByIdList(param).then((data) => { - // return Promise.resolve(data) - // }) - // }, + userPageApi: (param) => { + return listAllUserByDeptId('').then((data) => { + return Promise.resolve(data) + }) + }, + checkedUserListApi: (param) => { + return getUserListByIds(param).then((data) => { + return Promise.resolve(data) + }) + }, // checkedPosListApi: (param) => { // return userCenterApi.userCenterGetPositionListByIdList(param).then((data) => { // return Promise.resolve(data) // }) // }, - // checkedOrgListApi: (param) => { - // return userCenterApi.userCenterGetOrgListByIdList(param).then((data) => { - // return Promise.resolve(data) - // }) - // }, - // checkedRoleListApi: (param) => { - // return userCenterApi.userCenterGetRoleListByIdList(param).then((data) => { - // return Promise.resolve(data) - // }) - // } + checkedOrgListApi: (param) => { + return getDeptListByIds(param).then((data) => { + return Promise.resolve(data) + }) + }, + checkedRoleListApi: (param) => { + return getRoleListByIds(param).then((data) => { + return Promise.resolve(data) + }) + } } // 抛出钩子 defineExpose({