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/policy/components/policyDialog.vue | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/views/build/conpanyFunctionConsult/companyInfo/policy/components/policyDialog.vue b/src/views/build/conpanyFunctionConsult/companyInfo/policy/components/policyDialog.vue index 46f1420..95a53d2 100644 --- a/src/views/build/conpanyFunctionConsult/companyInfo/policy/components/policyDialog.vue +++ b/src/views/build/conpanyFunctionConsult/companyInfo/policy/components/policyDialog.vue @@ -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