|
|
@@ -34,7 +34,8 @@
|
|
|
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAQAAABQ+cdNAAAAAXNSR0IArs4c6QAAAFxJREFUCNdFiLENwCAQxH4SqEDMlCJiB/QHzAINJTOxQNJDnaCAlHNzNrHyB1s+N3aaIg5ofONazNc4UNRcMPBsBpeoichJJPQvdSQnac0L5Bk6shf0zxlUVGeWvWfOMytyOTQwAAAAAElFTkSuQmCC">
|
|
|
</div>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;color:#333;" :command="{command:3}">导出全部数据</el-dropdown-item>
|
|
|
+ <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;color:#333;" :command="{command:1}">导出全部数据</el-dropdown-item>
|
|
|
+ <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;color:#333;" :command="{command:3}">导出筛选数据</el-dropdown-item>
|
|
|
<el-dropdown-item style="margin:0 10px;color:#333;" :command="{command:2}">导出选中数据</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
@@ -60,21 +61,21 @@
|
|
|
/** 导出按钮操作 */
|
|
|
exportButton(item) {
|
|
|
let self = this;
|
|
|
- console.log('self.exportConfig.screenData',self.exportConfig.screenData)
|
|
|
let currentDate=this.getCurrentTime()
|
|
|
if(item.command == 1){
|
|
|
+ if(self.exportConfig.type == 2){
|
|
|
+ if(!self.exportConfig.allData.examId){
|
|
|
+ this.msgError('请先选择考试并查询')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
self.$confirm(`确认导出全部数据?`, "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(async () => {
|
|
|
- let obj = {
|
|
|
- userIds :''
|
|
|
- }
|
|
|
- if(self.exportConfig.customKey){
|
|
|
- obj[self.exportConfig.customKey] = self.exportConfig.customValue
|
|
|
- }
|
|
|
- self.download(self.exportConfig.api,obj, self.exportConfig.fileName+currentDate+'.xlsx')
|
|
|
+ let screenData = JSON.parse(JSON.stringify(self.exportConfig.allData))
|
|
|
+ self.download(self.exportConfig.api,screenData, self.exportConfig.fileName+currentDate+'.xlsx')
|
|
|
if(self.$parent.$refs['table-box']){
|
|
|
self.$parent.$refs['table-box'].clearSelection();
|
|
|
}else if(self.$parent.$parent.$refs['table-box']){
|
|
|
@@ -105,7 +106,7 @@
|
|
|
this.msgError('请勾选数据')
|
|
|
}
|
|
|
}else if(item.command == 3){
|
|
|
- self.$confirm(`确认导出全部数据?`, "提示", {
|
|
|
+ self.$confirm(`确认导出当前筛选条件查出的数据?`, "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|