| | |
| | | <el-form-item label="文件状态:" prop="fileStatus"> |
| | | <el-input v-model.trim="dialogForm.fileStatus" placeholder="文件状态"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="发布号:" prop="grantNum"> |
| | | <el-input v-model.trim="dialogForm.grantNum" placeholder="发布号"></el-input> |
| | | <el-form-item label="发放号:" prop="grantNum"> |
| | | <el-input v-model.trim="dialogForm.grantNum" placeholder="发放号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="编制:" prop="fictionName"> |
| | | <el-select clearable v-model="dialogForm.fictionName" filterable placeholder="编制" style="width: 100%"> |
| | |
| | | const userInfo = ref() |
| | | const formRef = ref() |
| | | onMounted(async () => { |
| | | await getSysClauseList() |
| | | if (userStore.roles.includes('admin')) { |
| | | data.isAdmin = true |
| | | await getCompanyList() |
| | |
| | | data.isAdmin = false |
| | | data.queryParams.companyId = userStore.companyId |
| | | } |
| | | await getSysClauseList() |
| | | await getList() |
| | | }) |
| | | |
| | |
| | | } |
| | | |
| | | const getSysClauseList = async () => { |
| | | const res = await getSysClause() |
| | | const res = await getSysClause({companyId: data.queryParams.companyId}) |
| | | if (res.code == 200) { |
| | | data.caluseList = res.data.map(i => { |
| | | return { |
| | |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | |
| | | const addFile = async () => { |
| | | if (data.queryParams.companyId) { |
| | | data.dialogForm.companyId = data.queryParams.companyId |
| | | const res = await getStandardQuality(data.queryParams) |
| | | if (res.code == 200) { |
| | | const val = res.data.data[0] |
| | | Object.keys(data.dialogForm).forEach(key => { |
| | | if (key in val) { |
| | | data.dialogForm[key] = val[key] |
| | | } |
| | | }) |
| | | if(res.data.data && res.data.data.length>0){ |
| | | const val = res.data.data[0] |
| | | Object.keys(data.dialogForm).forEach(key => { |
| | | if (key in val) { |
| | | data.dialogForm[key] = val[key] |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | await getUserList(data.queryParams.companyId) |
| | | await getSysClauseList() |
| | | data.dialogVisible = true |
| | | } else { |
| | | ElMessage.warning('请先选择对应的企业') |
| | |
| | | const res = await getCompany(queryParams) |
| | | if (res.code == 200) { |
| | | data.companyList = res.data.list ? res.data.list : [] |
| | | // data.queryParams.companyId = data.companyList[0].id |
| | | data.queryParams.companyId = data.companyList[0].id |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | return Promise.reject(new Error('该企业暂无质量数据')) |
| | | } |
| | | data.deptTree.children = res.data.treeSelects || [] |
| | | console.log(data.deptTree,'tree') |
| | | data.companyInfo.summaries = res.data.companySummaries ? res.data.companySummaries[0]?.companySummary : [] |
| | | data.companyInfo.policies = res.data.companyQualityPolicies ? res.data.companyQualityPolicies[0]?.policy : [] |
| | | const duties = transToTableData(res.data.sysFunctionalDistributions, data.originDeptList) |
| | |
| | | }) || [] |
| | | data.companyInfo.productServiceImages = res.data.productServiceDatas ? await processImagesToBase64(res.data.productServiceDatas) : [] |
| | | data.companyInfo.proclaim1 = res.data.proclaim.find(i=>i.type == 1)?.content || '' |
| | | // data.companyInfo.sign1 = await urlToBase64(res.data.proclaim.find(i=>i.type == 1)?.sign) || '' |
| | | data.companyInfo.sign1 = await urlToBase64(res.data.proclaim.find(i=>i.type == 1)?.sign) || '' |
| | | data.companyInfo.updateTime1 = res.data.proclaim.find(i=>i.type == 1 && i.status == 1)?.updateTime?.substring(0,10) || '' |
| | | data.companyInfo.proclaim2 = res.data.proclaim.find(i=>i.type == 2)?.content || '' |
| | | // data.companyInfo.sign2 = await urlToBase64(res.data.proclaim.find(i=>i.type == 2)?.sign) || '' |
| | | data.companyInfo.sign2 = await urlToBase64(res.data.proclaim.find(i=>i.type == 2)?.sign) || '' |
| | | data.companyInfo.updateTime2 = res.data.proclaim.find(i=>i.type == 2 && i.status == 1)?.updateTime?.substring(0,10) || '' |
| | | data.companyInfo.proclaim3 = res.data.proclaim.find(i=>i.type == 3)?.content || '' |
| | | // data.companyInfo.sign3 = await urlToBase64(res.data.proclaim.find(i=>i.type == 3)?.sign) || '' |
| | | data.companyInfo.sign3 = await urlToBase64(res.data.proclaim.find(i=>i.type == 3)?.sign) || '' |
| | | data.companyInfo.updateTime3 = res.data.proclaim.find(i=>i.type == 3 && i.status == 1)?.updateTime?.substring(0,10) || '' |
| | | data.companyInfo.proclaim4 = res.data.proclaim.find(i=>i.type == 4)?.content || '' |
| | | // data.companyInfo.sign4 = await urlToBase64(res.data.proclaim.find(i=>i.type == 4)?.sign) || '' |
| | | data.companyInfo.sign4 = await urlToBase64(res.data.proclaim.find(i=>i.type == 4)?.sign) || '' |
| | | data.companyInfo.updateTime4 = res.data.proclaim.find(i=>i.type == 4 && i.status == 1)?.updateTime?.substring(0,10) || '' |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | |
| | | ])]; |
| | | |
| | | // 步骤2:为每个条款生成完整的部门数据(缺失数据默认 chooseLab: 0) |
| | | const mergeValues = ['7.1', '8.2', '8.3', '8.4', '8.5', '9.1'] |
| | | const mergeValues = [] |
| | | const processedClauses = allClauseNums.map(clauseNum => { |
| | | const clauseContent = data.caluseList.find(c => c.clauseNum === clauseNum)?.content || ""; |
| | | // 为当前条款生成所有部门的数据(确保每个部门都有值) |