提交 eb88e0ae 编写于 作者: chengxiang.li's avatar chengxiang.li

两个数据查看页面接口调试

上级 4cc19694
......@@ -3,7 +3,7 @@
<template v-if="searchTableVisible">
<el-row class="button-wrap">
<el-button class="each-button" type="primary" @click="hadnleSearch">查询</el-button>
<el-button type="primary" @click="showExportModal" v-if="showExportBtn">导出</el-button>
<el-button class="each-button" type="primary" @click="showExportModal" v-if="showExportBtn">导出</el-button>
<el-button class="each-button" type="primary" @click="showAddConditionModal(true)">添加筛选条件</el-button>
</el-row>
......@@ -431,7 +431,9 @@
vm.smsCode = '';
vm.tableDataList = res.data;
if(typeof res.data.dataExportCount != 'undefined' && res.data.dataExportCount > 0) {
vm.showExportBtn = true;
}
vm.$nextTick(() => {
if(vm.afterParam){
......@@ -519,19 +521,19 @@
if(res.code == '000000'){
console.log('正式导出》》》》 ', res)
// 执行下载excel
// vm.downloadFile(res.data)
// vm.exportModalVisible = false;
vm.downloadFile(res.data.path, res.data.fileName)
vm.exportModalVisible = false;
}else{
vm.$message.error(res.message);
}
};
vm.sendRequest( 'post', `/sensitive/dataSearch/exportWeb`, data, callback );
},
downloadFile(base64) {
downloadFile(base64, fileName) {
let a = document.createElement('a');
let uploadHref = 'data:application/xls;base64,' + base64;
a.setAttribute('href', uploadHref);
let exportFileName = '待定xxx' + '.xlsx';
let exportFileName = fileName;
a.setAttribute('download', exportFileName);
a.click();
},
......
......@@ -453,20 +453,20 @@ export default {
let callback = (res) => {
if(res.code == '000000'){
console.log('正式导出》》》》 ', res)
// vm.checkExportData.dataExportTotal = res.data.dataExportTotal;
// vm.checkExportData.dataExportCount = res.data.dataExportCount;
// vm.exportModalVisible = true;
// 执行下载excel
vm.downloadFile(res.data.path, res.data.fileName)
vm.exportModalVisible = false;
}else{
vm.$message.error(res.message);
}
};
vm.sendRequest( 'post', `/sensitive/dataSearch/export`, data, callback );
},
downloadFile(base64) {
downloadFile(base64, fileName) {
let a = document.createElement('a');
let uploadHref = 'data:application/xls;base64,' + base64;
a.setAttribute('href', uploadHref);
let exportFileName = '待定xxx' + '.xlsx';
let exportFileName = fileName;
a.setAttribute('download', exportFileName);
a.click();
},
......@@ -515,7 +515,7 @@ export default {
if(typeof res.data.dataRole != 'undefined' && res.data.dataRole == 1){
vm.showSendBtn = true;
};
if(typeof res.data.dataRole != 'undefined' && res.data.dataExportCount > 0) {
if(typeof res.data.dataExportCount != 'undefined' && res.data.dataExportCount > 0) {
vm.showExportBtn = true;
}
}else{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册