@@ -107,6 +124,7 @@
import { SimpleFlowNode, NodeType, FieldPermissionType, START_USER_BUTTON_SETTING } from '../consts'
import { useWatchNode, useDrawer, useNodeName, useFormFieldsPermission } from '../node'
import * as UserApi from '@/api/system/user'
+import * as DeptApi from '@/api/system/dept'
defineOptions({
name: 'StartUserNodeConfig'
})
@@ -118,8 +136,12 @@ const props = defineProps({
})
// 可发起流程的用户编号
const startUserIds = inject
[>('startUserIds')
+// 可发起流程的部门编号
+const startDeptIds = inject][>('startDeptIds')
// 用户列表
const userOptions = inject][>('userList')
+// 部门列表
+const deptOptions = inject][>('deptList')
// 抽屉配置
const { settingVisible, closeDrawer, openDrawer } = useDrawer()
// 当前节点
@@ -145,6 +167,19 @@ const getUserNicknames = (userIds: number[]): string => {
})
return nicknames.join(',')
}
+const getDeptNames = (deptIds: number[]): string => {
+ if (!deptIds || deptIds.length === 0) {
+ return ''
+ }
+ const deptNames: string[] = []
+ deptIds.forEach((deptId) => {
+ const found = deptOptions?.value.find((item) => item.id === deptId)
+ if (found && found.name) {
+ deptNames.push(found.name)
+ }
+ })
+ return deptNames.join(',')
+}
// 保存配置
const saveConfig = async () => {
activeTabName.value = 'user'
diff --git a/src/views/bpm/model/CategoryDraggableModel.vue b/src/views/bpm/model/CategoryDraggableModel.vue
index 4e4c1827..89a3217e 100644
--- a/src/views/bpm/model/CategoryDraggableModel.vue
+++ b/src/views/bpm/model/CategoryDraggableModel.vue
@@ -97,10 +97,23 @@
- 全部可见
+ 全部可见
{{ row.startUsers[0].nickname }}
+
+ {{ row.startDepts[0].name }}
+
+
+
+ {{ row.startDepts[0].name }}等 {{ row.startDepts.length }} 个部门可见
+
+
+
+ ]
+
+
+ {{ dept.name }}
+
+
+
+ 选择部门
+
+
@@ -127,11 +146,19 @@
+
+