|
|
@@ -1,8 +1,9 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<retrievalForm :fields="retrievalFields" @submit="handleFormSubmit" @toggleCollapse="toggleCollapse" :dateType="3"
|
|
|
+ @exportSubmit="exportSubmit" :isExport="true"
|
|
|
@areaSelectChange="areaSelectChange"></retrievalForm>
|
|
|
- <kt-common-table :data="pageResult" :columns="columns1" element-loading-text="加载中..." v-loading="loading"
|
|
|
+ <kt-common-table :data="pageResult" :columns="columns1" element-loading-text="加载中..." v-loading="loading"
|
|
|
:showBatchDelete="false" @findPage="findPage" button3Name="转发" button3Type="text"
|
|
|
@handleButton3="transmit" button2Name="报价轨迹" button2Type="text" ref="commonTable" :stripe="false"
|
|
|
button6Name="批单" button6Type="text" @handleButton6="batchOrder"
|
|
|
@@ -124,6 +125,30 @@ export default {
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ //导出
|
|
|
+ exportSubmit(data) {
|
|
|
+ let obj = Object.assign(this.pageRequest, data)
|
|
|
+ this.pageRequest = obj;
|
|
|
+ this.exportRecords();
|
|
|
+ },
|
|
|
+ //导出
|
|
|
+ exportRecords() {
|
|
|
+ this.$api.task.exportHospitalityByTelemarketing(this.pageRequest).then((res) => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ let url = process.env.BASE_URL + res.data; // 3.创建一个临时的url指向blob对象
|
|
|
+ let a = document.createElement("a");
|
|
|
+ a.href = url;
|
|
|
+ a.download = "导出文件.xlsx";
|
|
|
+ a.click();
|
|
|
+ window.URL.revokeObjectURL(url);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
getStatusText(code) {
|
|
|
return this.optionsStatus.find(val=>val.dictValue==code).dictTag;;
|
|
|
},
|