|
@@ -4,7 +4,7 @@
|
|
<div slot="header" class="clearfix">
|
|
<div slot="header" class="clearfix">
|
|
<span>{{ titleEnum[type] }}</span>
|
|
<span>{{ titleEnum[type] }}</span>
|
|
<el-select
|
|
<el-select
|
|
- style="width: 90px; position: absolute; right: 108px; top: 8px"
|
|
|
|
|
|
+ style="width: 90px; position: absolute; right: 208px; top: 8px"
|
|
v-model="queryParams.teamType"
|
|
v-model="queryParams.teamType"
|
|
size="mini"
|
|
size="mini"
|
|
@change="getList"
|
|
@change="getList"
|
|
@@ -14,13 +14,21 @@
|
|
</el-select>
|
|
</el-select>
|
|
<el-select
|
|
<el-select
|
|
size="mini"
|
|
size="mini"
|
|
- style="width: 90px; position: absolute; right: 8px; top: 8px"
|
|
|
|
|
|
+ style="width: 90px; position: absolute; right: 108px; top: 8px"
|
|
v-model="queryParams.isBlack"
|
|
v-model="queryParams.isBlack"
|
|
@change="getList"
|
|
@change="getList"
|
|
>
|
|
>
|
|
<el-option label="红榜" value=""></el-option>
|
|
<el-option label="红榜" value=""></el-option>
|
|
<el-option label="黑榜" value="1"></el-option>
|
|
<el-option label="黑榜" value="1"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
|
|
+ <el-button
|
|
|
|
+ style="width: 90px; position: absolute; right: 8px; top: 8px"
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="onExport"
|
|
|
|
+ >导出</el-button
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
<el-form ref="queryForm" size="small" :inline="true">
|
|
<el-form ref="queryForm" size="small" :inline="true">
|
|
<el-form-item label="时间维度" prop="type">
|
|
<el-form-item label="时间维度" prop="type">
|
|
@@ -123,6 +131,9 @@ import {
|
|
managerRankList,
|
|
managerRankList,
|
|
teamRankList,
|
|
teamRankList,
|
|
workerRankList,
|
|
workerRankList,
|
|
|
|
+ workerExport,
|
|
|
|
+ manageExport,
|
|
|
|
+ teamExport,
|
|
} from "@/api/secure/pdm-score-rank";
|
|
} from "@/api/secure/pdm-score-rank";
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
@@ -202,6 +213,29 @@ export default {
|
|
this.resetForm("queryForm");
|
|
this.resetForm("queryForm");
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
},
|
|
},
|
|
|
|
+ async onExport() {
|
|
|
|
+ const funMap = {
|
|
|
|
+ 1: teamExport,
|
|
|
|
+ 2: manageExport,
|
|
|
|
+ 3: workerExport,
|
|
|
|
+ };
|
|
|
|
+ const res = await funMap[this.type](this.queryParams);
|
|
|
|
+ if (res) {
|
|
|
|
+ const elink = document.createElement("a");
|
|
|
|
+ const date = `${this.queryParams.reportDate[0]}_${this.queryParams.reportDate[1]}`;
|
|
|
|
+ elink.download = `${this.titleEnum[this.type]}.xlsx`;
|
|
|
|
+ elink.style.display = "none";
|
|
|
|
+ const blob = new Blob([res], {
|
|
|
|
+ type: "application/msword;charset=UTF-8",
|
|
|
|
+ });
|
|
|
|
+ elink.href = URL.createObjectURL(blob);
|
|
|
|
+ document.body.appendChild(elink);
|
|
|
|
+ elink.click();
|
|
|
|
+ document.body.removeChild(elink);
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error("导出异常请联系管理员");
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|