From c43faa47954d820d3b92eb1db113197e4bea67a4 Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期一, 24 二月 2025 11:42:00 +0800 Subject: [PATCH] 纠正措施搬迁 --- src/views/structural/premises/index.vue | 12 src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue | 9 src/views/CNAS/systemManagement/correctiveAction/components/ViewTestRecord.vue | 169 ++++++++++++ src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue | 12 src/views/CNAS/systemManagement/documentControl/components/FileList.vue | 11 src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue | 8 src/views/business/inspectionTask/inspection.vue | 10 src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue | 11 src/api/cnas/systemManagement/correctiveAction.js | 59 ++++ src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue | 12 src/views/CNAS/systemManagement/correctiveAction/components/correctiveInfo.vue | 258 ++++++++++++++++++ src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue | 12 src/views/CNAS/systemManagement/customerSatisfaction/index.vue | 8 src/main.js | 6 src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue | 10 src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue | 12 src/views/CNAS/systemManagement/correctiveAction/index.vue | 202 ++++++++++++++ 17 files changed, 722 insertions(+), 99 deletions(-) diff --git a/src/api/cnas/systemManagement/correctiveAction.js b/src/api/cnas/systemManagement/correctiveAction.js new file mode 100644 index 0000000..ebd9f5c --- /dev/null +++ b/src/api/cnas/systemManagement/correctiveAction.js @@ -0,0 +1,59 @@ +// 绾犳鎺柦鐩稿叧鎺ュ彛 +import request from "@/utils/request"; + +//鏌ヨ鐩戠潱绾犳鎺柦鍒楄〃 +export function pageSuperviseDetailCorrect(query) { + return request({ + url: "/qualitySupervise/pageSuperviseDetailCorrect", + method: "get", + params: query, + }); +} + +//瀵煎嚭鐩戠潱绾犳鎺柦 +export function exportSuperviseDetaillCorrect(query) { + return request({ + url: "/qualitySupervise/exportSuperviseDetaillCorrect", + method: "get", + headers: { + responseType: "blob", + }, + params: query, + }); +} + +//鏌ヨ鐩戠潱绾犳鎺柦闄勪欢 +export function getSuperviseDetailCorrectFileList(query) { + return request({ + url: "/qualitySupervise/getSuperviseDetailCorrectFileList", + method: "get", + params: query, + }); +} + +//鍒犻櫎鐩戠潱绾犳鎺柦闄勪欢 +export function delSuperviseDetailCorrectFile(query) { + return request({ + url: "/qualitySupervise/delSuperviseDetailCorrectFile", + method: "delete", + params: query, + }); +} + +//鏌ヨ鐩戠潱绾犳澶勭悊 +export function getSuperviseDetailCorrect(query) { + return request({ + url: "/qualitySupervise/getSuperviseDetailCorrect", + method: "get", + params: query, + }); +} + +//鏌ヨ浠婂勾浜哄憳鍩硅淇℃伅 +export function getThisYearTrainingDetailed(query) { + return request({ + url: "/personTraining/getThisYearTrainingDetailed", + method: "get", + params: query, + }); +} diff --git a/src/main.js b/src/main.js index 9ae30ea..28883c0 100644 --- a/src/main.js +++ b/src/main.js @@ -48,6 +48,7 @@ // 瀛楀吀鏁版嵁缁勪欢 import DictData from "@/components/DictData"; import { checkPermi } from "@/utils/permission"; // 鏉冮檺鍒ゆ柇鍑芥暟 +import { getToken } from "@/utils/auth"; // 鍏ㄥ眬鏂规硶鎸傝浇 Vue.prototype.getDicts = getDicts; @@ -65,8 +66,11 @@ }; Vue.prototype.javaApi = process.env.VUE_APP_BASE_API ? process.env.VUE_APP_BASE_API - : "http://192.168.1.36:8002"; + : "http://192.168.0.170:8002"; Vue.prototype.checkPermi = checkPermi; +Vue.prototype.uploadHeader = { + Authorization: "Bearer " + getToken(), +}; // 鍏ㄥ眬缁勪欢鎸傝浇 Vue.component("DictTag", DictTag); diff --git a/src/views/CNAS/systemManagement/correctiveAction/components/ViewTestRecord.vue b/src/views/CNAS/systemManagement/correctiveAction/components/ViewTestRecord.vue new file mode 100644 index 0000000..3c6a5bd --- /dev/null +++ b/src/views/CNAS/systemManagement/correctiveAction/components/ViewTestRecord.vue @@ -0,0 +1,169 @@ +<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="uploadHeader" + :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> + <limsTable ref="yearTable" :column="columnData" :height="'calc(100vh - 30em)'" :highlightCurrentRow="true" + :table-data="tableData" :table-loading="tableLoading" style="margin-top: 0.5em;"> + </limsTable> + </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 limsTable from "@/components/Table/lims-table.vue"; +import filePreview from '@/components/Preview/filePreview.vue' +import { + getSuperviseDetailCorrectFileList, + delSuperviseDetailCorrectFile, +} from '@/api/cnas/systemManagement/correctiveAction.js' +export default { + name: 'ViewTestRecord', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: { filePreview, limsTable }, + 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 + 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 + this.$download.saveAs(url, row.fileName); + } else { + url = this.javaApi + '/word/' + row.fileUrl + this.$download.saveAs(url, row.fileName); + } + }, + // 鍒犻櫎 + delete(row) { + this.tableLoading = true + 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: { + fileAction() { + return this.javaApi + '/qualitySupervise/uploadSuperviseDetailCorrectFile' + + } + }, +}; +</script> + +<style scoped></style> diff --git a/src/views/CNAS/systemManagement/correctiveAction/components/correctiveInfo.vue b/src/views/CNAS/systemManagement/correctiveAction/components/correctiveInfo.vue new file mode 100644 index 0000000..16d0d92 --- /dev/null +++ b/src/views/CNAS/systemManagement/correctiveAction/components/correctiveInfo.vue @@ -0,0 +1,258 @@ +<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: 660px; overflow-y: auto"> + <table border="1" cellspacing="10" class="tables"> + <tr> + <td class="td-title"> + <p>鍩硅璁″垝锛�</p> + </td> + <td class="td-info" colspan="3"> + <el-select v-model="form.personTrainingDetailedId" clearable filterable style="width: 100%" disabled + placeholder="璇烽�夋嫨" size="small"> + <el-option v-for="item in yearTrainingDetailed" :key="item.id" :label="item.trainingObjectives" + :value="item.id"> + </el-option> + </el-select> + </td> + </tr> + <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> +import { + getSuperviseDetailCorrect, + getThisYearTrainingDetailed, +} from '@/api/cnas/systemManagement/correctiveAction.js' +export default { + name: 'correctiveInfo', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {}, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + formDia: false, + yearTrainingDetailed: [], + 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 + this.getYearTrainingDetailed() // 鑾峰彇鍩硅璁″垝 + }, + // 鏌ヨ鐩戞帶璁″垝璇︽儏瀹炴柦淇℃伅 + searchInfo(row) { + this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId + getSuperviseDetailCorrect({ superviseDetailsId: row.superviseDetailsId }).then(res => { + if (res.code === 201) return + this.form = res.data + }).catch(err => { + console.log('err---', err); + }) + }, + getYearTrainingDetailed() { + getThisYearTrainingDetailed().then(res => { + this.yearTrainingDetailed = res.data + }) + }, + // 鍏抽棴寮规 + 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/views/CNAS/systemManagement/correctiveAction/index.vue b/src/views/CNAS/systemManagement/correctiveAction/index.vue new file mode 100644 index 0000000..85c46e0 --- /dev/null +++ b/src/views/CNAS/systemManagement/correctiveAction/index.vue @@ -0,0 +1,202 @@ +<template> + <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="small" @click="resetSearchForm">閲� 缃�</el-button> + <el-button size="small" type="primary" @click="searchList">鏌� 璇�</el-button> + </span> + </div> + <div class="table"> + <div> + <TableCard :showForm="false" :showTitle="false"> + <template v-slot:table> + <limsTable :column="tableColumn" :height="'calc(100vh - 17em)'" :table-data="tableData" + :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" @pagination="pagination"> + </limsTable> + </template> + </TableCard> + </div> + </div> + <corrective-info v-if="correctiveInfo" ref="correctiveInfo"></corrective-info> + <ViewTestRecord v-if="viewTestRecordDialog" ref="viewTestRecordDialog"></ViewTestRecord> + </div> +</template> + +<script> +import TableCard from '@/components/TableCard/index.vue'; +import limsTable from "@/components/Table/lims-table.vue"; +import CorrectiveInfo from './components/correctiveInfo.vue'; +// import QualityInfo from '../do/a7-nonconforming-item/qualityInfo.vue'; +import ViewTestRecord from './components/ViewTestRecord.vue'; +import { + pageSuperviseDetailCorrect, + exportSuperviseDetaillCorrect, +} from '@/api/cnas/systemManagement/correctiveAction.js' + +export default { + name: 'a8-corrective-action', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: { + // QualityInfo, + CorrectiveInfo, + limsTable, + 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 + pageSuperviseDetailCorrect({ ...entity, ...page }).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) { + exportSuperviseDetaillCorrect({ superviseDetailsCorrectId: row.superviseDetailsCorrectId }).then(res => { + this.outLoading = false + this.$message.success('瀵煎嚭鎴愬姛') + const blob = new Blob([res], { type: 'application/msword' }); + this.$download.saveAs(blob, '鐩戠潱绾犳鎺柦' + '.docx'); + }) + }, + // 閲嶇疆鏌ヨ鏉′欢 + 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) + }) + }, + pagination({ page, limit }) { + this.page.current = page; + this.page.size = limit; + 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 { + background-color: #ffffff; +} +</style> diff --git a/src/views/CNAS/systemManagement/customerSatisfaction/index.vue b/src/views/CNAS/systemManagement/customerSatisfaction/index.vue index 3a898cd..7b76b7c 100644 --- a/src/views/CNAS/systemManagement/customerSatisfaction/index.vue +++ b/src/views/CNAS/systemManagement/customerSatisfaction/index.vue @@ -17,7 +17,7 @@ <div class="btn"> <el-button v-if="tabIndex === '0'" size="small" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button> <el-upload v-if="tabIndex === '1'" ref='upload' :action="action" :before-upload="beforeUpload" - :headers="headers" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" + :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'> <el-button :loading="upLoading" size="small" type="primary">瀵煎叆</el-button> </el-upload> @@ -69,7 +69,6 @@ delClientSatisfaction, delAnalyseFile, } from '@/api/cnas/systemManagement/customerSatisfaction.js' -import { getToken } from "@/utils/auth"; export default { name: 'a8-customer-satisfaction', @@ -358,11 +357,6 @@ }, // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� computed: { - headers() { - return { - 'Authorization': "Bearer " + getToken() - } - }, action() { return this.javaApi + '/clientSatisfaction/uploadAnalyseFile' } diff --git a/src/views/CNAS/systemManagement/documentControl/components/FileList.vue b/src/views/CNAS/systemManagement/documentControl/components/FileList.vue index b3d2158..7a88db6 100644 --- a/src/views/CNAS/systemManagement/documentControl/components/FileList.vue +++ b/src/views/CNAS/systemManagement/documentControl/components/FileList.vue @@ -21,8 +21,9 @@ <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button> </div> <div class="btns" style="padding-left: 30px;"> - <el-upload :action="action" :multiple="false" accept='.xls,.xlsx' :headers="headers" :on-change="beforeUpload" - :on-error="onError" ref='upload' :on-success="handleSuccessUp" :show-file-list="false"> + <el-upload :action="action" :multiple="false" accept='.xls,.xlsx' :headers="uploadHeader" + :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp" + :show-file-list="false"> <el-button size="small" type="primary" :loading="upLoading">瀵煎叆</el-button></el-upload> </div> </div> @@ -96,7 +97,6 @@ delManageDocumentList, doManageDocumentList, } from '@/api/cnas/systemManagement/documentControl.js' -import { getToken } from "@/utils/auth"; export default { components: { UpPdfStamp, @@ -201,11 +201,6 @@ }, // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� computed: { - headers() { - return { - 'Authorization': "Bearer " + getToken() - } - }, action() { return this.javaApi + '/manageDocumentList/exportManageDocumentList' } diff --git a/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue b/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue index c405704..7e956bd 100644 --- a/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue +++ b/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue @@ -20,9 +20,9 @@ </div> <div class="btn"> <el-button size="small" type="primary" @click="openAdd('鏂板')">鏂板</el-button> - <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers" - :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp" - style="display:inline-block;margin-left: 20px;"> + <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' + :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload' + :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> <el-button type="primary" size="small">瀵煎叆</el-button></el-upload> <el-button size="small" type="primary" @click="handleDown" :loading="outLoading" style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button> @@ -83,7 +83,6 @@ <script> import limsTable from "@/components/Table/lims-table.vue"; -import { getToken } from "@/utils/auth"; import { selectUserCondition, } from "@/api/business/inspectionTask.js"; @@ -186,11 +185,6 @@ }, // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� computed: { - headers() { - return { - 'Authorization': "Bearer " + getToken() - } - }, action() { return this.javaApi + '/manageRecordCheck/exportInManageRecordCheck' } diff --git a/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue b/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue index fb8d415..e766d78 100644 --- a/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue +++ b/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue @@ -20,9 +20,9 @@ </div> <div class="btn"> <el-button size="small" type="primary" @click="openAdd">鏂板</el-button> - <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers" - :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp" - style="display:inline-block;margin-left: 20px;"> + <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' + :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload' + :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> <el-button type="primary" size="small">瀵煎叆</el-button></el-upload> <el-button size="small" type="primary" @click="handleDown" :loading="outLoading" style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button> @@ -86,7 +86,6 @@ <script> import limsTable from "@/components/Table/lims-table.vue"; -import { getToken } from "@/utils/auth"; import { selectUserCondition, } from "@/api/business/inspectionTask.js"; @@ -181,11 +180,6 @@ }, // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� computed: { - headers() { - return { - 'Authorization': "Bearer " + getToken() - } - }, action() { return this.javaApi + '/manageRecordCancel/exportInManageRecordCancel' } diff --git a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue index 874abfc..f4fcca0 100644 --- a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue +++ b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue @@ -20,9 +20,9 @@ </div> <div class="btn"> <el-button size="small" type="primary" @click="openAdd">鏂板</el-button> - <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers" - :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp" - style="display:inline-block;margin-left: 20px;"> + <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' + :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload' + :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> <el-button type="primary" size="small">瀵煎叆</el-button></el-upload> <el-button size="small" type="primary" @click="handleDown" :loading="outLoading" style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button> @@ -133,7 +133,6 @@ import { getYearAndMonthAndDays } from '@/utils/date' -import { getToken } from "@/utils/auth"; import { selectUserCondition, } from "@/api/business/inspectionTask.js"; @@ -232,11 +231,6 @@ }, // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� computed: { - headers() { - return { - 'Authorization': "Bearer " + getToken() - } - }, action() { return this.javaApi + '/manageRecordIssueRecycle/exportInManageRecordIssueRecycle' }, diff --git a/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue b/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue index afb2003..23651f0 100644 --- a/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue +++ b/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue @@ -5,9 +5,9 @@ <el-tab-pane label="濉啓" name="濉啓" style="height: 100%;"> <div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 20px;"> <el-button size="small" type="primary" @click="openAdd('鏂板')" style="margin-left: 20px;">鏂板</el-button> - <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers" - :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp" - style="display:inline-block;margin-left: 20px;"> + <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' + :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload' + :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> <el-button size="small" type="primary" :loading="upLoading">瀵煎叆</el-button></el-upload> </div> <div class="table" style="height: calc(100% - 200px)"> @@ -96,7 +96,6 @@ import limsTable from "@/components/Table/lims-table.vue"; import filePreview from '@/components/Preview/filePreview.vue' import ValueTable from '@/components/Table/value-table.vue' -import { getToken } from "@/utils/auth"; import { addManageRecordVerify, pageManageRecordVerify, @@ -244,11 +243,6 @@ }, // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� computed: { - headers() { - return { - 'Authorization': "Bearer " + getToken() - } - }, action() { return this.javaApi + '/manageRecordVerify/exportManageRecordVerify' } diff --git a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue index f0ec6cd..7c738f8 100644 --- a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue +++ b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue @@ -22,9 +22,9 @@ </div> <div class="btns"> <el-button size="small" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button> - <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers" - :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" - style="display:inline-block;margin-left: 20px;"> + <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' + :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower" + :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> <el-button type="primary" size="small">瀵煎叆</el-button></el-upload> </div> </div> @@ -386,11 +386,6 @@ }, // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� computed: { - headers() { - return { - 'Authorization': "Bearer " + getToken() - } - }, action() { return this.javaApi + '/manageRecordIntervals/exportInManageRecordIntervals' } diff --git a/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue b/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue index f0c97d8..07629ec 100644 --- a/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue +++ b/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue @@ -6,8 +6,8 @@ <el-button type="primary" size="small" @click="addFun">鏂� 澧�</el-button> <el-button type="primary" size="small" @click="approvalFun">瀹� 鎵�</el-button> <el-button type="primary" size="small" @click="approveFun">鎵� 鍑�</el-button> - <el-upload style="display: inline-block; padding: 0 6px" :headers="headers" :action="action" :on-error="onError" - :show-file-list="false" :on-success="onSuccess"> + <el-upload style="display: inline-block; padding: 0 6px" :headers="uploadHeader" :action="action" + :on-error="onError" :show-file-list="false" :on-success="onSuccess"> <el-button size="small" type="primary">瀵� 鍏�</el-button> </el-upload> <el-button size="small" @click="openDownloadDia">瀵煎嚭</el-button> @@ -149,11 +149,6 @@ } }, computed: { - headers() { - return { - 'Authorization': "Bearer " + getToken() - } - }, action() { return this.javaApi + '/manageRiskAssessmentResults/riskAssessmentImport' }, diff --git a/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue b/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue index 57ed36d..33adb1f 100644 --- a/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue +++ b/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue @@ -6,8 +6,8 @@ <el-button type="primary" size="small" @click="addFun">鏂� 澧�</el-button> <el-button type="primary" size="small" @click="approvalFun">瀹� 鎵�</el-button> <el-button type="primary" size="small" @click="approveFun">鎵� 鍑�</el-button> - <el-upload style="display: inline-block; padding: 0 6px" :action="action" :headers="headers" :on-error="onError" - :show-file-list="false" :on-success="onSuccess"> + <el-upload style="display: inline-block; padding: 0 6px" :action="action" :headers="uploadHeader" + :on-error="onError" :show-file-list="false" :on-success="onSuccess"> <el-button size="small" type="primary">瀵� 鍏�</el-button> </el-upload> <el-button size="small" @click="openDownloadDia">瀵煎嚭</el-button> @@ -96,7 +96,6 @@ </template> <script> -import { getToken } from "@/utils/auth"; import { getPageList, riskAnalysisApprovalOfControlPlanChecklist, @@ -121,11 +120,6 @@ } }, computed: { - headers() { - return { - 'Authorization': "Bearer " + getToken() - } - }, action() { return this.javaApi + '/manageControlPlanList/importControlPlanList' }, diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue index 9b70b4e..bf4b3d9 100644 --- a/src/views/business/inspectionTask/inspection.vue +++ b/src/views/business/inspectionTask/inspection.vue @@ -291,7 +291,7 @@ state == 1 "><span :style="`font-family:${n.v.ff} !important;`">{{ toFixed(n.v.v, n.v.ct) - }}</span></template> + }}</span></template> <template v-else-if=" n.v.ps != undefined && n.v.ps.value === '鏈�缁堝��' && @@ -338,7 +338,7 @@ </div> <el-upload v-if="state == 1" ref="upload" :action="action" :before-upload="beforeUpload" :data="{ orderId: id, - }" :headers="headers" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" + }" :headers="uploadHeader" :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;margin-top: 10px;"> <el-button v-if="state == 1" size="small" type="primary">闄勪欢涓婁紶</el-button></el-upload> @@ -546,7 +546,6 @@ import DataWorker from '../../../DataWorker.worker'; import html2canvas from "html2canvas"; import { mapGetters } from "vuex"; -import { getToken } from "@/utils/auth"; export default { name: 'inspection', components: { @@ -770,11 +769,6 @@ // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� computed: { ...mapGetters(["userId"]), - headers() { - return { - 'Authorization': "Bearer " + getToken() - }; - }, action() { return this.javaApi + "/insOrderPlan/uploadFile"; }, diff --git a/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue b/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue index 5b90f8e..2fb5e0a 100644 --- a/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue +++ b/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue @@ -9,7 +9,7 @@ <el-upload :action="action" :auto-upload="true" :data="{ orderId: dataVisibleIndex === 0 ? filesLookInfo.enterOrderId : filesLookInfo.quarterOrderId }" :on-success="handleSuccessUp" :show-file-list="false" - accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="headers" + accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="uploadHeader" :before-upload="beforeUpload" style="width: 80px !important;" :on-error="onError" ref='upload'> <el-button size="small" type="primary" style="height: 38px">闄勪欢涓婁紶</el-button> </el-upload> @@ -27,7 +27,6 @@ import file from "@/utils/file"; import limsTable from "@/components/Table/lims-table.vue"; import { delfile, downFile, getFileList } from "@/api/business/rawMaterialOrder"; -import { getToken } from "@/utils/auth"; export default { name: "filesLookVisible", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� @@ -221,11 +220,6 @@ } }, computed: { - headers() { - return { - 'Authorization': "Bearer " + getToken() - } - }, action() { return this.javaApi + '/insOrderPlan/uploadFile' } diff --git a/src/views/structural/premises/index.vue b/src/views/structural/premises/index.vue index 8ff0e53..1c3ccca 100644 --- a/src/views/structural/premises/index.vue +++ b/src/views/structural/premises/index.vue @@ -67,9 +67,9 @@ placeholder="璇烽�夋嫨" size="small" style="width:100%" collapse-tags clearable></el-cascader> </el-form-item> <el-form-item label="鍗扮珷鍥剧墖" prop="address"> - <el-upload class="avatar-uploader" :action="action" :headers="headers" accept='image/jpg,image/jpeg,image/png' - :show-file-list="false" :on-success="handleSuccess" :on-change="beforeUpload" ref="upload" - :on-error="onError"> + <el-upload class="avatar-uploader" :action="action" :headers="uploadHeader" + accept='image/jpg,image/jpeg,image/png' :show-file-list="false" :on-success="handleSuccess" + :on-change="beforeUpload" ref="upload" :on-error="onError"> <img v-if="dataForm.address" :src="javaApi + '/img/' + dataForm.address" class="avatar"> <i v-else class="el-icon-plus avatar-uploader-icon"></i> </el-upload> @@ -94,18 +94,12 @@ upParameter } from "@/api/structural/laboratoryScope"; import { getCertificationDetail } from "@/api/structural/laboratory"; -import { getToken } from "@/utils/auth"; export default { components: { limsTable }, computed: { - headers() { - return { - 'Authorization': "Bearer " + getToken() - } - }, action() { return this.javaApi } -- Gitblit v1.9.3