From cb45797bbbb28fb67a48d6aa395242deddb3ddb6 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: 星期五, 24 二月 2023 17:20:54 +0800
Subject: [PATCH] 更新

---
 src/views/experiment/project/components/projectDialog.vue |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/src/views/experiment/project/components/projectDialog.vue b/src/views/experiment/project/components/projectDialog.vue
index b621833..c12ff77 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,24 @@
     })
 };
 
+const getPersonList = async () => {
+    let res = await userApi().getUserList({
+        roleId: 1,
+        usePage: false,
+        pageIndex: 1,
+        pageSize: 10
+    });
+    if(res.data.code === 100){
+        debugger
+        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 +447,7 @@
 
 onMounted(() => {
     getAllPersonList();
+    getPersonList();
 });
 </script>
 

--
Gitblit v1.9.2