From 5c5465e7718a84d5b2a39f4e5fae7d220bd4d8ed Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 05 三月 2025 10:13:14 +0800
Subject: [PATCH] 检验任务复核检验任务下载报告,下载的内容以后缀.htm形式出现
---
src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue | 164 +++++++++++++++++++++++++-----------------------------
1 files changed, 76 insertions(+), 88 deletions(-)
diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue
index f25e0a1..895265f 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue
@@ -5,9 +5,8 @@
<div style="display: flex;justify-content: space-between;">
<el-form :model="yearForm" ref="yearForm" size="small" :inline="true">
<el-form-item label="璁″垝鍚嶇О" prop="superviseName">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="yearForm.superviseName"
- @keyup.enter.native="getYearPlanList"></el-input>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="yearForm.superviseName"
+ @keyup.enter.native="getYearPlanList"></el-input>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-refresh" size="mini" @click="clearYear">閲� 缃�</el-button>
@@ -19,8 +18,7 @@
</div>
</div>
<lims-table :tableData="yearTableData" :column="yearColumnData" :page="yearPage" :tableLoading="yearLoading"
- height="40vh" @pagination="pagination" :rowClick="rowClick"
- key="yearTableData"></lims-table>
+ height="40vh" @pagination="pagination" :rowClick="rowClick" key="yearTableData"></lims-table>
</div>
<div style="margin-top: 20px">
<div style="display: flex;justify-content: space-between;">
@@ -46,18 +44,22 @@
<el-button size="small" type="primary" @click="showDialog('add')">鏂板</el-button>
</div>
</div>
- <lims-table :tableData="yearDetailTableData" :column="yearDetailColumnData" :page="yearDetailPage" :tableLoading="yearDetailLoading"
- height="40vh" @pagination="pagination1"
- key="yearDetailTableData"></lims-table>
+ <lims-table :tableData="yearDetailTableData" :column="yearDetailColumnData" :page="yearDetailPage"
+ :tableLoading="yearDetailLoading" height="40vh" @pagination="pagination1"
+ key="yearDetailTableData"></lims-table>
</div>
<!--鏂板淇敼寮规-->
- <detail-form-dialog v-if="formDia" ref="formDia" :superviseId="superviseId" @closeDia="closeDia"></detail-form-dialog>
+ <detail-form-dialog v-if="formDia" ref="formDia" :superviseId="superviseId"
+ @closeDia="closeDia"></detail-form-dialog>
<!--璁板綍娴佺▼寮规-->
- <records-dialog v-if="recordsDia" ref="recordsDia" :superviseId="superviseId" @closeRecordsDia="closeRecordsDia"></records-dialog>
+ <records-dialog v-if="recordsDia" ref="recordsDia" :superviseId="superviseId"
+ @closeRecordsDia="closeRecordsDia"></records-dialog>
<!--涓嶇鍚堝鐞嗘祦绋嬪脊妗�-->
- <processing-sheet v-if="processingDia" ref="processingDia" :superviseId="superviseId" @closeProcessingDia="closeProcessingDia"></processing-sheet>
+ <processing-sheet v-if="processingDia" ref="processingDia" :superviseId="superviseId"
+ @closeProcessingDia="closeProcessingDia"></processing-sheet>
<!--绾犳澶勭悊娴佺▼寮规-->
- <rectify-dialog-new v-if="rectifyDia" ref="rectifyDia" :superviseId="superviseId" @closeProcessingDia="closeRectifyDia"></rectify-dialog-new>
+ <rectify-dialog-new v-if="rectifyDia" ref="rectifyDia" :superviseId="superviseId"
+ @closeProcessingDia="closeRectifyDia"></rectify-dialog-new>
<el-dialog :visible.sync="ratifyDialog" title="鎵瑰噯" width="30%" @close="closeRatifyDia">
<span>
鎵瑰噯澶囨敞锛�
@@ -68,54 +70,43 @@
<el-button :loading="ratifyLoading" type="primary" @click="handleRatify(1)">鎵� 鍑�</el-button>
</span>
</el-dialog>
- <el-dialog
- :visible.sync="downloadDialog"
- title="瀵煎嚭"
- width="600px">
- <span>
- <el-button plain type="primary" @click="controlDown">璁板綍鍗曞鍑�</el-button>
- <el-button plain type="primary" @click="processingDown">澶勭悊鍗曞鍑�</el-button>
- <el-button plain type="primary" @click="supervisoryDown">绾犳鍗曞鍑�</el-button>
- </span>
+ <el-dialog :visible.sync="downloadDialog" title="瀵煎嚭" width="600px">
+ <span>
+ <el-button plain type="primary" @click="controlDown">璁板綍鍗曞鍑�</el-button>
+ <el-button plain type="primary" @click="processingDown">澶勭悊鍗曞鍑�</el-button>
+ <el-button plain type="primary" @click="supervisoryDown">绾犳鍗曞鍑�</el-button>
+ </span>
<span slot="footer" class="dialog-footer">
- <el-button @click="downloadDialog = false">鍙� 娑�</el-button>
- </span>
+ <el-button @click="downloadDialog = false">鍙� 娑�</el-button>
+ </span>
</el-dialog>
<!--瀵煎叆璁″垝-->
- <el-dialog :visible.sync="uploadDia" title="鏁版嵁瀵煎叆" width="500px"
- :close-on-click-modal="false" :close-on-press-escape="false">
+ <el-dialog :visible.sync="uploadDia" title="鏁版嵁瀵煎叆" width="500px" :close-on-click-modal="false"
+ :close-on-press-escape="false">
<div style="display: flex; align-items: center;">
<span style="width: 80px">骞翠唤锛�</span>
- <el-date-picker
- v-model="superviseYear"
- type="year"
- value-format="yyyy"
- clearable
- size="small"
- format="yyyy"
+ <el-date-picker v-model="superviseYear" type="year" value-format="yyyy" clearable size="small" format="yyyy"
placeholder="閫夋嫨骞�">
</el-date-picker>
- <span style="width: 110px">鐩戠潱鍛橈細</span>
- <el-select v-model="recordUserIds" placeholder="璇烽�夋嫨" size="small"
- @change="splitList"
- :multiple-limit="2" filterable multiple style="width: 100%">
+ <span style="width: 110px">鐩戠潱鍛橈細</span>
+ <el-select v-model="recordUserIds" placeholder="璇烽�夋嫨" size="small" @change="splitList" :multiple-limit="2"
+ filterable multiple style="width: 100%">
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
<div style="display: flex;align-items: center;margin: 10px 0">
<div style="width: 60px">鎵瑰噯浜猴細</div>
- <el-select v-model="ratifyUserId" clearable
- filterable size="small" style="width: 50%;">
+ <el-select v-model="ratifyUserId" clearable filterable size="small" style="width: 50%;">
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
<div style="margin: 0 auto;">
- <el-upload ref="upload1" :action="action" :auto-upload="false" :file-list="fileList" :headers="uploadHeader" :limit="1"
- accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
- :on-change="beforeUpload" :on-error="onError" :on-success="handleSuccessUp" drag
- :data="{recordUserIds: recordUserIds1, superviseYear: superviseYear, ratifyUserId: ratifyUserId}"
- name="file">
+ <el-upload ref="upload1" :action="action" :auto-upload="false" :file-list="fileList" :headers="uploadHeader"
+ :limit="1" accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
+ :on-change="beforeUpload" :on-error="onError" :on-success="handleSuccessUp" drag
+ :data="{ recordUserIds: recordUserIds1, superviseYear: superviseYear, ratifyUserId: ratifyUserId }"
+ name="file">
<i class="el-icon-upload"></i>
<div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
</el-upload>
@@ -141,13 +132,13 @@
ratifyQualitySupervise, superviseDetailAccordingExport,
exportSuperviseDetaillCorrect
} from "@/api/cnas/process/ensureResults/qualitySupervise";
-import {selectUserCondition} from "@/api/business/inspectionTask";
-import {mapGetters} from "vuex";
+import { selectUserCondition } from "@/api/business/inspectionTask";
+import { mapGetters } from "vuex";
export default {
name: 'a7-quality-control-plan',
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
- components: {limsTable, RectifyDialogNew, ProcessingSheet, RecordsDialog, DetailFormDialog},
+ components: { limsTable, RectifyDialogNew, ProcessingSheet, RecordsDialog, DetailFormDialog },
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
@@ -195,15 +186,15 @@
return null;
}
}
- },{
+ }, {
label: '鎵瑰噯鍐呭',
prop: 'ratifyRemark',
minWidth: '100'
- },{
+ }, {
label: '鎵瑰噯浜�',
prop: 'ratifyUserName',
minWidth: '100'
- },{
+ }, {
label: '鎵瑰噯鏃ユ湡',
prop: 'ratifyTime',
minWidth: '160'
@@ -287,11 +278,11 @@
label: '鐩戠潱鍘熷洜',
prop: 'superviseReason',
minWidth: '150px'
- },{
+ }, {
label: '澶囨敞',
prop: 'remark',
minWidth: '150px'
- },{
+ }, {
dataType: 'action',
width: '260',
label: '鎿嶄綔',
@@ -390,7 +381,7 @@
// 鏂规硶闆嗗悎
methods: {
// 鏌ヨ骞村害璁″垝琛�
- getYearPlanList () {
+ getYearPlanList() {
const entity = {
superviseName: this.yearForm.superviseName,
}
@@ -408,7 +399,7 @@
this.yearLoading = false
})
},
- clearYear () {
+ clearYear() {
this.yearForm.superviseName = ''
this.getYearPlanList()
},
@@ -446,7 +437,7 @@
}, 1000)
}
},
- splitList (val) {
+ splitList(val) {
const string = this.HaveJson(val)
this.recordUserIds1 = string.join(',');
console.log(this.recordUserIds1)
@@ -469,7 +460,7 @@
this.$refs.upload1.submit();
},
// 鍏抽棴瀵煎叆寮规
- closeUploadDia () {
+ closeUploadDia() {
this.uploadDia = false;
this.recordUserIds = []
this.ratifyUserId = ''
@@ -477,21 +468,21 @@
this.getYearPlanList()
},
// 鎵撳紑鎶ュ憡寮规
- record (row) {
+ record(row) {
this.uploadDia = true
this.getUserList()
},
- getUserList(){
+ getUserList() {
selectUserCondition({ type: 0 }).then((res) => {
this.userList = res.data;
})
},
// 鎵瑰噯
- approvalPlan (row) {
+ approvalPlan(row) {
this.ratifyDialog = true
this.ratifyInfo = row
},
- handleRatify (ratifyStatus) {
+ handleRatify(ratifyStatus) {
// 鎵瑰噯鐘舵�� , 0 涓嶉�氳繃, 1閫氳繃
this.ratifyInfo.ratifyStatus = ratifyStatus
this.ratifyLoading = true
@@ -504,33 +495,32 @@
this.ratifyLoading = false
})
},
- closeRatifyDia () {
+ closeRatifyDia() {
this.ratifyDialog = false
this.ratifyInfo.ratifyRemark = ''
this.getYearPlanList()
},
// 瀵煎嚭
- handleDown (row) {
- exportQualitySupervise({superviseId: row.superviseId}).then(res => {
+ handleDown(row) {
+ exportQualitySupervise({ superviseId: row.superviseId }).then(res => {
try {
this.outLoading = false
- const blob = new Blob([res],{ type: 'application/msword' });
+ const blob = new Blob([res], { type: 'application/msword' });
this.$download.saveAs(blob, row.superviseName + '.docx')
- this.$message.success('瀵煎嚭鎴愬姛')
} catch (error) {
console.error('鍒涘缓Blob瀵硅薄鏃跺嚭閿�:', error);
}
})
},
// 鍒犻櫎杩涘害璁″垝琛�
- delPlan (row) {
+ delPlan(row) {
this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
this.yearLoading = true
- delQualitySupervise({superviseId: row.superviseId}).then(res => {
+ delQualitySupervise({ superviseId: row.superviseId }).then(res => {
this.yearLoading = false
this.$message.success('鍒犻櫎鎴愬姛')
this.getYearPlanList()
@@ -551,7 +541,7 @@
this.getYearDetailPlanList()
},
// 鑾峰彇骞村害鏄庣粏琛�
- getYearDetailPlanList () {
+ getYearDetailPlanList() {
const entity = {
superviseId: this.superviseId,
supervisePurpose: this.yearDetailForm.supervisePurpose,
@@ -570,7 +560,7 @@
})
},
// 閲嶇疆鏄庣粏琛�
- clearDetail () {
+ clearDetail() {
this.yearDetailForm = {
supervisePurpose: '',
superviseProject: ''
@@ -578,91 +568,88 @@
this.getYearDetailPlanList()
},
// 鎵撳紑骞村害鏄庣粏鏂板銆佷慨鏀瑰脊妗�
- showDialog (type, row) {
+ showDialog(type, row) {
this.formDia = true
this.$nextTick(() => {
this.$refs.formDia.openDia(type, row)
})
},
- closeDia () {
+ closeDia() {
this.formDia = false
this.getYearDetailPlanList()
},
// 璁板綍娴佺▼
- records (row) {
+ records(row) {
this.recordsDia = true
this.$nextTick(() => {
this.$refs.recordsDia.openDia(row)
})
},
- closeRecordsDia () {
+ closeRecordsDia() {
this.recordsDia = false
this.getYearDetailPlanList()
},
// 涓嶇鍚堟祦绋嬪脊妗�
- processing (row) {
+ processing(row) {
this.processingDia = true
this.$nextTick(() => {
this.$refs.processingDia.openDia(row)
})
},
- closeProcessingDia () {
+ closeProcessingDia() {
this.processingDia = false
this.getYearDetailPlanList()
},
// 绾犳娴佺▼寮规
- rectify (row) {
+ rectify(row) {
this.rectifyDia = true
this.$nextTick(() => {
this.$refs.rectifyDia.openDia(row)
})
},
- closeRectifyDia () {
+ closeRectifyDia() {
this.rectifyDia = false
this.getYearDetailPlanList()
},
// 鎵撳紑瀵煎嚭寮规
- openDownloadDia (row) {
+ openDownloadDia(row) {
this.downloadDialog = true
this.download = row
},
// 瀵煎嚭璁板綍
- controlDown () {
- exportSuperviseDetailRecord({superviseDetailsId: this.download.superviseDetailsId}).then(res => {
+ controlDown() {
+ exportSuperviseDetailRecord({ superviseDetailsId: this.download.superviseDetailsId }).then(res => {
const blob = new Blob([res], { type: 'application/msword' });
this.$download.saveAs(blob, '璁板綍瀵煎嚭.docx')
- this.$message.success('瀵煎嚭鎴愬姛')
}).catch(err => {
console.log('err---', err);
})
},
// 澶勭悊鍗曞鍑�
- processingDown () {
- superviseDetailAccordingExport({superviseDetailsId: this.download.superviseDetailsId}).then(res => {
+ processingDown() {
+ superviseDetailAccordingExport({ superviseDetailsId: this.download.superviseDetailsId }).then(res => {
const blob = new Blob([res], { type: 'application/msword' });
this.$download.saveAs(blob, '涓嶇鍚堥」瀵煎嚭.docx')
- this.$message.success('瀵煎嚭鎴愬姛')
}).catch(err => {
console.log('err---', err);
})
},
// 绾犳鍗曞鍑�
- supervisoryDown () {
- exportSuperviseDetaillCorrect({superviseDetailsCorrectId: this.download.superviseDetailsCorrectId}).then(res => {
+ supervisoryDown() {
+ exportSuperviseDetaillCorrect({ superviseDetailsCorrectId: this.download.superviseDetailsCorrectId }).then(res => {
const blob = new Blob([res], { type: 'application/msword' });
this.$download.saveAs(blob, '鐩戠潱绾犳鎺柦.docx')
- this.$message.success('瀵煎嚭鎴愬姛')
})
},
// 鍒犻櫎骞村害璇︽儏鍒楄〃
- delYearPlanDetail (row) {
+ delYearPlanDetail(row) {
this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
this.yearDetailLoading = true
- delQualitySuperviseDetail({superviseDetailsId: row.superviseDetailsId}).then(res => {
+ delQualitySuperviseDetail({ superviseDetailsId: row.superviseDetailsId }).then(res => {
this.yearDetailLoading = false
this.$message.success('鍒犻櫎鎴愬姛')
this.getYearDetailPlanList()
@@ -687,6 +674,7 @@
.table-card {
background-color: #ffffff;
}
+
.flex_column {
display: flex;
height: 80vh;
--
Gitblit v1.9.3