From 8dbbe477b97af728a5c4d5b444a4f67c582eb319 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期三, 08 一月 2025 17:43:34 +0800 Subject: [PATCH] osd导出 --- src/views/system/data-manage/data-detail/index.vue | 28 ++++++++++++++++++++++------ 1 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/views/system/data-manage/data-detail/index.vue b/src/views/system/data-manage/data-detail/index.vue index 99220e2..6f8e038 100644 --- a/src/views/system/data-manage/data-detail/index.vue +++ b/src/views/system/data-manage/data-detail/index.vue @@ -102,8 +102,14 @@ :columns="showList"></right-toolbar> </div> + <div v-show="exportUrl" style="margin-bottom: 5px"> + <el-button slot="reference" type="primary" size="mini" @click="handleExport(exportUrl)" plain + v-hasPermi="['platform:platform:export']">瀵煎嚭 + </el-button> + </div> + <div v-show="index === 'image_resource_security'" style="margin-bottom: 5px"> - <el-button type="primary" plain icon="el-icon-upload" size="mini" @click="handleExport" + <el-button type="primary" plain icon="el-icon-upload" size="mini" @click="handleImport" v-hasPermi="['platform:platform:export']">瀵煎叆 </el-button> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> @@ -269,7 +275,8 @@ showList: [], tableHead: [], cardList: [], - index: null + index: null, + exportUrl: null, }; }, @@ -288,17 +295,16 @@ // 鎷兼帴鎴� yyyy-MM-dd 鏍煎紡 this.queryParams.date = `${year}-${month}-${day}`; this.index = this.$route.query.index; + if (this.$route.query.type === '1') { let data = videoData.table.filter(item => item.index === this.$route.query.index)[0] - // if(this.index = 'monitor_qualification'){ - // - // } this.tableHead = data.columns; this.cardList = data.card; this.showList = data.showList; this.optionsStatus = data.optionsStatus; this.options = data.options; this.optionsName = data.optionsName; + this.exportUrl = data.exportUrl } if (this.$route.query.type === '2') { let data = carData.table.filter(item => item.index === this.$route.query.index)[0] @@ -308,6 +314,7 @@ this.optionsStatus = data.optionsStatus; this.options = data.options; this.optionsName = data.optionsName; + this.exportUrl = data.exportUrl } if (this.$route.query.type === '3') { let data = faceData.table.filter(item => item.index === this.$route.query.index)[0] @@ -317,6 +324,7 @@ this.optionsStatus = data.optionsStatus; this.options = data.options; this.optionsName = data.optionsName; + this.exportUrl = data.exportUrl } if (this.$route.query.type === '4') { let data = equipment.table.filter(item => item.index === this.$route.query.index)[0] @@ -326,6 +334,7 @@ this.optionsStatus = data.optionsStatus; this.options = data.options; this.optionsName = data.optionsName; + this.exportUrl = data.exportUrl } this.getList(); }, @@ -427,10 +436,17 @@ this.handleQuery(); }, /** 瀵煎叆鎸夐挳鎿嶄綔 */ - handleExport() { + handleImport() { this.upload.title = "鏁版嵁瀵煎叆"; this.upload.open = true; }, + handleExport(url) { + this.download(url, { + ...this.queryParams, + }, this.$route.query.ruleName+`_${new Date().getTime()}.xlsx`, { + timeout: 60000 + }) + }, /** 涓嬭浇妯℃澘 */ importTemplate() { this.download('platform/resourceSecurity/importTemplate', { -- Gitblit v1.8.0