|
|
@@ -186,6 +186,7 @@
|
|
|
"
|
|
|
>
|
|
|
<a-button type="primary" @click="getList">查询</a-button>
|
|
|
+ <a-button type="primary" style="margin-left: 10px;" @click="exportList">导出</a-button>
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
|
|
|
|
@@ -197,7 +198,7 @@
|
|
|
@clear="onClear"
|
|
|
@change="onChange"
|
|
|
:loading="loading"
|
|
|
- :scroll="{ x: 'calc(1500px + 50%)', y: 400 }"
|
|
|
+ :scroll="{ x: 'calc(1500px + 50%)', y: 700 }"
|
|
|
>
|
|
|
<div slot="operation" slot-scope="{ text, record }">
|
|
|
<a-button type="link" @click="watchMessage({ text, record })"
|
|
|
@@ -320,7 +321,9 @@ export default {
|
|
|
dateType:"",
|
|
|
timeType:"",
|
|
|
userTreeData:[],
|
|
|
- treeData:[]
|
|
|
+ treeData:[],
|
|
|
+ process: process.env.VUE_APP_API_BASE_URL,
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
created() {},
|
|
|
@@ -331,8 +334,29 @@ export default {
|
|
|
// this.$refs.treeManage.getUserTree();
|
|
|
},
|
|
|
methods: {
|
|
|
+ exportList(){
|
|
|
+ this.$API.business.businessAgentExcel({
|
|
|
+ ...this.formState,
|
|
|
+ managementSource: 2,
|
|
|
+ treeType: this.treeType,
|
|
|
+ timeType:this.timeType,
|
|
|
+ treeUserId:this.treeUserId?this.treeUserId:this.formState.treeUserId
|
|
|
+ }).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);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
timeChange(val) {
|
|
|
- // console.log(val);
|
|
|
+ console.log(val);
|
|
|
this.dateType=val.dateType
|
|
|
this.timeType=val.timeType
|
|
|
this.formState = { ...val };
|