This commit is contained in:
2024-09-10 15:19:44 +08:00
parent 09cce6c613
commit e237737830
99 changed files with 14597 additions and 9267 deletions

View File

@@ -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>