| | |
| | | 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(); |
| | |
| | | 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 : [] |
| | |
| | | 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) |
| | | } |
| | |
| | | try { |
| | | await getDeptList(val) |
| | | await getInfo(val) |
| | | await getRemarksList(val.companyId) |
| | | // 2. 等待DOM更新完成 |
| | | await nextTick(); |
| | | |