From f112e2c62b6fca7b115dd37e34dc19dbcbc91d15 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期五, 07 三月 2025 14:52:41 +0800 Subject: [PATCH] 样式优化 --- src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue | 26 ++++++-------------------- 1 files changed, 6 insertions(+), 20 deletions(-) diff --git a/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue b/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue index c405704..d64c541 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' } @@ -289,10 +283,7 @@ // queryParams exportOutManageRecordCheck(this.queryParams).then(res => { this.outLoading = false - if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触') - this.$message.success('瀵煎嚭鎴愬姛') - let url = this.javaApi + 'word/' + res.message - this.$download.saveAs(url, '鏂囦欢瀹℃壒璁板綍') + this.$download.downloadFileFromUrl(res.data, '鏂囦欢瀹℃壒璁板綍') }) }, getAuthorizedPerson() { @@ -305,7 +296,7 @@ }) }) this.personList = data - this.refreshTable()() + this.refreshTable() }) }, // 瀹℃牳 @@ -320,7 +311,6 @@ if (action === 'confirm') { // 鐐瑰嚮鈥滅‘瀹氣�濇寜閽紝鍏佽鍏抽棴 checkManageRecordCheck({ id: row.id, checkState: '閫氳繃' }).then(res => { - if (res.code === 201) return this.refreshTable() done(); this.$message({ @@ -334,7 +324,6 @@ } else if (action === 'cancel') { // 鐐瑰嚮鈥滃彇娑堚�濇寜閽紝涓嶅厑璁稿叧闂� checkManageRecordCheck({ id: row.id, checkState: '涓嶉�氳繃' }).then(res => { - if (res.code === 201) return this.refreshTable() done(); this.$message({ @@ -366,7 +355,6 @@ if (action === 'confirm') { // 鐐瑰嚮鈥滅‘瀹氣�濇寜閽紝鍏佽鍏抽棴 ratifyManageRecordCheck({ id: row.id, ratifyState: '閫氳繃' }).then(res => { - if (res.code === 201) return this.refreshTable() done(); this.$message({ @@ -380,7 +368,6 @@ } else if (action === 'cancel') { // 鐐瑰嚮鈥滃彇娑堚�濇寜閽紝涓嶅厑璁稿叧闂� ratifyManageRecordCheck({ id: row.id, ratifyState: '涓嶉�氳繃' }).then(res => { - if (res.code === 201) return this.refreshTable() done(); this.$message({ @@ -417,7 +404,7 @@ this.upLoading = false; if (response.code == 200) { this.$message.success('涓婁紶鎴愬姛'); - this.refreshTable()() + this.refreshTable() } else { this.$message.error('涓婁紶澶辫触'); } @@ -469,7 +456,6 @@ }) .then(() => { delManageRecordCheck({ id: row.id }).then((res) => { - if (res.code == 201) return; this.$message.success("鍒犻櫎鎴愬姛"); this.refresh(); }); -- Gitblit v1.9.3