|
@@ -1,21 +1,14 @@
|
|
|
-<!--
|
|
|
- * @Description:
|
|
|
- * @Date: 2021-05-10 08:25:13
|
|
|
- * @LastEditTime: 2021-05-21 08:43:46
|
|
|
- * @FilePath: \WEB\maintenanceManagement\src\views\performanceManage\performanceStatistics\components\kpiAnalysis.vue
|
|
|
--->
|
|
|
-
|
|
|
<template>
|
|
|
<div>
|
|
|
<div class="search">
|
|
|
<select-tree
|
|
|
-
|
|
|
selectTreeTitle="所属公司"
|
|
|
placeholder="请选择所属公司"
|
|
|
:options="organListCompany"
|
|
|
:props="defaultProps"
|
|
|
@selected="selectedcompanyOrgId"
|
|
|
v-model="mixins_query.companyOrgId"
|
|
|
+ class="new-select-tree"
|
|
|
>
|
|
|
</select-tree>
|
|
|
<select-tree
|
|
@@ -55,14 +48,12 @@
|
|
|
placeholder="请选择年"
|
|
|
format="yyyy年"
|
|
|
></el-date-picker>
|
|
|
-
|
|
|
<el-radio-group v-model="mixins_query.cycle" class="mr20 self-el-radio-group-box">
|
|
|
<el-radio :label="0">月度</el-radio>
|
|
|
<el-radio :label="1">季度</el-radio>
|
|
|
<el-radio :label="2">年度</el-radio>
|
|
|
</el-radio-group>
|
|
|
- <el-button class="servertype-serch-btn" type="primary" @click="getPage"><i class="iconfont searchbutton"></i>查询</el-button>
|
|
|
- <!-- <i class="fr fr-fs-fc fr-add iconfont" v-txt-tip data-txt="导出" @click="exportExcel"></i> -->
|
|
|
+ <el-button type="primary" class="search-btn" @click="getPage" icon="el-icon-search">查询 </el-button>
|
|
|
</div>
|
|
|
<!-- 统计图表 -->
|
|
|
<div class="device-manage-table">
|
|
@@ -70,55 +61,54 @@
|
|
|
<div class="chartboxw w1240 fl">
|
|
|
<div class="chart-title">人员绩效排名</div>
|
|
|
<div class="chart-box-height">
|
|
|
- <el-echart :option='kpiSortOption' style="width: 100%; height: 100%"></el-echart>
|
|
|
+ <zz-echart :option="kpiSortOption" style="width: 100%; height: 100%"></zz-echart>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="chartboxw w400 chartboxwfr">
|
|
|
+ <div class="chartboxw w400 chartboxwfr">
|
|
|
<div class="chart-title">绩效等级分布</div>
|
|
|
<div class="chart-box-height">
|
|
|
- <el-echart :option='kpiLevelOption' style="width: 100%; height: 100%"></el-echart>
|
|
|
+ <zz-echart :option="kpiLevelOption" style="width: 100%; height: 100%"></zz-echart>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="chartlinebox" v-show="mixins_query.cycle!==0">
|
|
|
+ <div class="chartlinebox" v-show="mixins_query.cycle !== 0">
|
|
|
<div class="chartboxw">
|
|
|
<div class="chart-title">绩效人数合格变化趋势</div>
|
|
|
<div class="chart-box-height">
|
|
|
- <el-echart :option='qualifiedOption' style="width: 100%; height: 100%"></el-echart>
|
|
|
+ <zz-echart :option="qualifiedOption" style="width: 100%; height: 100%"></zz-echart>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="chartlinebox" v-show="mixins_query.cycle!==0">
|
|
|
+ <div class="chartlinebox" v-show="mixins_query.cycle !== 0">
|
|
|
<div class="chartboxw">
|
|
|
<div class="chart-title">人均绩效得分变化趋势</div>
|
|
|
<div class="chart-box-height">
|
|
|
- <el-echart :option='scoreOption' style="width: 100%; height: 100%"></el-echart>
|
|
|
+ <zz-echart :option="scoreOption" style="width: 100%; height: 100%"></zz-echart>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {histogramOption,ringFigureOption,lineChartOption} from './echartOptions'
|
|
|
+import { histogramOption, ringFigureOption, lineChartOption } from './echartOptions';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
mixins_query: {
|
|
|
// companyOrgId: '',
|
|
|
// deptOrgId: '',
|
|
|
- cycle:0,
|
|
|
- year:0,
|
|
|
- month:0,
|
|
|
+ cycle: 0,
|
|
|
+ year: 0,
|
|
|
+ month: 0
|
|
|
},
|
|
|
- lastQuarter:'',
|
|
|
- kpiSortOption:histogramOption([]),
|
|
|
- kpiLevelOption:ringFigureOption([]),
|
|
|
- qualifiedOption:lineChartOption('','',[]),
|
|
|
- scoreOption:lineChartOption('','',[]),
|
|
|
- days:new Date(),
|
|
|
+ lastQuarter: '',
|
|
|
+ kpiSortOption: histogramOption([]),
|
|
|
+ kpiLevelOption: ringFigureOption([]),
|
|
|
+ qualifiedOption: lineChartOption('', '', []),
|
|
|
+ scoreOption: lineChartOption('', '', []),
|
|
|
+ days: new Date(),
|
|
|
timesnum: 3,
|
|
|
organListCompany: '',
|
|
|
organListdepartment: '',
|
|
@@ -127,18 +117,18 @@ export default {
|
|
|
label: 'orgName', // 标签显示
|
|
|
children: 'orgs' // 子级
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
times: [],
|
|
|
- mix_path:'routing:taskmg' , //按钮权限返回值
|
|
|
+ mix_path: 'routing:taskmg', //按钮权限返回值
|
|
|
taskTypeList: [],
|
|
|
selectRow: [],
|
|
|
dialogMapVisible: false
|
|
|
};
|
|
|
},
|
|
|
- methods: {
|
|
|
- changeQuarter(val){
|
|
|
+ methods: {
|
|
|
+ changeQuarter(val) {
|
|
|
this.lastQuarter = val;
|
|
|
- },
|
|
|
+ },
|
|
|
getorgTree() {
|
|
|
// 获取公司树
|
|
|
this.$http.postForm('/sc-user-center/org/getOrgUserTree', { orgType: 'company', id: '000' }).then(({ status, data, msg }) => {
|
|
@@ -151,6 +141,7 @@ export default {
|
|
|
},
|
|
|
selectedcompanyOrgId(e) {
|
|
|
if (!e) return;
|
|
|
+ debugger;
|
|
|
// 获取 部门树e
|
|
|
this.$http.postForm('/sc-user-center/org/getOrgUserTree', { orgType: 'department', id: e }).then(({ status, data, msg }) => {
|
|
|
if (status === 0) {
|
|
@@ -160,15 +151,15 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- //获取表格数据
|
|
|
- getPage() {
|
|
|
- this.kpiSortOption=histogramOption([]);
|
|
|
- this.kpiLevelOption=ringFigureOption([]);
|
|
|
- this.qualifiedOption=lineChartOption('','',[]);
|
|
|
- this.scoreOption=lineChartOption('','',[]);
|
|
|
+ //获取表格数据
|
|
|
+ getPage() {
|
|
|
+ this.kpiSortOption = histogramOption([]);
|
|
|
+ this.kpiLevelOption = ringFigureOption([]);
|
|
|
+ this.qualifiedOption = lineChartOption('', '', []);
|
|
|
+ this.scoreOption = lineChartOption('', '', []);
|
|
|
switch (this.mixins_query.cycle) {
|
|
|
case 0:
|
|
|
- this.mixins_query.month = this.days.getMonth()+1;
|
|
|
+ this.mixins_query.month = this.days.getMonth() + 1;
|
|
|
this.mixins_query.year = this.days.getFullYear();
|
|
|
break;
|
|
|
case 1:
|
|
@@ -178,14 +169,14 @@ export default {
|
|
|
case 2:
|
|
|
this.mixins_query.month = '';
|
|
|
this.mixins_query.year = this.days.getFullYear();
|
|
|
- break;
|
|
|
+ break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
// 人员绩效排名
|
|
|
this.$http.post('/sc-community/evaluation/report/find/ranking', this.mixins_query).then(({ status, data, msg }) => {
|
|
|
if (status === 0) {
|
|
|
- this.kpiSortOption=histogramOption(data);
|
|
|
+ this.kpiSortOption = histogramOption(data);
|
|
|
} else {
|
|
|
this.$message.error(msg);
|
|
|
}
|
|
@@ -193,38 +184,46 @@ export default {
|
|
|
// 绩效等级分布
|
|
|
this.$http.post('/sc-community/evaluation/report/find/grade/percentage', this.mixins_query).then(({ status, data, msg }) => {
|
|
|
if (status === 0) {
|
|
|
- let chartDataArr = data.map(item=>{return {'name':item.evaluationGrade,'value':item.percentage,'rate':item.percentageRate }})
|
|
|
- this.kpiLevelOption=ringFigureOption(chartDataArr);
|
|
|
- } else {
|
|
|
- this.$message.error(msg);
|
|
|
- }
|
|
|
- });
|
|
|
- if(this.mixins_query.cycle){
|
|
|
- // 绩效人数合格变化趋势
|
|
|
- this.$http.post('/sc-community/evaluation/report/count/qualified/number', this.mixins_query).then(({ status, data, msg }) => {
|
|
|
- if (status === 0) {
|
|
|
- let chartDataArr = data.map(item=>{return {'mouth':this.mixins_query.year+'年'+ item.month+'月','num':item.qualifiedNumber}})
|
|
|
- this.qualifiedOption=lineChartOption('人','#29B6FF',chartDataArr);
|
|
|
- } else {
|
|
|
- this.$message.error(msg);
|
|
|
- }
|
|
|
- });
|
|
|
- // 人均绩效得分变化趋势
|
|
|
- this.$http.post('/sc-community/evaluation/report/count/performance/avg', this.mixins_query).then(({ status, data, msg }) => {
|
|
|
- if (status === 0) {
|
|
|
- let chartDataArr = data.map(item=>{return {'mouth':this.mixins_query.year+'年'+ item.month+'月','num':item.avg}})
|
|
|
- this.scoreOption=lineChartOption('分','#B72EF6',chartDataArr);
|
|
|
+ let chartDataArr = data.map((item) => {
|
|
|
+ return { name: item.evaluationGrade, value: item.percentage, rate: item.percentageRate };
|
|
|
+ });
|
|
|
+ this.kpiLevelOption = ringFigureOption(chartDataArr);
|
|
|
} else {
|
|
|
this.$message.error(msg);
|
|
|
}
|
|
|
});
|
|
|
+ if (this.mixins_query.cycle) {
|
|
|
+ // 绩效人数合格变化趋势
|
|
|
+ this.$http
|
|
|
+ .post('/sc-community/evaluation/report/count/qualified/number', this.mixins_query)
|
|
|
+ .then(({ status, data, msg }) => {
|
|
|
+ if (status === 0) {
|
|
|
+ let chartDataArr = data.map((item) => {
|
|
|
+ return { mouth: this.mixins_query.year + '年' + item.month + '月', num: item.qualifiedNumber };
|
|
|
+ });
|
|
|
+ this.qualifiedOption = lineChartOption('人', '#29B6FF', chartDataArr);
|
|
|
+ } else {
|
|
|
+ this.$message.error(msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 人均绩效得分变化趋势
|
|
|
+ this.$http
|
|
|
+ .post('/sc-community/evaluation/report/count/performance/avg', this.mixins_query)
|
|
|
+ .then(({ status, data, msg }) => {
|
|
|
+ if (status === 0) {
|
|
|
+ let chartDataArr = data.map((item) => {
|
|
|
+ return { mouth: this.mixins_query.year + '年' + item.month + '月', num: item.avg };
|
|
|
+ });
|
|
|
+ this.scoreOption = lineChartOption('分', '#B72EF6', chartDataArr);
|
|
|
+ } else {
|
|
|
+ this.$message.error(msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
- },
|
|
|
-
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
-
|
|
|
- this.getPage(); //获取表格
|
|
|
+ this.getPage(); //获取表格
|
|
|
this.getorgTree();
|
|
|
}
|
|
|
};
|
|
@@ -265,48 +264,49 @@ export default {
|
|
|
.new-select-tree {
|
|
|
vertical-align: top;
|
|
|
margin-right: 20px;
|
|
|
+ display: inline-block;
|
|
|
}
|
|
|
.doalogmap {
|
|
|
width: 100%;
|
|
|
height: 460px;
|
|
|
}
|
|
|
/deep/ .el-dialog__body {
|
|
|
- padding: 0 20px 20px 20px!important;
|
|
|
+ padding: 0 20px 20px 20px !important;
|
|
|
}
|
|
|
.mr20 {
|
|
|
margin-right: 20px;
|
|
|
}
|
|
|
|
|
|
-.chartlinebox{
|
|
|
+.chartlinebox {
|
|
|
display: flex;
|
|
|
// overflow: hidden;
|
|
|
- .chartboxw{
|
|
|
- background: #fff;
|
|
|
+ .chartboxw {
|
|
|
+ background: #fff;
|
|
|
border-radius: 6px;
|
|
|
margin-bottom: 20px;
|
|
|
padding: 30px;
|
|
|
width: 100%;
|
|
|
- .chart-title{
|
|
|
+ .chart-title {
|
|
|
font-size: 14px;
|
|
|
font-family: MicrosoftYaHei;
|
|
|
color: #424656;
|
|
|
padding-bottom: 10px;
|
|
|
- border-bottom: 1px solid #D8D8D8;
|
|
|
+ border-bottom: 1px solid #d8d8d8;
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
- .chart-box-height{
|
|
|
+ .chart-box-height {
|
|
|
height: 280px;
|
|
|
}
|
|
|
}
|
|
|
- .w1240{
|
|
|
+ .w1240 {
|
|
|
width: 1220px;
|
|
|
}
|
|
|
- .w400{
|
|
|
+ .w400 {
|
|
|
flex: 1;
|
|
|
margin-left: 20px;
|
|
|
// width: 400px;
|
|
|
}
|
|
|
- .ml20{
|
|
|
+ .ml20 {
|
|
|
margin-left: 20px;
|
|
|
}
|
|
|
}
|