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

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

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