From b311b3cfee0a4635c236eea6c5870d805a29a160 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期一, 22 九月 2025 13:09:31 +0800
Subject: [PATCH] 优化导出工控网
---
src/views/statreport/machinefileexception.vue | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/views/statreport/machinefileexception.vue b/src/views/statreport/machinefileexception.vue
index 50136c9..1dc7846 100644
--- a/src/views/statreport/machinefileexception.vue
+++ b/src/views/statreport/machinefileexception.vue
@@ -3,7 +3,6 @@
* @Date: 2025-06-18 09:17:09
* @LastEditors: gaoshp
* @LastEditTime: 2025-08-13 21:23:34
- * @FilePath: /mdmweb/src/views/tasks/machinereturnfileop.vue
-->
<template>
<basic-container>
@@ -13,11 +12,6 @@
<template #menu-left>
<el-button type="primary" plain @click="exportExcel">瀵煎嚭鍒癊XCEL</el-button>
- </template>
- <template #menu="scope">
- <el-button type="primary" text size="default"
- @click.stop="handleAction(scope.row, scope.index)">瀹℃壒
- </el-button>
</template>
</avue-crud>
</basic-container>
@@ -70,7 +64,8 @@
},
{
label: '寮傚父淇℃伅',
- prop: 'exceptionType',
+ prop: 'exceptionMsg',
+ /*
render: ({row}) => {
var txt = '鏈煡';
@@ -91,7 +86,7 @@
txt = '鏈煡';
}
return txt;
- }
+ }*/
},
{
label: '鏃堕棿', //鏂囦欢鍒拌揪鏃堕棿
@@ -114,10 +109,11 @@
},
exportExcel() {
+ /*
if (this.selectedList.length === 0) {
this.$message.warning('璇峰厛閫夋嫨闇�瑕佸鍑虹殑鏁版嵁');
return;
- }
+ }*/
this.$confirm('鏄惁瀵煎嚭?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -125,9 +121,13 @@
}).then(() => {
NProgress.start();
exportBlob(
- `/blade-mdm/machinefile/filehandle/export-excel?${this.website.tokenHeader}=${getToken()}`
+ `/blade-mdm/statreport/exceptionfile/export-excel?${this.website.tokenHeader}=${getToken()}`
).then(res => {
- downloadXls(res.data, `鏈哄簥鍥炰紶绋嬪簭鍒楄〃${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
+ let name = res.headers['content-disposition'].split('filename=')[1]
+ name = decodeURI(name)
+ //console.log(res.headers['content-disposition'].split('filename=')[1]);
+ downloadXls(res.data, `${name}`);
+ //downloadXls(res.data, `鏈哄簥鍥炰紶绋嬪簭鍒楄〃${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
NProgress.done();
});
});
--
Gitblit v1.9.3