diff --git a/src/components/UserSelection/src/UserPicker.vue b/src/components/UserSelection/src/UserPicker.vue index 5499825d..3265771d 100644 --- a/src/components/UserSelection/src/UserPicker.vue +++ b/src/components/UserSelection/src/UserPicker.vue @@ -3,10 +3,11 @@ import { TreeNodeData } from 'element-plus/es/components/tree/src/tree.type' import { type ElTree } from 'element-plus' import { reactive, ref, watch } from 'vue' - import { getList } from '/@/views/baseinfo/clientflowtemplate/api' + import { getUsetList } from '/@/views/baseinfo/clientflowtemplate/api' import { School, Check } from '@element-plus/icons-vue' import Node from 'element-plus/es/components/tree/src/model/node' - + import { useAppStore } from '/@/store/modules/app' + const appStore = useAppStore() export type ModelValueType = string | string[] | null | undefined export interface UserDropdownProps { @@ -91,12 +92,17 @@ dialogVisible.value = true } const onOpen = () => { - getList().then((res) => { + getUsetList().then((res) => { if (res.succeeded) { + res.data.forEach((item) => { + item.value = item.id + item.label = item.userName + }) + appStore.setUserList(res.data) userOrgOptions.value = res.data.map((e) => { return { - id: e.value, - name: e.label, + id: e.id, + name: e.userName, type: 'user', leaf: true, avatar: e.avatar, diff --git a/src/components/UserSelection/src/UserTag.vue b/src/components/UserSelection/src/UserTag.vue index 0c75ffbc..24055d58 100644 --- a/src/components/UserSelection/src/UserTag.vue +++ b/src/components/UserSelection/src/UserTag.vue @@ -1,8 +1,9 @@