|
@@ -115,6 +115,9 @@
|
|
|
class="form-item-search"
|
|
class="form-item-search"
|
|
|
>
|
|
>
|
|
|
<a-button type="primary" @click="getList">查询</a-button>
|
|
<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-item>
|
|
|
</a-form>
|
|
</a-form>
|
|
|
</div>
|
|
</div>
|
|
@@ -250,6 +253,25 @@ export default {
|
|
|
// }, 1000);
|
|
// }, 1000);
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ exportList() {
|
|
|
|
|
+ this.$API.personnel
|
|
|
|
|
+ .exportList({
|
|
|
|
|
+ ...this.formState,
|
|
|
|
|
+ managementSource: 1,
|
|
|
|
|
+ })
|
|
|
|
|
+ .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);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
filterOption(input, option) {
|
|
filterOption(input, option) {
|
|
|
return (
|
|
return (
|
|
|
option.componentOptions.children[0].text
|
|
option.componentOptions.children[0].text
|
|
@@ -289,6 +311,10 @@ export default {
|
|
|
|
|
|
|
|
this.list = [...res.data.data.content];
|
|
this.list = [...res.data.data.content];
|
|
|
this.pageInfo.total = res.data.data.totalSize;
|
|
this.pageInfo.total = res.data.data.totalSize;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ this.list = [];
|
|
|
|
|
+ this.pageInfo.total = 0;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|