From 43fca2cb16964496caafdbc34e969d2a7cde7cc0 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期四, 30 三月 2023 15:32:56 +0800 Subject: [PATCH] 用户接口 --- src/views/experiment/project/components/projectDialog.vue | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/views/experiment/project/components/projectDialog.vue b/src/views/experiment/project/components/projectDialog.vue index b621833..102bdeb 100644 --- a/src/views/experiment/project/components/projectDialog.vue +++ b/src/views/experiment/project/components/projectDialog.vue @@ -37,10 +37,10 @@ <td class="w-16 m-color"> <el-select :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.liabilityUserId" clearable filterable> <el-option - v-for="item in projectDialogState.allPersonList" + v-for="item in projectDialogState.systemPersonList" :key="item.id" :value="item.id" - :label="item.personName" + :label="item.realName" ></el-option> </el-select> </td> @@ -237,6 +237,7 @@ import {ElMessage} from "element-plus"; import {projectApi} from "/@/api/experiment/project"; import {personApi} from "/@/api/basic/person"; +import {userApi} from "/@/api/systemManage/user"; const SelectEquipment = defineAsyncComponent(() => import('./selectEquipment.vue')) const SelectMaterial = defineAsyncComponent(() => import('./selectMaterial.vue')) @@ -297,6 +298,7 @@ }, allPersonList: [], allRoomList: [], + systemPersonList: [], }) const showProjectDialog = (title: string, value: ProjectType, allRoomList: RoomType []) => { @@ -407,6 +409,23 @@ }) }; +const getPersonList = async () => { + let res = await userApi().getUserList({ + roleId: 1, + usePage: false, + pageIndex: 1, + pageSize: 10 + }); + if(res.data.code === 100){ + projectDialogState.systemPersonList = JSON.parse(JSON.stringify(res.data.data)); + }else{ + ElMessage({ + type: 'warning', + message: res.data.msg + }) + } +}; + const getAllPersonList = async () => { let res = await personApi().getAllPerson(); if(res.data.code === 100){ @@ -427,6 +446,7 @@ onMounted(() => { getAllPersonList(); + getPersonList(); }); </script> -- Gitblit v1.9.2