Commit 5551afaa authored by “yiyousong”'s avatar “yiyousong”

pref:修改部门评估报告导出

parent 126d669b
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
<el-form ref="form" :model="deptForm" label-width="100px"> <el-form ref="form" :model="deptForm" label-width="100px">
<el-form-item label="请选择部门"> <el-form-item label="请选择部门">
<el-select <el-select
v-model="deptForm.dept" v-model="deptForm.deptId"
placeholder="请选择部门" placeholder="请选择部门"
style="width: 100%" style="width: 100%"
clearable clearable
...@@ -336,7 +336,7 @@ ...@@ -336,7 +336,7 @@
<div class="title">个人绩效总分排名TOP10</div> <div class="title">个人绩效总分排名TOP10</div>
<dv-scroll-ranking-board <dv-scroll-ranking-board
:config="personConfig" :config="personConfig"
style="width: 100%; height:200px" style="width: 100%; height: 200px"
/> />
</div> </div>
<div class="right_mid"> <div class="right_mid">
...@@ -457,7 +457,7 @@ export default { ...@@ -457,7 +457,7 @@ export default {
reportType: 1, // 生成报告类型 reportType: 1, // 生成报告类型
// 部门报告表单 // 部门报告表单
deptForm: { deptForm: {
dept: "", deptId: "",
resource: 1, resource: 1,
year: "", year: "",
month: "", month: "",
...@@ -738,7 +738,7 @@ export default { ...@@ -738,7 +738,7 @@ export default {
areaStyle: { color: "#56A3F1" }, //雷达覆盖区域背景颜色 areaStyle: { color: "#56A3F1" }, //雷达覆盖区域背景颜色
label: { label: {
show: false, show: false,
formatter: function(params) { formatter: function (params) {
return params.value; return params.value;
}, },
}, },
...@@ -993,7 +993,7 @@ export default { ...@@ -993,7 +993,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
// 定制显示(按顺序) // 定制显示(按顺序)
color: function(params) { color: function (params) {
return colorList[params.dataIndex]; return colorList[params.dataIndex];
}, },
}, },
...@@ -1074,11 +1074,26 @@ export default { ...@@ -1074,11 +1074,26 @@ export default {
delete this.deptForm.year; delete this.deptForm.year;
delete this.deptForm.month; delete this.deptForm.month;
} }
this.dataSection(this.getDeptPerformList, this.deptForm, (data) => { // this.dataSection(this.getDeptPerformList, this.deptForm, (data) => {
if (!data.length) return; // if (!data.length) {
// this.$message.warning("暂无该评估");
// return;
// }
// exportExcel(
// this.deptExcelHeader,
// this.deptFilterVal,
// data,
// "部门评估报告" + this.$moment().format("YYYYMMDDHHmmss")
// );
// });
this.dataSection(this.getPersonPerformList, this.deptForm, (data) => {
if (!data.length) {
this.$message.warning("暂无该评估");
return;
}
exportExcel( exportExcel(
this.deptExcelHeader, this.personExcelHeader,
this.deptFilterVal, this.personFilterVal,
data, data,
"部门评估报告" + this.$moment().format("YYYYMMDDHHmmss") "部门评估报告" + this.$moment().format("YYYYMMDDHHmmss")
); );
...@@ -1097,7 +1112,10 @@ export default { ...@@ -1097,7 +1112,10 @@ export default {
delete this.personForm.month; delete this.personForm.month;
} }
this.dataSection(this.getPersonPerformList, this.personForm, (data) => { this.dataSection(this.getPersonPerformList, this.personForm, (data) => {
if (!data.length) return; if (!data.length) {
this.$message.warning("暂无该评估");
return;
}
exportExcel( exportExcel(
this.personExcelHeader, this.personExcelHeader,
this.personFilterVal, this.personFilterVal,
...@@ -1107,25 +1125,25 @@ export default { ...@@ -1107,25 +1125,25 @@ export default {
}); });
}, },
// 获取部门报告列表 // 获取部门报告列表
async getDeptPerformList(page, size, searchForm) { // async getDeptPerformList(page, size, searchForm) {
let list = []; // let list = [];
let listTotal = 0; // let listTotal = 0;
await this.$post("/dept/perform/stat/list", { // await this.$post("/dept/perform/stat/list", {
page: page || 1, // page: page || 1,
size: size || 100, // size: size || 100,
...searchForm, // ...searchForm,
}).then((res) => { // }).then((res) => {
if (res.code == 1) { // if (res.code == 1) {
let { data, total } = res.data; // let { data, total } = res.data;
list = data; // list = data;
listTotal = total; // listTotal = total;
} // }
}); // });
return { // return {
data: list, // data: list,
total: listTotal, // total: listTotal,
}; // };
}, // },
// 获取个人报告列表 // 获取个人报告列表
async getPersonPerformList(page, size, searchForm) { async getPersonPerformList(page, size, searchForm) {
let list = []; let list = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment