在xls表格里面在顶部展示模糊查询这个字段的名称?

在这里模糊查询了某个字段,在xls表格里面 在顶部展示这个字段的名称还要对应模糊查询的数据
最终的效果:
在xls表格里面在顶部展示模糊查询这个字段的名称?

代码如下:

formatJson(filterVal, jsonData) {

jsonData.map((v) => filterVal.map((j) => v[j]));

return jsonData.map((v) => filterVal.map((j) => v[j]));

},

async handleexportData() {

const tHeader = [

"序号",

"门店名称",

"省",

"市",

"区",

"详细地址",

"商家姓名",

"业务员",

"门店粉丝数量",

"补货单总数(已完成)",

];

const filterVal = [

"id",

"title",

"provinceName",

"cityName",

"areaName",

"address",

"ownerName",

"sellerName",

"shopFansTotal",

"shopPurchaseTotal",

];

const params = {

current: this.page.current,

size: this.page.size,

likeTitle: this.page.likeTitle,

likeOwnerName: this.page.likeOwnerName,

likeSellerRealName: this.page.likeSellerRealName,

province: this.page.province,

city: this.page.city,

area: this.page.area,

beginDay: this.page.beginDay,

endDay: this.page.endDay,

export: true,

};

const data = await getDataEateryPage(params);

if (data.data.records) {

const arrData = this.formatJson(filterVal, data.data.records);

export_json_to_excel(

tHeader,

arrData,

" 餐饮业务数据",

"序号",

"门店名称",

"省",

"市",

"区",

"详细地址",

"商家姓名",

"业务员",

"门店粉丝数量",

"补货单总数(已完成)"

);

this.getDataEateryPagedatas();

}

},

不懂怎么弄,有大佬知道的吗


回答:

使用filter对现有数据进行过滤 注:页面展示临时list 不改变现有的list

以上是 在xls表格里面在顶部展示模糊查询这个字段的名称? 的全部内容, 来源链接: utcz.com/p/933322.html

回到顶部