From fff5157893494a36aa8cd5817babda3c421c6338 Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: Tue, 01 Jul 2025 09:11:57 +0800
Subject: [PATCH] 修改
---
src/views/build/conpanyFunctionConsult/companyInfo/policy/index.vue | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/views/build/conpanyFunctionConsult/companyInfo/policy/index.vue b/src/views/build/conpanyFunctionConsult/companyInfo/policy/index.vue
index f515e69..a15dcf3 100644
--- a/src/views/build/conpanyFunctionConsult/companyInfo/policy/index.vue
+++ b/src/views/build/conpanyFunctionConsult/companyInfo/policy/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
@@ -103,6 +103,9 @@
data.queryParams.companyId = userInfo.companyId
}
getList();
+ if(data.isAdmin){
+ getCompanyList()
+ }
});
const getList = async () => {
loading.value = true;
@@ -133,10 +136,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) {
@@ -168,6 +185,7 @@
data.companyName = ''
data.companyList = [];
getList();
+ getCompanyList()
}
const handleDelete = (val) => {
ElMessageBox.confirm(
--
Gitblit v1.9.2