|
@@ -29,14 +29,15 @@
|
|
<el-col :span="7" class="userinfo_box" v-loading="send_site_info_loading">
|
|
<el-col :span="7" class="userinfo_box" v-loading="send_site_info_loading">
|
|
<el-row :gutter="40" style="margin:0;padding:0;">
|
|
<el-row :gutter="40" style="margin:0;padding:0;">
|
|
<el-col :span="24" class="user_info">
|
|
<el-col :span="24" class="user_info">
|
|
- <div class="headimg fl" style=" margin-right: 10px;cursor:pointer;" v-if="deptManagerRouters" @click="$router.push({ name: 'company_info',params:{activeName: 'second'}})">
|
|
|
|
|
|
+ <!-- <div class="headimg fl" style=" margin-right: 10px;cursor:pointer;" v-if="deptManagerRouters" @click="$router.push({ name: 'company_info',params:{activeName: 'second'}})">
|
|
<userImage :id="user_info.id" :img_url="user_info.img_url" :user_name="user_info.name" width="50px" height="50px"></userImage>
|
|
<userImage :id="user_info.id" :img_url="user_info.img_url" :user_name="user_info.name" width="50px" height="50px"></userImage>
|
|
- </div>
|
|
|
|
- <div class="headimg fl" style=" margin-right: 10px;" v-else>
|
|
|
|
|
|
+ </div> -->
|
|
|
|
+ <div class="headimg fl" style=" margin-right: 10px;">
|
|
<userImage :id="user_info.id" :img_url="user_info.img_url" :user_name="user_info.name" width="50px" height="50px"></userImage>
|
|
<userImage :id="user_info.id" :img_url="user_info.img_url" :user_name="user_info.name" width="50px" height="50px"></userImage>
|
|
</div>
|
|
</div>
|
|
<div class="greetings">
|
|
<div class="greetings">
|
|
|
|
|
|
|
|
+ <!-- <div ref="dept9999"> -->
|
|
<div>
|
|
<div>
|
|
<wwOpenDAta type="userName" :openid="user_info.name"></wwOpenDAta>
|
|
<wwOpenDAta type="userName" :openid="user_info.name"></wwOpenDAta>
|
|
<!-- {{user_info.name}} -->
|
|
<!-- {{user_info.name}} -->
|
|
@@ -77,8 +78,8 @@
|
|
<el-col :span="8" style="margin-top:34px;padding:0;border-right: 1px #cecccc solid;height:58px;" v-loading="authorityManagerHeaderLoad">
|
|
<el-col :span="8" style="margin-top:34px;padding:0;border-right: 1px #cecccc solid;height:58px;" v-loading="authorityManagerHeaderLoad">
|
|
<el-col :gutter="50" style="margin:0;padding:0;" class="quick_button_box">
|
|
<el-col :gutter="50" style="margin:0;padding:0;" class="quick_button_box">
|
|
<div style="display:flex;justify-content: space-around;">
|
|
<div style="display:flex;justify-content: space-around;">
|
|
- <p style="text-align:center;cursor:pointer;margin: 0;" @click="$router.push({ path: '/integral_statistics' })"><b style="color:#26A2FF;font-size:27px;">{{authorityManagerHeaders.b?authorityManagerHeaders.b:'0'}}</b><br><span style="color:#606266;font-size:14px;padding-top:8px;display: inline-block;">本月B分</span></p>
|
|
|
|
- <p style="text-align:center;cursor:pointer;margin: 0;" @click="$router.push({ path: '/integral_statistics' })"><b style="color:#26A2FF;font-size:27px;">{{authorityManagerHeaders.a?authorityManagerHeaders.a:'0'}}</b><br><span style="color:#606266;font-size:14px;padding-top:8px;display: inline-block;">本月A分</span></p>
|
|
|
|
|
|
+ <p style="text-align:center;cursor:pointer;margin: 0;" @click="$router.push({ path: '/individual_statistics' })"><b style="color:#26A2FF;font-size:27px;">{{authorityManagerHeaders.b?authorityManagerHeaders.b:'0'}}</b><br><span style="color:#606266;font-size:14px;padding-top:8px;display: inline-block;">本月B分</span></p>
|
|
|
|
+ <p style="text-align:center;cursor:pointer;margin: 0;" @click="$router.push({ path: '/individual_statistics' })"><b style="color:#26A2FF;font-size:27px;">{{authorityManagerHeaders.a?authorityManagerHeaders.a:'0'}}</b><br><span style="color:#606266;font-size:14px;padding-top:8px;display: inline-block;">本月A分</span></p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -147,7 +148,8 @@
|
|
<b class="title" style="margin-bottom:15px;display:block">积分构成</b>
|
|
<b class="title" style="margin-bottom:15px;display:block">积分构成</b>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="5" style="position: absolute;top:40px;left:10px;z-index: 1;">
|
|
|
|
|
|
+ <el-col :span="5" style="position: absolute;top:40px;left:10px;z-index: 1;" v-if="!employeeRout">
|
|
|
|
+ <deptData v-if="toPdept1 && toPdept1!=0" :refsName="$refs.dept1" :toPdept="toPdept1"></deptData>
|
|
<!-- <wwOpenDAta type="departmentName" :openid="dept_tree.name"></wwOpenDAta> -->
|
|
<!-- <wwOpenDAta type="departmentName" :openid="dept_tree.name"></wwOpenDAta> -->
|
|
<el-cascader
|
|
<el-cascader
|
|
v-model="dept_name1"
|
|
v-model="dept_name1"
|
|
@@ -161,8 +163,8 @@
|
|
clearable
|
|
clearable
|
|
>
|
|
>
|
|
<template slot-scope="{ node, data }">
|
|
<template slot-scope="{ node, data }">
|
|
- <span :v-model="dept_nameArr(data,node)" >
|
|
|
|
- <wwOpenDAta type="departmentName" :openid="data.name" :id="data.id"></wwOpenDAta>
|
|
|
|
|
|
+ <span>
|
|
|
|
+ <wwOpenDAta type="departmentName" :openid="data.name"></wwOpenDAta>
|
|
</span>
|
|
</span>
|
|
<!-- <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> -->
|
|
<!-- <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> -->
|
|
</template>
|
|
</template>
|
|
@@ -187,17 +189,26 @@
|
|
<el-checkbox v-model="exclusiveMonthChecked">不包含自动积分加分项</el-checkbox>
|
|
<el-checkbox v-model="exclusiveMonthChecked">不包含自动积分加分项</el-checkbox>
|
|
</el-col>
|
|
</el-col>
|
|
<div v-loading="monthlyIntegralloading">
|
|
<div v-loading="monthlyIntegralloading">
|
|
- <el-col :span="5" style="position: absolute;top:40px;left:10px;z-index: 1;">
|
|
|
|
|
|
+ <el-col :span="5" style="position: absolute;top:40px;left:10px;z-index: 1;" v-if="!employeeRout">
|
|
|
|
+ <deptData v-if="toPdept2 && toPdept2!=0" :refsName="$refs.dept2" :toPdept="toPdept2"></deptData>
|
|
<el-cascader
|
|
<el-cascader
|
|
v-model="dept_name2"
|
|
v-model="dept_name2"
|
|
:options="dept_tree"
|
|
:options="dept_tree"
|
|
|
|
+ :props="{ label: 'name', value: 'id'}"
|
|
@change="monthlyIntegralchange"
|
|
@change="monthlyIntegralchange"
|
|
ref="dept2"
|
|
ref="dept2"
|
|
filterable
|
|
filterable
|
|
change-on-select
|
|
change-on-select
|
|
placeholder="请选择部门"
|
|
placeholder="请选择部门"
|
|
clearable
|
|
clearable
|
|
- ></el-cascader>
|
|
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="{ node, data }">
|
|
|
|
+ <span>
|
|
|
|
+ <wwOpenDAta type="departmentName" :openid="data.name"></wwOpenDAta>
|
|
|
|
+ </span>
|
|
|
|
+ <!-- <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> -->
|
|
|
|
+ </template>
|
|
|
|
+ </el-cascader>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
<div class="nopoint_box" style="height:400px;" v-if="monthlyIntegralnone">
|
|
<div class="nopoint_box" style="height:400px;" v-if="monthlyIntegralnone">
|
|
@@ -222,23 +233,32 @@
|
|
</el-row>
|
|
</el-row>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
- <el-row class="raiders_box" style="margin-bottom:20px;">
|
|
|
|
|
|
+ <el-row class="raiders_box" style="margin-bottom:20px;" v-if="!employeeRout">
|
|
<el-row style="position: relative;">
|
|
<el-row style="position: relative;">
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<b class="title" style="margin-bottom:15px;display:block">管理者奖扣任务执行情况</b>
|
|
<b class="title" style="margin-bottom:15px;display:block">管理者奖扣任务执行情况</b>
|
|
</el-col>
|
|
</el-col>
|
|
<div v-loading="ManagerSAwardloading">
|
|
<div v-loading="ManagerSAwardloading">
|
|
<el-col :span="5" style="position: absolute;top:40px;left:10px;z-index: 1;">
|
|
<el-col :span="5" style="position: absolute;top:40px;left:10px;z-index: 1;">
|
|
|
|
+ <deptData v-if="toPdept3 && toPdept3!=0" :refsName="$refs.dept3" :toPdept="toPdept3"></deptData>
|
|
<el-cascader
|
|
<el-cascader
|
|
v-model="dept_name3"
|
|
v-model="dept_name3"
|
|
:options="dept_tree"
|
|
:options="dept_tree"
|
|
|
|
+ :props="{ label: 'name', value: 'id'}"
|
|
@change="ManagerSAwardlchange"
|
|
@change="ManagerSAwardlchange"
|
|
ref="dept3"
|
|
ref="dept3"
|
|
filterable
|
|
filterable
|
|
change-on-select
|
|
change-on-select
|
|
placeholder="请选择部门"
|
|
placeholder="请选择部门"
|
|
clearable
|
|
clearable
|
|
- ></el-cascader>
|
|
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="{ node, data }">
|
|
|
|
+ <span>
|
|
|
|
+ <wwOpenDAta type="departmentName" :openid="data.name"></wwOpenDAta>
|
|
|
|
+ </span>
|
|
|
|
+ <!-- <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> -->
|
|
|
|
+ </template>
|
|
|
|
+ </el-cascader>
|
|
</el-col>
|
|
</el-col>
|
|
<div class="nopoint_box" style="height:400px;" v-if="ManagerSAwardnone">
|
|
<div class="nopoint_box" style="height:400px;" v-if="ManagerSAwardnone">
|
|
<div class="noimg" style="width: 150px;height: 170px;margin-top:90px;"></div>
|
|
<div class="noimg" style="width: 150px;height: 170px;margin-top:90px;"></div>
|
|
@@ -273,7 +293,7 @@
|
|
</div>
|
|
</div>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
- <el-row class="readyapprove_box" style="background-color:#fff;" v-loading="examineAndApproveloading">
|
|
|
|
|
|
+ <el-row class="readyapprove_box" style="background-color:#fff;" v-loading="examineAndApproveloading" v-if="!employeeRout">
|
|
<div class="grid-content bg-purple" style="background-color:#fff;padding:20px;">
|
|
<div class="grid-content bg-purple" style="background-color:#fff;padding:20px;">
|
|
<span class="title">待我审批的 <span v-if="examineAndApproveList.length > 0">({{examineAndApproveindex>0?examineAndApproveindex:''}})</span></span>
|
|
<span class="title">待我审批的 <span v-if="examineAndApproveList.length > 0">({{examineAndApproveindex>0?examineAndApproveindex:''}})</span></span>
|
|
<div v-show="false">
|
|
<div v-show="false">
|
|
@@ -293,7 +313,7 @@
|
|
style="margin-right:8px"
|
|
style="margin-right:8px"
|
|
></userImage>
|
|
></userImage>
|
|
<div class="rightexamineAndApproveList">
|
|
<div class="rightexamineAndApproveList">
|
|
- <p style="width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#303133;font-size:16px"><b>{{item.employee_name}}{{item.source_type==1?'的积分任务':item.source_type==2?'的积分申请':item.source_type==3?'的积分录入':item.source_type==4?'的绩效工作':''}}</b></p>
|
|
|
|
|
|
+ <p style="width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#303133;font-size:16px"><b><wwOpenDAta type="userName" :openid="item.employee_name"></wwOpenDAta>{{item.source_type==1?'的积分任务':item.source_type==2?'的积分申请':item.source_type==3?'的积分录入':item.source_type==4?'的绩效工作':''}}</b></p>
|
|
<p style="font-size:13px;line-height:20px;color:rgb(48, 49, 51);overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2; ">{{item.remark.rule || item.remark.customize}}</p>
|
|
<p style="font-size:13px;line-height:20px;color:rgb(48, 49, 51);overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2; ">{{item.remark.rule || item.remark.customize}}</p>
|
|
<div style="display:flex;padding-bottom:16px;justify-content: space-between;">
|
|
<div style="display:flex;padding-bottom:16px;justify-content: space-between;">
|
|
<span style="color:#909399">{{item.event_time}}</span>
|
|
<span style="color:#909399">{{item.event_time}}</span>
|
|
@@ -309,17 +329,16 @@
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
<!-- 本周考勤模块 -->
|
|
<!-- 本周考勤模块 -->
|
|
- <el-row class="pointsevent_box">
|
|
|
|
|
|
+ <!-- <el-row class="pointsevent_box">
|
|
<div class="grid-content bg-purple" v-loading="weekChecking_inloading" style="background:#fff;padding: 20px 20px 0;">
|
|
<div class="grid-content bg-purple" v-loading="weekChecking_inloading" style="background:#fff;padding: 20px 20px 0;">
|
|
<span class="title">本周考勤</span>
|
|
<span class="title">本周考勤</span>
|
|
<div style="display:flex;flex-wrap:wrap;justify-content: space-around;padding-bottom:20px">
|
|
<div style="display:flex;flex-wrap:wrap;justify-content: space-around;padding-bottom:20px">
|
|
- <!-- <div v-for="(item,index) in weekChecking_ins" :key="index" style="width:45%;" @click="deptManagerRouters?$router.push({ path: '/attendance_statisticnew' }):''"> -->
|
|
|
|
<div v-for="(item,index) in weekChecking_ins" :key="index" style="width:45%;">
|
|
<div v-for="(item,index) in weekChecking_ins" :key="index" style="width:45%;">
|
|
<p class="weekChecking_inStyle"><b style="font-size:20px;">{{item.val}}</b><br> {{item.name}}</p>
|
|
<p class="weekChecking_inStyle"><b style="font-size:20px;">{{item.val}}</b><br> {{item.name}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </el-row>
|
|
|
|
|
|
+ </el-row> -->
|
|
|
|
|
|
<el-row class="pointsevent_box">
|
|
<el-row class="pointsevent_box">
|
|
<div class="grid-content bg-purple" v-loading="highestPrizeBuckleloading" style="background:#fff;padding: 20px 20px 0;">
|
|
<div class="grid-content bg-purple" v-loading="highestPrizeBuckleloading" style="background:#fff;padding: 20px 20px 0;">
|
|
@@ -340,7 +359,7 @@
|
|
style="margin-right:8px"
|
|
style="margin-right:8px"
|
|
></userImage>
|
|
></userImage>
|
|
<div class="rightexamineAndApproveList" style="border:0px">
|
|
<div class="rightexamineAndApproveList" style="border:0px">
|
|
- <p style="width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#73767c;font-size:16px;display:flex;justify-content: space-between;"><b style="color:#303133;font-size:16px;">{{prize.name}}</b><span style="color:#26A2FF;font-size:16px;"><span v-if="prize.point>0">+</span>{{prize.point}} B分</span></p>
|
|
|
|
|
|
+ <p style="width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#73767c;font-size:16px;display:flex;justify-content: space-between;"><b style="color:#303133;font-size:16px;"><wwOpenDAta type="userName" :openid="prize.name"></wwOpenDAta></b><span style="color:#26A2FF;font-size:16px;"><span v-if="prize.point>0">+</span>{{prize.point}} B分</span></p>
|
|
<p style="font-size:13px;line-height:20px;color:rgb(48, 49, 51);overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2; ">{{prize.remark? prize.remark.customize : ''}}</p>
|
|
<p style="font-size:13px;line-height:20px;color:rgb(48, 49, 51);overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2; ">{{prize.remark? prize.remark.customize : ''}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -365,7 +384,7 @@
|
|
style="margin-right:8px"
|
|
style="margin-right:8px"
|
|
></userImage>
|
|
></userImage>
|
|
<div class="rightexamineAndApproveList">
|
|
<div class="rightexamineAndApproveList">
|
|
- <p style="width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#73767c;font-size:16px;display:flex;justify-content: space-between;"><b style="color:#303133;font-size:16px;">{{buckle.name}}</b><span style="color:#FF9600;font-size:16px;">{{buckle.point}} B分</span></p>
|
|
|
|
|
|
+ <p style="width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#73767c;font-size:16px;display:flex;justify-content: space-between;"><b style="color:#303133;font-size:16px;"><wwOpenDAta type="userName" :openid="buckle.name"></wwOpenDAta></b><span style="color:#FF9600;font-size:16px;">{{buckle.point}} B分</span></p>
|
|
<p style="font-size:13px;line-height:20px;color:rgb(48, 49, 51);overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2;padding-bottom:15px; ">{{buckle.remark?buckle.remark.customize:''}}</p>
|
|
<p style="font-size:13px;line-height:20px;color:rgb(48, 49, 51);overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2;padding-bottom:15px; ">{{buckle.remark?buckle.remark.customize:''}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -533,8 +552,9 @@
|
|
examineAndApproveloading:false,//审批loading
|
|
examineAndApproveloading:false,//审批loading
|
|
examineAndApproveList:[],//审批列表
|
|
examineAndApproveList:[],//审批列表
|
|
examineAndApproveindex:0,//审批列表数量
|
|
examineAndApproveindex:0,//审批列表数量
|
|
- deptManagerRouters:JSON.parse(localStorage.getItem("deptManagerRouters")),//是否部门管理者权限
|
|
|
|
- creatorJurisdiction:JSON.parse(localStorage.getItem("creatorJurisdiction")),//是否创始人权限
|
|
|
|
|
|
+ deptManagerRouters:!this.$authoritys('dept_manager'),//是否部门管理者权限
|
|
|
|
+ creatorJurisdiction:this.$authoritys('creator'),//是否创始人权限
|
|
|
|
+ employeeRout:this.$authoritys('employee'),//员工权限
|
|
user_infos:this.$store.getters.user_info,//拿到当前登录人员信息,隐藏部门管理者等
|
|
user_infos:this.$store.getters.user_info,//拿到当前登录人员信息,隐藏部门管理者等
|
|
dialogProfileVisibleinit: false,
|
|
dialogProfileVisibleinit: false,
|
|
compnayInfoForm: {
|
|
compnayInfoForm: {
|
|
@@ -604,6 +624,11 @@
|
|
// index_introduction: localStorage.getItem('index_introduction'),
|
|
// index_introduction: localStorage.getItem('index_introduction'),
|
|
// index_course: localStorage.getItem('index_course'),
|
|
// index_course: localStorage.getItem('index_course'),
|
|
pastdueDate:null,
|
|
pastdueDate:null,
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ toPdept1:0,//选择部门的遮到
|
|
|
|
+ toPdept2:0,//选择部门的遮到
|
|
|
|
+ toPdept3:0,//选择部门的遮到
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -630,14 +655,13 @@
|
|
let H = document.getElementsByClassName('main-content')[0].scrollTop
|
|
let H = document.getElementsByClassName('main-content')[0].scrollTop
|
|
if(this.rollOne && H>=100){
|
|
if(this.rollOne && H>=100){
|
|
this.rollOne = false
|
|
this.rollOne = false
|
|
- if(this.creatorJurisdiction){
|
|
|
|
- this.monthlyIntegral()//月度积分
|
|
|
|
- this.ManagerSAward()//管理者奖扣任务执行情况
|
|
|
|
- }else{
|
|
|
|
- this.monthlyIntegral()//月度积分
|
|
|
|
- this.ManagerSAward()//管理者奖扣任务执行情况
|
|
|
|
|
|
+ this.monthlyIntegral()//月度积分
|
|
|
|
+ if(!this.creatorJurisdiction && !this.employeeRout){//创始人不请求奖扣分最高积分事件
|
|
this.highestPrizeBuckle()//奖扣分最高积分事件
|
|
this.highestPrizeBuckle()//奖扣分最高积分事件
|
|
}
|
|
}
|
|
|
|
+ if(!this.employeeRout){//员工不请求管理者奖扣任务执行情况
|
|
|
|
+ this.ManagerSAward(); //管理者奖扣任务执行情况
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -735,92 +759,115 @@
|
|
this.weekChecking_inloading = false
|
|
this.weekChecking_inloading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
-
|
|
|
|
//管理者奖扣统计
|
|
//管理者奖扣统计
|
|
ManagerSAwardCharts(Name,Award,Deduct){//管理着奖扣统计表
|
|
ManagerSAwardCharts(Name,Award,Deduct){//管理着奖扣统计表
|
|
const chart = this.$refs.ManagerSAwardChart
|
|
const chart = this.$refs.ManagerSAwardChart
|
|
- if(chart){
|
|
|
|
- const myChart = ECharts.init(chart)
|
|
|
|
- const option = {
|
|
|
|
- tooltip: {
|
|
|
|
- trigger: 'axis',
|
|
|
|
- axisPointer: {
|
|
|
|
- // type: 'cross',
|
|
|
|
- crossStyle: {
|
|
|
|
- color: '#999'
|
|
|
|
|
|
+ console.log(Name)
|
|
|
|
+ // WWOpenData.prefetch({ items }, (err, data) => {
|
|
|
|
+ // if (err) {
|
|
|
|
+ // console.log(err);
|
|
|
|
+ // return reject(err);
|
|
|
|
+ // }
|
|
|
|
+ // console.log(data);
|
|
|
|
+ // resolve(data);
|
|
|
|
+ // });
|
|
|
|
+ // var Name = [];
|
|
|
|
+ if(chart){
|
|
|
|
+ const myChart = ECharts.init(chart)
|
|
|
|
+ const option = {
|
|
|
|
+ // tooltip: {
|
|
|
|
+ // trigger: 'axis',
|
|
|
|
+ // axisPointer: {
|
|
|
|
+ // // type: 'cross',
|
|
|
|
+ // crossStyle: {
|
|
|
|
+ // color: '#999'
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ // },
|
|
|
|
+ tooltip: {
|
|
|
|
+ trigger: 'axis',
|
|
|
|
+ formatter: (params) => {
|
|
|
|
+ var htmlStr ='<div>';
|
|
|
|
+ for(let i in params){
|
|
|
|
+ htmlStr += '<span style="display:inline-block;background-color:'+params[i].color+';width:8px;height:8px;border-radius:50%;margin:0 5px;"></span>'
|
|
|
|
+ htmlStr += '<span>'+params[i].seriesName+':</span>';
|
|
|
|
+ htmlStr += '<span style="margin:0 5px 0 3px;">'+params[i].value+'</span><br>';
|
|
}
|
|
}
|
|
- }
|
|
|
|
- },
|
|
|
|
- grid: {//表格偏移量
|
|
|
|
- // top: '5% '
|
|
|
|
- left:'5%',
|
|
|
|
- right:'0%'
|
|
|
|
- },
|
|
|
|
- toolbox: {
|
|
|
|
- feature: {
|
|
|
|
- // dataView: {show: false, readOnly: true},
|
|
|
|
- // magicType: {show: false, type: ['line', 'bar']},
|
|
|
|
- // restore: {show: false},
|
|
|
|
- // saveAsImage: {show: false}
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- color:['#26A2FF','#FFC100'],
|
|
|
|
- legend: {
|
|
|
|
- right: '0%',//设置位置
|
|
|
|
- data: ['奖分', '扣分']
|
|
|
|
- },
|
|
|
|
- xAxis: [
|
|
|
|
- {
|
|
|
|
- type: 'category',
|
|
|
|
- data: Name,
|
|
|
|
- axisPointer: {
|
|
|
|
- type: 'shadow',
|
|
|
|
- },
|
|
|
|
- axisLabel:{
|
|
|
|
- interval:0,//横轴信息全部显示
|
|
|
|
- // rotate:-30,//-30度角倾斜显示
|
|
|
|
- },
|
|
|
|
- axisLine:{//去掉X轴线
|
|
|
|
- show:false
|
|
|
|
- },
|
|
|
|
- axisTick:{//去掉X轴刻度
|
|
|
|
- show:false
|
|
|
|
- },
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- yAxis: [
|
|
|
|
- {
|
|
|
|
- type: 'value',
|
|
|
|
- axisLabel: {
|
|
|
|
- formatter: '{value}'
|
|
|
|
- },
|
|
|
|
- axisLine:{//去掉Y轴线
|
|
|
|
- show:false
|
|
|
|
- },
|
|
|
|
- axisTick:{//去掉Y轴刻度
|
|
|
|
- show:false
|
|
|
|
- },
|
|
|
|
|
|
+ htmlStr += '</div>';
|
|
|
|
+ return htmlStr;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- ],
|
|
|
|
- series: [
|
|
|
|
- { name: '奖分',
|
|
|
|
- type: 'bar',
|
|
|
|
- barWidth : 14,//柱图宽度
|
|
|
|
- barGap:'0%',//柱图间距
|
|
|
|
- data: Award
|
|
|
|
|
|
+ grid: {//表格偏移量
|
|
|
|
+ // top: '5% '
|
|
|
|
+ left:'5%',
|
|
|
|
+ right:'0%'
|
|
},
|
|
},
|
|
- { name: '扣分',
|
|
|
|
- type: 'bar',
|
|
|
|
- barWidth : 14,//柱图宽度
|
|
|
|
- barGap:'0%',//柱图间距
|
|
|
|
- data: Deduct
|
|
|
|
|
|
+ toolbox: {
|
|
|
|
+ feature: {
|
|
|
|
+ // dataView: {show: false, readOnly: true},
|
|
|
|
+ // magicType: {show: false, type: ['line', 'bar']},
|
|
|
|
+ // restore: {show: false},
|
|
|
|
+ // saveAsImage: {show: false}
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- ]
|
|
|
|
- };
|
|
|
|
- myChart.setOption(option)
|
|
|
|
- }
|
|
|
|
|
|
+ color:['#26A2FF','#FFC100'],
|
|
|
|
+ legend: {
|
|
|
|
+ right: '0%',//设置位置
|
|
|
|
+ data: ['奖分', '扣分']
|
|
|
|
+ },
|
|
|
|
+ xAxis: [
|
|
|
|
+ {
|
|
|
|
+ type: 'category',
|
|
|
|
+ data: Name,
|
|
|
|
+ axisPointer: {
|
|
|
|
+ type: 'shadow',
|
|
|
|
+ },
|
|
|
|
+ axisLabel:{
|
|
|
|
+ interval:0,//横轴信息全部显示
|
|
|
|
+ // rotate:-30,//-30度角倾斜显示
|
|
|
|
+ },
|
|
|
|
+ axisLine:{//去掉X轴线
|
|
|
|
+ show:false
|
|
|
|
+ },
|
|
|
|
+ axisTick:{//去掉X轴刻度
|
|
|
|
+ show:false
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ yAxis: [
|
|
|
|
+ {
|
|
|
|
+ type: 'value',
|
|
|
|
+ axisLabel: {
|
|
|
|
+ formatter: '{value}'
|
|
|
|
+ },
|
|
|
|
+ axisLine:{//去掉Y轴线
|
|
|
|
+ show:false
|
|
|
|
+ },
|
|
|
|
+ axisTick:{//去掉Y轴刻度
|
|
|
|
+ show:false
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ series: [
|
|
|
|
+ { name: '奖分',
|
|
|
|
+ type: 'bar',
|
|
|
|
+ barWidth : 14,//柱图宽度
|
|
|
|
+ barGap:'0%',//柱图间距
|
|
|
|
+ data: Award
|
|
|
|
+ },
|
|
|
|
+ { name: '扣分',
|
|
|
|
+ type: 'bar',
|
|
|
|
+ barWidth : 14,//柱图宽度
|
|
|
|
+ barGap:'0%',//柱图间距
|
|
|
|
+ data: Deduct
|
|
|
|
+ },
|
|
|
|
+ ]
|
|
|
|
+ };
|
|
|
|
+ myChart.setOption(option)
|
|
|
|
+ }
|
|
},
|
|
},
|
|
ManagerSAwardlchange(val){//选中规则
|
|
ManagerSAwardlchange(val){//选中规则
|
|
|
|
+ this.toPdept3 = val[val.length-1]
|
|
let valItem = 0
|
|
let valItem = 0
|
|
for(let i in val){
|
|
for(let i in val){
|
|
valItem = val[i]
|
|
valItem = val[i]
|
|
@@ -845,14 +892,15 @@
|
|
.then(res => {
|
|
.then(res => {
|
|
let datas = res.data.data
|
|
let datas = res.data.data
|
|
listslength = datas.list
|
|
listslength = datas.list
|
|
- let histogramName = []
|
|
|
|
|
|
+ let items = []
|
|
let histogramAward = []
|
|
let histogramAward = []
|
|
let histogramDeduct = []
|
|
let histogramDeduct = []
|
|
for(let i in datas.list){
|
|
for(let i in datas.list){
|
|
|
|
+ console.log(datas.list[i].name)
|
|
let arr = {}//转结构
|
|
let arr = {}//转结构
|
|
arr.type = "userName",
|
|
arr.type = "userName",
|
|
arr.id = datas.list[i].name
|
|
arr.id = datas.list[i].name
|
|
- histogramName.push(arr)
|
|
|
|
|
|
+ items.push(arr)
|
|
histogramAward.push(datas.list[i].reward_point)
|
|
histogramAward.push(datas.list[i].reward_point)
|
|
histogramDeduct.push(datas.list[i].deduction_point)
|
|
histogramDeduct.push(datas.list[i].deduction_point)
|
|
}
|
|
}
|
|
@@ -863,17 +911,9 @@
|
|
this.ManagerSAwardlList[4].val = datas.manager_count
|
|
this.ManagerSAwardlList[4].val = datas.manager_count
|
|
this.ManagerSAwardlList[5].val = datas.pass_count
|
|
this.ManagerSAwardlList[5].val = datas.pass_count
|
|
this.ManagerSAwardlList[6].val = datas.fail_count
|
|
this.ManagerSAwardlList[6].val = datas.fail_count
|
|
- console.log(histogramName)
|
|
|
|
|
|
+ console.log(items)
|
|
console.log(histogramAward)
|
|
console.log(histogramAward)
|
|
console.log(histogramDeduct)
|
|
console.log(histogramDeduct)
|
|
- WWOpenData.prefetch({ histogramName }, (err, data) => {
|
|
|
|
- if (err) {
|
|
|
|
- console.log(err);
|
|
|
|
- return reject(err);
|
|
|
|
- }
|
|
|
|
- console.log(data);
|
|
|
|
- resolve(data);
|
|
|
|
- });
|
|
|
|
// WWOpenData.prefetch({ histogramName }, (err, data) => {
|
|
// WWOpenData.prefetch({ histogramName }, (err, data) => {
|
|
// if (err) {
|
|
// if (err) {
|
|
// console.log(err);
|
|
// console.log(err);
|
|
@@ -884,7 +924,19 @@
|
|
// WWOpenData.initCanvas()
|
|
// WWOpenData.initCanvas()
|
|
// }
|
|
// }
|
|
// });
|
|
// });
|
|
- this.ManagerSAwardCharts(histogramName,histogramAward,histogramDeduct)
|
|
|
|
|
|
+
|
|
|
|
+ WWOpenData.prefetch({ items }, (err, data) => {
|
|
|
|
+ if (err) {
|
|
|
|
+ console.log(err);
|
|
|
|
+ }
|
|
|
|
+ var Name = data.items.map($0=>$0.data) // 这个就是转好的,直接丢到 echarts
|
|
|
|
+ console.log(Name)
|
|
|
|
+ console.log(data)
|
|
|
|
+ if (WWOpenData.initCanvas) {
|
|
|
|
+ WWOpenData.initCanvas()
|
|
|
|
+ }
|
|
|
|
+ this.ManagerSAwardCharts(Name,histogramAward,histogramDeduct)
|
|
|
|
+ });
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
if(listslength.length == 0){
|
|
if(listslength.length == 0){
|
|
this.ManagerSAwardnone = true
|
|
this.ManagerSAwardnone = true
|
|
@@ -985,6 +1037,7 @@
|
|
},
|
|
},
|
|
//月度积分
|
|
//月度积分
|
|
monthlyIntegralchange(val){
|
|
monthlyIntegralchange(val){
|
|
|
|
+ this.toPdept2 = val[val.length-1]
|
|
if(val.length == 0){
|
|
if(val.length == 0){
|
|
this.exclusiveMonthBranch = 0
|
|
this.exclusiveMonthBranch = 0
|
|
}else{
|
|
}else{
|
|
@@ -1003,7 +1056,13 @@
|
|
this.monthlyIntegralloading = true
|
|
this.monthlyIntegralloading = true
|
|
let params = {}
|
|
let params = {}
|
|
let listslength = []
|
|
let listslength = []
|
|
- params.dept_id=this.exclusiveMonthBranch,
|
|
|
|
|
|
+ if(this.employeeRout){
|
|
|
|
+ console.log(this.$store.getters.user_info.id)
|
|
|
|
+ params.employee_id = this.$store.getters.user_info.id;
|
|
|
|
+ }else{
|
|
|
|
+ params.dept_id = this.exclusiveMonthBranch
|
|
|
|
+ }
|
|
|
|
+ // params.dept_id=this.exclusiveMonthBranch,
|
|
params.month= this.$moment().format('YYYY-MM')
|
|
params.month= this.$moment().format('YYYY-MM')
|
|
if(this.exclusiveMonthChecked){
|
|
if(this.exclusiveMonthChecked){
|
|
params.include_fixed = 1
|
|
params.include_fixed = 1
|
|
@@ -1047,18 +1106,12 @@
|
|
this.monthlyIntegralloading = false
|
|
this.monthlyIntegralloading = false
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- dept_nameArr(data,node){
|
|
|
|
- // var gtx=document.getElementById("gtx-host")
|
|
|
|
- // console.log(gtx)
|
|
|
|
- // let deptid = document.getElementById(data.id.toString())
|
|
|
|
- // console.log(deptid)
|
|
|
|
- // console.log(this.$refs[data.id.toString()])
|
|
|
|
- },
|
|
|
|
|
|
+ // clickDept(refsNAme){
|
|
|
|
+ // this.$refs.refsNAme.dropDownVisible = true;
|
|
|
|
+ // },
|
|
//积分构成
|
|
//积分构成
|
|
dept1_null(val){
|
|
dept1_null(val){
|
|
- console.log(this.$refs['dept1'].currentLabels)
|
|
|
|
- console.log(this.$refs['dept1'].getCheckedNodes())
|
|
|
|
- console.log(this.$refs.dept1)
|
|
|
|
|
|
+ this.toPdept1 = val[val.length-1]
|
|
let valItem = 0
|
|
let valItem = 0
|
|
for(let i in val){
|
|
for(let i in val){
|
|
valItem = val[i]
|
|
valItem = val[i]
|
|
@@ -1192,6 +1245,9 @@
|
|
params.dept_id=0,
|
|
params.dept_id=0,
|
|
params.month= this.$moment().format('YYYY-MM')
|
|
params.month= this.$moment().format('YYYY-MM')
|
|
}
|
|
}
|
|
|
|
+ if(this.employeeRout){
|
|
|
|
+ params.employee_id = this.$store.getters.user_info.id;
|
|
|
|
+ }
|
|
this.$http('get','/api/integral/statistics/pie/b',params,'v2').then(res => {
|
|
this.$http('get','/api/integral/statistics/pie/b',params,'v2').then(res => {
|
|
let lists = res.data.data.list
|
|
let lists = res.data.data.list
|
|
listslength = lists
|
|
listslength = lists
|
|
@@ -1598,7 +1654,8 @@
|
|
this.site_infoTIme(res.expire_time)
|
|
this.site_infoTIme(res.expire_time)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- this.overdueToken()
|
|
|
|
|
|
+ // this.overdueToken()//长时间免登,重新请求token
|
|
|
|
+
|
|
// window.addEventListener("popstate", this.popstate, false)
|
|
// window.addEventListener("popstate", this.popstate, false)
|
|
// 拜年动画
|
|
// 拜年动画
|
|
// if(!localStorage.getItem('isPlayFlash')){
|
|
// if(!localStorage.getItem('isPlayFlash')){
|
|
@@ -1617,6 +1674,16 @@
|
|
// }
|
|
// }
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+ if(this.employeeRout){
|
|
|
|
+ this.inCommonUse = []
|
|
|
|
+ this.inCommonUse.push(
|
|
|
|
+ {name:'申请积分',image:'/static/images/a_apply.png',push:'/apply_list'},
|
|
|
|
+ {name:'领任务',image:'/static/images/task_hall.png',push:'/get_task'},
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ // console.log('this.$refs.dept9999')
|
|
|
|
+ // console.log(this.$refs.dept9999.firstChild.innerHTML)
|
|
|
|
+ // console.log(this.$refs.dept9999.textContent)
|
|
console.log(WWOpenData)
|
|
console.log(WWOpenData)
|
|
if(JSON.parse(localStorage.getItem("Experience_data"))){
|
|
if(JSON.parse(localStorage.getItem("Experience_data"))){
|
|
this.experience_data = JSON.parse(localStorage.getItem("Experience_data")).if//是否体验账号
|
|
this.experience_data = JSON.parse(localStorage.getItem("Experience_data")).if//是否体验账号
|
|
@@ -1629,6 +1696,9 @@
|
|
}else{//管理员
|
|
}else{//管理员
|
|
this.authorityManagerHeader()//管理员header
|
|
this.authorityManagerHeader()//管理员header
|
|
}
|
|
}
|
|
|
|
+ if(this.employeeRout){
|
|
|
|
+ this.highestPrizeBuckle()//奖扣分最高积分事件
|
|
|
|
+ }
|
|
this.rankingListname()//获取自定义排行榜名
|
|
this.rankingListname()//获取自定义排行榜名
|
|
// this.monthlyIntegral()//月度积分
|
|
// this.monthlyIntegral()//月度积分
|
|
this.integralForm()//积分构成
|
|
this.integralForm()//积分构成
|
|
@@ -1642,8 +1712,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- if(JSON.parse(localStorage.getItem("deptManagerRouters"))){//判断是否是部门管理者
|
|
|
|
- }
|
|
|
|
// let onjpan = []
|
|
// let onjpan = []
|
|
// let onarr = [38,38,40,40,37,39,37,39,66,65,66,65]
|
|
// let onarr = [38,38,40,40,37,39,37,39,66,65,66,65]
|
|
// document.onkeydown = function(e) {
|
|
// document.onkeydown = function(e) {
|
|
@@ -1684,7 +1752,6 @@
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
|
|
- this.qrcode()//生成二维码,可能无用
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.$router.afterEach(() => {//切换到此路由时让滚动条回到顶部
|
|
this.$router.afterEach(() => {//切换到此路由时让滚动条回到顶部
|
|
document.getElementsByClassName('main-content')[0].scrollTop = 0;
|
|
document.getElementsByClassName('main-content')[0].scrollTop = 0;
|
|
@@ -1697,6 +1764,7 @@
|
|
|
|
|
|
console.log('this.$refs.dept1')
|
|
console.log('this.$refs.dept1')
|
|
console.log(this.$refs.dept1)
|
|
console.log(this.$refs.dept1)
|
|
|
|
+ // this.qrcode()//生成二维码,可能无用
|
|
},
|
|
},
|
|
beforeDestroy(){//销毁滚动条事件
|
|
beforeDestroy(){//销毁滚动条事件
|
|
window.removeEventListener("scroll",this.handleScrolls,true)
|
|
window.removeEventListener("scroll",this.handleScrolls,true)
|