|
|
@@ -60,6 +60,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div style="padding: 10px; display: flex; justify-content: flex-end">
|
|
|
+ <a-button type="primary" @click="exportList">导出</a-button>
|
|
|
+ </div>
|
|
|
<div style="display: flex">
|
|
|
<!-- <div style="width: 300px; height: 900px; overflow-y: auto">
|
|
|
<a-tree :tree-data="treeData" :replaceFields="replaceFields"></a-tree>
|
|
|
@@ -201,6 +204,7 @@ export default {
|
|
|
showTotal: (total) => `共 ${total} 条数据`,
|
|
|
},
|
|
|
loading: false,
|
|
|
+ process: process.env.VUE_APP_API_BASE_URL,
|
|
|
wholeList: [],
|
|
|
provinceList: [],
|
|
|
cityList: [],
|
|
|
@@ -221,6 +225,30 @@ export default {
|
|
|
// }, 1000);
|
|
|
},
|
|
|
methods: {
|
|
|
+ exportList() {
|
|
|
+ this.$API.quote
|
|
|
+ .quotationDetailsExcel({
|
|
|
+ // pageNum: this.pagination.current,
|
|
|
+ // pageSize: this.pagination.defaultPageSize,
|
|
|
+ dateType: this.formState.dateType,
|
|
|
+ beginDate: this.formState.beginDate,
|
|
|
+ managementSource:1,
|
|
|
+ endDate: this.formState.endDate,
|
|
|
+ deptId: this.deptId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ let url = this.process + res.data.data; // 3.创建一个临时的url指向blob对象
|
|
|
+ let a = document.createElement("a");
|
|
|
+ a.href = url;
|
|
|
+ a.download = "导出文件.xlsx";
|
|
|
+ a.click();
|
|
|
+ window.URL.revokeObjectURL(url);
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// getAgentTree(id) {
|
|
|
// this.$API.quote
|
|
|
// .getAgentTree({
|