diff --git a/src/components/UserSelection/src/UserPicker.vue b/src/components/UserSelection/src/UserPicker.vue index f8ee6da9..88d0f1f6 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 { @@ -90,16 +91,18 @@ const open = () => { dialogVisible.value = true } - const changeHandle = (v, b) => { - onOpen(b) - } - const onOpen = (v) => { - getList({ queryKey: v }).then((res) => { + const onOpen = () => { + 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 @@