zhouwx
8 天以前 d5bd0e88c1eec6bb2947d2bfa57348d89edbc1c3
src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/qualityManual/index.vue
@@ -80,7 +80,7 @@
  getStandardDetail,
  getStandardQuality
} from "@/api/standardSys/standardSys";
import {getDepart, getDistribution, getSysClause} from "@/api/orgStructure/depart";
import {getDepart, getDistribution, getFunctionalRemarkList, getSysClause} from "@/api/orgStructure/depart";
const userStore = useUserStore()
const { proxy } = getCurrentInstance();
@@ -229,7 +229,8 @@
  if(res.code === 200){
    if(!res.data || (res.data.companyIndustryTemplates.length == 0 && res.data.companyQualityPolicies.length == 0 && res.data.companySummaries.length == 0 && res.data.sysFunctionalDistributions
        .length == 0 && res.data.treeSelects.length == 0)){
      return Promise.reject(new Error('该企业暂无质量数据'));
      loading.value = false
      return Promise.reject(new Error('该企业暂无质量数据'))
    }
    data.companyInfo.summaries = res.data.companySummaries ? res.data.companySummaries[0]?.companySummary : []
    data.companyInfo.policies = res.data.companyQualityPolicies ? res.data.companyQualityPolicies[0]?.policy : []
@@ -243,6 +244,24 @@
        templateName: item.templateName
      }
    }) || []
  }else{
    ElMessage.warning(res.message)
  }
}
const getRemarksList = async (companyId)=> {
  const res = await getFunctionalRemarkList({companyId: companyId})
  if(res.code == 200){
    const originRemark = res.data
    for(let item of originRemark){
      const foundObj = data.caluseList.find(i=>i.clauseNum == item.clauseNum)
      if(foundObj){
        foundObj.remark = item.remark
      }
    }
    data.companyInfo.remarks = originRemark.map(i=>{
      return `${i.clauseNum}:${i.remark}`
    }).join(';')
  }else{
    ElMessage.warning(res.message)
  }
@@ -294,6 +313,7 @@
    try {
      await getDeptList(val)
      await getInfo(val)
      await getRemarksList(val.companyId)
      // 2. 等待DOM更新完成
      await nextTick();