Browse Source

Merge branch 'dev'

guojy 1 year ago
parent
commit
96013b7a1e

+ 0 - 1
src/api/axios.js

@@ -80,7 +80,6 @@ service.interceptors.response.use(
 			// 	message: '网络异常,请检查网络是否畅通,再重新进入应用',
 			// 	type: 'error',
 			// })
-			console.log('网络异常,请检查网络是否畅通,再重新进入应用')
 			return Promise.reject(error.message)
 		}else if(error.message=='timeout of 20000ms exceeded'){
 			if(url=='/api/integral/review/a/entry'||url=='/api/integral/point/entry'){

+ 11 - 8
src/home.vue

@@ -1,5 +1,6 @@
 <template>
 	<div class="">
+		
 		<div v-if="$supremeAuthority()!='dept_manager'&&$supremeAuthority()!='employee'&&user_info.is_only_try_order"  @click="bundleOfServices" :style="{ backgroundImage: 'url(' + loginBg + ')' }"  style="position: relative;margin-bottom: 10px;height: 77px;" class="headerImg">
 			<div style="position: absolute;width: 440px;font-size: 26px;color: #fff;font-weight: 600;top: 20px;text-align: center;left: 50%;margin-left: -220px;">
 				免费预约演示 获取行业管理方案
@@ -169,10 +170,10 @@
 				<el-row class="left-all-style">
 					<el-row style="">
 						<el-col :span="24">
-							<b class="title" style="margin-bottom:15px;display:block">
+							<b class="title" style="margin-bottom:15px;display:block;z-index: 999;">
 								积分构成
 								<el-tooltip placement="top">
-								  <div slot="content">饼图仅统计个人B分占比较多的前8种规则分类</div>
+								  <div slot="content">饼图仅统计B分占比较多的前8种规则分类</div>
 								  <i class="el-icon-question fontColorC"></i>
 								</el-tooltip>
 							</b>
@@ -348,7 +349,7 @@
 										</b>
 									</p>
 									<p
-										style="padding:10px 0;font-size:13px;line-height:20px;color:#303133;overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2; "
+										style="margin:10px 0;font-size:13px;line-height:20px;color:#303133;overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2; "
 									>
 										{{ item.remark.rule || item.remark.customize }}
 									</p>
@@ -486,6 +487,7 @@
 				<el-button style="border-radius: 25px;font-size: 16px;padding:7px 20px;" size="mini" type="primary" @click="submitForm('ruleForm')">立即申请</el-button>
 			</div>
 		</el-dialog>
+	
 	</div>
 </template>
 
@@ -1055,7 +1057,6 @@ export default {
 						if (lists[i].name.length > 15) {
 							lists[i].name = lists[i].name.slice(0, 15) + '...';
 						}
-
 						//分为两列展示
 						if (i < 8) {
 							legendData1.push(lists[i].name + ' ' + '奖' + lists[i].reward + ' ' + '扣' + lists[i].deduction + ' ' + lists[i].ratio + '%');
@@ -1098,13 +1099,11 @@ export default {
 			//只显示 N 条标题,多余隐藏,但是饼图不会隐藏
 			let DataLengths = [];
 			let left1 = '45%';
-			let left2 = '45%';
 			let leftBT = '25%';
 			
 			if (chart) {
 				const myChart = this.$echarts.init(chart);
 				var legendData1 = legendDataOne;
-				// var legendData2 = DataLengths;
 				const option = {
 					tooltip: {
 						trigger: 'item',
@@ -1449,8 +1448,12 @@ export default {
 				page: '1',
 				page_size: '1'
 			};
-			this.$axios('get', '/api/integral/statistics/prize/buckle/ranking', params)
-				.then(res => {
+			let roat=this.$supremeAuthority();
+			if(roat=='dept_manager'||roat=='employee'){
+				params.employee_id=this.$getUserData().id
+			}
+			
+			this.$axios('get', '/api/integral/statistics/prize/buckle/ranking', params).then(res => {
 					if (res.data.code == 1) {
 						if (res.data.data.prize.length != 0) {
 							this.prize = res.data.data.prize[0];

+ 38 - 16
src/index.vue

@@ -65,16 +65,16 @@
 				<el-menu :default-active="defaultActive" class="el-menu-vertical-demo" :router="true" @select="activeRouter" :unique-opened="true">
 					<template v-for="(item, index) in routers">
 						<div v-if="item.children.length != 0" :key="index">
-							<template v-if="item.children.length >= 1 && item.name != '首页'">
-								<template v-if="item.name=='福利'">
+							<template v-if="item.children.length >= 1 && item.title != '首页'">
+								<template v-if="item.title=='福利'">
 									<el-submenu :index="index.toString()" :key="index" v-if="returnConfig">
 										<template slot="title">
 											<span class="iconfont titleIcon" :class="item.icon" style="font-size: 20px;"></span>
-											<span style="margin-left: 5px;">{{ item.name }}</span>
+											<span style="margin-left: 5px;">{{ item.title }}</span>
 										</template>
 										<template v-for="(item2, index2) in item.children">
 											<el-menu-item :index="returnIndex(index, index2)" :ref="item2.path" :route="item2.path" :key="index2" class="font-flex-word">
-												<span slot="title" style="margin-left: 10px;width:120px">{{ item2.name }}</span>
+												<span slot="title" style="margin-left: 10px;width:120px">{{ item2.title }}</span>
 											</el-menu-item>
 										</template>
 									</el-submenu>
@@ -82,25 +82,25 @@
 								<el-submenu :index="index.toString()" :key="index" v-else>
 									<template slot="title">
 										<span class="iconfont titleIcon" :class="item.icon" style="font-size: 20px;"></span>
-										<span style="margin-left: 5px;">{{ item.name }}</span>
+										<span style="margin-left: 5px;">{{ item.title }}</span>
 									</template>
 									<template v-for="(item2, index2) in item.children">
 										<el-menu-item :index="returnIndex(index, index2)" :ref="item2.path" :route="item2.path" :key="index2" class="font-flex-word">
-											<span slot="title" style="margin-left: 10px;width:120px">{{ item2.name }}</span>
+											<span slot="title" style="margin-left: 10px;width:120px">{{ item2.title }}</span>
 										</el-menu-item>
 									</template>
 								</el-submenu>
 							</template>
 							<el-menu-item :index="returnIndex(index, index)" :route="item.children[0].path" :ref="item.children[0].path" v-else>
 								<span class="iconfont titleIcon" :class="item.icon" style="font-size: 20px;"></span>
-								<span slot="title" style="margin-left: 5px;">{{ item.children[0].name }}</span>
+								<span slot="title" style="margin-left: 5px;">{{ item.children[0].title }}</span>
 							</el-menu-item>
 						</div>
 					</template>
 				</el-menu>
 			</el-aside>
 			<el-main id="main">
-				<router-view />
+				<keep-alive :include="keepAliveView"><router-view/></keep-alive>
 				<div class="fontColorC" style="text-align: center;margin: 10px 0;">Copyright © {{$moment().format('YYYY')}} 广东功道云数字科技有限公司</div>
 			</el-main>
 		</el-container>
@@ -247,6 +247,8 @@ export default {
 			  { name: '积分排名统计与分析', code: '3' }
 			],
 			visible:false,
+			keepAliveView:['dept_rank','total_rank','custom_rank','manager_statistics'],  //需要缓存的组件名称列表,用逗号分隔
+			keepAliveView2:['dept_rank','total_rank','custom_rank','manager_statistics'],  //需要缓存的组件名称列表,用逗号分隔
 		};
 	},
 	watch: {
@@ -259,6 +261,18 @@ export default {
 			}
 		},
 		$route(to, from) {
+			 // 缓存页面,达到缓存页面条件的效果
+			if(to.name=='dept_rank'&&from.name!='JfDetail'){//首页
+			  this.returnArr('dept_rank')
+			}else if(to.name=='total_rank'&&from.name!='JfDetail'){//我管理的-更多
+			  this.returnArr('total_rank')
+			}else if(to.name=='custom_rank'&&from.name!='JfDetail'){//我评分的-更多
+			  this.returnArr('custom_rank')
+			}else if(to.name=='manager_statistics'&&from.name!='integral_event_two'){//考核管理
+			  this.returnArr('manager_statistics')
+			}else{
+			  this.keepAliveView=JSON.parse(JSON.stringify(this.keepAliveView2));
+			}
 			var str = to.path;
 			this.routers.map((item, index) => {
 				if (item.children.length > 0) {
@@ -308,6 +322,14 @@ export default {
 		});
 	},
 	methods: {
+		returnArr(str){
+		  this.keepAliveView=this.keepAliveView.filter(item=>{
+		    return item!=str;
+		  })
+		  setTimeout(()=>{
+		    this.keepAliveView=JSON.parse(JSON.stringify(this.keepAliveView2));
+		  },1000)
+		},
 		strategyClick(item) {
 		    this.wn_show = false;
 		    this.$router.push({ path: item });
@@ -397,19 +419,19 @@ export default {
 		},
 		initRouter() {
 			this.routers = [
-				{ name: '首页', children: this.returnRoutersArr('home'), icon: 'icon-shouye' },
-				{ name: 'A/B分', children: this.returnRoutersArr('abPoint'), icon: 'icon-PC_gongzuotai_ABfen' },
-				{ name: '任务', children: this.returnRoutersArr('task'), icon: 'icon-kaoqin_kaoqinyuebaobiao' },
-				{ name: '统计', children: this.returnRoutersArr('ranking'), icon: 'icon-dingdingPC_tongji1' },
-				{ name: '奖票', children: this.returnRoutersArr('award'), icon: 'icon-piao' },
+				{ title: '首页', children: this.returnRoutersArr('home'), icon: 'icon-shouye' },
+				{ title: 'A/B分', children: this.returnRoutersArr('abPoint'), icon: 'icon-PC_gongzuotai_ABfen' },
+				{ title: '任务', children: this.returnRoutersArr('task'), icon: 'icon-kaoqin_kaoqinyuebaobiao' },
+				{ title: '统计', children: this.returnRoutersArr('ranking'), icon: 'icon-dingdingPC_tongji1' },
+				{ title: '奖票', children: this.returnRoutersArr('award'), icon: 'icon-piao' },
 			];
 			//this.$authoritys('权限名') 判断权限
 			if (this.$authoritys('creator') || this.$authoritys('admin') || this.$authoritys('point_manager') || this.$authoritys('dept_manager')) {
-				this.routers.splice(3, 0, { name: '审批', children: this.returnRoutersArr('workbench'), icon: 'icon-shezhi_jifenguize' });
+				this.routers.splice(3, 0, { title: '审批', children: this.returnRoutersArr('workbench'), icon: 'icon-shezhi_jifenguize' });
 			}
 			if (this.$authoritys('creator') || this.$authoritys('admin') || this.$authoritys('point_manager')) {
-				this.routers.push({ name: '福利', children: this.returnRoutersArr('welfare'), icon: 'icon-fulizhongxin'});
-				this.routers.push({ name: '设置', children: this.returnRoutersArr('set'), icon: 'icon-dingdingPC_shezhi1' });
+				this.routers.push({ title: '福利', children: this.returnRoutersArr('welfare'), icon: 'icon-fulizhongxin'});
+				this.routers.push({ title: '设置', children: this.returnRoutersArr('set'), icon: 'icon-dingdingPC_shezhi1' });
 			}
 			//this.returnRoutersArr('set',true) 加true表示不限制路由
 			this.userData = this.$getUserData();

+ 1 - 1
src/main.js

@@ -65,7 +65,7 @@ Vue.prototype.$http = service;
 var CancelToken = axios.CancelToken;
 Vue.$httpRequestList = [];
 Vue.prototype.$axios = (type, url, data,heaStr) => {
-	if(url!='/api/ding/login'&& url!='/api/integral/types'){
+	if(url!='/api/ding/login'&&url!='/api/integral/types'&&url!='/api/screen/ranking'){
 	    var Accept='';
 		switch(heaStr){
 		   case 'v2':

+ 99 - 76
src/router/index.js

@@ -11,12 +11,14 @@ Vue.use(VueRouter)
 
 const routes = [{
 		path: '/index',
-		name: '初始页',
+		name: 'index',
+		title: '初始页',
 		component: () => import( /* webpackChunkName: "index" */ '@/index'),
 		redirect: "home",
 		children: [{
 				path: '/home',
-				name: '首页',
+				name: 'home',
+				title: '首页',
 				component: () => import( /* webpackChunkName: "home" */ '@/home'),
 				meta: {
 					icon: 'icon-shezhi_zuzhijiagou',
@@ -25,7 +27,8 @@ const routes = [{
 			},
 			{
 				path: '/inform',
-				name: '通知',
+				name: 'inform',
+				title: '通知',
 				component: () => import( /* webpackChunkName: "award_punish" */ '@/inform'),
 				meta: {
 					icon: 'icon-shezhi_zuzhijiagou',
@@ -34,7 +37,8 @@ const routes = [{
 			},
 			{
 				path: '/award_punish',
-				name: '我奖扣的',
+				name: 'award_punish',
+				title: '我奖扣的',
 				component: () => import( /* webpackChunkName: "award_punish" */
 					'@/views/abPoint/award_punish.vue'),
 				meta: {
@@ -45,7 +49,8 @@ const routes = [{
 			},
 			{
 				path: '/apply_list',
-				name: '我申请的',
+				name: 'apply_list',
+				title: '我申请的',
 				component: () => import( /* webpackChunkName: "apply_list" */ '@/views/abPoint/apply_list.vue'),
 				meta: {
 					icon: 'icon-shezhi_zuzhijiagou',
@@ -55,7 +60,8 @@ const routes = [{
 			},
 			{
 				path: '/my_issue',
-				name: '我发布的',
+				name: 'my_issue',
+				title: '我发布的',
 				component: () => import( /* webpackChunkName: "my_issue" */ '@/views/task/my_issue.vue'),
 				meta: {
 					icon: 'icon-PC_gongzuotai_renwu',
@@ -65,7 +71,8 @@ const routes = [{
 			},
 			{
 				path: '/get_task',
-				name: '领任务',
+				name: 'get_task',
+				title: '领任务',
 				component: () => import( /* webpackChunkName: "get_task" */ '@/views/task/get_task.vue'),
 				meta: {
 					icon: 'icon-PC_gongzuotai_renwu',
@@ -74,7 +81,8 @@ const routes = [{
 			},
 			{
 				path: '/my_task',
-				name: '我的任务',
+				name: 'my_task',
+				title: '我的任务',
 				component: () => import( /* webpackChunkName: "my_task" */ '@/views/task/my_task.vue'),
 				meta: {
 					icon: 'icon-PC_gongzuotai_renwu',
@@ -84,7 +92,8 @@ const routes = [{
 			},
 			{
 				path: '/myExamine',
-				name: '我审批的',
+				name: 'myExamine',
+				title: '我审批的',
 				component: () => import( /* webpackChunkName: "myExamine" */ '@/views/task/myExamine'),
 				meta: {
 					icon: 'icon-PC_gongzuotai_renwu',
@@ -94,7 +103,8 @@ const routes = [{
 			},
 			{
 				path: '/allTask',
-				name: '全部任务',
+				name: 'allTask',
+				title: '全部任务',
 				component: () => import( /* webpackChunkName: "allTask" */ '@/views/task/allTask'),
 				meta: {
 					icon: 'icon-PC_gongzuotai_renwu',
@@ -102,11 +112,10 @@ const routes = [{
 					jurisdiction: ['employee'] //什么权限隐藏
 				}
 			},
-			
-			
 			{
 				path: '/grantAward',
-				name: '发放奖票',
+				name: 'grantAward',
+				title: '发放奖票',
 				component: () => import(/* webpackChunkName: "print" */'@/views/award/grantAward'),
 				meta: {
 					icon: 'icon-shezhi_jichushezhi',
@@ -116,7 +125,8 @@ const routes = [{
 			},
 			{
 				path: '/myGrantAward',
-				name: '我发放的',
+				name: 'myGrantAward',
+				title: '我发放的',
 				component: () => import(/* webpackChunkName: "print" */'@/views/award/myGrantAward'),
 				meta: {
 					icon: 'icon-shezhi_jichushezhi',
@@ -126,7 +136,8 @@ const routes = [{
 			},
 			{
 				path: '/myAward',
-				name: '我的奖票',
+				name: 'myAward',
+				title: '我的奖票',
 				component: () => import(/* webpackChunkName: "print" */'@/views/award/myAward'),
 				meta: {
 					icon: 'icon-shezhi_jichushezhi',
@@ -136,7 +147,8 @@ const routes = [{
 			},
 			{
 				path: '/print',
-				name: '奖票打印',
+				name: 'print',
+				title: '奖票打印',
 				component: () => import(/* webpackChunkName: "print" */'@/views/award/print'),
 				meta: {
 					icon: 'icon-shezhi_jichushezhi',
@@ -146,7 +158,8 @@ const routes = [{
 			},
 			{
 				path: '/lotteryTicket_statistics',
-				name: '奖票统计',
+				name: 'lotteryTicket_statistics',
+				title: '奖票统计',
 				component: () => import( /* webpackChunkName: "lotteryTicket_statistics" */
 					'@/views/award/lotteryTicket_statistics'),
 				meta: {
@@ -155,14 +168,11 @@ const routes = [{
 					jurisdiction: ['employee']
 				}
 			},
-			
-			
-			
-			
-			
+
 			{
 				path: '/dept_rank',
-				name: '阶段排名',
+				name: 'dept_rank',
+				title: '阶段排名',
 				component: () => import( /* webpackChunkName: "dept_rank" */ '@/views/ranking/dept_rank.vue'),
 				meta: {
 					icon: 'icon-shezhi_zuzhijiagou',
@@ -171,7 +181,8 @@ const routes = [{
 			},
 			{
 				path: '/JfDetail',
-				name: '积分明细',
+				name: 'JfDetail',
+				title: '积分明细',
 				component: () => import( /* webpackChunkName: "JfDetail" */ '@/views/ranking/JfDetail.vue'),
 				meta: {
 					icon: 'icon-shezhi_zuzhijiagou',
@@ -181,7 +192,8 @@ const routes = [{
 			},
 			{
 				path: '/total_rank',
-				name: '累计B分排名',
+				name: 'total_rank',
+				title: '累计B分排名',
 				component: () => import( /* webpackChunkName: "total_rank" */ '@/views/ranking/total_rank.vue'),
 				meta: {
 					icon: 'icon-shezhi_jiaose',
@@ -190,7 +202,8 @@ const routes = [{
 			},
 			{
 				path: '/custom_rank',
-				name: '自定义B分排名',
+				name: 'custom_rank',
+				title: '自定义B分排名',
 				component: () => import( /* webpackChunkName: "custom_rank" */
 					'@/views/ranking/custom_rank.vue'),
 				meta: {
@@ -200,7 +213,8 @@ const routes = [{
 			},
 			{
 				path: '/each_rank',
-				name: '各项B分统计',
+				name: 'each_rank',
+				title: '各项B分统计',
 				component: () => import( /* webpackChunkName: "each_rank" */
 					'@/views/ranking/each_rank.vue'),
 				meta: {
@@ -210,7 +224,8 @@ const routes = [{
 			},
 			{
 				path: '/manager_statistics',
-				name: '管理者奖扣',
+				name: 'manager_statistics',
+				title: '管理者奖扣',
 				component: () => import( /* webpackChunkName: "manager_statistics" */
 					'@/views/ranking/manager_statistics.vue'),
 				meta: {
@@ -221,7 +236,8 @@ const routes = [{
 			},
 			{
 				path: '/integral_event',
-				name: '积分事件',
+				name: 'integral_event',
+				title: '积分事件',
 				component: () => import( /* webpackChunkName: "integral_event" */
 					'@/views/ranking/integral_event.vue'),
 				meta: {
@@ -233,7 +249,8 @@ const routes = [{
 			},
 			{
 				path: '/integral_event_two',
-				name: '执行明细',
+				name: 'integral_event_two',
+				title: '执行明细',
 				component: () => import( /* webpackChunkName: "integral_event_two" */
 					'@/views/ranking/integral_event_two.vue'),
 				meta: {
@@ -245,7 +262,8 @@ const routes = [{
 			},
 			{
 				path: '/individual_statistics',
-				name: '个人统计',
+				name: 'individual_statistics',
+				title: '个人统计',
 				component: () => import( /* webpackChunkName: "individual_statistics" */
 					'@/views/ranking/individual_statistics.vue'),
 				meta: {
@@ -255,7 +273,8 @@ const routes = [{
 			},
 			{
 				path: '/department_statistics',
-				name: '部门统计',
+				name: 'department_statistics',
+				title: '部门统计',
 				component: () => import( /* webpackChunkName: "department_statistics" */
 					'@/views/ranking/department_statistics.vue'),
 				meta: {
@@ -264,19 +283,10 @@ const routes = [{
 					jurisdiction: ['employee']
 				}
 			},
-			// {
-			// 	path: '/lotteryTicket_statistics',
-			// 	name: '奖票统计',
-			// 	component: () => import( /* webpackChunkName: "lotteryTicket_statistics" */'@/views/award/lotteryTicket_statistics'),
-			// 	meta: {
-			// 		icon: 'icon-shezhi_jichushezhi',
-			// 		groupCode: 'ranking',
-			// 		jurisdiction: ['dept_manager', 'employee']
-			// 	}
-			// },
 			{
 				path: '/balanceA',
-				name: 'A分余额',
+				name: 'balanceA',
+				title: 'A分余额',
 				component: () => import( /* webpackChunkName: "balanceA" */
 					'@/views/ranking/balanceA'),
 				meta: {
@@ -287,7 +297,8 @@ const routes = [{
 			},
 			{
 				path: '/framework',
-				name: '组织架构',
+				name: 'framework',
+				title: '组织架构',
 				component: () => import( /* webpackChunkName: "framework" */ '@/views/set/framework.vue'),
 				meta: {
 					icon: 'icon-shezhi_zuzhijiagou',
@@ -297,7 +308,8 @@ const routes = [{
 			},
 			{
 				path: '/jurisdiction',
-				name: '角色权限',
+				name: 'jurisdiction',
+				title: '角色权限',
 				component: () => import( /* webpackChunkName: "jurisdiction" */ '@/views/set/jurisdiction.vue'),
 				meta: {
 					icon: 'icon-shezhi_jiaose',
@@ -307,7 +319,8 @@ const routes = [{
 			},
 			{
 				path: '/rule',
-				name: '积分规则',
+				name: 'rule',
+				title: '积分规则',
 				component: () => import( /* webpackChunkName: "rule" */ '@/views/set/rule.vue'),
 				meta: {
 					icon: 'icon-shezhi_jifenguize',
@@ -318,7 +331,8 @@ const routes = [{
 			},
 			{
 				path: '/initialPoint',
-				name: '初始分',
+				name: 'initialPoint',
+				title: '初始分',
 				component: () => import( /* webpackChunkName: "initialPoint" */ '@/views/set/initialPoint.vue'),
 				meta: {
 					icon: 'icon-shezhi_jichushezhi',
@@ -328,7 +342,8 @@ const routes = [{
 			},
 			{
 				path: '/check',
-				name: '考勤积分',
+				name: 'check',
+				title: '考勤积分',
 				component: () => import( /* webpackChunkName: "check" */ '@/views/set/check.vue'),
 				meta: {
 					icon: 'icon-kaoqin_kaoqinyuebaobiao',
@@ -338,7 +353,8 @@ const routes = [{
 			},
 			{
 				path: '/voluntarilyPoint',
-				name: '自动积分',
+				name: 'voluntarilyPoint',
+				title: '自动积分',
 				component: () => import( /* webpackChunkName: "voluntarilyPoint" */
 					'@/views/set/voluntarilyPoint.vue'),
 				meta: {
@@ -349,7 +365,8 @@ const routes = [{
 			},
 			{
 				path: '/log',
-				name: '日志设置',
+				name: 'log',
+				title: '日志设置',
 				component: () => import( /* webpackChunkName: "log" */ '@/views/set/log.vue'),
 				meta: {
 					icon: 'icon-shezhi_xitongpeizhi',
@@ -359,7 +376,8 @@ const routes = [{
 			},
 			{
 				path: '/screenSet',
-				name: '大屏配置',
+				name: 'screenSet',
+				title: '大屏配置',
 				component: () => import( /* webpackChunkName: "screenSet" */ '@/views/set/screenSet.vue'),
 				meta: {
 					icon: 'icon-shezhi_xitongpeizhi',
@@ -369,7 +387,8 @@ const routes = [{
 			},
 			{
 				path: '/systemLayout',
-				name: '系统配置',
+				name: 'systemLayout',
+				title: '系统配置',
 				component: () => import( /* webpackChunkName: "systemLayout" */ '@/views/set/systemLayout.vue'),
 				meta: {
 					icon: 'icon-shezhi_xitongpeizhi',
@@ -377,19 +396,10 @@ const routes = [{
 					jurisdiction: ['dept_manager', 'employee']
 				}
 			},
-			// {
-			// 	path: '/buy',
-			// 	name: '内购',
-			// 	component: () => import( /* webpackChunkName: "buy" */ '@/views/set/buy.vue'),
-			// 	meta: {
-			// 		icon: 'icon-shezhi_xitongpeizhi',
-			// 		groupCode: 'set',
-			// 		jurisdiction: ['dept_manager', 'employee']
-			// 	}
-			// },
 			{
 				path: '/update_notice',
-				name: '公告列表',
+				name: 'update_notice',
+				title: '公告列表',
 				component: () => import( /* webpackChunkName: "update_notice" */
 					'@/views/subassembly/update_notice.vue'),
 				hidden: true, //侧边栏隐藏
@@ -400,7 +410,8 @@ const routes = [{
 			},
 			{
 				path: '/approval_list',
-				name: '待我审批',
+				name: 'approval_list',
+				title: '待我审批',
 				component: () => import( /* webpackChunkName: "approval_list" */
 					'@/views/workbench/approval_list.vue'),
 				meta: {
@@ -410,7 +421,8 @@ const routes = [{
 			},
 			{
 				path: '/approval_batch',
-				name: '批量审批',
+				name: 'approval_batch',
+				title: '批量审批',
 				component: () => import( /* webpackChunkName: "approval_batch" */
 					'@/views/workbench/approval_batch.vue'),
 				meta: {
@@ -420,7 +432,8 @@ const routes = [{
 			},
 			{
 				path: '/alreadySp',
-				name: '已审批',
+				name: 'alreadySp',
+				title: '已审批',
 				component: () => import( /* webpackChunkName: "alreadySp" */
 					'@/views/workbench/alreadySp.vue'),
 				meta: {
@@ -430,7 +443,8 @@ const routes = [{
 			},
 			{
 				path: '/review',
-				name: '复核',
+				name: 'review',
+				title: '复核',
 				component: () => import( /* webpackChunkName: "review" */
 					'@/views/workbench/review.vue'),
 				meta: {
@@ -441,7 +455,8 @@ const routes = [{
 			},
 			{
 				path: '/flBox',
-				name: '功勋点管理',
+				name: 'flBox',
+				title: '功勋点管理',
 				component: () => import( /* webpackChunkName: "flBox" */ '@/views/welfare/flBox.vue'),
 				meta: {
 					icon: 'icon-shezhi_gongdaolbiao',
@@ -450,7 +465,8 @@ const routes = [{
 			},
 			{
 				path: '/prize',
-				name: '奖品管理',
+				name: 'prize',
+				title: '奖品管理',
 				component: () => import( /* webpackChunkName: "approval_list" */ '@/views/welfare/prize.vue'),
 				meta: {
 					icon: 'icon-shezhi_gongdaolbiao',
@@ -459,7 +475,8 @@ const routes = [{
 			},
 			{
 				path: '/conversion',
-				name: '兑换管理',
+				name: 'conversion',
+				title: '兑换管理',
 				component: () => import( /* webpackChunkName: "approval_list" */
 					'@/views/welfare/conversion.vue'),
 				meta: {
@@ -471,32 +488,38 @@ const routes = [{
 	},
 	{
 		path: '/',
-		name: '初始化',
+		name: '/',
+		title: '初始化',
 		component: () => import( /* webpackChunkName: "init" */ '@/init'),
 	},
 	{
 		path: '/noAccess',
-		name: '无权限',
+		name: 'noAccess',
+		title: '无权限',
 		component: () => import( /* webpackChunkName: "noAccess" */ '@/noAccess'),
 	},
 	{
 		path: '/screen',
-		name: '数据大屏展示',
+		name: 'screen',
+		title: '数据大屏展示',
 		component: () => import( /* webpackChunkName: "screen" */ '@/screen'),
 	},
 	{
 		path: '/deptRankSwiper',
-		name: '轮播',
+		name: 'deptRankSwiper',
+		title: '轮播',
 		component: () => import( /* webpackChunkName: "deptRankSwiper" */ '@/views/ranking/deptRankSwiper.vue'),
 	},
 	{
 		path: '/hint',
-		name: '提示页',
+		name: 'hint',
+		title: '提示页',
 		component: () => import( /* webpackChunkName: "hint" */ '@/hint'),
 	},
 	{
 		path: '/dome',
-		name: '虚拟列表',
+		name: 'dome',
+		title: '虚拟列表',
 		component: () => import( /* webpackChunkName: "dome" */ '@/dome'),
 	},
 ]

+ 108 - 41
src/screen.vue

@@ -27,10 +27,17 @@
 				<div style="height: 10px;"></div>
 				<div class="flex-box" style="height: calc(100% - 128px);padding: 16px;padding-bottom: 0;">
 					<div class="flex-2 box" id="left">
-						<div class="boxTitle">{{ result.ranking.name }}</div>
+						<div class="boxTitle">
+							<span v-if="result.config.ranking_type">
+								{{result.config.ranking_type=='ranking'? result.config.ranking.name:result.config.ranking_total.name }}
+							</span>
+							<span v-else>
+								{{result.config.ranking.name}}
+							</span>
+						</div>
 						<div class="ranking" style="border-radius: 8px;margin: 16px;margin-top: 0px;">
-							<template v-if="result.ranking.list.length>0">
-								<template v-if="result.ranking.list.length==4">
+							<template v-if="rankingList.length>0">
+								<template v-if="rankingList.length==4">
 									<div style="margin-bottom: 8px;border-radius: 8px;box-shadow: 0 8px 8px #191E48;margin-top: 16px;">
 										<div v-for="(item, index) in result.ranking.list" :key="index" class="flex-box-ce rankingItem">
 											<div class="flex-1 flex-box-ce">
@@ -54,37 +61,37 @@
 								</template>
 								<template v-else>
 									<div style="margin-bottom: 8px;border-radius: 8px;box-shadow: 0 8px 8px #191E48;margin-top: 16px;">
-										<div v-for="(item, index) in ranking(result.ranking.list, 1)" :key="index" class="flex-box-ce rankingItem">
+										<div v-for="(item, index) in ranking(rankingList, 1)" :key="index" class="flex-box-ce rankingItem">
 											<div class="flex-1 flex-box-ce">
 												<template v-if="item.rank < 4">
 													<div v-if="item.rank == 1" class="index"><img src="./assets/image/1.png" /></div>
 													<div v-if="item.rank == 2" class="index"><img src="./assets/image/2.png" /></div>
 													<div v-if="item.rank == 3" class="index"><img src="./assets/image/3.png" /></div>
 												</template>
-												<userImage :user_name="item.employee.name" :img_url="item.employee.img_url" width="54px" height="54px" style="margin: 0 18px;"></userImage>
+												<userImage :user_name="item.employee_name" :img_url="item.employee_img_url" width="54px" height="54px" style="margin: 0 18px;"></userImage>
 												<div>
-													<div style="font-size: 20px;margin-bottom: 5px;">{{ item.employee.name }}</div>
+													<div style="font-size: 20px;margin-bottom: 5px;">{{ item.employee_name }}</div>
 													<div class="fontColorD" style="font-size: 14px;" v-if="item.dept_list.length>0">
 														{{item.dept_list[0].dept_name}} <span v-if="item.dept_list.length>1">...</span>
 													</div>
 												</div>
 											</div>
-											<div class="num">{{ item.s_point }}</div>
+											<div class="num">{{ item.point }}</div>
 										</div>
 									</div>
-									<vue-seamless-scroll :data="result.ranking.list" class="seamless-warp" :style="{height:h1+'px'}" :class-option="classOption">
-										<div v-for="(item, index) in ranking(result.ranking.list,2)" :key="index" class="flex-box-ce rankingItem">
+									<vue-seamless-scroll :data="rankingList" class="seamless-warp" :style="{height:h1+'px'}" :class-option="classOption">
+										<div v-for="(item, index) in ranking(rankingList,2)" :key="index" class="flex-box-ce rankingItem">
 											<div class="flex-1 flex-box-ce">
 												<div style="font-size: 20px;width: 36px;text-align: center;">{{ item.rank }}</div>
-												<userImage :user_name="item.employee.name" :img_url="item.employee.img_url" width="54px" height="54px" style="margin: 0 18px;"></userImage>
+												<userImage :user_name="item.employee_name" :img_url="item.employee_img_url" width="54px" height="54px" style="margin: 0 18px;"></userImage>
 												<div>
-													<div style="font-size: 20px;margin-bottom: 5px;">{{ item.employee.name }}</div>
+													<div style="font-size: 20px;margin-bottom: 5px;">{{ item.employee_name }}</div>
 													<div class="fontColorD" style="font-size: 14px;" v-if="item.dept_list.length>0">
 														{{item.dept_list[0].dept_name}}<span v-if="item.dept_list.length>1">...</span>
 													</div>
 												</div>
 											</div>
-											<div class="num">{{ item.s_point }}</div>
+											<div class="num">{{ item.point }}</div>
 										</div>
 									</vue-seamless-scroll>
 								</template>
@@ -124,7 +131,7 @@
 										<div class="main-right flex-1">
 											<div class="context">{{ $moment.unix(item.event_time).format('YYYY-MM-DD') }}-{{ item.remark.customize ? item.remark.customize : item.remark.rule }}</div>
 											<div class="flex-box flex-v-ce">
-												<div class="name flex-1">{{ item.employee.name }}</div>
+												<div class="name flex-1">{{ item.employee_name}}</div>
 												<div class="da" v-if="item.point > 0">+{{ item.point }}  <span style="color: #01EEFE;">{{ item.pt_id == 3 ? 'B分' : 'A分' }}</span></div>
 												<div class="red da" v-else>{{ item.point }}  <span style="color: #01EEFE;">{{ item.pt_id == 3 ? 'B分' : 'A分' }}</span></div>
 											</div>
@@ -132,9 +139,7 @@
 									</div>
 								</vue-seamless-scroll>
 							</template>
-							<div v-else style="height: 200px;text-align: center;line-height: 200px;color: #fff;">
-								暂无数据
-							</div>
+							<div v-else style="height: 200px;text-align: center;line-height: 200px;color: #fff;">暂无数据</div>
 						</div>
 					</div>
 				</div>
@@ -180,12 +185,19 @@
 				<div style="height: 10px;"></div>
 				<div class="flex-box" style="height: calc(100% - 92px);padding: 0 10px;">
 					<div class="flex-2 box" id="left">
-						<div class="boxTitle2">{{ result.ranking.name }}</div>
+						<div class="boxTitle2">
+							<span v-if="result.config.ranking_type">
+								{{result.config.ranking_type=='ranking'? result.config.ranking.name:result.config.ranking_total.name }}
+							</span>
+							<span v-else>
+								{{result.config.ranking.name}}
+							</span>
+						</div>
 						<div class="ranking" style="border-radius: 8px;margin: 10px;">
-							<template v-if="result.ranking.list.length>0">
-								<template v-if="result.ranking.list.length==4">
+							<template v-if="rankingList.length>0">
+								<template v-if="rankingList.length==4">
 										<div style="box-shadow: 0 5px 5px #1d2242;margin-bottom: 5px;border-radius: 8px;">
-											<div v-for="(item, index) in result.ranking.list" :key="index" class="flex-box-ce rankingItem">
+											<div v-for="(item, index) in rankingList" :key="index" class="flex-box-ce rankingItem">
 												<div class="flex-1 flex-box-ce">
 													<template v-if="item.rank < 4">
 														<div v-if="item.rank == 1" class="index2"><img src="./assets/image/1.png" /></div>
@@ -193,9 +205,9 @@
 														<div v-if="item.rank == 3" class="index2"><img src="./assets/image/3.png" /></div>
 													</template>
 													<div v-else style="font-size: 14px;width: 1.4rem;text-align: center;">{{ item.rank }}</div>
-													<userImage :user_name="item.employee.name" :img_url="item.employee.img_url" width="30px" height="30px" style="margin: 0 6px;"></userImage>
+													<userImage :user_name="item.employee_name" :img_url="item.employee_img_url" width="30px" height="30px" style="margin: 0 6px;"></userImage>
 													<div>
-														<div style="font-size: 14px;">{{ item.employee.name }}</div>
+														<div style="font-size: 14px;">{{ item.employee_name }}</div>
 														<div class="fontColorD" style="font-size: 12px;margin-top: 5px;" v-if="item.dept_list.length>0">
 															{{item.dept_list[0].dept_name}} <span v-if="item.dept_list.length>1">...</span>
 														</div>
@@ -207,37 +219,37 @@
 								</template>
 								<template v-else>
 									<div style="box-shadow: 0 5px 5px #1d2242;margin-bottom: 5px;border-radius: 8px;">
-										<div v-for="(item, index) in ranking(result.ranking.list, 1)" :key="index" class="flex-box-ce rankingItem">
+										<div v-for="(item, index) in ranking(rankingList, 1)" :key="index" class="flex-box-ce rankingItem">
 											<div class="flex-1 flex-box-ce">
 												<template v-if="item.rank < 4">
 													<div v-if="item.rank == 1" class="index2"><img src="./assets/image/1.png" /></div>
 													<div v-if="item.rank == 2" class="index2"><img src="./assets/image/2.png" /></div>
 													<div v-if="item.rank == 3" class="index2"><img src="./assets/image/3.png" /></div>
 												</template>
-												<userImage :user_name="item.employee.name" :img_url="item.employee.img_url" width="30px" height="30px" style="margin: 0 6px;"></userImage>
+												<userImage :user_name="item.employee_name" :img_url="item.employee_img_url" width="30px" height="30px" style="margin: 0 6px;"></userImage>
 												<div>
-													<div style="font-size: 14px;">{{ item.employee.name }}</div>
+													<div style="font-size: 14px;">{{ item.employee_name }}</div>
 													<div class="fontColorD" style="font-size: 12px;margin-top: 5px;" v-if="item.dept_list.length>0">
 														{{item.dept_list[0].dept_name}} <span v-if="item.dept_list.length>1">...</span>
 													</div>
 												</div>
 											</div>
-											<div class="num" style="font-size: 14px;">{{ item.s_point }}</div>
+											<div class="num" style="font-size: 14px;">{{ item.point }}</div>
 										</div>
 									</div>
-									<vue-seamless-scroll :data="result.ranking.list" class="seamless-warp" :style="{height:h4+'px'}" :class-option="classOption">
-										<div v-for="(item, index) in ranking(result.ranking.list, 2)" :key="index" class="flex-box-ce rankingItem">
+									<vue-seamless-scroll :data="rankingList" class="seamless-warp" :style="{height:h4+'px'}" :class-option="classOption">
+										<div v-for="(item, index) in ranking(rankingList, 2)" :key="index" class="flex-box-ce rankingItem">
 											<div class="flex-1 flex-box-ce">
 												<div style="font-size: 14px;width: 1.4rem;text-align: center;">{{ item.rank }}</div>
-												<userImage :user_name="item.employee.name" :img_url="item.employee.img_url" width="30px" height="30px" style="margin: 0 6px;"></userImage>
+												<userImage :user_name="item.employee_name" :img_url="item.employee_img_url" width="30px" height="30px" style="margin: 0 6px;"></userImage>
 												<div>
-													<div style="font-size: 14px;">{{ item.employee.name }}</div>
+													<div style="font-size: 14px;">{{ item.employee_name }}</div>
 													<div class="fontColorD" style="font-size: 12px;margin-top: 5px;" v-if="item.dept_list.length>0">
 														{{item.dept_list[0].dept_name}} <span v-if="item.dept_list.length>1">...</span>
 													</div>
 												</div>
 											</div>
-											<div class="num" style="font-size: 14px;">{{ item.s_point }}</div>
+											<div class="num" style="font-size: 14px;">{{ item.point }}</div>
 										</div>
 									</vue-seamless-scroll>			
 								</template>
@@ -287,9 +299,7 @@
 									</div>
 								</vue-seamless-scroll>
 							</template>
-							<div v-else style="height: 200px;text-align: center;line-height: 200px;color: #fff;">
-								暂无数据
-							</div>
+							<div v-else style="height: 200px;text-align: center;line-height: 200px;color: #fff;">暂无数据</div>
 						</div>
 					</div>
 				</div>
@@ -315,6 +325,7 @@
 import vueSeamlessScroll from 'vue-seamless-scroll';
 import ScaleBox from '@/components/ScaleBox.vue';
 import countTo from 'vue-count-to';
+import moment from 'moment' // 时间库
 export default {
 	name: 'screen',
 	components: { vueSeamlessScroll, ScaleBox, countTo },
@@ -343,6 +354,7 @@ export default {
 			preview:false,
 			
 			isSetInterval:'',
+			rankingList:[],
 		};
 	},
 	computed: {
@@ -397,17 +409,17 @@ export default {
 			this.result={};
 			this.code='';
 			this.isShowCode = true;
-			this.$socketApi.closewebsocket()
+			this.$socketApiTow.closewebsocket()
 		},
 		opneWebSocket() {
 			this.isShowlog=true;
-			this.$socketApi.closewebsocket()
+			this.$socketApiTow.closewebsocket()
 			if (!this.code) {
 				this.$message.error('请输入密码');
 				this.isShowlog=false;
 				return false;
 			}
-			this.$socketApi.sendData({ type: 'screen', code: this.code }, this.onmessageWS);
+			this.$socketApiTow.sendData({ type: 'screen', code: this.code }, this.onmessageWS);
 		},
 		onmessageWS(e) {
 			this.isShowlog=false;
@@ -435,7 +447,12 @@ export default {
 						this.$setCache('code', this.code);
 					}
 					this.isShowCode = false;
-					this.result = e.result.result;
+					this.result = e.result;
+					if(!this.result.config.ranking_type||this.result.config.ranking_type=='ranking'){
+						this.getList();
+					}else{
+						this.getListTotal();
+					}
 					this.isShowError=false;
 					this.$nextTick(()=>{
 						this.isPCa? this.ManagerSAwardCharts2():this.ManagerSAwardCharts()
@@ -454,13 +471,63 @@ export default {
 				},120000)
 			}
 		},
+		// 阶段排名
+		getList() {
+			let item=this.result.config.ranking.condition
+			let data={
+				code:this.code,
+				page: 1,
+				page_size: 10000,
+				dept_id: item.dept.toString(),
+				sort:'DESC',
+				pt_id:item.point_id,
+				exclusion:  item.exclusion.toString(),
+				position: item.position,
+			};
+			if(item.date==-1){
+				data.start_date=this.$moment().format('YYYY-MM-DD')
+				data.end_date=this.$moment().format('YYYY-MM-DD')
+			}else if(item.date==-2){
+			    let weekOfDay = parseInt(moment().format('E'));//计算今天是这周第几天
+	            data.start_date = moment().startOf('day').subtract(weekOfDay - 1, 'days').format('YYYY-MM-DD');//周一日期
+	            data.end_date=  moment().startOf('day').subtract(weekOfDay - 7, 'days').format('YYYY-MM-DD');//周日日期
+			}else if(item.date==-3){
+			    data.month=moment().format('YYYY-MM')
+			}else if(item.date==-4){
+				data.quarter=moment().format('YYYY')+moment().quarter();
+			}else if(item.date==-5){
+				data.year=moment().format('YYYY')
+			}else if(item.date==1){
+				data.start_date= moment(item.time[0]).format('YYYY-MM-DD')
+				data.end_date=moment(item.time[1]).format('YYYY-MM-DD')
+			}
+			this.$axios('get', '/api/screen/ranking', data).then(res => {
+				this.rankingList =this.$returnDeptName(res.data.data.list);
+			})
+		},
+		// 累计排名
+		getListTotal() {
+			let item=this.result.config.ranking_total.condition
+			let data={
+				code:this.code,
+				page: 1,
+				page_size: 10000,
+				dept_id: item.dept.toString(),
+				sort:'DESC',
+				pt_id:3,
+				type: 'all',
+			};
+			this.$axios('get','/api/screen/ranking',data).then(res => {
+				this.rankingList =this.$returnDeptName(res.data.data.list);
+			})
+		},
 		//管理者奖扣统计
 		ManagerSAwardCharts() {
 			//管理着奖扣统计表
 			const chart = this.$refs.ManagerSAwardChart;
-			let ratio_date=this.result.active.list.ratio_date;
-			let ratio_get=this.result.active.list.ratio_get;
-			let ratio_set=this.result.active.list.ratio_set;
+			let ratio_date=this.result.list.ratio_date;
+			let ratio_get=this.result.list.ratio_get;
+			let ratio_set=this.result.list.ratio_set;
 			if (chart) {
 				const myChart = this.$echarts.init(chart);
 				let option = {

+ 20 - 29
src/views/award/lotteryTicket_statistics.vue

@@ -7,17 +7,15 @@
 		    <el-cascader
 		      v-model="dept_name"
 		      :options="dept_tree"
-		      @change="changeDept"
 		      :props="{
-		        checkStrictly: true,
+		        multiple: true,
 		        value: 'id',
 		        label: 'name',
-				
 		        children: '_child',
 		      }"
 		      ref="deptRef"
 		      filterable
-		      change-on-select
+		      collapse-tags
 		      placeholder="全公司"
 		      clearable
 		    ></el-cascader>
@@ -292,13 +290,6 @@ export default {
     "formData.month"(val, old_val) {
       this.formData.page = 1;
       this.get_all_integral();
-    },
-    "formData.dept_ids"(val, old_val) {
-      if (!val) {
-        this.formData.dept_ids = 0;
-      }
-      this.formData.page = 1;
-      this.get_all_integral();
     },
 	'formData.keyword': {
 	  deep: true,
@@ -316,7 +307,24 @@ export default {
 	checked(){
 		this.formData.page = 1;
 		this.get_all_integral();
-	}
+	},
+	dept_name(val, old_val) {
+		 this.formData.page = 1;
+		if (val.length !== 0) {
+			let dept_ids=[];
+			val.forEach((item)=>{
+				dept_ids.push(...item);
+			})
+			let set =new Set(dept_ids);
+			this.formData.dept_ids = [...set].toString();
+		} else {
+			this.formData.dept_ids = 0;
+		}
+		this.$nextTick(() => {
+		  this.$refs.deptRef.dropDownVisible = false;
+		  this.get_all_integral();
+		});
+	},
   },
   created() {
   	this.getDepartment(); //部门
@@ -440,23 +448,6 @@ export default {
         }).finally(() => {
           this.loading = false;
         });
-    },
-    changeDept(val) {
-	  
-      //部门
-      if (val.length == 0) {
-        this.formData.dept_ids = 0;
-      } else {
-		let nodes=this.$refs.deptRef.getCheckedNodes();
-		if(nodes.length==1){
-			let ids=[nodes[0].value];
-			this.returnArr(nodes[0].children,ids);
-			this.formData.dept_ids = ids.toString();
-		}
-      }
-      this.$nextTick(() => {
-        this.$refs.deptRef.dropDownVisible = false;
-      });
     },
 	returnArr(child,arr){
 	  if(child.length>0){

+ 20 - 10
src/views/common/rewardTask.vue

@@ -176,7 +176,7 @@
 							@change="handleChange"
 							:options="dept_tree"
 							collapse-tags
-							:props="{ checkStrictly: true, value: 'id', label: 'name', multiple: true, children: '_child' }"
+							:props="{checkStrictly: true, value: 'id', label: 'name', multiple: true, children: '_child' }"
 							ref="dept"
 							clearable
 							placeholder="全公司"
@@ -533,9 +533,9 @@ export default {
 				this.getruleChange(list[0].pid)
 			}
 		},
-		getTreeDatas(data, item) {
+		getTreeDatas(data, dept_id) {
 			for (let i in data) {
-				if (data[i].id == item) {
+				if (data[i].id == dept_id) {
 					if (data[i].parentid == 1) {
 						this.oneruleId.unshift(data[i].id);
 						this.echoGather.push(this.oneruleId);
@@ -547,7 +547,7 @@ export default {
 					}
 				} else {
 					if (data[i]._child) {
-						this.getTreeDatas(data[i]._child, item);
+						this.getTreeDatas(data[i]._child, dept_id);
 					}
 				}
 			}
@@ -570,10 +570,8 @@ export default {
 		},
 		ruleItemChange(val,is){
 			let item = this.formData
-			console.log(item)
 			if(val.length>0){
 				let data = this.$refs.ruleItem.getCheckedNodes()[0].data;//当前选中的节点数据
-				
 				item.task_remark = data.name;
 				this.max = data.max_point * 1;
 				this.min = data.min_point * 1;
@@ -597,11 +595,22 @@ export default {
 		},
 
 		handleChange(val) {
-			let data = [];
-			for (let i in val) {
-				data.push(val[i][val[i].length - 1]);
+			// let data = [];
+			// for (let i in val) {
+			// 	data.push(val[i][val[i].length - 1]);
+			// }
+			if (val.length !== 0) {
+				let dept_ids=[];
+				val.forEach((item)=>{
+					dept_ids.push(item[item.length-1]);
+					// dept_ids.push(...item);
+				})
+				let set =new Set(dept_ids);
+				this.formData.dept_ids = [...set];
+			} else {
+				this.formData.dept_ids = 0;
 			}
-			this.formData.dept_ids = data;
+			// this.formData.dept_ids = data;
 		},
 		submitMembers(name) {
 			this.$refs[name].confirm(); //调用组件的confirm();
@@ -725,6 +734,7 @@ export default {
 			}else if(this.formData.task_cycle==3&&this.formData.task_expire_day<=moment().format('D')){
 				is=false  
 			}
+			console.log(data)
 			this.forTheTaskLoading = true;
 			this.$axios('post', this.formData.task_cycle == 0 ? '/api/integral/task/publish' : '/api/integral/schedule/publish/task', data).then(res => {
 					this.$message.success(res.data.msg);

+ 3 - 3
src/views/ranking/JfDetail.vue

@@ -18,8 +18,8 @@
 				</el-select> -->
 			</div>
 			<div class="diy-tip1" style="margin-bottom: 10px;">
-				<div v-if="type==1||type==3">分值:<span class="blue">{{point}}</span> (当前明细不包含基础分和工龄分)</div>
-				<div v-if="type==2">总分:<span class="blue">{{point}}</span> (包含基础分<span class="blue">{{base_point}}</span>,工龄分<span class="blue">{{service_point}}</span>)</div>
+				<div v-if="type==1||type==3">分值:<span class="blue">{{point}} {{formData.pt_id==3? 'B分':'A分'}}</span> (当前明细不包含基础分和工龄分)</div>
+				<div v-if="type==2">总分:<span class="blue">{{point}} B分</span> (包含基础分<span class="blue">{{base_point}}</span>,工龄分<span class="blue">{{service_point}}</span>)</div>
 			</div>
 			<!-- 表格 -->
 			<div>
@@ -286,7 +286,7 @@ export default {
 			}
 			// console.log(this.$route.query)
 			let parameter=JSON.parse(this.$route.query.parameter);
-			this.formData.dept_ids=parameter.dept_id||0;//部门
+			// this.formData.dept_ids=parameter.dept_id||0;//部门
 			this.formData.employee_ids=userInfo.employee_id//人员
 			this.formData.rule_id=parameter.rule||0//分类ID
 			this.formData.pt_id=parameter.pt_id//事件类型ID

+ 1 - 0
src/views/ranking/custom_rank.vue

@@ -220,6 +220,7 @@ const delay = (function() {
 	};
 })();
 export default {
+	name:'custom_rank',
 	data() {
 		return {
 			isEmployeeShow: false,

+ 23 - 9
src/views/ranking/department_statistics.vue

@@ -2,17 +2,17 @@
 	<div>
 		<el-row style="min-width:1160px;">
 			<div class="flex-box-ce">
+<!-- 				<div v-if="$supremeAuthority()=='dept_manager'">
+					<el-select v-model="formData.dept_id" placeholder="请选择部门" style="width: 100px;">
+						<el-option v-for="item in depts" :key="item.dept_name" :label="item.dept_name" :value="item.dept_id"></el-option>
+					</el-select>
+				</div> -->
 				<div>
 					<el-cascader
 						v-model="dept_name"
 						:options="dept_tree"
 						@change="dept1_null"
-						:props="{
-							checkStrictly: true,
-							value: 'id',
-							label: 'name',
-							children: '_child'
-						}"
+						:props="{checkStrictly: true,value: 'id',label: 'name',children: '_child'}"
 						ref="dept1"
 						filterable
 						change-on-select
@@ -53,8 +53,14 @@
 				<el-col :span="18" style="min-width:780px;">
 					<el-row class="left-all-style" style="margin-top:10px;">
 						<el-row style="position: relative;">
-							<el-col :span="24">
-								<b class="title" style="margin-bottom:15px;display:block">{{ yearhORmontStr }}积分构成</b>
+							<el-col :span="24" style="position: absolute;z-index: 999;">
+								<b class="title" style="margin-bottom:15px;display:block">
+									{{ yearhORmontStr }}积分构成
+									<el-tooltip placement="top">
+									  <div slot="content">饼图仅统计B分占比较多的前8种规则分类</div>
+									  <i class="el-icon-question fontColorC"></i>
+									</el-tooltip>
+								</b>
 							</el-col>
 							<div v-loading="IntegralFormChartLoad">
 								<div class="nopoint_box" style="height:306px;" v-show="IntegralFormnone">
@@ -332,7 +338,9 @@ export default {
 			],
 			monthlyIntegralloading: false, //本月积分情况loading
 			monthlyIntegralnone: false, //本月积分情况为空或报错,展示的开关
-			exclusiveMonthBranch: 0 //本月积分情况--部门
+			exclusiveMonthBranch: 0 ,//本月积分情况--部门
+			depts:[],
+			deptId:0,
 		};
 	},
 	watch: {
@@ -374,6 +382,11 @@ export default {
 		}
 	},
 	mounted() {
+		// let roat=this.$supremeAuthority();
+		// if(roat=='dept_manager'){
+		// 	this.depts=this.$getUserData().employee_detail.dept_list;
+		// 	this.formData.dept_id=this.depts[0].dept_id
+		// }
 		this.formData.month = this.$moment().format('YYYY-MM');
 		this.executiveFunction();
 		window.addEventListener('resize', this.selfAdaption);
@@ -706,6 +719,7 @@ export default {
 
 		//筛选部门数据
 		dept1_null(val) {
+			console.log(val)
 			if (val.length == 0) {
 				this.formData.dept_id = 0;
 			} else {

+ 1 - 3
src/views/ranking/dept_rank.vue

@@ -46,8 +46,6 @@
 						:picker-options="instantPickerOptions"
 					></el-date-picker>
 				</el-form-item>
-				
-				
 				<el-form-item label="部门">
 					<el-cascader
 						size="medium"
@@ -261,6 +259,7 @@
 import moment from 'moment';
 import season from '@/components/season';
 export default {
+	name:'dept_rank',
 	data() {
 		return {
 			rule_ids: null,
@@ -640,7 +639,6 @@ export default {
 				data.start_date= moment(this.formData.time_range[0]).format('YYYY-MM-DD')
 				data.end_date=moment(this.formData.time_range[1]).format('YYYY-MM-DD')
 			}
-			
 			this.loading = true;
 			this.$axios('get', '/api/integral/statistics/ranking', data, 'v2').then(res => {
 				this.labelName = this.formData.pt_id == 2 ? 'A分' : 'B分';

+ 34 - 18
src/views/ranking/individual_statistics.vue

@@ -91,8 +91,14 @@
 					<el-col :span="24">
 						<el-row class="left-all-style">
 							<el-row style="position: relative;">
-								<el-col :span="24">
-									<b class="title" style="margin-bottom:15px;display:block">{{ yearhORmontStr }}积分构成</b>
+								<el-col :span="24" class="flex-box-ce" style="position: absolute;z-index: 999;">
+									<b class="title" style="margin-bottom:15px;display:block">
+										{{ yearhORmontStr }}积分构成
+										<el-tooltip placement="top">
+										  <div slot="content">饼图仅统计B分占比较多的前8种规则分类</div>
+										  <i class="el-icon-question fontColorC"></i>
+										</el-tooltip>
+									</b>
 								</el-col>
 								<div v-loading="IntegralFormChartLoad">
 									<div class="nopoint_box" style="height:307px;" v-show="IntegralFormnone">
@@ -346,14 +352,12 @@ export default {
 	},
 	mounted() {
 		window.addEventListener('resize', this.selfAdaption);
-		this.getEmployee()
-			.then(res => {
-				this.formData.month = this.$moment().format('YYYY-MM');
-				this.executiveFunction();
-			})
-			.catch(err => {
-				console.log(err);
-			});
+		this.getEmployee().then(res => {
+			this.formData.month = this.$moment().format('YYYY-MM');
+			this.executiveFunction();
+		}).catch(err => {
+			console.log(err);
+		});
 	},
 	methods: {
 		selectEmployeeChange(val) {
@@ -367,7 +371,7 @@ export default {
 		getEmployee() {
 			return new Promise((resolve, reject) => {
 				this.personnelMessage = true;
-				this.$axios('get', '/api/employee/index', { dept_id: 0, keywords: '', page: 1, page_size: 3000, is_official: 1 })
+				this.$axios('get', '/api/employee/index', { dept_id:0, keywords: '', page: 1, page_size: 3000, is_official: 1 })
 					.then(res => {
 						let list = res.data.data.list;
 						this.employee_map = list.filter(x => x.is_creator != 1);
@@ -388,7 +392,20 @@ export default {
 							this.dept_list = dept_;
 						} else {
 							if (this.$getUserData()) {
-								this.select_employee_id = this.$getUserData().name;
+								let roat=this.$supremeAuthority();
+								if(roat=='dept_manager'){
+									let manage_scope=this.$getUserData().employee_detail.manage_scope;
+									manage_scope.unshift({id: this.$getUserData().id, name: this.$getUserData().name})
+									this.employee_map=manage_scope
+								}
+								if(roat=='employee'){
+									let manage_scope=[];
+									manage_scope.unshift({id: this.$getUserData().id, name: this.$getUserData().name})
+									this.employee_map=manage_scope
+								}
+								this.$nextTick(()=>{
+									this.select_employee_id = this.$getUserData().id;
+								})
 								this.personnel = this.$getUserData();
 								let dept_li = this.personnel.employee_detail.dept_list;
 								let dept_ = '';
@@ -500,7 +517,6 @@ export default {
 			//   }
 			// }
 			let left1 = '45%';
-			let left2 = '45%';
 			let leftBT = '25%';
 			// if (legendDataTwo.length != 0) {
 			//   left1 = "36%";
@@ -557,7 +573,7 @@ export default {
 							emphasis: { label: { show: false } },
 							data: dadalist
 						}
-					]
+					],
 				};
 				myChart.setOption(option);
 			}
@@ -593,11 +609,11 @@ export default {
 						// }else{
 						//   legendData2.push(lists[i].name+' '+'奖'+lists[i].reward+' '+'扣'+lists[i].deduction+' '+lists[i].ratio+'%')
 						// }
-						// if (i < 8) {
+						if (i < 8) {
 							legendData1.push(lists[i].name + ' ' + '奖' + lists[i].reward + ' ' + '扣' + lists[i].deduction + ' ' + lists[i].ratio + '%');
-						// } else {
-						// 	legendData2.push(lists[i].name + ' ' + '奖' + lists[i].reward + ' ' + '扣' + lists[i].deduction + ' ' + lists[i].ratio + '%');
-						// }
+						} else {
+							legendData2.push(lists[i].name + ' ' + '奖' + lists[i].reward + ' ' + '扣' + lists[i].deduction + ' ' + lists[i].ratio + '%');
+						}
 						let dataListDx = {};
 						if (lists[i].ratio < 0) {
 							dataListDx.value = 0;

+ 31 - 3
src/views/ranking/integral_event.vue

@@ -1,7 +1,7 @@
 <template>
 	<div>
 		<div class="all padding-20">
-			<el-form ref="form" :inline="true" label-width="80px">
+			<el-form ref="form" :inline="true" label-width="90px">
 				<el-form-item label="规则分类">
 					<el-cascader
 						class="date-picker-width"
@@ -26,9 +26,10 @@
 						class="date-picker-width"
 						v-model="dept_name"
 						:options="dept_tree"
-						:props="{ checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
+						:props="{checkStrictly: true, multiple: true, value: 'id', label: 'name', children: '_child'}"
 						ref="dept"
 						clearable
+						collapse-tags
 						filterable
 						placeholder="全公司"
 					></el-cascader>
@@ -43,6 +44,20 @@
 						<el-option v-for="item in dcArr" :key="item.name" :label="item.name" :value="item.id"></el-option>
 					</el-select>
 				</el-form-item>
+				<el-form-item label="人员状态">
+					<template slot="label">
+						<el-tooltip effect="dark" placement="top">
+						  <template slot="content">
+							默认仅显示组织架构中“已启用”人员的积分事件,未启用、已离职等人员的积分事件可以通过“未启用&未授权”筛选查看
+						  </template>
+						  <span>人员状态	<i class="el-icon-warning"></i></span>
+						</el-tooltip>
+					</template>
+					<el-select class="date-picker-width" size="medium" v-model="formData.is_enable">
+						<el-option  label="已启用" :value="1"></el-option>
+						<el-option  label="未授权&未启用" :value="0"></el-option>
+					</el-select>
+				</el-form-item>
 				<el-form-item label="时间">
 					<el-date-picker
 						v-model="time_slot"
@@ -393,6 +408,7 @@ export default {
 				page_size: 10,
 				status:1,
 				dc_status:JSON.stringify([1]),
+				is_enable:1,
 				// order_key:'update_time',
 			},
 			time_slot: null,
@@ -470,6 +486,10 @@ export default {
 				this.deleteDisabled = false;
 			}
 		},
+		'formData.is_enable'(val, old_val) {
+			this.formData.page = 1;
+			this.get_integral_list(this.formData);
+		},
 		'formData.pt_id'(val, old_val) {
 			this.formData.page = 1;
 			!val ? delete this.formData.pt_id : '';
@@ -525,7 +545,13 @@ export default {
 		dept_name(val, old_val) {
 			this.formData.page = 1;
 			if (val.length !== 0) {
-				this.formData.dept_ids = val[val.length - 1];
+				let dept_ids=[];
+				val.forEach((item)=>{
+					dept_ids.push(item[item.length-1]);
+					// dept_ids.push(...item);
+				})
+				let set =new Set(dept_ids);
+				this.formData.dept_ids = [...set].toString();
 			} else {
 				this.formData.dept_ids = 0;
 			}
@@ -671,6 +697,8 @@ export default {
 					this.formData.page +
 					'&page_size=' +	
 					this.formData.page_size +
+					'&is_enable=' +	
+					this.formData.is_enable +
 					(this.formData.employee_ids ? '&employee_ids=' + this.formData.employee_ids : '') +
 					(this.formData.rule_id ? '&rule_id=' + this.formData.rule_id : '') +
 					(this.formData.pt_id ? '&pt_id=' + this.formData.pt_id : '') +

+ 1 - 1
src/views/ranking/manager_statistics.vue

@@ -271,6 +271,7 @@
 import downloadexcel from "vue-json-excel";	
 export default {
 	components:{downloadexcel},
+	name:'manager_statistics',
 	data() {
 		return {
 			json_fields:{
@@ -412,7 +413,6 @@ export default {
 						this.exportExcelArr=list;
 					}else{
 						this.last = res.result.list;
-						console.log(this.last)
 						this.totals = res.result.total;
 						this.$nextTick(()=>{
 							this.loading2 = false;

+ 1 - 0
src/views/ranking/total_rank.vue

@@ -118,6 +118,7 @@
 </template>
 <script>
 export default {
+	name:'total_rank',
 	data() {
 		return {
 			dept_name: [],

+ 2 - 3
src/views/set/check.vue

@@ -157,15 +157,14 @@ export default {
 	  objs.off_duty_early = ok[5].sj>0? ok[5].sj:ok[5].sj; //<=0
 	  objs.ot_per_day =ok[6].sj; //>=0
 	  objs.month_full_ad = ok[7].sj
-	  
 	  let {absent_late,absent_holiday}=obj.checkAllData;
 	  objs.absent_late=absent_late;
 	  objs.absent_holiday=absent_holiday;
 	  // if(absent_holiday.list.length==0){
 		 //  objs.absent_holiday.list="";
 	  // }
-	  if(absent_late.enable&&(absent_late.count==='0'||absent_late.count===0)){
-		  this.$message.error("迟到次数不能为0")
+	  if(absent_late.enable==1&&(absent_late.count==='0'||absent_late.count===0)){
+		  this.$message.error("'当月迟到少于次数'不能为0")
 		  return
 	  }
       this.$axios('post',"/api/ad/update",objs).then((res) => {

+ 1 - 1
src/views/set/framework.vue

@@ -1016,7 +1016,7 @@ export default {
 		},
 		//同步信息
 		tb() {
-			this.$confirm('下次同步时间需在10分钟之后,是否同步?', '提示', {
+			this.$confirm('即将同步钉钉通讯录的人员名单,确定同步吗?', '提示', {
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
 				type: 'warning'

+ 30 - 1
src/views/set/jurisdiction.vue

@@ -461,6 +461,7 @@
 				</div>
 			</div>
 		</div>
+		
 		<el-dialog title="添加人员" :visible.sync="add_employee_show" :before-close="publicClose" width="700px" top="5vh">
 			<EmployeeSelector v-if="add_employee_show" ref="Employee" :user_no_select="false" @confirm="add_employee_confirm"></EmployeeSelector>
 			<span slot="footer">
@@ -473,14 +474,32 @@
 		</el-dialog>
 
 		<el-dialog title="设置积分权限" :visible.sync="integral_limit_show" :close-on-click-modal="false" width="700px">
-			<el-form label-width="160px" :model="integral_limit_form" ref="integral_limit_form" v-loading="integral_limit_loading">
+			<el-form label-width="180px" :model="integral_limit_form" ref="integral_limit_form" v-loading="integral_limit_loading">
 				<span v-for="(item, index) in integral_limit_form.point_limit" :key="index" v-show="item.pt_id !== 1">
 					<el-form-item :label="item.name + '权限(单次奖扣)'" :rules="[{ required: true, message: '分值不能为空' }, { type: 'number', message: '分值必须为数字值' }]">
 						<el-input v-model.number="item.point" oninput="value=value.replace(/[^\d]/g,'')"></el-input>
+						<template slot="label">
+							<span>{{item.name}}'权限(单次奖扣)' 
+							<el-tooltip placement="top">
+								<span slot="content">
+									每次奖扣{{item.name}}不得超过设置的分值
+								</span>
+								<span class="tips">?</span>
+							</el-tooltip>
+							</span>
+						</template>
 					</el-form-item>
 				</span>
 				<el-form-item label="每月B分奖分上限" prop="entry_limit">
 					<el-input v-model.number="integral_limit_form.entry_limit" oninput="value=value.replace(/[^\d]/g,'')" placeholder="奖分上限不限制"></el-input>
+					<template slot="label">
+						<span>每月B分奖分上限
+						<el-tooltip placement="top">
+							<span slot="content" style="width: 200px;">奖分上限仅能限制管理者直接对员工进行奖扣B分,积分申请、任务审批等其他积分来源方式不会受到限制,请按自身需要设置上限分值</span>
+							<span class="tips">?</span>
+						</el-tooltip>
+						</span>
+					</template>
 				</el-form-item>
 				<el-form-item style="text-align: right; margin-bottom: 0">
 					<el-button @click="integral_limit_show = false">取消</el-button>
@@ -536,6 +555,13 @@
 							</el-tooltip>
 						</template>
 						<el-input v-model.number="item.point" type="number" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入数值"></el-input>
+						<el-checkbox v-model="checked">
+						    如未完成目标,自动按差额扣分
+						    <el-tooltip placement="top">
+						      <div slot="content" style="width: 300px;"> 设置后,奖分与扣分目标其中有一项未达标,系统将自动扣除差额分值;<br />例如,A设置了月奖分目标100和月扣分目标100,到了月底,奖了80和扣了30,那该管理者将被扣90B分。</div>
+						    <span class="tips">?</span>
+						  </el-tooltip>
+						</el-checkbox>
 					</el-form-item>
 				</span>
 				<el-form-item>
@@ -1112,9 +1138,11 @@ export default {
 		sub_bonus_deducted(fromName) {
 			this.bonus_loading = true;
 			this.integral_limit_form.employee_id = this.set_mployee_limit_id;
+			this.integral_limit_form.task_enable = this.checked?'1':'0'
 			var data = this.integral_limit_form;
 			data.reward_task_monthly[1].point = Number(data.reward_task_monthly[1].point);
 			data.deduct_task_monthly[1].point = Number(data.deduct_task_monthly[1].point);
+			
 			if (!this.isNumber(data.reward_task_monthly[1].point) || data.reward_task_monthly[1].point < 0) {
 				this.$message.error('月奖分任务必须为整数且不能为负分');
 				return;
@@ -1249,6 +1277,7 @@ export default {
 						if (item.entry_limit<0) {
 							item.entry_limit='';
 						}
+						this.checked = item.task_enable == 0 ?false:true
 						this.integral_limit_form = item;
 					}
 				}).finally(() => {

+ 252 - 111
src/views/set/screenSet.vue

@@ -28,7 +28,7 @@
 					</div>
 					<div style="font-size: 14px;" class="fontColorB">积分可视化数据大屏,直观展现积分排名、积分快讯、运作情况,支持电脑投屏、会议平板直接访问。</div>
 				</div>
-				<el-button type="primary" @click="isPz = true">
+				<el-button type="primary" @click="isPz = true" :disabled="list.length==10">
 					创建数据大屏
 					<i class="el-icon-setting el-icon--right"></i>
 				</el-button>
@@ -58,6 +58,7 @@
 				</template>
 			</el-table>
 		</div>
+		
 		<el-dialog :title="isCompile? '编辑数据大屏':'创建数据大屏'" :visible.sync="isPz" width="500px" class="dialog">
 			<el-form label-width="80px" :model="formData" ref="setForm" class="form">
 				<el-form-item
@@ -80,6 +81,7 @@
 				<el-button type="primary" :loading="setLoading" :disabled="setLoading" @click="saveFirst('setForm')">确定</el-button>
 			</div>
 		</el-dialog>
+		
 		<el-dialog title="分享" :visible.sync="isPreview" width="500px" class="dialog">
 			<div>
 				<div>本机以外的其他设备可以通过链接访问数据大屏</div>
@@ -107,16 +109,10 @@
 			<div class="flex-box">
 				<div class="flex-4" style="padding-top: 50px;">
 					<div  style="color: #222;font-weight: 700;font-size: 16px;padding-left: 8px;">点击下面模块,快速定位到设置项
-						<el-popover
-							    placement="bottom-start"
-							    title="示例"
-							    width="500"
-							    trigger="hover">
-								<div>
-									<img  src="@/assets/image/321.jpg" style="width: 100%;"/>
-								</div>
-								<span style="font-size:14px;cursor: pointer;" class="blue" slot="reference">示例</span>
-							  </el-popover>
+						<el-popover placement="bottom-start" title="示例" width="500" trigger="hover">
+							<div><img  src="@/assets/image/321.jpg" style="width: 100%;"/></div>
+							<span style="font-size:14px;cursor: pointer;" class="blue" slot="reference">示例</span>
+						</el-popover>
 					 </div>
 					<div class="flex-box-ce">
 						<div class="flex-1">
@@ -172,68 +168,124 @@
 						<div class="kuai">
 							<div class="formTitle">排行榜设置</div>
 							<div class="formBox">
-								<el-form-item label="名称">
-									<el-input class="width250" maxlength="10" show-word-limit v-model.trim="config.ranking.name" placeholder="请输入名称"></el-input>
-								</el-form-item>
-								<el-form-item label="时间">
-									<el-select class="width250" v-model="config.ranking.condition.date" placeholder="请选择积分类型">
-										<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
-									</el-select>
-									<el-date-picker
-										class="width250"
-										v-if="config.ranking.condition.date == 1"
-										v-model="config.ranking.condition.time"
-										type="daterange"
-										value-format="timestamp"
-										@change="setTime"
-										range-separator="至"
-										start-placeholder="开始日期"
-										end-placeholder="结束日期"
-									></el-date-picker>
-								</el-form-item>
-								<el-form-item label="部门">
-									<el-cascader
-										v-model="config.ranking.condition.deptArr"
-										:options="dept_tree"
-										:props="{ multiple : true,checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
-										class="width250"
-										ref="dept1"
-										filterable
-										collapse-tags
-										placeholder="全部部门"
-										clearable
-									></el-cascader>
-								</el-form-item>
-								<el-form-item label="人员">
-									<el-select class="width250" v-model="config.ranking.condition.position" placeholder="请选择人员范围">
-										<el-option v-for="item in roleOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
-									</el-select>
-								</el-form-item>
-								<el-form-item label="类型">
-									<el-select class="width250" v-model="config.ranking.condition.point_id" placeholder="请选择积分类型">
-										<el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value" v-if="item.value != 1"></el-option>
-									</el-select>
-								</el-form-item>
-								<el-form-item label="排除">
-									<el-input class="width250" auto-complete="off" v-model="config.ranking.condition.employeeName" placeholder="请选择排除对象"></el-input>
-									<div @click="noPersonnelListTips" style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"></div>
+								<el-form-item style="margin-bottom: 30px;">
+									  <el-radio-group v-model="config.ranking_type">
+									    <el-radio label="ranking">阶段排名</el-radio>
+									    <el-radio label="ranking_total">累计排名</el-radio>
+									  </el-radio-group>
+									  <div style="position: absolute;z-index: 999;left: 0px;top: 30px;font-size: 12px;line-height: 14px;" class="fontColorC">
+										  <span v-if="config.ranking_type=='ranking'">阶段排名仅统计时间区间内的积分数据<br/>不包含基础分和工龄分</span>
+										  <span v-else>累计B分排名即员工从入职至今的所有B分总计<br/>包含基础分和工龄分</span>
+									</div>
 								</el-form-item>
+								<div style="min-height: 362px;">
+									<template v-if="config.ranking_type=='ranking'">
+										<el-form-item label="名称">
+											<el-input class="width250" maxlength="10" show-word-limit v-model.trim="config.ranking.name" placeholder="请输入名称"></el-input>
+										</el-form-item>
+										<el-form-item label="时间">
+											<el-select class="width250" v-model="config.ranking.condition.date" placeholder="请选择积分类型">
+												<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+											</el-select>
+											<el-date-picker
+												class="width250"
+												v-if="config.ranking.condition.date == 1"
+												v-model="config.ranking.condition.time"
+												type="daterange"
+												value-format="timestamp"
+												@change="setTime"
+												:clearable="false"
+												range-separator="至"
+												start-placeholder="开始日期"
+												end-placeholder="结束日期"
+											></el-date-picker>
+										</el-form-item>
+										<el-form-item label="部门">
+											<template slot="label">
+												<el-tooltip effect="dark" placement="top">
+												  <template slot="content">
+													选择部门默认包含子部门
+												  </template>
+												  <span>部门	<i class="el-icon-warning"></i></span>
+												</el-tooltip>
+											</template>
+											<el-cascader
+												v-model="config.ranking.condition.deptArr"
+												:options="dept_tree"
+												:props="{checkStrictly: true, multiple : true, value: 'id', label: 'name', children: '_child' }"
+												class="width250"
+												ref="dept1"
+												filterable
+												collapse-tags
+												placeholder="全公司"
+												clearable
+											></el-cascader>
+										</el-form-item>
+										<el-form-item label="人员">
+											<el-select class="width250" v-model="config.ranking.condition.position" placeholder="请选择人员范围">
+												<el-option v-for="item in roleOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
+											</el-select>
+										</el-form-item>
+										<el-form-item label="类型">
+											<el-select class="width250" v-model="config.ranking.condition.point_id" placeholder="请选择积分类型">
+												<el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value" v-if="item.value != 1"></el-option>
+											</el-select>
+										</el-form-item>
+										<el-form-item label="排除">
+											<el-input class="width250" auto-complete="off" v-model="config.ranking.condition.employeeName" placeholder="请选择排除对象"></el-input>
+											<div @click="noPersonnelListTips" style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"></div>
+										</el-form-item>	
+									</template>
+									<template v-else>
+										<el-form-item label="名称">
+											<el-input class="width250" maxlength="10" show-word-limit v-model.trim="config.ranking_total.name" placeholder="请输入名称"></el-input>
+										</el-form-item>
+										<el-form-item label="部门">
+											<template slot="label">
+												<el-tooltip effect="dark" placement="top">
+												  <template slot="content">
+													选择部门默认包含子部门
+												  </template>
+												  <span>部门	<i class="el-icon-warning"></i></span>
+												</el-tooltip>
+											</template>
+											<el-cascader
+												v-model="config.ranking_total.condition.deptArr"
+												:options="dept_tree"
+												:props="{checkStrictly: true, multiple : true, value: 'id', label: 'name', children: '_child' }"
+												class="width250"
+												ref="dept6"
+												filterable
+												collapse-tags
+												placeholder="全公司"
+												clearable
+											></el-cascader>
+										</el-form-item>
+									</template>
+								</div>
 							</div>
 						</div>
-
 						<div class="kuai">
 							<div class="formTitle">今日积分数据设置</div>
 							<div class="formBox">
 								<el-form-item label="部门">
+									<template slot="label">
+										<el-tooltip effect="dark" placement="top">
+										  <template slot="content">
+											选择部门默认包含子部门
+										  </template>
+										  <span>部门	<i class="el-icon-warning"></i></span>
+										</el-tooltip>
+									</template>
 									<el-cascader
 										v-model="config.center.deptArr"
 										:options="dept_tree"
-										:props="{ multiple : true,checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
+										:props="{checkStrictly: true, multiple : true, value: 'id', label: 'name', children: '_child' }"
 										ref="dept2"
 										class="width250"
 										filterable
 										collapse-tags
-										placeholder="全部部门"
+										placeholder="全公司"
 										clearable
 									></el-cascader>
 								</el-form-item>
@@ -251,18 +303,24 @@
 							  </el-tooltip>
 							</div>
 							<div class="formBox">
-<!-- 								<div style="color: #333;font-weight: 700;margin-bottom: 10px;">占比说明 </div>
-								<div class="fontColorC" style="line-height: 23px;margin-bottom: 10px;">获得积分人员占比=获得积分的人数/参与积分的总人数</br>执行奖扣管理人员占比=有执行奖扣的人/总管理者人数</br>基准标尺为执行下限,要求活跃度在标尺之上执行才算执行到位</div> -->
 								<el-form-item label="部门">
+									<template slot="label">
+										<el-tooltip effect="dark" placement="top">
+										  <template slot="content">
+											选择部门默认包含子部门
+										  </template>
+										  <span>部门	<i class="el-icon-warning"></i></span>
+										</el-tooltip>
+									</template>
 									<el-cascader
 										v-model="config.active.deptArr"
 										:options="dept_tree"
-										:props="{ multiple : true,checkStrictly : true, value: 'id', label: 'name', children: '_child' }"
+										:props="{checkStrictly: true, multiple : true, value: 'id', label: 'name', children: '_child' }"
 										ref="dept3"
 										class="width250"
 										filterable
 										collapse-tags
-										placeholder="全部部门"
+										placeholder="全公司"
 										clearable
 									></el-cascader>
 								</el-form-item>
@@ -289,20 +347,28 @@
 									<el-input class="width250" maxlength="10" show-word-limit v-model.trim="config.event.name" placeholder="请输入名称"></el-input>
 								</el-form-item>
 								<el-form-item label="来源">
-									<el-select class="width250" multiple v-model="config.event.source_type" placeholder="请选择来源">
+									<el-select class="width250" multiple v-model="config.event.source_type" placeholder="全部">
 										<el-option v-for="item in sourceOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
 									</el-select>
 								</el-form-item>
 								<el-form-item label="部门">
+									<template slot="label">
+										<el-tooltip effect="dark" placement="top">
+										  <template slot="content">
+											选择部门默认包含子部门
+										  </template>
+										  <span>部门	<i class="el-icon-warning"></i></span>
+										</el-tooltip>
+									</template>
 									<el-cascader
 										v-model="config.event.deptArr"
 										:options="dept_tree"
-										:props="{ multiple : true,checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
+										:props="{checkStrictly: true,multiple : true, value: 'id', label: 'name', children: '_child' }"
 										ref="dept4"
 										class="width250"
 										filterable
 										collapse-tags
-										placeholder="全部部门"
+										placeholder="全公司"
 										clearable
 									></el-cascader>
 								</el-form-item>
@@ -431,7 +497,7 @@ export default {
 				},
 				{
 					value: 10,
-					label: '钉钉报告直接奖励'
+					label: '钉钉汇报(日志)奖扣分'
 				}
 			],
 			typeOptions: [
@@ -469,23 +535,32 @@ export default {
 			},
 			defaultConfig: {
 				//配置格式 不是删除则必填
+				ranking_type:'ranking',
 				company: {
 					name: this.$getUserData().company_info.name.slice(0, 10), //不超过十个字 公司名截断
 					logo: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/intesys/dd/17/2022/07/01/CaBis82ryBYbncxc3nehiSXkiwDbhbwi.png' //公司logo
 				},
 				title: '积分数据大屏', //不超过十个字
+				ranking_total: { //累计B分排名拿数据
+					name: "排行榜",  //不超过十个字
+					condition: { //筛选条件
+						dept: [],   //限定部门ID列表  空全公司
+						deptArr: [],
+						point_id: "2",//2AF 3BF,
+						position: "employee",//employee manager  all//员工 管理员  全部
+						exclusion: [],//不参与排名用户ID数组,
+					}
+				},
 				ranking: {
 					//从阶段排名拿数据
 					name: '排行榜', //不超过十个字
-					condition: {
-						//筛选条件,
+					condition: {//筛选条件
 						time: [],
 						date: -3,
 						start_date: -3, //结束时间
 						end_date: -3, //开始时间
 						deptArr: [],
 						dept: [], //限定部门ID列表  空全公司
-			
 						point_id: 3, //2AF   3BF,
 						position: 'all', //manager  all//员工 管理员  全部
 						employeeName: '',
@@ -514,11 +589,22 @@ export default {
 			},
 			config: {
 				//配置格式 不是删除则必填
+				ranking_type:'ranking',
 				company: {
 					name: this.$getUserData().company_info.name.slice(0, 10), //不超过十个字 公司名截断
 					logo: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/intesys/dd/17/2022/07/01/CaBis82ryBYbncxc3nehiSXkiwDbhbwi.png' //公司logo
 				},
 				title: '积分数据大屏', //不超过十个字
+				ranking_total: { //累计B分排名拿数据
+					name: "累计B分排名",  //不超过十个字
+					condition: { //筛选条件
+						dept: [],   //限定部门ID列表  空全公司
+						deptArr: [],
+						point_id: "2",//2AF 3BF,
+						position: "employee",//employee manager  all//员工 管理员  全部
+						exclusion: [],//不参与排名用户ID数组,
+					}
+				},
 				ranking: {
 					//从阶段排名拿数据
 					name: '排行榜', //不超过十个字
@@ -556,7 +642,7 @@ export default {
 					point_id: [2, 3], //积分类型  2AF 3BF
 					ptId: 1
 				}
-			}
+			},
 		};
 	},
 	watch: {
@@ -569,11 +655,13 @@ export default {
 		},
 		'config.event.deptArr'(val) {
 			if(val.length>0){
-				let dept_id = [];
-				for (var i in val) {
-				  dept_id.push(val[i][val[i].length-1]);
-				}
-				this.config.event.dept = dept_id;
+				let dept_ids=[];
+				val.forEach((item)=>{
+					dept_ids.push(item[item.length-1]);
+					// dept_ids.push(...item);
+				})
+				let set =new Set(dept_ids);
+				this.config.event.dept = [...set];
 			}else{
 				this.config.event.dept=[];
 			}
@@ -581,11 +669,13 @@ export default {
 		},
 		'config.active.deptArr'(val) {
 			if(val.length>0){
-				let dept_id = [];
-				for (var i in val) {
-				  dept_id.push(val[i][val[i].length-1]);
-				}
-				this.config.active.dept = dept_id;
+				let dept_ids=[];
+				val.forEach((item)=>{
+					dept_ids.push(item[item.length-1]);
+					// dept_ids.push(...item);
+				})
+				let set =new Set(dept_ids);
+				this.config.active.dept = [...set];
 			}else{
 				this.config.active.dept=[];
 			}
@@ -593,11 +683,13 @@ export default {
 		},
 		'config.center.deptArr'(val) {
 			if(val.length>0){
-				let dept_id = [];
-				for (var i in val) {
-				  dept_id.push(val[i][val[i].length-1]);
-				}
-				this.config.center.dept = dept_id;
+				let dept_ids=[];
+				val.forEach((item)=>{
+					dept_ids.push(item[item.length-1]);
+					// dept_ids.push(...item);
+				})
+				let set =new Set(dept_ids);
+				this.config.center.dept = [...set];
 			}else{
 				this.config.center.dept=[];
 			}
@@ -605,16 +697,32 @@ export default {
 		},
 		'config.ranking.condition.deptArr'(val) {
 			if(val.length>0){
-				let dept_id = [];
-				for (var i in val) {
-				  dept_id.push(val[i][val[i].length-1]);
-				}
-				this.config.ranking.condition.dept = dept_id;
+				let dept_ids=[];
+				val.forEach((item)=>{
+					dept_ids.push(item[item.length-1]);
+					// dept_ids.push(...item);
+				})
+				let set =new Set(dept_ids);
+				this.config.ranking.condition.dept = [...set];
 			}else{
 				this.config.ranking.condition.dept=[];
 			}
 			this.closeDept()
 		},
+		'config.ranking_total.condition.deptArr'(val) {
+			if(val.length>0){
+				let dept_ids=[];
+				val.forEach((item)=>{
+					dept_ids.push(item[item.length-1]);
+					// dept_ids.push(...item);
+				})
+				let set =new Set(dept_ids);
+				this.config.ranking_total.condition.dept = [...set];
+			}else{
+				this.config.ranking_total.condition.dept=[];
+			}
+			this.closeDept()
+		},
 		'config.ranking.condition.date'(val){
 			if(val!=1){
 				this.config.ranking.condition.start_date= val; //结束时间
@@ -651,7 +759,7 @@ export default {
 		this.getDepartment();
 	},
 	methods: {
-	  setTime(val){
+	    setTime(val){
 			if(val&&val.length>0){
 				this.config.ranking.condition.start_date= val[0]; //结束时间
 				this.config.ranking.condition.end_date= val[1]+86399000; //结束时间
@@ -800,36 +908,52 @@ export default {
 				this.$message.error('请输入标题');
 				return false;
 			}
+			
 			if (!this.config.company.name) {
 				this.$message.error('请输入组织名称和logo设置 “名称”');
 				return false;
 			}
-			if (!this.config.ranking.name) {
-				this.$message.error('请输入排行榜设置 “名称”');
-				return false;
+			
+			if(this.config.ranking_type=='ranking'){
+				if (!this.config.ranking.name) {
+					this.$message.error('请输入排行榜设置 “名称”');
+					return false;
+				}
+				if(!this.config.ranking_total.name){
+					this.config.ranking_total.name='累计B分排名'
+				}
+				if(this.config.ranking.condition.date == 1&&!this.config.ranking.condition.start_date){
+					if(this.config.ranking.condition.time.length!=0){
+						let time=this.config.ranking.condition.time
+						this.config.ranking.condition.start_date= time[0]; //结束时间
+						this.config.ranking.condition.end_date= time[1]+86399000; //结束时间
+					}else{
+						this.$message.error('请选择排行榜设置 “时间”');
+						return false;
+					}
+				}
+			}else{
+				if (!this.config.ranking_total.name) {
+					this.$message.error('请输入排行榜设置 “名称”');
+					return false;
+				}
+				if(!this.config.ranking.name){
+					this.config.ranking.name='排行榜'
+				}
 			}
+			
 			if (!this.config.event.name) {
 				this.$message.error('请输入积分快讯设置 “名称”');
 				return false;
 			}
 			if (this.config.active.base_ratio>100) {
-				this.$message.error('活跃度设置设置 “标尺” 不能超过100');
+				this.$message.error('活跃度设置 “标尺” 不能超过100');
 				return false;
 			}
 			if (!this.config.active.base_ratio) {
-				this.$message.error('活跃度设置设置 “标尺” 不能为空,请输入1~100');
+				this.$message.error('活跃度设置 “标尺” 不能为空,请输入1~100');
 				return false;
 			}
-			if(this.config.ranking.condition.date == 1&&!this.config.ranking.condition.start_date){
-				if(this.config.ranking.condition.time.length!=0){
-					let time=this.config.ranking.condition.time
-					this.config.ranking.condition.start_date= time[0]; //结束时间
-					this.config.ranking.condition.end_date= time[1]+86399000; //结束时间
-				}else{
-					this.$message.error('请选择排行榜设置 “时间”');
-					return false;
-				}
-			}
 			if (this.config.event.source_type.length==0) {
 				this.$message.error('请输入积分快讯设置 “来源” 至少选择一项');
 				return false;
@@ -842,6 +966,8 @@ export default {
 				remake_code: 0 ,//是否重新生成校验码 1 是 默认0
 				config:JSON.stringify(this.config)
 			}
+			// console.log(data)
+			// return false
 			this.$axios('post', '/api/integral/site/edit_screen', data).then(res => {
 				if (res.data.code == 1) {
 					this.$message.success("保存成功");
@@ -854,10 +980,25 @@ export default {
 			
 		},
 		openSet(item) {
-			this.config=item.config;
-			this.selectItem=item;
-			this.employee_selected.employee=item.config.ranking.condition.employee;
-			this.dialogVisible = true;
+			if(!item.config.ranking_total){
+				item.config.ranking_total={
+					name: "累计B分排名",  //不超过十个字
+					condition: { //筛选条件
+						dept: [],   //限定部门ID列表  空全公司
+						deptArr: [],
+						point_id: "2",//2AF 3BF,
+						position: "employee",//employee manager  all//员工 管理员  全部
+						exclusion: [],//不参与排名用户ID数组,
+					}
+				}
+				item.config.ranking_type='ranking'
+			}
+			this.$nextTick(()=>{
+				this.config=JSON.parse(JSON.stringify(item.config));
+				this.selectItem=item;
+				this.employee_selected.employee=item.config.ranking.condition.employee;
+				this.dialogVisible = true;
+			})
 		},
 		getList() {
 			this.loading = true;

+ 80 - 35
src/views/set/systemLayout.vue

@@ -81,6 +81,21 @@
 						<div>开启后,审批员工申请的积分和任务也会记入Ta的奖扣分目标内</div>
 					</div>
 				</div>
+				<div class="integralApproval">
+					<b>管理者奖扣分目标结算时间(不达标自动扣分)</b>
+					<div class="flex-box flex-v-ce" style="margin-top:10px;">
+						每月
+						<el-select v-model="task_schedule_day" size="mini" style="margin: 0 10px;width: 80px;" placeholder="请选择截止日期">
+							<el-option v-for="item in columns" :key="item.value" :label="item.name" :value="item.value"></el-option>
+						</el-select>
+						结算上个月的管理者奖扣,不达标的自动扣分
+					</div>
+					<div style="margin-top:5px;" class="fontColorC">
+						<div>结算产生的积分事件均记录为上月的管理者积分,例如6月5号结算5月份的管理者奖扣:</div>
+						<div>如果5月份管理者“张三”存在目标不达标,将进行扣分,扣分事件计入5月份的积分排名和统计中</div>
+						<div class="orange">*注:如上月已结算扣分,修改结算时间不会再次结算,请企业根据自身情况合理设置结算时间</div>
+					</div>
+				</div>
 				<!-- <el-button type="primary" class="save pop-up" @click="saveFirst('first')">保存</el-button> -->
 			</el-tab-pane>
 			<el-tab-pane label="通知设置" name="second">
@@ -208,6 +223,40 @@ export default {
 			event_apply_review:1,//任务积分是否开启复核 1 开启 0或其他不开启
 			event_entry_review:1,//录入积分,是否开启复核 1 开启 0或其他不开启
 			event_review_point:1,//复核积分,是否允许修改分值 1 可以 0或其他不可以
+			columns: [
+				{ name: '1号', value: 1 },
+				{ name: '2号', value: 2 },
+				{ name: '3号', value: 3 },
+				{ name: '4号', value: 4 },
+				{ name: '5号', value: 5 },
+				{ name: '6号', value: 6 },
+				{ name: '7号', value: 7 },
+				{ name: '8号', value: 8 },
+				{ name: '9号', value: 9 },
+				{ name: '10号', value: 10 },
+				{ name: '11号', value: 11 },
+				{ name: '12号', value: 12 },
+				{ name: '13号', value: 13 },
+				{ name: '14号', value: 14 },
+				{ name: '15号', value: 15 },
+				{ name: '16号', value: 16 },
+				{ name: '17号', value: 17 },
+				{ name: '18号', value: 18 },
+				{ name: '19号', value: 19 },
+				{ name: '20号', value: 20 },
+				{ name: '21号', value: 21 },
+				{ name: '22号', value: 22 },
+				{ name: '23号', value: 23 },
+				{ name: '24号', value: 24 },
+				{ name: '25号', value: 25 },
+				{ name: '26号', value: 26 },
+				{ name: '27号', value: 27 },
+				{ name: '28号', value: 28 },
+				// { name: '29号', value: 29 },
+				// { name: '30号', value: 30 },
+				// { name: '31号', value: 31 }
+			],
+			task_schedule_day:1,
 		};
 	},
 	mounted() {
@@ -262,6 +311,7 @@ export default {
 				data.event_apply_review=this.event_apply_review? 1 : 0;//任务积分是否开启复核 1 开启 0或其他不开启
 				data.event_entry_review=this.event_entry_review? 1 : 0;//录入积分,是否开启复核 1 开启 0或其他不开启
 				data.event_review_point=this.event_review_point? 1 : 0;//复核积分,是否允许修改分值 1 可以 0或其他不可以
+				data.task_schedule_day=this.task_schedule_day  //月结日期
 				if(this.event_review_status&&!data.event_task_review&&!data.event_apply_review&&!data.event_entry_review){
 					this.$message({
 						message: '复核来源至少选择一项',
@@ -269,8 +319,6 @@ export default {
 					});
 					return;
 				}
-				
-				
 			} else {
 				data.report_integral_daily = this.individualPoints ? 1 : 0;
 				this.individualPoints ? (data.report_integral_daily_a = this.checked ? 1 : 0) : '';
@@ -295,40 +343,37 @@ export default {
 		},
 		cheakAx(name) {
 			this.loading = true;
-			this.$axios('get', '/api/integral/site/config')
-				.then(res => {
-					let data = res.data.data;
-					this.$store.dispatch('setConfig', res.data.data);
-					if (name == 'first') {
-						if(data.specified_rule_item){
-							this.ruleOnoff = data.specified_rule_item == 1 ? true : false;
-						}else{
-							this.ruleOnoff = false
-						}
-						this.shop_status=data.shop_status;//是否开启福利模块
-						this.examine = data.rule_limit_check == 0 ? true : false;
-						this.isApB = data.a2b == 0 ? false : true;
-						this.task_review = data.task_review == 1 ? true : false;
-						this.pointNum = data.a2b;
-						
-						this.event_review_status=data.event_review_status;//是否开启复核 1 开启 0或其他 不开启
-						this.event_task_review=data.event_task_review== 1 ? true : false;//审批是否开启复核 1 开启 0或其他不开启
-						this.event_apply_review=data.event_apply_review== 1 ? true : false;//任务积分是否开启复核 1 开启 0或其他不开启
-						this.event_entry_review=data.event_entry_review== 1 ? true : false;//录入积分,是否开启复核 1 开启 0或其他不开启
-						this.event_review_point=data.event_review_point== 1 ? true : false;//复核积分,是否允许修改分值 1 可以 0或其他不可以
-						
-						
-					} else {
-						this.individualPoints = data.report_integral_daily == 1 ? true : false;
-						this.checked = this.individualPoints ? (data.report_integral_daily_a == 1 ? true : false) : false;
-						this.pointManagement = data.report_integral_weekly == 1 ? true : false;
-						this.taskToInform = data.report_work_daily == 1 ? true : false;
-						this.approvalNotice = data.report_review_daily == 1 ? true : false;
+			this.$axios('get', '/api/integral/site/config').then(res => {
+				let data = res.data.data;
+				this.$store.dispatch('setConfig', res.data.data);
+				if (name == 'first') {
+					if(data.specified_rule_item){
+						this.ruleOnoff = data.specified_rule_item == 1 ? true : false;
+					}else{
+						this.ruleOnoff = false
 					}
-				})
-				.finally(err => {
-					this.loading = false;
-				});
+					this.shop_status=data.shop_status;//是否开启福利模块
+					this.examine = data.rule_limit_check == 0 ? true : false;
+					this.isApB = data.a2b == 0 ? false : true;
+					this.task_review = data.task_review == 1 ? true : false;
+					this.pointNum = data.a2b;
+					
+					this.event_review_status=data.event_review_status;//是否开启复核 1 开启 0或其他 不开启
+					this.event_task_review=data.event_task_review== 1 ? true : false;//审批是否开启复核 1 开启 0或其他不开启
+					this.event_apply_review=data.event_apply_review== 1 ? true : false;//任务积分是否开启复核 1 开启 0或其他不开启
+					this.event_entry_review=data.event_entry_review== 1 ? true : false;//录入积分,是否开启复核 1 开启 0或其他不开启
+					this.event_review_point=data.event_review_point== 1 ? true : false;//复核积分,是否允许修改分值 1 可以 0或其他不可以
+					this.task_schedule_day=data.task_schedule_day;
+				} else {
+					this.individualPoints = data.report_integral_daily == 1 ? true : false;
+					this.checked = this.individualPoints ? (data.report_integral_daily_a == 1 ? true : false) : false;
+					this.pointManagement = data.report_integral_weekly == 1 ? true : false;
+					this.taskToInform = data.report_work_daily == 1 ? true : false;
+					this.approvalNotice = data.report_review_daily == 1 ? true : false;
+				}
+			}).finally(err => {
+				this.loading = false;
+			});
 		},
 		// 页码变更
 		handleCurrentChange(val) {

+ 7 - 4
src/views/welfare/conversion.vue

@@ -121,7 +121,7 @@
 					</div>
 					<div class="flex-box-ce results" v-for="(item, index) in results" :key="index">
 						<div style="border-right: 1px solid #f1f1f1;width: 50px;">{{ results.length - index }}</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.task.msg.name }}</div>
+						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.source_msg.name }}</div>
 						<div class="flex-2 green" v-if="item.status == 1">{{ item.msg }}</div>
 						<div class="flex-2 red" v-else>{{ item.msg }}</div>
 					</div>
@@ -369,7 +369,7 @@ export default {
 				this.isShowError = false;
 				this.isShowBreak = false;
 				this.errorMsg = '服务器繁忙,请稍后再试';
-				this.$socketApi.closewebsocket();
+				this.$socketApiTow.closewebsocket();
 				this.getList();
 			}
 		}
@@ -473,12 +473,15 @@ export default {
 		opneWebSocket() {
 			let wsData = this.resultList;
 			if (wsData[this.resultIndex] && !this.isShowError) {
-				this.$socketApi.sendData(wsData[this.resultIndex], this.onmessageWS);
+				this.$socketApiTow.sendData(wsData[this.resultIndex], this.onmessageWS);
 			}
 		},
 		onmessageWS(e) {
 			if (e.type == 'consume_deal') {
-				this.results.unshift(e.result);
+				let result=e.result;
+				result.status=e.code
+				result.msg=e.msg
+				this.results.unshift(result);
 				this.resultIndex++;
 				this.opneWebSocket();
 				// 进度条

+ 10 - 7
src/views/welfare/flManagement.vue

@@ -302,9 +302,9 @@
 					</div>
 					<div class="flex-box-ce results" v-for="(item, index) in results" :key="index">
 						<div style="border-right: 1px solid #f1f1f1;width: 50px;">{{results.length-index}}</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{returnName(item.task.msg.employee_id)}}</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.task.msg.num||'-' }}</div>
-						<div class="flex-2" style="border-right: 1px solid #f1f1f1;">{{ item.task.msg.remark }}</div>
+						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{returnName(item.source_msg.employee_id)}}</div>
+						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.source_msg.num||'-' }}</div>
+						<div class="flex-2" style="border-right: 1px solid #f1f1f1;">{{ item.source_msg.remark }}</div>
 						<div class="flex-2 green" v-if="item.status==1">{{ item.msg }}</div>
 						<div class="flex-2 red" v-else>{{ item.msg }}</div>
 					</div>
@@ -446,7 +446,7 @@ export default {
 				this.countVal=0;
 				this.Administrator= [];
 				this.selected={ dept: [], employee: [] };
-				this.$socketApi.closewebsocket();
+				this.$socketApiTow.closewebsocket();
 			}
 		},
 		isDetail(val) {
@@ -473,7 +473,7 @@ export default {
 				this.isShowError = false;
 				this.isShowBreak = false;
 				this.errorMsg='服务器繁忙,请稍后再试';
-				this.$socketApi.closewebsocket();
+				this.$socketApiTow.closewebsocket();
 				this.get_list();
 			}
 		},
@@ -560,12 +560,15 @@ export default {
 		opneWebSocket() {
 			let wsData=this.resultList;
 			if(wsData[this.resultIndex]&&!this.isShowError){
-				this.$socketApi.sendData(wsData[this.resultIndex],this.onmessageWS)
+				this.$socketApiTow.sendData(wsData[this.resultIndex],this.onmessageWS)
 			}
 		},
 		onmessageWS(e){
 			if(e.type=='achievement_grant'||e.type=='achievement_take_back'||e.type=='achievement_exchange'){
-				this.results.unshift(e.result);
+				let result=e.result;
+				result.status=e.code
+				result.msg=e.msg
+				this.results.unshift(result);
 				this.resultIndex++;
 				this.opneWebSocket();
 				// 进度条

+ 3 - 1
src/views/welfare/operatingRecord.vue

@@ -301,8 +301,10 @@ export default {
 				url=url+'&employee_id='+this.exportData.employee_id
 			}
 			if(this.exportData.operator_id){
-				url=url+'&employee_id='+this.exportData.operator_id
+				url=url+'&operator_id='+this.exportData.operator_id
 			}
+			// console.log(url)
+			// return false
 			window.open(url,'_blank');
 		},
 		//分页

+ 30 - 4
src/views/workbench/review.vue

@@ -5,7 +5,7 @@
 				<el-tab-pane :disabled="loading" label="待复核" name="review"></el-tab-pane>
 				<el-tab-pane :disabled="loading" label="已复核" name="noreview"></el-tab-pane>
 			</el-tabs>
-			<el-form ref="form" :inline="true" label-width="80px">
+			<el-form ref="form" :inline="true" label-width="90px">
 				<el-form-item label="规则分类">
 					<el-cascader
 						class="date-picker-width"
@@ -30,10 +30,11 @@
 						class="date-picker-width"
 						v-model="dept_name"
 						:options="dept_tree"
-						:props="{ checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
+						:props="{ checkStrictly: true, multiple: true, value: 'id', label: 'name', children: '_child' }"
 						ref="dept"
+					    filterable
+					    collapse-tags
 						clearable
-						filterable
 						placeholder="全公司"
 					></el-cascader>
 				</el-form-item>
@@ -47,6 +48,20 @@
 						<el-option v-for="item in reviewArr" :key="item.id" :label="item.name" :value="item.id"></el-option>
 					</el-select>
 				</el-form-item>
+				<el-form-item label="人员状态">
+					<template slot="label">
+						<el-tooltip effect="dark" placement="top">
+						  <template slot="content">
+							默认仅显示组织架构中“已启用”人员的积分事件,未启用、已离职等人员的积分事件可以通过“未启用&未授权”筛选查看
+						  </template>
+						  <span>人员状态	<i class="el-icon-warning"></i></span>
+						</el-tooltip>
+					</template>
+					<el-select class="date-picker-width" size="medium" v-model="formData.is_enable">
+						<el-option  label="已启用" :value="1"></el-option>
+						<el-option  label="未授权&未启用" :value="0"></el-option>
+					</el-select>
+				</el-form-item>
 				<el-form-item label="时间">
 					<el-date-picker
 						v-model="time_slot"
@@ -369,6 +384,7 @@ export default {
 				page: 1,
 				page_size: 10,
 				dc_status:JSON.stringify([0]),
+				is_enable:1,
 				// order_key:'update_time'
 			},
 			time_slot: null,
@@ -458,6 +474,10 @@ export default {
 				this.deleteDisabled = false;
 			}
 		},
+		'formData.is_enable'(val, old_val) {
+			this.formData.page = 1;
+			this.get_integral_list(this.formData);
+		},
 		'formData.pt_id'(val, old_val) {
 			this.formData.page = 1;
 			!val ? delete this.formData.pt_id : '';
@@ -490,7 +510,13 @@ export default {
 		dept_name(val, old_val) {
 			this.formData.page = 1;
 			if (val.length !== 0) {
-				this.formData.dept_ids = val[val.length - 1];
+				let dept_ids=[];
+				val.forEach((item)=>{
+					dept_ids.push(item[item.length-1]);
+					// dept_ids.push(...item);
+				})
+				let set =new Set(dept_ids);
+				this.formData.dept_ids = [...set].toString();
 			} else {
 				this.formData.dept_ids = 0;
 			}