fix: [bpm] vben5+ele下面,修复部门负责人等加载不出数据问题

pull/347/head
jason 2026-05-28 17:25:28 +08:00
parent 7ad2d43121
commit 751af9b9af
3 changed files with 20 additions and 12 deletions

View File

@ -399,6 +399,7 @@ onBeforeUnmount(() => {
ref="treeRef"
v-model="userTaskForm.candidateParam"
:data="deptTreeOptions"
node-key="id"
:props="defaultProps"
placeholder="加载中,请稍后"
multiple

View File

@ -59,6 +59,13 @@ const deptLevelLabel = computed(() => {
return label;
});
// TreeSelect
const defaultProps = {
children: 'children',
label: 'name',
value: 'id',
};
//
const [Drawer, drawerApi] = useVbenDrawer({
header: true,
@ -282,12 +289,8 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
<ElTreeSelect
v-model="configForm.deptIds"
:data="deptTreeOptions"
:props="{
label: 'name',
// @ts-expect-error: dynamic node config access is narrower than runtime shape
value: 'id',
children: 'children',
}"
node-key="id"
:props="defaultProps"
empty-text="加载中,请稍候"
multiple
:check-strictly="true"

View File

@ -79,6 +79,13 @@ const emits = defineEmits<{
findReturnTaskNodes: [nodeList: SimpleFlowNode[]];
}>();
// TreeSelect
const defaultProps = {
children: 'children',
label: 'name',
value: 'id',
};
const deptLevelLabel = computed(() => {
let label = '部门负责人来源';
if (
@ -694,12 +701,9 @@ onMounted(() => {
>
<ElTreeSelect
v-model="configForm.deptIds"
:tree-data="deptTreeOptions"
:field-names="{
label: 'name',
value: 'id',
children: 'children',
}"
:data="deptTreeOptions"
node-key="id"
:props="defaultProps"
empty-text="加载中,请稍等..."
multiple
:check-strictly="true"