fix: [bpm] vben5+ele下面,修复部门负责人等加载不出数据问题
parent
7ad2d43121
commit
751af9b9af
|
|
@ -399,6 +399,7 @@ onBeforeUnmount(() => {
|
||||||
ref="treeRef"
|
ref="treeRef"
|
||||||
v-model="userTaskForm.candidateParam"
|
v-model="userTaskForm.candidateParam"
|
||||||
:data="deptTreeOptions"
|
:data="deptTreeOptions"
|
||||||
|
node-key="id"
|
||||||
:props="defaultProps"
|
:props="defaultProps"
|
||||||
placeholder="加载中,请稍后"
|
placeholder="加载中,请稍后"
|
||||||
multiple
|
multiple
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,13 @@ const deptLevelLabel = computed(() => {
|
||||||
return label;
|
return label;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 定义 TreeSelect 的默认属性映射
|
||||||
|
const defaultProps = {
|
||||||
|
children: 'children',
|
||||||
|
label: 'name',
|
||||||
|
value: 'id',
|
||||||
|
};
|
||||||
|
|
||||||
// 抽屉配置
|
// 抽屉配置
|
||||||
const [Drawer, drawerApi] = useVbenDrawer({
|
const [Drawer, drawerApi] = useVbenDrawer({
|
||||||
header: true,
|
header: true,
|
||||||
|
|
@ -282,12 +289,8 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
||||||
<ElTreeSelect
|
<ElTreeSelect
|
||||||
v-model="configForm.deptIds"
|
v-model="configForm.deptIds"
|
||||||
:data="deptTreeOptions"
|
:data="deptTreeOptions"
|
||||||
:props="{
|
node-key="id"
|
||||||
label: 'name',
|
:props="defaultProps"
|
||||||
// @ts-expect-error: dynamic node config access is narrower than runtime shape
|
|
||||||
value: 'id',
|
|
||||||
children: 'children',
|
|
||||||
}"
|
|
||||||
empty-text="加载中,请稍候"
|
empty-text="加载中,请稍候"
|
||||||
multiple
|
multiple
|
||||||
:check-strictly="true"
|
:check-strictly="true"
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,13 @@ const emits = defineEmits<{
|
||||||
findReturnTaskNodes: [nodeList: SimpleFlowNode[]];
|
findReturnTaskNodes: [nodeList: SimpleFlowNode[]];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
// 定义 TreeSelect 的默认属性映射
|
||||||
|
const defaultProps = {
|
||||||
|
children: 'children',
|
||||||
|
label: 'name',
|
||||||
|
value: 'id',
|
||||||
|
};
|
||||||
|
|
||||||
const deptLevelLabel = computed(() => {
|
const deptLevelLabel = computed(() => {
|
||||||
let label = '部门负责人来源';
|
let label = '部门负责人来源';
|
||||||
if (
|
if (
|
||||||
|
|
@ -694,12 +701,9 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<ElTreeSelect
|
<ElTreeSelect
|
||||||
v-model="configForm.deptIds"
|
v-model="configForm.deptIds"
|
||||||
:tree-data="deptTreeOptions"
|
:data="deptTreeOptions"
|
||||||
:field-names="{
|
node-key="id"
|
||||||
label: 'name',
|
:props="defaultProps"
|
||||||
value: 'id',
|
|
||||||
children: 'children',
|
|
||||||
}"
|
|
||||||
empty-text="加载中,请稍等..."
|
empty-text="加载中,请稍等..."
|
||||||
multiple
|
multiple
|
||||||
:check-strictly="true"
|
:check-strictly="true"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue