From 5b6c4c659710814ea5f59dcab8ac64ddd8acfe6f Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期四, 03 七月 2025 14:08:44 +0800
Subject: [PATCH] 模板导入
---
src/views/build/conpanyFunctionConsult/companyInfo/policy/components/policyDialog.vue | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/views/build/conpanyFunctionConsult/companyInfo/policy/components/policyDialog.vue b/src/views/build/conpanyFunctionConsult/companyInfo/policy/components/policyDialog.vue
index bdc9b61..95a53d2 100644
--- a/src/views/build/conpanyFunctionConsult/companyInfo/policy/components/policyDialog.vue
+++ b/src/views/build/conpanyFunctionConsult/companyInfo/policy/components/policyDialog.vue
@@ -12,7 +12,7 @@
v-model="state.noticeForm.companyName"
filterable
remote
- :disabled="title == '查看' || !state.isAdmin"
+ :disabled="title == '查看' || title == '编辑' ||!state.isAdmin"
@change="selectValue"
reserve-keyword
placeholder="请输入企业名称"
@@ -95,6 +95,9 @@
const openDialog = async (type, value) => {
const userInfo = JSON.parse(Cookies.get('userInfo'))
state.isAdmin = userInfo.userType === 0;
+ if(state.isAdmin){
+ await getCompanyList()
+ }
isReview.value = false;
showEditor.value = false
title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ;
@@ -158,6 +161,7 @@
}
const onSubmit = async () => {
+
state.noticeForm.policy = tinyMCE.activeEditor.getContent();
if(!state.isAdmin){
const userInfo = JSON.parse(Cookies.get('userInfo'))
@@ -228,7 +232,6 @@
companyId:null,
companyName: ''
}
- state.companyList = []
}
const selectValue = (val) => {
state.companyList.forEach(item => {
@@ -238,7 +241,7 @@
})
}
const getCompanyList = async (val)=>{
- if(val != ""){
+ if(val){
const queryParams = {
name: val
}
@@ -249,6 +252,17 @@
} else {
ElMessage.warning(res.message)
}
+ }else {
+ const queryParams = {
+ pageSize: 10,
+ pageNum: 1,
+ }
+ const res = await getCompany(queryParams)
+ if (res.code == 200) {
+ state.companyList = res.data.list
+ } else {
+ ElMessage.warning(res.message)
+ }
}
}
--
Gitblit v1.9.2