|
|
@@ -1,73 +1,103 @@
|
|
|
<template>
|
|
|
<div class="personView">
|
|
|
- <div class="topView"
|
|
|
- style="width: 100%;height: 11%;">
|
|
|
+ <div class="topView" style="width: 100%; height: 11%">
|
|
|
<!-- <div class="jbd-title"> 人员管理看板 </div> -->
|
|
|
<div class="jbd-title">
|
|
|
- <dv-decoration-8 style="width:20%;height:50px;position: absolute;left: 0px;top: 0px;" />
|
|
|
- <div style="width:100%">
|
|
|
- <div style="height:40%;font-size: 22px;margin-top: 10px;">人员管理看板</div>
|
|
|
- <dv-decoration-5 style="width:30%;height: 50%;margin: 0 auto;" />
|
|
|
+ <dv-decoration-8
|
|
|
+ style="
|
|
|
+ width: 20%;
|
|
|
+ height: 50px;
|
|
|
+ position: absolute;
|
|
|
+ left: 0px;
|
|
|
+ top: 0px;
|
|
|
+ "
|
|
|
+ />
|
|
|
+ <div style="width: 100%">
|
|
|
+ <div style="height: 40%; font-size: 22px; margin-top: 10px">
|
|
|
+ 人员管理看板
|
|
|
+ </div>
|
|
|
+ <dv-decoration-5 style="width: 30%; height: 50%; margin: 0 auto" />
|
|
|
</div>
|
|
|
- <dv-decoration-8 :reverse="true"
|
|
|
- style="width:20%;height:50px;position:absolute;right: 0px;top: 0px;" />
|
|
|
+ <dv-decoration-8
|
|
|
+ :reverse="true"
|
|
|
+ style="
|
|
|
+ width: 20%;
|
|
|
+ height: 50px;
|
|
|
+ position: absolute;
|
|
|
+ right: 0px;
|
|
|
+ top: 0px;
|
|
|
+ "
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="contain">
|
|
|
- <dv-decoration-11 class="personNum"
|
|
|
- style="margin-left:10%"><i class="el-icon-user"
|
|
|
- style="color:#4ea5d6;margin-right: 3px;"></i> 员工数量:{{ employeeNum }}人</dv-decoration-11>
|
|
|
- <dv-border-box-8 class="date"
|
|
|
- style="margin-right:10%; display: flex; align-items: center;">
|
|
|
+ <dv-decoration-11 class="personNum" style="margin-left: 10%"
|
|
|
+ ><i
|
|
|
+ class="el-icon-user"
|
|
|
+ style="color: #4ea5d6; margin-right: 3px"
|
|
|
+ ></i>
|
|
|
+ 员工数量:{{ employeeNum }}人</dv-decoration-11
|
|
|
+ >
|
|
|
+ <dv-border-box-8
|
|
|
+ class="date"
|
|
|
+ style="margin-right: 10%; display: flex; align-items: center"
|
|
|
+ >
|
|
|
<!-- 部门选择 -->
|
|
|
<SelectPositions @handleFunc="handleFunc" />
|
|
|
- <div style="width:30%;display: inline-block;margin-right: 3px;">统计时间:</div>
|
|
|
- <el-date-picker style="width:75%;"
|
|
|
- v-model="monthValues"
|
|
|
- type="monthrange"
|
|
|
- align="right"
|
|
|
- unlink-panels
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始月份"
|
|
|
- end-placeholder="结束月份"
|
|
|
- :picker-options="pickerOptions"
|
|
|
- @change="changeDate">
|
|
|
+ <div style="width: 30%; display: inline-block; margin-right: 3px">
|
|
|
+ 统计时间:
|
|
|
+ </div>
|
|
|
+ <el-date-picker
|
|
|
+ style="width: 75%"
|
|
|
+ v-model="monthValues"
|
|
|
+ type="monthrange"
|
|
|
+ align="right"
|
|
|
+ unlink-panels
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始月份"
|
|
|
+ end-placeholder="结束月份"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ @change="changeDate"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</dv-border-box-8>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <dv-border-box-1 style="width:100%;height:89%; box-sizing: border-box; overflow: hidden;">
|
|
|
- <div style="height:3%"></div>
|
|
|
+ <dv-border-box-1
|
|
|
+ style="width: 100%; height: 89%; box-sizing: border-box; overflow: hidden"
|
|
|
+ >
|
|
|
+ <div style="height: 3%"></div>
|
|
|
<div class="middleView">
|
|
|
<div class="viewLeft">
|
|
|
- <pieView v-if="degreePieData.data[0].value"
|
|
|
- :info="degreePieData" />
|
|
|
+ <pieView v-if="degreePieData.data[0].value" :info="degreePieData" />
|
|
|
</div>
|
|
|
- <dv-decoration-2 :reverse="true"
|
|
|
- style="width:2%;height: 100%;" />
|
|
|
+ <dv-decoration-2 :reverse="true" style="width: 2%; height: 100%" />
|
|
|
<div class="viewCenter">
|
|
|
- <RingChart v-if="ranksPieData.data[2].value"
|
|
|
- :info="ranksPieData" />
|
|
|
+ <RingChart v-if="ranksPieData.data[2].value" :info="ranksPieData" />
|
|
|
</div>
|
|
|
- <dv-decoration-2 :reverse="true"
|
|
|
- style="width:2%;height: 100%;" />
|
|
|
+ <dv-decoration-2 :reverse="true" style="width: 2%; height: 100%" />
|
|
|
<div class="viewRight">
|
|
|
- <CarouselTabl v-if="personInfoData.data.length"
|
|
|
- :info="personInfoData"
|
|
|
- title="员工基本信息列表" />
|
|
|
+ <CarouselTabl
|
|
|
+ v-if="personInfoData.data.length"
|
|
|
+ :info="personInfoData"
|
|
|
+ title="员工基本信息列表"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <dv-decoration-10 style="height:2%;width:96%; margin: 0 auto;" />
|
|
|
+ <dv-decoration-10 style="height: 2%; width: 96%; margin: 0 auto" />
|
|
|
<div class="bottomView">
|
|
|
<div class="detectionTask">
|
|
|
- <BarChart :info="PositionsOption"
|
|
|
- :config="{title:'部门信息统计',id:'positionsId'}" />
|
|
|
+ <BarChart
|
|
|
+ :info="PositionsOption"
|
|
|
+ :config="{ title: '部门信息统计', id: 'positionsId' }"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <dv-decoration-2 :reverse="true"
|
|
|
- style="width:2%;height: 100%;" />
|
|
|
+ <dv-decoration-2 :reverse="true" style="width: 2%; height: 100%" />
|
|
|
<div class="taskMatters">
|
|
|
- <BarChart v-if="optionPersonShow"
|
|
|
- :info="optionPerson"
|
|
|
- :config="{title:'任务事宜统计',id:'taskMatters'}" />
|
|
|
+ <BarChart
|
|
|
+ v-if="optionPersonShow"
|
|
|
+ :info="optionPerson"
|
|
|
+ :config="{ title: '任务事宜统计', id: 'taskMatters' }"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</dv-border-box-1>
|
|
|
@@ -85,10 +115,9 @@ import ActionUtils from "@/utils/action";
|
|
|
import { sync } from "@/api/platform/mail/outMail";
|
|
|
import data from "@/components/ibps-icon-select/data";
|
|
|
// import ibpsTreeSelect from '@/components/ibps-tree-select'
|
|
|
-import TreeUtils from '@/utils/tree'
|
|
|
+import TreeUtils from "@/utils/tree";
|
|
|
import SelectPositions from "@/views/component/selectPositions";
|
|
|
|
|
|
-
|
|
|
export default {
|
|
|
name: "checkBoard1",
|
|
|
components: {
|
|
|
@@ -99,9 +128,11 @@ export default {
|
|
|
BarChart: () => import("../personComcont/BarChart"),
|
|
|
},
|
|
|
data() {
|
|
|
- const { level, userId, userInfo } = this.$store.getters
|
|
|
+ const { level, userId, userInfo } = this.$store.getters;
|
|
|
return {
|
|
|
- level, userId, userInfo,
|
|
|
+ level,
|
|
|
+ userId,
|
|
|
+ userInfo,
|
|
|
pkKey: "id", // 主键 如果主键不是pk需要传主键
|
|
|
pickerOptions: {
|
|
|
shortcuts: [
|
|
|
@@ -218,7 +249,7 @@ export default {
|
|
|
color: ["#00CC33"],
|
|
|
},
|
|
|
},
|
|
|
- }
|
|
|
+ },
|
|
|
],
|
|
|
dataZoom: [
|
|
|
{
|
|
|
@@ -257,6 +288,10 @@ export default {
|
|
|
name: "本科",
|
|
|
value: 0,
|
|
|
},
|
|
|
+ {
|
|
|
+ name: "高中",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
],
|
|
|
color: ["#FFFF00", "#99CC00", "#6666FF"],
|
|
|
config: { title: "学历学位统计", idSelector: "degreeId" },
|
|
|
@@ -276,10 +311,6 @@ export default {
|
|
|
name: "初级",
|
|
|
value: 0,
|
|
|
},
|
|
|
- {
|
|
|
- name: "其他",
|
|
|
- value: 0,
|
|
|
- }
|
|
|
],
|
|
|
color: ["#FFFF00", "#99CC00", "#6666FF", "#FF6666"],
|
|
|
config: { title: "职称统计", idSelector: "ranksid" },
|
|
|
@@ -301,150 +332,146 @@ export default {
|
|
|
PositionsOption: {
|
|
|
animation: true,
|
|
|
tooltip: {
|
|
|
- trigger: 'axis',
|
|
|
+ trigger: "axis",
|
|
|
axisPointer: {
|
|
|
- type: 'shadow'
|
|
|
- }
|
|
|
+ type: "shadow",
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
legend: {
|
|
|
textStyle: {
|
|
|
- color: "rgba(251, 251, 251, 1)"
|
|
|
- }
|
|
|
+ color: "rgba(251, 251, 251, 1)",
|
|
|
+ },
|
|
|
},
|
|
|
grid: {
|
|
|
- left: '3%',
|
|
|
- right: '4%',
|
|
|
- bottom: '3%',
|
|
|
- containLabel: true
|
|
|
+ left: "3%",
|
|
|
+ right: "4%",
|
|
|
+ bottom: "3%",
|
|
|
+ containLabel: true,
|
|
|
},
|
|
|
xAxis: [
|
|
|
{
|
|
|
- type: 'category',
|
|
|
+ type: "category",
|
|
|
data: [],
|
|
|
nameTextStyle: {
|
|
|
color: "rgba(251, 251, 251, 1)",
|
|
|
-
|
|
|
},
|
|
|
axisLabel: {
|
|
|
textStyle: {
|
|
|
- color: "rgba(251, 251, 251, 1)"
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ color: "rgba(251, 251, 251, 1)",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
],
|
|
|
yAxis: [
|
|
|
{
|
|
|
- name: '个数(人)',
|
|
|
- type: 'value',
|
|
|
+ name: "个数(人)",
|
|
|
+ type: "value",
|
|
|
nameTextStyle: {
|
|
|
- color: "rgba(251, 251, 251, 1)"
|
|
|
+ color: "rgba(251, 251, 251, 1)",
|
|
|
},
|
|
|
axisLabel: {
|
|
|
textStyle: {
|
|
|
- color: "rgba(251, 251, 251, 1)"
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ color: "rgba(251, 251, 251, 1)",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
],
|
|
|
// "高中", "本科", "硕士", "博士", "初级职称", "中级职称", "高级职称"
|
|
|
series: [
|
|
|
{
|
|
|
- name: '高中',
|
|
|
- type: 'bar',
|
|
|
+ name: "高中",
|
|
|
+ type: "bar",
|
|
|
emphasis: {
|
|
|
- focus: 'series'
|
|
|
+ focus: "series",
|
|
|
},
|
|
|
- data: []
|
|
|
+ data: [],
|
|
|
},
|
|
|
{
|
|
|
- name: '本科',
|
|
|
- type: 'bar',
|
|
|
- stack: 'Ad',
|
|
|
+ name: "本科",
|
|
|
+ type: "bar",
|
|
|
+ stack: "Ad",
|
|
|
emphasis: {
|
|
|
- focus: 'series'
|
|
|
+ focus: "series",
|
|
|
},
|
|
|
- data: []
|
|
|
+ data: [],
|
|
|
},
|
|
|
{
|
|
|
- name: '硕士',
|
|
|
- type: 'bar',
|
|
|
- stack: 'Ad',
|
|
|
+ name: "硕士",
|
|
|
+ type: "bar",
|
|
|
+ stack: "Ad",
|
|
|
emphasis: {
|
|
|
- focus: 'series'
|
|
|
+ focus: "series",
|
|
|
},
|
|
|
- data: []
|
|
|
+ data: [],
|
|
|
},
|
|
|
{
|
|
|
- name: '博士',
|
|
|
- type: 'bar',
|
|
|
- stack: 'Ad',
|
|
|
+ name: "博士",
|
|
|
+ type: "bar",
|
|
|
+ stack: "Ad",
|
|
|
emphasis: {
|
|
|
- focus: 'series'
|
|
|
+ focus: "series",
|
|
|
},
|
|
|
- data: []
|
|
|
+ data: [],
|
|
|
},
|
|
|
{
|
|
|
- name: '初级职称',
|
|
|
- type: 'bar',
|
|
|
+ name: "初级职称",
|
|
|
+ type: "bar",
|
|
|
data: [],
|
|
|
emphasis: {
|
|
|
- focus: 'series'
|
|
|
+ focus: "series",
|
|
|
},
|
|
|
markLine: {
|
|
|
lineStyle: {
|
|
|
- type: 'dashed'
|
|
|
+ type: "dashed",
|
|
|
},
|
|
|
- data: [[{ type: 'min' }, { type: 'max' }]]
|
|
|
- }
|
|
|
+ data: [[{ type: "min" }, { type: "max" }]],
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- name: '中级职称',
|
|
|
- type: 'bar',
|
|
|
+ name: "中级职称",
|
|
|
+ type: "bar",
|
|
|
barWidth: 5,
|
|
|
- stack: 'Search Engine',
|
|
|
+ stack: "Search Engine",
|
|
|
emphasis: {
|
|
|
- focus: 'series'
|
|
|
+ focus: "series",
|
|
|
},
|
|
|
- data: []
|
|
|
+ data: [],
|
|
|
},
|
|
|
{
|
|
|
- name: '高级职称',
|
|
|
- type: 'bar',
|
|
|
- stack: 'Search Engine',
|
|
|
+ name: "高级职称",
|
|
|
+ type: "bar",
|
|
|
+ stack: "Search Engine",
|
|
|
emphasis: {
|
|
|
- focus: 'series'
|
|
|
+ focus: "series",
|
|
|
},
|
|
|
- data: []
|
|
|
- }
|
|
|
- ]
|
|
|
+ data: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
employeeNum: 0,
|
|
|
employeeInfo: [],
|
|
|
- selectData: '',
|
|
|
+ selectData: "",
|
|
|
props: {
|
|
|
- children: 'children',
|
|
|
- label: 'NAME_',
|
|
|
- value: 'ID_',
|
|
|
+ children: "children",
|
|
|
+ label: "NAME_",
|
|
|
+ value: "ID_",
|
|
|
multiple: true,
|
|
|
- expandTrigger: 'hover',
|
|
|
+ expandTrigger: "hover",
|
|
|
},
|
|
|
selectPositionsDatas: [],
|
|
|
- nodeKey: 'ID_',
|
|
|
+ nodeKey: "ID_",
|
|
|
clearable: true,
|
|
|
value: [],
|
|
|
options: [],
|
|
|
- positions: [], // 用于sql条件查询
|
|
|
- pisitionsValue: [] // 回填给子组件的部门全值
|
|
|
+ otherPositions: [], // 用于其他图sql条件查询
|
|
|
+ positions: [], // 用于部门统计信息sql条件查询
|
|
|
+
|
|
|
+ pisitionsValue: [], // 回填给子组件的部门全值
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
- async getTtaskMattersData() {
|
|
|
-
|
|
|
- },
|
|
|
/**
|
|
|
* 处理按钮事件
|
|
|
*/
|
|
|
@@ -511,16 +538,18 @@ export default {
|
|
|
(value[0].getDate() > 9
|
|
|
? value[0].getDate()
|
|
|
: "0" + value[0].getDate());
|
|
|
- this.getTtaskMattersData();
|
|
|
},
|
|
|
- //部门基本信息 轮播表数据
|
|
|
+ // 人员基本信息 轮播表数据
|
|
|
async employeeInfoData() {
|
|
|
let this_ = this;
|
|
|
this.personInfoData.data = [];
|
|
|
let data = [];
|
|
|
let personInfo = [];
|
|
|
// let ranksObj = {};
|
|
|
- let sql = `select a.id_,a.parent_id_,b.name_,a.zui_gao_xue_li_x_,a.zhi_cheng_deng_ji,b.jian_ding_zi_ge_z,a.ru_zhi_shi_jian_ from t_ryjbqk as a join ibps_party_employee as b on a.parent_id_= b.id_ where a.id_ !='861622496187645952'`;
|
|
|
+ let sql = `select a.id_,a.parent_id_,ee.name_,a.zui_gao_xue_li_x_,a.zhi_cheng_deng_ji,ee.jian_ding_zi_ge_z,a.ren_zhi_shi_jian_,
|
|
|
+ a.ru_zhi_shi_jian_ from t_ryjbqk as a join ibps_party_employee as ee on a.parent_id_= ee.id_ where a.id_ !='861622496187645952' and (${this.otherPositions.join(
|
|
|
+ " or "
|
|
|
+ )})`;
|
|
|
await curdPost("sql", sql).then((res) => {
|
|
|
data = res.variables.data;
|
|
|
});
|
|
|
@@ -532,32 +561,47 @@ export default {
|
|
|
personInfo.push(item.zui_gao_xue_li_x_ || ` `);
|
|
|
personInfo.push(item.zhi_cheng_deng_ji || ` `);
|
|
|
personInfo.push(item.jian_ding_zi_ge_z || ` `);
|
|
|
- personInfo.push(item.ru_zhi_shi_jian_ || ` `);
|
|
|
+ personInfo.push(item.ren_zhi_shi_jian_ || ` `);
|
|
|
this.personInfoData.data.push(personInfo || ` `);
|
|
|
}
|
|
|
},
|
|
|
//饼图 环形图数据
|
|
|
async degreeGradeInfoData() {
|
|
|
+ // this.degreePieData.data = [];
|
|
|
+ // this.ranksPieData.data = [];
|
|
|
let data = [];
|
|
|
let sql = `select
|
|
|
sum(a.zui_gao_xue_li_x_ = '博士') as doctor,
|
|
|
sum(a.zui_gao_xue_li_x_ = '硕士') as Master,
|
|
|
sum(a.zui_gao_xue_li_x_ = '本科') as undergraduate,
|
|
|
+ sum(a.zui_gao_xue_li_x_ = '高中') as gaoZhong,
|
|
|
sum(a.zhi_cheng_deng_ji = '初级') as elementary,
|
|
|
sum(a.zhi_cheng_deng_ji = '中级') as middleRank,
|
|
|
sum(a.zhi_cheng_deng_ji = '高级') as senior,
|
|
|
- sum(a.zhi_cheng_deng_ji = ''||a.zhi_cheng_deng_ji is null) as other
|
|
|
- from t_ryjbqk as a join ibps_party_employee as b on a.parent_id_= b.id_ where b.id_ != '702117247933480960'`;
|
|
|
+ sum(a.zhi_cheng_deng_ji = '' || a.zhi_cheng_deng_ji is null) as other
|
|
|
+ from t_ryjbqk as a join ibps_party_employee as ee on a.parent_id_= ee.id_ where ee.id_ != '702117247933480960' and (${this.otherPositions.join(
|
|
|
+ " or "
|
|
|
+ )} )`;
|
|
|
await curdPost("sql", sql).then((res) => {
|
|
|
data = res.variables.data;
|
|
|
});
|
|
|
- this.degreePieData.data[0].value = data[0].doctor;
|
|
|
- this.degreePieData.data[1].value = data[0].Master;
|
|
|
- this.degreePieData.data[2].value = data[0].undergraduate;
|
|
|
- this.ranksPieData.data[0].value = data[0].senior;
|
|
|
- this.ranksPieData.data[1].value = data[0].middleRank;
|
|
|
- this.ranksPieData.data[2].value = data[0].elementary;
|
|
|
- this.ranksPieData.data[3].value = data[0].other;
|
|
|
+ this.degreePieData.data[0].value = data[0].doctor ? data[0].doctor : "";
|
|
|
+ this.degreePieData.data[1].value = data[0].Master ? data[0].Master : "";
|
|
|
+ this.degreePieData.data[2].value = data[0].undergraduate
|
|
|
+ ? data[0].undergraduate
|
|
|
+ : "";
|
|
|
+ this.degreePieData.data[3].value = data[0].gaoZhong
|
|
|
+ ? data[0].gaoZhong
|
|
|
+ : "";
|
|
|
+ this.ranksPieData.data[0].value = data[0].senior ? data[0].senior : "";
|
|
|
+ this.ranksPieData.data[1].value = data[0].middleRank
|
|
|
+ ? data[0].middleRank
|
|
|
+ : "";
|
|
|
+ this.ranksPieData.data[2].value = data[0].elementary
|
|
|
+ ? data[0].elementary
|
|
|
+ : "";
|
|
|
+ // console.log("this.ranksPieData", this.ranksPieData);
|
|
|
+ // console.log("this.degreePieData", this.degreePieData);
|
|
|
},
|
|
|
// 部门信息统计
|
|
|
positionsInfoData() {
|
|
|
@@ -571,33 +615,38 @@ export default {
|
|
|
sum(gy.zhi_cheng_deng_ji = '高级') AS seniorZ_ FROM (SELECT
|
|
|
ee.id_ AS eeID,ee.name_ AS eeName,ee.positions_,ry.zui_gao_xue_li_x_,ry.zhi_cheng_deng_ji
|
|
|
FROM t_ryjbqk AS ry JOIN ibps_party_employee AS ee ON ry.parent_id_= ee.id_ WHERE ee.id_ != '702117247933480960'
|
|
|
- )gy LEFT JOIN ibps_party_entity en ON FIND_IN_SET(en.id_,gy.positions_) where (${this.positions.join(' or ')}) GROUP BY enName) jh`;
|
|
|
- // console.log('sql', sql)
|
|
|
- // let sql = `select *from ibps_party_entity`
|
|
|
+ )gy LEFT JOIN ibps_party_entity en ON FIND_IN_SET(en.id_,gy.positions_) where (${this.positions.join(
|
|
|
+ " or "
|
|
|
+ )}) GROUP BY enName) jh`;
|
|
|
curdPost("sql", sql).then((res) => {
|
|
|
const data = res.variables.data;
|
|
|
// 组装数据集,以学历职称为列,以部门为行:{"高中":['1','2','3']}
|
|
|
- let xAxisDatas = this.PositionsOption.xAxis[0].data
|
|
|
- let seriesDatas = this.PositionsOption.series
|
|
|
+ let xAxisDatas = this.PositionsOption.xAxis[0].data;
|
|
|
+ let seriesDatas = this.PositionsOption.series;
|
|
|
+ this.PositionsOption.xAxis[0].data = [];
|
|
|
+ this.PositionsOption.series = [];
|
|
|
|
|
|
if (data.length !== 0) {
|
|
|
- console.log('data', data)
|
|
|
// 跟《部门信息统计配置表》排列顺序一致
|
|
|
- let shuZuList = ["senior_", "undergraduate_", "Master_", "doctor_", "elementary_", "middleRank_", "seniorZ_"]
|
|
|
+ let shuZuList = [
|
|
|
+ "senior_",
|
|
|
+ "undergraduate_",
|
|
|
+ "Master_",
|
|
|
+ "doctor_",
|
|
|
+ "elementary_",
|
|
|
+ "middleRank_",
|
|
|
+ "seniorZ_",
|
|
|
+ ];
|
|
|
for (let t = 0; t < data.length; t++) {
|
|
|
- xAxisDatas.push(data[t].enName)
|
|
|
+ xAxisDatas.push(data[t].enName);
|
|
|
for (let i = 0; i < seriesDatas.length; i++) {
|
|
|
- seriesDatas[i].data[t] = data[t][shuZuList[i]]
|
|
|
+ seriesDatas[i].data[t] = data[t][shuZuList[i]];
|
|
|
}
|
|
|
}
|
|
|
- this.PositionsOption.xAxis[0].data = xAxisDatas
|
|
|
- this.PositionsOption.series = seriesDatas
|
|
|
- console.log('this.PositionsOption.series',this.PositionsOption.series)
|
|
|
+ this.PositionsOption.xAxis[0].data = xAxisDatas;
|
|
|
+ this.PositionsOption.series = seriesDatas;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
});
|
|
|
-
|
|
|
},
|
|
|
preDate(dateParameter, num) {
|
|
|
//往前推算日期
|
|
|
@@ -627,35 +676,20 @@ export default {
|
|
|
},
|
|
|
// 简化部门信息
|
|
|
simplifyPosition(v) {
|
|
|
- this.positions = [] // 用于sql条件查询
|
|
|
+ this.positions = []; // 用于sql条件查询
|
|
|
for (let i = 0; i < v.length; i++) {
|
|
|
- this.positions.push(`en.path_ like '%${v[i][v[i].length - 1]}%'`)
|
|
|
+ this.positions.push(`en.path_ like '%${v[i][v[i].length - 1]}%'`);
|
|
|
+ this.otherPositions.push(
|
|
|
+ `ee.positions_ like '%${v[i][v[i].length - 1]}%'`
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
- transfer(oldArr) {
|
|
|
- const newArr = oldArr[0].map((col, i) => oldArr.map(row => row[i]));
|
|
|
- return newArr;
|
|
|
- },
|
|
|
handleFunc(e) {
|
|
|
- this.simplifyPosition(e)
|
|
|
- this.positionsInfoData()
|
|
|
+ this.simplifyPosition(e);
|
|
|
+ this.positionsInfoData();
|
|
|
+ this.employeeInfoData();
|
|
|
+ this.degreeGradeInfoData();
|
|
|
},
|
|
|
- /**
|
|
|
- * 使用match方法实现模糊查询
|
|
|
- * @param {Array} list 进行查询的数组
|
|
|
- * @param {String} keyWord 查询的关键词
|
|
|
- * @return {Array} 查询的结果
|
|
|
- */
|
|
|
- fuzzyQuery(list, keyWord) {
|
|
|
- var arr = [];
|
|
|
- for (var i = 0; i < list.length; i++) {
|
|
|
- if (list[i].match(keyWord) != null) {
|
|
|
- arr.push(list[i]);
|
|
|
- }
|
|
|
- }
|
|
|
- return arr.length == o ? false : true;
|
|
|
- }
|
|
|
-
|
|
|
},
|
|
|
created() {
|
|
|
const initendDate = new Date();
|
|
|
@@ -674,22 +708,17 @@ export default {
|
|
|
new Date(this.startDate),
|
|
|
new Date(
|
|
|
initendDate.getFullYear() +
|
|
|
- "-" +
|
|
|
- (initendDate.getMonth() + 1) +
|
|
|
- "-" +
|
|
|
- initendDate.getDate()
|
|
|
+ "-" +
|
|
|
+ (initendDate.getMonth() + 1) +
|
|
|
+ "-" +
|
|
|
+ initendDate.getDate()
|
|
|
),
|
|
|
];
|
|
|
-
|
|
|
- this.employeeInfoData();
|
|
|
- this.degreeGradeInfoData();
|
|
|
- this.getTtaskMattersData();
|
|
|
-
|
|
|
},
|
|
|
mounted() {
|
|
|
+ // this.handleFunc();
|
|
|
// this.initData()
|
|
|
// this.positionsInfoData()
|
|
|
-
|
|
|
// this.initChart();
|
|
|
},
|
|
|
};
|