From 515b2a8b31c3597ff049ebaaf79c09224e13db1d Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期四, 26 十二月 2024 14:33:03 +0800 Subject: [PATCH] 完成8.7.搬迁 --- src/components/do/a8-corrective-action/ViewTestRecord.vue | 190 +++++++++++ src/components/do/a7-nonconforming-item/qualityInfo.vue | 311 +++++++++++++++++++ src/components/view/a8-corrective-action.vue | 221 +++++++++++++ src/components/do/a8-corrective-action/correctiveInfo.vue | 232 ++++++++++++++ 4 files changed, 954 insertions(+), 0 deletions(-) diff --git a/src/components/do/a7-nonconforming-item/qualityInfo.vue b/src/components/do/a7-nonconforming-item/qualityInfo.vue new file mode 100644 index 0000000..d1e2453 --- /dev/null +++ b/src/components/do/a7-nonconforming-item/qualityInfo.vue @@ -0,0 +1,311 @@ +<template> + <div> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" + :visible.sync="formDia" + title="涓嶇鍚堝伐浣滄帶鍒跺崟" + width="80%" @close="closeProcessingDia"> + <div style="height: 660px; overflow-y: auto"> + <table border="1" cellspacing="10" class="tables"> + <tr> + <td class="first-title" rowspan="8"> + <p>涓嶇鍚堝伐浣滄儏鍐佃褰�</p> + </td> + </tr> + <tr> + <td class="td-title"> + <p>鍙戠敓閮ㄩ棬锛�</p> + </td> + <td class="td-info"> + <span class="td-info1"> {{ form.occurrenceDepartment }}</span> + </td> + <td class="td-title"> + <p>閮ㄩ棬璐熻矗浜猴細</p> + </td> + <td class="td-info"> + <span class="td-info1"> {{ form.headDepartment }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p>涓嶇鍚堝伐浣滃彂鐜伴�斿緞锛�</p> + </td> + <td class="td-info" colspan="3"> + <el-radio-group v-model="form.findWay" v-removeAriaHidden disabled> + <el-radio :label="0">绠$悊璇勫</el-radio> + <el-radio :label="1">鍐呴儴瀹℃牳</el-radio> + <el-radio :label="2">妫�娴嬭繃绋嬫帶鍒�</el-radio> + <el-radio :label="3">鍐呴儴璐ㄩ噺鎺у埗</el-radio> + <el-radio :label="4">鍐呴儴鐩戠潱</el-radio> + <el-radio :label="5">澶栭儴璇勫</el-radio> + <el-radio :label="6">澶栭儴鎶曡瘔</el-radio> + <el-radio :label="7">鍏朵粬</el-radio> + </el-radio-group> + </td> + </tr> + <tr> + <td class="td-title"> + <p>涓嶇鍚堝伐浣滅殑璇︾粏璁板綍锛�</p> + </td> + <td class="td-info" colspan="3"> + <span class="td-info1"> {{ form.recordDetail }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p>涓嶇鍚堝伐浣滅殑浠ュ強鍙婃潯娆惧彿锛�</p> + </td> + <td class="td-info" colspan="3"> + <span class="td-info1"> {{ form.recordAccording }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p>琚洃鐫d汉锛�</p> + </td> + <td class="td-info"> + <span class="td-info1"> {{ form.supervisedUserName }}</span> + </td> + <td class="td-title"> + <p>琚洃鐫f棩鏈燂細</p> + </td> + <td class="td-info"> + <span class="td-info1"> {{ form.supervisedTime }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p>鍙戠幇閮ㄩ棬锛�</p> + </td> + <td class="td-info"> + {{form.foundDepartment}} + </td> + <td class="td-title"> + <p>鏃堕棿锛�</p> + </td> + <td class="td-info"> + {{form.recordTime}} + </td> + </tr> + <tr> + <td class="td-title"> + <p>璁板綍浜猴細</p> + </td> + <td class="td-info"> + {{form.recordUserName}} + </td> + <td class="td-title"> + <p>璁板綍鏃堕棿锛�</p> + </td> + <td class="td-info"> + {{form.recordTime}} + </td> + </tr> + <tr> + <td class="first-title" rowspan="3"> + <p>澶勭悊鎺柦</p> + </td> + </tr> + <tr> + <td class="td-title"> + <p>娑堥櫎涓嶇鍚堝伐浣滄墍閲囧彇鐨勬帾鏂斤細</p> + </td> + <td class="td-info" colspan="3"> + <span class="td-info1"> {{ form.eliminateMeasure }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p>璐熻矗浜猴細</p> + </td> + <td class="td-info"> + {{form.actionsUserName}} + </td> + <td class="td-title"> + <p>澶勭悊鏃堕棿锛�</p> + </td> + <td class="td-info"> + {{form.actionsTime}} + </td> + </tr> + <tr> + <td class="first-title" rowspan="4"> + <p>绾犳鎺柦</p> + </td> + </tr> + <tr> + <td class="td-title"> + <p>鏄惁闇�瑕侀噰鍙栫籂姝f帾鏂斤細</p> + </td> + <td class="td-info" colspan="3"> + <el-radio-group v-model="form.isCorrect" v-removeAriaHidden disabled> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + </tr> + <tr> + <td class="td-title"> + <p>绾犳鎺柦澶勭悊鍗曡窡韪細</p> + </td> + <td class="td-info" colspan="3"> + <span class="td-info1"> {{ form.correctContent }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p>璐熻矗浜猴細</p> + </td> + <td class="td-info"> + {{form.correctUserName}} + </td> + <td class="td-title"> + <p>澶勭悊鏃堕棿锛�</p> + </td> + <td class="td-info"> + {{form.correctTime}} + </td> + </tr> + <tr> + <td class="first-title" rowspan="4"> + <p>鏄惁閫氱煡瀹㈡埛鍙婂彲鎭㈠宸ヤ綔</p> + </td> + </tr> + <tr> + <td class="td-title"> + <p>閫氱煡瀹㈡埛锛�</p> + </td> + <td class="td-info" colspan="3"> + <el-radio-group v-model="form.notifyCustomer" v-removeAriaHidden disabled> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + </tr> + <tr> + <td class="td-title"> + <p>鎭㈠宸ヤ綔锛�</p> + </td> + <td class="td-info" colspan="3"> + <el-radio-group v-model="form.backToWork" v-removeAriaHidden disabled> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + </tr> + <tr> + <td class="td-title"> + <p>璐熻矗浜猴細</p> + </td> + <td class="td-info"> + {{form.qualityManagerUserName}} + </td> + <td class="td-title"> + <p>澶勭悊鏃堕棿锛�</p> + </td> + <td class="td-info"> + {{form.qualityManagerTime}} + </td> + </tr> + </table> + </div> + </el-dialog> + </div> +</template> + +<script> +export default { + name: 'qualityInfo', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {}, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + formDia: false, + form: { + occurrenceDepartment: '', + headDepartment: '', + findWay: '', + recordDetail: '', + recordAccording: '', + supervisedUserName: '', + supervisedTime: '', + actionsUserName: '', + eliminateMeasure: '', + correctUserName: '', + isCorrect: '', + correctContent: '', + recordUserName: '', + recordTime: '', + foundDepartment: '', + actionsTime: '', + correctTime: '', + notifyCustomer: '', + backToWork: '', + qualityManagerUserName: '', + qualityManagerTime: '', + }, + }; + }, + // 鏂规硶闆嗗悎 + methods: { + openDia (row) { + this.formDia = true + this.searchInfo(row) + }, + // 鏌ヨ鐩戞帶璁″垝璇︽儏瀹炴柦淇℃伅 + searchInfo (row) { + this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId + this.$axios.get(this.$api.qualitySupervise.getSuperviseDetailAccording + '?superviseDetailsId=' + row.superviseDetailsId).then(res => { + if (res.code === 201) return + this.form = res.data + }).catch(err => { + console.log('err---', err); + }) + }, + // 鍏抽棴寮规 + closeProcessingDia () { + this.formDia = false + }, + } +}; +</script> + +<style scoped> +>>>.el-dialog { + margin: 5vh auto 50px !important; +} +.tables { + table-layout: fixed; + width: 100%; + margin-top: 10px; +} +.first-title { + display: table-cell; + width: 100px; /* 璁剧疆涓�涓浐瀹氬搴� */ + height: 200px; /* 璁剧疆涓�涓浐瀹氶珮搴� */ + text-align: center; /* 姘村钩灞呬腑 */ + vertical-align: middle; /* 鍨傜洿灞呬腑 */ + writing-mode: vertical-rl; /* 鏂囧瓧绔栫洿鎺掑垪 */ + padding: 10px 0; +} +.td-title { + height: 40px; + width: 170px; + text-align: center; + font-size: 14px; + word-wrap: break-word; + white-space: normal; + padding: 6px; +} +.td-info { + padding: 10px; +} +.td-info1 { + display: inline-block; + width: 100%; + text-align: left; + font-size: 14px; + word-wrap: break-word; + white-space: normal; +} +</style> diff --git a/src/components/do/a8-corrective-action/ViewTestRecord.vue b/src/components/do/a8-corrective-action/ViewTestRecord.vue new file mode 100644 index 0000000..6b297aa --- /dev/null +++ b/src/components/do/a8-corrective-action/ViewTestRecord.vue @@ -0,0 +1,190 @@ +<template> + <div> + <el-dialog :visible.sync="filesDialogVisible" title="闄勪欢" width="80%" @closed="closeFilesLook"> + <div style="display: flex;justify-content: space-between;"> + <el-upload ref='upload' + :action="fileAction" + :auto-upload="true" + :before-upload="fileBeforeUpload" + :data="{superviseDetailsCorrectId: info.superviseDetailsCorrectId}" + :headers="headers" :on-error="onError" + :on-success="handleSuccessUp" + :show-file-list="false" + accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' style="width: 80px !important;"> + <el-button size="small" style="height: 38px" type="primary">闄勪欢涓婁紶</el-button> + </el-upload> + </div> + <div> + <ZTTable + ref="yearTable" + :column="columnData" + :height="'calc(100vh - 30em)'" + :highlightCurrentRow="true" + :table-data="tableData" + :table-loading="tableLoading" + style="margin-top: 0.5em;"> + </ZTTable> + </div> + </el-dialog> + <el-dialog + :visible.sync="lookDialogVisible" + fullscreen + title="鏌ョ湅闄勪欢" top="5vh" width="800px"> + <filePreview v-if="lookDialogVisible" :currentFile="{}" + :fileUrl="javaApi+'/word/'+currentInfo.fileUrl" style="height: 90vh;overflow-y: auto;"/> + </el-dialog> + </div> +</template> + +<script> +import ZTTable from '../../caorui/ZTTable/index.vue'; +import file from "../../../util/file"; +import filePreview from '../../tool/file-preview.vue'; + +export default { + name: 'ViewTestRecord', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: { filePreview, ZTTable }, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + filesDialogVisible: false, + tableLoading: false, + filesLookInfo: {}, + columnData: [ + { + label: '鏂囦欢鍚嶇О', + prop: 'fileName', + minWidth: '150px' + }, + { + dataType: 'action', + minWidth: '100', + label: '鎿嶄綔', + fixed: 'right', + operation: [ + { + name: '棰勮', + type: 'text', + clickFun: (row) => { + this.handleLook(row) + } + }, + { + name: '涓嬭浇', + type: 'text', + clickFun: (row) => { + this.upload(row) + } + }, + { + name: '鍒犻櫎', + type: 'text', + color: '#f56c6c', + clickFun: (row) => { + this.delete(row) + } + } + ] + } + ], + tableData: [], + info: {}, + currentInfo:{}, + lookDialogVisible: false, + }; + }, + // 鏂规硶闆嗗悎 + methods: { + openDia(row) { + this.filesDialogVisible = true + this.info = row + this.searchTableList() + }, + // 鏌ヨ闄勪欢鍒楄〃 + searchTableList () { + this.tableLoading = true + this.$axios.get(this.$api.qualitySupervise.getSuperviseDetailCorrectFileList + '?superviseDetailsCorrectId=' + this.info.superviseDetailsCorrectId).then(res => { + this.tableLoading = false + if (res.code === 201) return + this.tableData = res.data + }).catch(err => { + this.tableLoading = false + console.log('err---', err); + }) + }, + closeFilesLook () { + this.filesDialogVisible = false + }, + // 鏌ョ湅鏂囦欢 + handleLook(row){ + this.currentInfo = row + this.lookDialogVisible = true + }, + // 涓嬭浇 + upload (row) { + let url = ''; + if(row.type==1){ + url = this.javaApi+'/img/'+row.fileUrl + file.downloadIamge(url,row.fileName) + }else{ + url = this.javaApi+'/word/'+row.fileUrl + const link = document.createElement('a'); + link.href = url; + link.download = row.fileName; + link.click(); + } + }, + // 鍒犻櫎 + delete (row) { + this.tableLoading = true + this.$axios.get(this.$api.qualitySupervise.delSuperviseDetailCorrectFile + '?superviseDetailsCorrectFileId=' + row.superviseDetailsCorrectFileId).then(res => { + this.tableLoading = false + if (res.code === 201) return + this.$message.success('鍒犻櫎鎴愬姛') + this.searchTableList() + }).catch(err => { + this.tableLoading = false + console.log('err---', err); + }) + }, + // 涓婁紶楠岃瘉 + fileBeforeUpload(file) { + let flag = true + if (file.size > 1024 * 1024 * 10) { + this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M'); + this.$refs.upload.clearFiles() + flag = false + } + if (!flag) { + return Promise.reject(flag); //姝g‘鐨勭粓姝� + } + }, + onError(err, file, fileList,type) { + this.$message.error('涓婁紶澶辫触') + this.$refs.upload.clearFiles() + }, + handleSuccessUp(response, ) { + this.upLoading = false; + if (response.code == 200) { + this.$message.success('涓婁紶鎴愬姛'); + this.searchTableList() + } + }, + }, + computed: { + headers() { + return { + 'token': sessionStorage.getItem('token') + } + }, + fileAction() { + return this.javaApi + this.$api.qualitySupervise.uploadSuperviseDetailCorrectFile + + } + }, +}; +</script> + +<style scoped> +</style> diff --git a/src/components/do/a8-corrective-action/correctiveInfo.vue b/src/components/do/a8-corrective-action/correctiveInfo.vue new file mode 100644 index 0000000..a0d4f84 --- /dev/null +++ b/src/components/do/a8-corrective-action/correctiveInfo.vue @@ -0,0 +1,232 @@ +<template> + <div> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" + :visible.sync="formDia" + title="绾犳鎺柦澶勭悊鍗�" + width="60%" @close="closeProcessingDia"> + <div style="height: 85vh; overflow-y: auto"> + <table border="1" cellspacing="10" class="tables"> + <tr> + <td class="td-title"> + <p>涓嶅悎鏍兼垨鍋忕浜嬪疄鐨勬弿杩帮細</p> + </td> + <td class="td-info" colspan="3"> + <span class="td-info1"> {{ form.raiseResult }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p>鎻愬嚭浜猴細</p> + </td> + <td class="td-info"> + {{form.raiseUserName}} + </td> + <td class="td-title"> + <p>鎻愬嚭閮ㄩ棬锛�</p> + </td> + <td class="td-info"> + {{form.raiseDepartment}} + </td> + </tr> + <tr> + <td class="td-title"> + <p>鏃ユ湡锛�</p> + </td> + <td class="td-info" colspan="3"> + {{form.raiseTime}} + </td> + </tr> + <tr> + <td class="td-title"> + <p>鍘熷洜鍒嗘瀽锛�</p> + </td> + <td class="td-info" colspan="3"> + <span class="td-info1"> {{ form.causeResult }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p>鍘熷洜鍒嗘瀽浜猴細</p> + </td> + <td class="td-info"> + {{form.causeUserName}} + </td> + <td class="td-title"> + <p>璐d换閮ㄩ棬锛�</p> + </td> + <td class="td-info"> + {{form.causeDepartment}} + </td> + </tr> + <tr> + <td class="td-title"> + <p>鍘熷洜鍒嗘瀽鏃ユ湡锛�</p> + </td> + <td class="td-info" colspan="3"> + {{form.causeTime}} + </td> + </tr> + <tr> + <td class="td-title"> + <p>绾犳鎺柦锛�</p> + </td> + <td class="td-info" colspan="3"> + <span class="td-info1"> {{ form.correctResult }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p>鎻愬嚭瑕佹眰閮ㄩ棬纭锛�</p> + </td> + <td class="td-info" colspan="3"> + <span class="td-info1"> {{ form.raiseDepartmentAffirm }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p>绾犳浜猴細</p> + </td> + <td class="td-info"> + {{form.correctUserName}} + </td> + <td class="td-title"> + <p>璐d换閮ㄩ棬锛�</p> + </td> + <td class="td-info"> + {{form.correctDepartment}} + </td> + </tr> + <tr> + <td class="td-title"> + <p>绾犳鏃ユ湡锛�</p> + </td> + <td class="td-info" colspan="3"> + {{form.correctTime}} + </td> + </tr> + <tr> + <td class="td-title"> + <p>瀹炴柦楠岃瘉缁撴灉锛�</p> + </td> + <td class="td-info" colspan="3"> + <span class="td-info1"> {{ form.validationResult }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p>楠岃瘉浜猴細</p> + </td> + <td class="td-info"> + {{form.validationUserName}} + </td> + <td class="td-title"> + <p>璐d换閮ㄩ棬锛�</p> + </td> + <td class="td-info"> + {{form.validationDepartment}} + </td> + </tr> + <tr> + <td class="td-title"> + <p>楠岃瘉鏃ユ湡锛�</p> + </td> + <td class="td-info" colspan="3"> + {{form.validationTime}} + </td> + </tr> + </table> + </div> + </el-dialog> + </div> +</template> + +<script> +export default { + name: 'correctiveInfo', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {}, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + formDia: false, + form: { + superviseDetailsId: '', + raiseResult: '', + vdeRaiseResult: '', + causeUserId: '', + raiseUserName: '', + raiseDepartment: '', + raiseTime: '', + causeResult: '', + causeUserName: '', + causeDepartment: '', + causeTime: '', + correctUserId: '', + correctResult: '', + raiseDepartmentAffirm: '', + correctUserName: '', + correctDepartment: '', + correctTime: '', + validationUserId: '', + validationResult: '', + validationUserName: '', + validationDepartment: '', + validationTime: '', + }, + }; + }, + // 鏂规硶闆嗗悎 + methods: { + openDia (row) { + this.formDia = true + this.searchInfo(row) + this.form.superviseDetailsId = row.superviseDetailsId + }, + // 鏌ヨ鐩戞帶璁″垝璇︽儏瀹炴柦淇℃伅 + searchInfo (row) { + this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId + this.$axios.get(this.$api.qualitySupervise.getSuperviseDetailCorrect + '?superviseDetailsId=' + row.superviseDetailsId).then(res => { + if (res.code === 201) return + this.form = res.data + }).catch(err => { + console.log('err---', err); + }) + }, + // 鍏抽棴寮规 + closeProcessingDia () { + this.formDia = false + }, + } +}; +</script> + +<style scoped> +>>>.el-dialog { + margin: 5vh auto 50px !important; +} +.tables { + table-layout: fixed; + width: 100%; + margin-top: 10px; +} +.td-title { + height: 40px; + width: 170px; + text-align: center; + font-size: 14px; + word-wrap: break-word; + white-space: normal; + padding: 6px; +} +.td-info { + padding: 6px; +} +.td-info1 { + display: inline-block; + width: 100%; + text-align: left; + font-size: 14px; + word-wrap: break-word; + white-space: normal; +} +</style> diff --git a/src/components/view/a8-corrective-action.vue b/src/components/view/a8-corrective-action.vue new file mode 100644 index 0000000..98cb39d --- /dev/null +++ b/src/components/view/a8-corrective-action.vue @@ -0,0 +1,221 @@ +<template> + <div> + <div> + <div class="view-title"> + <span>绾犳鎺柦</span> + </div> + <div class="search-background"> + <span class="search-group"> + <span style="width: 150px">涓嶅悎鏍兼弿杩帮細</span> + <el-input v-model="searchForm.raiseResult" clearable size="small"></el-input> + </span> + <span class="search-group"> + <el-button size="medium" @click="resetSearchForm">閲� 缃�</el-button> + <el-button size="medium" type="primary" @click="searchList">鏌� 璇�</el-button> + </span> + </div> + <div class="table"> + <div> + <TableCard :showForm="false" :showTitle="false"> + <template v-slot:table> + <ZTTable + :column="tableColumn" + :height="'calc(100vh - 23em)'" + :table-data="tableData" + :table-loading="tableLoading" + style="padding: 0 15px;margin-bottom: 16px"> + </ZTTable> + </template> + </TableCard> + <el-pagination :current-page="1" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]" + :total="total" layout="->,total, sizes, prev, pager, next, jumper" + @size-change="handleSizeChange" + @current-change="handleCurrentChange"> + </el-pagination> + </div> + </div> + </div> + <corrective-info v-if="correctiveInfo" ref="correctiveInfo"></corrective-info> + <ViewTestRecord v-if="viewTestRecordDialog" ref="viewTestRecordDialog"></ViewTestRecord> + </div> +</template> + +<script> +import TableCard from '../caorui/TableCard/index.vue'; +import ZTTable from '../caorui/ZTTable/index.vue'; +import CorrectiveInfo from '../do/a8-corrective-action/correctiveInfo.vue'; +import QualityInfo from '../do/a7-nonconforming-item/qualityInfo.vue'; +import ViewTestRecord from '../do/a8-corrective-action/ViewTestRecord.vue'; + +export default { + name: 'a8-corrective-action', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: { QualityInfo, CorrectiveInfo, ZTTable, TableCard, ViewTestRecord }, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + searchForm: { + raiseResult: '', + }, + tableColumn: [ + { + label: '涓嶅悎鏍兼垨鍋忕浜嬪疄鐨勬弿杩�', + prop: 'raiseResult', + minWidth: '100' + }, + { + label: '鍘熷洜鍒嗘瀽', + prop: 'causeResult', + minWidth: '100' + }, + { + label: '绾犳鎺柦', + prop: 'correctResult', + minWidth: '100' + }, + { + label: '瀹炴柦楠岃瘉缁撴灉', + prop: 'validationResult', + minWidth: '100' + }, + { + dataType: 'action', + minWidth: '60', + label: '鎿嶄綔', + operation: [ + { + name: '鏌ョ湅', + type: 'text', + clickFun: (row) => { + this.viewInfo(row); + }, + }, + { + name: '瀵煎嚭', + type: 'text', + clickFun: (row) => { + this.handleDown(row) + } + }, + { + name: '鏌ョ湅闄勪欢', + type: 'text', + clickFun: (row) => { + this.viewFiles(row); + }, + }, + ] + } + ], + tableData: [], + tableLoading: false, + page: { + size: 20, + current: 1, + }, + total: 0, + correctiveInfo: false, + viewTestRecordDialog: false, + }; + }, + mounted() { + this.searchList() + }, + // 鏂规硶闆嗗悎 + methods: { + // 鏌ヨ鍒楄〃 + searchList() { + const entity = { + raiseResult: this.searchForm.raiseResult, + } + const page = this.page + this.tableLoading = true + this.$axios.post(this.$api.qualitySupervise.pageSuperviseDetailCorrect, { entity, page }, { + headers: { + "Content-Type": "application/json" + }, + noQs: true + }).then(res => { + this.tableLoading = false + if (res.code === 201) return + this.tableData = res.data.records + this.total = res.data.total + }).catch(err => { + console.log('err---', err); + this.tableLoading = false + }) + }, + // 瀵煎嚭 + handleDown (row) { + this.$axios.get(this.$api.qualitySupervise.exportSuperviseDetaillCorrect + '?superviseDetailsCorrectId=' + row.superviseDetailsCorrectId,{responseType: "blob"}).then(res => { + this.outLoading = false + this.$message.success('瀵煎嚭鎴愬姛') + const blob = new Blob([res],{ type: 'application/msword' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = '鐩戠潱绾犳鎺柦' + '.docx'; + link.click(); + }) + }, + // 閲嶇疆鏌ヨ鏉′欢 + resetSearchForm() { + this.searchForm.raiseResult = ''; + this.searchList() + }, + // 鏌ョ湅璇︽儏 + viewInfo (row) { + this.correctiveInfo = true + this.$nextTick(() => { + this.$refs.correctiveInfo.openDia(row) + }) + }, + // 鏌ョ湅闄勪欢 + viewFiles (row) { + this.viewTestRecordDialog = true + this.$nextTick(() => { + this.$refs.viewTestRecordDialog.openDia(row) + }) + }, + // 鍒嗛〉 + handleSizeChange(val) { + this.page.size = val; + this.searchList(); + }, + handleCurrentChange(val) { + this.page.current = val; + this.searchList(); + }, + } +}; +</script> + +<style scoped> +.view-title { + display: flex; + justify-content: space-between; + align-items: center; + height: 60px; + padding-left: 20px; +} + +.search-background { + width: 100%; + height: 80px; + line-height: 80px; + background-color: #ffffff; + display: flex; +} + +.search-group { + display: flex; + align-items: center; + margin: 0 20px; +} + +.table { + margin-top: 20px; + background-color: #ffffff; + padding-top: 20px; +} +</style> -- Gitblit v1.9.3