From 2d55ed180fddd028bf4f839345bf0ef4d2f032e7 Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期五, 07 三月 2025 13:34:31 +0800 Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev --- src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue | 28 +++++----------------------- 1 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue b/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue index fb8d415..3ab5cc0 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' } @@ -249,10 +243,7 @@ this.outLoading = true exportOutManageRecordCancel(this.queryParams).then(res => { this.outLoading = false - if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触') - this.$message.success('瀵煎嚭鎴愬姛') - let url = this.javaApi + '/word/' + res.data - this.$download.saveAs(url, "浣滃簾鏂囦欢閿�姣佽褰�"); + this.$download.downloadFileFromUrl(res.data, "浣滃簾鏂囦欢閿�姣佽褰�"); }) }, getList() { @@ -303,7 +294,7 @@ this.upLoading = false; if (response.code == 200) { this.$message.success('涓婁紶鎴愬姛'); - this.refreshTable()() + this.refreshTable() } else { this.$message.error('涓婁紶澶辫触'); } @@ -333,9 +324,6 @@ if (this.title == '鏂板') { addManageRecordCancel(obj).then(res => { this.addLoading = false - if (res.code == 201) { - return - } this.addDialogVisible = false this.$message({ type: 'success', @@ -346,9 +334,6 @@ } else { doManageRecordCancel(obj).then(res => { this.addLoading = false - if (res.code == 201) { - return - } this.addDialogVisible = false this.$message({ type: 'success', @@ -387,7 +372,6 @@ if (action === 'confirm') { // 鐐瑰嚮鈥滅‘瀹氣�濇寜閽紝鍏佽鍏抽棴 ratifyManageRecordCancel({ id: row.id, ratifyState: '閫氳繃' }).then(res => { - if (res.code === 201) return this.refreshTable() done(); this.$message({ @@ -401,7 +385,6 @@ } else if (action === 'cancel') { // 鐐瑰嚮鈥滃彇娑堚�濇寜閽紝涓嶅厑璁稿叧闂� ratifyManageRecordCancel({ id: row.id, ratifyState: '涓嶉�氳繃' }).then(res => { - if (res.code === 201) return this.refreshTable() done(); this.$message({ @@ -429,7 +412,6 @@ }) .then(() => { delManageRecordCancel({ id: row.id }).then((res) => { - if (res.code == 201) return; this.$message.success("鍒犻櫎鎴愬姛"); this.refresh(); }); -- Gitblit v1.9.3