From 79f2fd7d49d3316278c2a33aa5d0fc14a1fddf7f Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期一, 30 六月 2025 09:41:59 +0800
Subject: [PATCH] 修改

---
 src/views/build/conpanyFunctionConsult/companyInfo/basicInfo/index.vue |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/src/views/build/conpanyFunctionConsult/companyInfo/basicInfo/index.vue b/src/views/build/conpanyFunctionConsult/companyInfo/basicInfo/index.vue
index e7b9096..a917036 100644
--- a/src/views/build/conpanyFunctionConsult/companyInfo/basicInfo/index.vue
+++ b/src/views/build/conpanyFunctionConsult/companyInfo/basicInfo/index.vue
@@ -2,7 +2,7 @@
   <div class="app-container">
     <div style="margin-bottom: 10px">
       <el-form style="display: flex;flex-wrap: wrap;">
-          <el-form-item v-if="!data.isAdmin">
+          <el-form-item>
             <el-button
                 type="primary"
                 plain
@@ -107,8 +107,17 @@
   const userInfo = JSON.parse(Cookies.get('userInfo'))
   console.log("userInfo",userInfo)
   data.isAdmin = userInfo.userType === 0;
-  data.queryParams.companyId = userInfo.companyId ? userInfo.companyId : null
+  if(data.isAdmin){
+    data.queryParams.companyId = null
+  }else {
+    data.queryParams.companyId = userInfo.companyId
+  }
   getList();
+  if(data.isAdmin){
+    getCompanyList()
+  }
+
+
 });
 const getList = async () => {
   loading.value = true;
@@ -138,10 +147,24 @@
 }
 
 const getCompanyList = async (val)=>{
-  if(val != ""){
+  if(val){
     loadingCompany.value = true;
     const queryParams = {
       name: val
+    }
+    const res = await getCompany(queryParams)
+    if (res.code == 200) {
+      loadingCompany.value = false;
+      data.companyList = res.data.list
+
+    } else {
+      ElMessage.warning(res.message)
+    }
+  }else {
+    loadingCompany.value = true;
+    const queryParams = {
+      pageSize: 10,
+      pageNum: 1,
     }
     const res = await getCompany(queryParams)
     if (res.code == 200) {
@@ -173,6 +196,7 @@
   choosedData.value = []
   data.companyList = [];
   getList();
+  getCompanyList()
 }
 const exportData = () => {
   if(choosedData.value && choosedData.value.length === 0){

--
Gitblit v1.9.2