zhouwx
6 天以前 79f2fd7d49d3316278c2a33aa5d0fc14a1fddf7f
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)
    }
  }
}