| | |
| | | params: params |
| | | }) |
| | | } |
| | | export function getInsideById(params) { |
| | | return request({ |
| | | url: '/continuous/inside/listByid', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | |
| | | export function addInside(data) { |
| | |
| | | params: params |
| | | }) |
| | | } |
| | | export function getCustomerAll(params) { |
| | | return request({ |
| | | url: 'market/inventory/listAll', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | |
| | | export function addCustomer(data) { |
| | | return request({ |
| | |
| | | }) |
| | | } |
| | | |
| | | export function delControl(data) { |
| | | export function delControl(data,dataD) { |
| | | return request({ |
| | | url: `/composite/factor/control/deleted?factorControlId=${data}`, |
| | | url: `/composite/factor/control/deleted?factorControlId=${data}&factorDiscrenId=${dataD}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | |
| | | params: params |
| | | }) |
| | | } |
| | | export function getMonthlyRecordById(params) { |
| | | return request({ |
| | | url: 'market/monthly/listByid', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | export function addMonthlyRecord(data) { |
| | | return request({ |
| | |
| | | }) |
| | | } |
| | | |
| | | export function getQualityTemplateById(params) { |
| | | return request({ |
| | | url: '/template/listByid', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | export function addQualityTemplate(data) { |
| | | return request({ |
| | | url: '/template/insert', |
| | |
| | | </el-form> |
| | | </div> |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table v-loading="loading" :data="dataList" :border="true" > |
| | | <el-table-column type="index" label="序号" width="80" align="center"></el-table-column> |
| | | <el-table-column label="公司概况" prop="companySummary" align="center" > |
| | | <el-table-column label="公司概况" prop="companySummary" align="center" width="600" > |
| | | <template #default="scope"> |
| | | <div v-html="scope.row.companySummary" ></div> |
| | | <div style="height: 250px;" v-html="scope.row.companySummary" ></div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="营业执照" prop="fileName" align="center" > |
| | |
| | | import {getDept, getObject, getObjectPage} from "@/api/qualityObjectives/object"; |
| | | import {addTable, editTable, getTargetById} from "@/api/qualityObjectives/table"; |
| | | import {addNeedDiscren, editNeedDiscren} from "@/api/need/need"; |
| | | import {addQualityTemplate, editQualityTemplate} from "@/api/standardSys/standardSys"; |
| | | import {addQualityTemplate, editQualityTemplate, getQualityTemplateById} from "@/api/standardSys/standardSys"; |
| | | |
| | | const dialogVisible = ref(false); |
| | | const title = ref(""); |
| | |
| | | } |
| | | title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ; |
| | | if(type === 'edit' || type === 'review') { |
| | | state.form = JSON.parse(JSON.stringify(value)); |
| | | |
| | | const res = await getQualityTemplateById({planId: value.id}) |
| | | if(res.code === 200){ |
| | | state.form = res.data |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | if(state.isAdmin){ |
| | | state.form.companyId = value.companyId |
| | | state.form.companyName = value.companyName |
| | | state.form.companyId = res.data.companyId |
| | | state.form.companyName = res.data.companyName |
| | | } |
| | | } |
| | | await getPeopleList() |
| | |
| | | </el-form> |
| | | </div> |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column type="index" label="序号" width="80" align="center"></el-table-column> |
| | | <el-table-column label="名称" prop="companyName" align="center" > |
| | | <template #default="scope"> |
| | | <span>{{scope.row.year}}年度{{scope.row.companyName}}质量管理体系工作策划安排及完成情况</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-naame="small-padding fixed-width" > |
| | | <el-table v-loading="loading" :data="dataList" :border="true" @selection-change="handleSelectionChange" :span-method="mergeCells"> |
| | | <el-table-column type="selection" width="55" prop="selection" /> |
| | | <!-- <el-table-column type="index" label="序号" width="80" align="center"></el-table-column>--> |
| | | <el-table-column label="企业名称" v-if="data.isAdmin" prop="companyName" align="center" /> |
| | | <el-table-column label="年份" prop="year" align="center" /> |
| | | <el-table-column label="项目" prop="project" align="center" /> |
| | | <el-table-column label="内容" prop="content" align="center" /> |
| | | <el-table-column label="参加人员" prop="participant" align="center" /> |
| | | <el-table-column label="时间" prop="applyTime" align="center" /> |
| | | <el-table-column label="完成时间" prop="accomplishTime" align="center" /> |
| | | <el-table-column label="完成情况" prop="accomplishStatus" align="center" /> |
| | | <el-table-column label="操作" align="center" prop="operate" class-naame="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openDialog('review',scope.row)" >查看</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)" >编辑</el-button> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pag-container"> |
| | | <el-pagination |
| | | v-model:current-page="data.queryParams.pageNum" |
| | | v-model:page-size="data.queryParams.pageSize" |
| | | :page-sizes="[10,15,20,25]" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </div> |
| | | <!-- <div class="pag-container">--> |
| | | <!-- <el-pagination--> |
| | | <!-- v-model:current-page="data.queryParams.pageNum"--> |
| | | <!-- v-model:page-size="data.queryParams.pageSize"--> |
| | | <!-- :page-sizes="[10,15,20,25]"--> |
| | | <!-- layout="total, sizes, prev, pager, next, jumper"--> |
| | | <!-- :total="total"--> |
| | | <!-- @size-change="handleSizeChange"--> |
| | | <!-- @current-change="handleCurrentChange"--> |
| | | <!-- />--> |
| | | <!-- </div>--> |
| | | <editDialog ref="noticeRef" @getList = "getList"></editDialog> |
| | | </div> |
| | | </template> |
| | |
| | | import {generateWordDocument} from "@/utils/exportWord"; |
| | | import {delTable, getTable} from "@/api/qualityObjectives/table"; |
| | | import {delDiscern, getDiscern} from "@/api/environment/factors"; |
| | | import {delQualityTemplate, getQualityTemplate} from "@/api/standardSys/standardSys"; |
| | | import {delQualityTemplate, getQualityTemplate, getQualityTemplateById} from "@/api/standardSys/standardSys"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const noticeRef = ref(); |
| | |
| | | getCompanyList() |
| | | } |
| | | }); |
| | | |
| | | const getList = async () => { |
| | | loading.value = true; |
| | | const res = await getQualityTemplate(data.queryParams); |
| | | if(res.code === 200){ |
| | | dataList.value = res.data.list |
| | | total.value = res.data.total |
| | | const resultArray = []; |
| | | for (const obj of res.data.list) { |
| | | const listItemArray = obj.planMesses; |
| | | for (const listItem of listItemArray) { |
| | | resultArray.push({ |
| | | id:obj.id, |
| | | companyName: obj.companyName, |
| | | year: obj.year, |
| | | project: listItem.project, |
| | | content: listItem.content, |
| | | participant: listItem.participant, |
| | | applyTime: listItem.applyTime, |
| | | accomplishTime: listItem.accomplishTime, |
| | | accomplishStatus: listItem.accomplishStatus, |
| | | }); |
| | | } |
| | | } |
| | | dataList.value = resultArray |
| | | calculateSpan() |
| | | // total.value = resultArray.length |
| | | // dataList.value = res.data.list |
| | | // total.value = res.data.total |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | item.tableList = item.planMesses |
| | | |
| | | try { |
| | | generateWordDocument(templatePath.value, item, item.companyName+`_质量管理体系工作策划安排及完成情况.docx`); |
| | | generateWordDocument(templatePath.value, item, `${item.year}质量管理体系工作策划安排及完成情况.docx`); |
| | | } catch (error){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | }) |
| | | } |
| | | |
| | | const handleSelectionChange = (val) => { |
| | | choosedData.value = val |
| | | const handleSelectionChange = async (val) => { |
| | | let arr = [] |
| | | for (const item of val) { |
| | | const res = await getQualityTemplateById({planId: item.id}) |
| | | if(res.code == 200){ |
| | | arr.push(res.data) |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | choosedData.value = arr |
| | | |
| | | |
| | | } |
| | | const handleDelete = (val) => { |
| | | ElMessageBox.confirm( |
| | |
| | | data.yearList.push({ value, label: value }); // 添加新选项(这里简单地将值和标签设为相同) |
| | | } |
| | | } |
| | | const mergeCells = ({ row, column, rowIndex, columnIndex }) => { |
| | | if ( column.property == 'operate' || column.property == 'selection' || column.property == 'year') { |
| | | const _row = spanArr.value[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return [_row, _col]; |
| | | } |
| | | }; |
| | | |
| | | const spanArr = ref([]); // 存储每一行的合并信息 |
| | | const position = ref(0); // 记录当前位置 |
| | | // 计算合并的行数 |
| | | const calculateSpan = () => { |
| | | spanArr.value = []; |
| | | position.value = 0; |
| | | |
| | | dataList.value.forEach((item, index) => { |
| | | if (index === 0) { |
| | | spanArr.value.push(1); |
| | | position.value = 0; |
| | | } else { |
| | | // 判断当前行的id与上一行是否相同 |
| | | if (dataList.value[index].id === dataList.value[index - 1].id) { |
| | | spanArr.value[position.value] += 1; |
| | | spanArr.value.push(0); |
| | | } else { |
| | | spanArr.value.push(1); |
| | | position.value = index; |
| | | } |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | |
| | | </script> |
| | | <style lang="scss"> |
| | |
| | | factorContents = i.factorContents |
| | | } |
| | | }) |
| | | if(!factorContents[0].influence){ |
| | | factorContents = factorContents.map(item => { |
| | | return { |
| | | ...item, |
| | | influence:'正面', |
| | | monitorMethod:'每年管理评审前', |
| | | review:'全面评价', |
| | | solutions:'可控', |
| | | result:'Y', |
| | | |
| | | } |
| | | }) |
| | | } |
| | | state.form.outEnvironment = factorContents.filter(i => i.type == 1) |
| | | state.form.inEnvironment = factorContents.filter(i => i.type == 2) |
| | | } |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delControl(val.id); |
| | | const res = await delControl(val.id,val.factorDiscernId); |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | :title="title" |
| | | width="900px" |
| | | width="950px" |
| | | :before-close="handleClose" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | |
| | | <div style="display: flex;width: 100%;margin-top: 5px"> |
| | | <el-table :data="state.form.outEnvironment" :border="true"> |
| | | <el-table-column type="index" label="序号" align="center"></el-table-column> |
| | | <el-table-column label="环境因素" prop="factorName" align="center" width="140"> |
| | | <el-table-column label="环境因素" prop="factorName" align="center" min-width="130"> |
| | | <template #default="{row,$index}"> |
| | | <el-form-item :prop="'outEnvironment.' + '[' + $index + ']' + '.factorName'" :rules="state.rules.factorName"> |
| | | <el-select |
| | |
| | | v-model="row.factorName" |
| | | placeholder="请选择环境因素" |
| | | style="width: 240px" |
| | | filterable |
| | | allow-create |
| | | default-first-option |
| | | :reserve-keyword="false" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in state.outReasonList" |
| | |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="主要内容" prop="factorMess" align="center" width="220"> |
| | | <el-table-column label="主要内容" prop="factorMess" align="center" width="360"> |
| | | <template #default="{row,$index}"> |
| | | <el-form-item :prop="'outEnvironment.' + '[' + $index + ']' + '.factorMess'" :rules="state.rules.factorMess"> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" :rows="4" v-model="row.factorMess" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="备注" prop="remark" align="center" > |
| | | <el-table-column label="备注" prop="remark" align="center" max-width="140"> |
| | | <template #default="{row,$index}"> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" v-model="row.remark" placeholder="请输入"></el-input> |
| | | </template> |
| | |
| | | <div style="display: flex;width: 100%;"> |
| | | <el-table :data="state.form.inEnvironment" :border="true" > |
| | | <el-table-column type="index" label="序号" align="center"></el-table-column> |
| | | <el-table-column label="环境因素" prop="factorName" align="center" width="140"> |
| | | <el-table-column label="环境因素" prop="factorName" align="center" min-width="130"> |
| | | <template #default="{row,$index}"> |
| | | <el-form-item :prop="'inEnvironment.' + '[' + $index + ']' + '.factorName'" :rules="state.rules.factorName"> |
| | | <el-select |
| | |
| | | v-model="row.factorName" |
| | | placeholder="请选择环境因素" |
| | | style="width: 240px" |
| | | filterable |
| | | allow-create |
| | | default-first-option |
| | | :reserve-keyword="false" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in state.inReasonList" |
| | |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="主要内容" prop="factorMess" align="center" width="220"> |
| | | <el-table-column label="主要内容" prop="factorMess" align="center" width="360"> |
| | | <template #default="{row,$index}"> |
| | | <el-form-item :prop="'inEnvironment.' + '[' + $index + ']' + '.factorMess'" :rules="state.rules.factorMess"> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" :rows="4" v-model="row.factorMess" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="备注" prop="remark" align="center" > |
| | | <el-table-column label="备注" prop="remark" align="center" max-width="140"> |
| | | <template #default="{row,$index}"> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" v-model="row.remark" placeholder="请输入"></el-input> |
| | | </template> |
| | |
| | | <template #default="{row,$index}"> |
| | | <div v-for="(i,index) in row.contentMesses" :key="index"> |
| | | <el-form-item :prop="'riskContents.' + '[' + $index + '].' +'contentMesses.' + '[' + index + ']' + '.severity'" :rules="state.rules.severity"> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" v-model="i.severity" placeholder="请输入"></el-input> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" :rows="3" v-model="i.severity" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </template> |
| | |
| | | <template #default="{row,$index}"> |
| | | <div v-for="(i,index) in row.contentMesses" :key="index"> |
| | | <el-form-item :prop="'riskContents.' + '[' + $index + '].' +'contentMesses.' + '[' + index + ']' + '.frequency'" :rules="state.rules.frequency"> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" v-model="i.frequency" placeholder="请输入"></el-input> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" :rows="3" v-model="i.frequency" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </template> |
| | |
| | | <template #default="{row,$index}"> |
| | | <div v-for="(i,index) in row.contentMesses" :key="index"> |
| | | <el-form-item :prop="'riskContents.' + '[' + $index + '].' +'contentMesses.' + '[' + index + ']' + '.rpn'" :rules="state.rules.rpn"> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" v-model="i.rpn" placeholder="请输入"></el-input> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" :rows="3" v-model="i.rpn" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </template> |
| | |
| | | <template #default="{row,$index}"> |
| | | <div v-for="(i,index) in row.contentMesses" :key="index"> |
| | | <el-form-item :prop="'riskContents.' + '[' + $index + '].' +'contentMesses.' + '[' + index + ']' + '.riskLevel'" :rules="state.rules.riskLevel"> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" v-model="i.riskLevel" placeholder="请输入"></el-input> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" :rows="3" v-model="i.riskLevel" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </template> |
| | |
| | | <template #default="{row,$index}"> |
| | | <div v-for="(i,index) in row.contentMesses" :key="index"> |
| | | <el-form-item :prop="'riskContents.' + '[' + $index + '].' +'contentMesses.' + '[' + index + ']' + '.chargeUser'" :rules="state.rules.chargeUser"> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" v-model="i.chargeUser" placeholder="请输入"></el-input> |
| | | <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" :rows="3" v-model="i.chargeUser" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </template> |
| | |
| | | <el-table-column label="风险评估-严重度" prop="remark" align="center" > |
| | | <template #default="{row,$index}"> |
| | | <div v-for="(i,index) in row.contentMesses" :key="index"> |
| | | <el-input style="margin-bottom: 15px" type="textarea" disabled v-model="i.severity"></el-input> |
| | | <el-input style="margin-bottom: 15px" type="textarea" :rows="3" disabled v-model="i.severity"></el-input> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="风险评估-发生频率" prop="remark" align="center" > |
| | | <template #default="{row,$index}"> |
| | | <div v-for="(i,index) in row.contentMesses" :key="index"> |
| | | <el-input style="margin-bottom: 15px" type="textarea" disabled v-model="i.frequency"></el-input> |
| | | <el-input style="margin-bottom: 15px" type="textarea" :rows="3" disabled v-model="i.frequency"></el-input> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="风险评估-RPN" prop="remark" align="center" > |
| | | <template #default="{row,$index}"> |
| | | <div v-for="(i,index) in row.contentMesses" :key="index"> |
| | | <el-input style="margin-bottom: 15px" type="textarea" disabled v-model="i.rpn"></el-input> |
| | | <el-input style="margin-bottom: 15px" type="textarea" :rows="3" disabled v-model="i.rpn"></el-input> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="风险评估-风险等级" prop="remark" align="center" > |
| | | <template #default="{row,$index}"> |
| | | <div v-for="(i,index) in row.contentMesses" :key="index"> |
| | | <el-input style="margin-bottom: 15px" type="textarea" disabled v-model="i.riskLevel"></el-input> |
| | | <el-input style="margin-bottom: 15px" type="textarea" :rows="3" disabled v-model="i.riskLevel"></el-input> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-table-column label="风险对应措施-责任人" prop="remark" align="center" width="120"> |
| | | <template #default="{row,$index}"> |
| | | <div v-for="(i,index) in row.contentMesses" :key="index"> |
| | | <el-input style="margin-bottom: 15px" type="textarea" disabled v-model="i.chargeUser"></el-input> |
| | | <el-input style="margin-bottom: 15px" type="textarea" :rows="3" disabled v-model="i.chargeUser"></el-input> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <template #default="{row,$index}"> |
| | | <div v-for="(i,index) in row.contentMesses" :key="index"> |
| | | <el-form-item :prop="'riskContents.' + '[' + $index + '].' +'contentMesses.' + '[' + index + ']' + '.monitorTime'" :rules="state.rules.monitorTime"> |
| | | <el-input style="margin-bottom: 15px" :disabled="title === '查看'" type="textarea" v-model="i.monitorTime" placeholder="请输入"></el-input> |
| | | <el-input style="margin-bottom: 15px" :disabled="title === '查看'" :rows="3" type="textarea" v-model="i.monitorTime" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </template> |
| | |
| | | <template #default="{row,$index}"> |
| | | <div v-for="(i,index) in row.contentMesses" :key="index"> |
| | | <el-form-item :prop="'riskContents.' + '[' + $index + '].' +'contentMesses.' + '[' + index + ']' + '.review'" :rules="state.rules.review"> |
| | | <el-input style="margin-bottom: 15px" :disabled="title === '查看'" type="textarea" v-model="i.review" placeholder="请输入"></el-input> |
| | | <el-input style="margin-bottom: 15px" :disabled="title === '查看'" :rows="3" type="textarea" v-model="i.review" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </template> |
| | |
| | | <div style="display: flex;width: 100%;"> |
| | | <el-table :data="state.form.inspectionMesses" :border="true" > |
| | | <el-table-column type="index" label="序号" align="center"></el-table-column> |
| | | <el-table-column label="时间" prop="monthlyTime" align="center" width="100"> |
| | | <el-table-column label="时间" prop="monthlyTime" align="center" width="140"> |
| | | <template #default="{row,$index}"> |
| | | <el-form-item :prop="'inspectionMesses.' + '[' + $index + ']' + 'monthlyTime'" :rules="state.rules.monthlyTime"> |
| | | <el-date-picker |
| | |
| | | import {getDept, getObject, getObjectPage} from "@/api/qualityObjectives/object"; |
| | | import {addTable, editTable, getTargetById} from "@/api/qualityObjectives/table"; |
| | | import {addNeedDiscren, editNeedDiscren} from "@/api/need/need"; |
| | | import {addMonthlyRecord, editMonthlyRecord} from "@/api/monthlyInspectionRecord"; |
| | | import {addMonthlyRecord, editMonthlyRecord, getMonthlyRecordById} from "@/api/monthlyInspectionRecord"; |
| | | import {getQualityTemplateById} from "@/api/standardSys/standardSys"; |
| | | |
| | | const dialogVisible = ref(false); |
| | | const title = ref(""); |
| | |
| | | } |
| | | title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ; |
| | | if(type === 'edit' || type === 'review') { |
| | | state.form = JSON.parse(JSON.stringify(value)); |
| | | if(state.isAdmin){ |
| | | state.form.companyId = value.companyId |
| | | state.form.companyName = value.companyName |
| | | const res = await getMonthlyRecordById({monthlyId: value.id}) |
| | | if(res.code === 200){ |
| | | state.form = res.data |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | if(state.isAdmin){ |
| | | state.form.companyId = res.data.companyId |
| | | state.form.companyName = res.data.companyName |
| | | } |
| | | // state.form = JSON.parse(JSON.stringify(value)); |
| | | // if(state.isAdmin){ |
| | | // state.form.companyId = value.companyId |
| | | // state.form.companyName = value.companyName |
| | | // } |
| | | } |
| | | await getPeopleList() |
| | | dialogVisible.value = true; |
| | |
| | | </el-form> |
| | | </div> |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column type="index" label="序号" width="80" align="center"></el-table-column> |
| | | <el-table-column label="企业名称" prop="companyName" align="center" v-if="data.isAdmin" /> |
| | | <el-table-column label="名称" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.recordName}}登记</span> |
| | | </template> |
| | | <el-table v-loading="loading" :data="dataList" :border="true" @selection-change="handleSelectionChange" :span-method="mergeCells"> |
| | | <el-table-column type="selection" prop="selection" width="55" /> |
| | | <!-- <el-table-column type="index" prop="sequenceNumber" label="序号" width="80" align="center"></el-table-column>--> |
| | | <!-- <el-table-column label="企业名称" prop="companyName" align="center" v-if="data.isAdmin" />--> |
| | | <el-table-column label="名称" prop="recordName" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160"> |
| | | <el-table-column label="时间" prop="monthlyTime" align="center" /> |
| | | <el-table-column label="检查人" prop="checkUser" align="center" /> |
| | | <el-table-column label="防护" prop="entrench" align="center" /> |
| | | <el-table-column label="标识" prop="identification" align="center" /> |
| | | <el-table-column label="摆放" prop="place" align="center" /> |
| | | <el-table-column label="清洁" prop="clean" align="center" /> |
| | | <el-table-column label="安全" prop="safety" align="center" /> |
| | | <el-table-column label="环境" prop="environment" align="center" /> |
| | | <el-table-column label="帐务卡一致性" prop="consistency" align="center" /> |
| | | <el-table-column label="操作" align="center" prop="operate" class-name="small-padding fixed-width" width="160"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openDialog('review',scope.row)" >查看</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)" >编辑</el-button> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pag-container"> |
| | | <el-pagination |
| | | v-model:current-page="data.queryParams.pageNum" |
| | | v-model:page-size="data.queryParams.pageSize" |
| | | :page-sizes="[10,15,20,25]" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </div> |
| | | <!-- <div class="pag-container">--> |
| | | <!-- <el-pagination--> |
| | | <!-- v-model:current-page="data.queryParams.pageNum"--> |
| | | <!-- v-model:page-size="data.queryParams.pageSize"--> |
| | | <!-- :page-sizes="[10,15,20,25]"--> |
| | | <!-- layout="total, sizes, prev, pager, next, jumper"--> |
| | | <!-- :total="total"--> |
| | | <!-- @size-change="handleSizeChange"--> |
| | | <!-- @current-change="handleCurrentChange"--> |
| | | <!-- />--> |
| | | <!-- </div>--> |
| | | <editDialog ref="noticeRef" @getList = "getList"></editDialog> |
| | | </div> |
| | | </template> |
| | |
| | | import {generateWordDocument} from "@/utils/exportWord"; |
| | | import {delTable, getTable} from "@/api/qualityObjectives/table"; |
| | | import {delNeedDiscren, getNeedDiscren} from "@/api/need/need"; |
| | | import {delMonthlyRecord, getMonthlyRecord} from "@/api/monthlyInspectionRecord"; |
| | | import {delMonthlyRecord, getMonthlyRecord, getMonthlyRecordById} from "@/api/monthlyInspectionRecord"; |
| | | import {getQualityTemplateById} from "@/api/standardSys/standardSys"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const noticeRef = ref(); |
| | |
| | | getCompanyList() |
| | | } |
| | | }); |
| | | |
| | | const resData = ref([]) |
| | | const getList = async () => { |
| | | loading.value = true; |
| | | const res = await getMonthlyRecord(data.queryParams); |
| | | if(res.code === 200){ |
| | | dataList.value = res.data.list |
| | | total.value = res.data.total |
| | | const resultArray = []; |
| | | for (const obj of res.data.list) { |
| | | const listItemArray = obj.inspectionMesses; |
| | | for (const listItem of listItemArray) { |
| | | resultArray.push({ |
| | | id:obj.id, |
| | | companyName: obj.companyName, |
| | | recordName: obj.recordName, |
| | | monthlyTime: listItem.monthlyTime, |
| | | checkUser: listItem.checkUser, |
| | | entrench: listItem.entrench, |
| | | identification: listItem.identification, |
| | | place: listItem.place, |
| | | clean: listItem.clean, |
| | | safety: listItem.safety, |
| | | environment: listItem.environment, |
| | | consistency: listItem.consistency, |
| | | }); |
| | | } |
| | | } |
| | | dataList.value = resultArray.map((item,index) => { |
| | | return { |
| | | ...item, |
| | | sequenceNumber: index + 1 |
| | | } |
| | | }) |
| | | calculateSpan() |
| | | // dataList.value = res.data.list |
| | | // total.value = res.data.total |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | item.tableData = item.inspectionMesses |
| | | console.log('xxx',item.tableData) |
| | | try { |
| | | generateWordDocument(templatePath.value, item, item.companyName + `_月度检查记录表.docx`); |
| | | generateWordDocument(templatePath.value, item, item.recordName + `_月度检查记录表.docx`); |
| | | } catch (error){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | } |
| | | }) |
| | | } |
| | | const handleSelectionChange = (val) => { |
| | | choosedData.value = val |
| | | const handleSelectionChange = async (val) => { |
| | | let arr = [] |
| | | for (const item of val) { |
| | | const res = await getMonthlyRecordById({monthlyId: item.id}) |
| | | if(res.code == 200){ |
| | | arr.push(res.data) |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | choosedData.value = arr |
| | | } |
| | | const handleDelete = (val) => { |
| | | ElMessageBox.confirm( |
| | |
| | | }) |
| | | } |
| | | |
| | | const mergeCells = ({ row, column, rowIndex, columnIndex }) => { |
| | | if ( column.property == 'operate' || column.property == 'recordName' || column.property == 'selection') { |
| | | const _row = spanArr.value[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return [_row, _col]; |
| | | } |
| | | }; |
| | | |
| | | const spanArr = ref([]); // 存储每一行的合并信息 |
| | | const position = ref(0); // 记录当前位置 |
| | | // 计算合并的行数 |
| | | const calculateSpan = () => { |
| | | spanArr.value = []; |
| | | position.value = 0; |
| | | |
| | | dataList.value.forEach((item, index) => { |
| | | if (index === 0) { |
| | | spanArr.value.push(1); |
| | | position.value = 0; |
| | | } else { |
| | | // 判断当前行的id与上一行是否相同 |
| | | if (dataList.value[index].id === dataList.value[index - 1].id) { |
| | | spanArr.value[position.value] += 1; |
| | | spanArr.value.push(0); |
| | | } else { |
| | | spanArr.value.push(1); |
| | | position.value = index; |
| | | } |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | </script> |
| | | <style lang="scss"> |
| | |
| | | <el-row :gutter="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="单位名称:" prop="unitName" > |
| | | <el-input :disabled="title === '查看'" v-model="state.form.unitName" placeholder="单位名称"></el-input> |
| | | <!-- <el-input :disabled="title === '查看'" v-model="state.form.unitName" placeholder="单位名称"></el-input>--> |
| | | <el-select v-model="state.form.unitName" placeholder="请选择" filterable clearable style="width: 100%" :disabled="title == '查看'" @change="selectUnitCom"> |
| | | <el-option |
| | | v-for="item in state.supplierList" |
| | | :key="item.id" |
| | | :label="item.customerName" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | import {verifyPhone} from "@/utils/validate"; |
| | | import {developList} from "@/views/work/qualityInfo/supplierQuality/supplierList/components/qualityDatas"; |
| | | import {addDelivery, editDelivery} from "@/api/satisfiedNew/satisfiedNew"; |
| | | import {getCustomer, getCustomerAll} from "@/api/customerList"; |
| | | |
| | | const dialogVisible = ref(false); |
| | | const title = ref(""); |
| | |
| | | name: '其他' |
| | | }, |
| | | ], |
| | | checkProductTypes: [] |
| | | checkProductTypes: [], |
| | | supplierList: [] |
| | | }) |
| | | |
| | | onMounted(() => { |
| | |
| | | |
| | | }); |
| | | const openDialog = async (type, value,companyList) => { |
| | | |
| | | const userInfo = JSON.parse(Cookies.get('userInfo')) |
| | | state.isAdmin = userInfo.userType === 0; |
| | | state.form.companyName = userInfo.companyName |
| | |
| | | state.form.companyName = value.companyName |
| | | state.companyList = companyList |
| | | } |
| | | await getSupplier() |
| | | title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ; |
| | | if(type === 'edit' || type === 'review') { |
| | | state.form = JSON.parse(JSON.stringify(value)); |
| | | state.form.unitName = Number(state.form.unitName) |
| | | if(state.isAdmin){ |
| | | state.form.companyId = value.companyId |
| | | state.form.companyName = value.companyName |
| | |
| | | dialogVisible.value = true; |
| | | } |
| | | |
| | | const getSupplier = async () => { |
| | | const param = { |
| | | companyId: state.form.companyId, |
| | | } |
| | | const res = await getCustomerAll(param); |
| | | if(res.code === 200){ |
| | | state.supplierList = res.data.data |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | const onSubmit = async () => { |
| | | state.form.mess = JSON.stringify(state.dataList) |
| | | state.form.product = state.checkProductTypes.join(',') |
| | |
| | | } |
| | | state.checkProductTypes = [] |
| | | state.companyList = [] |
| | | state.dataList =[ |
| | | { |
| | | num: '说明', |
| | | item: '哪项不满意,请在相应的选项“⬜︎︎︎”内打“√”', |
| | | satisfied:'总体评价,请在相应的选项“⬜︎︎︎”内打“√”' |
| | | }, |
| | | { |
| | | num: '1', |
| | | item: ['产品性能','技术资料','操作性','维护性','稳定性'], |
| | | satisfied:['满意','基本满意','不满意'] |
| | | }, |
| | | { |
| | | num: '2', |
| | | item: ['节点控制','交付及时性','可靠性'], |
| | | satisfied:['满意','基本满意','不满意'] |
| | | }, |
| | | { |
| | | num: '3', |
| | | item: ['顾客培训','技术支持','售后维修','备品及备件供应'], |
| | | satisfied:['满意','基本满意','不满意'] |
| | | }, |
| | | { |
| | | num: '4', |
| | | item: ['技术技能','服务态度','过程规范','综合素质'], |
| | | satisfied:['满意','基本满意','不满意'] |
| | | }, |
| | | { |
| | | num: '5', |
| | | item: ['服务的及时性','有效性','服务态度'], |
| | | satisfied:['满意','基本满意','不满意'] |
| | | }, |
| | | ] |
| | | } |
| | | |
| | | |
| | |
| | | state.yearList.push({ value, label: value }); // 添加新选项(这里简单地将值和标签设为相同) |
| | | } |
| | | } |
| | | const selectUnitCom = (val) => { |
| | | state.form.person = '' |
| | | state.form.address = '' |
| | | state.form.phone = '' |
| | | state.supplierList.forEach(item => { |
| | | if(val == item.id){ |
| | | state.form.person = item.person |
| | | state.form.address = item.customerAddr |
| | | state.form.phone = item.phone |
| | | } |
| | | }) |
| | | |
| | | } |
| | | defineExpose({ |
| | | openDialog |
| | | }); |
| | |
| | | import {addTable, editTable, getTargetById} from "@/api/qualityObjectives/table"; |
| | | import {addNeedDiscren, editNeedDiscren} from "@/api/need/need"; |
| | | import {addCustomerNeed, editCustomerNeed} from "@/api/customerNeed"; |
| | | import {addInside, editInside} from "@/api/continuousImprovement"; |
| | | import {addInside, editInside, getInsideById} from "@/api/continuousImprovement"; |
| | | import {getQualityTemplateById} from "@/api/standardSys/standardSys"; |
| | | |
| | | const dialogVisible = ref(false); |
| | | const title = ref(""); |
| | |
| | | } |
| | | title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ; |
| | | if(type === 'edit' || type === 'review') { |
| | | state.form = JSON.parse(JSON.stringify(value)); |
| | | if(state.isAdmin){ |
| | | state.form.companyId = value.companyId |
| | | state.form.companyName = value.companyName |
| | | const res = await getInsideById({improveId: value.id}) |
| | | if(res.code === 200){ |
| | | state.form = res.data |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | if(state.isAdmin){ |
| | | state.form.companyId = res.data.companyId |
| | | state.form.companyName = res.data.companyName |
| | | } |
| | | |
| | | // state.form = JSON.parse(JSON.stringify(value)); |
| | | // if(state.isAdmin){ |
| | | // state.form.companyId = value.companyId |
| | | // state.form.companyName = value.companyName |
| | | // } |
| | | |
| | | console.log('xx',state.form) |
| | | |
| | |
| | | </el-form> |
| | | </div> |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column type="index" label="序号" width="80" align="center"></el-table-column> |
| | | <el-table v-loading="loading" :data="dataList" :border="true" @selection-change="handleSelectionChange" :span-method="mergeCells"> |
| | | <el-table-column type="selection" width="55" prop="selection" /> |
| | | <!-- <el-table-column type="index" label="序号" width="80" align="center"></el-table-column>--> |
| | | <el-table-column label="企业名称" prop="companyName" align="center" v-if="data.isAdmin" /> |
| | | <el-table-column label="名称" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.year}}年度质量体系改进计划</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160"> |
| | | <el-table-column label="年份" prop="year" align="center" /> |
| | | <el-table-column label="改进项" prop="items" align="center" /> |
| | | <el-table-column label="具体措施" prop="measure" align="center" /> |
| | | <el-table-column label="责任部门" prop="dutyName" align="center" /> |
| | | <el-table-column label="完成时间" prop="finishTime" align="center" /> |
| | | <el-table-column label="跟踪验证" prop="verify" align="center" /> |
| | | <el-table-column label="操作" align="center" prop="operate" class-name="small-padding fixed-width" width="160"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openDialog('review',scope.row)" >查看</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)" >编辑</el-button> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pag-container"> |
| | | <el-pagination |
| | | v-model:current-page="data.queryParams.pageNum" |
| | | v-model:page-size="data.queryParams.pageSize" |
| | | :page-sizes="[10,15,20,25]" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </div> |
| | | <!-- <div class="pag-container">--> |
| | | <!-- <el-pagination--> |
| | | <!-- v-model:current-page="data.queryParams.pageNum"--> |
| | | <!-- v-model:page-size="data.queryParams.pageSize"--> |
| | | <!-- :page-sizes="[10,15,20,25]"--> |
| | | <!-- layout="total, sizes, prev, pager, next, jumper"--> |
| | | <!-- :total="total"--> |
| | | <!-- @size-change="handleSizeChange"--> |
| | | <!-- @current-change="handleCurrentChange"--> |
| | | <!-- />--> |
| | | <!-- </div>--> |
| | | <editDialog ref="noticeRef" @getList = "getList"></editDialog> |
| | | </div> |
| | | </template> |
| | |
| | | import {delTable, getTable} from "@/api/qualityObjectives/table"; |
| | | import {delNeedDiscren, getNeedDiscren} from "@/api/need/need"; |
| | | import {delCustomerNeed, getCustomerNeed} from "@/api/customerNeed"; |
| | | import {delInside, getInside} from "@/api/continuousImprovement"; |
| | | import {delInside, getInside, getInsideById} from "@/api/continuousImprovement"; |
| | | import {getQualityTemplateById} from "@/api/standardSys/standardSys"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const noticeRef = ref(); |
| | |
| | | loading.value = true; |
| | | const res = await getInside(data.queryParams); |
| | | if(res.code === 200){ |
| | | dataList.value = res.data.list |
| | | total.value = res.data.total |
| | | const resultArray = []; |
| | | for (const obj of res.data.list) { |
| | | const listItemArray = obj.plans; |
| | | for (const listItem of listItemArray) { |
| | | resultArray.push({ |
| | | id:obj.id, |
| | | companyName: obj.companyName, |
| | | year: obj.year, |
| | | items: listItem.items, |
| | | measure: listItem.measure, |
| | | dutyName: listItem.dutyName, |
| | | finishTime: listItem.finishTime, |
| | | verify: listItem.verify, |
| | | }); |
| | | } |
| | | } |
| | | dataList.value = resultArray |
| | | calculateSpan() |
| | | // dataList.value = res.data.list |
| | | // total.value = res.data.total |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | }) |
| | | console.log('xxx',item.tableData) |
| | | try { |
| | | generateWordDocument(templatePath.value, item, item.companyName + `_${item.year}年度体系改进计划.docx`); |
| | | generateWordDocument(templatePath.value, item, `${item.year}年度体系改进计划.docx`); |
| | | } catch (error){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | } |
| | | }) |
| | | } |
| | | const handleSelectionChange = (val) => { |
| | | choosedData.value = val |
| | | const handleSelectionChange = async (val) => { |
| | | let arr = [] |
| | | for (const item of val) { |
| | | const res = await getInsideById({improveId: item.id}) |
| | | if(res.code == 200){ |
| | | arr.push(res.data) |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | choosedData.value = arr |
| | | } |
| | | const handleDelete = (val) => { |
| | | ElMessageBox.confirm( |
| | |
| | | data.yearList.push({ value, label: value }); // 添加新选项(这里简单地将值和标签设为相同) |
| | | } |
| | | } |
| | | const mergeCells = ({ row, column, rowIndex, columnIndex }) => { |
| | | if ( column.property == 'operate' || column.property == 'selection' || column.property == 'year' ) { |
| | | const _row = spanArr.value[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return [_row, _col]; |
| | | } |
| | | }; |
| | | |
| | | const spanArr = ref([]); // 存储每一行的合并信息 |
| | | const position = ref(0); // 记录当前位置 |
| | | // 计算合并的行数 |
| | | const calculateSpan = () => { |
| | | spanArr.value = []; |
| | | position.value = 0; |
| | | |
| | | dataList.value.forEach((item, index) => { |
| | | if (index === 0) { |
| | | spanArr.value.push(1); |
| | | position.value = 0; |
| | | } else { |
| | | // 判断当前行的id与上一行是否相同 |
| | | if (dataList.value[index].id === dataList.value[index - 1].id) { |
| | | spanArr.value[position.value] += 1; |
| | | spanArr.value.push(0); |
| | | } else { |
| | | spanArr.value.push(1); |
| | | position.value = index; |
| | | } |
| | | } |
| | | }); |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .pag-container{ |
| | |
| | | <el-table-column label="责任部门" prop="deptId" align="center" > |
| | | <template #default="{row,$index}"> |
| | | <div v-for="(i,index) in row.analyses" :key="index"> |
| | | <el-form-item :prop="'types.' + '[' + $index + '].' +'analyses.' + '[' + index + ']' + '.deptId'"> |
| | | <el-form-item :prop="'types.' + '[' + $index + '].' +'analyses.' + '[' + index + ']' + '.deptId'" style="margin-bottom: 10px"> |
| | | <el-select |
| | | clearable |
| | | :disabled="title === '查看'" |
| | | v-model="i.deptId" |
| | | placeholder="请选择部门" |
| | | style="width: 240px;margin-bottom: 5px" |
| | | class="select-same-as-textarea" |
| | | style="width: 240px;margin-top: 5px" |
| | | > |
| | | <el-option |
| | | v-for="item in state.deptList" |
| | |
| | | flex-direction: column; |
| | | align-items: flex-start; |
| | | } |
| | | /* 同步高度 */ |
| | | ::v-deep .select-same-as-textarea { |
| | | height: 90px; |
| | | } |
| | | |
| | | /* 确保选择器内部区域高度匹配 */ |
| | | ::v-deep .select-same-as-textarea .el-input__inner { |
| | | height: 90px; |
| | | line-height: 1.5; /* 保持文字垂直居中 */ |
| | | padding-top: 8px; /* 调整文字位置 */ |
| | | } |
| | | |
| | | } |
| | | </style> |