| | |
| | | <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.deptName}}登记</span> |
| | | <span>{{scope.row.recordName}}登记</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160"> |
| | |
| | | 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"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const noticeRef = ref(); |
| | |
| | | } |
| | | }); |
| | | const getList = async () => { |
| | | // loading.value = true; |
| | | // const res = await getNeedDiscren(data.queryParams); |
| | | // if(res.code === 200){ |
| | | // dataList.value = res.data.list |
| | | // total.value = res.data.total |
| | | // }else{ |
| | | // ElMessage.warning(res.message) |
| | | // } |
| | | // loading.value = false; |
| | | dataList.value = [{}] |
| | | loading.value = true; |
| | | const res = await getMonthlyRecord(data.queryParams); |
| | | if(res.code === 200){ |
| | | dataList.value = res.data.list |
| | | total.value = res.data.total |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | loading.value = false; |
| | | } |
| | | |
| | | const searchClick = () => { |
| | |
| | | const startGeneration = async () => { |
| | | const data = JSON.parse(JSON.stringify(choosedData.value)) |
| | | data.forEach(item => { |
| | | item.expectContents = [ |
| | | { |
| | | name: '张三', |
| | | expectContentMesses: [ |
| | | { |
| | | need: 'xxx', |
| | | personName: 'x', |
| | | visit:true, |
| | | network: true, |
| | | other: false |
| | | |
| | | }, |
| | | { |
| | | need: '22', |
| | | personName: '2', |
| | | visit:false, |
| | | network: false, |
| | | other: true |
| | | |
| | | }, |
| | | ] |
| | | } |
| | | ] |
| | | item.tableData = item.expectContents.map((i,index) => { |
| | | return{ |
| | | ...i, |
| | | expectContentMesses: i.expectContentMesses.map((q,qindex) => { |
| | | return{ |
| | | ...q, |
| | | first: qindex == 0, |
| | | num: index+1, |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | item.tableData = item.inspectionMesses |
| | | console.log('xxx',item.tableData) |
| | | try { |
| | | generateWordDocument(templatePath.value, item, item.companyName + `_月度检查记录表.docx`); |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delNeedDiscren(val.id); |
| | | const res = await delMonthlyRecord(val.id); |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |