|
@@ -111,7 +111,7 @@ export default {
|
|
|
this.getOhterList();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...transport(['query', 'update', 'calculate']),
|
|
|
+ ...transport(['query', 'update', 'calculate', 'export']),
|
|
|
...car({ getCarList: 'query' }),
|
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
const res = await this.query({ skip, limit, ...info, supply_type: '0' });
|
|
@@ -157,10 +157,14 @@ export default {
|
|
|
/**
|
|
|
* 获取合计
|
|
|
*/
|
|
|
- toExport() {
|
|
|
- // TODO 导出excel
|
|
|
+ async toExport() {
|
|
|
let msg = this.$message({ message: '正在导出,请稍后', duration: 0 });
|
|
|
- console.log('in function:toExport');
|
|
|
+ const ids = this.selected.map(i => i._id);
|
|
|
+ const res = await this.export({ type: 'once', ids });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ msg.close();
|
|
|
+ window.open(res);
|
|
|
+ }
|
|
|
},
|
|
|
toReturn() {
|
|
|
this.dialog = false;
|