Parcourir la source

Merge branch 'dev' of http://git.pro.g107.net/guojy/dd_pc into dev

哥哥玩剑魂呢 il y a 4 ans
Parent
commit
af7ad2b422
55 fichiers modifiés avec 0 ajouts et 11310 suppressions
  1. 0 22
      src789/App.vue
  2. 0 35
      src789/api/auth.js
  3. 0 94
      src789/api/axios.js
  4. 0 3
      src789/assets/css/iconfont.css
  5. BIN
      src789/assets/css/iconfont.eot
  6. 0 56
      src789/assets/css/iconfont.svg
  7. BIN
      src789/assets/css/iconfont.ttf
  8. BIN
      src789/assets/css/iconfont.woff
  9. 0 254
      src789/assets/css/reset.css
  10. BIN
      src789/assets/image/APP.png
  11. BIN
      src789/assets/image/code.png
  12. BIN
      src789/assets/image/init.gif
  13. BIN
      src789/assets/image/kq1.png
  14. BIN
      src789/assets/image/kq2.png
  15. BIN
      src789/assets/image/logo.png
  16. BIN
      src789/assets/image/nodata.png
  17. BIN
      src789/assets/image/nodata_default.png
  18. BIN
      src789/assets/image/one.png
  19. BIN
      src789/assets/image/rules_mould.png
  20. BIN
      src789/assets/image/rules_mould1.png
  21. BIN
      src789/assets/image/statistics_NO1.png
  22. BIN
      src789/assets/image/statistics_NO2.png
  23. BIN
      src789/assets/image/statistics_NO3.png
  24. BIN
      src789/assets/image/two.png
  25. BIN
      src789/assets/image/wn.png
  26. 0 642
      src789/components/EmployeeSelector.vue
  27. 0 117
      src789/components/UserImage.vue
  28. 0 527
      src789/components/applicationIntegrationPopup.vue
  29. 0 700
      src789/components/bonusPointsPopup.vue
  30. 0 46
      src789/components/noData.vue
  31. 0 135
      src789/components/publics/workpoints.vue
  32. 0 162
      src789/components/season.vue
  33. 0 48
      src789/home.vue
  34. 0 333
      src789/index.vue
  35. 0 136
      src789/init.vue
  36. 0 116
      src789/main.js
  37. 0 32
      src789/noAccess.vue
  38. 0 190
      src789/router/index.js
  39. 0 15
      src789/store/index.js
  40. 0 399
      src789/views/abPoint/apply_list.vue
  41. 0 523
      src789/views/abPoint/award_punish.vue
  42. 0 908
      src789/views/ranking/custom_rank.vue
  43. 0 24
      src789/views/ranking/department_statistics.vue
  44. 0 164
      src789/views/ranking/deptRankSwiper.vue
  45. 0 669
      src789/views/ranking/dept_rank.vue
  46. 0 24
      src789/views/ranking/individual_statistics.vue
  47. 0 650
      src789/views/ranking/integral_event.vue
  48. 0 742
      src789/views/ranking/manager_statistics.vue
  49. 0 370
      src789/views/ranking/total_rank.vue
  50. 0 197
      src789/views/set/check.vue
  51. 0 430
      src789/views/set/framework.vue
  52. 0 87
      src789/views/set/initialPoint.vue
  53. 0 754
      src789/views/set/jurisdiction.vue
  54. 0 950
      src789/views/set/rule.vue
  55. 0 756
      src789/views/set/voluntarilyPoint.vue

+ 0 - 22
src789/App.vue

@@ -1,22 +0,0 @@
-<template>
-  <div id="app">
-    <router-view/>
-  </div>
-</template>
-<style>
-  @import "assets/css/reset.css";
-  @import "assets/css/iconfont.css";
-</style>
-<style lang="scss">
-	#app{
-		width: 100%;
-		height: 100%;
-	}
-	.icon {
-	  width: 1em;
-	  height: 1em;
-	  vertical-align: -0.15em;
-	  fill: currentColor;
-	  overflow: hidden;
-	}
-</style>

+ 0 - 35
src789/api/auth.js

@@ -1,35 +0,0 @@
-const TokenKey = 'A-Token'
-const UserIdKey = 'userData'
-const TypesKey = 'types'
-
-
-export function getUserData () {
-    return JSON.parse(localStorage.getItem(UserIdKey)); 
-}
-export function setUserData (data) {
-     localStorage.setItem(UserIdKey,JSON.stringify(data))
-}
-export function getTyps (id) {
-	 if(id){
-		 var arr=JSON.parse(localStorage.getItem(TypesKey));
-		 var item=arr.filter(element => {
-		       return  typeof(id)=='string'?element.code==id:element.id==id
-		 });
-		 return item[0]
-	 }else{
-		 return JSON.parse(localStorage.getItem(TypesKey));
-	 }
-}
-
-export function setTyps (data) {
-     localStorage.setItem(TypesKey,JSON.stringify(data))
-}
-
-export function getToken () {
-    return localStorage.getItem(TokenKey)
-}
-
-export function setToken (token) {
-     localStorage.setItem(TokenKey, token)
-}
-

+ 0 - 94
src789/api/axios.js

@@ -1,94 +0,0 @@
-import axios from 'axios'
-import {Message} from 'element-ui'
-import {
-	getToken,
-	setToken
-} from './auth.js'
-import qs from 'qs'
-const service = axios.create({
-	baseURL: process.env.VUE_APP_BASE_API, // api的base_url
-	// baseURL:'https://ding.insys.g107.com/',
-	timeout: 15000,
-	headers: {
-		'Content-Type': 'application/x-www-form-urlencoded',
-	},
-	transformRequest: [function(data) {
-		return qs.stringify(data)
-	}]
-})
-service.interceptors.request.use(
-	config => {
-		if (getToken()) {
-			config.headers['A-Token'] = getToken()
-			// config.headers['A-Token'] = ' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvdGVzdC1kaW5nLmcxMDcuY29tXC9hcGlcL2RpbmdcL2xvZ2luIiwiaWF0IjoxNjA4MTAxMTUwLCJleHAiOjE2MDg3MDExNTAsIm5iZiI6MTYwODEwMTE1MCwianRpIjoiRzd0VURhUmNaYTg4bjF2cyIsInN1YiI6MTY2LCJwcnYiOiJjYTY0ODlkNTBmMjQwN2E2NzgzMGU4MDkwZDAxNDg4MzU2ODU5NjJiIiwicm9sZSI6ImVtcGxveWVlIn0.RIZhoHAsj4Ru_Ap3sKgyfiG1fayG1Hgw7si9aekU8eE'
-		}
-		// if (config.url == '/api/integral/statistics/ranking' || config.url == '/api/integral/review/apply'|| config.url == '/api/rule/import') {
-		//   config.headers['Accept'] = 'application/vnd.test.v2+json'
-		// }
-		// if (config.url == '/api/integral/statistics/integral') {
-		//   config.headers['Accept'] = 'application/json, text/plain, */*';
-		// }
-		return config
-	},
-	error => {
-		Promise.reject(error)
-	}
-)
-
-// respone interceptor
-service.interceptors.response.use(
-	response => {
-		if (response.data.code === 1) {
-			if(response.data.data.token){
-				setToken(response.data.data.token);
-			}else if (response.data.refresh_token) {
-				if (response.data.refresh_token !== getToken()) {
-					setToken(response.data.refresh_token);
-				}
-			}
-			return response;
-		} else if (response.data.code === 401) {
-			Message({
-				message: response.data.msg,
-				type: 'error',
-			})
-			return Promise.reject(response.data.msg)
-		}else{
-			Message({
-				message: response.data.msg,
-				type: 'error',
-			})
-			return Promise.reject(response.data.msg)
-		}
-	},
-	error => {
-		// console.log(error)
-		if(error.message=='interrupt'){
-			// Message({
-			// 	message: '请勿频繁切换页面',
-			// 	type: 'warning',
-			// })
-			return Promise.reject(error.message)
-		}else if(error.message=='Network Error'){
-			Message({
-				message: '网络异常,请检查网络是否畅通,再重新进入应用',
-				type: 'error',
-			})
-			return Promise.reject(error.message)
-		}else if(error.message=='timeout of 15000ms exceeded'){
-			Message({
-				message: '请求超时,请稍后再试',
-				type: 'error',
-			})
-			return Promise.reject(error.message)
-		}else{
-			Message({
-				message: error.message,
-				type: 'error',
-			})
-			return Promise.reject(error.message)
-		}
-	}
-)
-
-export default service

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 3
src789/assets/css/iconfont.css


BIN
src789/assets/css/iconfont.eot


+ 0 - 56
src789/assets/css/iconfont.svg

@@ -1,56 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
-<!--
-2013-9-30: Created.
--->
-<svg>
-<metadata>
-Created by iconfont
-</metadata>
-<defs>
-
-<font id="iconfont" horiz-adv-x="1024" >
-  <font-face
-    font-family="iconfont"
-    font-weight="500"
-    font-stretch="normal"
-    units-per-em="1024"
-    ascent="896"
-    descent="-128"
-  />
-    <missing-glyph />
-    
-    <glyph glyph-name="xuanzhong_shouye1" unicode="&#58897;" d="M453 260.5c0 0.2 0 0.3 0.2 0.5 0.3 1.5 1.2 3.8 3.2 6.3 4.1 5.4 17.7 18.1 56 18.1 33.1 0 47.4-10 52.8-15.9 5-5.3 5.7-10 5.9-11.2V49H453V260.5z m502.2 159.6L527.9 790.5c-10.9 9.4-27 9.4-37.7-0.2L68.7 417.1c-6-5.4-9.7-13.1-9.7-21.3 0-15.7 12.8-28.5 28.5-28.5h59.2v-293.5c-1.1-10.4-3-47.9 21-75.5 11-12.5 31.6-27.6 67.2-27.6h533.6c1.4 0 2.7-0.2 4.2-0.2 12.8 0 43.9 2.6 68.6 25.2 13.6 12.7 29.9 36.2 29.9 77.2V368.3l66 2c8 0.3 15.6 3.8 20.7 9.8 10.4 11.8 9.2 29.8-2.7 40z"  horiz-adv-x="1024" />
-
-    
-    <glyph glyph-name="kaoqin_kaoqinyuebaobiao" unicode="&#59144;" d="M768 810.7H256c-70.6 0-128-57.4-128-128v-597.3c0-70.6 57.4-128 128-128h512c70.6 0 128 57.4 128 128V682.7c0 70.5-57.4 128-128 128z m42.7-725.4c0-23.5-19.1-42.7-42.7-42.7H256c-23.5 0-42.7 19.1-42.7 42.7V682.7c0 23.5 19.1 42.7 42.7 42.7h512c23.5 0 42.7-19.1 42.7-42.7v-597.4zM640 256H384c-23.6 0-42.7-19.1-42.7-42.7s19.1-42.7 42.7-42.7h256c23.6 0 42.7 19.1 42.7 42.7S663.6 256 640 256zM695.3 619.4L557.5 482.8l-115.3 45c-15 5.9-32.2 2.7-44.2-8.2L277.1 409.5c-17.4-15.9-18.7-42.9-2.8-60.3 8.4-9.2 20-13.9 31.6-13.9 10.2 0 20.5 3.7 28.7 11.1l101.3 92.3 116.5-45.5c15.7-6.1 33.6-2.5 45.5 9.5l157.5 156.2c16.8 16.6 16.8 43.6 0.2 60.3-16.5 16.7-43.5 16.8-60.3 0.2z"  horiz-adv-x="1024" />
-
-    
-    <glyph glyph-name="shezhi_jichushezhi" unicode="&#59148;" d="M341.3 213.3c31.6 0 59.2-17.2 73.9-42.7H896c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7H415.2c-14.8-25.5-42.3-42.6-73.9-42.6s-59.1 17.1-73.9 42.6H128c-23.6 0-42.7 19.1-42.7 42.7s19.1 42.7 42.7 42.7h139.4c14.8 25.6 42.3 42.7 73.9 42.7z m341.4 256c31.6 0 59.2-17.2 73.9-42.7H896c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7H756.6c-14.8-25.5-42.3-42.6-73.9-42.6s-59.1 17.1-73.9 42.6H128c-23.6 0-42.7 19.1-42.7 42.7s19.1 42.7 42.7 42.7h480.8c14.7 25.6 42.3 42.7 73.9 42.7z m-341.4 256c31.6 0 59.2-17.2 73.9-42.7H896c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7H415.2c-14.8-25.5-42.3-42.6-73.9-42.6s-59.1 17.1-73.9 42.6H128c-23.6 0-42.7 19.1-42.7 42.7s19.1 42.7 42.7 42.7h139.4c14.8 25.6 42.3 42.7 73.9 42.7z"  horiz-adv-x="1024" />
-
-    
-    <glyph glyph-name="shezhi_jifenguize" unicode="&#59149;" d="M806.2 810.7H262.7C181.2 810.4 128 764 128 725.3v-682.6c0-38.9 53.2-85.3 134.7-85.3h498.5c81.6 0 134.7 46.4 134.7 85.3V725.3c0.1 36.7-48.4 81.4-89.7 85.4zM640 725.3v-213.1l-41.9 31.5c-25.2 18.9-60.6 19-85.9 0.1l-42.9-32.1V725.3H640z m166.2-682.6H217.8V725.3H384V469c0-24.4 13.5-46.3 35.3-57.2 9.1-4.6 18.9-6.8 28.7-6.8 13.5 0 26.9 4.3 38.2 12.8l68.9 51.5 67.9-51c19.5-14.6 45.1-17 67-6.1 21.8 10.9 35.4 32.8 35.4 57.2v256h80.8v-682.7z"  horiz-adv-x="1024" />
-
-    
-    <glyph glyph-name="shezhi_jiaose" unicode="&#59151;" d="M338.1 42.7H213.3l-5 0.3c-21.2 2.5-37.7 20.5-37.7 42.4V682.7l0.3 5c2.5 21.2 20.5 37.7 42.4 37.7H768l5-0.3c21.2-2.5 37.7-20.5 37.7-42.4V599l0.3-5c2.5-21.2 20.5-37.7 42.4-37.7 23.6 0 42.7 19.1 42.7 42.7v83.7l-0.2 7.5c-4 67.2-59.7 120.5-127.9 120.5H213.3l-7.5-0.2c-67.2-3.9-120.5-59.6-120.5-127.8v-597.3l0.2-7.5c3.9-67.2 59.6-120.5 127.8-120.5h124.8l5 0.3c21.2 2.5 37.7 20.5 37.7 42.4 0 23.5-19.1 42.6-42.7 42.6zM822.7 196.5h-64.5c53.5 22.2 91.2 74.9 91.2 136.1V480H701.2C619.5 480 553 413.8 553 332.5c0-61.2 37.7-113.8 91.2-136.1h-64.5c-66.8 0-121.1-54-121.1-120.5V20c0-40 32.7-72.6 72.9-72.6h340.3c39.6 0 71.9 32.5 71.9 72.6v56c0.1 66.4-54.2 120.5-121 120.5z m-54.8 135.1c0-37.1-29.2-66.2-66.6-66.2s-66.7 29.1-66.7 66.2c0 36.5 29.9 66.2 66.7 66.2h66.6v-66.2zM540.2 75c0 22 17.4 39.2 39.5 39.2h243c22.2 0 39.5-17.2 39.5-39.2v-47.2h-322V75zM725.3 597.3c0 23.6-19.1 42.7-42.7 42.7h-384c-23.6 0-42.7-19.1-42.7-42.7s19.1-42.7 42.7-42.7h384c23.6 0.1 42.7 19.2 42.7 42.7zM298.7 469.3c-23.6 0-42.7-19.1-42.7-42.7s19.1-42.7 42.7-42.7h170.7c23.6 0 42.7 19.1 42.7 42.7s-19.1 42.7-42.7 42.7H298.7z"  horiz-adv-x="1024" />
-
-    
-    <glyph glyph-name="shezhi_zidongjifen" unicode="&#59152;" d="M380.9 733.8C438.6 834 582.3 836.5 640.4 739.9l4.2-7.4 0.4-0.8 51.7-103.3c6.2-13.5 20.9-24.4 39.4-28.7l6.3-1.2L856 582.1c117.1-15.8 165.1-153 86.6-239l-5.4-5.7-82.8-76.7c-12.6-12.2-19.3-28.6-18.8-43.7l0.6-5.6L855 101c19-114.6-98.4-199.8-204.1-153.6l-6.9 3.2-101.7 50.7c-16.8 8.1-34.8 9-51.4 3l-6.1-2.6-104.2-52.8c-105-51.8-225 29.8-211.8 143.2l1 7.4 19 111.7c3.2 15.3-1.3 30.5-13.3 43L86.9 338c-85 82.1-40.7 219.3 73.7 242.6l7.7 1.4 114 16.4c18.5 2.7 33.9 12.2 43.1 25.8l3.1 5.3 52.4 104.3z m188.3-41.3c-22.3 42.1-82.9 43.9-109.8 6l-3.3-5.2-51.3-102.5c-20.3-39.2-57.4-66.4-101.3-75.4l-8.9-1.5L181 497.6c-49-7.6-68.6-59.8-38.9-93.9l3.8-4 81.5-77.2c35.5-29.7 52.9-74.7 46.7-118.8L254 85.4c-7.5-45.5 39.1-80.1 83.3-62.5l5.1 2.3 104.6 53c39.5 19.1 83.7 20.4 124.3 3.6l8.6-3.9 102-50.9c44.4-21.9 92.9 10.2 89.5 54.7l-0.6 5.2L752 197.3c-6.9 42.1 7.1 85.8 37.1 118.5l6.7 6.8 82.3 76.3c33.6 33.4 17.3 87.5-28.3 97.6l-5.6 1L730.1 514c-45.7 6.6-86 32.5-106.5 69.8l-54.4 108.7z"  horiz-adv-x="1024" />
-
-    
-    <glyph glyph-name="shezhi_zuzhijiagou" unicode="&#59153;" d="M628.4 810.7c42.8 0 77.6-34.7 77.6-77.6v-155.2c0-42.8-34.7-77.6-77.6-77.6h-77.6v-77.6h196.5c18.6 0 33.9-15 36-34.3l0.2-4.5v-116.4h77.6c42.8 0 77.6-34.7 77.6-77.6v-155.2c0-42.8-34.7-77.6-77.6-77.6H628.4c-42.8 0-77.6 34.7-77.6 77.6V190.1c0 42.8 34.7 77.6 77.6 77.6h82.7v77.6H312.9v-77.6h82.8c42.8 0 77.6-34.7 77.6-77.6v-155.2c0-42.8-34.7-77.6-77.6-77.6H162.9c-42.8 0-77.6 34.7-77.6 77.6V190.1c0 42.8 34.7 77.6 77.6 77.6h77.6V384.1c0 19.9 14 36.3 32 38.5l4.2 0.3h196.5v77.6h-77.5c-42.8 0-77.6 34.7-77.6 77.6v155c0 42.8 34.7 77.6 77.6 77.6h232.7zM395.6 190.1H162.9v-155.2h232.7V190.1z m465.5 0H628.4v-155.2h232.7V190.1z m-232.7 543H395.6v-155.2h232.7V733.1z"  horiz-adv-x="1024" />
-
-    
-    <glyph glyph-name="PC_gongzuotai_ABfen" unicode="&#59165;" d="M512 810.7c235.6 0 426.7-191 426.7-426.7S747.6-42.7 512-42.7 85.3 148.4 85.3 384 276.4 810.7 512 810.7z m0-76.8c-193.2 0-349.9-156.6-349.9-349.9S318.8 34.1 512 34.1 861.9 190.8 861.9 384 705.2 733.9 512 733.9zM753.4 384L512 142.6 270.6 384 512 625.4 753.4 384z m-108.7 0L512 516.7 379.3 384 512 251.3 644.7 384z"  horiz-adv-x="1024" />
-
-    
-    <glyph glyph-name="dingdingPC_shezhi1" unicode="&#59173;" d="M516.8 745.5c-153.2 0-277.4-124.1-277.4-277.4 0-153.2 124.1-277.4 277.4-277.4 153.2 0 277.4 124.1 277.4 277.4-0.1 153-124.2 277.4-277.4 277.4z m0-408.9c-72.4 0-131.4 58.9-131.4 131.4s58.9 131.4 131.4 131.4S648.2 540.5 648.2 468s-59-131.4-131.4-131.4z m-251.9-46.1l-94.4-94.3c-7.5-7.5-10.4-18.5-7.6-28.8 2.7-10.2 10.9-18.2 21.2-21l80.6-21.2 21.2-80.6c2.7-10.2 10.5-18.4 21-21.2 2.6-0.6 5.2-0.9 7.7-0.9 7.7 0 15.2 3 21.1 8.8L468 163.7c-83.9 13.4-156.3 60.5-203.1 126.8z m588.4-94.3l-88.6 88.6c-48.5-65.6-122.6-111.2-207.3-122.3l131.2-131.2c5.5-5.5 13.2-8.8 21.1-8.8 2.6 0 5.2 0.3 7.7 0.9 10.2 2.7 18.2 10.9 21 21.2l21.1 80.7 80.6 21.1c10.2 2.7 18.4 10.5 21.2 21 2.5 10.2-0.5 21.2-8 28.8z"  horiz-adv-x="1024" />
-
-    
-    <glyph glyph-name="dingdingPC_tongji1" unicode="&#59174;" d="M534.7 747.7h-45.5c-25.1 0-45.5-20.3-45.5-45.5v-636.3c0-25.1 20.3-45.5 45.5-45.5h45.5c25.1 0 45.5 20.3 45.5 45.5V702.2c0 25.1-20.4 45.5-45.5 45.5zM762 384h-45.5c-25.1 0-45.5-20.3-45.5-45.5v-272.7c0-25.1 20.3-45.5 45.5-45.5H762c25.1 0 45.5 20.3 45.5 45.5V338.5c0 25.2-20.4 45.5-45.5 45.5zM307.5 543.1H262c-25.1 0-45.5-20.3-45.5-45.5v-431.8c0-25.1 20.3-45.5 45.5-45.5h45.5c25.1 0 45.5 20.3 45.5 45.5V497.7c-0.1 25.1-20.5 45.4-45.5 45.4z"  horiz-adv-x="1024" />
-
-    
-
-
-  </font>
-</defs></svg>

BIN
src789/assets/css/iconfont.ttf


BIN
src789/assets/css/iconfont.woff


+ 0 - 254
src789/assets/css/reset.css

@@ -1,254 +0,0 @@
-body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { margin:0; padding:0; }
-body, button, input, select, textarea {font-size:14px;color: #303133; }
-h1, h2, h3, h4, h5, h6{ font-size:100%; }
-address, cite, dfn, em, var { font-style:normal; }
-code, kbd, pre, samp { font-family:couriernew, courier, monospace; }
-small{ font-size:12px; }
-ul, ol { list-style:none; }
-a { text-decoration:none; }
-a:hover { text-decoration:underline; }
-sup { vertical-align:text-top; }
-sub{ vertical-align:text-bottom; }
-legend { color:#000; }
-fieldset, img { border:0; }
-button, input, select, textarea { font-size:100%; }
-table { border-collapse:collapse; border-spacing:0; }
-
-
-/* 盒子模型 */
-.flex-box {
-  display: -webkit-box;
-  display: -moz-box;
-  display: -ms-flexbox;
-  display: -webkit-flex;
-  display: flex;
-}
-
-/*盒子模型,竖向自适应,垂直排列  */
-.flex-box-v {
-  display: -webkit-box;
-  display: -webkit-flex;
-  display: flex;
-  -webkit-box-orient: vertical;
-  -webkit-flex-flow: column;
-  flex-flow: column !important;
-}
-
-/* 水平等列排版(容器左右没缝隙,子元素左右两边自适应) */
-.flex-d-center {
-  justify-content: space-between;
-  -webkit-justify-content: space-between;
-}
-
-/* 水平等列排版(子元素两边有缝隙自己适应) */
-.flex-dv-center {
-  justify-content: space-around;
-  -webkit-justify-content: space-around;
-}
-
-
-/*通过一起使用 box-align 和 box-pack 属性,对 view 框的子元素进行居中,目前没有浏览器支持box-align 和 box-pack 属性,所以需要加上浏览器内核-webkit,-moz等的简写  */
-.flex-center-center {
-  justify-content: center;
-  -webkit-justify-content: center;
-  -moz-justify-content: center;
-  align-items: center;
-  -webkit-align-items: center;
-  -webkit-box-pack: center;
-  -webkit-box-align: center;
-  -moz-align-items: center;
-  -moz-box-pack: center;
-  -moz-box-align: center;
-}
-
-/*对view中的子元素进行居中,并且位于容器的中间位置(flex-box水平;flex-box-v垂直)  */
-.flex-v-zhu,
-.flex-h-zhu {
-  justify-content: center;
-  -webkit-justify-content: center;
-  -webkit-box-pack: center;
-}
-
-/*对view中的子元素进行居中,并且位于容器的中间位置(flex-box垂直;flex-box-v水平)  */
-.flex-v-ce,
-.flex-h-ce {
-  align-items: center;
-  -webkit-align-items: center;
-  -webkit-box-align: center;
-}
-
-/*让所有弹性盒模型对象的子元素都有相同的长度,且忽略它们内部的内容:  */
-.flex-1 {
-  -webkit-box-flex: 1;
-  -moz-box-flex: 1;
-  -webkit-flex: 1;
-  -ms-flex: 1;
-  flex: 1;
-}
-
-.flex-2 {
-  -webkit-box-flex: 2;
-  box-flex: 2;
-  -moz-box-flex: 2;
-  -webkit-flex: 2;
-  -ms-flex: 2;
-  flex: 2;
-}
-
-.flex-3 {
-  -webkit-box-flex: 3;
-  box-flex: 3;
-  -moz-box-flex: 3;
-  -webkit-flex: 3;
-  -ms-flex: 3;
-  flex: 3;
-}
-
-.flex-4 {
-  -webkit-box-flex: 4;
-  box-flex: 4;
-  -moz-box-flex: 4;
-  -webkit-flex: 4;
-  -ms-flex: 4;
-  flex: 4;
-}
-
-
-.flex-5 {
-  -webkit-box-flex: 5;
-  box-flex: 5;
-  -moz-box-flex: 5;
-  -webkit-flex: 5;
-  -ms-flex: 5;
-  flex: 5;
-}
-
-.flex-direction-row-reverse {
-  flex-direction: row-reverse;
-  -webkit-flex-direction: row-reverse;
-}
-
-/*超出部分用....表示的公用样式  */
-.font-flex-word {
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-
-/* 内容超出部分自动换行 */
-.flex-d-wrap {
-  flex-wrap: wrap;
-}
-
-/* 内容超出部分不换行 */
-.flex-no-wrap {
-  flex-wrap: nowrap;
-}
-
-/* 从右边开始排列 */
-.flex-box-end {
-  display: -webkit-box;
-  display: -moz-box;
-  display: -ms-flexbox;
-  display: -webkit-flex;
-  display: flex;
-  justify-content: flex-end;
-}
-
-/* 字体颜色 */
-.blue {
-	color: #26A2FF!important;
-}
-
-.red {
-	color: #F56C6C!important;
-}
-
-.yellow {
-	color: #E6A23C!important;
-}
-
-.green {
-	color: #67C23A!important;
-}
-
-.fontColorZ {
-	color: #303133!important;
-}
-
-.fontColorF {
-	color: #606266 !important;
-}
-
-.fontColorT {
-	color: #C0C4CC!important;
-}
-
-/* 整体布局样式 */
-.all{
-	background-color: #fff;
-	border-radius: 5px;
-	min-height:calc(100vh - 184px);
-	min-width: 800px;
-	position: relative;
-}
-.terr-left {
-	width: 200px;
-	box-sizing: border-box;
-	padding: 20px 10px;
-	max-height: 600px;
-	overflow: auto;
-}
-.terr-left::-webkit-scrollbar {
-	width: 3px;
-	height: 3px;
-	background-color: #fff;
-}
-.terr-left::-webkit-scrollbar-thumb {
-	background-color: #D9D9D9;
-}
-.terr-right{
-	padding: 20px;
-	min-width: 600px;
-	box-sizing: border-box;
-}
-.border-right:after {
-	content: ' ';
-	position: absolute;
-	top: 0;
-	left: 200px;
-	bottom: 0;
-	width: 1px;
-	background: #ebeef5;
-}
-.border-right {
-	/* position: relative; */
-}
-.margin-bottom{
-	margin-bottom: 20px;
-}
-.diy-tip {
-	margin-bottom: 10px !important;
-	background: #f0f9eb !important;
-	color: #67c23a !important;
-	border: 1px solid #67c23a !important;
-	padding:16px !important;
-	min-width: 800px;
-	border-radius: 4px;
-}
-.diy-tip p{
-	color: #67c23a !important;
-}
-/* 分页样式 */
-.pagination{
-	padding: 20px 0;
-	text-align: center;
-}
-
-
-/* EL UI 重置 */
-
-.notifyBox{
-	width: auto !important;
-}
-

BIN
src789/assets/image/APP.png


BIN
src789/assets/image/code.png


BIN
src789/assets/image/init.gif


BIN
src789/assets/image/kq1.png


BIN
src789/assets/image/kq2.png


BIN
src789/assets/image/logo.png


BIN
src789/assets/image/nodata.png


BIN
src789/assets/image/nodata_default.png


BIN
src789/assets/image/one.png


BIN
src789/assets/image/rules_mould.png


BIN
src789/assets/image/rules_mould1.png


BIN
src789/assets/image/statistics_NO1.png


BIN
src789/assets/image/statistics_NO2.png


BIN
src789/assets/image/statistics_NO3.png


BIN
src789/assets/image/two.png


BIN
src789/assets/image/wn.png


+ 0 - 642
src789/components/EmployeeSelector.vue

@@ -1,642 +0,0 @@
-<template>
-	<div>
-		<div class="employee_selector_box">
-			<el-row :gutter="10">
-				<el-col :xs="11" :sm="11" :md="11" :lg="11" :xl="11" class="scroller-box one">
-					<div class="search-box">
-						<div class="search flex-box" style="margin-bottom: 7px;">
-							<el-input v-model="keyword" placeholder="请输入姓名" clearable></el-input>
-						</div>
-						<div class="search flex-box" v-if="can_select_dept">
-						    <el-cascader class="date-picker-width" v-model="dept_id" :options="dept_list" :props="{ checkStrictly: true,value:'id',label:'name',children:'_child'}" ref="dept"	clearable filterable placeholder="全公司"></el-cascader>
-						</div>
-					</div>
-					<div class="flex-box" style="padding: 10px;border-bottom: 1px solid #f1f1f1;">
-						<div class="flex-1"></div>
-						<el-checkbox v-if="isChecKedAll&&multi" v-model="checked" @change="checkedChange" :indeterminate="indeterminate">全选</el-checkbox>
-					</div>
-					<el-scrollbar wrap-class="column-wrapper scrollable-items-container" :native="false" style="height: 354px;" v-loading="table_loading">
-						<div class="choose_left">
-							<div class="persons_box" style="padding-top:4px;" v-if="list.length > 0">
-								<a class="employee_cell_a" href="javascript:void(0)" v-for="(item, index) in list" :key="index">
-									<div class="employee_cell flex-box flex-v-ce" v-if="can_select_employee" @click.prevent.stop="select_employee(item)">
-										<div class="employee_checkbox"><el-checkbox v-model="item.checked"></el-checkbox></div>
-										<userImage :user_name="item.name" :img_url="item.img_url" width="30px" height="30px"></userImage>
-										<div class="employee_name">{{ item.name }}</div>
-										<div class="employee_cell_clear"></div>
-									</div>
-								</a>
-							</div>
-							<div v-else class="fontColorF" style="text-align: center;margin-top: 50px;">暂无可选人员,请先在<span class="blue"> “设置-组织架构” </span>中为员工【开启积分管理】</div>
-						</div>
-					</el-scrollbar>
-				</el-col>
-				<el-col :xs="2" :sm="2" :md="2" :lg="2" :xl="2" class="col-line"><span style="opacity: 0;">空</span></el-col>
-				<el-col :xs="11" :sm="11" :md="11" :lg="11" :xl="11" class="scroller-box">
-					<div class="option-box flex-box flex-v-ce">
-						<div class="fontColorF flex-1" v-show="multi">已选择{{ employee_selected_list.length }}个员工</div>
-						<el-button type="type" @click="clear_data()">清空</el-button>
-					</div>
-					<el-scrollbar wrap-class="column-wrapper scrollable-items-container" :native="false" style="height: 400px;">
-						<div class="choose_right">
-							<div class="employee_cell flex-box flex-v-ce" v-for="(item, index) in dept_selected_list" :key="index">
-								<div class="employee_name">{{ item.dept_name }}</div>
-								<div class="employee_delete"><el-button type="default" size="mini" @click="dept_cancel(item)" icon="el-icon-close" circle></el-button></div>
-								<div class="employee_cell_clear"></div>
-							</div>
-
-							<div class="employee_cell" v-for="(item, index) in employee_selected_list" :key="index">
-								<userImage :user_name="item.name" :img_url="item.img_url" width="30px" height="30px"></userImage>
-								<div class="employee_name">{{ item.name }}</div>
-								<div class="employee_delete">
-									<el-button type="default" size="mini" @click="employee_cancel(item, true)" icon="el-icon-close" circle></el-button>
-								</div>
-								<div class="employee_cell_clear"></div>
-							</div>
-						</div>
-					</el-scrollbar>
-				</el-col>
-			</el-row>
-		</div>
-	</div>
-</template>
-
-<script>
-
-export default {
-  props: {
-    can_select_dept: {//是否能选择公司
-      type: Boolean,
-      default: true
-    },
-    can_select_employee: {//是否能选择员工
-      type: Boolean,
-      default: true
-    },
-    dept_not_select: {//排除部门的ID,包含ID时不出现在选择列表中
-      type: Array,
-      default: () => {
-        return []
-      }
-    },
-    selected: {//已经选择的员工和部门
-      type: Object,
-      default: () => {
-        return {
-          employee: [],
-          dept: []
-        }
-      }
-    },
-    multi: {//指定员工是否能多选
-      type: Boolean,
-      default: true
-    },
-    dept_multi: {//指定部门是否能多选
-      type: Boolean,
-      default: true
-    },
-    employee_list: {//指定显示的员工列表,注意:传值后组件的员工数据将不是统一向服务器获取的,而是指定的员工列表,格式是:[{id: 1, name: “张三”, img_url: “”}]
-      type: Array,
-      default: () => {
-        return []
-      }
-    },
-    close_clear_data: {//关闭时是否清空选择的数据
-      type: Boolean,
-      default: true
-    },
-    max: {//当multi为true时,用来限制选择人数,0不生效
-      type: Number,
-      default: 0
-    },
-    user_no_select:{//是否能选择创始人
-      type: Boolean,
-      default: true
-    },
-    isChecKedAll:{//是否能全人员
-      type: Boolean,
-      default: true
-     },
-	 my_no_select:{//当前设置人的id
-		  type: Number,
-		  default: 0
-	 },
-  },
-  name: "EmployeeSelector",
-  data() {
-    let selected = JSON.parse(JSON.stringify(this.selected));
-    let user_no_select = JSON.parse(JSON.stringify(this.user_no_select));
-    return {
-      table_loading:false,
-      employee_selected_list: selected.employee,
-      dept_selected_list: selected.dept,
-      employee_selected: [],
-      dept_selected: [],
-      com_height: '100%',
-
-      list: [],//人员列表
-	  dept_name: '',//部门名称
-	  dept_id: 0,//部门ID
-	  pid:0,//部门ID实传
-      dept_list: [],//部门列表
-	  dept_list_arr: [],//收集的部门
-      keyword: '',//搜索值
-      checked: false,//是否全选
-      indeterminate: false,
-      not_user: user_no_select
-    }
-  },
-  watch: {
-	dept_id(val){
-		if(val.length>1){
-			this.pid=val[val.length-1];
-		}else{
-			this.pid=val[0];
-		}
-		this.get_user_list();
-		this.checked=false;
-	},
-    selected(val) {
-      let selected = JSON.parse(JSON.stringify(val))
-      this.employee_selected = []
-      this.dept_selected = []
-      this.employee_selected_list = selected.employee
-      this.dept_selected_list = selected.dept
-      for (let i in selected.employee) {
-        this.employee_selected.push(selected.employee[i].id)
-      }
-      for (let i in selected.dept) {
-        this.dept_selected.push(selected.dept[i].dept_id)
-      }
-    },
-    //搜索
-    keyword(val) {
-      this.get_user_list();
-	  this.checked=false;
-    }
-  },
-  methods: {
-    //全选择
-    checkedChange(val){
-      if (val) {
-        for (let i in this.list) {
-          this.$set(this.list[i], 'checked', true)
-        }
-        this.$nextTick(() => {
-          let employeeSelectedList = JSON.parse(JSON.stringify(this.employee_selected_list))
-          let employeeSelectedIds = [], total = 0
-          employeeSelectedList.forEach(element => {
-            employeeSelectedIds.push(element.id)
-          });
-          for (const i in this.list) {
-            if (employeeSelectedIds.includes(this.list[i].id)) {
-              total += 1
-            }else{
-              this.employee_selected_list.push(this.list[i])
-            }
-          }
-          this.list.length == total?this.indeterminate = true:this.indeterminate = false
-        })
-      }else{
-        this.clear_data()
-      }
-    },
-    //添加或移除已添加的员工
-    employee_cancel(item) {
-      this.employee_selected_list.map((arr,index)=>{
-          if(arr.id==item.id){
-            this.employee_selected_list.splice(index,1);
-          }
-      })
-      this.list.map((arr,index)=>{
-          if(arr.id==item.id){
-           this.$set(arr, 'checked', false)
-          }
-      })
-    },
-	//获取部门
-	get_dept_list() {
-		this.$axios('get','/api/department/tree').then(res => {
-			this.dept_list =this.getTreeData(res.data.data.list);
-		});
-	},
-	 // 递归判断列表,把最后的children设为undefined
-	 getTreeData(data) {
-		for (var i = 0; i < data.length; i++) {
-			if (data[i]._child.length < 1) {
-				// children若为空数组,则将children设为undefined
-				data[i]._child = undefined;
-			} else {
-				// children若不为空数组,则继续 递归调用 本方法
-				this.getTreeData(data[i]._child);
-			}
-		}
-		return data;
-	 },
-    //选择部门
-    dept_cancel(item) {
-      this.dept_selected.splice(this.dept_selected.indexOf(item.id), 1)
-      let delete_index = -1
-      for (let i in this.dept_selected_list) {
-        if (this.dept_selected.indexOf(this.dept_selected_list[i].id) < 0) {
-          delete_index = i
-        }
-      }
-      if (delete_index >= 0) {
-        this.dept_selected_list.splice(delete_index, 1)
-        for (let i in this.dept_list) {
-          if (this.dept_list[i].dept_id == item.id) {
-            this.$set(this.dept_list[i], 'checked', false)
-          }
-        }
-      }
-    },
-    //选择员工
-    select_employee(item) {
-      if (item.checked) {
-        item.checked = false
-        this.employee_cancel(item)
-      } else {
-        if (!this.multi) {
-          this.employee_selected = []
-          this.employee_selected_list = []
-          for (let i in this.list) {
-            this.$set(this.list[i], 'checked', false)
-          }
-        }
-        if (this.max > 0 && this.employee_selected_list.length == this.max && this.multi) {
-          this.$message.error('最多只能选择' + this.max + '人')
-          return false
-        }
-        this.employee_selected.push(item.id)
-        this.employee_selected_list.push({
-          id: item.id,
-          name: item.name,
-          img_url: item.img_url
-        })
-        item.checked = true
-      }
-    },
-
-    clear_data() {
-      this.employee_selected = []
-      this.employee_selected_list = []
-      this.dept_selected = []
-      this.dept_selected_list = []
-      this.checked = false
-      for (let i in this.list) {
-        this.$set(this.list[i], 'checked', false)
-      }
-      for (let i in this.dept_list) {
-        this.$set(this.dept_list[i], 'checked', false)
-      }
-    },
-
-    close() {
-      if (this.close_clear_data) {
-        this.employee_selected = []
-        this.employee_selected_list = []
-        this.dept_selected = []
-        this.dept_selected_list = []
-        for (let i in this.list) {
-          this.$set(this.list[i], 'checked', false)
-        }
-        for (let i in this.dept_list) {
-          this.$set(this.dept_list[i], 'checked', false)
-        }
-      }
-    },
-    confirm() {
-      this.$emit('confirm', {
-        employee: this.employee_selected_list,
-        dept: this.dept_selected_list
-      })
-      this.close()
-    },
-    //获取员工详情
-    get_user_list() {
-      this.table_loading = true;
-      var that=this;
-      var employee_selected_list=this.employee_selected_list;
-      if (this.employee_list.length > 0) {
-        let list = this.employee_list
-        for (let i in list) {
-          list[i]['letter_index'] = '#';
-          if (this.$store.getters.employee_map[list[i].id]) {
-            list[i]['letter_index'] = this.$store.getters.employee_map[list[i].id].letter_index;
-            if (this.$store.getters.employee_map[list[i].id].img_url == '') {
-              list[i]['img_url'] = 'static/images/head_default.png';
-            } else {
-              list[i]['img_url'] = this.$store.getters.employee_map[list[i].id].img_url;
-            }
-          }
-
-          list[i]['checked'] = false
-          if (this.employee_selected.indexOf(list[i].id) >= 0) {
-            list[i]['checked'] = true
-          }
-        }
-        this.list = list.sort((a, b) => {
-          return a.letter_index.charCodeAt(0) - b.letter_index.charCodeAt(0)
-        })
-        return false
-      }
-	  
-      this.list = []
-      this.$axios('get','/api/employee/index',{ dept_id: this.pid,keywords: this.keyword, page: 0,page_size: 2000}).then((res) => {
-        var employee=res.data.data.list||[];
-		var userAll=[];
-        employee.forEach((item,i)=>{
-			  if(!this.not_user && item.is_creator == 1){//过滤创始人
-				  return null;
-			  }else if(this.my_no_select==item.id){//过滤掉当前设置人
-				  return null;
-			  }else if(item.is_official==1){
-				  userAll.push(item);
-			  }
-        })
-	    userAll.map((item)=>{
-			 item['checked'] = false;
-			 for(var i in employee_selected_list){//判断传进来的员工是否是员工集合里的,是就设为已点击状态
-			   if(employee_selected_list[i].id==item.id){
-				 item['checked'] = true;
-			   }
-			 }
-	    })
-        // if (userAll.length == employee_selected_list.length) { this.checked = true};
-		that.list = userAll
-	   }).finally(() => {
-		  that.table_loading = false;
-	   })
-	}
-  },
-  created() {
-	var that=this;
-	that.checked=false;
-    if (document.documentElement.style.height) {
-      this.com_height = document.documentElement.style.height
-    }
-    setTimeout(() => {
-      that.get_user_list();
-	  if(that.can_select_dept){
-		  that.get_dept_list();
-	  }
-    }, 200)
-  }
-}
-</script>
-
-<style scoped>
-a {
-	cursor: pointer;
-	color: inherit;
-	text-decoration: none;
-}
-.employee_selector_box {
-	width: 600px;
-	padding: 20px;
-	box-sizing: border-box;
-	margin: 0 auto;
-}
-
-/* 搜索框 */
-.employee_selector_box .search {
-	margin: 0 auto;
-	width: 80%;
-}
-
-
-/* 左边框 */
-.employee_selector_box .choose_left {
-	padding: 8px 10px 8px 10px;
-}
-
-.employee_selector_box .choose_left .employee_cell {
-	border-bottom: 1px #f8f8f8 solid;
-}
-
-.employee_selector_box .choose_left .employee_cell_a .employee_cell {
-	border-bottom: none;
-}
-
-.employee_selector_box .choose_left .employee_checkbox {
-	padding-left: 8px;
-}
-
-.employee_selector_box .choose_left .employee_img_url {
-	padding-left: 8px;
-}
-
-.employee_selector_box .choose_left .employee_name {
-	padding-left: 8px;
-}
-
-.employee_selector_box ::v-deep .el-scrollbar__thumb {
-	width: 2px;
-	margin: 15px 0 0 6px;
-	background: #409eff;
-}
-
-/* 左边框 */
-
-/* 右边距 */
-.employee_selector_box .option-box {
-	padding: 14px;
-}
-
-.employee_selector_box .choose_right {
-	padding: 8px 10px;
-}
-
-.employee_selector_box .choose_right .employee_delete .el-button {
-	transform: scale(0.5);
-	background: #c0c4cc;
-}
-
-.employee_selector_box .choose_right .employee_delete .el-button ::v-deep .el-icon-close {
-	color: #fff;
-}
-
-.employee_selector_box .choose_right .employee_delete .el-button:active {
-	background: #409eff;
-}
-
-.employee_selector_box .choose_right .employee_delete .el-button:active ::v-deep .el-icon-close {
-	color: #fff;
-}
-
-.employee_selector_box .choose_right .employee_cell .employee_name {
-	padding-left: 8px;
-}
-
-.employee_selector_box .choose_right .employee_cell .employee_img_url {
-	padding-left: 8px;
-}
-
-/* 右边距 */
-
-.employee_selector_box ::v-deep .employee_cell {
-	padding: 8px 0;
-}
-
-.employee_selector_box ::v-deep .employee_cell:hover {
-	background: #ecf5ff;
-}
-
-.employee_cell {
-	display: -webkit-inline-box;
-	cursor: pointer;
-	width: 100%;
-	color: #606266;
-	padding: 8px 0;
-	background-color: transparent;
-}
-
-.employee_cell .employee_cell_clear {
-	clear: both;
-}
-
-.employee_cell .employee_img_url {
-	display: table-cell;
-	vertical-align: middle;
-	width: 30px;
-	padding-left: 0px;
-}
-
-.employee_cell .employee_img_url img {
-	width: 24px;
-	height: 24px;
-	border-radius: 50%;
-}
-
-.employee_cell .employee_checkbox {
-	display: table-cell;
-	vertical-align: middle;
-	width: 30px;
-	text-align: center;
-}
-
-.employee_cell .employee_name {
-	display: table-cell;
-	vertical-align: middle;
-	color: #606266;
-}
-
-.employee_delete {
-	display: table-cell;
-	text-align: right;
-	padding-right: 0px;
-}
-
-.employee_cell_a {
-	display: block;
-}
-
-.employee_cell_a:hover {
-	background-color: #ecf5ff;
-	border-radius: 4px;
-}
-
-.dept_child_cell {
-	display: table-cell;
-	vertical-align: middle;
-}
-
-.dept_child_cell span {
-	float: right;
-	padding-right: 8px;
-}
-
-.dept_child_cell span:hover {
-	color: #1c1c1c;
-}
-
-.dept_child_cell span:active {
-	color: #1c1c1c;
-}
-
-.scroller-box {
-	height: 440px;
-	padding: 0px !important;
-	background-color: #fdfdfd;
-	border: 1px solid #eee;
-	border-radius: 4px;
-	overflow: hidden;
-}
-/* .scroller-box.one{
-    height: 440px;
-  } */
-
-.col-line {
-	position: relative;
-	height: 400px;
-}
-
-.col-line:before {
-	content: ' ';
-	width: 1px;
-	height: 400px;
-	position: absolute;
-	top: 0;
-	bottom: 0;
-	left: 50%;
-	background-color: #eee;
-}
-
-.search-box {
-	background-color: #fff;
-	padding: 10px 5px;
-	border-bottom: 1px solid #eee;
-}
-
-.option-box {
-	padding: 5px;
-	background-color: #fff;
-	border-bottom: 1px solid #eee;
-	margin: 0 -5px;
-}
-
-.child_btn {
-	color: #409eff;
-}
-.dept_path {
-	margin: 10px 0;
-	display: block;
-	white-space: nowrap;
-	overflow: auto;
-}
-
-/*滚动条的宽度*/
-
-.dept_path::-webkit-scrollbar {
-	width: 5px;
-	height: 5px;
-}
-
-/*外层轨道。可以用display:none让其不显示,也可以添加背景图片,颜色改变显示效果*/
-
-.dept_path::-webkit-scrollbar-track {
-	width: 6px;
-	background-color: #fff0;
-	-webkit-border-radius: 2em;
-	-moz-border-radius: 2em;
-	border-radius: 2em;
-}
-
-/*滚动条的设置*/
-
-.dept_path::-webkit-scrollbar-thumb {
-	background-color: #fff0;
-	background-clip: padding-box;
-	min-height: 28px;
-	-webkit-border-radius: 2em;
-	-moz-border-radius: 2em;
-	border-radius: 2em;
-}
-/*滚动条移上去的背景*/
-
-.dept_path:hover::-webkit-scrollbar-thumb {
-	background-color: rgba(144, 147, 153, 0.3);
-}
-</style>

+ 0 - 117
src789/components/UserImage.vue

@@ -1,117 +0,0 @@
-<template>
-  <div>
-    <img v-if="info.img_url" class="logo_img" :src="info.img_url" :width="width" :height="height" />
-    <div v-else class="user_name_div" :style="{
-	   width: width,
-	   height: height,
-	   lineHeight: height, 
-	   fontSize: fontSize + 'rem'}">
-	   {{name}}
-	 </div>
-  </div>
-</template>
-<script>
-  export default {
-    name: 'userImage',
-    props: {
-      width: {
-        type: String,
-        default: '0.8rem'
-      },
-      height: {
-        type: String,
-        default: '0.8rem'
-      },
-      id:{
-        type: Number,
-        default: 0
-      },
-      img_url: {
-        type: String,
-        default: ''
-      },
-      user_name: {
-        type: String,
-        default: ''
-      },
-      fontSize:{
-        type: String,
-        default: '0.32'
-      }
-    },
-    watch:{
-      id: function (val) {
-        this.set_info()
-        this.name_no()
-      },
-      img_url: function (val) {
-        this.set_info()
-        this.name_no()
-      },
-      user_name: function (val) {
-        this.set_info()
-        this.name_no()
-      }
-    },
-    // 数据
-    data(){
-      let info ={name:'',img_url: '',id:0}
-      if(this.img_url != ''){
-        info.img_url = this.img_url
-      }
-      if(this.user_name != ''){
-        info.name = this.user_name
-      }
-      return {
-        info: info,
-        name: '',
-      }
-    },
-    computed:{
-    },
-    // 方法
-    methods:{
-      set_info(){
-        let info ={name:'',img_url: '',id:0}
-
-        if(this.img_url != ''){
-          info.img_url = this.img_url
-        }
-        if(this.user_name != ''){
-          info.name = this.user_name
-        }
-        this.info = info
-      },
-      // 加载
-      name_no(){
-        if(!this.info.img_url){
-          let pattern = new RegExp("^[\u4E00-\u9FA5]+");
-          if(this.info.name.length > 2){
-            if(pattern.test(this.info.name)){
-              this.name = this.info.name.substring(this.info.name.length-2,this.info.name.length)
-            }else{
-              this.name = this.info.name.substring(0,2)
-            }
-          }else{
-            this.name = this.info.name
-          }
-        }
-      }
-    },
-    // 组件挂载完成
-    mounted() {
-      this.name_no()
-    },
-  }
-</script>
-<style scoped>
-  .user_name_div{
-	border-radius: 50%;
-	background: #238dfa;
-	text-align: center;
-	color: #fff;
-  }
-  .logo_img{
-    border-radius: 50%;
-  }
-</style>

+ 0 - 527
src789/components/applicationIntegrationPopup.vue

@@ -1,527 +0,0 @@
-<template>
-  <div>
-    <!-- 奖扣ab分弹窗 -->
-    <el-dialog
-      :title="title"
-      :visible.sync="visible"
-      :close-on-click-modal="false"
-      :before-close="closePopup"
-      width="600px">
-      <div>
-        <el-form :model="dialogData" ref="dialogData" label-width="80px" v-loading="loading">          
-          <div v-for="(item,index) in dialogData.items" :key="index" @click="itemIndex = index">
-
-            <div style="overflow: hidden;">
-              <span style="line-height: 36px;">申请明细({{index+1}})</span>
-              <el-button type="text" class="fr" v-show="index > 0 || dialogData.items.length > 1" @click="delItem(index)">删除</el-button>
-            </div>
-
-            <el-form-item label="录入对象" :prop="'items.'+ index +'.employeeName'" :rules="[{ required: true, message: '请选择录入对象', trigger: 'change' }]">
-              <el-row>
-                <el-col :span="18">
-                  <el-input auto-complete="off" v-model="item.employeeName" placeholder="请选择录入对象"></el-input>
-                  <div @click="item.show_employee_selector = true" style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"></div>
-                </el-col>
-              </el-row>
-              <EmployeeSelector
-                :employee_not_select="item.employee_not_select"
-                :can_select_employee="true"
-                :can_select_dept="false"
-                :multi="false"
-                :selected="item.employee_selected"
-                :visible.sync="item.show_employee_selector"
-                @confirm="employee_confirm"/>
-            </el-form-item>
-
-            <el-form-item label="指定规则">
-              <el-switch
-                v-model="item.rule_switch"
-                @change="switchChange(index,item.rule_switch)"
-                active-color="#13ce66">
-              </el-switch>
-            </el-form-item>
-
-            <el-form-item label="选择规则" v-if="item.rule_switch" :prop="'items.'+ index +'.rule_item_list_value'" :rules="[{ required: true, message: '请选择规则', trigger: 'blur' }]">
-              <el-cascader
-              v-model="item.rule_item_list_value"
-              ref="ruleItem"
-              :popper-class="'itemClass'"
-              :options="rule_item_list"
-              @change="ruleItemChange"
-              :show-all-levels="false"
-              :props="{ children: 'child', label: 'name', value: 'id'}"
-              ></el-cascader>
-            </el-form-item>
-            <el-form-item v-if="item.rule_switch && item.rule_id">
-              <div v-show="item.rule_item_details.range_type == 1">{{get_point_name(item.rule_item_details.pt_id)}}  {{item.rule_item_details.min_point}}</div>
-              <div v-show="item.rule_item_details.range_type == 2">{{get_point_name(item.rule_item_details.pt_id)}}  {{item.rule_item_details.min_point}} ~ {{item.rule_item_details.max_point}}</div>
-              <div>{{item.rule_item_details.name}}</div>
-            </el-form-item>
-            
-            <el-form-item label="发生时间" :prop="'items.'+ index +'.event_time'" :rules="[{ required: true, message: '请选择时间', trigger: 'blur' }]">
-              <el-row>
-                <el-col :span="18">
-                  <el-date-picker v-model="item.event_time" type="date" placeholder="请选择时间" value-format="yyyy-MM-dd"></el-date-picker>
-                </el-col>
-              </el-row>
-            </el-form-item>
-            
-            <el-form-item label="事件内容" :prop="'items.'+ index +'.remark'" :rules="[{ required: true, message: '请输入事件内容', trigger: 'blur' },{ min: 3, max: 100, message: '长度在 3 到 100 个字符', trigger: 'blur' }]">
-              <el-row>
-                <el-col :span="18">
-                  <el-input type="textarea" rows="6" placeholder="请输入事件内容" style="width: 100%;" v-model="item.remark"></el-input>
-                </el-col>
-              </el-row>
-            </el-form-item>
-
-            <el-form-item label="图片" label-width="100px">
-
-            </el-form-item>
-            
-            <el-form-item label="审批人" :prop="'items.'+ index +'.approvalName'" :rules="[{ required: true, message: '请选择审批人', trigger: 'blur' }]">
-              <el-row>
-                <el-col :span="18">
-                  <el-input auto-complete="off" v-model="item.approvalName" placeholder="请选择审批人"></el-input>
-                  <div v-if="item.approval_selected.length == 0" @click="approval_selected_null" style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"></div>
-                  <div v-else @click="item.show_approval_selector = true" style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"></div>
-                </el-col>
-              </el-row>
-              <EmployeeSelector
-                :employee_not_select="item.approval_not_select"
-                :can_select_employee="true"
-                :can_select_dept="false"
-                :multi="false"
-                :employee_list="item.approval_employee_list"
-                :selected="item.approval_selected"
-                :visible.sync="item.show_approval_selector"
-                @confirm="approval_confirm"/>
-            </el-form-item>
-
-          </div>
-          <el-form-item style="margin-bottom: 0;">
-            <div>如需录入多条,请点击“增加一条”</div>
-          </el-form-item>
-          <el-form-item style="margin-bottom: 0;">
-            <el-button type="primary" plain @click="addItem">+ 增加一条</el-button>
-          </el-form-item>
-          <el-form-item style="text-align: right; margin-bottom: 0;">
-            <el-button  @click="closeDialog('dialogData')">取 消</el-button>
-            <el-button :disabled="btn_loading" type="primary" @click="subData('dialogData')">确 认</el-button>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-dialog>
-
-        <el-dialog
-          :title="'提交结果'"
-          :visible.sync="error_list_show"
-          :append-to-body='true'
-          @close='error_list_SX'
-          width="700px">
-          <el-table :data="error_list">
-            <el-table-column prop="target" label="员工"></el-table-column>
-            <el-table-column prop="point" label="积分"></el-table-column>
-            <el-table-column prop="status" label="处理状态">
-              <template slot-scope="scope">
-                <span :style="'color:'+(scope.row.status==0?'#f70000':'#47bf47')">{{scope.row.status==0?'申请失败':'申请成功'}}</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="msg" label="备注信息"></el-table-column>
-          </el-table>
-        </el-dialog>
-  </div>
-</template>
-
-<script>
-  import moment from 'moment'
-  import EmployeeSelector from '@/components/EmployeeSelector'
-  // import uploadOss from "@/views/upload_oss/upload"
-
-  export default {
-    name: 'applicationIntegration',
-    // 数据
-    model: {
-      prop: 'list',
-      event: 'value'
-    },
-    props:{
-      title: {
-        type: String,
-        default: ''
-      },
-      visible:{
-        type: Boolean,
-        default: false
-      },
-      integralType:{
-        type: Number,
-        default: 0
-      }
-    },
-    data() {
-      return {
-        error_list:[],//错误信息数组
-        error_list_show:false,//错误信息弹窗
-        Xtoken: { 'X-Token': this.$getToken() },
-        loading: false,
-        dialogData:{ 
-          items: [{
-            rule_switch: true,
-            rule_id: '',
-            item_id: '',
-            remark: '',
-            event_time: moment().format('YYYY-MM-DD'),
-
-            // 审批人信息
-            reviewer_id: '',
-            approvalName: '',
-            approval_not_select: [],
-            approval_employee_id:0,//当前选中人的直属上级。0表示没有直属上级
-            approval_employee_list: [],//当前选中人的 上级
-            approval_selected: {dept: [],employee:[]},
-            show_approval_selector: false,
-
-            // 录入对象
-            employee_id: '',
-            employeeName: '',
-            employee_not_select: [],
-            employee_selected: {dept: [],employee:[]},
-            show_employee_selector: false,
-
-            // 附件
-            fileList: [],
-            files: [],
-            // 规则分类 与 规则细则 名称
-            rule_list_value: null,
-            rule_item_list_value: null,
-            rule_item_details: {range_type: ''}
-          }]
-        },
-        // 规则分类
-        rule_list: [],
-        // 规则细则
-        rule_item_list: [],
-        flatteningIntegralRules: null,
-        user_info: null,
-        employee_map: JSON.parse(localStorage.getItem('SET_EMPLOYEE_MAP')),
-        point_types: JSON.parse(localStorage.getItem('SET_POINT_TYPES')),
-        btn_loading: false
-      }
-    },
-    components: {EmployeeSelector},
-    watch:{},
-    mounted() {
-      // this.getRuleItemData()
-      // this.user_info = this.$store.getters.user_info
-      // this.point_types = JSON.parse(localStorage.getItem('SET_POINT_TYPES'))
-      // // 初始化录入对象
-      // this.dialogData.items[0].employee_selected.employee = [{id: this.user_info.id ,img_url: this.user_info.img_url,name: this.user_info.name}]
-      // this.dialogData.items[0].employee_id = this.user_info.id
-      // this.dialogData.items[0].employeeName = this.user_info.name
-      // this.initializesReviewer(this.user_info.employee_detail.superior_list,0,true)
-
-    },
-    methods: {
-      // 附件上传
-      beforeUpload(file){
-        const isJPG = /^image\/(jpeg|png|jpg)$/.test(file.type)
-        const isLt2M = file.size / 1024 / 1024 < 1
-        if (!isJPG) {
-          this.$message.error('上传头像图片只能是 JPG 格式!')
-        }
-        if (!isLt2M) {
-          this.$message.error('上传头像图片大小不能超过 2MB!')
-        }
-        return isJPG && isLt2M   
-      },
-      onFilePreView(file) {
-        window.open(file.response.url,'_blank')
-      },
-      onFileRemove(file, fileList) {
-        this.dialogData.items[this.itemIndex].fileList = fileList
-        this.dialogData.items[this.itemIndex].files = []
-        fileList.forEach((element,index) => {
-          this.dialogData.items[this.itemIndex].files.push(element.url)
-        });
-      },
-      handleFilesSuccess(response, file, fileList) {
-        this.dialogData.items[this.itemIndex].fileList = fileList
-        this.dialogData.items[this.itemIndex].files = []
-        fileList.forEach((element,index) => {
-          this.dialogData.items[this.itemIndex].files.push(element.url)
-        });
-      },
-
-      // 审核人为空
-      approval_selected_null(){
-        this.$message.error('您没有审批人,请联系管理员');
-      },
-      // 获取规则信息
-      getRuleData(){
-        let data = {
-          cycle_type: '1'
-        }
-        this.integralType === 1?data.pt_id = '1':this.integralType === 2?data.pt_id = '2':data.pt_id = '3'
-        this.$axios('get','/api/integral/rule/trees',data).then(res => {
-					if (res.data.code == 1) {
-            const resultData = res.data.data
-            this.rule_list = resultData.rule_tree
-          }
-          this.rule_list = this.getTreeData(this.rule_list)
-				}).catch(e => {this.$message.error(e.data.msg)})
-      },
-      // 获取规则细则
-      getRuleItemData(){
-        let data = {cycle_type: '1'}
-        this.loading = true
-        this.$axios('get','/api/integral/rule/trees',data,'v2').then(res => {
-					if (res.data.code == 1) {
-            const resultData = res.data.data
-            this.rule_item_list = resultData.tree
-            this.flatteningIntegralRules = this.getItemDetail(this.rule_item_list)
-            this.loading = false
-          }
-				}).catch(e => {this.$message.error(e.data.msg)})
-      },
-      // 规则细则变化关闭down
-      ruleItemChange(value){
-        const item = this.dialogData.items[this.itemIndex]
-        let ruleItemDetail = null
-        this.flatteningIntegralRules.forEach(element => {
-          if (element.id == value[value.length - 1]) {
-            ruleItemDetail = {...element}
-          }
-        })
-        item.rule_item_details = ruleItemDetail
-        item.remark = ruleItemDetail.name
-        item.rule_id = ruleItemDetail.pid
-        item.item_id = value[value.length - 1]
-        this.$refs.ruleItem.dropDownVisible = false; 
-      },
-      // 规则分类变化关闭dewn
-      ruleChange(value){
-        this.dialogData.items[this.itemIndex].rule_id = value[value.length - 1]
-        this.$refs.rule.dropDownVisible = false;
-      },
-      // 递归判断列表,把最后的child设为undefined
-      getTreeData(data) {
-        for (var i = 0; i < data.length; i++) {
-          if (data[i].child.length < 1) {
-            // child若为空数组,则将child设为undefined
-            data[i].child = undefined;
-          } else {
-            // child若不为空数组,则继续 递归调用 本方法
-            this.getTreeData(data[i].child);
-          }
-        }
-        return data;
-      },
-
-      getItemDetail(arr) {
-        let result = []
-        for (const item of arr) {
-          var res = JSON.parse(JSON.stringify(item)) // 先克隆一份数据作为第一层级的填充
-          delete res['child']
-          result.push(res)
-          if (item.child instanceof Array && item.child.length > 0) { // 如果当前child为数组并且长度大于0,才可进入getItemDetail()方法
-            result = result.concat(this.getItemDetail(item.child))
-          }
-        }
-        return result
-      },
-      // 加一条
-      addItem(){
-        this.dialogData.items.push({
-          rule_switch: true,
-          rule_id: '',
-          item_id: '',
-          remark: '',
-          event_time: moment().format('YYYY-MM-DD'),
-
-          // 审批人信息
-          reviewer_id: '',
-          approvalName: '',
-          approval_not_select: [],
-          approval_employee_id:0,//当前选中人的直属上级。0表示没有直属上级
-          approval_employee_list: [],
-          approval_selected: {dept: [],employee:[]},
-          show_approval_selector: false,
-
-          // 录入对象
-          employee_id: this.user_info.id,
-          employeeName: this.user_info.name,
-          employee_not_select: [],
-          employee_selected: {dept: [],employee:[{id: this.user_info.id ,img_url: this.user_info.img_url,name: this.user_info.name}]},
-          show_employee_selector: false,
-
-          // 附件
-          fileList: [],
-          files: [],
-          // 规则分类 与 规则细则 名称
-          rule_list_value: null,
-          rule_item_list_value: null,
-          rule_item_details: {range_type: ''}
-        })
-      },
-      closeDialog(formName){
-        this.$refs[formName].resetFields();
-        this.$emit('update:visible', false)
-      },
-      delItem(index){
-        this.$confirm('你确定要删除奖扣明细'+parseInt(index+1)+'吗?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.dialogData.items.splice(index, 1)
-          this.$message({
-            type: 'success',
-            message: '删除成功!'
-          });
-        }).catch(() => {});
-      },
-      subData(formName){
-        this.$refs[formName].validate((valid) => {
-          if (valid) {
-            this.btn_loading = true
-            this.save()
-          }
-        });
-      },
-      // 提交数据
-      save(){
-        let data = {items: []}
-        this.dialogData.items.forEach(element => {
-          data.items.push({rule_id: element.rule_id || 0, employee_id: element.employee_id || 0 ,item_id: element.item_id || 0, remark: element.remark, event_time: element.event_time, pt_id: element.pt_id, reviewer_id: element.reviewer_id || 0, files: element.files})
-        });
-        this.$axios('post','/api/integral/review/apply',data,'v2').then(res => {
-          if(res.data.code == 1){
-            this.$refs['dialogData'].resetFields();
-            this.$emit('update:visible', false)
-            this.$message.success(res.data.msg)
-            this.error_list = res.data.data.list
-            this.error_list_show = true
-            this.dialogData.items[0].employee_id = this.user_info.id
-          }else{
-            this.$message.error(res.data.msg)
-          }
-          this.btn_loading = false
-        }).catch(e => {this.$message.close()})
-      },
-      //关闭错误信息时的回调
-      error_list_SX(){
-        // this.loadBaseData();
-        // this.loadEmployeeList()
-      },
-      // 当switch 改变了
-      switchChange(index,value){
-        this.itemIndex = index
-        const item = this.dialogData.items[this.itemIndex]
-        if (!value) {
-          item.rule_id = ""
-          item.item_id = ""
-          item.rule_item_list_value = ""
-          item.rule_item_details = {range_type: ''}
-        }else{
-          item.rule_id = ""
-          item.rule_list_value = ""
-        }
-      },
-      // 初始化审核人
-      initializesReviewer(list,index,bool){
-        const superior = list || this.user_info.employee_detail.superior_list
-        const num = index || 0
-        const item = this.dialogData.items[num]
-        item.approval_employee_list = [...superior]
-        if (superior.length !== 0) {
-          if(bool){
-            item.approval_employee_id = this.user_info.employee_detail.superior_id//直属上级(这里是第一个,默认为当前登录人)
-          }
-          if(item.approval_employee_id != 0){//判断有无直属上级
-            for(let a in item.approval_employee_list){
-              if(item.approval_employee_id == item.approval_employee_list[a].id){
-                item.approval_employee_list[a].direct_Supervisor = true//一个字段,是直属上级的字段,为true
-              }
-            }
-            for(let i in superior){
-                if(item.approval_employee_id == superior[i].id){
-                  item.approval_selected.employee = [{id: superior[i].id ,img_url: superior[i].img_url,name: superior[i].name}]
-                  item.reviewer_id = superior[i].id
-                  item.approvalName = superior[i].name//审批人
-                }
-            }
-          }else{
-            // 拿取列表最后一个的数据,没有筛选
-            item.approval_selected.employee = [{id: superior[superior.length - 1].id ,img_url: superior[superior.length - 1].img_url,name: superior[superior.length - 1].name}]
-            item.reviewer_id = superior[superior.length - 1].id//审批人id
-            item.approvalName = superior[superior.length - 1].name//审批人name
-          }
-          
-        }
-      },
-      // 选择审核人
-      approval_confirm(data){
-        const item = this.dialogData.items[this.itemIndex]
-        item.approvalName = ''
-        item.approval_selected.employee = {dept: [],employee:[]}
-        item.reviewer_id = ''
-        if (data.employee !== null && data.employee.length != 0) {
-          item.approvalName = data.employee[0].name
-          item.approval_selected.employee = [{name: data.employee[0].name,id:data.employee[0].id,img_url: data.employee[0].img_url}]
-          item.reviewer_id = data.employee[0].id
-        }
-      },
-      // 选择对象
-      employee_confirm(data){
-        const item = this.dialogData.items[this.itemIndex]
-        for (const key in this.employee_map) {
-          if (this.employee_map.hasOwnProperty(key)) {
-            const element = this.employee_map[key];//循环人员列表
-            if(element.id == data.employee[0].id){//通过选中的id拿到当前人员信息
-              item.approval_employee_id = element.superior_id//选中对象的直属上级id
-              this.initializesReviewer(element.superior_list,this.itemIndex)
-            }
-          }
-        }
-        item.employeeName = ''
-        item.employee_selected.employee = {dept: [],employee:[]}
-        item.employee_id = ''
-        if (data.employee !== null && data.employee.length != 0) {
-          item.employeeName = data.employee[0].name
-          item.employee_selected.employee = [{name: data.employee[0].name,id:data.employee[0].id,img_url: data.employee[0].img_url}]
-          item.employee_id = data.employee[0].id
-        }
-      },
-      // 获取积分名称
-      get_point_name(id){
-        let name = ''
-        this.point_types.forEach(element => {
-          if (element.id == id) {
-            name = element.name
-          }
-        });
-        return name
-      },
-
-      // 关闭弹窗
-      closePopup(){
-        this.$emit('update:visible', false)
-      }
-
-    }
-  }
-</script>
-<style lang="scss">
-  .itemClass .el-cascader-menu .el-cascader-menu__wrap li.el-cascader-node{
-    height: auto;
-    max-width: 500px;
-    .el-cascader-node__label{
-      white-space: initial;
-      overflow: initial;
-      text-overflow: initial;
-    }
-  }
-
-  // ruleClass
-  // itemClass
-</style>

+ 0 - 700
src789/components/bonusPointsPopup.vue

@@ -1,700 +0,0 @@
-<template>
-	<div>
-		<!-- 奖扣ab分弹窗 -->
-		<el-dialog :title="title" :visible.sync="visible" :close-on-click-modal="false" :before-close="closePopup" width="600px">
-			<div>
-				<el-form :model="dialogData" ref="dialogData" label-width="80px" v-loading="loading">
-					<el-form-item label="录入对象" prop="members" :rules="[{ required: true, message: '请选择录入对象', trigger: 'change' }]">
-						<el-row>
-							<el-col :span="18">
-								<el-input auto-complete="off" v-model="employeeName" placeholder="请选择录入对象"></el-input>
-								<div
-									v-if="employee_list.length > 0"
-									@click="show_employee_selector = true"
-									style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"
-								></div>
-								<div
-									v-if="employee_list.length == 0"
-									@click="noPersonnelListTips"
-									style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"
-								></div>
-							</el-col>
-						</el-row>
-						<EmployeeSelector
-							:employee_not_select="employee_not_select"
-							:employee_list="employee_list"
-							:can_select_employee="true"
-							:can_select_dept="false"
-							:close_clear_data="false"
-							:selected="employee_selected"
-							:visible.sync="show_employee_selector"
-							@confirm="move_employee_confirm"
-						/>
-					</el-form-item>
-
-					<div v-for="(item, index) in dialogData.items" :key="index" @click.stop="itemIndex = index">
-						<div style="overflow: hidden;">
-							<span style="line-height: 36px;">录入明细({{ index + 1 }})</span>
-							<el-button type="text" class="fr" v-show="index > 0 || dialogData.items.length > 1" @click="delItem(index)">删除</el-button>
-						</div>
-
-						<el-form-item label="指定规则">
-							<el-switch @change="switchChange(index, item.rule_switch)" v-model="item.rule_switch" active-color="#13ce66"></el-switch>
-						</el-form-item>
-
-						<el-form-item
-							class="test_cascader_id"
-							label="选择分类"
-							v-if="!item.rule_switch"
-							:prop="'items.' + index + '.rule_list_value'"
-							:rules="[{ required: true, message: '请选择规则分类', trigger: 'blur' }]"
-						>
-							<el-cascader
-								v-model="item.rule_list_value"
-								ref="ruleCascader"
-								:popper-class="'ruleClass'"
-								:options="rule_list"
-								@change="ruleChange"
-								:props="{ children: 'child', label: 'name', value: 'id', checkStrictly: true }"
-							></el-cascader>
-						</el-form-item>
-
-						<el-form-item
-							label="选择规则"
-							v-if="item.rule_switch"
-							:prop="'items.' + index + '.rule_item_list_value'"
-							:rules="[{ required: true, message: '请选择规则', trigger: 'blur' }]"
-						>
-							<el-cascader
-								v-model="item.rule_item_list_value"
-								ref="ruleItem"
-								:popper-class="'itemClass'"
-								:options="rule_item_list"
-								@change="ruleItemChange"
-								:show-all-levels="false"
-								:props="{ children: 'child', label: 'name', value: 'id' }"
-							></el-cascader>
-						</el-form-item>
-
-						<el-form-item>
-							<div v-show="item.rule_item_details.range_type == 1">{{ get_point_name(ptid) }} {{ item.rule_item_details.min_point }}</div>
-							<div v-show="item.rule_item_details.range_type == 2">
-								{{ get_point_name(ptid) }} {{ item.rule_item_details.min_point }} ~ {{ item.rule_item_details.max_point }}
-							</div>
-							<div>{{ item.rule_item_details.name }}</div>
-						</el-form-item>
-						<el-form-item label="积分" :prop="'items.' + index + '.point'" :rules="[{ required: true, message: '请输入分值', trigger: 'blur' }]">
-							<el-input-number v-if="item.rule_item_details.range_type == 2" :min="item.min" :max="item.max" v-model="item.point" type="number"></el-input-number>
-							<el-input-number v-else :disabled="item.rule_item_details.range_type == 1" v-model="item.point" type="number"></el-input-number>
-						</el-form-item>
-
-						<el-form-item label="发生时间" :prop="'items.' + index + '.event_time'" :rules="[{ required: true, message: '请选择时间', trigger: 'blur' }]">
-							<el-row>
-								<el-col :span="18">
-									<el-date-picker v-model="item.event_time" type="date" placeholder="请选择时间" value-format="yyyy-MM-dd"></el-date-picker>
-								</el-col>
-							</el-row>
-						</el-form-item>
-
-						<el-form-item
-							label="事件内容"
-							:prop="'items.' + index + '.remark'"
-							:rules="[{ required: true, message: '请输入事件内容', trigger: 'blur' }, { min: 3, max: 100, message: '长度在 3 到 100 个字符', trigger: 'blur' }]"
-						>
-							<el-row>
-								<el-col :span="18"><el-input type="textarea" rows="6" placeholder="请输入事件内容" style="width: 100%;" v-model="item.remark"></el-input></el-col>
-							</el-row>
-						</el-form-item>
-
-						<el-form-item label="图片">
-<!-- 							<uploadOss
-							  :headers="Xtoken"
-							  class="avatar-uploader"
-							  :action="'https://'+'integralsys.oss-cn-shenzhen.aliyuncs.com'"
-							  :show-file-list="true"
-							  :file-list="item.fileList"
-							  :on-success="handleFilesSuccess"
-							  :on-preview="onFilePreView"
-							  :before-upload="beforeUpload"
-							  :on-remove="onFileRemove"
-							  :limit="3"
-							  :multiple="true"
-							  ref="clearPicture"
-							>
-							  <el-button size="small" type="primary" >点击上传</el-button>(最多选择3张)
-							</uploadOss> -->
-						</el-form-item>
-						<el-form-item label="递交审批">
-							<el-row>
-								<el-col :span="18">
-									<el-input auto-complete="off" v-model="item.approvalName" placeholder="请选择审批人"></el-input>
-									<div @click="item.show_approval_selector = true" style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"></div>
-								</el-col>
-							</el-row>
-							<EmployeeSelector
-								:employee_not_select="item.approval_not_select"
-								:can_select_employee="true"
-								:can_select_dept="false"
-								:multi="false"
-								:employee_list="employee_lists"
-								:selected="item.approval_selected"
-								:visible.sync="item.show_approval_selector"
-								@confirm="approval_confirm"
-							/>
-						</el-form-item>
-					</div>
-					<el-form-item style="margin-bottom: 0;"><div>如需录入多条,请点击“增加一条”</div></el-form-item>
-					<el-form-item style="margin-bottom: 0;"><el-button type="primary" plain @click="addItem">+ 增加一条</el-button></el-form-item>
-					<el-form-item style="text-align: right; margin-bottom: 0;">
-						<el-button @click="closeDialog('dialogData')" :disabled="btn_loading">取 消</el-button>
-						<el-button type="primary" @click="subData('dialogData')" :disabled="btn_loading">确 认</el-button>
-					</el-form-item>
-				</el-form>
-			</div>
-		</el-dialog>
-
-		<el-dialog :title="'提交结果'" :visible.sync="error_list_show" :append-to-body="true" @close="error_list_SX" width="700px">
-			<el-table :data="error_list">
-				<el-table-column prop="target" label="员工"></el-table-column>
-				<el-table-column prop="point" label="积分"></el-table-column>
-				<el-table-column prop="status" label="处理状态">
-					<template slot-scope="scope">
-						<span :style="'color:' + (scope.row.status == 0 ? '#f70000' : '#47bf47')">{{ scope.row.status == 0 ? '提交失败' : '提交成功' }}</span>
-					</template>
-				</el-table-column>
-				<el-table-column prop="msg" label="备注信息"></el-table-column>
-			</el-table>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-import moment from 'moment';
-import EmployeeSelector from '@/components/EmployeeSelector.vue';
-// import uploadOss from "@/views/upload_oss/upload"
-
-export default {
-	name: 'bonusPointsForm',
-	// 数据
-	model: {
-		prop: 'list',
-		event: 'value'
-	},
-	props: {
-		title: {
-			type: String,
-			default: ''
-		},
-		visible: {
-			type: Boolean,
-			default: false
-		},
-		refresh: {
-			type: String,
-			default: ''
-		},
-		integralType: {
-			type: Number,
-			default: 0
-			// 1 是绩效分 , 2 是A分 , 3 是B分
-		}
-	},
-	data() {
-		return {
-			// imageState:'',
-			error_list: [], //错误信息数组
-			error_list_show: false, //错误信息弹窗
-			Xtoken: { 'X-Token': this.$getToken() },
-			btn_loading: false,
-			loading: false,
-			dialogData: {
-				members: [],
-				items: [
-					{
-						rule_switch: true,
-						rule_id: '',
-						item_id: '',
-						point: '0',
-						remark: '',
-						event_time: moment().format('YYYY-MM-DD'),
-						approval: '',
-						approval_not_select: [],
-						pt_id: this.integralType,
-						// 积分填写限制
-						pointShow: 1,
-						max: 0,
-						min: 0,
-
-						// 审批人信息
-						reviewer_id: '',
-						approvalName: '',
-						approval_not_select: [],
-						approval_selected: { dept: [], employee: [] },
-						show_approval_selector: false,
-
-						// 附件
-						fileList: [],
-						files: [],
-						// 规则分类 与 规则细则 名称
-						rule_list_value: null,
-						rule_item_list_value: null,
-						// 规则细则详情
-						rule_item_details: { range_type: '' }
-					}
-				]
-			},
-			// 录入对象名称
-			employeeName: '',
-			employee_not_select: [],
-			employee_selected: { dept: [], employee: [] },
-			employee_list: [],
-			employee_lists: [],
-			show_employee_selector: false,
-			// 规则分类
-			rule_list: [],
-			// 规则细则
-			rule_item_list: [],
-			flatteningIntegralRules: null,
-			ptid: 0,
-			point_types: JSON.parse(localStorage.getItem('SET_POINT_TYPES')),
-			itemIndex: 0
-		};
-	},
-	components: { EmployeeSelector },
-	watch: {
-		integralType(val) {
-			this.dialogData.items[0].pt_id = val;
-			this.ptid = val;
-			// this.getRuleData();
-			// this.getRuleItemData();
-		},
-		'dialogData.members'(val) {
-			if (val.length == 0) {
-				this.employeeName = '';
-				this.employee_selected = { dept: [], employee: [] };
-			}
-		}
-	},
-	mounted() {
-		// this.point_types = JSON.parse(localStorage.getItem('SET_POINT_TYPES'));
-		// this.employee_list = this.$store.getters.user_info.employee_detail.manage_scope;
-		// this.employee_lists = this.$store.getters.user_info.employee_detail.superior_list;
-	},
-	methods: {
-		// 20200831 图片上传 未完成
-		// 附件上传
-		beforeUpload(file) {
-			const isJPG = /^image\/(jpeg|png|jpg)$/.test(file.type);
-			const isLt2M = file.size / 1024 / 1024 < 1;
-			if (!isJPG) {
-				this.$message.error('上传头像图片只能是 JPG 格式!');
-			}
-			if (!isLt2M) {
-				this.$message.error('上传头像图片大小不能超过 2MB!');
-			}
-			return isJPG && isLt2M;
-		},
-		onFilePreView(file) {
-			window.open(file.response.url, '_blank');
-		},
-		onFileRemove(file, fileList) {
-			this.dialogData.items[this.itemIndex].fileList = fileList;
-			this.dialogData.items[this.itemIndex].files = [];
-			fileList.forEach((element, index) => {
-				this.dialogData.items[this.itemIndex].files.push(element.url);
-			});
-		},
-		handleFilesSuccess(response, file, fileList) {
-			// this.imageState = '上传成功'
-			this.dialogData.items[this.itemIndex].fileList = fileList;
-			this.dialogData.items[this.itemIndex].files = [];
-			fileList.forEach((element, index) => {
-				this.dialogData.items[this.itemIndex].files.push(element.url);
-			});
-		},
-		// 图片上传
-
-		// 没有人员提示
-		noPersonnelListTips() {
-			this.$message.error('您没有管理范围,请联系管理员');
-		},
-		// 当switch 改变了
-		switchChange(index, value) {
-			this.itemIndex = index;
-			const item = this.dialogData.items[this.itemIndex];
-			if (!value) {
-				item.rule_id = '';
-				item.item_id = '';
-				item.rule_item_list_value = '';
-				item.rule_item_details = { range_type: '' };
-			} else {
-				item.rule_id = '';
-				item.rule_list_value = '';
-			}
-		},
-		// 选择录入对象
-		move_employee_confirm(data) {
-			this.employee_selected = { dept: [], employee: [] };
-			this.employeeName = '';
-			this.dialogData.members = [];
-			if (data.employee !== null && data.employee.length != 0) {
-				let nameArr = [];
-				data.employee.forEach(element => {
-					this.employeeName += element.name + ',';
-					this.employee_selected = data;
-					this.dialogData.members.push(element.id);
-				});
-			}
-		},
-		// 获取规则信息
-		getRuleData() {
-			let data = {
-				cycle_type: '1',
-				pt_id: 2
-			};
-			this.integralType === 1 ? (data.pt_id = '1') : this.integralType === 2 ? (data.pt_id = '2') : (data.pt_id = '3');
-			this.$axios('get', '/api/integral/rule/trees', data).then(res => {
-					if (res.data.code == 1) {
-						const resultData = res.data.data;
-						this.rule_list = resultData.rule_tree;
-					}
-					this.rule_list = this.getTreeData(this.rule_list);
-				})
-				.catch(e => {
-					this.$message.error(e.data.msg);
-				});
-		},
-		// 获取规则细则
-		getRuleItemData() {
-			let data = {
-				cycle_type: '1',
-				pt_id: '1'
-			};
-			this.loading = true;
-			this.integralType === 1 ? (data.pt_id = '1') : this.integralType === 2 ? (data.pt_id = '2') : (data.pt_id = '3');
-			// const headers = {'Accept':'application/vnd.test.v2+json'}
-			this.$axios('get', '/api/integral/rule/trees', data, 'v2').then(res => {
-					if (res.data.code == 1) {
-						const resultData = res.data.data;
-						this.rule_item_list = resultData.tree;
-						this.flatteningIntegralRules = this.getItemDetail(this.rule_item_list);
-						this.loading = false;
-					}
-				})
-				.catch(e => {
-					this.$message.error(e.data.msg);
-				});
-		},
-		// 规则细则变化关闭down
-		ruleItemChange(value) {
-			let ruleItemDetails = null;
-			this.flatteningIntegralRules.forEach(element => {
-				if (element.id == value[value.length - 1]) {
-					ruleItemDetails = { ...element };
-				}
-			});
-			const item = this.dialogData.items[this.itemIndex];
-			const user_info = this.$store.getters.user_info;
-			item.rule_item_details = ruleItemDetails;
-			item.remark = ruleItemDetails.name;
-			item.rule_id = ruleItemDetails.pid;
-			item.item_id = value[value.length - 1];
-			item.max = ruleItemDetails.max_point * 1;
-			item.min = ruleItemDetails.min_point * 1;
-			item.point = ruleItemDetails.min_point;
-		},
-		// 规则分类变化关闭dewn
-		ruleChange(value) {
-			const item = this.dialogData.items[this.itemIndex];
-			const user_info = this.$store.getters.user_info;
-			user_info.point_config.point_limit.forEach(element => {
-				if (this.ptid == this.integralType) {
-					item.max = element.point * 1;
-					item.min = element.point * -1;
-				}
-			});
-			this.$refs.ruleCascader.forEach(element => {
-				element.dropDownVisible = false;
-			});
-			item.rule_id = value[value.length - 1];
-		},
-		// 递归判断列表,把最后的child设为undefined
-		getTreeData(data) {
-			for (var i = 0; i < data.length; i++) {
-				if (data[i].child.length < 1) {
-					// child若为空数组,则将child设为undefined
-					data[i].child = undefined;
-				} else {
-					// child若不为空数组,则继续 递归调用 本方法
-					this.getTreeData(data[i].child);
-				}
-			}
-			return data;
-		},
-
-		getItemDetail(arr) {
-			let result = [];
-			for (const item of arr) {
-				var res = JSON.parse(JSON.stringify(item)); // 先克隆一份数据作为第一层级的填充
-				delete res['child'];
-				result.push(res);
-				if (item.child instanceof Array && item.child.length > 0) {
-					// 如果当前child为数组并且长度大于0,才可进入getItemDetail()方法
-					result = result.concat(this.getItemDetail(item.child));
-				}
-			}
-			return result;
-		},
-		// 加一条
-		addItem() {
-			this.dialogData.items.push({
-				rule_switch: true,
-				rule_id: '',
-				item_id: '',
-				point: '0',
-				remark: '',
-				event_time: moment().format('YYYY-MM-DD'),
-				approval: '',
-				approval_not_select: [],
-				pt_id: this.integralType,
-
-				// 积分填写限制
-				pointShow: 1,
-				max: 0,
-				min: 0,
-
-				// 审批人信息
-				reviewer_id: '',
-				approvalName: '',
-				approval_not_select: [],
-				approval_selected: { dept: [], employee: [] },
-				show_approval_selector: false,
-
-				// 附件
-				fileList: [],
-				files: [],
-
-				// 规则分类 与 规则细则 名称
-				rule_list_value: null,
-				rule_item_list_value: null,
-
-				// 规则细则详情
-				rule_item_details: { range_type: '' }
-			});
-		},
-		closeDialog(formName) {
-			this.dialogData.items.forEach(element => {
-				element.rule_item_details = { range_type: '' };
-			});
-			this.$refs[formName].resetFields();
-			this.closePopup();
-			// this.$emit('update:visible', false)
-		},
-		delItem(index) {
-			this.$confirm('你确定要删除奖扣明细' + parseInt(index + 1) + '吗?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			})
-				.then(() => {
-					this.dialogData.items.splice(index, 1);
-					this.$message({
-						type: 'success',
-						message: '删除成功!'
-					});
-				})
-				.catch(() => {});
-		},
-		subData(formName) {
-			this.$refs[formName].validate(valid => {
-				if (valid) {
-					this.btn_loading = true;
-					this.save();
-				}
-			});
-		},
-		// 提交数据
-		save() {
-			let data = {
-				members: this.dialogData.members,
-				items: []
-			};
-			const user_info = this.$store.getters.user_info;
-			const index = user_info.point_config.point_limit.findIndex(o => o.pt_id === this.integralType);
-			console.log(this.dialogData);
-			let employeePointLimitMin = null;
-			let employeePointLimitMax = null;
-			user_info.point_config.point_limit.forEach(element => {
-				if (this.ptid == this.integralType) {
-					employeePointLimitMax = element.point * 1;
-					employeePointLimitMin = element.point * 1;
-				}
-			});
-			const ruleLimitCheck = user_info.site_config.rule_limit_check;
-			let maxPointPermission = 0;
-			let creator = this.$store.getters.user_info.employee_detail.role_list.findIndex(item => item.name == 'creator') >= 0;
-			if (user_info.point_config.point_limit.length > 0) {
-				maxPointPermission = parseInt(user_info.point_config.point_limit[index].point);
-			} else {
-				if (creator) {
-					maxPointPermission = -1;
-				}
-			}
-			// 手机端逻辑
-			//  || (user_info.is_creator !== 1 && maxPointPermission == 0)
-			try {
-				if (index < 0 || user_info.is_creator === 1) {
-					this.dialogData.items.forEach((element, i) => {
-						data.items.push({
-							rule_id: element.rule_id || 0,
-							item_id: element.item_id || 0,
-							point: element.point,
-							remark: element.remark,
-							event_time: element.event_time,
-							pt_id: this.ptid,
-							reviewer_id: element.reviewer_id || 0,
-							files: element.files
-						});
-					});
-				}
-				else {
-					this.dialogData.items.forEach((element, index) => {
-						!element.reviewer_id ? (element.reviewer_id = 0) : '';
-						!element.item_id ? (element.item_id = 0) : '';
-						if (
-							(element.reviewer_id && element.point !== 0 && element.rule_id > 0) ||
-							(element.reviewer_id <= 0 &&
-								element.item_id > 0 &&
-								ruleLimitCheck &&
-								element.point !== 0 &&
-								element.point <= maxPointPermission &&
-								Math.abs(element.point) <= maxPointPermission) ||
-							(element.reviewer_id <= 0 && !ruleLimitCheck && this.integralType == 3 && element.rule_id > 0) ||
-							(element.reviewer_id <= 0 &&
-								element.item_id >= 0 &&
-								element.point !== 0 &&
-								element.point <= maxPointPermission &&
-								Math.abs(element.point) <= maxPointPermission &&
-								element.rule_id > 0)
-						) {
-							data.items.push({
-								rule_id: element.rule_id || 0,
-								item_id: element.item_id || 0,
-								point: element.point,
-								remark: element.remark,
-								event_time: element.event_time,
-								pt_id: this.ptid,
-								reviewer_id: element.reviewer_id || 0,
-								files: element.files
-							});
-						} else {
-							this.$message.error('第' + (index + 1) + '条输入积分分值超出权限,请选择审批人递交');
-							throw new Error();
-						}
-					});
-				}
-			} catch (e) {
-				this.btn_loading = false;
-				return false;
-			}
-			this.$axios('post', this.integralType === 1 ? '' : this.integralType === 2 ? '/api/integral/review/a/entry' : '/api/integral/point/entry', data).then(res => {
-					if (res.data.code == 1) {
-						this.dialogData.items.forEach(element => {
-							element.rule_item_details = { range_type: '' };
-						});
-						this.$refs['dialogData'].resetFields();
-						this.$emit('update:visible', false);
-						this.$emit('update:refresh',this.$moment().format().valueOf());
-						this.$message.success(res.data.msg);
-						this.closePopup();
-						this.error_list = res.data.data.list;
-						this.error_list_show = true;
-					} else {
-						this.$message.error(res.data.msg);
-					}
-				})
-				.catch(e => {
-					this.$message.close();
-				});
-			this.$nextTick(() => {
-				this.btn_loading = false;
-			});
-		},
-		//关闭错误信息时的回调
-		error_list_SX() {
-			// this.loadBaseData();
-			// this.loadEmployeeList()
-		},
-		// 选择审核人
-		approval_confirm(data) {
-			const item = this.dialogData.items[this.itemIndex];
-			item.approvalName = '';
-			item.approval_selected.employee = { dept: [], employee: [] };
-			item.reviewer_id = '';
-			if (data.employee !== null && data.employee.length != 0) {
-				item.approvalName = data.employee[0].name;
-				item.approval_selected.employee = [{ name: data.employee[0].name, id: data.employee[0].id, img_url: data.employee[0].img_url }];
-				item.reviewer_id = data.employee[0].id;
-			}
-			item.reviewer_id ? (item.pointShow = 3) : '';
-		},
-		// 获取积分名称
-		get_point_name(id) {
-			// let name = '';
-			// this.point_types.forEach(element => {
-			// 	if (element.id == id) {
-			// 		name = element.name;
-			// 	}
-			// });
-			// return name;
-		},
-		// 关闭弹窗
-		closePopup() {
-			//关闭重置窗口状态
-			this.dialogData.items = [
-				{
-					rule_switch: true,
-					rule_id: '',
-					item_id: '',
-					point: '0',
-					remark: '',
-					event_time: moment().format('YYYY-MM-DD'),
-					approval: '',
-					approval_not_select: [],
-					pt_id: this.integralType,
-					// 积分填写限制
-					pointShow: 1,
-					max: 0,
-					min: 0,
-					// 审批人信息
-					reviewer_id: '',
-					approvalName: '',
-					approval_not_select: [],
-					approval_selected: { dept: [], employee: [] },
-					show_approval_selector: false,
-					// 附件
-					fileList: [],
-					files: [],
-					// 规则分类 与 规则细则 名称
-					rule_list_value: null,
-					rule_item_list_value: null,
-					// 规则细则详情
-					rule_item_details: { range_type: '' }
-				}
-			];
-			this.$emit('update:visible', false);
-		}
-	}
-};
-</script>
-<style lang="scss">
-	.itemClass .el-cascader-menu .el-cascader-menu__wrap .el-scrollbar__view li.el-cascader-node {
-		height: auto;
-		max-width: 500px;
-		.el-cascader-node__label {
-			white-space: initial;
-			overflow: initial;
-			text-overflow: initial;
-		}
-	}
-</style>

+ 0 - 46
src789/components/noData.vue

@@ -1,46 +0,0 @@
-<template>
-    <div class="flex-box-v flex-v-zhu">
-      <img src="../assets/image/nodata.png" style="width: 266px;height: 182px;margin: 30px auto;">
-      <div class="fontColorF" v-if="!isSolt">{{content}}</div>
-        <slot></slot>
-    </div>
-</template>
-<!-- content:为提示内容  -->
-<!-- imgUrl:为空值显示图片  -->
-<!-- isSolt:是否显示自定义内容  -->
-<script>
-  export default {
-    name:'noData',
-    props:{
-      content:{
-        type:String,
-        default:'暂无数据'
-      },
-      isSolt:{
-        type:Boolean,
-        default:false
-      }
-    },
-    data(){
-      return{
-
-      }
-    },
-    methods:{
-
-    }
-  }
-</script>
-
-<style scoped="scoped">
-  .green{
-     color: #67c23a;
-  }
-  .blue{
-    color:#26a2ff;
-    cursor: pointer;
-  }
-  .fontColorF{
-    color:#909399;
-  }
-</style>

+ 0 - 135
src789/components/publics/workpoints.vue

@@ -1,135 +0,0 @@
-<template>
-  <div class="all">
-    <div class="initialPoint">
-      <div class="initia_title">{{initia_head.initial_suername}}</div>
-      <div class="initia_title_1">{{initia_head.initial_suertext}}</div>
-      <div v-for="(v,i) in initia_arr" :key="i">
-        <el-form  :model="v.initia_input"  ref="v.initia_input"  :label-width="initia_head.initial_width"  class="demo-ruleForm">
-		  <el-form-item  style="margin: 20px 0 0 0" v-if="v.type=='switch'">
-				  <template slot="label">
-					<span :style="'width:'+initia_head.initial_left">{{v.initialName}}</span>
-					<el-tooltip placement="top">
-					  <div slot="content" v-html="v.initial_text"></div>
-					  <span class="initia_mark" v-show="v.initia_mark">?</span>
-					</el-tooltip>
-				  </template>
-				<el-switch v-model="v.initia_input.age" :active-value="is" :inactive-value="no" @change="changeAge"></el-switch>
-		  </el-form-item>	
-          <el-form-item  style="margin: 20px 0 0 0 " v-else>
-            <template slot="label">
-              <span :style="'width:'+initia_head.initial_left">{{v.initialName}}</span>
-              <el-tooltip placement="top">
-                <div slot="content" v-html="v.initial_text"></div>
-                <span class="initia_mark" v-show="v.initia_mark">?</span>
-              </el-tooltip>
-            </template>
-            <el-input type="age" v-model="v.initia_input.age" :disabled="disabled"  autocomplete="off"  class="nitia_list_input"  placeholder="请输入分值" oninput="if(this.value=='00'){this.value='0';}else{this.value=this.value.replace(/[^0-9]/g,'')}"></el-input>
-		  </el-form-item>
-        </el-form>
-      </div>
-
-      <el-button
-        type="primary"
-        class="initia_button"
-        @click="save()"
-        :style="'margin: 20px 0 20px '+initia_head.initial_left"
-      >保存</el-button>
-    </div>
-  </div>
-</template>
-<script>
-export default {
-  props: {
-    initia_arr: Array,
-    initia_head: Object,
-  },
-  data() {
-    return {
-		is: 1,
-		no: 0,
-		disabled:false
-	};
-  },
-  created() {
-  },
-  mounted() {;
-	  if(this.initia_arr[0].type=="switch"){
-		  	 this.disabled=this.initia_arr[0].initia_input.age==1? false:true;
-	  }
-  },
-  methods: {
-	changeAge(e){
-		this.disabled=e==1? false:true
-	},
-    save() {
-      let arr = [];
-      // 正则判断代码
-      // for (var i = 0; i < this.initia_arr.length; i++) {
-      //   if (this.initia_arr[i].initia_input.age !== "") {
-      //     arr.push({
-      //       sj: this.initia_arr[i].initia_input.age,
-      //     });
-      //     if (arr.length == this.initia_arr.length) {
-      //       this.$emit("initia", arr);
-      //       this.disableds = false;
-      //     }
-      //   } else {
-      //     this.$message({
-      //       message: "请输入分值",
-      //       type: "warning",
-      //     });
-      //     return;
-      //   }
-      // }
-      // 无正则代码
-      for (var i = 0; i < this.initia_arr.length; i++) {
-          arr.push({
-            sj: this.initia_arr[i].initia_input.age,
-          });
-          if (arr.length == this.initia_arr.length) {
-            this.$emit("initia", arr);
-          }
-      }
-    },
-  },
-};
-</script>
-
-<style>
-.el-form-item__label {
-  text-align: left;
-}
-.initialPoint {
-  margin-left: 30px;
-}
-.initia_mark {
-  background: #409eff;
-  border-radius: 50%;
-  width: 14px;
-  height: 14px;
-  color: #fff;
-  display: inline-block;
-  font-size: 12px;
-  line-height: 14px;
-  text-align: center;
-  margin-left: 4px;
-  cursor: default;
-}
-.initia_title {
-  font-size: 20px;
-  color: rgba(48, 49, 51, 1);
-  padding-top: 30px;
-  font-family: PingFangSC-Regular;
-}
-.initia_title_1 {
-  color: #606266;
-  font-size: 14px;
-  margin-top: 10px;
-}
-.nitia_list_input {
-  width: 160px;
-  height: 40px;
-  border-radius: 4px;
-  background-color: rgba(255, 255, 255, 1);
-}
-</style>

+ 0 - 162
src789/components/season.vue

@@ -1,162 +0,0 @@
-<template>
-  <div>
-    <span @click="showDoubleMonth">
-      <el-input v-model="choseQuarter" prefix-icon="el-icon-date" placeholder="请选择" />
-    </span>
-    <div v-show="showTime1a" class="show1">
-      <p>
-        <button type="button" aria-label="前一年" class="el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left"
-          @click="prev" />
-        <span role="button" class="span-year">{{ year }}年</span>
-        <button type="button" aria-label="后一年" class="el-picker-panel__icon-btn el-date-picker__next-btn el-icon-d-arrow-right"
-          @click="next" />
-      </p>
-      <div>
-        <span v-for="(item,index) in fullMonth" :key="index" class="selectMonth" @click="selectQuarter(item)">
-               {{ item }}
-        </span>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-  export default {
-    name: 'season',
-    data() {
-      return {
-        value: '',
-        showTime2: false,
-        showTime1a: false,
-        year: new Date().getFullYear(),
-        fullMonth: ['第一季度', '第二季度', '第三季度', '第四季度'],
-        choseQuarter: '',
-        choseQuarter1: ''
-      }
-    },
-    props:{
-      isActive:{
-        type:Boolean,
-        default:false
-      }
-    },
-    mounted() {
-      if(!this.isActive){
-        var date=new Date().getMonth()+1;
-        var arrs=this.fullMonth;
-        var str=""
-        if(date<=3){
-          str=arrs[0]
-        }else if(date<=6){
-          str=arrs[1]
-        }else if(date<=9){
-          str=arrs[2]
-        }else{
-          str=arrs[3]
-        }
-        this.selectQuarter(str);
-      }
-     },
-    methods: {
-      // 点击季度按钮
-      quarterTime() {
-        this.showTime2 = true
-        this.choseQuarter = ''
-        this.fullMonth = ['第一季度', '第二季度', '第三季度', '第四季度']
-      },
-      // 点击input框
-      showDoubleMonth() {
-        this.showTime1a = true
-      },
-      // 上一年
-      prev() {
-        this.year = this.year * 1 - 1
-      },
-      // 下一年
-      next() {
-        this.year = this.year * 1 + 1
-      },
-      // 点击选项事件
-      selectQuarter(item) {
-        switch (item) {
-          case '第一季度':
-            this.choseQuarter1 = this.year + '1'
-            this.choseQuarter = this.year + '年 第一季度'
-            break
-          case '第二季度':
-            this.choseQuarter1 = this.year + '2'
-            this.choseQuarter = this.year + '年 第二季度'
-            break
-          case '第三季度':
-            this.choseQuarter1 = this.year + '3'
-            this.choseQuarter = this.year + '年 第三季度'
-            break
-          case '第四季度':
-            this.choseQuarter1 = this.year + '4'
-            this.choseQuarter = this.year + '年 第四季度'
-            break
-        }
-        this.$emit('confirm', this.choseQuarter1)
-        this.showTime1a = false
-      }
-    }
-  }
-</script>
-<style scoped>
-  * {
-    margin: 0;
-    padding: 0;
-    list-style: none;
-  }
-
-  .show1 {
-    width: 320px;
-    margin-top: 5px;
-    position: absolute;
-    z-index: 2;
-    height: auto;
-    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
-    background: #fff;
-    padding: 5px;
-  }
-
-  .show1 p:nth-child(1) {
-    width: 100%;
-    height: 40px;
-    border-bottom: 1px solid #f5f5f5;
-    display: flex;
-    align-items: center;
-    justify-content: end;
-    padding: 0 10px;
-  }
-
-  .show1>div {
-    width: 100%;
-    height: auto;
-  }
-
-  .show1>div span {
-    width: 50%;
-  }
-
-  .selectMonth {
-    display: inline-block;
-    float: left;
-    width: 78px;
-    height: 40px;
-    line-height: 40px;
-    text-align: center;
-  }
-
-  .selectMonth:hover {
-    background: rgba(19, 131, 255, 0.052);
-  }
-
-  .span-year {
-    width: 90%;
-    margin: 0 auto;
-    display: inline-block;
-    text-align: center;
-    line-height: 40px;
-  }
-</style>

+ 0 - 48
src789/home.vue

@@ -1,48 +0,0 @@
-<template>
-	<div class="flex-box-v flex-center-center">
-		<div class="data-all">
-			<img src="./assets/image/init.gif" class="appImg" />
-			<div>管理执行难,就用功道云</div>
-		</div>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-
-		};
-	},
-	watch: {},
-	mounted() {
-
-	},
-	methods: {
-
-	}
-};
-</script>
-
-<style scoped="scoped">
-.refresh {
-	margin-top: 100px;
-	width: 100px;
-}
-.appImg {
-	width: 200px;
-	height: 200px;
-}
-.noData {
-	text-align: center;
-	position: fixed;
-	left: 0;
-	top: 0;
-	right: 0;
-	bottom: 0;
-}
-.data-all {
-	margin-bottom: 10%;
-	color: #595959;
-}
-</style>

+ 0 - 333
src789/index.vue

@@ -1,333 +0,0 @@
-<template>
-	<el-container class="box-all" v-loading="loading">
-		<el-header>
-			<div class="flex-box" style="height: 60px;">
-				<div class="logo-box flex-box flex-center-center">
-					<img src="./assets/image/logo.png" class="logo" />
-					<div>功道云积分制</div>
-				</div>
-				<div class="flex-1 hea-right flex-box flex-v-ce" v-if="info.name">
-					<div class="name flex-1">{{ info.name }}</div>
-					<div class="flex-box flex-v-ce">
-						<div>您当前为 <span class="blue">"{{corpMessage.package_name}}"</span>,有效期至<span style="color:#FF9600">{{corpMessage.expire_time}}</span></div>
-						<el-button size="small" @click="isTz=true" class="upgrade" type="primary" icon="el-icon-upload">续费升级</el-button>
-						<el-tooltip class="item" effect="dark" content="设置向导" placement="bottom">
-							<img src="./assets/image/wn.png" class="wn" @click="showWn">
-						</el-tooltip>
-						<userImage :user_name="userData.name" :img_url="userData.img_url" width="44px" height="44px"></userImage>
-					</div>
-				</div>
-			</div>
-		</el-header>
-		<el-container class="main">
-			<el-aside>
-				<el-menu :default-active="defaultActive" class="el-menu-vertical-demo" :router="true" @select="activeRouter" >
-					<el-submenu :index="index.toString()" v-for="(item, index) in routers" :key="index">
-						<template slot="title"><span class="iconfont titleIcon" :class="item.icon" style="font-size: 20px;"></span><span style="margin-left: 5px;">{{item.name}}</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>
-							</el-menu-item>
-						</template>
-					</el-submenu>
-				</el-menu>
-			</el-aside>
-			<el-main>
-				<router-view />
-				<div class="fontColorF" style="text-align: center;margin: 20px 0;">Copyright © 2020 广东功道云数字科技有限公司 All Rights Reserved</div>
-			</el-main>
-		</el-container>
-		<!-- 续费升级 -->
-		<el-dialog class="续费升级"  :visible.sync="isTz" width="400px">
-			<div style="border-radius: 15px;border: 1px solid #f1f1f1;padding: 10px; width: 276px;box-sizing: border-box;margin: 0 auto;">
-				<img src="./assets/image/code.png"/>
-			</div>
-			<div class="fontColorF" style="text-align: center;margin-top: 15px;font-size: 18px;">手机钉钉扫码,付费升级</div>
-		</el-dialog>
-		<el-dialog title="设置向导" :visible.sync="wn_show" width="600px">
-			<div>
-				<div class="wn-title fontColorF">三步轻松搭建积分管理体系:定人员、分责权、建制度</div>
-				<div class="flex-box flex-v-ce wn-box">
-					<div class="flex-1 flex-box-v flex-v-ce"  @click="openView(0)">
-						<div><span class="iconfont " :class="routers_one[0].meta.icon"></span></div>
-						<div>1、确定{{routers_one[0].name}}</div>
-					</div>
-					<div class="flex-1 flex-box-v flex-v-ce"  @click="openView(1)">
-						<div><span class="iconfont " :class="routers_one[1].meta.icon"></span></div>
-						<div>2、分配{{routers_one[1].name}}</div>
-					</div>
-					<div class="flex-1 flex-box-v flex-v-ce"  @click="openView(2)">
-						<div><span class="iconfont " :class="routers_one[2].meta.icon"></span></div>
-						<div>3、建立{{routers_one[2].name}}</div>
-					</div>
-				</div>
-			</div>
-			<div>
-				<div class="wn-title fontColorF">更有效地做好积分激励和认可,你还可以设置以下3项</div>
-				<div class="flex-box flex-v-ce wn-box">
-					<div class="flex-1 flex-box-v flex-v-ce" @click="openView(3)">
-						<div><span class="iconfont " :class="routers_one[3].meta.icon"></span></div>
-						<div>{{routers_one[3].name}}</div>
-					</div>
-					<div class="flex-1 flex-box-v flex-v-ce" @click="openView(4)">
-						<div><span class="iconfont " :class="routers_one[4].meta.icon"></span></div>
-						<div>{{routers_one[4].name}}</div>
-					</div>
-					<div class="flex-1 flex-box-v flex-v-ce" @click="openView(5)">
-						<div><span class="iconfont " :class="routers_one[5].meta.icon"></span></div>
-						<div>{{routers_one[5].name}}</div>
-					</div>
-				</div>
-			</div>
-		</el-dialog>
-<!-- 		<el-drawer
-		  title="我是标题"
-		  :visible.sync="isTz"
-		  :direction="direction"
-		  >
-		  <span>我来啦!</span>
-		</el-drawer> -->
-	</el-container>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			loading: false,
-			userData: {},
-			routers:[],
-			routers_one:[],
-			info: {},
-			wn_show:false,
-			defaultActive:"0-0",
-			isShowWn:true,
-			isTz:false,
-			direction: 'rtl',
-			corpMessage:{},//企业套餐信息
-		};
-	},
-	created() {
-		this.routers=[
-			// {name:'首页',children:this.returnRoutersArr('home'),icon:'icon-xuanzhong_shouye'},
-			// {name:'A/B分',children:this.returnRoutersArr('abPoint'),icon:'icon-PC_gongzuotai_ABfen'},
-			{name:'设置',children:this.returnRoutersArr('set'),icon:'icon-dingdingPC_shezhi'},
-			{name:'统计',children:this.returnRoutersArr('ranking'),icon:'icon-dingdingPC_tongji'},
-			];
-		this.routers_one=this.returnRoutersArr('set');
-		this.userData=this.$getUserData();
-		if(this.$route.path!='/home'){//当刷新页面是控制左边导航栏的选中
-			this.defaultActive=localStorage.getItem("path");
-		}
-	},
-	mounted() {
-		this.getTypes();
-		this.getInfo();
-		var url = window.location.href;
-		var str = this.GetRequest(url).corpId || '123';
-		var corpId = str.split('#')[0];
-		if (corpId) {
-			this.getCorp(corpId);
-		}
-		this.$nextTick(function() {
-			if (localStorage.getItem('wn_show')) {
-				this.wn_show = false;
-				this.isShowWn=false;
-			} else {
-				this.wn_show = true;
-				localStorage.setItem('wn_show','true');
-			}
-		});
-	},
-	methods: {
-		GetRequest(urlStr) {
-			if (typeof urlStr == 'undefined') {
-				var url = decodeURI(location.search); //获取url中"?"符后的字符串
-			} else {
-				var url = '?' + urlStr.split('?')[1];
-			}
-			var theRequest = new Object();
-			var strs;
-			if (url.indexOf('?') != -1) {
-				var str = url.substr(1);
-				strs = str.split('&');
-				for (var i = 0; i < strs.length; i++) {
-					theRequest[strs[i].split('=')[0]] = decodeURI(strs[i].split('=')[1]);
-				}
-			}
-			return theRequest;
-		},
-		//获取套餐信息
-		getCorp(corpId) {	
-		    this.$axios('get',"api/order/corp", {corp_id:corpId}).then((res) => {
-		      this.corpMessage = res.data.data;
-		    })
-		},
-		getSku(){
-			var that = this;
-			this.$axios('get','api/order/goods/sku',{callback: "https://test-ding.g107.com/#/index", goods_code: 'DD_GOODS-610003' }).then(res => {
-			
-			});
-		},
-		//当刷新页面是控制左边导航栏的选中
-		activeRouter(index,indexPath){
-			// console.log(index,indexPath)
-			localStorage.setItem("path",indexPath[1]);
-		},
-		returnRoutersArr(str){
-			var routers = this.$router.options.routes[0].children;
-			var routersArr=[];
-			routers.forEach(item=>{
-				if(item.meta.groupCode==str){
-					routersArr.push(item);
-				}
-			})
-			return routersArr;
-		},
-		returnIndex(str,str2){
-			return str+"-"+str2;
-		},
-		openView(e){
-			this.wn_show=false;
-			this.isShowWn=false;
-			this.$router.push({path:this.routers_one[e].path})
-			this.defaultActive="0-"+(e).toString();
-			localStorage.setItem("path",this.defaultActive);
-		},
-		showWn(){
-			this.wn_show=true;
-		},
-		getInfo() {
-			var that = this;
-			this.$axios('get','/api/site/info').then(res => {
-				that.info = res.data.data;
-			});
-		},
-		getTypes() {
-			var that = this;
-			this.$axios('get','/api/integral/types').then(res => {
-				that.$setTyps(res.data.data.list);
-			});
-		},
-	}
-};
-</script>
-
-<style scoped="scoped" lang="scss">
-.wn-box{
-	padding: 20px 0;
-}
-.wn-box .flex-1{
-	cursor: pointer;
-}
-.wn-box .flex-1 div:nth-child(1){
-	width: 55px;
-	height: 55px;
-	border-radius: 50%;
-	text-align: center;
-	line-height: 55px;
-	background-color: #E0F2FF;
-	color: #26A2FF;
-	margin-bottom: 20px;
-}
-.wn-box .flex-1 div:nth-child(2){
-	width: 110px;
-	border-radius: 25px;
-	border: 1px solid #26A2FF;
-	padding:7px 10px;
-	text-align: center;
-	color: #26A2FF;
-}
-.wn-box .flex-1:hover div:nth-child(1){
-	color: #fff;
-	background-color: #26A2FF;
-}
-
-.wn-box .flex-1:hover div:nth-child(2){
-	color: #fff;
-	background-color: #26A2FF;
-}
-.el-menu-vertical-demo:not(.el-menu--collapse) {
-	width: 180px;
-	// min-height: 400px;
-}
-.el-header {
-	background-color: #fff;
-	// line-height: 60px;
-	padding: 0 !important;
-	border-bottom: 1px solid #f1f1f1;
-}
-.el-menu {
-	overflow: hidden;
-	border: none;
-}
-.el-aside {
-	transition: width 0.28s;
-	width: 180px !important;
-	background-color: #fff;
-	height: calc(100vh - 60px);
-}
-.el-aside::-webkit-scrollbar {
-	width: 0px;
-	background-color: #fff;
-}
-
-.el-aside::-webkit-scrollbar-thumb {
-	background-color: #ccc;
-}
-.con_nav_left {
-	background: #fff;
-	overflow-y: scroll;
-}
-.box-all {
-	height: 100%;
-	overflow: hidden;
-}
-.el-main {
-	background-color: #f4f6f9;
-	height: calc(100vh - 60px);
-	overflow-y: scroll;
-	padding: 10px;
-}
-.el-main::-webkit-scrollbar{
-	width: 3px;
-	height: 10px;
-	background-color: #fff;
-}
-.el-main::-webkit-scrollbar-thumb {
-	background-color: #D9D9D9;
-}
-.logo-box {
-	width: 180px;
-}
-.logo-box .logo {
-	width: 30px;
-	height: 30px;
-	margin-right: 5px;
-	border-radius: 6px;
-}
-.logo-box div {
-	font-size: 16px;
-	font-weight: 600;
-}
-.wn {
-	height: 26px;
-	width: 26px;
-	margin-right: 12px;
-	cursor: pointer;
-}
-.hea-right {
-	padding: 0 20px;
-}
-.upgrade {
-	margin-left: 10px;
-	margin-right: 10px;
-}
-::v-deep .el-menu-item{
-	padding-right: 10px !important;
-}
-::v-deep .el-menu-item.is-active {
-    color: #26A2FF;
-	background-color: #ecf5ff;
-}
-</style>

+ 0 - 136
src789/init.vue

@@ -1,136 +0,0 @@
-<template>
-	<div class="noData flex-box-v flex-center-center">
-		<div class="data-all">
-			<img src="./assets/image/init.gif" class="appImg" />
-			<div>管理执行难,就用功道云</div>
-			<el-button class="refresh" type="primary" :loading="disabled" :disabled="disabled" v-if="isRefresh" @click="openLogin()">{{ text }}</el-button>
-		</div>
-	</div>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			text: '重试',
-			corpId: '',
-			isRefresh: false,
-			disabled: false,
-			showBtnCunt: 0
-		};
-	},
-	watch: {},
-	mounted() {
-		var url = window.location.href;
-		var str = this.GetRequest(url).corpId || '123';
-		var corpId = str.split('#')[0];
-		this.corpId = corpId;
-		if (corpId) {
-			this.login(corpId);
-		}
-	},
-	methods: {
-		//重新登录
-		openLogin() {
-			var num = 10;
-			var that = this;
-			this.disabled = true;
-			this.showBtnCunt = this.showBtnCunt + 1;
-			var intterval = setInterval(function() {
-				num--;
-				if (num == 0) {
-					that.text = '重试';
-					that.disabled = false;
-					if (that.showBtnCunt >= 2) {
-						that.$alert('数据加载过慢,请联系客服', '温馨提示', {
-							confirmButtonText: '确定',
-							callback: action => {}
-						});
-					}
-					clearInterval(intterval);
-					return;
-				}
-				that.text = num;
-			}, 1000);
-			this.login(this.corpId);
-		},
-		login(corpId) {
-			var that = this;
-			this.loading = true;
-			this.$dd.runtime.permission.requestAuthCode({
-				corpId: corpId, // 企业id
-				onSuccess: function(info) {
-					that.$axios('post', '/api/ding/login', { authCode: info.code, corpId: corpId })
-						.then(res => {
-							var is = false;
-							if (res.data.code == 1) {
-								var { token, user } = res.data.data;
-								user.employee_detail.role_list.forEach(item => {
-									// if (user.is_official == 1) {
-										if (item.name == 'admin' || item.name == 'creator' || item.name == 'point_manager') {
-											is = true;
-										}
-									// }
-								});
-								if (is) {
-									that.$setUserData(user);
-									that.$router.replace({ path: '/index' });
-								} else {
-									that.$router.replace({ path: '/noAccess' });
-								}
-							}
-						})
-						.catch(() => {
-							// if(!that.showBtn){
-							that.isRefresh = true;
-							// }
-						})
-						.finally(() => {
-							that.loading = false;
-						});
-				}
-			});
-		},
-		GetRequest(urlStr) {
-			if (typeof urlStr == 'undefined') {
-				var url = decodeURI(location.search); //获取url中"?"符后的字符串
-			} else {
-				var url = '?' + urlStr.split('?')[1];
-			}
-			var theRequest = new Object();
-			var strs;
-			if (url.indexOf('?') != -1) {
-				var str = url.substr(1);
-				strs = str.split('&');
-				for (var i = 0; i < strs.length; i++) {
-					theRequest[strs[i].split('=')[0]] = decodeURI(strs[i].split('=')[1]);
-				}
-			}
-			return theRequest;
-		}
-	}
-};
-</script>
-
-<style scoped="scoped">
-.refresh {
-	margin-top: 100px;
-	width: 100px;
-}
-.appImg {
-	width: 200px;
-	height: 200px;
-}
-.noData {
-	text-align: center;
-	position: fixed;
-	left: 0;
-	top: 0;
-	right: 0;
-	bottom: 0;
-}
-.data-all {
-	margin-bottom: 10%;
-	color: #595959;
-}
-</style>

+ 0 - 116
src789/main.js

@@ -1,116 +0,0 @@
-import Vue from 'vue'
-import App from './App.vue'
-import router from './router'
-import store from './store'
-import ElementUI from 'element-ui';
-import moment from 'moment' // 时间库
-import 'element-ui/lib/theme-chalk/index.css';
-import * as dd from 'dingtalk-jsapi';
-import VConsole from 'vconsole'
-import axios from 'axios'
-import service from './api/axios'
-import { getToken, setToken,getUserData,setUserData,getTyps,setTyps } from './api/auth';
-
-// 头像
-import userImage from '@/components/UserImage'
-Vue.component('userImage', userImage)
-
-Vue.use(ElementUI);
-// if (process.env.NODE_ENV === 'development') {
-//   new VConsole()
-// }
-
-Vue.prototype.$dd=dd;
-Vue.prototype.$getToken = getToken
-Vue.prototype.$setToken = setToken
-Vue.prototype.$getUserData = getUserData
-Vue.prototype.$setUserData = setUserData
-Vue.prototype.$getTyps = getTyps
-Vue.prototype.$setTyps = setTyps
-Vue.prototype.$moment = moment
-
-Vue.prototype.$http= service;
-//Vue函数添加一个原型属性$axios 指向axios,这样vue实例或组件中不用再去重复引用Axios 直接用this.$axios就能执行axios 方法
-var CancelToken = axios.CancelToken;
-Vue.$httpRequestList=[];
-
-Vue.prototype.$axios = (type, url, data,heaStr) => {
-	if(url!='/api/ding/login'&& url!='/api/integral/types'){
-	    var Accept='';
-		switch(heaStr){
-		   case 'v2':
-		     Accept='application/vnd.test.v2+json'
-		     break;
-		   case 'v3':
-		     Accept='application/vnd.test.v3+json'
-		     break;
-		   case 'v4':
-		     Accept='application/vnd.test.v4+json'
-		     break;
-		}
-		if(getToken()){
-			return new Promise((resolve, reject) => {   //封装ajax
-			    var aa = {
-			        method: type,
-			        url: url,
-					headers:{
-					  'Accept':Accept
-					},
-			        cancelToken: new CancelToken(c => {  //强行中断请求要用到的
-			            Vue.$httpRequestList.push(c);
-			        })
-			    }
-			    var json = (type == 'get') ? Object.assign(aa, { params: data }) : Object.assign(aa, { data: data });
-			    var ajax = Vue.prototype.$http(json).then(res => {
-			        resolve(res);
-			    }).catch(error => {   //中断请求和请求出错的处理
-			            if (error.message == "interrupt") {
-			                console.log('已中断请求');
-			                return;
-			            } else {
-			                reject(error);
-			            }
-			        })
-			    return ajax;
-			})
-		}else{return Promise.reject('无token')}
-	}else{
-		return new Promise((resolve, reject) => {   //封装ajax
-		    var aa = {
-		        method: type,
-		        url: url,
-		        cancelToken: new CancelToken(c => {  //强行中断请求要用到的
-		            Vue.$httpRequestList.push(c);
-		        })
-		    }
-		    var json = (type == 'get') ? Object.assign(aa, { params: data }) : Object.assign(aa, { data: data });
-		    var ajax = Vue.prototype.$http(json).then(res => {
-		        resolve(res);
-		    }).catch(error => {   //中断请求和请求出错的处理
-		            if (error.message == "interrupt") {
-		                console.log('已中断请求');
-		                return;
-		            } else {
-		                reject(error);
-		            }
-		        })
-		    return ajax;
-		})
-	}
-};
-
-router.beforeEach((to, from, next) => {   //路由切换检测是否强行中断,
-    if(Vue.$httpRequestList.length>0){        //强行中断时才向下执行
-        Vue.$httpRequestList.forEach(item=>{
-            item('interrupt');//给个标志,中断请求
-        })  
-    }
-    next();    
-});
-
-Vue.config.productionTip = false
-new Vue({
-  router,
-  store,
-  render: h => h(App)
-}).$mount('#app')

+ 0 - 32
src789/noAccess.vue

@@ -1,32 +0,0 @@
-<template>
-	<div class="noData flex-box flex-center-center">
-		<img  src="./assets/image/APP.png" class="appImg"/>
-		<div>
-<!-- 			<img src="./assets/image/nodata.png" class="codeImg"/>
-			<div  style="margin: 10px 0;color: #999;">钉钉扫码体验</div> -->
-			<div>您当前的角色无权登录电脑端管理后台操作<br/>请打开手机版钉钉直接扫码使用</div>
-		</div>
-	</div>
-</template>
-
-<script>
-</script>
-
-<style scoped="scoped">
-	.appImg{
-		width: 280px;
-		margin-right: 30px;
-	}
-	.noData{
-		text-align: center;
-		position: fixed;
-		left: 0;
-		top: 0;
-		right: 0;
-		bottom: 0;
-	}
-	.codeImg{
-		width: 200px;
-		height: 200px;
-	}
-</style>

+ 0 - 190
src789/router/index.js

@@ -1,190 +0,0 @@
-import Vue from 'vue'
-import VueRouter from 'vue-router'
-
-//解决重复点击导航栏报错问题
-const originalPush = VueRouter.prototype.push 
-VueRouter.prototype.push = function push(location) {
-  return originalPush.call(this, location).catch(err => err)
-}
-
-Vue.use(VueRouter)
-
-const routes = [{
-		path: '/index',
-		name: '初始页',
-		component: () => import('@/index'),
-		redirect: "framework",
-		children: [
-			// {
-			// 	path: '/home',
-			// 	name: '首页',
-			// 	component: () => import('@/home'),
-			// 	meta: {
-			// 		icon: 'icon-shezhi_zuzhijiagou',
-			// 		groupCode:'home'
-			// 	}
-			// },
-			// {
-			// 	path: '/award_punish',
-			// 	name: '我奖扣的',
-			// 	component: () => import('@/views/abPoint/award_punish.vue'),
-			// 	meta: {
-			// 		icon: 'icon-shezhi_zuzhijiagou',
-			// 		groupCode:'abPoint'
-			// 	}
-			// },
-			// {
-			// 	path: '/apply_list',
-			// 	name: '我申请的',
-			// 	component: () => import('@/views/abPoint/apply_list.vue'),
-			// 	meta: {
-			// 		icon: 'icon-shezhi_zuzhijiagou',
-			// 		groupCode:'abPoint'
-			// 	}
-			// },			
-			{
-				path: '/framework',
-				name: '组织架构',
-				component: () => import('@/views/set/framework.vue'),
-				meta: {
-					icon: 'icon-shezhi_zuzhijiagou',
-					groupCode:'set'
-				}
-			},
-			{
-				path: '/jurisdiction',
-				name: '角色权限',
-				component: () => import('@/views/set/jurisdiction.vue'),
-				meta: {
-					icon: 'icon-shezhi_jiaose',
-					groupCode:'set'
-				}
-			},
-			{
-				path: '/rule',
-				name: '积分规则',
-				component: () => import('@/views/set/rule.vue'),
-				meta: {
-					icon: 'icon-shezhi_jifenguize',
-					groupCode:'set',
-					groupName:"设置"
-				}
-			},
-			{
-				path: '/initialPoint',
-				name: '初始分',
-				component: () => import('@/views/set/initialPoint.vue'),
-				meta: {
-					icon: 'icon-shezhi_jichushezhi',
-					groupCode:'set',
-				}
-			},
-			{
-				path: '/check',
-				name: '考勤积分',
-				component: () => import('@/views/set/check.vue'),
-				meta: {
-					icon: 'icon-kaoqin_kaoqinyuebaobiao',
-					groupCode:'set'
-				}
-			},
-			{
-				path: '/voluntarilyPoint',
-				name: '自动积分',
-				component: () => import('@/views/set/voluntarilyPoint.vue'),
-				meta: {
-					icon: 'icon-shezhi_zidongjifen',
-					groupCode:'set'
-				}
-			},
-			{
-				path: '/integral_event',
-				name: '积分事件',
-				component: () => import('@/views/ranking/integral_event.vue'),
-				meta: {
-					icon: 'icon-shezhi_jifenguize',
-					groupCode:'ranking',
-					groupName:"统计"
-				}
-			},
-			{
-				path: '/dept_rank',
-				name: '部门排名',
-				component: () => import('@/views/ranking/dept_rank.vue'),
-				meta: {
-					icon: 'icon-shezhi_zuzhijiagou',
-					groupCode:'ranking'
-				}
-			},
-			{
-				path: '/total_rank',
-				name: '累计B分排名',
-				component: () => import('@/views/ranking/total_rank.vue'),
-				meta: {
-					icon: 'icon-shezhi_jiaose',
-					groupCode:'ranking'
-				}
-			},
-			{
-				path: '/custom_rank',
-				name: '自定义分组B分排名',
-				component: () => import('@/views/ranking/custom_rank.vue'),
-				meta: {
-					icon: 'icon-shezhi_jichushezhi',
-					groupCode:'ranking'
-				}
-			},
-			// {
-			// 	path: '/manager_statistics',
-			// 	name: '管理者奖扣',
-			// 	component: () => import('@/views/ranking/manager_statistics.vue'),
-			// 	meta: {
-			// 		icon: 'icon-shezhi_jichushezhi',
-			// 		groupCode:'ranking'
-			// 	}
-			// },
-			
-			// {
-			// 	path: '/department_statistics',
-			// 	name: '部门统计',
-			// 	component: () => import('@/views/ranking/department_statistics.vue'),
-			// 	meta: {
-			// 		icon: 'icon-shezhi_jichushezhi',
-			// 		groupCode:'ranking'
-			// 	}
-			// },
-			// {
-			// 	path: '/individual_statistics',
-			// 	name: '个人统计',
-			// 	component: () => import('@/views/ranking/individual_statistics.vue'),
-			// 	meta: {
-			// 		icon: 'icon-shezhi_jichushezhi',
-			// 		groupCode:'ranking'
-			// 	}
-			// }
-		]
-	},
-	{
-		path: '/',
-		name: '初始化',
-		component: () => import('@/init'),
-	},
-	{
-		path: '/noAccess',
-		name: '无权限',
-		component: () => import('@/noAccess'),
-	},
-	{
-		path: '/deptRankSwiper',
-		name: '轮播',
-		component: () => import('@/views/ranking/deptRankSwiper.vue'),
-	},
-]
-
-const router = new VueRouter({
-	// mode: 'history',
-	base: process.env.BASE_URL,
-	routes
-})
-
-export default router

+ 0 - 15
src789/store/index.js

@@ -1,15 +0,0 @@
-import Vue from 'vue'
-import Vuex from 'vuex'
-
-Vue.use(Vuex)
-
-export default new Vuex.Store({
-  state: {
-  },
-  mutations: {
-  },
-  actions: {
-  },
-  modules: {
-  }
-})

+ 0 - 399
src789/views/abPoint/apply_list.vue

@@ -1,399 +0,0 @@
-<template>
-	<div class="all" style="padding: 20px;">
-		<el-tabs v-model="tabs" type="card">
-			<el-tab-pane label="申请通过" name="complete"></el-tab-pane>
-			<el-tab-pane label="待审批" name="waiting"></el-tab-pane>
-			<el-tab-pane label="被驳回" name="refuse"></el-tab-pane>
-		</el-tabs>
-
-		<el-row style="margin-bottom: 15px;">
-			<el-col :span="12"><el-button type="primary" @click="dialogVisible = true">申请积分</el-button></el-col>
-			<el-col :span="6" :offset="6">
-				<el-input v-model="formData.keyword" placeholder="输入申请内容" @keyup.enter.native="searchFun">
-					<el-button slot="append" @click="searchFun" size="medium" icon="el-icon-search"></el-button>
-				</el-input>
-			</el-col>
-		</el-row>
-
-		<el-table :data="dataList" stripe fit v-loading="table_loading" v-if="tabs == 'complete'" @row-click="openDetail">
-			<el-table-column label="申请内容" prop="remark">
-				<template slot-scope="scope">
-					{{ scope.row.remark.customize || scope.row.remark.rule }}
-				</template>
-			</el-table-column>
-			<el-table-column label="积分" prop="review_point" width="120">
-				<template slot-scope="scope">
-					<span :class="{ color_green: scope.row.point < 0, color_red: scope.row.point > 0 }">
-						<span v-show="scope.row.point > 0">+</span>
-						{{ scope.row.point }} {{ scope.row.pt_id == 3 ? 'B分' : scope.row.pt_id == 2 ? 'A分' : scope.row.pt_id == 1 ? '绩效分' : '' }}
-					</span>
-				</template>
-			</el-table-column>
-			<el-table-column label="时间" prop="event_time" width="150"></el-table-column>
-			<template slot="empty">
-				<div class="nopoint_box" v-if="!formData.keyword">
-					<div class="noimg"></div>
-					<span class="title">
-						你还没有申请积分 现在
-						<el-button type="text" @click="dialogVisible = true">申请积分</el-button>
-					</span>
-				</div>
-				<div class="nopoint_box" v-else>
-					<div class="noimg"></div>
-					<span class="title">暂无数据</span>
-				</div>
-			</template>
-		</el-table>
-
-		<el-table :data="dataList" stripe fit v-loading="table_loading" v-if="tabs == 'waiting'" @row-click="openDetail">
-			<el-table-column label="申请内容" prop="remark">
-				<template slot-scope="scope">
-					{{ scope.row.remark.customize || scope.row.remark.rule }}
-				</template>
-			</el-table-column>
-			<el-table-column label="积分" prop="review_point" width="120">
-				<template slot-scope="scope">
-					<span>
-						<span v-show="scope.row.point > 0">+</span>
-						{{ scope.row.point }} B分
-					</span>
-				</template>
-			</el-table-column>
-			<el-table-column label="时间" prop="event_time" width="150"></el-table-column>
-			<template slot="empty">
-				<div class="nopoint_box" v-if="!formData.keyword">
-					<div class="noimg"></div>
-					<span class="title">
-						你还没有申请积分 现在
-						<el-button type="text" @click="dialogVisible = true">申请积分</el-button>
-					</span>
-				</div>
-				<div class="nopoint_box" v-else>
-					<div class="noimg"></div>
-					<span class="title">暂无数据</span>
-				</div>
-			</template>
-		</el-table>
-
-		<el-table :data="dataList" stripe fit v-loading="table_loading" v-if="tabs == 'refuse'" @row-click="openDetail">
-			<el-table-column label="申请内容" prop="remark">
-				<template slot-scope="scope">
-					{{ scope.row.remark.customize || scope.row.remark.rule }}
-				</template>
-			</el-table-column>
-			<el-table-column label="时间" prop="event_time" width="150"></el-table-column>
-			<template slot="empty">
-				<div class="nopoint_box" v-if="!formData.keyword">
-					<div class="noimg"></div>
-					<span class="title">
-						你还没有申请积分 现在
-						<el-button type="text" @click="dialogVisible = true">申请积分</el-button>
-					</span>
-				</div>
-				<div class="nopoint_box" v-else>
-					<div class="noimg"></div>
-					<span class="title">暂无数据</span>
-				</div>
-			</template>
-		</el-table>
-
-		<center style="margin-top: 15px;">
-			<el-pagination
-				background
-				@size-change="handleSizeChange"
-				@current-change="handleCurrentChange"
-				:current-page="formData.page"
-				:page-sizes="[10, 20, 30, 40, 50, 100]"
-				layout="total, sizes, prev, pager, next"
-				:page-size="pageLimit"
-				:total="total"
-			></el-pagination>
-		</center>
-
-		<el-drawer :visible.sync="detailShow" :with-header="false" :size="'600px'">
-			<div class="drawer_title">申请详情</div>
-			<div class="detail_popup" v-loading="detail_loading" v-if="detail_info !== null">
-				<el-row :gutter="10" style="padding-bottom:10px;border-bottom:1px #f8f8f8 solid;">
-					<el-col :span="24">
-						<userImage :id="detail_info.applyor_id" class="fl" width="50px" height="50px" fontSize="15" style="display: inline-block; margin-right: 10px;"></userImage>
-						<div class="user_text">
-							<p>{{ getEmployeeName(detail_info.applyor_id) }}</p>
-							<!-- 优化 -->
-							<div v-for="(item, index) in detail_info.process" :key="index" v-show="item.review_point != 0">
-								<p v-if="detail_info.status == 1">
-									<span
-										v-show="
-											(item.point !== 0 && item.review_point >= 0 && detail_info.item_prize_type == 1) ||
-												(item.point !== 0 && item.review_point >= 0 && detail_info.item_prize_type == -1) ||
-												(item.point !== 0 && item.review_point >= 0 && detail_info.item_prize_type == 0)
-										"
-										style="color:#f56c6c;font-size:16px;padding-left:8px"
-									>
-										+{{ item.review_point }}
-									</span>
-									<span
-										v-show="
-											(item.point !== 0 && item.review_point <= 0 && detail_info.item_prize_type == 2) ||
-												(item.point !== 0 && item.review_point <= 0 && detail_info.item_prize_type == -1) ||
-												(item.point !== 0 && item.review_point <= 0 && detail_info.item_prize_type == 0)
-										"
-										style="color:#67C23A;font-size:16px;padding-left:8px"
-									>
-										{{ item.review_point }}
-									</span>
-									<span v-show="detail_info.point">
-										{{ detail_info.pt_id == 1 ? '绩效分' : detail_info.pt_id == 2 ? 'A分' : detail_info.pt_id == 3 ? 'B分' : '' }}
-									</span>
-								</p>
-							</div>
-						</div>
-						<p class="user_text text_ccc">{{ detail_info.review_status_mark }}</p>
-					</el-col>
-				</el-row>
-				<el-row :gutter="10" v-for="(item, index) in detail_info.detail" :key="index">
-					<el-col :span="4">{{ item.key }}</el-col>
-					<el-col :span="20" v-if="item.key == '附件'">
-						<el-image
-							v-for="(items, indexs) in item.value"
-							:key="indexs"
-							style="width: 100px; height: 100px;margin:2px;"
-							:src="items"
-							:preview-src-list="item.value"
-						></el-image>
-					</el-col>
-					<el-col :span="20" v-else>{{ item.value }}</el-col>
-				</el-row>
-
-				<el-row :gutter="10" v-if="detail_info.files != null && detail_info.files > 0">
-					<el-col :span="4">图片</el-col>
-					<el-col :span="20"><el-image v-for="(item, index) in detail_info.files" :key="index" style="width: 100px; height: 100px" :src="item"></el-image></el-col>
-				</el-row>
-				<div v-show="detail_info.process != false">
-					<p class="row_title">
-						审批
-						<span class="row_tips">多人审批时,以最后一人为准</span>
-					</p>
-
-					<div class="examine_steps">
-						<el-steps direction="vertical" :space="50">
-							<el-step v-for="(item, index) in detail_info.process" :key="index">
-								<template slot="icon">
-									<userImage width="36px" height="36px" :img_url="item.img_url" :user_name="item.name"></userImage>
-								</template>
-								<template slot="title">
-									<div style="color: #303133;font-size:14px;margin-top:-2px;">
-										{{ item.name }} {{ item.remark }}
-										<!-- <span v-show="item.point !== 0">{{item.point}}</span> -->
-									</div>
-								</template>
-								<template slot="description">
-									<div>{{ item.time }}</div>
-									<div style="color: #333; margin-bottom: 15px;">{{ item.review_remark }}</div>
-								</template>
-							</el-step>
-						</el-steps>
-					</div>
-				</div>
-			</div>
-		</el-drawer>
-
-		<applicationIntegrationPopup title="申请积分" :visible.sync="dialogVisible"></applicationIntegrationPopup>
-	</div>
-</template>
-
-<script>
-import moment from 'moment';
-import EmployeeSelector from '@/components/EmployeeSelector.vue';
-import applicationIntegrationPopup from '@/components/applicationIntegrationPopup';
-export default {
-	data() {
-		return {
-			tabs: 'complete',
-			dataList: [],
-			table_loading: false,
-			detailShow: false,
-			detail_loading: false,
-			formData: {
-				type: 'complete',
-				pt_id: 0,
-				page: 1,
-				page_size: 10,
-				keyword: ''
-			},
-			total: 0,
-			pageLimit: 10,
-			point_types: JSON.parse(localStorage.getItem('SET_POINT_TYPES')),
-			employee_name: JSON.parse(localStorage.getItem('SET_EMPLOYEE_MAP')),
-			detail_info: {},
-
-			dialogVisible: false,
-			itemIndex: 0
-		};
-	},
-	components: {
-		EmployeeSelector,
-		applicationIntegrationPopup
-	},
-	watch: {
-		tabs(val) {
-			this.dataList = [];
-			this.total = 0;
-			this.formData.page = 1;
-			this.formData.keyword = '';
-			this.formData.type = val;
-			// this.get_list();
-		}
-	},
-	mounted() {
-		// this.get_list();
-	},
-	methods: {
-		getEmployeeName(id) {
-			for (const key in this.employee_name) {
-				if (this.employee_name[key].id == id) {
-					return this.employee_name[key].name || '未知';
-				}
-			}
-		},
-		point_name(id) {
-			let point = this.point_types.find(item => {
-				if (item.id == id) {
-					return item;
-				}
-			});
-			return point.name;
-		},
-		handleCurrentChange(val) {
-			this.formData.page = val;
-			this.get_list();
-		},
-		handleSizeChange(val) {
-			this.pageLimit = val;
-			this.formData.page_size = this.pageLimit;
-			this.get_list();
-		},
-		searchFun() {
-			this.dataList = [];
-			this.total = 0;
-			this.formData.page = 1;
-			this.get_list();
-		},
-		get_list() {
-			this.table_loading = true;
-			this.$axios('get', '/api/integral/review/apply/list', this.formData)
-				.then(res => {
-					if (res.data.code == 1) {
-						this.dataList = res.data.data.list;
-						this.total = res.data.data.total;
-					}
-				})
-				.catch(e => {
-					this.$message.error(e.data.msg);
-				})
-				.finally(() => {
-					this.table_loading = false;
-				});
-		},
-		openDetail(item) {
-			let data = {
-				review_id: item.id
-			};
-			this.detailShow = true;
-			this.detail_loading = true;
-			this.$axios('get', '/api/integral/review', data)
-				.then(res => {
-					if (res.data.code == 1) {
-						this.detail_info = res.data.data;
-					} else {
-						this.$message.error(res.data.data.msg);
-					}
-				})
-				.finally(() => {
-					this.detail_loading = false;
-				});
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.box {
-	background-color: #ffffff;
-	padding: 20px;
-	min-height: calc(100vh - 160px);
-}
-.color_green {
-	color: #4bd964;
-}
-.color_red {
-	color: #f56c6c;
-}
-
-.detail_popup {
-	padding: 20px;
-	height: 90vh;
-	overflow-y: auto;
-
-	.row_title {
-		position: relative;
-		margin: 0 0 20px 0;
-		padding-top: 12px;
-		font-size: 16px;
-		color: #303133;
-		line-height: 22px;
-	}
-	.row_title:before {
-		position: absolute;
-		top: 0;
-		content: ' ';
-		width: 100%;
-		border-top: 1px #f8f8f8 solid;
-	}
-	.el-row {
-		margin-bottom: 10px;
-		font-size: 14px;
-		.el-col-4 {
-			color: #606266;
-		}
-	}
-	.examine_steps {
-		.el-step {
-			flex-basis: auto !important;
-		}
-	}
-}
-
-// 滚动条样式
-.detail_popup::-webkit-scrollbar-track {
-	-webkit-box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.3);
-	border-radius: 5px;
-	background-color: rgba(216, 216, 216, 0.8);
-}
-.detail_popup::-webkit-scrollbar {
-	width: 5px;
-	background-color: rgba(201, 201, 201, 0);
-}
-.detail_popup::-webkit-scrollbar-thumb {
-	border-radius: 5px;
-	-webkit-box-shadow: inset 0 0 5px rgb(153, 145, 145) (160, 154, 154);
-	background-color: rgb(168, 167, 167);
-}
-
-.drawer_title {
-	font-size: 18px;
-	padding: 20px;
-	border-bottom: 1px #efefef solid;
-}
-.user_text {
-	margin: 0;
-	line-height: 25px;
-	display: flex;
-}
-.text_ccc {
-	font-size: 12px;
-	color: #606266;
-}
-::v-deep .el-table tr:hover {
-	cursor: pointer;
-}
-</style>

+ 0 - 523
src789/views/abPoint/award_punish.vue

@@ -1,523 +0,0 @@
-<template>
-	<div class="box">
-		<el-tabs v-model="tabs" type="card">
-			<el-tab-pane label="奖扣成功" name="success"></el-tab-pane>
-			<el-tab-pane label="待审批" name="waiting"></el-tab-pane>
-			<el-tab-pane label="被驳回" name="refuse"></el-tab-pane>
-		</el-tabs>
-		<el-row style="margin-bottom: 15px;">
-			<el-col :span="12">
-				<el-button type="primary" @click="point_b">奖扣B分</el-button>
-				<el-button type="primary" @click="point_a" plain>奖扣A分</el-button>
-			</el-col>
-			<el-col :span="6" :offset="6">
-				<el-input v-model="keyword" placeholder="输入同事姓名/内容" @keyup.enter.native="getData">
-					<el-button slot="append" @click="getData" icon="el-icon-search"></el-button>
-				</el-input>
-			</el-col>
-		</el-row>
-
-		<el-table v-if="tabs == 'success'" :data="dataList" stripe fit v-loading="table_loading" @row-click="open_detail">
-			<el-table-column label="姓名" prop="employee_id" align="left">
-				<template slot-scope="scope">
-					<div class="flex-box flex-contet-conter">
-						<userImage :id="scope.row.employee_id" :user_name="scope.row.employee_name" width="50px" height="50px"></userImage>
-						<span style="margin-left: 10px; line-height: 50px;">{{ scope.row.employee_name }}</span>
-					</div>
-				</template>
-			</el-table-column>
-			<el-table-column prop="remark" show-overflow-tooltip label="奖扣内容"></el-table-column>
-			<el-table-column prop="point" label="积分" width="120">
-				<template slot-scope="scope">
-					<span :class="{ color_green: scope.row.point < 0, color_red: scope.row.point > 0 }">
-						<span v-show="scope.row.point > 0">+</span>
-						{{ scope.row.point }} {{ point_name(scope.row.pt_id) }}
-					</span>
-				</template>
-			</el-table-column>
-			<el-table-column prop="create_time" label="奖扣时间" width="150">
-				<template slot-scope="scope">
-					{{ cuttString(scope.row.create_time) }}
-				</template>
-			</el-table-column>
-
-			<template slot="empty">
-				<noData></noData>
-			</template>
-		</el-table>
-
-		<el-table v-if="tabs !== 'success'" :data="dataList" stripe fit v-loading="table_loading" @row-click="open_detail1">
-			<el-table-column label="姓名" prop="employee_id" align="left">
-				<template slot-scope="scope">
-					<div class="flex-box flex-contet-conter">
-						<userImage :id="scope.row.employee_id" :user_name="scope.row.employee_name" width="50px" height="50px"></userImage>
-						<span style="margin-left: 10px; line-height: 50px;">{{ scope.row.employee_name }}</span>
-					</div>
-				</template>
-			</el-table-column>
-			<el-table-column prop="remark" show-overflow-tooltip label="奖扣内容">
-				<template slot-scope="scope">
-					{{ scope.row.remark.customize }}
-				</template>
-			</el-table-column>
-			<el-table-column prop="event_time" label="奖扣时间" width="150"></el-table-column>
-
-			<template slot="empty">
-				<noData></noData>
-			</template>
-		</el-table>
-
-		<center style="margin-top: 15px;">
-			<el-pagination
-				background
-				@size-change="handleSizeChange"
-				@current-change="handleCurrentChange"
-				:current-page="formData.page"
-				:page-sizes="[10, 20, 30, 40, 50, 100]"
-				layout="total, sizes, prev, pager, next"
-				:page-size="pageLimit"
-				:total="formData.total"
-			></el-pagination>
-		</center>
-
-		<el-drawer title="奖扣详情" :visible.sync="drawer" ref="drawer" :with-header="false" :size="'600px'" direction="rtl">
-			<div class="drawer_title">奖扣详情</div>
-			<div class="detail_popup" v-loading="detail_loading" v-if="detail_info !== null">
-				<el-row :gutter="10" style="padding-bottom:10px;border-bottom:1px #f8f8f8 solid;">
-					<el-col :span="24">
-						<userImage
-							:id="detail_info.employee_id"
-							:user_name="detail_info.employee_name"
-							:img_url="detail_info.img_url"
-							class="fl"
-							width="50px"
-							height="50px"
-							fontSize="15"
-						></userImage>
-						<span style="line-height:50px; margin-left:10px;margin-right:4px;">{{ detail_info.employee_name }}</span>
-						<span class="color_red point" v-show="detail_info.point >= 0 && detail_info.point">+{{ detail_info.point }}</span>
-						<span class="color_green point" v-show="detail_info.point < 0 && detail_info.point">{{ detail_info.point }}</span>
-						<span v-show="detail_info.point">{{ detail_info.pt_id == 1 ? '绩效分' : detail_info.pt_id == 2 ? 'A分' : detail_info.pt_id == 3 ? 'B分' : '' }}</span>
-					</el-col>
-				</el-row>
-
-				<el-row :gutter="10">
-					<el-col :span="4">任务描述</el-col>
-					<el-col :span="20" v-if="detail_info.remark">{{ detail_info.remark && (detail_info.remark.customize || detail_info.remark.rule) }}</el-col>
-				</el-row>
-
-				<el-row :gutter="10">
-					<el-col :span="4">规则分类</el-col>
-					<el-col :span="20">{{ detail_info.rule_list }}</el-col>
-				</el-row>
-
-				<el-row :gutter="10" v-show="detail_info.rule_list">
-					<el-col :span="4">事件时间</el-col>
-					<el-col :span="20">{{ detail_info.date }}</el-col>
-				</el-row>
-
-				<el-row :gutter="10" v-show="detail_info.source_type_mark">
-					<el-col :span="4">来源类型</el-col>
-					<el-col :span="20">{{ detail_info.source_type_mark }}</el-col>
-				</el-row>
-
-				<el-row :gutter="10" v-show="!detail_info.rule_id">
-					<el-col :span="4">记录人</el-col>
-					<el-col :span="20">{{ detail_info.employee_name }}</el-col>
-				</el-row>
-
-				<el-row :gutter="10" :v-if="detail_info.files">
-					<el-col v-for="(item, index) in detail_info.files" :key="index" :span="4">{{ index == 0 ? '图片' : '' }}</el-col>
-					<el-col :span="20">
-						<el-image
-							v-for="(item, index) in detail_info.files"
-							:key="index"
-							style="width: 100px; height: 100px;margin-right:8px"
-							:src="item"
-							:preview-src-list="detail_info.files"
-						></el-image>
-					</el-col>
-				</el-row>
-
-				<div v-show="detail_info.rule_item_id">
-					<p class="row_title">规则依据</p>
-					<el-row :gutter="10">
-						<el-col :span="4">规则分类</el-col>
-						<el-col :span="19">{{ detail_info.rule_list }}</el-col>
-					</el-row>
-					<el-row v-if="detail_info.remark && detail_info.remark.rule">
-						<el-col :span="4">积分规则</el-col>
-						<el-col :span="19">{{ detail_info.remark.rule }}</el-col>
-					</el-row>
-					<el-row v-if="detail_info.rule_item">
-						<el-col :span="4">积分</el-col>
-						<el-col :span="19" v-show="detail_info.rule_item.min_point == detail_info.rule_item.max_point">{{ detail_info.rule_item.min_point }}</el-col>
-						<el-col :span="19" v-show="detail_info.rule_item.min_point != detail_info.rule_item.max_point">
-							{{ detail_info.rule_item.min_point }} ~ {{ detail_info.rule_item.max_point }}
-						</el-col>
-					</el-row>
-				</div>
-
-				<div v-show="detail_info.process != false">
-					<p class="row_title">
-						审批
-						<span class="row_tips">多人审批时,以最后一人为准</span>
-					</p>
-					<div class="examine_steps">
-						<el-steps direction="vertical" :space="50">
-							<el-step v-for="(item, index) in detail_info.process" :key="index">
-								<template slot="icon">
-									<userImage width="36px" height="36px" :img_url="item.img_url" :user_name="item.name"></userImage>
-								</template>
-								<template slot="title">
-									<div style="color: #303133;font-size:14px;margin-top:-2px;">
-										{{ item.name }} {{ item.remark }}
-										<!-- <span v-show="item.point !== 0">{{item.point}}</span> -->
-									</div>
-								</template>
-								<template slot="description">
-									<div style="color:rgb(130 130 130)">{{ item.time }}</div>
-								</template>
-							</el-step>
-						</el-steps>
-					</div>
-				</div>
-			</div>
-		</el-drawer>
-
-		<el-drawer title="奖扣详情" :visible.sync="detailShow" :with-header="false" :size="'600px'" direction="rtl">
-			<div class="drawer_title">奖扣详情</div>
-			<div class="detail_popup" v-loading="detail_loading" v-if="detail_info !== null">
-				<el-row :gutter="10" style="padding-bottom:10px;border-bottom:1px #f8f8f8 solid;">
-					<el-col :span="24">
-						<userImage :id="detail_info.applyor_id" class="fl" width="50px" height="50px" fontSize="15"></userImage>
-						<span style="line-height:50px; margin-left:10px;margin-right:4px;">{{ getEmployeeName(detail_info.applyor_id) }}</span>
-						<span class="color_red point" v-show="detail_info.point >= 0 && detail_info.point">+{{ detail_info.point }}</span>
-						<span class="color_green point" v-show="detail_info.point < 0 && detail_info.point">{{ detail_info.point }}</span>
-						<span v-show="detail_info.point">{{ detail_info.pt_id == 1 ? '绩效分' : detail_info.pt_id == 2 ? 'A分' : detail_info.pt_id == 3 ? 'B分' : '' }}</span>
-					</el-col>
-				</el-row>
-
-				<el-row :gutter="10" v-show="detail_info.source_type_mark">
-					<el-col :span="4">来源类型</el-col>
-					<el-col :span="20">{{ detail_info.source_type_mark }}</el-col>
-				</el-row>
-
-				<el-row :gutter="10" v-for="(item, index) in detail_info.detail" :key="index">
-					<el-col :span="4">{{ item.key }}</el-col>
-					<el-col :span="20" v-if="item.key == '附件'">
-						<el-image style="width: 100px; height: 100px" :src="item.value[0]" :preview-src-list="item.value"></el-image>
-					</el-col>
-					<el-col :span="20" v-else>{{ item.value }}</el-col>
-				</el-row>
-
-				<el-row :gutter="10" :v-if="detail_info.files">
-					<el-col v-for="(item, index) in detail_info.files" :key="index" :span="4">{{ index == 0 ? '图片' : '' }}</el-col>
-					<el-col :span="20">
-						<el-image
-							v-for="(item, index) in detail_info.files"
-							:key="index"
-							style="width: 100px; height: 100px;margin-right:8px"
-							:src="item"
-							:preview-src-list="detail_info.files"
-						></el-image>
-					</el-col>
-				</el-row>
-
-				<div v-show="detail_info.rule_id && detail_info.process !== null && detail_info.process.length > 0">
-					<p class="row_title">
-						审批
-						<span class="row_tips">多人审批时,以最后一人为准</span>
-					</p>
-
-					<div class="examine_steps">
-						<el-steps direction="vertical" :space="50">
-							<el-step v-for="(item, index) in detail_info.process" :key="index">
-								<template slot="icon">
-									<userImage width="36px" height="36px" :img_url="item.img_url" :user_name="item.name"></userImage>
-								</template>
-								<template slot="title">
-									<div style="color: #303133;font-size:14px;margin-top:-2px;">
-										{{ item.name }} {{ item.remark }}
-										<!-- <span v-show="item.point !== 0">{{item.point}}</span> -->
-									</div>
-								</template>
-								<template slot="description" style="">
-									<div style="color:rgb(130 130 130)">{{ item.time }}</div>
-								</template>
-							</el-step>
-						</el-steps>
-					</div>
-				</div>
-			</div>
-		</el-drawer>
-
-		<bonusPointsPopup :title="popuTitle" :visible.sync="popupVisible" :refresh.sync="refreshData" :integralType.sync="integralType"></bonusPointsPopup>
-	</div>
-</template>
-
-<script>
-import EmployeeSelector from '@/components/EmployeeSelector.vue';
-import moment from 'moment';
-import noData from '@/components/noData';
-import bonusPointsPopup from '@/components/bonusPointsPopup';
-
-export default {
-	data() {
-		return {
-			refreshData: '',
-			popuTitle: '奖扣A分',
-			popupVisible: false,
-			integralType: 0,
-			table_loading: true,
-			formData: {
-				page: 1,
-				page_size: 10,
-				total: 0
-			},
-			tabs: 'success',
-			dataList: [],
-			pageLimit: 10,
-			keyword: '',
-			point_types: JSON.parse(localStorage.getItem('SET_POINT_TYPES')),
-			showTitle: false,
-			dialogVisible: false,
-			dialogData: {
-				members: [],
-				items: [
-					{
-						rule_switch: false,
-						rule_id: '',
-						item_id: '',
-						point: '0',
-						remark: '',
-						event_time: moment().format('YYYY-MM-DD'),
-						approval: '',
-						approval_not_select: [],
-						approval_selected: { dept: [], employee: [] },
-						plus: true,
-						pt_id: '',
-						reviewer_id: '',
-						files: []
-					}
-				]
-			},
-			itemData: {},
-			rules: {
-				manager: [{ required: true, message: '请选择录入对象', trigger: 'blur' }]
-			},
-			manager: '',
-			employee_not_select: [],
-			manager_selected: { dept: [], employee: [] },
-			show_employee_selector: false,
-
-			show_approval_selector: false,
-			itemIndex: 0,
-			rule_list: [],
-
-			rule_item_list: {},
-			rule_item_list_value: null,
-
-			drawer: false,
-			detail_loading: false,
-			detail_info: {},
-			detailShow: false,
-
-			employee_name: JSON.parse(localStorage.getItem('SET_EMPLOYEE_MAP')),
-			fileList: []
-		};
-	},
-	components: {
-		EmployeeSelector,
-		bonusPointsPopup,
-		noData
-	},
-	mounted() {
-		// if(this.$route.query.type == 1){
-		//   this.point_a()
-		// }else if(this.$route.query.type == 2){
-		//   this.point_b()
-		// }
-		// this.getData()
-	},
-	watch: {
-		tabs(val) {
-			this.dataList = [];
-			this.formData.total = 0;
-			this.keyword = '';
-			this.formData.page = 1;
-			this.formData.page_size = 10;
-			// this.getData();
-		},
-		refreshData(val) {
-			// this.getData();
-		}
-	},
-	methods: {
-		getEmployeeName(id) {
-			for (const key in this.employee_name) {
-				if (this.employee_name[key].id == id) {
-					return this.employee_name[key].name;
-				}
-			}
-		},
-		open_detail1(item) {
-			this.detailShow = true;
-			let data = {
-				review_id: item.id
-			};
-			this.detail_loading = true;
-			this.$axios('get', '/api/integral/review', data)
-				.then(res => {
-					if (res.data.code == 1) {
-						this.detail_info = res.data.data;
-					} else {
-						this.$message.error(res.data.data.msg);
-					}
-				})
-				.finally(() => {
-					this.detail_loading = false;
-				});
-		},
-		open_detail(item) {
-			this.drawer = true;
-			let data = {
-				event_id: item.id
-			};
-			this.detail_loading = true;
-			this.$axios('get', '/api/integral/statistics/integral/info', data)
-				.then(res => {
-					if (res.data.code == 1) {
-						this.detail_info = res.data.data;
-					} else {
-						this.$message.error(res.data.data.msg);
-					}
-				})
-				.finally(() => {
-					this.detail_loading = false;
-				});
-		},
-
-		cuttString(data) {
-			return data.substring(0, 10);
-		},
-		point_a() {
-			this.integralType = 2;
-			this.popuTitle = '奖扣A分';
-			this.popupVisible = true;
-		},
-		point_b() {
-			this.integralType = 3;
-			this.popuTitle = '奖扣B分';
-			this.popupVisible = true;
-		},
-		point_name(id) {
-			return this.point_types.find(item => {
-				if (item.id == id) {
-					return item;
-				}
-			}).name;
-		},
-		handleCurrentChange(val) {
-			this.formData.page = val;
-			this.getData();
-		},
-		handleSizeChange(val) {
-			this.pageLimit = val;
-			this.formData.page_size = this.pageLimit;
-			this.getData();
-		},
-		getData() {
-			this.table_loading = true;
-			let data = {};
-			if (this.tabs == 'success') {
-				data = {
-					page: this.formData.page,
-					page_size: this.formData.page_size,
-					recorder_id: this.$store.getters.user_info.id,
-					source_type: '1',
-					keyword: this.keyword
-				};
-			} else if (this.tabs == 'waiting') {
-				data = {
-					page: this.formData.page,
-					page_size: this.formData.page_size,
-					keyword: this.keyword,
-					pt_id: '0',
-					type: 'waiting'
-				};
-			} else {
-				data = {
-					page: this.formData.page,
-					page_size: this.formData.page_size,
-					keyword: this.keyword,
-					pt_id: '0',
-					type: 'refuse'
-				};
-			}
-			this.$axios('get', this.tabs == 'success' ? '/api/integral/statistics/integral' : '/api/integral/review/entry/list', data)
-				.then(res => {
-					if (res.data.code == 1) {
-						this.dataList = res.data.data.list;
-						this.formData.total = res.data.data.total;
-					}
-				})
-				.catch(e => {
-					this.$message.error(e.data.msg);
-				})
-				.finally(() => {
-					this.table_loading = false;
-				});
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.box {
-	background-color: #ffffff;
-	padding: 20px;
-	min-height: calc(100vh - 160px);
-}
-.color_green {
-	color: #4bd964;
-}
-.color_red {
-	color: #f56c6c;
-}
-.detail_popup {
-	padding: 20px;
-	height: calc(100vh - 60px);
-	overflow: auto;
-	.row_title {
-		position: relative;
-		margin: 0 0 20px 0;
-		padding-top: 12px;
-		font-size: 16px;
-		color: #303133;
-		line-height: 22px;
-	}
-	.row_title:before {
-		position: absolute;
-		top: 0;
-		content: ' ';
-		width: 100%;
-		border-top: 1px #f8f8f8 solid;
-	}
-	.el-row {
-		margin-bottom: 10px;
-		font-size: 14px;
-		.el-col-4 {
-			color: #606266;
-		}
-	}
-}
-.drawer_title {
-	font-size: 18px;
-	padding: 20px;
-	border-bottom: 1px #efefef solid;
-}
-::v-deep .el-table tr:hover {
-	cursor: pointer;
-}
-</style>

+ 0 - 908
src789/views/ranking/custom_rank.vue

@@ -1,908 +0,0 @@
-<template>
-	<div class="all-box">
-		<div class="all">
-			<div class="flex-box">
-				<div class="terr-left">
-					<el-button size="medium" @click="addGroup" type="primary">新建分组</el-button>
-					<el-menu default-active="0" class="el-menu-vertical-demo" style="border: none" v-if="groups_list.length>0" v-loading="groups_loading">
-						<el-menu-item
-							style="height: 47px;line-height: 47px;"
-							:index="index.toString()"
-							class="font-flex-word"
-							v-for="(item, index) in groups_list"
-							:key="index"
-							@click="open_right(item)"
-							v-show="item.code !== 'employee'"
-						>
-							<i class="el-icon-document-copy"></i>
-							<span slot="title">{{ item.name }}</span>
-						</el-menu-item>
-					</el-menu>
-					<div v-else style="text-align: center;margin-top: 10%;" class="fontColorF">
-						<img src="@/assets/image/nodata.png" style="width: 180px;height: 120px;margin: 30px auto;">
-						还没有自定义分组
-					</div>
-				</div>
-				<div class="terr-right border-right flex-1">
-					<div class="listData" v-loading="table_loading" v-if="table_list.length > 0">
-						<div class="flex-box">
-							<div class="flex-box flex-v-ce margin-bottom">
-								<div class="groupsName">{{groups_info.name}}<span class="blue">({{groups_info.employees.length}}人)</span></div>
-								<el-button @click="editGroup" size="medium">编辑</el-button>
-							</div>
-						</div>
-						<!-- form -->
-						<el-form :model="params" :inline="true" ref="params">
-							<el-form-item label="时间" label-width="40px">
-								<el-date-picker v-model="params.month"  size="medium" type="month" placeholder="请选择月份" value-format="yyyy-MM"></el-date-picker>
-							</el-form-item>
-							<el-form-item>
-								<el-checkbox v-model="sort" size="medium" label="由低到高" border></el-checkbox>
-							</el-form-item>
-						</el-form>
-						<!-- 表格 -->
-						<el-table :data="table_list" style="width: 100%" >
-							<el-table-column label="名次" width="80" align="center">
-								<template slot-scope="scope">
-									<img v-if="scope.row.rank === 1" src="@/assets/image/statistics_NO1.png" alt="" />
-									<img v-if="scope.row.rank === 2" src="@/assets/image/statistics_NO2.png" alt="" />
-									<img v-if="scope.row.rank === 3" src="@/assets/image/statistics_NO3.png" alt="" />
-									<span v-if="scope.row.rank > 3">{{ scope.row.rank }}</span>
-								</template>
-							</el-table-column>
-							<el-table-column label="姓名" align="left">
-								<template slot-scope="scope">
-									<div class="flex-box">
-										<userImage	class="fl" :user_name="scope.row.employee_name"	:img_url="scope.row.employee_img_url" width="50px" height="50px"></userImage>
-										<span style="line-height: 50px; padding-left: 10px;">{{ scope.row.employee_name }}</span>
-									</div>
-								</template>
-							</el-table-column>
-							<el-table-column label="B分" align="left" prop="point"></el-table-column>
-							<template slot="empty">
-								<noData></noData>
-							</template>
-						</el-table>
-						<center style="padding: 20px 0;">
-							<el-pagination
-								background
-								@size-change="handleSizeChange"
-								@current-change="handleCurrentChange"
-								:page-sizes="[10, 20, 30, 40, 50, 100]"
-								layout="total, sizes, prev, pager, next"
-								:page-size="page_size"
-								:current-page="page"
-								:total="total">
-							</el-pagination>
-						</center>
-					</div>
-					<div v-else style="margin-top: 10%;">
-						<noData :isSolt="true">
-							<template v-slot:default>
-								<div style="text-align: center;">还没有分组,<span style="color:#26A2FF;cursor:pointer" @click="addGroup">去添加 >></span></div>
-							</template>
-						</noData>
-					</div>
-				</div>
-			</div>
-		</div>
-		<!-- 新增分组 -->
-		<el-dialog	:title="popupType? '新增分组':'编辑分组'" width="660px"  top="5%" :visible.sync="groupShow"  :close-on-click-modal="false">
-			<el-form  ref="newGroupForm" :model="newGroupForm" :rules="rules" label-width="85px"  @submit.native.prevent>
-				<el-form-item label="分组名称" prop="group_name">
-					<el-input v-model="newGroupForm.group_name" placeholder="请输入分组名称" auto-complete="off"></el-input>
-				</el-form-item>
-				<div>
-					<EmployeeSelector
-					    v-if="groupShow"
-						ref="Employee"
-						:user_no_select="false"
-						:can_select_dept="true"
-						:selected="employees_selected"
-						:close_clear_data="true"
-						@confirm="move_employee_confirm"/>
-				</div>
-<!-- 				<el-form-item label="分组成员">
-				  <el-input auto-complete="off" v-model="employeeNames" placeholder="全部成员"></el-input>
-				  <div @click="isEmployeeShow=true" style="height:36px; position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;cursor:pointer"></div>
-				  <el-dialog title="选择人员" width="800px" :visible.sync="isEmployeeShow" @close="closeNone" append-to-body :before-close="handleClose">
-					<EmployeeSelector
-						v-if="isEmployeeShow"
-						ref="Employee"
-						:user_no_select="false"
-						:can_select_dept="true"
-						:selected="employees_selected"
-						:close_clear_data="true"
-						@confirm="move_employee_confirm"/>
-						<span slot="footer" class="dialog-footer">
-							<el-button @click="isEmployeeShow = false">取 消</el-button>
-							<el-button type="primary" @click="submitEmployee()">确 定</el-button>
-						</span>
-				   </el-dialog>
-				   
-				</el-form-item> 
-				<el-form-item label="积分规则">
-				  <el-input auto-complete="off" v-model="newGroupFormRules" placeholder="全部规则分类"></el-input>
-				  <div @click="ruleDialogTableVisibles" style="height:36px; position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;cursor:pointer"></div>
-				  <div style="margin-bottom:12px;">
-				    <span style="font-size:13px;color:rgb(138 138 138);position: absolute; top: 30px; left: 0;">{{ruleHint}}</span>
-				  </div>
-				  <el-dialog title="选择规则" width="800px" :visible.sync="ruleDialogTableVisible" @close="closeNone" append-to-body :before-close="handleClose">
-					  <div style="display:flex;position: relative;width:100%;height:40px">
-						<span style="position: absolute;line-height:40px;left:20px">已选:{{ valuesOrLength.length }}条</span>
-						<el-input type="text" class="search" style="position: absolute;right:20px;width:20%" placeholder="输入关键字搜索" v-model.trim="keyword" />
-					  </div>
-					  <el-row class="architecture">
-						<el-col :span="8" class="RuleLeft" style="height:500px">
-						  <div  class="rule_class_box">
-							<el-tree
-							  ref="menum"
-							  class="cate-tree"
-							  node-key="id"
-							  :accordion="true"
-							  :highlight-current="true"
-							  :data="rule_trees"
-							  :default-expand-all="false"
-							  :props="defaultProps"
-							  :expand-on-click-node="false"
-							  @node-click="handleNodeClick"
-							>
-							  <div content="tree"  v-if="!data.dis"  v-show="rule_trees.length != 0"  slot-scope="{ node, data }">
-								<span class="name">{{ data.name }}</span>
-							  </div>
-							</el-tree>
-						  </div>
-						</el-col>
-						<el-col :span="16" class="RuleRight" v-loading="tableLoadingRule" style="height:500px;overflow-y:auto">
-						  <el-table
-							ref="multipleTable"
-							:data="tableData_rule"
-							tooltip-effect="dark"
-							style="width: 100%;cursor:pointer"
-							@select="onTableSelect"
-							@select-all="selectAll"
-							@cell-click="clicktable"
-						  >
-							<el-table-column type="selection" width="55"></el-table-column>
-							<el-table-column prop="remark" :label="'全选'" show-overflow-tooltip></el-table-column>
-						  </el-table>
-						</el-col>
-					  </el-row>
-					  <span slot="footer" class="dialog-footer">
-						<el-button @click="ruleDialogTableVisible = false">取 消</el-button>
-						<el-button type="primary" @click="ruleDialogTableVisibleQD">确 定</el-button>
-					  </span>
-				   </el-dialog>
-				</el-form-item>
-				
-				<el-form-item label="统计周期" label-width="85px" prop="date_interval" :show-message="false">
-				  <el-select v-model="newGroupForm.date_interval" placeholder="请选择周期">
-					<el-option v-for="item in options_time" :key="item.value" :label="item.label" :value="item.value"></el-option>
-				  </el-select>
-				</el-form-item> -->
-			</el-form>
-			<div class="flex-box flex-v-ce">
-				<el-button type="danger" v-if="!popupType" :loading="delLoad" @click="delItem">删除</el-button>
-				<div class="flex-1"></div>
-				<el-button @click="resetForm('newGroupForm')">取 消</el-button>
-				<el-button type="primary" :loading="saveLoad" @click="subGroupForm('newGroupForm')">确 定</el-button>
-			</div>
-		</el-dialog>
-		
-	
-	</div>
-</template>
-
-<script>
-import EmployeeSelector from '@/components/EmployeeSelector.vue';
-import noData from '@/components/noData';
-import moment from 'moment'
-var selecteds = [];
-let selectionID = [];
-export default {
-	components: { EmployeeSelector, noData },
-	data() {
-		return {
-			page: 1,
-			page_size: 10,
-			total: null,
-			tips_show:false,
-			groups_list:[],
-			groups_loading:false,
-			table_loading:false,
-			table_list:[],
-			groups_info: {
-				name:'',
-				employees: []
-			},
-			// 
-			params:{
-				group_id: '',
-				month: moment().format('YYYY-MM'),
-				sort: 'DESC',
-				rule_id: '',
-			},
-			rule_trees: [],
-			groupShow: false,
-			rules: { 
-				group_name: [{ required: true, message: '请输入分组名称', trigger: 'blur' },{ min: 2, max: 10, message: '长度在 3 到 10 个字符', trigger: 'blur' }],
-				date_interval: [{ required: true, message: '请选择周期', trigger: 'change' }],
-			},
-			newGroupForm:{
-				group_name: "",
-				employees: [],
-				items:[],
-				date_interval:'1',
-			},
-			saveLoad: false,
-			delLoad: false,
-			show_employee_selector: false,
-			employee_not_select: [],
-			employees_selected: {employee:[], dept: []},
-			props:{checkStrictly: true,value: 'id', label: 'name',children:'child'},
-			sort: false,
-			
-			popupType: false,
-			
-			// 添加分组(第二期内容添加)
-			ruleDialogTableVisible:false,
-			defaultProps: {
-			  children: 'child',
-			  label: 'name'
-			},
-			tableLoadingRule:false,
-			tableData_rule: [],
-			options_time_value: '',
-			options_time: [
-			  {
-			    value: '1',
-			    label: '月度'
-			  },
-			  {
-			    value: '2',
-			    label: '季度'
-			  },
-			  {
-			    value: '3',
-			    label: '年度'
-			  }
-			],
-			newGroupFormRules:'',
-			ruleHint:'统计所有积分(基础分和工龄分除外)',
-			valuesOrLength: [],
-			keyword:'',
-			treedata: [],
-			isEmployeeShow:false,
-			employeeNames:'',
-		};
-	},
-	created() {
-		this.getRuleList();
-		this.get_groups_list(true);
-	},
-	watch:{
-		'params.rule_id'(){
-			this.$refs.rule.dropDownVisible = false;
-		},
-		'params.month'(val,old_val){
-			this.page = 1
-			this.open_right()
-		},
-		'sort'(val){
-			this.page = 1
-			val?this.params.sort = 'ASC':this.params.sort = 'DESC'
-			this.open_right()
-		},
-		keyword() {
-		  //函数节流
-		  if (this.timer) {
-		    clearTimeout(this.timer);
-		  }
-		  //清空 全部
-		  if (!this.keyword) {
-		    this.tableData_rule = this.tableData_rule2;
-		    this.ifPitchOnChild(this.tableData_rule, selecteds);
-		    return;
-		  }
-		  this.timer = setTimeout(() => {
-		    const result = [];
-		    this.tableData_rule2.forEach(val => {
-		      if (val.remark.indexOf(this.keyword) > -1) {
-		        result.push(val);
-		      }
-		    });
-		    this.tableData_rule = result;
-		    this.ifPitchOnChild(this.tableData_rule, selecteds);
-		  }, 100);
-		}
-	},
-	mounted() {
-
-	},
-	methods: {
-		// 第二期内容
-		
-		//
-		submitEmployee(){
-			this.$refs.Employee.confirm();//调用组件的confirm();
-		},
-		//点击规则弹出窗口
-		ruleDialogTableVisibles() {
-		  this.tableLoadingRule = true;
-		  selecteds = this.valuesOrLength;
-		  //点击弹出窗口并展示所有数据
-		  let tableData_r = [];
-		  for (let i in this.itemList) {
-		    for (let a in this.itemList[i]) {
-		      tableData_r.push(this.itemList[i][a]);
-		    }
-		  }
-		  this.tableData_rule2 = tableData_r; //赋予筛选数据
-		  this.tableData_rule = tableData_r;
-		  this.ruleDialogTableVisible = true;
-		  this.ifPitchOnChild(this.tableData_rule, selecteds);
-		},
-		
-		//规则弹窗确定
-		ruleDialogTableVisibleQD() {
-		  let valuesLengths = [];
-		  for (let i in selecteds) {
-		    valuesLengths.push(selecteds[i]);
-		  }
-		  // valuesLengths = selecteds
-		  this.valuesOrLength = valuesLengths;
-		  this.newGroupForm.items = this.valuesOrLength;
-		  if (this.valuesOrLength.length >= 1) {
-		    this.newGroupFormRules = this.valuesOrLength.length + '条规则';
-		    this.ruleHint = '统计已选规则的积分(只选分类不指定规则的积分除外)'
-		  } else {
-		    this.newGroupFormRules = '';
-		    this.ruleHint = '统计所有积分(基础分和工龄分除外)'
-		  }
-		  this.ruleDialogTableVisible = false;
-		},
-		//点击某行
-		clicktable(row, column, cell, event) {
-		  let selectedsif = false;
-		  for (let i in selecteds) {
-		    if (row.id == selecteds[i]) {
-		      selectedsif = true;
-		      selecteds.splice(i, 1);
-		      this.toggleSelection([row], false);
-		    }
-		  }
-		  if (selectedsif == false) {
-		    selecteds.push(row.id);
-		    this.ifPitchOnChild(this.tableData_rule, selecteds);
-		  }
-		},
-		//全选
-		selectAll(selection) {
-		  for (let i in selection) {
-		    selectionID.push(selection[i].id);
-		  }
-		  let tableData_rules = []; //当前分页id
-		  for (let i in this.tableData_rule) {
-		    tableData_rules.push(this.tableData_rule[i].id);
-		  }
-		  selectionID = [...new Set(selectionID)];
-		  if (selection.length == 0) {
-		    //全不选
-		    var diff = [];
-		    var tmp = tableData_rules;
-		    selectionID.forEach(function(val1, i) {
-		      if (tableData_rules.indexOf(val1) < 0) {
-		        diff.push(val1);
-		      } else {
-		        tmp.splice(tmp.indexOf(val1), 1);
-		      }
-		    });
-		    selectionID = diff.concat(tmp);
-		  } else {
-		    //全选
-		    console.log('true');
-		  }
-		  selecteds = [...new Set(selectionID)];
-		  this.valuesOrLength = selecteds;
-		},
-		onTableSelect(rows, row) {
-		  let selected = rows.length && rows.indexOf(row) !== -1;
-		  if (selected) {
-		    selecteds.push(row.id);
-		  } else {
-		    for (let i in selecteds) {
-		      if (row.id == selecteds[i]) {
-		        selecteds.splice(i, 1);
-		      }
-		    }
-		  }
-		},
-		//关闭回调
-		closeNone() {
-		  selecteds = [];
-		},
-		//关闭
-		handleClose(done) {
-		  done();
-		},
-		//此方法:拿到当前点击规则分类的所有子节点ID,(为了包含子分类 规则)
-		menuIdInit(menus) {
-		  var _this = this;
-		  var _menu = menus;
-		  var menuId = [];
-		  var len = _menu.length;
-		  for (var i = 0; i < len; i++) {
-		    var item = _menu[i];
-		    if (item.child && item.child.length != 0) {
-		      var child = item.child;
-		      for (var j = 0; j < child.length; j++) {
-		        _menu[len + j] = child[j];
-		      }
-		      len = _menu.length;
-		    }
-		    menuId.push(item.id);
-		  }
-		  return menuId;
-		},
-		//点击规则分类
-		handleNodeClick(data) {
-		  let dataArr = this.menuIdInit([data]); //调用方法
-		  this.tableLoadingRule = true;
-		  this.keyword = ''; //切换规则重置搜索框
-		  let tableData_r = [];
-		  for (let i in this.itemList) {
-		    for (let a in this.itemList[i]) {
-		      for (let x in dataArr) {
-		        if (dataArr[x] == this.itemList[i][a].rule_id) {
-		          tableData_r.push(this.itemList[i][a]);
-		        }
-		      }
-		    }
-		  }
-		  this.tableData_rule2 = tableData_r; //赋予筛选数据
-		  this.tableData_rule = tableData_r;
-		  this.ifPitchOnChild(this.tableData_rule, selecteds);
-		},
-		ifPitchOnChild(item, indexID) {
-		  let pitchOnChild = [];
-		  for (let i in item) {
-		    for (let a in indexID) {
-		      //判断外层的值相不相等
-		      if (indexID[a] == item[i].id) {
-		        pitchOnChild.push(item[i]);
-		      }
-		    }
-		  }
-		  this.toggleSelection(pitchOnChild, true);
-		},
-		//默认选中
-		toggleSelection(rows, selected) {
-		  if (rows) {
-		    this.$nextTick(() => {
-		      rows.forEach(row => {
-		        this.$refs.multipleTable.toggleRowSelection(row, selected);
-		      });
-		    });
-		  } else {
-		    this.$refs.multipleTable.clearSelection();
-		  }
-		  setTimeout(() => {
-		    //给遮到层,让默认选中的有缓冲时间
-		    this.tableLoadingRule = false;
-		  }, 300);
-		},
-		
-		
-		
-		// 提交表单
-		subGroupForm(formName){
-		  this.$refs[formName].validate((valid) => {
-		    if (valid) {
-				this.saveFun()
-		    }
-		  });
-		},
-		//获取分组详情
-		getGroupDetail(func){
-			this.$axios('get','/api/integral/statistics/groups/info', {group_id: this.groups_info.id}).then(res => {
-				func(res.data.data.employees);
-			})
-		},
-		//编辑
-		editGroup(){
-			this.newGroupForm.group_name=this.groups_info.name;
-			var that=this;
-			that.getGroupDetail(function(res){
-				console.log(res)
-				that.employees_selected.employee=res;
-				that.popupType = false;
-				that.groupShow = true;
-			})
-			
-		},
-		//添加编辑组
-		saveFun(){
-		  this.saveLoad = true;
-		  this.$refs.Employee.confirm();
-		  var url=this.popupType? '/api/integral/statistics/groups/create':'/api/integral/statistics/groups'
-		  this.newGroupForm.group_id=this.groups_info.id;
-		  if(this.newGroupForm.employees.length==0){
-			 this.$message.error('请选择员工')
-			 this.saveLoad = false;
-			 return;
-		  }
-		  console.log(this.newGroupForm)
-		  var obj={//为编辑时
-			  name:this.newGroupForm.group_name,
-			  id:this.popupType?'':this.groups_info.id,
-			  employees:this.newGroupForm.employees,
-		  }
-		  this.$axios('post',url,this.newGroupForm).then((res) => {
-		    if (res.data.code == 1) {
-				this.$message.success(res.data.msg);
-				this.resetForm('newGroupForm');
-				if(!this.popupType){//为编辑时
-					this.groups_info=obj;
-				}
-				if(this.groups_list.length==0){
-					this.get_groups_list(true)
-				}else{
-					this.get_groups_list()
-				}
-		    }else{
-			  this.saveLoad = false
-		      this.$message.error(res.data.msg)
-		    }
-		  }).finally(()=>{
-				this.saveLoad = false
-		  })
-		},
-		// 重置表单
-		resetForm(formName){
-			this.$refs[formName].resetFields()
-			this.newGroupForm.employees = []
-			this.employee_not_select = []
-			this.employees_selected = {employee:[], dept: []}
-			this.groupShow = false
-		},
-		// 新增分组
-		addGroup(){
-			this.employee_not_select = []
-			this.employees_selected = {employee:[], dept: []}
-			this.newGroupForm = {
-				group_name: "",
-				employees: []
-			}
-			this.groupShow = true
-			this.popupType = true
-		},
-		// 删除分组
-		delItem(){
-			this.$confirm('确定要删除当前分组吗?, 是否继续?', '删除分组', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			}).then(() => {
-				let data = {group_id:this.groups_info.id};
-				this.delLoad = true
-				this.$axios('post','/api/integral/statistics/groups/drop',data).then((res) => {
-					if (res.data.code == 1) {
-						this.$message.success(res.data.msg)
-						this.groupShow = false
-						this.get_groups_list(true);
-					}else{
-						this.$message.error(res.data.msg)
-					}
-				}).catch((e) => {this.$message.error(e.data.msg)}).finally(()=>{
-					this.delLoad = false
-				})
-			})
-		},
-		
-		// 选人组件提交
-		move_employee_confirm(data){
-			this.employeeNames='';
-			var employee=data.employee;
-			if(employee.length>0){
-				employee.forEach(item=>{
-					this.employeeNames+=item.name+','
-					this.newGroupForm.employees.push(item.id);
-				})
-			}else{
-				this.newGroupForm.employees=[];
-			}
-			this.employees_selected.employee=employee;
-			this.isEmployeeShow=false;
-		},
-		// 递归判断列表,把最后的children设为undefined
-		getTreeData(data) {
-			for (var i = 0; i < data.length; i++) {
-				if (data[i].child.length < 1) {
-					// children若为空数组,则将children设为undefined
-					data[i].child = undefined;
-				} else {
-					// children若不为空数组,则继续 递归调用 本方法
-					this.getTreeData(data[i].child);
-				}
-			}
-			return data;
-		},
-		//获取规则
-		getRuleList() {
-			this.$axios('get','/api/integral/rule/trees', {cycle_type: 1}).then(res => {
-				this.rule_trees = this.getTreeData(res.data.data.rule_tree || []);
-				this.itemList = res.data.data.item_list; //规则
-			})
-		},
-		// 规则分类改变之后请求数据
-		rule_null(val){
-		  this.params.rule_id=val.length == 0? '': val[val.length -1]
-		  this.$nextTick(()=>{
-				this.page = 1
-				this.open_right()
-			})
-		},
-		//获取初始化数据
-		get_groups_list(isAdd) {
-			this.groups_loading = true;
-			this.$axios('get','/api/integral/statistics/groups').then(res => {
-				if (res.data.code == 1) {
-					this.groups_list = res.data.data.list;
-					if(this.groups_list[0]){
-						isAdd? this.open_right(this.groups_list[0]):this.open_right();
-					}else{
-						this.table_list=[];
-					}
-				}
-			}).finally(() => {
-				this.groups_loading = false;
-			});
-		},
-		// 打开右边列表
-		open_right(item){
-			this.table_loading = true;
-			var data={};
-			if(item){
-				this.groups_info=item;
-				data={
-					group_id: item.id,
-					month: this.params.month,
-					sort: this.params.sort,
-					rule_id: this.params.rule_id,
-					pt_id: 3,
-				}
-			}else{
-				data={
-					group_id: this.groups_info.id,
-					month: this.params.month,
-					sort: this.params.sort,
-					rule_id: this.params.rule_id,
-					pt_id: 3,
-				}
-			}
-			this.$axios('get','/api/integral/statistics/ranking',data,'v2').then((res) => {
-				if (res.data.code == 1) {
-						this.table_list = res.data.data.list
-						this.total = res.data.data.total
-				}else{
-				  this.$message.error(res.data.data.msg)
-				}
-		    }).finally(() => {
-		        this.table_loading = false
-		    })
-		},
-		// 页码变更
-		handleCurrentChange(val) {
-		  this.page = val
-		  this.open_right(this.groups_info)
-		},
-		handleSizeChange(val){
-		  this.page_size = val
-		  this.open_right(this.groups_info)
-		},
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.architecture {
-  display: flex;
-  text-align: center;
-  padding-left: 0px;
-  background-color: #fff;
-  width: 100%;
-  overflow: hidden;
-  cursor: default;
-  min-height: calc(60vh - 160px);
-}
-.architecture .RuleLine {
-  display: table-cell;
-  width: 1px;
-  min-height: 600px;
-  background: hsl(0, 2%, 76%);
-}
-.architecture .RuleLeft {
-  display: block;
-  text-align: center;
-  padding: 20px 10px;
-  border-right: none;
-  overflow-y: auto;
-  overflow-x: none;
-}
-/*滚动条的宽度*/
-
-.architecture .RuleLeft::-webkit-scrollbar {
-  width: 9px;
-  height: 9px;
-}
-.architecture .RuleRight::-webkit-scrollbar {
-  width: 9px;
-  height: 9px;
-}
-
-/*外层轨道。可以用display:none让其不显示,也可以添加背景图片,颜色改变显示效果*/
-
-.architecture .RuleLeft::-webkit-scrollbar-track {
-  width: 6px;
-  background-color: #fff0;
-  -webkit-border-radius: 2em;
-  -moz-border-radius: 2em;
-  border-radius: 2em;
-}
-.architecture .RuleRight::-webkit-scrollbar-track {
-  width: 6px;
-  background-color: #fff0;
-  -webkit-border-radius: 2em;
-  -moz-border-radius: 2em;
-  border-radius: 2em;
-}
-
-/*滚动条的设置*/
-
-.architecture .RuleLeft::-webkit-scrollbar-thumb {
-  background-color: #fff0;
-  background-clip: padding-box;
-  min-height: 28px;
-  -webkit-border-radius: 2em;
-  -moz-border-radius: 2em;
-  border-radius: 2em;
-}
-.architecture .RuleRight::-webkit-scrollbar-thumb {
-  background-color: #fff0;
-  background-clip: padding-box;
-  min-height: 28px;
-  -webkit-border-radius: 2em;
-  -moz-border-radius: 2em;
-  border-radius: 2em;
-}
-/*滚动条移上去的背景*/
-
-.architecture .RuleLeft:hover::-webkit-scrollbar-thumb {
-  overflow-x: none;
-  background-color: rgba(144, 147, 153, 0.3);
-}
-.architecture .RuleRight:hover::-webkit-scrollbar-thumb {
-  background-color: rgba(115, 118, 124, 0.3);
-}
-
-.architecture .RuleLeft .company_name {
-  position: relative;
-  display: block;
-  font-family: 'Microsoft YaHei';
-  text-align: left;
-  padding: 15px 28px 17px;
-  cursor: pointer;
-  overflow: hidden;
-  white-space: nowrap;
-  text-overflow: ellipsis;
-  border-bottom: 1px #f8f8f8 solid;
-}
-.architecture .RuleLeft .company_name img {
-  position: relative;
-  display: inline-block;
-  top: 2px;
-  width: 18px;
-  height: 18px;
-  margin-right: 4px;
-}
-.architecture .RuleLeft ::v-deep .el-button {
-  margin-bottom: 16px !important;
-}
-.architecture .RuleRight {
-  position: relative;
-  display: table-cell;
-  text-align: left;
-  padding: 20px;
-}
-.architecture .RuleRight .title span .sapn {
-  display: inline-block;
-  vertical-align: middle;
-  max-width: 600px;
-  overflow: hidden;
-  white-space: nowrap;
-  text-overflow: ellipsis;
-}
-.architecture .RuleRight:after {
-  content: ' ';
-  position: absolute;
-  top: 0;
-  left: 0;
-  bottom: 0;
-  width: 1px;
-  background: #ebeef5;
-}
-.architecture .RuleRight .list_box {
-  width: 100%;
-  background: #fff;
-}
-.architecture .RuleRight .list_box ::v-deep table {
-  font-family: 'Microsoft YaHei';
-  width: 100% !important;
-}
-::v-deep .el-radio .el-radio__label {
-	display: none;
-}
-.tips {
-	background: #dcdfe6;
-	border-radius: 50%;
-	width: 14px;
-	height: 14px;
-	color: #fff;
-	display: inline-block;
-	font-size: 12px;
-	line-height: 14px;
-	text-align: center;
-}
-.groupsName {
-	font-size: 18px;
-	margin-right:20px
-}
-.groupsName span{
-	margin-left:5px
-}
-
-.user_text {
-	font-size: 12px;
-}
-.cursor_pointer {
-	cursor: pointer;
-}
-.terr-left button{
-    margin: 0 auto;
-    display: block;
-    margin-bottom: 20px;
-}
-::v-deep .el-menu-item{
-	padding:0 10px !important;
-}
-.rule_class_box {
-	::v-deep .el-tree-node {
-		border-bottom: 1px #f8f8f8 solid;
-	}
-	::v-deep .el-tree-node__content {
-		padding: 10px 0;
-		// border-bottom: 1px #f8f8f8 solid;
-	}
-	::v-deep .el-tree-node__content:hover {
-		background: #ecf5ff;
-		border-radius: 4px;
-	}
-	::v-deep .is-current .el-tree-node__content .el-icon-caret-right {
-		color: #409eff !important;
-	}
-	::v-deep .is-current .el-tree-node__content .el-tree-node__label {
-		color: #409eff !important;
-	}
-	::v-deep .is-current .el-tree-node__children .el-icon-caret-right {
-		color: #c0c4cc !important;
-	}
-	::v-deep .is-current .el-tree-node__children .el-tree-node__label {
-		color: #606266 !important;
-	}
-	::v-deep .el-tree-node__label {
-		overflow: hidden;
-		text-overflow: ellipsis;
-		white-space: nowrap;
-	}
-}
-</style>

+ 0 - 24
src789/views/ranking/department_statistics.vue

@@ -1,24 +0,0 @@
-<template>
-
-</template>
-
-<script>
-export default {
-	name:'department_statistics',
-	data() {
-		return {
-		};
-	},
-	watch: {},
-	mounted() {
-
-	},
-	methods: {
-
-	}
-};
-</script>
-
-<style scoped="scoped">
-
-</style>

+ 0 - 164
src789/views/ranking/deptRankSwiper.vue

@@ -1,164 +0,0 @@
-<template>
-  <div>
-    <div class="swiperBg" v-loading="loading || deptNameLoad">
-      <el-row type="flex" justify="center">
-        <el-col :xs="22" :sm="22" :md="24" :lg="12" :xl="10">
-          <div class="title" v-if="type == 1">最新的积分事件<p>最后更新时间:{{lastTime}}</p></div>
-          <div class="title" v-if="type == 2">{{deptName}}{{month}}积分排名<p>最后更新时间:{{lastTime}}</p></div>
-          <marquee style="height: calc(100vh - 106px);" scrollamount="2" scrolldelay="1" align="middle" behavior="scroll" direction="up">
-            <div v-show="type == 2">
-              <el-row  v-for="(item,index) in list" :key="index" class="row">
-                <el-col class="list_name" :span="4">{{item.rank}}</el-col>
-                <el-col :span="10">{{item.employee_name}}</el-col>
-                <el-col class="point" :span="10">{{item.point}}分</el-col>
-              </el-row>
-            </div>
-            <div v-show="type == 1">
-              <el-row  v-for="(item,index) in list" :key="index" class="row">
-                <el-col :span="4">
-                  <center>
-                    <userImage :id="item.employee_id" :user_name="item.employee_name" :img_url="item.employee_img_url" fontSize="1.8" width="80px" height="80px"></userImage>
-                  </center>
-                </el-col>
-                <el-col :span="20">
-                  <p class="integralPersonnel">
-                    <el-row>
-                      <el-col :span="8">{{item.employee_name}}</el-col>
-                      <el-col :span="16">
-                        <span style="margin-left: 30px;" :class="item.point>0?'color_red':'color_green'">{{item.point>0?'+'+item.point:item.point}}分</span>
-                      </el-col>
-                    </el-row>
-                  </p>
-                  <p class="integralDetails">{{item.remark}}</p>
-                </el-col>
-              </el-row>
-            </div>
-          </marquee>
-        </el-col>
-      </el-row>
-    </div>
-  </div>
-</template>
-
-<script>
-  import moment from 'moment'
-  // type  1为积分事件 2为部门排行
-  export default {
-    name: "deptRankSwiper",
-    data() {
-      return {
-        loading: false,
-        deptNameLoad: false,
-        list: [],
-        formData:{},
-        type: 0,
-        month: null,
-        deptName: null,
-        lastTime: null
-      }
-    },
-    methods: {
-      getData(){
-        let self = this
-        self.loading = true
-        let data = this.formData
-        delete data.type
-		var url=self.type == 1? '/api/integral/statistics/integral' : '/api/integral/statistics/ranking';
-        var str=self.type == 1? 'plain':'v2'
-		self.$axios('get',url,data,str).then((res) => {
-          if (res.data.code == 1) {
-            self.lastTime = this.$moment().format('YYYY-MM-DD HH:mm:ss')
-            self.list = res.data.data.list
-          }else{
-            self.$message.error(res.data.data.msg)
-          }
-        }).finally(()=>{
-          self.loading = false
-        })
-      },
-      getDeptName(id){
-        let self = this
-        if (id !== '0') {
-          self.deptNameLoad = true
-          self.$axios("get",'/api/department/info',{id: id}).then((res) => {
-            if (res.data.code == 1) {
-              self.deptName = res.data.data.name
-            }else{
-              self.$message.error(res.data.data.msg)
-            }
-          }).finally(()=>{
-            self.deptNameLoad = false
-          })
-        }else{
-          self.deptName = '全公司'
-        }
-      }
-    },
-    mounted() {
-      this.formData = this.$route.query
-      this.type = this.$route.query.type
-      this.$route.query.month?this.month = moment(this.$route.query.month).format('YYYY年MM月'):''
-	  this.$route.query.dept_name? this.deptName=this.$route.query.dept_name:''
-      this.getData()
-      setInterval(() => {
-        this.getData()
-      }, parseInt(Math.random()*(1800000-1200000+1)+1200000,10));
-    },
-    created() {},
-  }
-</script>
-
-<style scoped lang="scss">
-  .swiperBg{
-    background-color: black;
-    color: #fff;
-    position: fixed;
-	left: 0;
-	right: 0;
-	bottom: 0;
-	top:0;
-    font-size: 3rem;
-    .title{
-      font-size: 40px;
-      text-align: center;
-      margin: 20px 0;
-      p{
-        font-size: 16px;
-      }
-    }
-    .row{
-      margin-bottom: .6em;
-      .el-col-10{
-        overflow: hidden;
-        white-space: nowrap;
-        text-overflow: ellipsis;
-      }
-      .list_name{
-        text-align: center;
-      }
-      .point{
-        text-align: center;
-      }
-      .integralDetails{
-        font-size: .6em; 
-        margin: 0; 
-        display: -webkit-box;
-        text-overflow: ellipsis;
-        overflow : hidden;
-        -webkit-line-clamp: 2;
-        -webkit-box-orient: vertical;
-      }
-      .integralPersonnel{
-        font-size: .8em; 
-        margin: 0; 
-        margin-bottom: 15px;
-      }
-    }
-  }
-  .color_red{
-    color: red;
-  }
-  .color_green{
-    color:green
-  }
-</style>

+ 0 - 669
src789/views/ranking/dept_rank.vue

@@ -1,669 +0,0 @@
-<template>
-	<div>
-		<div class="diy_tip_bg" v-show="tips_show">
-			<el-alert class="diy-tip" @close="tips_close" type="success" description><p>排名不包含初始分和工龄分</p></el-alert>
-		</div>
-		<div class="all" style="padding: 20px;">
-			<el-form :inline="true">
-				<el-form-item label="时间">
-					<el-col :span="8">
-						<el-select  size="medium" v-model="time_type" placeholder="请选择分类" style="width: 100px;">
-							<el-option v-for="item in time_types" :key="item.label" :label="item.label" :value="item.value"></el-option>
-						</el-select>
-					</el-col>
-					<el-col :span="16">
-						<el-date-picker
-						   size="medium"
-							v-show="time_type == '2'"
-							v-model="export_from.year"
-							class="date-picker-width"
-							type="year"
-							value-format="yyyy"
-							placeholder="选择年份排名"
-						></el-date-picker>
-						<el-date-picker
-						     size="medium"
-							v-show="time_type == '1' || time_type == '月份'"
-							v-model="export_from.month"
-							class="date-picker-width"
-							type="month"
-							value-format="yyyy-MM"
-							placeholder="选择月份排名"
-						></el-date-picker>
-						<season v-if="time_type == '3'" :isActive="true" class="date-picker-width" @confirm="export_quarter_confirm"></season>
-					</el-col>
-				</el-form-item>
-				<el-form-item label="部门">
-					<el-cascader
-					    size="medium"
-						class="date-picker-width"
-						v-model="dept_name"
-						:options="dept_tree"
-						:props="{ checkStrictly: true,value:'id',label:'name',children:'_child'}"
-						ref="dept"
-						clearable
-						filterable
-						placeholder="全公司"
-					></el-cascader>
-					<!-- 这是选部门多选。如果更改需求用这个: -->
-					<!-- <el-cascader
-						v-model="dept_name"
-						:options="dept_tree"
-						:props="{ multiple: true, checkStrictly: true }"
-						class="date-picker-width"
-						ref="dept"
-						clearable
-						collapse-tags
-						placeholder="全公司"
-					  ></el-cascader>-->
-				</el-form-item>
-				<el-form-item label="谁不参与排名">
-					<el-select v-model="formData.exclusion"  size="medium"  multiple filterable collapse-tags placeholder="请选择员工">
-						<el-option v-for="item in employee_map" :key="item.id" :label="item.name" :value="item.id"></el-option>
-					</el-select>
-				</el-form-item>
-<!-- 				<el-form-item label="规则分类">
-					<el-cascader
-					   size="medium"
-						class="date-picker-width"
-						v-model="rule_id"
-						:options="rule_trees"
-						:props="props"
-						ref="rule"
-						clearable
-						collapse-tags
-						placeholder="请选择规则分类"
-					></el-cascader>
-				</el-form-item> -->
-			  <el-form-item label="积分分类">
-				  <el-select class="date-picker-width" size="medium" v-model="formData.pt_id" clearable placeholder="请选择积分分类">
-				  	<el-option v-for="item in point_types" :key="item.name" :label="item.name" :value="item.id"></el-option>
-				  </el-select>
-			  </el-form-item>
-				<el-form-item label="人员">
-					<el-select  size="medium" v-model="formData.position" style="width:150px" placeholder="请选择">
-						<el-option v-for="item in positions" :key="item.id" :label="item.name" :value="item.age"></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item>
-					<el-checkbox v-model="sort" size="medium" label="排名由低到高" border></el-checkbox>
-					<el-button type="primary"  size="medium" @click="selectBtn" style="margin-left:20px">查询</el-button>
-				</el-form-item>
-				<el-form-item>
-					<el-button type="primary"  size="medium" plain @click="dialogVisible = true">导出排名</el-button>
-					<!-- <el-button type="primary"  size="medium" plain @click="byRanking('byRankingData')">轮播排名</el-button> -->
-				</el-form-item>
-			</el-form>
-			<el-table :data="list" style="width: 100%" v-loading="loading">
-				<el-table-column label="名次" width="80" align="center">
-					<template slot-scope="scope">
-						<img v-if="scope.row.rank === 1" src="@/assets/image/statistics_NO1.png" alt="" />
-						<img v-if="scope.row.rank === 2" src="@/assets/image/statistics_NO2.png" alt="" />
-						<img v-if="scope.row.rank === 3" src="@/assets/image/statistics_NO3.png" alt="" />
-						<span v-if="scope.row.rank > 3">{{ scope.row.rank }}</span>
-					</template>
-				</el-table-column>
-				<el-table-column label="姓名" align="left">
-					<template slot-scope="scope">
-							<div class="flex-box">
-								<userImage	class="fl" :user_name="scope.row.employee_name"	:img_url="scope.row.employee_img_url" width="50px" height="50px"></userImage>
-								<span style="line-height: 50px; padding-left: 10px;">{{ scope.row.employee_name }}</span>
-							</div>
-					</template>
-				</el-table-column>
-				<el-table-column :label="labelName" align="left" prop="point"></el-table-column>
-				<template slot="empty">
-					<div class="nopoint_box">
-						<div class="noimg noperson"></div>
-						<span class="title">没有对应的数据</span>
-					</div>
-				</template>
-			</el-table>
-			<center style="padding: 20px 0;">
-				<el-pagination
-					background
-					@size-change="handleSizeChange"
-					@current-change="handleCurrentChange"
-					:page-sizes="[10, 20, 30, 40, 50, 100]"
-					layout="total, sizes, prev, pager, next"
-					:page-size="formData.page_size"
-					:total="total"
-				></el-pagination>
-			</center>
-		</div>
-		<!-- 导出弹窗 -->
-		<el-dialog title="导出排名" :visible.sync="dialogVisible" width="730px" top="10%">
-			<span style="font-size:15px">系统将按以下已选条件导出对应的排名报表</span>
-			<el-form :inline="true">
-				<div class="picker_er">
-					<el-form-item label="时间">
-						<el-date-picker
-							v-model="Dc_Data.value1"
-							type="daterange"
-							 size="medium"
-							value-format="yyyy-MM-dd"
-							format="yyyy-MM-dd"
-							range-separator="至"
-							start-placeholder="开始日期"
-							end-placeholder="结束日期"
-						></el-date-picker>
-					</el-form-item>
-
-					<el-form-item label="人员" style="margin-left:30px">
-						<el-select  size="medium" v-model="Dc_Data.DC_position" style="width:150px" placeholder="请选择">
-							<el-option v-for="item in positions" :key="item.id" :label="item.name" :value="item.age"></el-option>
-						</el-select>
-					</el-form-item>
-				</div>
-				<el-form-item label="部门">
-					<el-cascader
-						class="date-picker-width cascader_bm"
-						v-model="Dc_Data.dept_name"
-						:options="dept_tree"
-						:props="{ checkStrictly: true,value:'id',label:'name',children:'_child'}"
-						ref="dept2"
-						size="medium"
-						clearable
-						filterable
-						placeholder="全公司"
-					></el-cascader>
-				</el-form-item>
-				<el-form-item label="规则分类" style="margin-left:20px">
-					<el-cascader
-						class="date-picker-width"
-						v-model="Dc_Data.rule_id"
-						:options="rule_trees"
-						:props="props"
-						 size="medium"
-						ref="rule"
-						clearable
-						collapse-tags
-						placeholder="请选择规则分类"
-					></el-cascader>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="dialogVisible = false"  size="medium">取 消</el-button>
-				<el-button type="primary" @click="exportExcel"  size="medium">导 出</el-button>
-			</span>
-		</el-dialog>
-
-		<!-- 轮播弹窗 -->
-		<el-dialog title="轮播排名" :visible.sync="byRankingShow" width="500px" top="10%">
-			<div>
-				<el-form :inline="true" ref="byRankingData" :model="byRankingData" :rules="byRankingDataRules" label-width="90px">
-					<el-form-item label="月份" prop="month">
-						<el-date-picker v-model="byRankingData.month"  size="medium" class="date-picker-width" type="month" value-format="yyyy-MM" placeholder="选择月份排名"></el-date-picker>
-					</el-form-item>
-					<el-form-item label="选择部门" prop="dept_id">
-						<el-cascader
-						    size="medium"
-							class="date-picker-width"
-							v-model="byRankingData.dept_id"
-							:options="dept_tree"
-							:props="{ checkStrictly: true,value:'obj',label:'name',children:'_child'}"
-							ref="dept1"
-							clearable
-							filterable
-							placeholder="全公司"
-						></el-cascader>
-					</el-form-item>
-					<el-form-item label="人员范围" prop="position">
-						<el-radio-group  size="medium" v-model="byRankingData.position">
-							<el-radio label="all">管理者和员工</el-radio>
-							<el-radio label="manager">只看管理者</el-radio>
-							<el-radio label="employee">只看员工</el-radio>
-						</el-radio-group>
-					</el-form-item>
-				</el-form>
-			</div>
-			<span slot="footer">
-				<el-button @click="byRankingShow = false"  size="medium">取 消</el-button>
-				<el-button type="primary" @click="swiperPage('byRankingData')"  size="medium">开始轮播</el-button>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-<script>
-import moment from 'moment';
-import season from '@/components/season';
-export default {
-	data() {
-		return {
-			Dc_Data: {
-				//导出数据
-				value1: '', //时间
-				DC_position: '全部', //人员
-				dept_name: [], //部门
-				rule_id: [] //规则
-			},
-			dialogVisible: false,
-			dept_name: [],
-			dept_tree: [],
-			loading: false,
-			formData: {
-				dept_id: '0',
-				sort: 'DESC',
-				pt_id: 3,
-				time_type: 1,
-				exclusion: [],
-				page: 1,
-				rule_id: [],
-				page_size: 10,
-				position: 0 //部门多选删除这个
-			},
-			total: null,
-			rule_trees: null,
-			rule_id: null,
-			list: null,
-			point_types:[],
-			point_type: [],
-			sort: false,
-			time_types: [{ label: '月份', value: '1' }, { label: '年份', value: '2' }, { label: '季度', value: '3' }],
-			props: { value: 'id', label: 'name', children: 'child', multiple: true },
-			time_type: '月份',
-			export_from: {
-				year: '',
-				month: moment().format('YYYY-MM'),
-				quarter: ''
-			},
-			employee_map: JSON.parse(localStorage.getItem('SET_EMPLOYEE_MAP')),
-			positions: [{ id: 0, age: 'all', name: '全部' }, { id: 1, age: 'manager', name: '管理者' }, { id: 2, age: 'employee', name: '员工' }],
-			tips_show: false,
-			byRankingShow: false,
-			byRankingData: {
-				month: '',
-				dept_id: '',
-				position: 'all'
-			},
-			byRankingDeptId: '',
-			byRankingDataRules: {
-				month: [{ required: true, message: '请选择月份', trigger: 'blur' }],
-				dept_id: [{ required: true, message: '请选择部门', trigger: 'change' }],
-				position: [{ required: true, message: '请选择人员范围', trigger: 'change' }]
-			},
-			labelName:'B分',
-		};
-	},
-	watch: {
-		sort(val) {
-			if (val) {
-				this.formData.sort = 'ASC';
-			} else {
-				this.formData.sort = 'DESC';
-			}
-		},
-		dept_name(val) {
-			if (val.length !== 0) {
-				// 这是选部门多选。如果更改需求用这个:
-				// let dept_id = [];
-				// for (var i in val) {
-				//   dept_id.push(val[i][0]);
-				// }
-				// console.log(dept_id);
-				// this.formData.dept_id = dept_id;//传入选中的部门ID,是数组
-				this.formData.dept_id = val[val.length - 1];
-			} else {
-				this.formData.dept_id = 0;
-			}
-			this.$nextTick(() => {
-				this.$refs.dept.dropDownVisible = false;
-				this.getEmployeeList();
-			});
-		},
-		'byRankingData.dept_id'(val) {
-			this.$refs.dept1.dropDownVisible = false;
-		},
-		'Dc_Data.dept_name': function(val) {
-			this.$refs.dept2.dropDownVisible = false;
-		},
-		rule_id(val) {
-			if (val.length !== 0) {
-				this.formData.rule_id = [];
-				val.forEach((element, index) => {
-					this.formData.rule_id.push(element[element.length - 1]);
-				});
-			} else {
-				this.formData.rule_id !== undefined ? delete this.formData.rule_id : '';
-			}
-		}
-	},
-	components: { season },
-	methods: {
-		// 轮播页面跳转
-		swiperPage(formName) {
-			this.$refs[formName].validate(valid => {
-				if (valid) {
-					var { href } = this.$router.resolve({
-						path: '/deptRankSwiper',
-						query: {
-							month: this.byRankingData.month || 0,
-							type: '2',
-							position: this.byRankingData.position,
-							dept_id: this.byRankingData.dept_id[0].id,
-							dept_name:this.byRankingData.dept_id[0].name,
-							pt_id: 3
-						}
-					});
-					window.open(href);
-				}
-			});
-		},
-		// 轮播排名弹窗
-		byRanking() {
-			this.byRankingData={
-				month: '',
-				dept_id: '',
-				position: 'all'
-			},
-			this.byRankingShow = true;	
-		},
-		// 提示信息
-		tips_close() {
-			localStorage.setItem('dept_rank_tips', 'true');
-			this.tips_show = false;
-		},
-		// 查询
-		selectBtn() {
-			switch (this.time_type) {
-				case '1':
-					this.$set(this.formData, 'month', this.export_from.month);
-					this.formData.month ? '' : delete this.formData.month;
-					break;
-				case '2':
-					this.$set(this.formData, 'year', this.export_from.year);
-					this.formData.year ? '' : delete this.formData.year;
-					break;
-				case '月份':
-					this.$set(this.formData, 'month', this.export_from.month);
-					this.formData.month ? '' : delete this.formData.month;
-					break;
-				case '3':
-					this.$set(this.formData, 'quarter', this.export_from.quarter);
-					this.formData.quarter ? '' : delete this.formData.quarter;
-					break;
-				default:
-					break;
-			}
-			
-			let data = JSON.parse(JSON.stringify(this.formData));
-			var employee_ids =data.exclusion.join(',');
-			data.exclusion=employee_ids;
-			data.page = 1;
-			data.page_size = 10;
-			this.$nextTick(() => {
-				this.get_list(data);
-			});
-		},
-		// 页面变更
-		handleCurrentChange(val) {
-			this.formData.page = val;
-			this.get_list(this.formData);
-		},
-		handleSizeChange(val) {
-			this.formData.page_size = val;
-			this.get_list(this.formData);
-		},
-		// 选择时间
-		export_quarter_confirm(val) {
-			this.export_from.quarter = val;
-		},
-		//请求数据
-		get_list(data, bool) {
-			if (this.time_type == 1) {
-				delete data.year;
-				delete data.quarter;
-			} else if (this.time_type == 2) {
-				delete data.month;
-				delete data.quarter;
-			} else if (this.time_type == '月份') {
-				delete data.year;
-				delete data.quarter;
-			} else if (this.time_type == 3) {
-				delete data.month;
-				delete data.year;
-			}
-			if (bool) {
-				data.month = moment().format('YYYY-MM');
-			}
-			let self = this;
-			self.loading = true;
-			data ? '' : (data = this.formData);
-			
-			data.position = data.position == 'manager' ? 'manager' : data.position == 'employee' ? 'employee' : 'all';
-			self.$axios('get','/api/integral/statistics/ranking',data,'v2').then(res => {
-				this.labelName=this.formData.pt_id==2? 'A分':'B分';
-				if (res.data.code == 1) {
-					self.list = res.data.data.list;
-					self.total = res.data.data.total;
-				} else {
-					self.$message.error(res.data.data.msg);
-				}
-			})
-			.finally(() => {
-				self.loading = false;
-			});
-		},
-		// 获取积分规则
-		get_rule_tree() {
-			this.$axios('get','/api/integral/rule/trees',{ cycle_type: '1'}).then(res => {
-				this.rule_trees =this.getRuleTreeData(res.data.data.rule_tree);
-			});
-		},
-		// 规则递归 children
-		getRuleTreeData(data) {
-			for (var i = 0; i < data.length; i++) {
-				if (data[i].child.length < 1) {
-					// children若为空数组,则将children设为undefined
-					data[i].child = undefined;
-				} else {
-					// children若不为空数组,则继续 递归调用 本方法
-					this.getRuleTreeData(data[i].child);
-				}
-			}
-			return data;
-		},
-		// 递归判断列表,把最后的children设为undefined
-		getTreeData(data) {
-			for (var i = 0; i < data.length; i++) {
-				data[i].obj={id:data[i].id,name:data[i].name};
-				if (data[i]._child.length < 1) {
-					// children若为空数组,则将children设为undefined
-					data[i]._child = undefined;
-				} else {
-					// children若不为空数组,则继续 递归调用 本方法
-					this.getTreeData(data[i]._child);
-				}
-			}
-			return data;
-		},
-		getEmployeeList() {
-			let self = this;
-			self.$axios('get','/api/employee/list',{ dept_id: self.formData.dept_id }).then(res => {
-				if (res.data.code == 1) {
-					this.employee_map = res.data.data.list;
-				} else {
-					self.$message.error(res.data.data.msg);
-				}
-			})
-		},
-
-		exportExcel() {
-			//人员
-			this.Dc_Data.DC_position =this.Dc_Data.DC_position == 'manager' ? 'manager' : this.Dc_Data.DC_position == 'employee' ? 'employee' : this.Dc_Data.DC_position == '全部' ? 'all' : 'all';
-			//部门
-			let dept_name;
-			for (let i in this.Dc_Data.dept_name) {
-				dept_name = this.Dc_Data.dept_name[i];
-			}
-			this.Dc_Data.dept_name = dept_name;
-			//规则
-			let rule_id = [];
-			for (let i in this.Dc_Data.rule_id) {
-				for (let a in this.Dc_Data.rule_id[i]) {
-					rule_id.push(this.Dc_Data.rule_id[i][a]);
-				}
-			}
-			this.Dc_Data.rule_id = rule_id;
-			let data = '';
-			if (this.Dc_Data.value1) {
-				data += '&start_date=' + this.Dc_Data.value1[0];
-				data += '&end_date=' + this.Dc_Data.value1[1];
-			}
-			data += '&position=' + this.Dc_Data.DC_position;
-			this.Dc_Data.dept_name > 0 ? (data += '&dept_id=' + this.Dc_Data.dept_name) : (data += '&dept_id=0');
-			if (this.Dc_Data.rule_id.length > 0) {
-				data += '&rule_id=' + this.Dc_Data.rule_id;
-			}
-			window.open(process.env.VUE_APP_BASE_API + 'api/download/ranking/v2?pt_id='+this.formData.pt_id+'&employee_id='+this.$getUserData().id+ data, '_blank');
-			this.dialogVisible = false;
-		},
-		//获取部门
-		getDepartment() {
-			this.$axios('get','/api/department/tree').then(res => {
-				this.dept_tree =this.getTreeData(res.data.data.list);
-			});
-		},
-	},
-	mounted() {
-		this.point_types=this.$getTyps().slice(1);
-		this.tips_show = JSON.parse(localStorage.getItem('dept_rank_tips')) ? false : true;
-		this.getDepartment();
-		this.getEmployeeList();
-		this.get_list(this.formData, true);
-		this.get_rule_tree();
-	}
-};
-</script>
-<style scoped lang="scss">
-.search_box {
-	::v-deep button:active {
-		background: #26a2ff;
-	}
-	::v-deep button:active .el-icon-search {
-		color: #fff;
-	}
-}
-.date-picker-width {
-	width: 100% !important;
-}
-.color_green {
-	color: #67c23a;
-}
-.nopoint_box {
-	display: inline-block;
-	text-align: center;
-	width: 100%;
-	margin-bottom: 10px;
-}
-.noimg {
-	display: inline-block;
-	width: 110px;
-	height: 110px;
-	margin: 22px auto 16px;
-	/* background:url("/static/images/nodata_default.png") no-repeat center; */
-	background-size: 99%;
-}
-.noperson {
-	display: inline-block;
-	width: 110px;
-	height: 110px;
-	line-height: none;
-	margin: 22px auto 16px;
-	background: url('/static/images/noperson_default.png') no-repeat center;
-	background-size: 99%;
-}
-.title {
-	display: block;
-	text-align: center;
-	font-size: 12px !important;
-	line-height: 30px;
-	color: #909399 !important;
-	padding: 0;
-}
-.nopoint_box a {
-	color: #26a2ff;
-}
-.chart_content {
-	.chart-legend__wrap {
-		text-align: right;
-		padding: 20px;
-		padding-right: 50px;
-		& .chart-legend__pink {
-			position: relative;
-			padding-left: 12px;
-			padding-right: 5px;
-			&:after {
-				content: '';
-				position: absolute;
-				margin-top: -2px;
-				top: 35%;
-				left: 0;
-				width: 8px;
-				height: 8px;
-				background: #f56c6c;
-				border-radius: 100%;
-			}
-		}
-
-		& .chart-legend__green {
-			position: relative;
-			padding-left: 12px;
-			&:after {
-				content: '';
-				position: absolute;
-				margin-top: -2px;
-				top: 35%;
-				left: 0;
-				width: 8px;
-				height: 8px;
-				background: #53b87f;
-				border-radius: 100%;
-			}
-		}
-	}
-}
-.drawer_title {
-	font-size: 18px;
-	padding: 20px;
-}
-.manager_statistics_box {
-	background-color: #ffffff;
-	padding: 20px;
-	min-height: calc(100vh - 160px);
-	::v-deep .el-row .el-checkbox .el-checkbox__label {
-		line-height: 20px;
-	}
-}
-.diy_tip_bg {
-	background: #f5f6f9;
-	overflow: hidden;
-	.diy-tip {
-		margin-bottom: 15px;
-		border: 1px solid #67c23a;
-		padding: 20px 16px;
-		p {
-			color: #67c23a !important;
-			font-size: 14px;
-			margin: 0 !important;
-			padding: 4px 0;
-		}
-	}
-}
-::v-deep .el-dialog {
-	top: 21%;
-}
-.picker_er {
-	margin-top: 20px;
-}
-.el-range-editor--medium.el-input__inner {
-	width: 280px;
-}
-::v-deep .el-cascader .el-input .el-input__inner {
-	width: 150px;
-}
-.el-checkbox.is-bordered.el-checkbox--medium {
-	padding: 9px 20px 7px 10px;
-}
-</style>
-<!--  -->

+ 0 - 24
src789/views/ranking/individual_statistics.vue

@@ -1,24 +0,0 @@
-<template>
-
-</template>
-
-<script>
-export default {
-	name:'individual_statistics',
-	data() {
-		return {
-		};
-	},
-	watch: {},
-	mounted() {
-
-	},
-	methods: {
-
-	}
-};
-</script>
-
-<style scoped="scoped">
-
-</style>

+ 0 - 650
src789/views/ranking/integral_event.vue

@@ -1,650 +0,0 @@
-<template>
-	<div>
-		<div class="all">
-			<el-form ref="form" :inline="true" label-width="80px">
-			  <el-form-item label="规则分类">
-			    <el-cascader
-			    	class="date-picker-width"
-			    	v-model="rule"
-			    	:options="rule_trees"
-			    	:props="props"
-			    	@change="rule_null"
-					size="medium"
-			    	ref="rule"
-			    	clearable
-			    	placeholder="全部规则分类"
-			    ></el-cascader>
-			  </el-form-item>
-			  <el-form-item label="积分分类">
-				  <el-select class="date-picker-width" size="medium" v-model="formData.pt_id" clearable placeholder="请选择积分分类">
-				  	<el-option v-for="item in point_types" :key="item.name" :label="item.name" :value="item.id"></el-option>
-				  </el-select>
-			  </el-form-item>
-			  <el-form-item label="部门">
-				  <el-cascader
-				    size="medium"
-				  	class="date-picker-width"
-				  	v-model="dept_name"
-				  	:options="dept_tree"
-				  	:props="{ checkStrictly: true,value:'id',label:'name',children:'_child'}"
-				  	ref="dept"
-				  	clearable
-				  	filterable
-				  	placeholder="全公司"
-				  ></el-cascader>
-			  </el-form-item>
-			  <el-form-item label="时间" style="margin-top: 1px;">
-				  <el-date-picker
-				  	v-model="time_slot"
-				  	type="daterange"
-					size="medium"
-				  	value-format="yyyy-MM-dd"
-				  	range-separator="至"
-				  	start-placeholder="开始日期"
-				  	end-placeholder="结束日期"
-				  ></el-date-picker>
-			  </el-form-item>
-			  <el-form-item style="margin-top: 2px;">
-				  <el-input size="medium" v-model="formData.keyword" placeholder="输入同事姓名" max="200" @keyup.enter.native="keyWordSelect" class="persons_name">
-				  	<el-button size="medium" slot="append" icon="el-icon-search" @click="keyWordSelect"></el-button>
-				  </el-input>
-			  </el-form-item>
-			  <el-form-item>
-				  <el-button type="success" size="medium" @click="excelImportShow = true" plain>导入数据</el-button>
-				  <el-button type="primary" size="medium" @click="exportExcel" plain>导出当前数据</el-button>
-				  <!-- <el-button type="primary" size="medium" plain @click="swiperShow = true">轮播事件</el-button> -->
-			  </el-form-item>
-			</el-form> 
-			 <!-- 表格 -->
-			<div>
-				<el-table :data="list" style="width: 100%" v-loading="loading" @row-click="open_detail">
-					<el-table-column prop="employee_name" label="姓名" align="left" width="200px">	
-						<template slot-scope="scope">
-							<div class="flex-box">
-								<userImage	class="fl" :user_name="scope.row.employee_name"	:img_url="scope.row.employee_img_url" width="50px" height="50px"></userImage>
-								<span style="line-height: 50px; padding-left: 10px;">{{ scope.row.employee_name }}</span>
-							</div>
-						</template>
-					</el-table-column>
-					<el-table-column prop="dept" label="部门" align="left" width="200px"></el-table-column>
-					<el-table-column prop="point" label="积分" align="left" width="80px">
-						<template slot-scope="scope">
-							<span :class="scope.row.point < 0 ? 'color_green' : 'color_red'">{{ scope.row.point }} {{ point_name(scope.row.pt_id) }}</span>
-						</template>
-					</el-table-column>
-					<el-table-column prop="remark" show-overflow-tooltip label="事件" align="left"></el-table-column>
-					<el-table-column prop="source_type" label="来源" align="left" width="120px">
-						<template slot-scope="scope">
-							<span v-show="scope.row.source_type == 1">积分录入</span>
-							<span v-show="scope.row.source_type == 2">任务</span>
-							<span v-show="scope.row.source_type == 3">积分系统分配</span>
-							<span v-show="scope.row.source_type == 4">考勤系统分配</span>
-							<span v-show="scope.row.source_type == 5">积分申请</span>
-							<span v-show="scope.row.source_type == 6">绩效任务包</span>
-							<span v-show="scope.row.source_type > 6">其他</span>
-						</template>
-					</el-table-column>
-					<el-table-column prop="create_time" label="录入时间" align="left" width="110px">
-						<template slot-scope="scope">
-							{{ cuttString(scope.row.create_time) }}
-						</template>
-					</el-table-column>
-				
-					<template slot="empty">
-						<noData></noData>
-					</template>
-				</el-table>
-				<center class="pagination">
-					<el-pagination
-						background
-						@size-change="handleSizeChange"
-						@current-change="handleCurrentChange"
-						:current-page="formData.page"
-						:page-sizes="[10, 20, 30, 40, 50, 100]"
-						layout="total, sizes, prev, pager, next"
-						:page-size="pageLimit"
-						:total="total"
-					></el-pagination>
-				</center>
-			</div>
-		</div>
-		<el-drawer title="事件详情" :visible.sync="detail_popup" ref="drawer" :with-header="false" :width="'500px'" direction="rtl">
-			<div class="drawer_title">事件详情</div>
-			<div class="detail_popup" v-loading="detail_loading" v-if="detail_info !== null">
-				<el-row style="padding-bottom:10px;border-bottom:1px #f8f8f8 solid;">
-					<div class="flex-box flex-v-ce">
-						<userImage :user_name="detail_info.employee_name" class="fl" width="50px" height="50px" fontSize="1"></userImage>
-						<span style="font-size: 18px;line-height:50px; margin-left:10px;margin-right:4px;">{{ detail_info.employee_name }}</span>
-						<span class="color_red point" v-show="detail_info.point >= 0">+{{ detail_info.point }} {{ point_name(detail_info.pt_id) }}</span>
-						<span class="color_green point" v-show="detail_info.point < 0">{{ detail_info.point }} {{ point_name(detail_info.pt_id) }}</span>
-					</div>
-				</el-row>
-
-				<el-row>
-					<el-col :span="6">任务描述</el-col>
-					<el-col :span="18" v-if="detail_info.remark">{{ detail_info.remark && (detail_info.remark.customize || detail_info.remark.rule) }}</el-col>
-				</el-row>
-
-				<el-row>
-					<el-col :span="6">规则分类</el-col>
-					<el-col :span="18">{{ detail_info.rule_list }}</el-col>
-				</el-row>
-
-				<el-row v-show="detail_info.rule_list">
-					<el-col :span="6">事件时间</el-col>
-					<el-col :span="18">{{ detail_info.date }}</el-col>
-				</el-row>
-
-				<el-row v-show="detail_info.source_type_mark">
-					<el-col :span="6">来源类型</el-col>
-					<el-col :span="18">{{ detail_info.source_type_mark }}</el-col>
-				</el-row>
-
-				<el-row v-show="!detail_info.rule_id">
-					<el-col :span="6">记录人</el-col>
-					<el-col :span="18">{{ detail_info.employee_name }}</el-col>
-				</el-row>
-
-				<el-row v-show="detail_info.files !== null && detail_info.files.length > 0">
-					<el-col :span="6">图片</el-col>
-					<el-col :span="18"><el-image style="width: 100px; height: 100px" :src="detail_info.files[0]" :preview-src-list="detail_info.files"></el-image></el-col>
-				</el-row>
-
-				<div v-show="detail_info.rule_id">
-					<p class="row_title">规则依据</p>
-					<el-row>
-						<el-col :span="6">规则分类</el-col>
-						<el-col :span="18">{{ detail_info.rule_list }}</el-col>
-					</el-row>
-					<el-row v-show="detail_info.remark.rule">
-						<el-col :span="6">积分规则</el-col>
-						<el-col :span="18">{{ detail_info.remark.rule }}</el-col>
-					</el-row>
-					<el-row>
-						<el-col :span="6">积分</el-col>
-						<el-col :span="18" v-show="detail_info.rule_item.min_point == detail_info.rule_item.max_point">{{ detail_info.rule_item.min_point }}</el-col>
-						<el-col :span="18" v-show="detail_info.rule_item.min_point != detail_info.rule_item.max_point">
-							{{ detail_info.rule_item.min_point }} ~ {{ detail_info.rule_item.max_point }}
-						</el-col>
-					</el-row>
-				</div>
-
-				<div v-show="detail_info.rule_id">
-					<p class="row_title">
-						审批
-						<span class="row_tips">多人审批时,以最后一人为准</span>
-					</p>
-					<div class="examine_steps">
-						<el-steps direction="vertical" :space="50">
-							<el-step v-for="(item, index) in detail_info.process" :key="index" style="margin-bottom: 5px;">
-								<template slot="icon">
-									<userImage width="36px" height="36px" :img_url="item.img_url" :user_name="item.name"></userImage>
-								</template>
-								<template slot="title">
-									<div style="color: #303133;font-size:14px;margin-top:-2px;">
-										{{ item.name }} {{ item.remark }}
-										<strong v-show="item.point !== 0" style="font-weight: 500;">
-											<span class="color_red point" v-show="item.point >= 0">+{{ item.point }}</span>
-											<span class="color_green point" v-show="item.point < 0">{{ item.point }}</span>
-										</strong>
-									</div>
-								</template>
-								<template slot="description" style="">
-									{{ item.time }}
-								</template>
-							</el-step>
-						</el-steps>
-					</div>
-				</div>
-				<div style="position: absolute; bottom: 20px; display: block; right: 20px;">
-					<el-button @click="close_integral_event">取消</el-button>
-					<el-button type="danger" @click="del_integral_event(detail_info)">删除</el-button>
-				</div>
-			</div>
-		</el-drawer>
-
-		<!-- 导入数据 -->
-		<el-dialog title="导入积分事件数据" width="600px" :visible.sync="excelImportShow" :close-on-click-modal="false" :before-close="close_import">
-			<div style="padding:0 50px;">
-				<div class="flex-box flex-v-ce margin-bottom">
-					<div style="margin-right: 10px;">1、下载积分事件模版,批量录入积分事件</div>
-					<el-button size="medium" type="primary" @click="downloadTemplate"  plain>下载模板</el-button>
-				</div>
-				<div class="margin-bottom">
-					<el-upload  
-					:limit="1" 
-					:headers="ATOKEN" 
-					ref="upload" 
-					:action="action" 
-					:on-remove="handleRemove"
-					:on-success="handlePictureCardPreview" 
-					:file-list="fileList"
-					:before-upload="beforeFilesUpload">
-						<p>2、上传积分事件数据Excel表<el-button  style="margin-left: 10px;" size="medium" type="primary" plain>选择文件</el-button></p>
-					</el-upload>
-				</div>
-				<!-- <div>3、选择文件后点击下方【上传】按钮</div> -->
-			</div>
-			<div slot="footer" class="dialog-footer">
-				<el-button @click="close_import"  size="medium">取 消</el-button>
-				<!-- <el-button type="primary" @click="uploadFile()"  size="medium" :loading="update_btn">上传</el-button> -->
-			</div>
-		</el-dialog>
-
-		<el-dialog title="导入错误信息" :visible.sync="importErrorInfoShow" width="30%">
-			<div>
-				<el-table :data="error_list" border stripe>
-					<el-table-column prop="name" label="错误信息">
-						<template slot-scope="scope">
-							{{ scope.row }}
-						</template>
-					</el-table-column>
-				</el-table>
-			</div>
-			<span slot="footer"><el-button type="primary"  size="medium" @click="importErrorInfoShow = false">确 定</el-button></span>
-		</el-dialog>
-
-		<el-dialog title="轮播事件" :visible.sync="swiperShow" width="500px">
-			<div>
-				<el-row>
-					<el-col :span="5" style="line-height: 36px;">仅展示最新的</el-col>
-					<el-col :span="6">
-						<el-select v-model="page_size" placeholder="请选择">
-							<el-option v-for="item in swiperPageList" :key="item.value" :label="item.value" :value="item.value"></el-option>
-						</el-select>
-					</el-col>
-					<el-col :span="6" style="line-height: 36px;">条积分事件来轮播</el-col>
-				</el-row>
-			</div>
-			<span slot="footer">
-				<el-button  size="medium" @click="swiperShow = false" style="margin-right: 10px;">取 消</el-button>
-				<router-link :to="{ path: '/deptRankSwiper?' + '&page=1&page_size=' + this.page_size + '&type=1' }" target="_blank">
-					<el-button  size="medium" type="primary">开始轮播</el-button>
-				</router-link>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-<script>
-import noData from '@/components/noData';
-export default {
-	data() {
-		return {
-			action:process.env.VUE_APP_BASE_API+'api/integral/import',
-			ATOKEN: { 'A-TOKEN': this.$getToken(),'Accept':'application/vnd.test.v2+json' },
-			
-			loading: false,
-			swiperShow: false,
-			swiperPageList: [{ value: '10' }, { value: '30' }, { value: '50' }],
-			page_size: 10,
-			point_types: this.$getTyps(),
-			dept_name: [],
-			dept_tree: [],
-			formData: {
-				page: 1,
-				page_size: 10
-			},
-			time_slot: null,
-			rule_trees: [],
-			props: {checkStrictly: true, value: 'id', label: 'name', children: 'child' },
-			rule: [],
-			list: [],
-			total: null,
-			detail_info: null,
-			detail_popup: false,
-			detail_loading: false,
-			pageLimit: 10,
-			excelImportShow: false,
-			update_btn: false,
-			error_list: [],
-			importErrorInfoShow: false,
-			fileList: [],
-		};
-	},
-	components: { noData },
-	created() {},
-	mounted() {
-		this.getDepartment();
-		this.get_rule_trees();
-		this.get_integral_list(this.formData);
-	},
-	watch: {
-		'formData.pt_id'(val, old_val) {
-			this.formData.page = 1;
-			!val ? delete this.formData.pt_id : '';
-			this.get_integral_list(this.formData);
-		},
-		'formData.page'(val, old_val) {
-			this.get_integral_list(this.formData);
-		},
-		time_slot(val, old_val) {
-			this.formData.page = 1;
-			if (val !== null) {
-				this.formData.start_day = val[0];
-				this.formData.end_day = val[1];
-			} else {
-				delete this.formData.start_day;
-				delete this.formData.end_day;
-			}
-			this.get_integral_list(this.formData);
-		},
-		dept_name(val, old_val) {
-			this.formData.page = 1;
-			if (val.length !== 0) {
-				this.formData.dept_ids = val[val.length - 1];
-			} else {
-				this.formData.dept_ids = 0;
-			}
-			this.$nextTick(() => {
-				this.$refs.dept.dropDownVisible = false;
-				this.get_integral_list(this.formData);
-			});
-		}
-	},
-	methods: {
-		handleRemove(file, fileList) {
-			// if (fileList !== null && fileList.length != 0) {
-			// 	this.import_btn_show = true;
-			// } else {
-			// 	this.import_btn_show = false;
-			// }
-		},
-		// 导入相关
-		close_import() {
-			this.excelImportShow = false;
-			this.$refs.upload.clearFiles();
-		},
-		// keyword
-		keyWordSelect() {
-			this.formData.page = 1;
-			this.get_integral_list(this.formData);
-		},
-		downloadTemplate() {
-			window.open(process.env.VUE_APP_BASE_API+'api/download/integral/template',);
-		},
-		uploadFile() {
-			let params = {};
-			params.file = this.file;
-			this.update_btn = true;
-			this.$axios("post",'/api/integral/import', params,'v2').then(res => {
-					if (res.data.code == 1) {
-						if (res.data.data.error.length == 0) {
-							this.$message({ type: 'success', message: '导入成功' });
-							this.excelImportShow = false;
-						} else {
-							this.$message({ type: 'error', message: '导入错误' });
-							this.error_list = res.data.data.error;
-							this.importErrorInfoShow = true;
-						}
-					} else {
-						this.$message({ type: 'error', message: res.data.msg });
-					}
-				}).finally(() => {
-					setTimeout(() => {
-						this.update_btn = false;
-					}, 3000);
-				});
-		},
-		handlePictureCardPreview(response) {
-			if (response.code == 1) {
-				if(response.data.error.length>0){
-					var htmls=response.data.error;
-					var str="<div class='red'></div>";
-					htmls.forEach(item=>{
-						str+=`<div>${item}</div>`;
-					})
-					this.close_import();
-					this.$notify.error({
-					          title: '导入错误',
-					          dangerouslyUseHTMLString: true,
-					          message: str,
-							  duration:0,
-							  offset:50,
-							  customClass:'notifyBox',
-					});
-				}else{
-					this.file = response.data;
-					this.$message.success({ message: response.msg });
-					this.keyWordSelect();
-					this.close_import();
-				}
-			}
-		},
-		beforeFilesUpload(file) {
-			const $ext_list = ['xlsx', 'xls'];
-			let len = file.name.split('.').length - 1;
-			const $ext_name = file.name.split('.')[len];
-			if ($ext_list.indexOf($ext_name) != -1) {
-			} else {
-				this.$message.warning('文件格式上传错误,仅支持上传xlsx,xls)');
-				return false;
-			}
-		},
-		onFilePreView() {},
-		exportExcel() {
-			window.open(process.env.VUE_APP_BASE_API +'api/download/integral?employee_id='+this.$getUserData().id+'&page=' +this.formData.page +
-					'&page_size=' +
-					this.formData.page_size +
-					(this.formData.rule_id ? '&rule_id=' + this.formData.rule_id : '') +
-					(this.formData.pt_id ? '&pt_id=' + this.formData.pt_id : '') +
-					(this.formData.dept_ids ? '&dept_ids=' + this.formData.dept_ids : '') +
-					(this.formData.start_day ? '&start_day=' + this.formData.start_day : '') +
-					(this.formData.end_day ? '&end_day=' + this.formData.end_day : '') +
-					(this.formData.keyword ? '&keyword=' + this.formData.keyword : ''),
-				'_blank'
-			);
-		},
-		// end 文件上传
-		handleSizeChange(val) {
-			this.pageLimit = val;
-			this.formData.page_size = this.pageLimit;
-			this.get_integral_list(this.formData);
-		},
-		cuttString(data) {
-			return data.substring(5);
-		},
-		open_detail(item) {
-			this.detail_popup = true;
-			let data = {
-				event_id: item.id
-			};
-			this.detail_loading = true;
-			this.$axios("get",'/api/integral/statistics/integral/info',data).then(res => {
-					if (res.data.code == 1) {
-						this.detail_info = res.data.data;
-					} else {
-						this.$message.error(res.data.data.msg);
-					}
-				})
-			.finally(() => {
-					this.detail_loading = false;
-			});
-		},
-		//获取部门
-		getDepartment() {
-			this.$axios('get','/api/department/tree').then(res => {
-				this.dept_tree =this.getTreeData(res.data.data.list);
-			});
-		},
-		//获取规则
-		get_rule_trees() {
-			this.$axios('get','/api/integral/rule/trees').then(res => {
-				this.rule_trees =this.getRuleTreeData(res.data.data.rule_tree);
-			});
-		},
-		get_integral_list(data) {
-			this.loading = true;
-			this.$axios('get','/api/integral/statistics/integral',data).then(res => {
-					if (res.data.code == 1) {
-						this.list = res.data.data.list;
-						this.total = res.data.data.total;
-					} else {
-						this.$message.error(res.data.data.msg);
-					}
-				})
-				.finally(() => {
-					this.loading = false;
-				});
-		},
-		handleCurrentChange(val) {
-			this.formData.page = val;
-		},
-		rule_null(val) {
-			if (val.length == 0) {
-				this.formData.rule_id = 0;
-			} else {
-				this.formData.rule_id = this.rule[this.rule.length - 1];
-			}
-			this.$nextTick(() => {
-				this.$refs.rule.dropDownVisible = false;
-				this.get_integral_list(this.formData);
-			});
-		},
-		del_integral_event(item) {
-			this.$confirm('删除事件的同时也会撤销积分,确定删除吗?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			}).then(() => {
-				this.$axios("post",'/api/integral/statistics/integral/destroy',{ event_id: item.event_id }).then(res => {
-						if (res.data.code == 1) {
-							this.$message.success(res.data.msg);
-							this.detail_popup = false;
-							this.get_integral_list(this.formData);
-						} else {
-							this.$message.error(res.data.msg);
-						}
-				})
-			});
-		},
-		close_integral_event() {
-			this.detail_popup = false;
-		},
-		point_name(id) {
-			
-			return this.point_types.find(item => {
-				if (item.id == id) {
-					return item.name;
-				}
-			}).name;
-		},
-		// 递归判断列表,把最后的children设为undefined
-		getTreeData(data) {
-			for (var i = 0; i < data.length; i++) {
-				if (data[i]._child.length < 1) {
-					// children若为空数组,则将children设为undefined
-					data[i]._child = undefined;
-				} else {
-					// children若不为空数组,则继续 递归调用 本方法
-					this.getTreeData(data[i]._child);
-				}
-			}
-			return data;
-		},
-		// 规则递归 children
-		getRuleTreeData(data) {
-			for (var i = 0; i < data.length; i++) {
-				if (data[i].child.length < 1) {
-					// children若为空数组,则将children设为undefined
-					data[i].child = undefined;
-				} else {
-					// children若不为空数组,则继续 递归调用 本方法
-					this.getRuleTreeData(data[i].child);
-				}
-			}
-			return data;
-		},
-	}
-};
-</script>
-<style scoped lang="scss">
-.all{
-	padding: 20px;
-}	
-header.el-drawer__header {
-	font-size: 18px;
-	font-family: MicrosoftYaHei;
-	color: #303133;
-	width: 500px;
-	span {
-		:focus {
-			outline: 0;
-		}
-	}
-}
-.display_flex {
-	display: flex;
-}
-.label {
-	line-height: 36px;
-	padding-right: 10px;
-}
-.time_section {
-	.el-range-editor {
-		width: 330px;
-	}
-}
-.color_green {
-	color: #67c23a;
-}
-.pagination {
-	padding: 20px 0;
-}
-.detail_popup {
-	padding: 20px;
-	height: 100%;
-	.row_title {
-		position: relative;
-		margin: 0 0 20px 0;
-		padding-top: 12px;
-		font-size: 16px;
-		color: #303133;
-		line-height: 22px;
-	}
-	.row_title:before {
-		position: absolute;
-		top: 0;
-		content: ' ';
-		width: 100%;
-		border-top: 1px #f8f8f8 solid;
-	}
-	.el-row {
-		margin-bottom: 10px;
-		font-size: 14px;
-		.el-col-4 {
-			color: #606266;
-		}
-	}
-}
-.color_red {
-	color: #f56c6c;
-}
-.color_green {
-	color: #67c23a;
-}
-span.point {
-	font-size: 16px;
-}
-.drawer_title {
-	font-size: 18px;
-	padding: 20px;
-	border-bottom: 1px #efefef solid;
-}
-.row_tips {
-	display: block;
-	color: #909399;
-	font-size: 12px;
-	margin-top: 0px;
-}
-.el-range-editor--medium .el-range-separator {
-	width: 25px;
-}
-.integral_event_box {
-	background-color: #ffffff;
-	padding: 20px;
-	min-height: calc(100vh - 160px);
-}
-.examine_steps ::v-deep .el-step.is-vertical .el-step__title {
-	padding-bottom: 0;
-}
-</style>

+ 0 - 742
src789/views/ranking/manager_statistics.vue

@@ -1,742 +0,0 @@
-<template>
-  <div>
-    <div class="all wlj">
-      <el-tabs v-model="activeName" type="card"><!-- 奖扣完成情况 -->
-        <el-tab-pane label="奖扣完成情况" name="second">
-          <el-form :model="condition" :inline="true" ref="formData">
-
-			    <!-- 部门 -->
-            <el-form-item label="部门">
-				<el-cascader
-				    size="medium"
-					class="date-picker-width"
-					v-model="dept_name_xq_xq"
-					:options="dept_tree"
-					@change="get_last_dept_null"
-					:props="{ checkStrictly: true,value:'id',label:'name',children:'_child'}"
-					ref="dept"
-					clearable
-					filterable
-					change-on-select
-					placeholder="全公司"
-				></el-cascader>
-            </el-form-item>
-
-			    <!-- 时间 -->
-            <el-form-item label="时间">
-              <el-date-picker
-                class="date-picker-width"
-                v-model="condition.month"
-                clearable
-				size="medium"
-                width="100%"
-                type="month"
-                placeholder="请选择月份"
-                value-format="yyyy-MM"
-              ></el-date-picker>
-            </el-form-item>
-
-			    <!-- 搜索框 -->
-            <el-form-item style="margin-top: 2px;">
-              <el-input
-                v-model="condition.keyword"
-                placeholder="输入同事姓名"
-                max="200"
-				size="medium"
-                @keyup.enter.native="keyWordSelect"
-                class="persons_name"
-              >
-                <el-button slot="append" size="medium" icon="el-icon-search" @click='search_box'></el-button>
-              </el-input>
-            </el-form-item>
-
-			    <!-- 达标选项 -->
-            <br>
-            <el-form-item>
-              <el-checkbox v-model="allPass" size="medium" label="只看全部达标的"></el-checkbox>
-            </el-form-item>
-
-			    <!-- 导出报表 -->
-            <el-form-item>
-              <el-button type="primary" plain @click="exportExcel" size="medium" style="margin-left:20px">导出报表</el-button>
-            </el-form-item>
-
-          </el-form>
-
-		    <el-table :data="last" style="width: 100%" v-loading="loading" >
-            <el-table-column label="管理者">
-              <template slot-scope="scope">
-                <userImage
-                  class="fl"
-                  :id="scope.row.id"
-                  :user_name="scope.row.name"
-                  :img_url="scope.row.img_url"
-                  width="50px"
-                  height="50px"
-                ></userImage>
-                <span
-                  style=" margin-left: 10px; line-height: 50px; display: inline-block;"
-                >{{ scope.row.name }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="奖分" prop="scope_count">
-            <template slot-scope="scope">
-              <b>{{scope.row.reward.point}}&nbsp;</b>
-              <span :class="scope.row.reward.status == 1?'color_green':''">{{scope.row.reward.status==1?'达标':''}}</span><br/>
-              <span class="span_h">奖分目标 {{scope.row.reward.target}}</span>
-            </template>
-            </el-table-column>
-                <el-table-column label="扣分" prop="reward_count">
-            <template slot-scope="scope">
-              <b>{{scope.row.deduction.point}}&nbsp;</b>
-              <span :class="scope.row.deduction.status == 1?'color_green':''">{{scope.row.deduction.status==1?'达标':''}}</span><br/>
-              <span class="span_h">扣分目标 {{scope.row.deduction.target}}</span>
-            </template>
-			      </el-table-column>
-              <el-table-column label="奖扣比例" prop="deduct_count">
-				    <template slot-scope="scope">
-              <div v-if="scope.row.ratio.enable == 1">
-                <b>{{scope.row.ratio.reward_ratio}}&nbsp;:1 </b>
-                <span :class="scope.row.ratio.status == 1?'color_green':''">{{scope.row.ratio.status==1?'达标':''}}</span><br/>
-                <span class="span_h">比例目标 小于 {{scope.row.ratio.target}}<b>:</b>&nbsp;1</span>
-              </div>
-              <div v-else style="padding-left:21px"> —</div>
-            </template>
-            </el-table-column>
-            <el-table-column label="人次目标" prop="deduct_count">
-              <template slot-scope="scope">
-                <b>{{scope.row.exec.count}}&nbsp;</b>
-                <span :class="scope.row.exec.status == 1?'color_green':''">{{scope.row.exec.status==1?'达标':''}}</span><br/>
-                <span class="span_h">人次目标 {{scope.row.exec.target}}人次</span>
-              </template>
-			      </el-table-column>
-            <template slot="empty">
-              <div class="nopoint_box">
-                <div class="noimg noperson"></div>
-                <span class="title">没有对应的数据</span>
-              </div>
-            </template>
-          </el-table>
-
-		  
-
-          <center style="padding: 20px 0;">
-            <el-pagination
-              background
-              @size-change="handleSizeChange_xq"
-              @current-change="handleCurrentChange_xq"
-              :current-page="condition.page"
-              layout="total, sizes, prev, pager, next"
-              :page-size="condition.page_size"
-              :total="totals"
-            ></el-pagination>
-          </center>
-
-        </el-tab-pane>
-        <el-tab-pane label="奖扣执行对比" name="first">
-          <el-form :model="formData" :inline="true" ref="formData">
-            <el-form-item label="部门">
-              <el-cascader
-                v-model="dept_name_xq"
-                :options="dept_tree"
-                @change="dept_null"
-				:props="{ checkStrictly: true,value:'id',label:'name',children:'_child'}"
-                ref="depts"
-                filterable
-				size="medium"
-                change-on-select
-                placeholder="全公司"
-                clearable
-              ></el-cascader>
-            </el-form-item>
-            <el-form-item label="时间">
-              <el-date-picker
-                class="date-picker-width"
-                v-model="formData.month"
-                clearable
-                width="100%"
-                type="month"
-				size="medium"
-                placeholder="请选择月份"
-                value-format="yyyy-MM"
-              ></el-date-picker>
-            </el-form-item>
-          </el-form>
-
-          <el-table :data="list" style="width: 100%" v-loading="loading" @row-click="open_detail">
-            <el-table-column label="管理者">
-              <template slot-scope="scope">
-                <userImage
-                  class="fl"
-                  :id="scope.row.id"
-                  :user_name="scope.row.name"
-                  :img_url="scope.row.img_url"
-                  width="50px"
-                  height="50px"
-                ></userImage>
-                <span
-                  style=" margin-left: 10px; line-height: 50px; display: inline-block;"
-                >{{ scope.row.name }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="管理范围(人)" prop="scope_count"></el-table-column>
-            <el-table-column label="人均奖分(次)" prop="reward_count"></el-table-column>
-            <el-table-column label="人均扣分(次)" prop="deduct_count"></el-table-column>
-            <template slot="empty">
-              <div class="nopoint_box">
-                <div class="noimg noperson"></div>
-                <span class="title">没有对应的数据</span>
-              </div>
-            </template>
-          </el-table>
-
-          <center style="padding: 20px 0;">
-            <el-pagination
-              background
-              @size-change="handleSizeChange"
-              @current-change="handleCurrentChange"
-              :current-page="formData.page"
-              :page-sizes="[10, 20, 30, 40, 50, 100]"
-              layout="total, sizes, prev, pager, next"
-              :page-size="formData.page_size"
-              :total="total"
-            ></el-pagination>
-          </center>
-
-          <el-drawer size="500px" :visible.sync="detail_show" :with-header="false" direction="rtl">
-            <el-button type="info" style="position: absolute; left: -100px;">test</el-button>
-            <div class="drawer_title">
-              {{item.name}}的奖扣统计
-              <el-tooltip placement="top">
-                <div slot="content" style="width: 300px">作为管理者,管理执行力是关键,每月按要求完成奖分和扣分任务。</div>
-                <span class="tips">?</span>
-              </el-tooltip>
-            </div>
-            <div class="chart_content">
-              <el-row :gutter="20" v-if="personalData !== null" v-loading="personalData_loading">
-                <el-col :span="4">
-                  <div class="dataItem">
-                    <p class="point">{{personalData.task.reward.point}}</p>
-                    <p>奖分</p>
-                    <p class="target">目标{{personalData.task.reward.target_point}}</p>
-                  </div>
-                </el-col>
-                <el-col :span="4">
-                  <div class="dataItem">
-                    <p class="point">{{personalData.task.deduction.point}}</p>
-                    <p>扣分</p>
-                    <p class="target">目标{{personalData.task.deduction.target_point}}</p>
-                  </div>
-                </el-col>
-                <el-col :span="5">
-                  <div class="dataItem">
-                    <p class="point">{{personalData.task.ratio.ratio}}:1</p>
-                    <p>奖扣比例</p>
-                    <p class="target">目标>{{personalData.task.ratio.target_ratio}}:1</p>
-                  </div>
-                </el-col>
-                <el-col :span="5">
-                  <div class="dataItem">
-                    <p class="point">{{personalData.task.exec.count}}</p>
-                    <p>奖扣人次</p>
-                    <p class="target">目标{{personalData.task.exec.target_count}}</p>
-                  </div>
-                </el-col>
-              </el-row>
-
-              <div class="chart-legend__wrap">
-                <span class="fl">月奖扣执行情况</span>
-                <span class="chart-legend__pink">奖分</span>
-                <span class="chart-legend__green">扣分</span>
-              </div>
-              <div id="situationChart" v-loading="echart_loading" style="height: 300px;"></div>
-
-              <div class="chart-legend__wrap">
-                <div class="fl">月奖扣人次</div>
-                <span class="chart-legend__pink">奖分人次</span>
-                <span class="chart-legend__green">扣分人次</span>
-              </div>
-              <div id="passengersChart" v-loading="echart_loading" style="height: 300px;"></div>
-            </div>
-          </el-drawer>
-        </el-tab-pane>
-      </el-tabs>
-    </div>
-  </div>
-</template>
-<script>
-import ECharts from "echarts";
-export default {
-  data() {
-    return {
-      last: [],
-	    //完成情况
-	    condition: {
-        month: this.$moment().format("YYYY-MM"),//时间
-        page: 1,//当前页
-        page_size: 10,//每页数量
-        dept_id: 0,//部门id
-        keyword:'',//关键字
-        complete:'',//是否达标 1是
-      },
-      activeName: "second",
-      totals: null,
-      dept_name_xq_xq: "",
-
-	    //对比
-      loading: false,
-      choose_time: "",
-      input: "",
-      radio: "1",
-      formData: {
-        month: this.$moment().format("YYYY-MM"),
-        page: 1,
-        page_size: 10,
-        dept_id: 0,
-      },
-      total: null,
-      allPass: false,
-      list: [],
-      detail_show: false,
-      echart_loading: false,
-      item: {},
-      dept_name_xq: "",
-      dept_tree: [],
-      personalData_loading: false,
-      personalData: null,
-    };
-  },
-  watch: {
-	//对比
-    "formData.month"(val, old_val) {
-      this.formData.page = 1;
-      this.get_list();
-	},
-	//情况
-    "condition.month"(val, old_val) {
-      this.condition.page = 1;
-      this.get_last();
-	},
-	//查看全部达标
-    'allPass'(val,old_val){
-    	if(val){
-    		this.condition.complete = '1'
-    	}else{
-    		this.condition.complete = '0'
-      }
-      this.condition.page = 1
-    	this.get_last()
-	},
-	
-  },
-  methods: {
-    //情况
-	get_last() {
-      this.loading = true;
-      this.$axios("get","/api/integral/statistics/prize/list",this.condition,'v4').then((res) => {
-          if (res.data.code == 1) {
-            this.last = res.data.data.list;
-            this.totals = res.data.data.total;
-          } else {
-            this.$message.error(res.data.data.msg);
-          }
-        })
-        .finally(() => {
-          this.loading = false;
-        });
-	},
-	//部门
-	get_last_dept_null(val) {
-      if (val.length == 0) {
-        this.condition.dept_id = 0;
-      } else {
-		    this.condition.dept_id = val[0];
-      }
-      this.$nextTick(() => {
-        this.condition.page = 1;
-        this.$refs.dept.dropDownVisible = false; //监听值发生变化就关闭它
-        this.get_last();
-      });
-	},
-	//搜索框
-	search_box(){
-		this.get_last();
-  },
-  //导出报表
-  exportExcel() {
-      let data = "";
-      //部门
-        this.condition.dept_id>0?data+="&rule_id="+ this.condition.dept_id:data+="&rule_id=0"
-      //时间
-        data+="&month="+this.condition.month
-      //搜索框
-        this.condition.keyword==''?data+="&keyword=0":data+="&keyword="+this.condition.keyword
-      //是否达标
-        this.condition.complete!=0?data+="&complete="+this.condition.complete:data+="&complete=0"
-      //当前页数
-        data+="&page="+this.condition.page
-      window.open(
-        process.env.BASE_API +
-          "/api/download/prize/list/v4?employee_id="+
-          this.$store.getters.user_info.id +
-          data,
-        "_blank"
-      );
-      this.dialogVisible = false;
-    },
-    //分页选择显示多少条
-    handleCurrentChange_xq(val) {
-      this.condition.page = val;
-      this.get_last();
-    },
-    //分页
-    handleSizeChange_xq(val){
-      this.condition.page_size = val;
-      this.get_last();
-    },
-    handleSizeChange(val) {
-      this.formData.page_size =val;
-      this.get_list();
-    },
-    handleCurrentChange(val) {
-      this.formData.page = val;
-      this.get_list();
-    },
-    get_list() {
-      this.loading = true;
-      this.$axios("get","/api/integral/statistics/prize/list",this.formData,'v3').then((res) => {
-          if (res.data.code == 1) {
-            this.list = res.data.data.list;
-            this.total = res.data.data.total;
-          } else {
-            this.$message.error(res.data.data.msg);
-          }
-        })
-        .finally(() => {
-          this.loading = false;
-        });
-    },
-    search() {
-      this.get_list();
-    },
-    open_detail(row, column, event) {
-      this.detail_show = true;
-      this.item = row;
-      this.$nextTick(() => {
-        this.situationChart = ECharts.init(
-          document.getElementById("situationChart")
-        );
-        this.passengersChart = ECharts.init(
-          document.getElementById("passengersChart")
-        );
-      });
-      this.getData(() => (this.echart_loading = false));
-      this.getDataV1(() => (this.personalData_loading = false));
-    },
-    getChartOption(xAxisData, rewardData, deductionData) {
-      return {
-        tooltip: {
-          trigger: "axis",
-        },
-        grid: {
-          containLabel: true,
-          top: "4%",
-          right: "4%",
-          bottom: "5%",
-          left: "7%",
-        },
-        xAxis: {
-          type: "category",
-          boundaryGap: false,
-          axisLine: { lineStyle: { color: "#eee" } },
-          axisLabel: { color: "#333" },
-          data: xAxisData,
-        },
-        yAxis: {
-          position: "right",
-          axisLine: { lineStyle: { color: "#eee" } },
-          axisLabel: { color: "#333" },
-          type: "value",
-          splitLine: { lineStyle: { color: "#eee" } },
-        },
-        series: [
-          {
-            name: "奖分",
-            type: "line",
-            data: rewardData,
-            lineStyle: { normal: { color: "#F56C6C" } },
-          },
-          {
-            name: "扣分",
-            type: "line",
-            data: deductionData,
-            lineStyle: { normal: { color: "#53B87F" } },
-          },
-        ],
-      };
-    },
-    // v2
-    getData(callBack) {
-      this.echart_loading = true;
-      const data = {
-        employee_id: this.item.id || 0,
-        month: this.formData.month,
-      };
-      this.$axios('get',"/api/integral/statistics/prize",data).then((res) => {
-         if (res.data.code === 1) {
-            const item = res.data.data;
-            this.employeeName = item.name;
-            const deduct = item.chart.deduct;
-            const situationRewardData = [];
-            const situationDeductionData = [];
-            const passengersRewardData = [];
-            const passengersDeductionData = [];
-            const xAxisData = item.chart.reward.map((o, i) => {
-              // 降分分数
-              situationDeductionData.push(item.chart.reward[i].point);
-              // 扣分分数
-              passengersDeductionData.push(item.chart.deduct[i].point);
-              // 奖分次数
-              situationRewardData.push(item.chart.reward[i].count);
-              // 扣分次数
-              passengersRewardData.push(item.chart.deduct[i].count);
-              return o.date;
-            });
-            this.situationChart.setOption(
-              this.getChartOption(
-                xAxisData,
-                situationDeductionData,
-                passengersDeductionData
-              )
-            ); //奖分数值、扣分数值
-            this.passengersChart.setOption(
-              this.getChartOption(
-                xAxisData,
-                situationRewardData,
-                passengersRewardData
-              )
-            ); //月奖扣人次
-          }
-        }).finally(() => {
-          this.echart_loading = false;
-        });
-    },
-    // v1
-    getDataV1(callBack) {
-      this.personalData_loading = true;
-      const data = {
-        employee_id: this.item.id || 0,
-        month: this.formData.month,
-      };
-      this.$axios("get","/api/integral/statistics",data,).then((res) => {
-          if (res.data.code == 1) {
-            this.personalData = res.data.data;
-          } else {
-            this.$message.error(res.data.data.msg);
-          }
-        }).finally(() => {
-          this.personalData_loading = false;
-        });
-    },
-    dept_null(val) {
-      if (val.length == 0) {
-        this.formData.dept_id = 0;
-      } else {
-        this.formData.dept_id = this.dept_name_xq[this.dept_name_xq.length - 1];
-      }
-      this.$nextTick(() => {
-        this.formData.page = 1;
-        this.$refs.depts.dropDownVisible = false;
-        this.get_list();
-      });
-    },
-	//获取部门
-	getDepartment() {
-		this.$axios('get','/api/department/tree').then(res => {
-			this.dept_tree =this.getTreeData(res.data.data.list);
-		});
-	},
-	// 递归判断列表,把最后的children设为undefined
-	getTreeData(data) {
-		for (var i = 0; i < data.length; i++) {
-			data[i].obj={id:data[i].id,name:data[i].name};
-			if (data[i]._child.length < 1) {
-				// children若为空数组,则将children设为undefined
-				data[i]._child = undefined;
-			} else {
-				// children若不为空数组,则继续 递归调用 本方法
-				this.getTreeData(data[i]._child);
-			}
-		}
-		return data;
-	}
-  },
-  mounted() {
-	  this.getDepartment();
-	// this.get_list();
- //    this.get_last();
-  },
-};
-</script>
-<style scoped lang="scss">
-.search_box {
-  ::v-deep button:active {
-    background: #26a2ff;
-  }
- ::v-deep button:active .el-icon-search {
-    color: #fff;
-  }
-}
-.date-picker-width {
-  width: 100% !important;
-}
-.color_green {
-  color: #67c23a;
-}
-.nopoint_box {
-  display: inline-block;
-  text-align: center;
-  width: 100%;
-  margin-bottom: 10px;
-}
-.noimg {
-  display: inline-block;
-  width: 110px;
-  height: 110px;
-  margin: 22px auto 16px;
-  background-size: 99%;
-}
-.noperson {
-  display: inline-block;
-  width: 110px;
-  height: 110px;
-  line-height: none;
-  margin: 22px auto 16px;
-  background: url("/static/images/noperson_default.png") no-repeat center;
-  background-size: 99%;
-}
-.title {
-  display: block;
-  text-align: center;
-  font-size: 12px !important;
-  line-height: 30px;
-  color: #909399 !important;
-  padding: 0;
-}
-.nopoint_box a {
-  color: #26a2ff;
-}
-.chart_content {
-  height: 90vh;
-  overflow-y: auto;
-  overflow-x: hidden;
-  .chart-legend__wrap {
-    text-align: right;
-    padding: 20px;
-    padding-right: 50px;
-    & .chart-legend__pink {
-      position: relative;
-      padding-left: 12px;
-      padding-right: 5px;
-      &:after {
-        content: "";
-        position: absolute;
-        margin-top: -2px;
-        top: 35%;
-        left: 0;
-        width: 8px;
-        height: 8px;
-        background: #f56c6c;
-        border-radius: 100%;
-      }
-    }
-
-    & .chart-legend__green {
-      position: relative;
-      padding-left: 12px;
-      &:after {
-        content: "";
-        position: absolute;
-        margin-top: -2px;
-        top: 35%;
-        left: 0;
-        width: 8px;
-        height: 8px;
-        background: #53b87f;
-        border-radius: 100%;
-      }
-    }
-  }
-}
-
-// 滚动条样式
-.chart_content::-webkit-scrollbar-track {
-  -webkit-box-shadow: inset 0 0 5px rgb(255, 255, 255);
-  border-radius: 5px;
-  background-color: rgb(255, 255, 255);
-}
-.chart_content::-webkit-scrollbar {
-  width: 5px;
-  background-color: rgba(201, 201, 201, 0);
-}
-.chart_content::-webkit-scrollbar-thumb {
-  border-radius: 5px;
-  -webkit-box-shadow: inset 0 0 5px rgb(153, 145, 145) (160, 154, 154);
-  background-color: rgb(168, 167, 167);
-}
-
-.dataItem {
-  text-align: center;
-  .point {
-    font-size: 22px;
-    color: #26a2ff;
-    margin: 10px 0;
-  }
-  .target {
-    font-size: 12px;
-    color: #909399;
-  }
-}
-.drawer_title {
-  font-size: 18px;
-  padding: 20px;
-}
-.manager_statistics_box {
-  background-color: #ffffff;
-  padding: 20px;
-  min-height: calc(100vh - 160px);
-  ::v-deep .el-row .el-checkbox .el-checkbox__label {
-    line-height: 20px;
-  }
-}
-.tips {
-  background: #409eff;
-  border-radius: 50%;
-  width: 14px;
-  height: 14px;
-  color: #fff;
-  display: inline-block;
-  font-size: 12px;
-  line-height: 14px;
-  text-align: center;
-}
-.el-form-item__label {
-  width: 0px !important;
-}
-.wlj{
-	padding: 20px;
-	& .color_green{
-		color: #49d3a7;
-	}
-	& .color_red{
-		color: #f04b56;
-	}
-}
-b{
-	font-size: 14px;
-}
-.span_h{
-	font-size: 13px;
-	color: #898c94;
-}
-</style>

+ 0 - 370
src789/views/ranking/total_rank.vue

@@ -1,370 +0,0 @@
-<template>
-	<div>
-		<div class="diy_tip_bg" v-show="tips_show">
-			<el-alert class="diy-tip" @close="tips_close" type="success" description><p>排名包含初始分和工龄分</p></el-alert>
-		</div>
-
-		<div class="all" style="padding: 20px;">
-			<el-form :inline="true">
-				<el-form-item label="部门">
-					<el-cascader
-					  size="medium"
-						class="date-picker-width"
-						v-model="dept_name"
-						:options="dept_tree"
-						:props="{ checkStrictly: true,value:'id',label:'name',children:'_child'}"
-						ref="dept"
-						clearable
-						filterable
-						placeholder="全公司"
-					></el-cascader>
-				</el-form-item>
-				<el-form-item>
-					<el-checkbox v-model="sort" size="medium" label="排名由低到高" border></el-checkbox>
-					<el-button type="primary" size="medium" @click="dialogVisible = true" style="margin-left: 10px;" plain>导出排名</el-button>
-				</el-form-item>
-			</el-form>
-
-			<el-table :data="list" style="width: 100%" v-loading="loading">
-				<el-table-column label="名次" width="80" align="center">
-					<template slot-scope="scope">
-						<img v-if="scope.row.rank === 1" src="@/assets/image/statistics_NO1.png" alt="" />
-						<img v-if="scope.row.rank === 2" src="@/assets/image/statistics_NO2.png" alt="" />
-						<img v-if="scope.row.rank === 3" src="@/assets/image/statistics_NO3.png" alt="" />
-						<span v-if="scope.row.rank > 3">{{ scope.row.rank }}</span>
-					</template>
-				</el-table-column>
-				<el-table-column label="姓名" align="left">
-					<template slot-scope="scope">
-						<div class="flex-box">
-							<userImage	class="fl" :user_name="scope.row.employee_name"	:img_url="scope.row.employee_img_url" width="50px" height="50px"></userImage>
-							<span style="line-height: 50px; padding-left: 10px;">{{ scope.row.employee_name }}</span>
-						</div>
-					</template>
-				</el-table-column>
-				<el-table-column label="B分" align="left" prop="point"></el-table-column>
-				<template slot="empty">
-					<div class="nopoint_box">
-						<div class="noimg noperson"></div>
-						<span class="title">没有对应的数据</span>
-					</div>
-				</template>
-			</el-table>
-
-			<center style="padding: 20px 0;">
-				<el-pagination
-					background
-					@size-change="handleSizeChange"
-					@current-change="handleCurrentChange"
-					:current-page="formData.page"
-					:page-sizes="[10, 20, 30, 40, 50, 100]"
-					layout="total, sizes, prev, pager, next"
-					:page-size="pageLimit"
-					:total="total"
-				></el-pagination>
-			</center>
-		</div>
-		
-		<!-- 导出弹窗 -->
-		<el-dialog title="导出排名" :visible.sync="dialogVisible" width="730px" top="10%">
-			<span style="font-size:15px">系统将按以下已选条件导出对应的排名报表</span>
-			<el-form :inline="true">
-				<div class="picker_er">
-					<el-form-item label="时间">
-						<el-date-picker
-							v-model="Dc_Data.value1"
-							type="daterange"
-							 size="medium"
-							value-format="yyyy-MM-dd"
-							format="yyyy-MM-dd"
-							range-separator="至"
-							start-placeholder="开始日期"
-							end-placeholder="结束日期"
-						></el-date-picker>
-					</el-form-item>
-		
-					<el-form-item label="人员" style="margin-left:30px">
-						<el-select  size="medium" v-model="Dc_Data.DC_position" style="width:150px" placeholder="请选择">
-							<el-option v-for="item in positions" :key="item.id" :label="item.name" :value="item.age"></el-option>
-						</el-select>
-					</el-form-item>
-				</div>
-				<el-form-item label="部门">
-					<el-cascader
-						class="date-picker-width cascader_bm"
-						v-model="Dc_Data.dept_name"
-						:options="dept_tree"
-						:props="{ checkStrictly: true,value:'id',label:'name',children:'_child'}"
-						ref="dept2"
-						size="medium"
-						clearable
-						filterable
-						placeholder="全公司"
-					></el-cascader>
-				</el-form-item>
-			</el-form>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="dialogVisible = false"  size="medium">取 消</el-button>
-				<el-button type="primary" @click="exportExcel"  size="medium">导 出</el-button>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-<script>
-export default {
-	data() {
-		return {
-			dept_name: [],
-			dept_tree: [],
-			loading: false,
-			formData: {
-				dept_id: '0',
-				sort: 'DESC',
-				page: 1,
-				page_size: 10,
-				pt_id: 3,
-				type: 'all'
-			},
-			sort: false,
-			list: null,
-			pageLimit: 10,
-			total: null,
-			tips_show: false,
-			dialogVisible:false,
-			positions: [{ id: 0, age: 'all', name: '全部' }, { id: 1, age: 'manager', name: '管理者' }, { id: 2, age: 'employee', name: '员工' }],
-			Dc_Data: {
-				//导出数据
-				value1: '', //时间
-				DC_position: '全部', //人员
-				dept_name: [], //部门
-			},
-		};
-	},
-	watch: {
-		sort(val) {
-			if (val) {
-				this.formData.sort = 'ASC';
-			} else {
-				this.formData.sort = 'DESC';
-			}
-			this.formData.page = 1;
-			this.get_list();
-		},
-		dept_name(val) {
-			if (val.length !== 0) {
-				this.formData.dept_id = val[val.length - 1];
-			} else {
-				this.formData.dept_id = '0';
-			}
-			this.formData.page = 1;
-			this.$nextTick(() => {
-				this.$refs.dept.dropDownVisible = false;
-				this.get_list();
-			});
-		}
-	},
-	methods: {
-		exportExcel() {
-			//人员
-			this.Dc_Data.DC_position =this.Dc_Data.DC_position == 'manager' ? 'manager' : this.Dc_Data.DC_position == 'employee' ? 'employee' : this.Dc_Data.DC_position == '全部' ? 'all' : 'all';
-			//部门
-			let dept_name;
-			for (let i in this.Dc_Data.dept_name) {
-				dept_name = this.Dc_Data.dept_name[i];
-			}
-			this.Dc_Data.dept_name = dept_name;
-			//规则
-			let rule_id = [];
-			for (let i in this.Dc_Data.rule_id) {
-				for (let a in this.Dc_Data.rule_id[i]) {
-					rule_id.push(this.Dc_Data.rule_id[i][a]);
-				}
-			}
-			this.Dc_Data.rule_id = rule_id;
-			let data = '';
-			if (this.Dc_Data.value1) {
-				data += '&start_date=' + this.Dc_Data.value1[0];
-				data += '&end_date=' + this.Dc_Data.value1[1];
-			}
-			data += '&position=' + this.Dc_Data.DC_position;
-			this.Dc_Data.dept_name > 0 ? (data += '&dept_id=' + this.Dc_Data.dept_name) : (data += '&dept_id=0');
-			if (this.Dc_Data.rule_id.length > 0) {
-				data += '&rule_id=' + this.Dc_Data.rule_id;
-			}
-			
-			window.open(process.env.VUE_APP_BASE_API + 'api/download/ranking/v2?pt_id=3&type=all&employee_id='+this.$getUserData().id+ data, '_blank');
-			this.dialogVisible = false;
-		},
-		// 提示信息
-		tips_close() {
-			localStorage.setItem('total_rank_tips', 'true');
-			this.tips_show = false;
-		},
-		// 页面变更
-		handleCurrentChange(val) {
-			this.formData.page = val;
-			this.get_list();
-		},
-		handleSizeChange(val) {
-			this.pageLimit = val;
-			this.formData.page_size = this.pageLimit;
-			this.get_list();
-		},
-		//获取部门
-		getDepartment() {
-			this.$axios('get','/api/department/tree').then(res => {
-				this.dept_tree =this.getTreeData(res.data.data.list);
-			});
-		},
-		get_list() {
-			this.loading = true;
-			this.$axios('get','/api/integral/statistics/ranking', this.formData,'v2').then(res => {
-					if (res.data.code == 1) {
-						this.list = res.data.data.list;
-						this.total = res.data.data.total;
-					} else {
-						this.$message.error(res.data.data.msg);
-					}
-				})
-				.finally(() => {
-					this.loading = false;
-				});
-		},
-		// 递归判断列表,把最后的children设为undefined
-		getTreeData(data) {
-			for (var i = 0; i < data.length; i++) {
-				if (data[i]._child.length < 1) {
-					// children若为空数组,则将children设为undefined
-					data[i]._child = undefined;
-				} else {
-					// children若不为空数组,则继续 递归调用 本方法
-					this.getTreeData(data[i]._child);
-				}
-			}
-			return data;
-		}
-	},
-	created() {
-		this.getDepartment();
-	},
-	mounted() {
-		this.tips_show = JSON.parse(localStorage.getItem('total_rank_tips')) ? false : true;
-		this.get_list();
-	}
-};
-</script>
-<style scoped lang="scss">
-.search_box {
-	::v-deep button:active {
-		background: #26a2ff;
-	}
-	::v-deep button:active .el-icon-search {
-		color: #fff;
-	}
-}
-.date-picker-width {
-	width: 100% !important;
-}
-.color_green {
-	color: #67c23a;
-}
-.nopoint_box {
-	display: inline-block;
-	text-align: center;
-	width: 100%;
-	margin-bottom: 10px;
-}
-.noimg {
-	display: inline-block;
-	width: 110px;
-	height: 110px;
-	margin: 22px auto 16px;
-	background-size: 99%;
-}
-.noperson {
-	display: inline-block;
-	width: 110px;
-	height: 110px;
-	line-height: none;
-	margin: 22px auto 16px;
-	// background: url("@/assets/image/rules_mould.png") no-repeat center;
-	background-size: 99%;
-}
-.title {
-	display: block;
-	text-align: center;
-	font-size: 12px !important;
-	line-height: 30px;
-	color: #909399 !important;
-	padding: 0;
-}
-.nopoint_box a {
-	color: #26a2ff;
-}
-.chart_content {
-	.chart-legend__wrap {
-		text-align: right;
-		padding: 20px;
-		padding-right: 50px;
-		& .chart-legend__pink {
-			position: relative;
-			padding-left: 12px;
-			padding-right: 5px;
-			&:after {
-				content: '';
-				position: absolute;
-				margin-top: -2px;
-				top: 35%;
-				left: 0;
-				width: 8px;
-				height: 8px;
-				background: #f56c6c;
-				border-radius: 100%;
-			}
-		}
-
-		& .chart-legend__green {
-			position: relative;
-			padding-left: 12px;
-			&:after {
-				content: '';
-				position: absolute;
-				margin-top: -2px;
-				top: 35%;
-				left: 0;
-				width: 8px;
-				height: 8px;
-				background: #53b87f;
-				border-radius: 100%;
-			}
-		}
-	}
-}
-.drawer_title {
-	font-size: 18px;
-	padding: 20px;
-}
-.manager_statistics_box {
-	background-color: #ffffff;
-	padding: 20px;
-	min-height: calc(100vh - 160px);
-	::v-deep .el-row .el-checkbox .el-checkbox__label {
-		line-height: 20px;
-	}
-}
-.diy_tip_bg {
-	background: #f5f6f9;
-	overflow: hidden;
-	.diy-tip {
-		margin-bottom: 15px;
-		border: 1px solid #67c23a;
-		padding: 20px 16px;
-		p {
-			color: #67c23a !important;
-			font-size: 14px;
-			margin: 0 !important;
-			padding: 4px 0;
-		}
-	}
-}
-</style>

+ 0 - 197
src789/views/set/check.vue

@@ -1,197 +0,0 @@
-<template>
- <div>
-	 <div v-loading="loading" v-if="ding_enable">
-	   <workpoints :initia_arr="initia_arr" v-if="!loading" :initia_head="initia_head" :obj="obj" @initia="initia" />
-	 </div>
-	 <div v-else class="all">
-		 <div class="nullD">请到钉钉考勤管理后台-<span class="blue"> 工作台 </span>-<span class="blue"> 考勤打卡 </span>-<span class="blue"> 考勤报表 </span>-<span class="blue">切换新版 </span>-开启新版考勤报表功能</div>
-		 <div class="text">如下图:</div>
-		 <div class="img1">
-			 <img src="@/assets/image/kq1.png">
-		 </div>
-		 <div class="img1">
-		 	<img src="@/assets/image/kq2.png">
-		 </div>
-	 </div>
- </div>	
-</template>
-
-<script>
-import workpoints from "@/components/publics/workpoints";
-export default {
-  components: {workpoints},	
-  data() {
-    return {
-      loading: false,
-	  ding_enable:true,
-      initia_head: {
-        initial_suername: "考勤积分",
-        initial_suertext: "以下考勤奖扣分,均为B分",
-        initial_left: "167px",
-        initial_width: "165px",
-      },
-      initia_arr: [
-		  {
-			initialName: "是否启用考勤设置",
-			initia_mark: false,
-			type:'switch',
-			initia_input: {
-			  age: "0",
-			},
-		  },
-        // {
-        //   initialName: "月度全勤,每月加分",
-        //   initia_mark: false,
-        //   initia_input: {
-        //     age: "0",
-        //   },
-        // },
-        {
-          initialName: "正常打卡,每次加分",
-          initia_mark: false,
-          initia_input: {
-            age: "0",
-          },
-        },
-        {
-          initialName: "上下班缺卡,每次扣分",
-          initia_mark: false,
-          initia_input: {
-            age: "0",
-          },
-        },
-		{
-		  initialName: "旷工缺席,每次扣分",
-		  initia_mark: false,
-		  initia_input: {
-		    age: "0",
-		  },
-		},
-        {
-          initialName: "上班迟到,每次扣分",
-          initia_mark: false,
-          initia_input: {
-            age: "0",
-          },
-        },
-        {
-          initialName: "下班早退,每次扣分",
-          initia_mark: false,
-          initia_input: {
-            age: "0",
-          },
-        },
-        // {
-        //   initialName: "加班,每小时加分",
-        //   initia_mark: false,
-        //   initia_input: {
-        //     age: "0",
-        //   },
-        // },
-		{
-		  initialName: "加班,每满一天加分",
-		  initia_mark: false,
-		  initia_input: {
-		    age: "0",
-		  },
-		},
-        // {
-        //   initialName: "请假,每小时扣分",
-        //   initia_mark: false,
-        //   initia_input: {
-        //     age: "0",
-        //   },
-        // },
-      ],
-	  obj: {
-		  // ding_enable:'',
-		  enable:'',
-		  // month_full_ad: "", //>=0
-		  normal: "", //>=0
-		  no_sign: "", //<=0
-		  absent: "", //<=0
-		  on_duty_late: "", //<=0
-		  off_duty_early: "", //<=0
-		  // ot_per_hour: "", //>=0
-		  ot_per_day:'',
-		  // leave_per_hour: "", //<=0
-	  },
-    };
-  },
-  mounted() {
-    this.cheak_ax();
-  },
-  methods: {
-    initia(ok) {
-      var objs = {};
-	  objs.enable = ok[0].sj; 
-      objs.normal = ok[1].sj; //>=0
-	  objs.no_sign = ok[2].sj>0? ok[2].sj:ok[2].sj; //<=0
-	  objs.absent = ok[3].sj>0? ok[3].sj:ok[3].sj; //<=0
-	  objs.on_duty_late = ok[4].sj>0? ok[4].sj:ok[4].sj; //<=0
-	  objs.off_duty_early = ok[5].sj>0? ok[5].sj:ok[5].sj; //<=0
-	  objs.ot_per_day =ok[6].sj; //>=0
-	  
-   //    objs.ot_per_hour = ok[7].sj; //>=0
-   //    objs.leave_per_hour = ok[8].sj>0? -ok[8].sj:ok[8].sj; //<=0
-	  // objs.month_full_ad = 0
-      this.$axios('post',"/api/ad/update",objs).then((res) => {
-          if (res.data.code == 1) {
-            this.$message({
-              message: res.data.msg,
-              type: "success",
-            });
-          }
-        }).finally(err=>{
-			this.loading = false;
-		});
-    },
-    cheak_ax() {
-      this.loading = true;
-      this.$axios('get',"/api/ad/info").then((res) => {
-        var arr = [],config=res.data.data;
-		this.ding_enable=config.ding_enable==0? false:true;
-		if(!this.ding_enable){
-			return false;
-		}
-		// config.no_sign=config.no_sign-(config.no_sign+config.no_sign);
-		// config.absent=config.absent-(config.absent+config.absent);
-		// config.on_duty_late=config.on_duty_late-(config.on_duty_late+config.on_duty_late);
-		// config.off_duty_early=config.off_duty_early-(config.off_duty_early+config.off_duty_early);
-		// config.leave_per_hour=config.leave_per_hour-(config.leave_per_hour+config.leave_per_hour);
-		
-		this.initia_arr[0].initia_input.age =config.enable
-		// this.initia_arr[1].initia_input.age =config.month_full_ad? config.month_full_ad:0  //月度全勤加分
-		this.initia_arr[1].initia_input.age =config.normal? config.normal:0   //正常打卡加分
-		this.initia_arr[2].initia_input.age =config.no_sign? config.no_sign:0 //缺卡扣分
-		this.initia_arr[3].initia_input.age =config.absent? config.absent:0 //旷工扣分
-		this.initia_arr[4].initia_input.age =config.on_duty_late? config.on_duty_late:0 //迟到扣分
-		this.initia_arr[5].initia_input.age =config.off_duty_early? config.off_duty_early:0 //早退扣分
-		// this.initia_arr[7].initia_input.age =config.ot_per_hour? config.ot_per_hour:0 //每小时加班加分 
-		this.initia_arr[6].initia_input.age =config.ot_per_day? config.ot_per_day:0 //每加班满一天加分 
-		// this.initia_arr[8].initia_input.age =config.leave_per_hour? config.leave_per_hour:0 //每小时请假扣分
-		
-      }).finally(err=>{
-			this.loading = false;
-	  });
-    },
-  },
-};
-</script>
-
-<style scoped lang="scss">
-	.nullD{
-		text-align: center;
-		padding: 20px;
-		font-size: 18px;
-	}
-	.text{
-		padding: 30px;
-		font-size: 18px;
-		font-weight: 600;
-	}
-	.img1{
-		text-align: center;
-		margin-bottom: 20px;
-	}
-</style>

+ 0 - 430
src789/views/set/framework.vue

@@ -1,430 +0,0 @@
-<template>
-	<div class="all-box">
-		<!-- 头部提示 -->
-		<div class="diy-tip" style="margin-bottom: 10px;">
-			<div>
-				当前组织架构成员通过钉钉通讯录同步,员工开启积分管理后才能正式启用并进入“功道云积分制”,如果您的钉钉通讯录有变动,点击
-				<span class="blue" style="margin-left: 10px;cursor: pointer;" @click="tb()" v-loading="tbLoading">
-					<i class="el-icon-refresh"></i>
-					立即同步
-				</span>
-			</div>
-		</div>
-		<div class="all">
-			<div class="flex-box">
-				<div class="terr-left">
-					<div class="rule_class_box">
-							<div class="company_name">
-								<img src="@/assets/image/two.png" />
-								<span>组织架构</span>
-								<!-- <span :class="[dept_id==0? 'blue':'']">{{ info.name }}</span> -->
-							</div>
-<!-- 						<div @click="handleNodeClick({ id: 0 })" class="company_name">
-							<img src="../assets/image/two.png" />
-							<span :class="[dept_id==0? 'blue':'']">{{ info.name }}</span>
-						</div> -->
-						<el-tree
-							:data="bmList"
-							class="cate-tree"
-							:highlight-current="true"
-							:props="{ children: '_child', label: 'name' }"
-							@node-click="handleNodeClick"
-							:accordion="true"
-							empty-text="您暂无部门数据,请同步钉钉通讯录"
-						>
-							<div
-								content="tree"
-								v-show="treedata.length != 0"
-								class="flex-box flex-v-ce"
-								slot-scope="{ node, data }"
-								style="font-size: 14px;color: #606266; width:100%; text-align: left;"
-							>
-								<img src="@/assets/image/one.png" style="width: 20px;margin-right: 5px;" />
-								<span class="name">{{ data.name }}</span>
-							</div>
-						</el-tree>
-					</div>
-				</div>
-				<div class="terr-right border-right flex-1">
-					<div class="margin-bottom">
-						<el-button @click="participation()" :loading="enable_loading" size="medium" type="primary" style="margin-right: 10px;">批量启动积分管理</el-button>
-						<el-input placeholder="输入同事姓名" size="medium" style="width: 230px;"  v-model="keywords" clearable @input="searchUser()">
-							<!-- <el-button slot="append" icon="el-icon-search" @click="getEmployee()"></el-button> -->
-						</el-input>
-					</div>
-					<el-table :data="userList" @selection-change="handleSelectionChange" v-loading="tableToading">
-						<el-table-column type="selection" width="50"></el-table-column>
-						<el-table-column label="姓名">
-							<template slot-scope="scope">
-								<div class="flex-box flex-v-ce">
-									<userImage :user_name="scope.row.name" :img_url="scope.row.img_url" width="44px" height="44px"></userImage>
-									<div style="margin-left: 10px;">{{ scope.row.name }}</div>
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="部门">
-							<template slot-scope="scope">
-								<div class="flex-box flex-v-ce bms">
-									<div v-for="(item, index) in scope.row.employee_detail.dept_list" :key="index">{{ item.dept_name }}</div>
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column prop="accedence_time" label="入职时间"></el-table-column>
-						<el-table-column label="启用积分管理">
-							<template slot="header" slot-scope="scope">
-								  <el-popover
-									placement="top-start"
-									width="300"
-									trigger="manual"
-									v-model="visible">
-									<div class="el-popover2">
-										<div class="title">提示 <i class="el-icon-info" style="margin-left: 5px;"></i></div>
-										<div style="margin-bottom: 10px;">在这里启用积分管理,即可进入系统</div>
-										<div class="flex-box">
-											<div class="flex-1"></div>
-											<el-button size="small" @click="visible_close()">我知道了</el-button>
-										</div>
-									</div>
-									<div slot="reference" class="popover" @click="visible=!visible">启用积分管理</div>
-								  </el-popover>
-							</template>
-							<template slot-scope="scope">
-								<div :class="[scope.row.is_official==1? 'switch-box':'']" @click="changeIs(scope.row.is_official, scope.row.id)">
-									<div class="switch"></div>
-								</div>
-								<!-- <el-switch @change="changeIs($event, scope.row.id)" v-model="scope.row.is_official" :active-value="is" :inactive-value="no"></el-switch> -->
-							</template>
-						</el-table-column>
-						<template slot="empty">
-							<noData></noData>
-						</template>
-					</el-table>
-					<div class="pagination">
-						<el-pagination
-							@size-change="handleSizeChange"
-							@current-change="handleCurrentChange"
-							:current-page="page"
-							:page-sizes="[10, 20, 30, 40, 50, 100]"
-							:page-size="perPage"
-							layout="total,sizes, prev, pager, next"
-							:total="total"
-						></el-pagination>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-import noData from '@/components/noData';
-export default {
-	data() {
-		return {
-			is: 1,
-			no: 0,
-			page: 1,
-			perPage: 10,
-			total: 0,
-			info: {}, //公司信息
-			tips_show: true,
-			bmList: [],
-			userList: [],
-			class_type: '',
-			treedata: [1],
-			tableData: [],
-			keywords: '',
-			dept_id: 0,
-
-			tableToading: false,
-			tbLoading: false,
-			selectIds: [],
-			enable_loading:false,
-			visible:false
-			
-		};
-	},
-	components: {
-		noData
-	},
-	watch: {
-		dept_id(val) {
-			this.getEmployee();
-		}
-	},
-	created() {
-		this.getInfo();
-		// this.getDepartment();
-		this.getEmployee();
-	},
-	mounted() {
-		this.$nextTick(function() {
-			if (localStorage.getItem('rule')) {
-				this.tips_show = false;
-			} else {
-				this.tips_show = true;
-			}
-		});
-	},
-	methods: {
-		//同步信息
-		tb() {
-			this.$confirm('下次同步时间需在10分钟之后,是否同步?', '提示', {
-			  confirmButtonText: '确定',
-			  cancelButtonText: '取消',
-			  type: 'warning'
-			}).then(() => {
-				this.tbLoading = true;
-				this.$axios('post','/api/ding/department_sync').then(res => {
-					this.$message.success({ message: '同步成功' });
-					this.dept_id=0;
-					this.getInfo();
-					this.getEmployee();
-				}).finally(()=>{
-					this.tbLoading = false;
-				});
-			});
-		},
-		//搜索
-		searchUser(){
-			this.page = 1;
-			this.getEmployee();
-		},
-		//是否开通
-		changeIs(e, id) {
-			var url = e == 1 ? '/api/employee/disable' : '/api/employee/enable';
-			this.$axios('post',url, { employee_id: [id] }).then(res => {
-				if (res) {
-					if(e==0){
-						this.$message.success({ message: '开启成功,可在"角色权限设置对应管理范围"' });
-					}else{
-						this.$message.success({ message: res.data.msg });
-					}
-					this.getEmployee();
-				}
-			});
-		},
-		//批量开通权限
-		participation() {
-			if(this.selectIds.length==0){
-				this.$message.error({ message: '请选择参与的人员!' });
-				return
-			}
-			
-			this.enable_loading=true;
-			this.$axios('post','/api/employee/enable', { employee_id: this.selectIds }).then(res => {
-				if (res) {
-					this.$message.success({ message: '开启成功,可在"角色权限设置对应管理范围"' });
-					this.getEmployee();
-				}
-			}).finally(err=>{
-				this.enable_loading=false;
-			});
-		},
-		//获取公司信息
-		getInfo(is) {
-			// api/test?employee_id=155
-			this.$axios('get','/api/site/info').then(res => {
-				this.info = res.data.data;
-				this.getDepartment(is);
-			});
-		},
-		//选择员工
-		handleSelectionChange(e) {
-			var arr = [];
-			for (var item in e) {
-				arr.push(e[item].id);
-			}
-			this.selectIds = arr;
-		},
-		//点击部门
-		handleNodeClick(e) {
-			this.page = 1;
-			this.dept_id = e.id;
-		},
-		//获取部门
-		getDepartment() {
-			this.$axios('get','/api/department/tree').then(res => {
-				var list=[{
-					id:0,
-					name:this.info.name,
-					_child:res.data.data.list
-				}]
-				this.bmList = list;
-			});
-		},
-		//获取员工
-		getEmployee() {
-			this.tableToading = true;
-			this.$axios('get','/api/employee/index', {dept_id: this.dept_id, keywords: this.keywords, page: this.page, page_size: this.perPage }).then(res => {
-				this.total = res.data.data.pageInfo.count;
-				this.userList = res.data.data.list;
-				var visible=localStorage.getItem('visible');
-				if(!visible){
-					this.visible=true;
-				}
-			}).finally(err=>{
-				this.tableToading=false;
-			});
-		},
-		visible_close(){
-			localStorage.setItem('visible', 'true');
-			this.visible = false;
-		},
-		//关闭提示
-		tips_close() {
-			localStorage.setItem('rule', 'true');
-			this.tips_show = false;
-		},
-		handleSizeChange: function(val) {
-			this.perPage = val;
-			this.page = 1;
-			this.getEmployee();
-		},
-		//页码变更
-		handleCurrentChange: function(val) {
-			this.page = val;
-			this.getEmployee();
-		}
-	}
-};
-</script>
-
-<style lang="scss" scoped="scoped">
- .title{
-	 font-size: 16px;
-	 color: #909399;
-	 margin-bottom: 10px;
- }	
-.popover{
-	border: none;
-	// color: #909399;
-	font-weight: 600;
-	cursor: pointer;
-}
-.popover:hover{
-	background-color: #fff;
-	border-color: #fff;
-}
-
-.switch{
-    margin: 0;
-    display: inline-block;
-    position: relative;
-    width: 40px;
-    height: 20px;
-    border: 1px solid #dcdfe6;
-    outline: none;
-    border-radius: 10px;
-    box-sizing: border-box;
-    background: #dcdfe6;
-    cursor: pointer;
-    transition: border-color .3s,background-color .3s;
-    vertical-align: middle;
-}
-.switch:after {
-    content: "";
-    position: absolute;
-    top: 1px;
-    left: 1px;
-    border-radius: 100%;
-    transition: all .3s;
-    width: 16px;
-    height: 16px;
-    background-color: #fff;
-}
-.switch-box .switch {
-    border-color: #409eff;
-    background-color: #409eff;
-}
-.switch-box .switch:after {
-    left: 100%;
-    margin-left: -17px;
-}
-.name {
-	overflow: hidden;
-	text-overflow: ellipsis;
-	white-space: nowrap;
-	width: 80%;
-}
-.bms div {
-	margin-right: 10px;
-}
-.top-msg div:nth-child(1) {
-	margin-bottom: 10px;
-}
-.company_name {
-	position: relative;
-	display: block;
-	font-family: 'Microsoft YaHei';
-	text-align: left;
-	padding: 15px 25px;
-	cursor: pointer;
-	overflow: hidden;
-	white-space: nowrap;
-	text-overflow: ellipsis;
-	border-bottom: 1px #f8f8f8 solid;
-}
-.company_name img {
-	position: relative;
-	display: inline-block;
-	top: 2px;
-	width: 18px;
-	height: 18px;
-	margin-right: 4px;
-}
-.terr-right {
-	.custom-tree-node {
-		margin-left: -4px;
-	}
-	.custom-tree-node * {
-		vertical-align: middle;
-	}
-	.custom-tree-node:hover {
-		.treeIcon {
-			display: inline-block;
-			width: 55%;
-		}
-	}
-}
-
- .el-popover2{
-		 // background-color: #409eff !important;
-		 color: #409eff;
-	}
-.rule_class_box {
-	::v-deep .el-tree-node {
-		border-bottom: 1px #f8f8f8 solid;
-	}
-	::v-deep .el-tree-node__content {
-		padding: 10px 0;
-		// border-bottom: 1px #f8f8f8 solid;
-	}
-	::v-deep .el-tree-node__content:hover {
-		background: #ecf5ff;
-		border-radius: 4px;
-	}
-	::v-deep .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content .name{
-	    color: #409eff !important;
-			font-weight: normal;
-			transition: 0.35s ease-in-out;
-	}
-	// ::v-deep .is-current .el-tree-node__content .el-icon-caret-right {
-	// 	color: #409eff !important;
-	// }
-	// ::v-deep .is-current .el-tree-node__content .el-tree-node__label {
-	// 	color: #409eff !important;
-	// }
-	// ::v-deep .is-current .el-tree-node__children .el-icon-caret-right {
-	// 	color: #c0c4cc !important;
-	// }
-	// ::v-deep .is-current .el-tree-node__children .el-tree-node__label {
-	// 	color: #606266 !important;
-	// }
-	// ::v-deep .is-current .name {
-	// 	color: #409eff !important;
-	// 	font-weight: normal;
-	// 	transition: 0.35s ease-in-out;
-	// }
-}
-</style>

+ 0 - 87
src789/views/set/initialPoint.vue

@@ -1,87 +0,0 @@
-<template>
-  <div v-loading="loading">
-    <workpoints :initia_arr="initia_arr" :initia_head="initia_head" @initia="initia" />
-  </div>
-</template>
-<script>
-import workpoints from "@/components/publics/workpoints";
-export default {
-  data() {
-    return {
-      loading: false,
-      initia_head: {
-        initial_suername: "初始分",
-        initial_suertext: "基础分和工龄分均为B分",
-        initial_left: "85px",
-        initial_width: "83px",
-      },
-      initia_arr: [
-        {
-          initialName: "基础分",
-          initia_mark: true,
-          initia_input: {
-            age: "",
-          },
-          initial_text:
-            "基础分是为了让积分保持正激励的作用,减少出现0分<br/>以下的情况,更好地激励员工挣分;<br/>设置分值后,系统将为全部员工自动加上此项基础分;<br/>此项基础分仅加一次,计入每个员工的累积总分",
-        },
-        {
-          initialName: "工龄分",
-          initia_mark: true,
-          initia_input: {
-            age: "",
-          },
-          initial_text:
-            "工龄分是为了更好的认可老员工;<br/>首次加分=员工已在职的月份*工龄分,未满一个月的不<br/>加分;后续加分按设置的工龄分值每月自动累加",
-        },
-      ],
-      obj: [
-        {
-          base_point: "",
-          service_point: "",
-        },
-      ],
-    };
-  },
-  components: {
-    workpoints,
-  },
-  created() {},
-  mounted() {
-    this.cheak_ax();
-  },
-  methods: {
-    initia(ok) {
-      this.loading = true;
-      this.obj.base_point = +ok[0].sj;
-      this.obj.service_point = +ok[1].sj;
-      this.$axios('post',"/api/integral/site/config", this.obj).then((res) => {
-          if (res.data.code == 1) {
-            this.$message({
-              message: res.data.msg,
-              type: "success",
-            });
-          }
-        }).finally(err=>{
-			this.loading = false;
-		});
-    },
-    cheak_ax() {
-      this.loading = true;
-      this.$axios('get',"/api/integral/site/config").then((res) => {
-        var arr = [];
-        for (let i in res.data.data) {
-          arr.push(res.data.data[i]);
-        }
-        this.initia_arr[0].initia_input.age = Math.abs(arr[0]);
-        this.initia_arr[1].initia_input.age = Math.abs(arr[3]);
-      }).finally(err=>{
-			this.loading = false;
-	  });
-    },
-  },
-};
-</script>
-
-<style  scoped lang="scss">
-</style>

+ 0 - 754
src789/views/set/jurisdiction.vue

@@ -1,754 +0,0 @@
-<template>
-	<div  class="all-box">
-		<el-alert v-if="tips_show" class="diy-tip" title="温馨提示:" type="warning" @close="tips_close" description show-icon>
-			<p>功道云积分系统共有5种角色,不同角色拥有不同的权限</p>
-		</el-alert>
-		<div class="all">
-			<div class="flex-box">
-				<div class="terr-left">
-					<el-menu default-active="0" class="el-menu-vertical-demo" style="border: none" v-loading="role_loading">
-						<el-menu-item
-							style="height: 47px;line-height: 47px;"
-							:index="index.toString()"
-							v-for="(item, index) in role_list"
-							:key="index"
-							@click="open_right(item)"
-							v-show="item.code !== 'employee'"
-						>
-							<i class="el-icon-s-custom"></i>
-							<span slot="title">{{ item.name }}</span>
-						</el-menu-item>
-					</el-menu>
-				</div>
-				<div class="terr-right border-right flex-1">
-					<div class="margin-bottom">
-						<div class="flex-box flex-v-ce">
-							<div class="name">{{ item_info.name }}</div>
-							<div class="flex-1"></div>
-							<el-button type="primary" size="medium" plain @click="open_right(item_info)">刷新</el-button>
-						</div>
-						<div class="user_text fontColorF" v-if="item_info.code == 'creator'">创始人默认为开通【功道云积分制】的人</div>
-						<div class="user_text fontColorF" v-if="item_info.code == 'admin'">公司管理员即钉钉的【子管理员】,在钉钉管理后台设置后即可同步</div>
-						<div class="user_text fontColorF" v-if="item_info.code == 'point_manager'">积分专员一般为人事、行政等管理督办人员,可管理多个部门和人员</div>
-						<div class="user_text fontColorF" v-if="item_info.code == 'dept_manager'">部门管理员一般为部门/团队经理、主管、组长,可管理一部分人员</div>
-						<div class="user_text fontColorF" v-if="item_info.code == 'employee'">员工为默认角色,每个人都拥有员工角色的功能权限,该角色不可修改</div>
-					</div>
-					<div class="flex-box btns flex-v-ce margin-bottom">
-						<el-button size="small" v-show="item_info.code != 'creator' && table_list.length > 0" @click="del_item" type="danger">删除</el-button>
-						<el-button size="small" v-show="item_info.code != 'creator'" @click="add_item" type="primary">添加</el-button>
-					</div>
-					<div v-if="item_info.code == 'creator'||item_info.code == 'employee'">
-						<el-table :data="table_list"  v-loading="table_loading" v-if="table_list.length > 0">
-							<el-table-column width="40" fixed  v-if="item_info.code == 'ding_admin'">
-								<template slot-scope="scope">
-									<el-radio v-model="radioVal" :label="scope.row.id"></el-radio>
-								</template>
-							</el-table-column>
-							<el-table-column prop="name" label="姓名">
-								<template slot-scope="scope">
-									<div class="flex-box flex-v-ce">
-										<userImage class="fl" width="50px" height="50px" :img_url="scope.row.img_url" :user_name="scope.row.name"></userImage>
-										<span style="margin-left: 10px; line-height: 50px;">{{ scope.row.name }}</span>
-									</div>
-								</template>
-							</el-table-column>
-							<el-table-column prop="dept" label="部门" v-if="item_info.code != 'creator'"></el-table-column>
-							<template slot="empty">
-								<noData :isSolt="true">
-									<template v-slot:default>
-										<div style="position: inherit;">
-											还没有{{ item_info.name }},
-											<span style="color:#26A2FF;cursor:pointer;" @click="add_item">去添加>></span>
-										</div>
-									</template>
-								</noData>
-							</template>
-						</el-table>
-						<div v-else style="text-align: center;">
-							<template v-if="item_info.code == 'creator'">
-								<div style="margin-top: 10%;margin-bottom: 10px;">
-									创始人即钉钉的主管理员,请确认应用的使用范围中是否选择了主管理员设置步骤:
-								</div>
-								<div>
-									进入【<span class="blue">钉钉管理后台</span>】→【<span class="blue">工作台</span>】→【<span class="blue">功道云积分制</span>】→【<span class="blue">设置</span>】,修改可见范围为全部员工或从部分员工中选上主管理员
-								</div>
-							</template>
-							<div v-else>积分负责人即钉钉管理后台的管理员,积分负责人只有“创始人”可添加/删除,且只能有一位</div>
-						</div>
-					</div>
-
-					<el-table :data="table_list" fit v-else  @selection-change="handleSelectionChange" v-loading="table_loading">
-						<el-table-column width="40" fixed>
-							<template slot-scope="scope">
-								<el-radio v-model="radioVal" :label="scope.row.id"></el-radio>
-							</template>
-						</el-table-column>
-						<el-table-column prop="name" label="姓名" width="150" fixed>
-							<template slot-scope="scope">
-								<div class="flex-box flex-v-ce">
-									<userImage class="fl" width="50px" height="50px" :img_url="scope.row.img_url" :user_name="scope.row.name"></userImage>
-									<span style="margin-left: 10px; line-height: 50px;">{{ scope.row.name }}</span>
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column prop="dept" label="部门"></el-table-column>
-						<el-table-column width="100px">
-							<template slot="header" slot-scope="scope">
-								<span>管理范围</span>
-								<el-tooltip placement="top">
-									<div slot="content">
-										可自由分配每个管理者的管辖范围,设置后对管辖范围内的人员有分配任务,发绩效,奖扣积分、查看积分排名和统计、审核其提交上来的申请等权限
-									</div>
-									<span class="tips">?</span>
-								</el-tooltip>
-							</template>
-							<template slot-scope="scope">
-								<div @click="add_management_scope(scope.row)" v-show="scope.row.manage_scope_count == 0" class="cursor_pointer" style="text-decoration:underline">
-									去设置
-								</div>
-								<div @click="add_management_scope(scope.row)" v-show="scope.row.manage_scope_count != 0" class="cursor_pointer">
-									{{ scope.row.manage_scope_count }}人
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column>
-							<template slot="header" slot-scope="scope">
-								<span>积分权限</span>
-								<el-tooltip placement="top">
-									<div slot="content">
-										针对不同的管理岗位,可赋予每个管理者不同的奖扣积分权限
-										<br />
-										积分权限不足的须递交给其上级审核
-									</div>
-									<span class="tips">?</span>
-								</el-tooltip>
-							</template>
-							<el-table-column label="A分权限">
-								<template slot-scope="scope">
-									<div @click="open_integral_limit(scope.row)" class="cursor_pointer">
-										<div v-for="(item, index) in scope.row.point_limit" :key="index" v-show="item.name == 'A分'" class="cursor_pointer">
-											<span v-if="item.point != 0">{{item.point}}</span>
-											<span v-else style="text-decoration:underline">未设置</span>
-										</div>
-									</div>
-								</template>
-							</el-table-column>
-							<el-table-column label="B分权限">
-								<template slot-scope="scope">
-									<div @click="open_integral_limit(scope.row)" class="cursor_pointer">
-										<div v-for="(item, index) in scope.row.point_limit" :key="index" v-show="item.name == 'B分'" class="cursor_pointer">
-											<span v-if="item.point != 0">{{ item.point}}</span>
-											<span v-else style="text-decoration:underline">未设置</span>
-										</div>
-									</div>
-								</template>
-							</el-table-column>
-							<el-table-column label="每月奖分上限">
-								<template slot-scope="scope">
-									<div @click="open_integral_limit(scope.row)" v-show="scope.row.entry_limit == 0" class="cursor_pointer" style="text-decoration:underline">
-										未设置
-									</div>
-									<div @click="open_integral_limit(scope.row)" v-show="scope.row.entry_limit > 0" class="cursor_pointer">{{ scope.row.entry_limit }}</div>
-									<div @click="open_integral_limit(scope.row)" v-show="scope.row.entry_limit < 0">此人不限制奖分上限</div>
-								</template>
-							</el-table-column>
-						</el-table-column>
-						<el-table-column>
-							<template slot="header" slot-scope="scope">
-								<span>奖扣目标</span>
-								<el-tooltip placement="top">
-									<div slot="content">
-										积分是否能落地,奖扣分的执行最为关键。赋予一定的人员奖扣分任务,比如经理,主管,积分专员,行政人事等,更利于整个积分制管理的落地和实施。
-									</div>
-									<span class="tips">?</span>
-								</el-tooltip>
-							</template>
-							<el-table-column label="奖分目标">
-								<template slot-scope="scope">
-									<span @click="open_bonus_deducted(scope.row)">
-										<div
-											v-for="(item, index) in scope.row.reward_task_monthly"
-											:key="index"
-											v-show="item.name == 'B分' && item.point != 0"
-											class="cursor_pointer"
-										>
-											{{ item.point }}
-										</div>
-										<div
-											v-for="(item, index) in scope.row.reward_task_monthly"
-											:key="index + ':'"
-											v-show="item.name == 'B分' && item.point == 0"
-											class="cursor_pointer"
-											style="text-decoration:underline"
-										>
-											未设置
-										</div>
-									</span>
-								</template>
-							</el-table-column>
-							<el-table-column label="扣分目标">
-								<template slot-scope="scope">
-									<span @click="open_bonus_deducted(scope.row)">
-										<div
-											v-for="(item, index) in scope.row.deduct_task_monthly"
-											:key="index"
-											v-show="item.name == 'B分' && item.point != 0"
-											class="cursor_pointer"
-										>
-											{{ item.point }}
-										</div>
-										<div
-											v-for="(item, index) in scope.row.deduct_task_monthly"
-											:key="index + '::'"
-											v-show="item.name == 'B分' && item.point == 0"
-											class="cursor_pointer"
-											style="text-decoration:underline"
-										>
-											未设置
-										</div>
-									</span>
-								</template>
-							</el-table-column>
-							<el-table-column label="奖扣次数">
-								<template slot-scope="scope">
-									<div @click="open_bonus_deducted(scope.row)" v-show="scope.row.exec_count == 0" class="cursor_pointer" style="text-decoration:underline">
-										未设置
-									</div>
-									<div @click="open_bonus_deducted(scope.row)" v-show="scope.row.exec_count != 0" class="cursor_pointer">{{ scope.row.exec_count }}</div>
-								</template>
-							</el-table-column>
-							<el-table-column label="每少一次扣">
-								<template slot-scope="scope">
-									<div @click="open_bonus_deducted(scope.row)" v-show="scope.row.exec_count_point == 0" class="cursor_pointer" style="text-decoration:underline">
-										未设置
-									</div>
-									<div @click="open_bonus_deducted(scope.row)" v-show="scope.row.exec_count_point != 0">{{ scope.row.exec_count_point }}</div>
-								</template>
-							</el-table-column>
-							<el-table-column label="奖扣比例">
-								<template slot-scope="scope">
-									<div @click="open_bonus_deducted(scope.row)" v-show="scope.row.reward_ratio == 0" class="cursor_pointer" style="text-decoration:underline">
-										未设置
-									</div>
-									<div @click="open_bonus_deducted(scope.row)" v-show="scope.row.reward_ratio != 0" class="cursor_pointer">{{ scope.row.reward_ratio }}</div>
-								</template>
-							</el-table-column>
-							<el-table-column label="不达标扣">
-								<template slot-scope="scope">
-									<div
-										@click="open_bonus_deducted(scope.row)"
-										v-show="scope.row.reward_ratio_point == 0"
-										class="cursor_pointer"
-										style="text-decoration:underline"
-									>
-										未设置
-									</div>
-									<div @click="open_bonus_deducted(scope.row)" v-show="scope.row.reward_ratio_point != 0" class="cursor_pointer">
-										{{ scope.row.reward_ratio_point }}
-									</div>
-								</template>
-							</el-table-column>
-						</el-table-column>
-						<template slot="empty">
-							<noData :isSolt="true">
-								<template v-slot:default>
-									<div>还没有{{ item_info.name }},<span style="color:#26A2FF;cursor:pointer;" @click="add_item">去添加>></span></div>
-								</template>
-							</noData>
-						</template>
-					</el-table>
-				</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"
-				:can_select_dept="false"
-				@confirm="add_employee_confirm"
-			></EmployeeSelector>
-			<span slot="footer">
-				<el-button @click="publicClose()">取消</el-button>
-				<!-- 积分负责人调用单次的添加接口 -->
-				<!-- <el-button type="primary" :loading="setUser_loading" v-if="item_info.code == 'ding_admin'"  @click="sub_add_employee2">完成</el-button> -->
-				<!-- 其他可批量 -->
-				<el-button type="primary" :loading="setUser_loading"   @click="sub_add_employee">完成</el-button>
-			</span>
-		</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">
-		    <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: '请输入', trigger: 'blur'}]">
-		        <el-input v-model="item.point" type="Number"></el-input>
-		      </el-form-item>
-		    </span>
-		    <el-form-item label="每月奖分上限" :rules="[{required: true, message: '请输入', trigger: 'blur'}]">
-		      <el-input v-model="integral_limit_form.entry_limit" type="Number"></el-input>
-		    </el-form-item>
-		    <el-form-item style="text-align: right; margin-bottom: 0">
-		      <el-button @click="integral_limit_show = false">取消</el-button>
-		      <el-button type="primary" :loading="integral_loading" @click="sub_employee_limit">确定</el-button>
-		    </el-form-item>
-		  </el-form>
-		</el-dialog>
-		
-		<el-dialog title="设置管理范围" :visible.sync="management_scope_show"  :before-close="publicClose2"  top="5vh"  width="700px">
-		  <EmployeeSelector 
-		  v-if="management_scope_show" 
-		  ref="Employee2" 
-		  :user_no_select="false" 
-		  :my_no_select="my_no_select"
-		  :selected="management_scope_arr" 
-		  :can_select_dept="false" 
-		  @confirm="management_scope_confirm">
-		  </EmployeeSelector>
-		  <span slot="footer">
-		    <el-button @click="publicClose2()">取消</el-button>
-		    <el-button type="primary" :loading="scope_loading" @click="sub_management_scope">完成</el-button>
-		  </span>
-		</el-dialog>
-		
-		<el-dialog
-		  title="B分奖扣任务"
-		  :visible.sync="bonus_deducted_show"
-		  width="600px">
-		  <el-form :model="integral_limit_form" ref="integral_limit_form" :rules="integral_limit_rules" label-width="130px" v-loading="bonus_deducted_loading">
-		    <span v-for="(item,index) in integral_limit_form.reward_task_monthly" :key="index" v-show="item.name == 'B分'">
-		      <el-form-item>
-		        <template slot="label">
-		          <span>月奖分任务</span>
-		          <el-tooltip placement="top">
-		            <div slot="content" style="width: 300px;">对奖分分值作任务要求。未达分值任务的按差额扣分<br />举例说明:奖分任务1000,实际奖分980(差额20分),则该执行人员将被扣20分。反之,如实际奖分达到或超出1000分,不对执行人员实行扣分</div>
-		            <span class="tips">?</span>
-		          </el-tooltip>
-		        </template>
-		        <el-input v-model="item.point" type="Number" placeholder="请输入数值"></el-input>
-		      </el-form-item>
-		    </span>
-		    <span v-for="(item,index) in integral_limit_form.deduct_task_monthly" :key="item.name" v-show="item.name == 'B分'">
-		      <el-form-item style="margin-bottom: 0;">
-		        <template slot="label">
-		          <span>月扣分任务</span>
-		          <el-tooltip placement="top">
-		            <div slot="content" style="width: 300px;">对扣分分值作任务要求。未达分值任务的按差额扣分<br />举例说明:扣分任务100,实际扣分80(差额20分),则该执行人员将被扣20分。反之,如实际扣分达到或超出100分,不对执行人员实行扣分</div>
-		            <span class="tips">?</span>
-		          </el-tooltip>
-		        </template>
-		        <el-input v-model="item.point" type="Number" placeholder="请输入数值"></el-input>
-		      </el-form-item>
-		    </span>
-		    <el-form-item>
-		      <div style="font-size: 12px; color: #909399; line-height: 20px;">
-		        设置后,奖分与扣分目标其中有一项未达标,系统将自动扣除差额分值;<br />例如,A设置了月奖分目标100和月扣分目标100,到了月底,奖了80和扣了30,那该管理者将被扣90B分。
-		      </div>
-		    </el-form-item>
-		
-		    <el-form-item prop="exec_count">
-		      <template slot="label">
-		        <span>月奖扣次数</span>
-		        <el-tooltip placement="top">
-		          <div slot="content" style="width: 300px;">对奖分和扣分的执行次数作任务要求<br />举例说明:奖扣次数任务100,实际执行次数95(差5次),假如每少一次扣5分,则该执行人员将被扣5*5=25分。反之,如果任务达标,不对执行人员实行扣分</div>
-		          <span class="tips">?</span>
-		        </el-tooltip>
-		      </template>
-		
-		      <el-input v-model="integral_limit_form.exec_count" type="Number" placeholder="请输入数值"></el-input>
-		    </el-form-item>
-		    <el-form-item prop="exec_count_point">
-		      <template slot="label">
-		        <span>每少一次奖扣</span>
-		        <el-tooltip placement="top">
-		          <div slot="content" style="width: 300px;">扣x分(x为输入框)<br />奖扣次数未达任务要求的,每少一次扣对应分值</div>
-		          <span class="tips">?</span>
-		        </el-tooltip>
-		      </template>
-		      <el-input v-model="integral_limit_form.exec_count_point" type="Number" placeholder="请输入数值"></el-input>
-		    </el-form-item>
-		    <el-form-item prop="reward_ratio">
-		      <template slot="label">
-		        <span>月奖扣比例</span>
-		        <el-tooltip placement="top">
-		          <div slot="content" style="width: 300px;">对奖分和扣分的比例作任务要求<br />举例说明:奖扣比例任务10:1,实际执行奖扣比例11:1(管理者当老好人,不敢执行扣分,导致扣分占比过低),则视为未完成,该执行人员将被扣对应分值。反之比例大于10:1,任务为达标,不对执行人员实行扣分</div>
-		          <span class="tips">?</span>
-		        </el-tooltip>
-		      </template>
-		      <el-input style="width: 100px;" type="Number" disabled placeholder="1" ></el-input>:<el-input v-model="integral_limit_form.reward_ratio" style="width: 100px;" type="Number" placeholder="请输入数值" ></el-input>
-		    </el-form-item>
-		    <el-form-item prop="reward_ratio_point">
-		      <template slot="label">
-		        <span>比例未达标</span>
-		        <el-tooltip placement="top">
-		          <div slot="content" style="width: 300px;">扣x分(x为输入框)<br />完成奖扣比例任务的,按对应分值扣分</div>
-		          <span class="tips">?</span>
-		        </el-tooltip>
-		      </template>
-		      <el-input v-model="integral_limit_form.reward_ratio_point" type="Number" placeholder="请输入数值"></el-input>
-		    </el-form-item>
-		    <el-form-item style=" text-align: right; margin-bottom: 0;">
-		      <el-button @click="bonus_deducted_colse('integral_limit_form')">取消</el-button>
-		      <el-button type="primary" :loading="bonus_loading" @click="sub_bonus_deducted('integral_limit_form')">确定</el-button>
-		    </el-form-item>
-		  </el-form>
-		</el-dialog>
-	
-	</div>
-</template>
-
-<script>
-import EmployeeSelector from '@/components/EmployeeSelector.vue';
-import noData from '@/components/noData';
-  const minimum = (rule, value,callback)=>{
-    if (value < 0){
-      callback(new Error('请输入正确的数值'))
-    }else {
-      callback()
-    }
-  }
-export default {
-	data() {
-		return {
-			role_list:[],
-			table_list: [],
-			tips_show: false,
-			role_loading: false,
-			table_loading: false,
-			setUser_loading:false,
-			item_info: {},
-			rules_employee_arr: { employee: [], dept: [] },
-
-			//添加人员相关
-			add_employee_show: false,
-			add_employee_form: { employee_ids: [] },
-			employee_arr:[],
-
-			radioVal: '',
-			// 设置积分相关
-			integral_limit_show:false,
-			management_scope_show:false,
-			integral_limit_loading:false,
-			integral_limit_form:{},
-			management_scope_arr: {employee: [], dept: []},
-			scope_loading:false,
-			integral_loading:false,
-			
-			
-			// 设置奖扣任务相关
-			bonus_deducted_show:false,
-			bonus_deducted_loading:false,
-			bonus_loading:false,
-			integral_limit_rules:{
-			  // exec_count:[
-			  //   { required: true, validator: minimum, trigger: 'blur' },
-			  // ],
-			  // exec_count_point:[
-			  //   { required: true, validator: minimum, trigger: 'blur' },
-			  // ],
-			  // reward_ratio:[
-			  //   { required: true, validator: minimum, trigger: 'blur' },
-			  // ],
-			  // reward_ratio_point:[
-			  //   { required: true, validator: minimum, trigger: 'blur' },
-			  // ],
-			},
-			my_no_select:'',//设置人的ID
-			isStart:false,//是否是创始人或者积分负责人
-		};
-	},
-	components: { EmployeeSelector, noData },
-	created() {
-		this.get_role_list();
-		// 判断是否是创始人或者积分负责人
-		var userData=this.$getUserData();
-		if(userData){
-			  userData.employee_detail.role_list.forEach(item => {
-				  if (item.name == 'creator') { 
-					 this.isStart = true;
-				  }
-			  });
-		}
-	},
-	mounted() {
-		if (localStorage.getItem('framework')) {
-			this.tips_show = false;
-		} else {
-			this.tips_show = true;
-		}
-	},
-	methods: {
-		open_bonus_deducted(item){
-		  this.bonus_deducted_show = true
-		  this.set_mployee_limit_id = item.id
-		  this.get_employee_limit(item.id)
-		},
-		sub_bonus_deducted(fromName){
-		  this.bonus_loading=true;	
-		  this.integral_limit_form.employee_id = this.set_mployee_limit_id
-		  this.$refs[fromName].validate((valid) => {
-		    if (valid) {
-		      this.$axios('post','/api/integral/employee/limit',this.integral_limit_form).then((res) => {
-		        if (res.data.code == 1) {
-		          this.$message.success(res.data.msg)
-		          setTimeout(() => {
-		            this.get_table_list()
-		          }, 1000);
-		          this.bonus_deducted_show = false
-		        }
-		      }).finally(() => { this.bonus_loading=false;})
-		    }
-		  });
-		},
-		bonus_deducted_colse(fromName){
-		  this.bonus_deducted_show = false
-		  this.$refs[fromName].resetFields()
-		},
-		//设置管理范围
-		sub_management_scope(){
-		  this.scope_loading=true;
-		  this.$refs.Employee2.confirm();//调用组件的confirm();
-		  this.$axios('post','/api/employee/scope',{employee_id: this.list_info.id,id: this.management_arr}).then((res) => {
-		    if (res.data.code == 1) {
-		      this.$message.success("设置成功");
-		      this.table_list.forEach(element => {
-		        if (element.id == this.list_info.id) {
-		          element.manage_scope_count = this.management_arr.length
-		        }
-		      });
-		      this.management_scope_show = false
-		    }
-		  }).finally(() => { this.scope_loading=false;})
-		},
-		//添加编辑管理范围
-		management_scope_confirm(val){
-		  this.management_arr = []
-		  val.employee.forEach(element => {
-		    this.management_arr.push(element.id)
-		  });
-		},
-		add_management_scope(item){
-		  this.list_info = item;
-		  this.my_no_select=item.id;
-		  this.management_scope_arr.employee=[];
-		  this.$axios('get','/api/employee/info',{id: this.list_info.id}).then((res) => {
-		    if (res.data.code == 1) {
-		      this.management_scope_arr.employee = res.data.data.employee_detail.manage_scope||[];//获取当前数据的管理范围
-		      this.management_scope_show = true
-		    }
-		  }).finally(() => {
-		    this.role_loading = false
-		  })
-		},
-		sub_employee_limit(){
-		  this.integral_loading=true;
-		  this.integral_limit_form.employee_id = this.set_mployee_limit_id
-		  this.$axios('post','/api/integral/employee/limit',this.integral_limit_form).then((res) => {
-		    if (res.data.code == 1) {
-		      this.$message.success(res.data.msg)
-		      this.get_table_list()
-		      this.integral_limit_show = false
-		    }
-		  }).finally(() => {this.integral_loading = false;});
-		},
-		open_integral_limit(item){
-		  this.integral_limit_show = true
-		  this.set_mployee_limit_id = item.id
-		  this.get_employee_limit(item.id);
-		},
-		get_employee_limit(id){
-		  this.integral_limit_loading = true
-		  this.$axios('get','/api/integral/employee/limit',{employee_id: id}).then((res) => {
-		    if (res.data.code == 1) {
-		       var item = res.data.data;
-				if (item.point_limit == null || item.point_limit == undefined||item.point_limit.length==0) {
-					item.point_limit = [{ name: 'A分', point: '0', pt_id: this.$getTyps('AF').id }, { name: 'B分', point: '0', pt_id: this.$getTyps('BF').id }];
-				}
-				if (item.deduct_task_monthly == null || item.deduct_task_monthly == undefined||item.deduct_task_monthly.length==0) {
-					item.deduct_task_monthly = [{ name: 'A分', point: '0', pt_id: this.$getTyps('AF').id }, { name: 'B分', point: '0', pt_id: this.$getTyps('BF').id }];
-				}
-				if (item.reward_task_monthly == null || item.reward_task_monthly == undefined||item.reward_task_monthly.length==0) {
-					item.reward_task_monthly = [{ name: 'A分', point: '0', pt_id: this.$getTyps('AF').id }, { name: 'B分', point: '0', pt_id: this.$getTyps('BF').id }];
-				}
-				this.integral_limit_form=item
-		    }
-		  }).finally(() => {
-		    this.integral_limit_loading = false
-		  })
-		},
-		// 添加积分负责人专属
-		sub_add_employee2(form) {
-			  var that=this;
-			   this.$refs.Employee.confirm();//调用组件的confirm();
-			   let data ={};
-			   if(that.employee_arr.length>0){
-				   data.role_id=this.item_info.id;
-				   data.employee_id=that.employee_arr[0]
-			   }else{
-				    this.$message.error('未选择人员');
-					return;
-				}	
-			 this.setUser_loading=true;
-			 this.$nextTick(()=>{
-				 this.$axios('post','/api/role/user/add',data).then((res) => {
-				   if (res.data.code == 1) {
-					 this.$message.success('已经添加成功,请稍后重新进来查看')
-					 this.add_employee_show= false
-					 this.open_right(this.item_info);
-				   }
-				 }).finally(() => {
-					this.setUser_loading = false;
-				 })
-			 }) 
-		},
-		// 其他角色添加人员
-		sub_add_employee(form) {
-			  var that=this;
-			   this.$refs.Employee.confirm();//调用组件的confirm();
-			   let data = {target:[]}
-			   if(that.employee_arr.length>0){
-				   that.employee_arr.forEach(element => {
-				     data.target.push({role_id: this.item_info.id,employee_id: element})
-				   });
-			   }else{
-				    this.$message.error('未选择人员');
-					return;
-				}	
-			 this.setUser_loading=true;
-			 this.$nextTick(()=>{
-				 this.$axios('post','/api/role/user/many',data).then((res) => {
-				   if (res.data.code == 1) {
-					 this.$message.success('已经添加成功,请稍后重新进来查看')
-					 this.add_employee_show= false
-					 this.open_right(this.item_info);
-				   }
-				 }).finally(() => {
-					this.setUser_loading = false;
-				 })
-			 }) 
-		},
-		
-		add_employee_confirm(val) {
-			this.employee_arr = []
-			val.employee.forEach(element => {
-			   this.employee_arr.push(element.id)
-			});
-		},
-	
-		//关闭弹窗
-		publicClose() {
-			this.$refs.Employee.close()
-			this.add_employee_show = false;
-		},
-		publicClose2() {
-			this.$refs.Employee2.close()
-			this.management_scope_show = false;
-		},
-		handleSelectionChange() {},
-		del_item() {
-			var userData=this.$getUserData();
-			if (!this.radioVal) {
-				this.$message.error('请选择要删除的人员');
-				return false;
-			}
-			if(this.radioVal==userData.id){
-				this.$message.error('不能删除自己');
-				return false;
-			}
-			this.$confirm('确定要删除该人员?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			}).then(() => {
-				this.$axios('post','/api/role/user/del',{role_id: this.item_info.id,employee_id: this.radioVal}).then(res => {
-					if (res.data.code == 1) {
-						this.$message.success(res.data.msg);
-						this.get_table_list();
-					}
-				}).finally(()=>{
-					this.radioVal="";
-				})
-			});
-		},
-		add_item() {
-			this.add_employee_show = true;
-		},
-		get_role_list() {
-			this.role_loading = true;
-			this.$axios('get','/api/role/list').then(res => {
-					if (res.data.code == 1) {
-						this.role_list = res.data.data.list;
-						this.open_right(this.role_list[0]);
-					}
-				})
-				.finally(() => {
-					this.role_loading = false;
-				});
-		},
-		open_right(data) {
-			this.item_info = data;
-			this.get_table_list();
-		},
-		get_table_list() {
-			this.table_loading = true;
-			var that = this;
-			this.table_list=[];
-			this.$axios('get','/api/role/user',{role_id: this.item_info.id}).then(res => {
-					if (res.data.code == 1) {
-						var list = res.data.data.list;
-						list.forEach(item => {
-							if (item.point_limit == null || item.point_limit == undefined||item.point_limit.length==0) {
-								item.point_limit = [{ name: 'A分', point: '0', pt_id: that.$getTyps('AF').id }, { name: 'B分', point: '0', pt_id: that.$getTyps('BF').id }];
-							}
-							if (item.deduct_task_monthly == null || item.deduct_task_monthly == undefined||item.deduct_task_monthly.length==0) {
-								item.deduct_task_monthly = [{ name: 'A分', point: '0', pt_id: that.$getTyps('AF').id }, { name: 'B分', point: '0', pt_id: that.$getTyps('BF').id }];
-							}
-							if (item.reward_task_monthly == null || item.reward_task_monthly == undefined||item.reward_task_monthly.length==0) {
-								item.reward_task_monthly = [{ name: 'A分', point: '0', pt_id: that.$getTyps('AF').id }, { name: 'B分', point: '0', pt_id: that.$getTyps('BF').id }];
-							}
-						});
-						this.table_list = list||[];
-					}
-				})
-				.finally(() => {
-					this.table_loading = false;
-				});
-		},
-		// 关闭提示语
-		tips_close() {
-			localStorage.setItem('framework', 'true');
-			this.tips_show = false;
-		}
-	}
-};
-</script>
-
-<style scoped="scoped">
-::v-deep .el-radio .el-radio__label {
-	display: none;
-}
-.tips {
-	background: #dcdfe6;
-	border-radius: 50%;
-	width: 14px;
-	height: 14px;
-	color: #fff;
-	display: inline-block;
-	font-size: 12px;
-	line-height: 14px;
-	text-align: center;
-}
-.name {
-	font-size: 18px;
-	margin-bottom: 5px;
-}
-.user_text {
-	font-size: 12px;
-}
-.cursor_pointer {
-	cursor: pointer;
-}
-</style>

+ 0 - 950
src789/views/set/rule.vue

@@ -1,950 +0,0 @@
-<template>
-	<div class="all-box">
-		<!-- 头部提示 -->
-		<el-alert class="diy-tip" title="如何使用积分规则?" type="success" @close="tips_close" v-if="tips_show" description show-icon>
-			<p>先【添加规则分类】,再【添加规则】</p>
-		</el-alert>
-		<div class="all">
-			<div class="flex-box" v-loading="rule_loading">
-				<div class="terr-left">
-					<el-button size="medium" @click="add_class" type="primary">+ 添加规则分类</el-button>
-					<div class="rule_class_box">
-						<el-tree
-							accordion
-							:data="rule_tree"
-							 class="cate-tree"
-							:props="defaultProps"
-							:highlight-current="true"
-							@node-click="handleNodeClick"
-						></el-tree>
-					</div>
-				</div>
-				<div class="terr-right border-right flex-1">
-					<div class="flex-box flex-v-ce">
-						<div class="name">{{ selectItem.name }}</div>
-						<el-button size="medium" plain v-if="selectItem.id" @click="edit_class">编辑</el-button>
-					</div>
-					<div class="flex-box btns flex-v-ce">
-						<el-button size="small" @click="del_item" type="danger" plain>批量删除</el-button>
-						<el-button size="small" @click="add_rule" type="primary">添加规则</el-button>
-						<el-button size="small" type="success" @click="import_rules_show = true" plain>导入规则</el-button>
-					</div>
-					<el-table stripe ref="multipleTable" :data="item_list" tooltip-effect="dark" @selection-change="handleSelectionChange" @row-click="editDetails" align="center">
-						<el-table-column type="selection" width="55"></el-table-column>
-						<el-table-column prop="remark" label="内容" align="left"></el-table-column>
-						<el-table-column label="分值" align="center">
-							<template slot-scope="scope">
-								<div v-if="scope.row.range_type == 1">
-									<span :class="scope.row.min_point > 0 ? 'red' : 'green'">{{ scope.row.min_point }} {{ scope.row.pt_Obj.name }}</span>
-								</div>
-								<div v-if="scope.row.range_type == 2">
-									<span :class="scope.row.min_point > 0 ? 'red' : 'green'">{{ scope.row.min_point }}</span>
-									至
-									<span :class="scope.row.max_point > 0 ? 'red' : 'green'">{{ scope.row.max_point }} {{ scope.row.pt_Obj.name }}</span>
-								</div>
-							</template>
-						</el-table-column>
-						<template slot="empty">
-							<noData></noData>
-						</template>
-					</el-table>
-				</div>
-			</div>
-		</div>
-		<!-- 编辑添加分类 -->
-		<el-dialog :title="class_type == 'add' ? '添加规则分类' : '编辑规则分类'" :visible.sync="class_show" @close="add_dept_close('dept_formdata')" :close-on-click-modal="false" width="500px">
-			<el-form :model="dept_formdata" ref="dept_formdata" :rules="dept_formdata_rules" label-width="80px">
-				<el-form-item label="规则分类" prop="name"><el-input v-model="dept_formdata.name"></el-input></el-form-item>
-				<el-form-item label="上级分类">
-					<el-cascader
-						ref="dept"
-						v-model="dept_formdata.pid"
-						:options="rule_tree"
-						:props="{ checkStrictly: true, label: 'name', value: 'id', children: 'child' }"
-						clearable
-						filterable
-					></el-cascader>
-				</el-form-item>
-				<div class="flex-box">
-					<el-button type="danger" @click="del_dept" v-show="class_type == 'edit'">删除分类</el-button>
-					<div class="flex-1"></div>
-					<el-button @click="add_dept_close('dept_formdata')">取消</el-button>
-					<el-button type="primary" @click="submit_add_dept('dept_formdata')" :loading="dept_loading">确定</el-button>
-				</div>
-			</el-form>
-		</el-dialog>
-
-		<!-- 添加编辑规则 -->
-		<el-dialog :title="rule_type == 'add' ? '添加规则' : '编辑规则'" :visible.sync="rule_show" :close-on-click-modal="false" width="600px">
-			<el-form :model="rules_detail_form" ref="rules_detail_form" :rules="rules" label-width="80px">
-				<el-form-item label="规则内容" prop="remark">
-					<el-input v-model="rules_detail_form.remark" placeholder="请输入规则内容" type="textarea" :rows="3" maxlength="100" show-word-limit></el-input>
-				</el-form-item>
-				<el-form-item label="所属分类" prop="rule_id">
-					<div style="position: relative;">
-						<div
-							style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 9;"
-							@click="not_data"
-							v-show="rule_tree !== null && rule_tree.length == 0"
-						></div>
-						<el-cascader
-							ref="dept2"
-							placeholder="请选择分类"
-							v-model="rules_detail_form.rule_id"
-							:options="rule_tree"
-							:props="{ checkStrictly: true, label: 'name', value: 'id', children: 'child' }"
-							clearable
-							filterable
-						></el-cascader>
-					</div>
-				</el-form-item>
-				<el-form-item label="规则类型" prop="pt_id">
-					<el-radio v-model="rules_detail_form.pt_id" :label="item.id" v-for="(item, index) in point_types" :key="index" v-show="item.name !== '绩效分'">
-						{{ item.name }}
-					</el-radio>
-				</el-form-item>
-				<el-form-item label="规则积分" prop="range_type">
-					<el-radio-group v-model="rules_detail_form.range_type">
-						<el-radio :label="item.value" v-for="(item, index) in range_type_arr" :key="index">{{ item.name }}</el-radio>
-					</el-radio-group>
-				</el-form-item>
-				<div class="flex-box flex-v-ce">
-					<el-form-item prop="min_point2" class="select_width">
-						<el-input placeholder="请输入分值" v-model.number="rules_detail_form.min_point2" type="age" class="input-with-select">
-							<el-select v-model="integral_select_name1" slot="prepend" placeholder="请选择类型">
-								<el-option v-for="(item, index) in integral_select" :key="index" :label="item.name" :value="item.value"></el-option>
-							</el-select>
-						</el-input>
-					</el-form-item>
-					<div v-if="rules_detail_form.range_type == 2" style="position: relative;bottom: 10px;padding: 0 10px;">至</div>
-					<el-form-item prop="max_point2" v-if="rules_detail_form.range_type == 2" class="form-right select_width">
-						<el-input placeholder="请输入分值" v-model.number="rules_detail_form.max_point2" type="age" class="input-with-select">
-							<el-select v-model="integral_select_name2" slot="prepend" placeholder="请选择类型">
-								<el-option v-for="(item, index) in integral_select" :key="index" :label="item.name" :value="item.value"></el-option>
-							</el-select>
-						</el-input>
-					</el-form-item>
-				</div>
-<!-- 			<el-form-item prop="min_point">
-					<el-row :gutter="20" class="select_width">
-						<el-col :span="11">
-							<el-input
-								placeholder="请输入分值"
-								v-model.number="rules_detail_form.min_point"
-								type="age" class="input-with-select"
-							>
-								<el-select v-model="integral_select_name1" slot="prepend" placeholder="请选择类型">
-									<el-option v-for="(item, index) in integral_select" :key="index" :label="item.name" :value="item.value"></el-option>
-								</el-select>
-							</el-input>
-						</el-col>
-						<el-col :span="1" v-show="rules_detail_form.range_type == 2">至</el-col>
-						<el-col :span="11" v-show="rules_detail_form.range_type == 2">
-							<el-input
-								placeholder="请输入分值"
-								v-model.number="rules_detail_form.max_point"
-								type="age"	class="input-with-select"
-							>
-								<el-select v-model="integral_select_name2" slot="prepend" placeholder="请选择类型">
-									<el-option v-for="(item, index) in integral_select" :key="index" :label="item.name" :value="item.value"></el-option>
-								</el-select>
-							</el-input>
-						</el-col>
-					</el-row>
-				</el-form-item> -->
-				<div class="flex-box flex-v-ce">
-					<el-button type="danger" @click="del_rule" :loading="delRule_loading" v-show="rule_type == 'edit'">删除规则</el-button>
-					<div class="flex-1"></div>
-					<el-button @click="rule_close('rules_detail_form')">取消</el-button>
-					<el-button type="primary" v-show="rule_type == 'add'" :loading="rule_loading2" @click="add_submit_rule('rules_detail_form')">确定</el-button>
-					<el-button type="primary" v-show="rule_type == 'edit'" :loading="rule_loading2" @click="edit_submit_rule('rules_detail_form')">确定</el-button>
-				</div>
-			</el-form>
-		</el-dialog>
-
-		<!-- 导入规则 -->
-		<el-dialog title="导入规则" :visible.sync="import_rules_show" width="500px" @before-close="close_import">
-			<el-row>
-				<el-col :span="12">
-					<div class="text-center">
-						<p>1、下载规则模版,填写好规则</p>
-						<p><img src="@/assets/image/rules_mould.png" alt="" /></p>
-						<p>规则表</p>
-						<p>
-							<a target="_blank" :href="downloadUrl"><el-button type="primary">下载模板</el-button></a>
-						</p>
-					</div>
-				</el-col>
-				<el-col :span="12">
-					<div class="text-center">
-						<p>2、上传填好的规则表</p>
-						<p><img src="@/assets/image/rules_mould1.png" alt="" /></p>
-						<p>仅支持xls、xlsx格式文件</p>
-						<el-upload
-							class="upload-demo"
-							:headers="ATOKEN"
-							ref="upload"
-							:limit="1"
-							:action="action"
-							:on-preview="handlePreview"
-							:on-remove="handleRemove"
-							:on-success="handleSuccess"
-							:before-upload="beforeFilesUpload"
-							:file-list="fileList"
-						>
-							<el-button slot="trigger" type="primary">选取文件</el-button>
-						</el-upload>
-						<!-- <p><el-button type="primary" @click="submitUpload" :loading="save_loading" v-show="import_btn_show" block>导入</el-button></p> -->
-					</div>
-				</el-col>
-			</el-row>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-import noData from '@/components/noData';
-export default {
-	data() {
-		return {
-			action:process.env.VUE_APP_BASE_API+'api/rule/import',
-			downloadUrl:process.env.VUE_APP_BASE_API+'api/download/rule_item',
-			ATOKEN: { 'A-TOKEN': this.$getToken(),'Accept':'application/vnd.test.v2+json' },
-			tips_show: true,
-			rule_loading: false,
-			rule_tree: [],
-			item_list: [],
-			all_item_list: [],
-			defaultProps: {
-				id: 'id',
-				children: 'child',
-				label: 'name'
-			},
-			selectItem: { name: '积分规则' }, //选择的分类
-			//添加分类
-			class_show: false,
-			delRule_loading:false,
-			dept_formdata_rules: {
-				name: [
-					{
-						required: true,
-						message: '请输入规则分类',
-						trigger: 'blur'
-					},
-					{
-						min: 2,
-						max: 20,
-						message: '长度在 2 到 20 个字符',
-						trigger: 'blur'
-					}
-				]
-			},
-			dept_formdata: {
-				name: '',
-				pid: '0',
-				cycle_type: '1'
-			},
-			class_type: 'add',
-			dept_loading:false,
-
-			// 规则相关
-			del_item_id: [], //选择规则ID集合
-			rule_loading2: false,
-			rule_type: 'add',
-			rule_show: false,
-			rules_detail_form: {
-				rule_id: '',
-				range_type: '1',
-				prize_type: '0',
-				min_point: 0,
-				max_point: 0,
-				min_point2: 0,
-				max_point2: 0,
-				remark: '',
-				is_attendance: '0',
-				cycle_type: '1',
-				pt_id: 0
-			},
-			rules: {
-				remark: [
-					{
-						required: true,
-						message: '请输入规则名称',
-						trigger: 'blur'
-					}
-				],
-				rule_id: [
-					{
-						required: true,
-						message: '请选择分类',
-						trigger: 'change'
-					}
-				],
-				// min_point2:[{ required: true, message: '分值不能为空'},{ pattern: /^[1-9]\d*$/, message: '分值必须为数字值'}],
-				// max_point2:[{ required: true, message: '分值不能为空'},{ pattern: /^[1-9]\d*$/, message: '分值必须为数字值'}],
-			},
-			integral_select_name1: '1',
-			integral_select_name2: '1',
-			point_types: [],
-			range_type_arr: [
-				{
-					name: '固定分值',
-					value: '1'
-				},
-				{
-					name: '范围分值',
-					value: '2'
-				}
-			],
-			integral_select: [
-				{
-					name: '奖分',
-					value: '1'
-				},
-				{
-					name: '扣分',
-					value: '2'
-				}
-			],
-			//导入规则
-			import_rules_show: false,
-			save_loading: false,
-			import_btn_show: false,
-			fileList: [],
-			file: null,
-			flName:'',
-		};
-	},
-	components: {
-		noData
-	},
-	watch:{
-		'dept_formdata.pid'(val, old_val) {
-			this.$nextTick(()=>{
-				this.$refs.dept.dropDownVisible = false;
-			})
-		},		
-		'rules_detail_form.rule_id'(val, old_val) {
-			this.$nextTick(()=>{
-				this.$refs.dept2.dropDownVisible = false;
-			})
-		}
-	},
-	created() {
-		this.point_types = this.$getTyps().reverse()
-	},
-	mounted() {
-		this.$nextTick(function() {
-			if (localStorage.getItem('rule')) {
-				this.tips_show = false;
-			} else {
-				this.tips_show = true;
-			}
-		});
-		var that=this;
-		// setTimeout(function(){
-			that.getData();
-		// },1000);
-	},
-	methods: {
-		// 导入相关
-		close_import() {
-			this.import_rules_show = false;
-			this.import_btn_show = false;
-			this.$refs.upload.clearFiles();
-		},
-		submitUpload() {
-			this.save_loading = true;
-			let params = {
-				file: this.file
-			};
-			this.$axios('post','/api/rule/import', params,).then(res => {
-					if (res.data.code == 1) {
-						this.close_import();
-						this.$message.success({ message: res.data.msg });
-						this.getData();
-					} else {
-						this.$message({ type: 'error', message: res.data.msg });
-					}
-				}).finally(() => {
-					this.save_loading = false;
-				});
-		},
-		handleSuccess(response) {
-			if (response.code == 1) {
-				if(response.data.length>0){
-					var htmls=response.data;
-					var str="<div class='red'></div>";
-					htmls.forEach(item=>{
-						str+=`<div>${item.errors}</div>`;
-					})
-					this.close_import();
-					this.$notify.error({
-					          title: '导入错误',
-					          dangerouslyUseHTMLString: true,
-					          message: str,
-							  duration:0,
-							  offset:50,
-							  customClass:'notifyBox',
-					});
-				}else{
-						this.file = response.data;
-						this.$message.success({ message: response.msg });
-						this.getData();
-						this.close_import();
-				}
-			}
-		},
-		handleRemove(file, fileList) {
-			if (fileList !== null && fileList.length != 0) {
-				this.import_btn_show = true;
-			} else {
-				this.import_btn_show = false;
-			}
-		},
-		handlePreview(file) {
-			console.log(file);
-		},
-		imgChange(file, fileList) {
-			if (fileList !== null && fileList.length != 0) {
-				this.import_btn_show = true;
-			} else {
-				this.import_btn_show = false;
-			}
-		},
-		beforeFilesUpload(file) {
-			const $ext_list = ['xlsx', 'xls'];
-			let len = file.name.split('.').length - 1;
-			const $ext_name = file.name.split('.')[len];
-			if ($ext_list.indexOf($ext_name) != -1) {
-				this.import_btn_show = true;
-			} else {
-				this.$message.warning('文件格式上传错误,仅支持上传xlsx,xls)');
-				return false;
-			}
-		},
-
-		edit_submit_rule(form) {
-			let self = this;
-			self.$refs[form].validate(valid => {
-				if (valid) {
-					if(self.rules_detail_form.min_point2==0||!self.rules_detail_form.min_point2){
-						this.$message.error('请输入积分分值');
-						return
-					}
-					
-					self.rules_detail_form.min_point=self.rules_detail_form.min_point2;
-					self.rules_detail_form.max_point=self.rules_detail_form.max_point2;
-					if (self.integral_select_name1 != '1' && self.rules_detail_form.min_point >= 0) {
-						self.rules_detail_form.min_point = '-' + self.rules_detail_form.min_point;
-					}
-					if (self.integral_select_name2 != '1' && self.rules_detail_form.max_point >= 0) {
-						self.rules_detail_form.max_point = '-' + self.rules_detail_form.max_point;
-					}
-					if (self.rules_detail_form.range_type == 1) {
-						self.rules_detail_form.max_point = self.rules_detail_form.min_point;
-					}
-					if(Array.isArray(self.rules_detail_form.rule_id)){
-						self.rules_detail_form.rule_id=self.rules_detail_form.rule_id[self.rules_detail_form.rule_id.length-1];
-					}
-					if (parseFloat(self.rules_detail_form.min_point) > parseFloat(self.rules_detail_form.max_point)) {
-						this.$confirm(
-							'填写的规则积分是' +
-								self.rules_detail_form.min_point +
-								' ~ ' +
-								self.rules_detail_form.max_point +
-								',应该是 ' +
-								self.rules_detail_form.max_point +
-								' ~ ' +
-								self.rules_detail_form.min_point +
-								'吧?',
-							'提示',
-							{
-								confirmButtonText: '确定',
-								cancelButtonText: '取消',
-								type: 'warning'
-							}
-						)
-							.then(() => {
-								this.rule_loading2=true;
-								let min_point = self.rules_detail_form.min_point;
-								self.rules_detail_form.min_point = self.rules_detail_form.max_point;
-								self.rules_detail_form.max_point = min_point;
-								let data = self.rules_detail_form;
-								data.item_id = self.rules_detail_form.id;
-								if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
-									self.$message.error('积分不能为零');
-									this.rule_loading2=false;
-									return false;
-								}
-								this.$axios('post','/api/integral/rule/items/edit', data).then(res => {
-										if (res.data.code == 1) {
-											self.$message.success(res.data.msg);
-											self.getData();
-											self.rule_close(form);
-										}
-								}).finally(err=>{
-									this.rule_loading2=false;
-								});
-							
-							})
-					} else {
-						this.rule_loading2=true;
-						self.rules_detail_form.item_id = self.rules_detail_form.id;
-						let data = self.rules_detail_form;
-						data.item_id = self.rules_detail_form.id;
-						if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
-							self.$message.error('积分不能为零');
-							this.rule_loading2=false;
-							return false;
-						}
-						this.$axios('post','/api/integral/rule/items/edit', data).then(res => {
-								if (res.data.code == 1) {
-									self.$message.success(res.data.msg);
-									self.getData();
-									self.rule_close(form);
-								}
-							}).finally(() => {
-								this.rule_loading2 = false;
-							});
-					}
-				} else {
-					this.rule_loading2=false;
-					return false;
-				}
-			});
-		},
-		//添加规则
-		add_submit_rule(form) {
-			let self = this;
-			self.$refs[form].validate(valid => {
-				if (valid) {
-					self.rules_detail_form.min_point=self.rules_detail_form.min_point2;
-					self.rules_detail_form.max_point=self.rules_detail_form.max_point2;
-					if (self.integral_select_name1 != '1' && self.rules_detail_form.min_point >= 0) {
-						self.rules_detail_form.min_point = '-' + self.rules_detail_form.min_point;
-					}
-					if (self.integral_select_name2 != '1' && self.rules_detail_form.max_point >= 0) {
-						self.rules_detail_form.max_point = '-' + self.rules_detail_form.max_point;
-					}
-					if (self.rules_detail_form.range_type == 1) {
-						self.rules_detail_form.max_point = self.rules_detail_form.min_point;
-					}
-					if(self.rules_detail_form.min_point==0||!self.rules_detail_form.min_point||self.rules_detail_form.max_point==0||!self.rules_detail_form.max_point){
-						this.$message.error('请输入积分分值');
-						return
-					}
-					if(Array.isArray(self.rules_detail_form.rule_id)){
-						self.rules_detail_form.rule_id=self.rules_detail_form.rule_id[self.rules_detail_form.rule_id.length-1];
-					}
-					if (parseFloat(self.rules_detail_form.min_point) > parseFloat(self.rules_detail_form.max_point)) {
-						this.$confirm(
-							'填写的规则积分是' +self.rules_detail_form.min_point +' ~ ' +self.rules_detail_form.max_point +',应该是 ' +self.rules_detail_form.max_point +
-								' ~ ' +self.rules_detail_form.min_point +'吧?','提示',
-							{
-								confirmButtonText: '确定',
-								cancelButtonText: '取消',
-								type: 'warning'
-							}
-						).then(() => {
-							this.rule_loading2=true;
-							let min_point = self.rules_detail_form.min_point;
-							self.rules_detail_form.min_point = self.rules_detail_form.max_point;
-							self.rules_detail_form.max_point = min_point;
-							if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
-								self.$message.error('积分不能为零');
-								this.rule_loading2=false;
-								return false;
-							}
-							let data = {
-								items: [self.rules_detail_form]
-							};
-							this.$axios('post','/api/integral/rule/items', data).then(res => {
-									if (res.data.code == 1) {
-										self.$message.success(res.data.msg);
-										self.getData();
-										self.rule_close(form);
-									}
-								}).finally(() => {
-									this.rule_loading2 = false;
-								});
-						});
-					} else {
-						this.rule_loading2=true;
-						self.rules_detail_form.item_id = self.rules_detail_form.id;
-						
-						if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
-							self.$message.error('积分不能为零');
-							this.rule_loading2=false;
-							return false;
-						}
-						let data = {
-							items: [self.rules_detail_form]
-						};
-						this.$axios('post','/api/integral/rule/items', data).then(res => {
-								if (res.data.code == 1) {
-									self.$message.success(res.data.msg);
-									self.getData();
-									self.rule_close(form);
-								}
-							}).finally(() => {
-								this.rule_loading2 = false;
-							});
-					}
-				} else {
-					this.rule_loading2=false;
-					return false;
-				}
-			});
-		},
-		//删除规则
-		del_rule() {
-			let self = this;
-			let data = {
-				item_id: [this.rules_detail_form.id]
-			};
-			this.delRule_loading=true;
-			self.$confirm('此操作将永久删除该选项, 是否继续?', '提示').then(() => {
-					this.$axios('post','/api/integral/rule/items/destroy', data).then(res => {
-							if (res.data.code == 1) {
-								self.$message.success(res.data.msg);
-								self.rule_show = false;
-								self.getData(true);
-							}
-						}).finally(() => {
-							this.delRule_loading = false;
-					});
-			},(err)=>{
-				this.delRule_loading = false;
-			});
-		},
-		//关闭规则弹窗
-		rule_close(form) {
-			this.rule_show = false;
-			this.$refs[form].resetFields();
-		},
-		not_data() {
-			this.$confirm('暂时没有积分分类,是否前往添加?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			}).then(() => {
-					this.rule_show = false;
-					this.class_show = true;
-			})
-		},
-		add_rule() {
-			this.rule_show = true;
-			this.rule_type = 'add';
-			this.rules_detail_form = {
-				rule_id: '',
-				range_type: '1',
-				prize_type: '0',
-				min_point: '',
-				max_point: '',
-				min_point2: '',
-				max_point2: '',
-				remark: '',
-				is_attendance: '0',
-				cycle_type: '1',
-				pt_id: 3
-			};
-			this.integral_select_name1 = '1';
-			this.integral_select_name2 = '1';
-		},
-		//批量删除
-		del_item() {
-			if (this.del_item_id.length == 0) {
-				this.$message.error('请选择积分细则');
-				return false;
-			}
-			this.$confirm('此操作将永久删除该选项, 是否继续?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			}).then(() => {
-				let data = {
-					item_id: this.del_item_id
-				};
-				this.$axios('post','/api/integral/rule/items/destroy', data).then(res => {
-						if (res.data.code == 1) {
-							this.$message.success(res.data.msg);
-							this.getData();
-							this.handleNodeClick(this.selectItem);
-						}
-					})
-			});
-		},
-
-		editDetails(val) {
-			this.rules_detail_form = JSON.parse(JSON.stringify(val));
-			
-			this.rules_detail_form.min_point2=this.rules_detail_form.min_point;
-			this.rules_detail_form.max_point2=this.rules_detail_form.max_point;
-			
-			if (this.rules_detail_form.min_point == this.rules_detail_form.max_point) {
-				this.rules_detail_form.range_type = '1';
-			} else {
-				this.rules_detail_form.range_type = '2';
-			}
-			
-			if (this.rules_detail_form.min_point < 0) {
-				this.integral_select_name1 = '2';
-				let str=this.rules_detail_form.min_point;
-				this.rules_detail_form.min_point=str.toString().substring(1);
-				this.rules_detail_form.min_point2=str.toString().substring(1);
-			} else {
-				this.integral_select_name1 = '1';
-			}
-			if (this.rules_detail_form.max_point < 0) {
-				this.integral_select_name2 = '2';
-				let str=this.rules_detail_form.max_point;
-				this.rules_detail_form.max_point=str.toString().substring(1);
-				this.rules_detail_form.max_point2=str.toString().substring(1);
-			} else {
-				this.integral_select_name2 = '1';
-			}
-			this.rule_show = true;
-			this.rule_type = 'edit';
-		},
-		handleSelectionChange(val) {
-			this.del_item_id = [];
-			val.forEach(element => {
-				this.del_item_id.push(element.id);
-			});
-		},
-
-		handleNodeClick(e) {
-			var items = this.getItemData(e);
-			this.selectItem = {
-				child: e.child,
-				id: e.id,
-				name:e.name,
-				pid: e.pid,
-			};
-			this.flName=e.name;
-			this.item_list = items;
-		},
-		getItemData(e) {
-			var ids = [];
-			var lists = [];
-			if (e.child && e.child.length > 0) {
-				ids.push(e.id);
-				e.child.map(item => {
-					ids.push(item.id);
-					if (item.child && item.child.length > 0) {
-						item.child.map(item1 => {
-							ids.push(item1.id);
-							if (item1.child && item1.child.length > 0) {
-								item1.child.map(item2 => {
-									ids.push(item2.id);
-								});
-							}
-						});
-					}
-				});
-				for (var i = 0; i < ids.length; i++) {
-					lists.push(...this.filterItem(ids[i]));
-				}
-			} else {
-				lists = this.filterItem(e.id);
-			}
-			return lists;
-		},
-		//根据分类ID获取对应的规则
-		filterItem(id) {
-			var all_item_list = this.all_item_list;
-			var items = all_item_list.filter(item => {
-				return item.rule_id == id;
-			});
-			return items;
-		},
-
-		getData(is) {
-			this.rule_loading = true;
-			var that = this;
-			this.$axios('get','/api/integral/rule/trees', {cycle_type: 1}).then(res => {
-				var item_list = res.data.data.item_list || [];
-				var list = [];
-				for (let i in item_list) {
-					for (let k in item_list[i]) {
-						item_list[i][k].pt_Obj = that.$getTyps(item_list[i][k].pt_id);
-						list.push(item_list[i][k]);
-					}
-				}
-				that.rule_tree = res.data.data.rule_tree || [];
-				that.item_list = list;
-				that.all_item_list = list;
-				if (is) {
-					that.handleNodeClick(that.selectItem);
-				} else {
-					this.selectItem = { name: '积分规则' }; //选择的分类
-				}
-			}).finally(() => {
-				this.rule_loading = false;
-			});
-		},
-		//编辑分组
-		edit_class() {
-			this.class_show = true;
-			this.class_type = 'edit';
-			this.dept_formdata={
-				child: this.selectItem.child,
-				id: this.selectItem.id,
-				name: this.selectItem.name,
-				pid: this.selectItem.pid,
-			}
-		},
-		//添加分组
-		submit_add_dept(form) {
-			this.dept_loading=true;
-			let that = this;
-			that.$refs[form].validate(valid => {
-				if (valid) {
-					if (that.class_type == 'edit') {
-						delete that.dept_formdata.child;
-						that.dept_formdata.rule_id = that.dept_formdata.id;
-						if(typeof(that.dept_formdata.pid)=='number'){
-						}else{
-							if(that.dept_formdata.pid.length>0){
-								that.dept_formdata.pid =that.dept_formdata.pid[that.dept_formdata.pid.length - 1];
-							}else{
-								that.dept_formdata.pid=0;
-							}
-						}
-						this.$axios('post','/api/integral/rule/edit', that.dept_formdata).then(res => {
-							if (res.data.code == 1) {
-								that.selectItem.name=that.dept_formdata.name;
-								that.$message.success('修改积分分类成功');
-								this.getData(true);
-								this.add_dept_close('dept_formdata');
-							}
-						}).finally(() => {
-							this.dept_loading = false;
-						});
-					} else {
-						if (that.dept_formdata.pid !== null && that.dept_formdata.pid.length == 0) {
-							that.dept_formdata.pid = 0;
-						} else {
-							that.dept_formdata.pid = that.dept_formdata.pid[that.dept_formdata.pid.length - 1];
-						}
-						this.$axios('post','/api/integral/rule', that.dept_formdata).then(res => {
-							if (res.data.code == 1) {
-								that.$message.success('添加积分分类成功');
-								this.getData(true);
-								this.add_dept_close('dept_formdata');
-							}
-						}).finally(() => {
-							this.dept_loading = false;
-						});
-					}
-				} else {
-					this.dept_loading=false;
-				}
-			});
-			
-		},
-		//删除分组
-		del_dept() {
-			this.$confirm('此操作将永久删除该分组, 是否继续?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			}).then(() => {
-				this.$axios('post','/api/integral/rule/destroy', { rule_id: this.selectItem.id }).then(res => {
-					if (res.data.code == 1) {
-						this.$message.success(res.data.msg);
-						this.getData();
-						this.add_dept_close('dept_formdata');
-					}
-				});
-			});
-		},
-		//关闭弹窗
-		add_dept_close(form) {
-			this.class_show = false;
-			this.$refs[form].resetFields();
-		},
-		//关闭提示
-		tips_close() {
-			localStorage.setItem('rule', 'true');
-			this.tips_show = false;
-		},
-		//添加分类
-		add_class() {
-			this.class_show = true;
-			this.class_type = 'add';
-			this.dept_formdata = {
-				name: '',
-				pid: '0',
-				cycle_type: '1'
-			};
-		}
-	}
-};
-</script>
-
-<style scoped lang="scss">
-.select_width .el-select {
-	width: 80px;
-	background-color: #fff;
-	border: 1px solid #f1f1f1;
-	border-left: none;
-	color: #222;
-	border-radius: 5px;
-}
-.text-center {
-	text-align: center;
-}
-.text-center p {
-	padding: 10px 0;
-}
-.terr-right {
-	.name {
-		font-size: 18px;
-		margin-right: 20px;
-	}
-	.btns button {
-		margin-top: 20px;
-		margin-right: 5px;
-	}
-}
-.rule_class_box {
-	::v-deep .el-tree-node {
-		border-bottom: 1px #f8f8f8 solid;
-	}
-	::v-deep .el-tree-node__content {
-		padding: 10px 0;
-		// border-bottom: 1px #f8f8f8 solid;
-	}
-	::v-deep .el-tree-node__content:hover {
-		background: #ecf5ff;
-		border-radius: 4px;
-	}
-	::v-deep .is-current .el-tree-node__content .el-icon-caret-right {
-		color: #409eff !important;
-	}
-	::v-deep .is-current .el-tree-node__content .el-tree-node__label {
-		color: #409eff !important;
-	}
-	::v-deep .is-current .el-tree-node__children .el-icon-caret-right {
-		color: #c0c4cc !important;
-	}
-	::v-deep .is-current .el-tree-node__children .el-tree-node__label {
-		color: #606266 !important;
-	}
-	::v-deep .el-tree-node__label {
-		overflow: hidden;
-		text-overflow: ellipsis;
-		white-space: nowrap;
-	}
-}
-.form-right ::v-deep .el-form-item__content{
-	margin-left: 0px !important;
-}
-.terr-left button {
-	margin: 0 auto;
-	display: block;
-	margin-bottom: 20px;
-}
-</style>

+ 0 - 756
src789/views/set/voluntarilyPoint.vue

@@ -1,756 +0,0 @@
-<template>
-	<div>
-		<el-alert class="diy-tip" title="什么是自动积分?" @close="tips_close" v-if="tips_show" type="success" description show-icon>
-			<p>系统按照设定的时间(每月/每周/每日) 自动给员工添加B分,比如某员工有一个工程师证,得到公司的认可,公司就会每月给他加分</p>
-		</el-alert>
-		<div class="all">
-			<div class="flex-box">
-				<div class="terr-left">
-					<div><el-button size="medium" @click="add_grouping()"   type="primary">新增加分组</el-button></div>
-					<div><el-button size="medium" @click="add_rules_detail"   type="primary">新增加分项</el-button></div>
-
-					<!-- 循环分组 -->
-					<el-col :span="24" style="padding-right: 0;" v-loading="rule_trees_load">
-						<el-menu :default-active='default_active' class="rule_name" :unique-opened="true">
-							<el-submenu :index="index.toString()" :key="index" v-for="(item, index) in rule_list">
-								<template slot="title">
-									<div style="width: 80%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; height: 47px;line-height: 47px;" >
-										<i class="el-icon-edit-outline title_top" @click.stop="edit_grouping(item)"></i>
-										<span class="title_top">{{ item.name }}</span>
-									</div>
-								</template>
-								<el-menu-item  :key="index2" :index="returnIndex(index,index2)" v-for="(data, index2) in item.child" @click="open_rights(data)" style="height: 47px;line-height: 47px;">
-										<div style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap">
-											<span slot="title">{{ data.remark }}</span>
-										</div>
-								</el-menu-item>
-							</el-submenu>
-						</el-menu>
-					</el-col>
-				</div>
-
-				<div class="terr-right border-right flex-1" v-loading="table_loading">
-					<el-col :span="24" v-show="rule_list.length == 0 || isShowAdd"  style="text-align: center;margin: 0 auto;position: relative;top: 30%;">
-						<p><img src="@/assets/image/nodata_default.png" width="200px" alt="" /></p>
-						<p style="color: #909399;">
-							还没有<span v-if="rule_list.length == 0">加分组和</span>加分项
-						</p>
-						<p style="color: #909399;">
-							<span v-if="rule_list.length == 0">先</span>
-							<span style="color: #26A2FF;cursor:pointer;" v-if="rule_list.length == 0" @click="add_grouping()">【新增加分组】</span>
-							<span v-if="rule_list.length == 0">再</span>
-							<span v-if="rule_list.length !== 0">请</span>
-							<span style="color: #26A2FF;cursor:pointer" @click="add_rules_detail">【新增加分项】</span>
-						</p>
-					</el-col>
-					
-					<el-col v-if="!isShowAdd&&right_rules_detail.remark">
-						<el-row>
-							<el-col :span="24" style="font-size:20px;color:#303133;line-height:36px;">
-								{{ right_rules_detail.remark }}
-								<span style="padding-left: 10px;">{{ right_rules_detail.min_point }}B分</span>
-								<el-button plain style="padding:10px 12px; margin-left: 10px;" @click="edit_rules()">编辑</el-button>
-							</el-col>
-						</el-row>
-						<div class="flex-box btns flex-v-ce">
-							<el-button size="small" @click="del_item" type="danger" plain>批量移除</el-button>
-							<el-button size="small" type="primary" @click="add_employee_show=true">添加人员</el-button>
-						</div>
-						<el-table  ref="multipleTable"	:data="table_list"	tooltip-effect="dark"  style="width: 100%;margin-top:20px;"  @selection-change="handleSelectionChange">
-							<el-table-column type="selection" width="45"></el-table-column>
-							<el-table-column label="姓名">
-								<template slot-scope="scope">
-									<div style="display:flex">
-										<span class="fl">
-											<userImage
-												:id="scope.row.employee_id"
-												width="50px"
-												height="50px"
-												:user_name="scope.row.employee.name"
-												:img_url="scope.row.employee.img_url"
-												v-if="scope.row.employee"
-											></userImage>
-										</span>
-										<span style="margin-left: 10px; line-height: 50px; display: inline-block" v-if="scope.row.employee">{{ scope.row.employee.name }}</span>
-									</div>
-								</template>
-							</el-table-column>
-							<el-table-column prop="cycle_remark" label="加分周期"></el-table-column>
-							<template slot="empty">
-								<noData></noData>
-							</template>
-						</el-table>
-
-						<!-- 分页 -->
-						<div style=" text-align: center; padding: 20px;">
-							<el-pagination
-								background
-								layout="total, prev, pager, next"
-								:current-page="page"
-								@current-change="handleCurrentChange"
-								:page-size.sync="pagesize"
-								:hide-on-single-page="true"
-								:total="total"
-							></el-pagination>
-						</div>
-					</el-col>
-				</div>
-			</div>
-
-			<!-- 可写公共组建: -->
-			<!-- 新增加分组弹出框 -->
-			<el-dialog :close-on-click-modal="false" :title="grouping_type ? '编辑加分组' : '新增加分组'" :visible.sync="dialogVisible" width="40%">
-				<el-form :model="numberValidateForm" ref="numberValidateForm" label-width="100px" class="demo-ruleForm">
-					<el-form-item label="加分组名称" prop="name" :rules="[{ required: true, message: '请输入加分组名称' }]">
-						<el-input type="age" v-model="numberValidateForm.name" autocomplete="off" placeholder="请输入加分组名称"></el-input>
-					</el-form-item>
-				</el-form>
-				<span slot="footer" class="dialog-footer" style=" overflow: hidden;">
-					<el-button class="fl" type="danger" v-show="grouping_type" @click="del_grouping(numberValidateForm)" style="float:left" :disabled="disabled">删除</el-button>
-					<el-button @click="dialogVisible = false">取 消</el-button>
-					<el-button type="primary" @click="submitForm('numberValidateForm')" :disabled="disabled">确 定</el-button>
-				</span>
-			</el-dialog>
-
-			<!-- 新增加分项 -->
-			<el-dialog :title="rules_detail_title ? '编辑加分项' : '新增加分项'" :visible.sync="dialogFormVisible" width="500px">
-				<el-form :model="rules_detail_form" ref="rules_detail_form" :rules="rules_rules" label-width="120px">
-					<el-form-item label="加分项名称" :label-width="formLabelWidth" prop="remark">
-						<el-input v-model="rules_detail_form.remark" placeholder="请输入加分项名称" autocomplete="off"></el-input>
-					</el-form-item>
-					<el-form-item label="加分组" :label-width="formLabelWidth" prop="rule_id">
-						<el-select v-model="rules_detail_form.rule_id" style="width: 100%;" placeholder="请选择加分组">
-							<el-option v-for="item in rule_list" :key="item.value" :label="item.name" :value="item.id"></el-option>
-						</el-select>
-					</el-form-item>
-					<el-form-item label="B分" prop="min_point">
-						<el-input
-							v-model="rules_detail_form.min_point"
-							placeholder="请输入B分分值"
-							oninput="if(this.value=='0'){this.value='';}else{this.value=this.value.replace(/[^0-9]/g,'')}"
-						></el-input>
-						<!-- <span data-v-a17f1960 style="display: block; font-size: 12px; color: rgb(96, 98, 102);text-align: left;">固定加分加B分</span> -->
-					</el-form-item>
-					<!-- <el-form-item label="是否与考勤挂钩" prop="is_attendance"><el-switch v-model="is_attendance"></el-switch></el-form-item> -->
-					<div style="overflow: hidden;">
-						<el-button type="danger" v-show="rules_detail_title" class="fl" @click="del_rules_detail(rules_detail_form)" style="float:left" :disabled="disabled">
-							删除
-						</el-button>
-
-						<el-button v-if="rules_detail_title" class="fr" type="primary" @click="editRule('rules_detail_form')" style="float:right" :disabled="disabled">
-							确 定
-						</el-button>
-						<el-button v-else class="fr" type="primary" @click="editRule('rules_detail_form')" style="float:right" :disabled="disabled">确 定</el-button>
-						<el-button class="fr" @click="rules_detail_close('rules_detail_form')" style="float:right">取 消</el-button>
-					</div>
-				</el-form>
-			</el-dialog>
-
-			<el-dialog title="添加人员" :visible.sync="add_employee_show" :before-close="add_employee_close" width="700px">
-				<el-form :model="add_employee_form" ref="add_employee_form" label-width="80px">
-					<el-form-item label="加分周期" :rules="[{ required: true, message: '请选择加分周期', trigger: 'change' }]">
-						<el-select v-model="task_cycle_name" placeholder="请选择加分周期">
-							<el-option v-for="item in task_cycle" :key="item.value" :label="item.name" :value="item.value"></el-option>
-						</el-select>
-					</el-form-item>
-					<div v-loading="staff_loading">
-						<EmployeeSelector
-							v-if="add_employee_show"
-							:max="add_employee_max"
-							:can_select_dept="false"
-							@confirm="add_employee_confirm"
-							ref="Employee"
-						></EmployeeSelector>
-					</div>
-					<el-form-item style="text-align: right; margin-bottom: 0;margin-top: 20px;">
-						<el-button @click="add_employee_close()">取消</el-button>
-						<el-button type="primary" @click="sub_add_employee('add_employee_form')" :disabled="disabled">完成</el-button>
-					</el-form-item>
-				</el-form>
-			</el-dialog>
-		</div>
-	</div>
-</template>
-
-<script>
-import EmployeeSelector from '@/components/EmployeeSelector';
-import noData from '@/components/noData';
-export default {
-	data() {
-		return {
-			pd_tianjia:false,
-			default_active:'0-0',
-			table_list: [],
-			tips_show: false,
-			rule_trees_load: false,
-			dialogVisible: false,
-
-			rules_detail_show: false, //是否弹出添加人员弹窗
-			add_employee_visible: false,
-			add_employee_max: 0,
-			add_employee_show: false,
-
-			task_cycle_name: 1,
-			add_employee_form: {
-				employee_ids: []
-			},
-			
-			isShowAdd:false,
-			del_arr: {
-				ids: []
-			},
-			val_page: '', //存入某一页文本框选中的数量
-			page: 1, //默认页数  为1
-			total: 0, //返回的总数据
-			pagesize: 10, //每页显示的数据
-			table_loading: false,
-			staff_loading: false,
-
-			dialogFormVisible: false,
-			form: {
-				name: '',
-				region: '',
-				date1: '',
-				date2: '',
-				delivery: false,
-				type: [],
-				resource: '',
-				desc: ''
-			},
-			formLabelWidth: '120px',
-
-			numberValidateForm: {
-				name: ''
-			},
-			disabled: false, //按钮不能被多次点击
-			grouping_type: '',
-			rules_detail_title: '',
-			rule_list: [], //分类集合
-			item_list: [], //规则集合
-
-			right_rules_detail: {},
-
-			add_employee_id: '',
-			rules_detail_form: {
-				rule_id: '',
-				range_type: '1',
-				prize_type: '1',
-				min_point: '',
-				remark: '',
-				is_attendance: '0',
-				cycle_type: '2',
-				pt_id: '3'
-			},
-			is_attendance: false,
-			rules_rules: {
-				remark: [
-					{
-						required: true,
-						message: '请输入规则名称',
-						trigger: 'blur'
-					},
-					{
-						max: 100,
-						message: '分类名称不能大于100个字符',
-						trigger: 'blur'
-					}
-				],
-				min_point: [
-					{
-						required: true,
-						message: '请输入积分',
-						trigger: 'blur'
-					}
-				],
-				rule_id: [
-					{
-						required: true,
-						message: '请选择分类',
-						trigger: 'blur'
-					}
-				]
-			},
-			task_cycle: [
-				{
-					name: '每天自动加分',
-					value: 1
-				},
-				{
-					name: '每周自动加分',
-					value: 2
-				},
-				{
-					name: '每月自动加分',
-					value: 3
-				}
-			]
-		};
-	},
-	watch:{
-		// add_employee_show(val){
-		// 	this.add_employee_visible=val;
-		// },
-	},
-	// computed:{
-	// 	returnIndex(str,str2){
-	// 		console.log(str);
-	// 		return str+"-"+str2;
-	// 	}
-	// },
-	components: {
-		EmployeeSelector,
-		noData
-	},
-	created() {},
-	mounted() {
-		if (localStorage.getItem('voluntarilyPoint')) {
-			this.tips_show = false;
-		} else {
-			this.tips_show = true;
-		}
-		this.get_role_lists(true);
-	},
-	methods: {
-		returnIndex(str,str2){
-			return str+"-"+str2;
-		},
-		handleCurrentChange(val) {
-			this.page = val;
-			this.open_right();
-		},
-		open_rights(data){
-			this.page=1;
-			this.open_right(data);
-		},
-		// 组建
-		add_employee_confirm(val) {
-			this.add_employee_form.employee_ids = [];
-			if (val.employee.length !== 0) {
-				val.employee.forEach(element => {
-					this.add_employee_form.employee_ids.push(element.id);
-				});
-			}
-		},
-
-		// 添加成员点击取消
-		add_employee_close() {
-			this.add_employee_show = false;
-		},
-		
-		// 添加成员点击完成
-		sub_add_employee(form) {
-			let self = this;
-			if (!self.task_cycle_name) {
-				self.$message.error('请选择加分周期');
-				return false;
-			}
-			this.$refs.Employee.confirm(); //调用组件的confirm();
-			if (this.add_employee_form.employee_ids.length <= 0) {
-				this.$message.error('请选择员工');
-				return false;
-			}
-			let data = {
-				employee_ids: this.add_employee_form.employee_ids,
-				task_cycle: self.task_cycle_name,
-				item_id: self.add_employee_id,
-				rule_id: self.add_rulse_id
-			};
-			self.$refs[form].validate(valid => {
-				if (valid) {
-					if (data.rule_id == '' || data.item_id == '') {
-						self.$message.error('请先选择细则');
-					} else {
-						this.disabled = true;
-						self.staff_loading = true;
-						self.$axios('post','/api/integral/auto/add',data).then(res => {
-								if (res.data.code == 1) {
-									self.$message.success('此次操作成功' + res.data.data.success + '条,失败' + res.data.data.error + '条,已经存在的' + res.data.data.exist + '条');
-									self.open_right();
-								} else {
-									self.$message.error(res.data.msg);
-								}
-							})
-							.finally(() => {
-								self.add_employee_show = false;
-								self.staff_loading = false;
-								this.disabled = false;
-							});
-					}
-				} else {
-					return false;
-				}
-			});
-		},
-		handleSelectionChange(val) {
-			this.del_arr.ids = [];
-			val.forEach(element => {
-				this.del_arr.ids.push(element.id);
-			});
-			this.val_page = val;
-		},
-		// 批量删除
-		del_item() {
-			let self = this;
-			if (self.del_arr.ids.length !== 0) {
-				self.$confirm('此操作将永久删除该人员的自动加分, 是否继续?', '提示', {
-					confirmButtonText: '确定',
-					cancelButtonText: '取消',
-					type: 'warning'
-				}).then(() => {
-					self.$axios('post','/api/integral/auto/delete/many',self.del_arr).then(res => {
-							if (res.data.code == 1) {
-								self.$message.success(res.data.msg);
-								// 判断当页的总数与选中的数量是否相等,如果相等,此页就无数据,就请求上一页的数据
-								if (this.table_list.length == this.val_page.length) {
-									if (this.page !== 1) {
-										//判断不在第一页的时候执行
-										this.page = this.page - 1;
-									}
-								}
-								self.open_right();	
-							} else {
-								self.$message.error(res.data.msg);
-							}
-						})
-						.finally(() => {
-							self.loading = false;
-						});
-				});
-			} else {
-				self.$message.error('请选择要移除的人员');
-			}
-		},
-		// 关闭提示语
-		tips_close() {
-			localStorage.setItem('voluntarilyPoint', 'true');
-			this.tips_show = false;
-		},
-		//新增加分项
-		add_rules_detail() {
-			this.rules_detail_form={
-				rule_id: '',
-				range_type: '1',
-				prize_type: '1',
-				min_point: '',
-				remark: '',
-				is_attendance: '0',
-				cycle_type: '2',
-				pt_id: '3'
-			}
-			this.dialogFormVisible = true;
-			this.rules_detail_title = false;
-		},
-		//编辑加分项
-		editRule(form) {
-			let self = this;
-			let data = null;
-			self.rules_detail_form.max_point = self.rules_detail_form.min_point;
-			if (this.rules_detail_title == false) {
-				data = {
-					items: [self.rules_detail_form]
-				};
-			} else {
-				self.rules_detail_form.item_id = self.rules_detail_form.id;
-				data = self.rules_detail_form;
-			}
-			self.$refs[form].validate(valid => {
-				if (valid) {
-					this.disabled = true;
-					// if (this.is_attendance) {
-					// 	self.rules_detail_form.is_attendance = 1;
-					// } else {
-					// 	self.rules_detail_form.is_attendance = 0;
-					// }
-					var url=this.rules_detail_title ? 'api/integral/rule/items/edit' : '/api/integral/rule/items';
-					self.$axios('post',url,data).then(res => {
-							// setTimeout(() => {
-							// 	this.is_attendance = false;
-							// }, 300);
-							if (res.data.code == 1) {
-								self.$message.success(res.data.msg);
-								self.rules_detail_show = false;
-								if (this.rules_detail_title) {//当为编辑时
-									 if(self.rules_detail_form.rule_id!=self.right_rules_detail.rule_id){//当编辑规则修改了上级时
-										self.get_role_lists(true);
-									 }else{//正常编辑
-										 self.get_role_lists();
-										 self.right_rules_detail.remark=data.remark;
-										 self.right_rules_detail.min_point=data.min_point;
-									 }	 
-								}else{//当为添加时
-									self.add_employee_id = res.data.data.item_id;//规则ID
-									self.add_rulse_id = self.rules_detail_form.rule_id;//分类ID
-									self.get_role_lists(true,true);
-									setTimeout(() => {
-										self.add_employee_show = true;
-									}, 600);
-								}
-							} else {
-								self.$message.error(res.data.msg);
-							}
-						}).finally(() => {
-							this.dialogFormVisible = false;
-							self.disabled = false;
-						});
-				} else {
-					return false;
-				}
-			});
-		},
-		//点击取消
-		rules_detail_close(form) {
-			this.dialogFormVisible = false;
-			this.rules_detail_show = false;
-			this.$refs[form].resetFields();
-		},
-		//获取右边表格数据
-		open_right(data,updata) {
-			let self = this;
-			self.table_loading = true;
-			this.isShowAdd=false;
-			if (data&&!updata) {
-				self.add_employee_id = data.id;
-				self.add_rulse_id = data.rule_id;
-				self.right_rules_detail = data;	
-				
-			}else if(updata){
-				self.right_rules_detail = data;	
-			}else{
-				self.add_employee_id = self.right_rules_detail.id;
-				self.add_rulse_id = self.right_rules_detail.rule_id;
-			}
-			var params = {
-					item_id: self.add_employee_id || '',
-					employee_id: self.employee_id || '',
-					page: self.page,
-					page_size: Number(this.pagesize)
-			};
-			self.$axios('get','/api/integral/auto/list', params).then(res => {
-					if (res.data.code == 1) {
-						self.table_list = res.data.data.list || [];
-						self.total = res.data.data.total;
-					} else {
-						self.$message.error(res.data.msg);
-					}
-			}).finally(() => {
-				self.table_loading = false;
-			});
-		},
-
-		//  编辑规则
-		edit_rules() {
-			this.rules_detail_title = true;
-			this.dialogFormVisible = true;
-			this.rules_detail_form = JSON.parse(JSON.stringify(this.right_rules_detail));
-			// this.is_attendance = this.rules_detail_form.is_attendance == '0' ? false : true;
-		},
-		// 删除规则
-		del_rules_detail(item) {
-			this.$confirm('此操作将永久删除该加分项, 是否继续?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			}).then(() => {
-				this.disabled = true;
-				this.$axios('post','/api/integral/rule/items/destroy',{item_id: item.id}).then(res => {
-						if (res.data.code == 1) {
-							this.$message.success('删除成功');
-							this.rules_detail_show = false;
-							this.get_role_lists(true);
-						} else {
-							this.$message.error(res.data.msg);
-							this.get_role_lists();
-						}
-					}).finally(() => {
-							this.dialogFormVisible = false;
-							this.disabled = false;
-					});
-			});
-		},
-
-		//新增加分组展示不同渲染
-		add_grouping() {
-			this.numberValidateForm={
-				name:''
-			}
-			this.dialogVisible = true;
-			this.grouping_type = false;
-		},
-		// 新增加分组
-		submitForm(formName) {
-			this.$refs[formName].validate(valid => {
-				if (valid) {
-					let data = this.grouping_type
-						? {
-								rule_id: this.numberValidateForm.id,
-								pid: '0',
-								name: this.numberValidateForm.name
-						  }
-						: {
-								cycle_type: '2',
-								pid: '0',
-								name: this.numberValidateForm.name
-						  };
-					this.disabled = true;
-					var url=this.grouping_type ? '/api/integral/rule/edit' : '/api/integral/rule';
-					this.$axios('post',url,data).then(res => {
-							if (res.data.code == '1') {
-								this.get_role_lists();
-								this.$message.success(this.grouping_type ? '修改积分规则' : res.data.msg);
-							}
-						}).finally(() => {
-							this.dialogVisible = false;
-							this.disabled = false;
-						});
-				} else {
-					console.log('error submit!!');
-					return false;
-				}
-			});
-		},
-		//修改分组
-		edit_grouping(item) {
-			this.dialogVisible = true;
-			this.numberValidateForm = JSON.parse(JSON.stringify(item));
-			this.grouping_type = true;
-		},
-		//删除分组
-		del_grouping(item) {
-			this.$confirm('此操作将永久删除该分类, 是否继续?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			}).then(() => {
-				this.disabled = true;
-				this.$axios('post','/api/integral/rule/destroy',{rule_id: item.id}).then(res => {
-						this.dialogVisible = false;
-						this.disabled = false;
-						if (res.data.code == 1) {
-							this.get_role_lists();
-							this.$message.success('删除成功');
-						}
-					}).catch(err => {
-						this.dialogVisible = false;
-						this.disabled = false;
-					});
-				}).catch(() => {
-					setTimeout(() => {
-						this.dialogVisible = false;
-					}, 300);
-				});
-		},
-		// 获取初始化数据
-		get_role_lists(is,noUpdata) {
-			this.table_loading = true;
-			this.rule_trees_load = true;
-			this.$axios('get','/api/integral/rule/trees', {cycle_type: '2'}).then(res => {
-					// this.is_attendance = this.rules_detail_form.is_attendance == '0' ? false : true;
-					var	rule_list = res.data.data.rule_tree||[];
-					var	item_list = res.data.data.item_list||[];
-					var itemListAll=[];
-					for (let i in item_list) {
-					  for (let k in item_list[i]) {
-						itemListAll.push(item_list[i][k])
-					  }
-					}
-					rule_list.map(item=>{
-						item.child=itemListAll.filter((item2)=>{return item2.rule_id==item.id});
-					})
-					this.rule_list=rule_list;
-					this.item_list=itemListAll;
-					if(is){
-						this.default_active="";
-						if(rule_list[0].child[0]){
-							this.right_rules_detail={};
-							this.table_list=[];
-							this.page=1;
-							this.open_right(rule_list[0].child[0],noUpdata);
-							setTimeout(()=>{
-								this.default_active = '0-0'
-							},500)
-						}else{
-							this.right_rules_detail={};
-							this.isShowAdd=true;
-						}
-					}
-			}).finally(err=>{
-				setTimeout(()=>{
-					this.rule_trees_load = false;
-					this.table_loading = false;
-				},700)
-			});
-		}
-	}
-};
-</script>
-
-<style scoped="scoped" lang="scss">
-.rule_name {
-	border-right: 0;
-	margin-top: 16px;
-	li {
-		border-bottom: 1px #f8f8f8 solid;
-		overflow: hidden;
-		white-space: nowrap;
-		text-overflow: ellipsis;
-		::v-deep .el-submenu__title {
-			padding: 0 10px !important;
-			i.el-submenu__icon-arrow.el-icon-arrow-down {
-				color: #909399 !important;
-			}
-		}
-		// li:hover .el-submenu__title {
-		// 	background: #e7f6ff;
-		// }
-		// ul {
-		// 	li.is-active {
-		// 		background-color: #e7f6ff !important;
-		// 	}
-		// }
-	}
-	// ::v-deep .is-opened .el-submenu__title .title_top {
-	// 	color: #409eff !important;
-	// }
-	// ::v-deep .is-opened .el-menu .el-menu-item span {
-	// 	color: #333;
-	// }
-	// ::v-deep .is-opened .el-menu .is-active span {
-	// 	color: #409eff;
-	// }
-}
-::v-deep .el-submenu__title {
-    height: 47px !important;
-    line-height: 47px !important;
-}
-.rule_list {
-	position: relative;
-	display: table-cell;
-}
-
-.rule_list:after {
-	content: ' ';
-	position: absolute;
-	top: 0;
-	left: 0;
-	bottom: 0;
-	width: 1px;
-	background: #ebeef5;
-}
-.terr-right {
-	min-height: calc(100vh - 224px);
-	.name {
-		height: 100%;
-		font-size: 18px;
-		margin-right: 20px;
-	}
-	.btns button {
-		margin-top: 20px;
-		margin-right: 5px;
-	}
-}
-.terr-left button {
-	margin: 0 auto;
-	display: block;
-	margin-bottom: 10px;
-}
-</style>

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff