更新
This commit is contained in:
@@ -141,12 +141,12 @@ export default {
|
||||
// {
|
||||
// type: this.$auth.hasPermi('monitoring:cost-othercost-log:create') ? 'separate' : '',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('monitoring:cost-othercost-log:export') ? 'button' : '',
|
||||
// btnName: '导出',
|
||||
// name: 'export',
|
||||
// color: 'warning',
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'warning',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
@@ -181,8 +181,11 @@ export default {
|
||||
case 'export':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.name = val.name;
|
||||
this.listQuery.recTime = val.searchTime;
|
||||
this.listQuery.name = val.name||null;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
: null;
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
@@ -203,6 +206,24 @@ export default {
|
||||
this.otherMethods(val)
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
let title;
|
||||
title = '深加工其它成本-成本记录';
|
||||
// 处理查询参数
|
||||
let params = { ...this.listQuery };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal
|
||||
.confirm('是否确认导出所有数据项?')
|
||||
.then(() => {
|
||||
return this.urlOptions.exportURL(params);
|
||||
})
|
||||
.then((response) => {
|
||||
this.$download.excel(response, title + '报表.xls');
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user