|
@@ -14,16 +14,28 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
async exportData() {
|
|
|
+ let rs = [];
|
|
|
if (this.oldParam){
|
|
|
- this.param.content.type = this.oldParam.content.type
|
|
|
- this.param.content.dataid = this.oldParam.content.dataid
|
|
|
- this.param.content.where.uninvicetype = this.oldParam.content.where.uninvicetype
|
|
|
- this.param.content.where.isleave = this.oldParam.content.where.isleave
|
|
|
+ // this.param.content.type = this.oldParam.content.type
|
|
|
+ // this.param.content.dataid = this.oldParam.content.dataid
|
|
|
+ // this.param.content.where.uninvicetype = this.oldParam.content.where.uninvicetype
|
|
|
+ // this.param.content.where.isleave = this.oldParam.content.where.isleave
|
|
|
+ this.param.content = this.oldParam.content
|
|
|
}
|
|
|
+ this.columnsData = JSON.parse(JSON.stringify(this.columns));
|
|
|
+ if (this.columnsData) {
|
|
|
+ this.columns.filter((p) => {
|
|
|
+ rs.push({
|
|
|
+ fieldlabel: p.title,
|
|
|
+ fieldname: p.columnname,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.param.content.exportFields = rs;
|
|
|
this.param.content.isExport = 1;
|
|
|
/*导出数据*/
|
|
|
const res = await this.$api.requested(this.param);
|
|
|
- this.downFile(res.data, this.fileName);
|
|
|
+ this.downFile(res.data[0].url, this.fileName);
|
|
|
this.param.content.isExport = 0;
|
|
|
},
|
|
|
downFile(url, fileName) {
|