347617796@qq.com 3 lat temu
rodzic
commit
cab6ad5d4d
100 zmienionych plików z 12454 dodań i 6384 usunięć
  1. 3 3
      .env.development
  2. 1 1
      README.md
  3. 0 31
      package-lock.json
  4. 1 1
      package.json
  5. 2 1
      public/index.html
  6. 191 63
      src/api/auth.js
  7. 3 14
      src/api/axios.js
  8. 36 0
      src/api/clipboard.js
  9. 2 5
      src/assets/css/iconfont.css
  10. 0 0
      src/assets/css/iconfont.js
  11. 0 86
      src/assets/css/iconfont.json
  12. BIN
      src/assets/css/iconfont.ttf
  13. BIN
      src/assets/css/iconfont.woff
  14. BIN
      src/assets/css/iconfont.woff2
  15. 21 5
      src/assets/css/reset.css
  16. BIN
      src/assets/image/1.png
  17. BIN
      src/assets/image/2.png
  18. BIN
      src/assets/image/3.png
  19. BIN
      src/assets/image/4.png
  20. BIN
      src/assets/image/a_apply.png
  21. BIN
      src/assets/image/entry_list.png
  22. BIN
      src/assets/image/giveayypicaexample.png
  23. BIN
      src/assets/image/gs1.png
  24. BIN
      src/assets/image/gs2.png
  25. BIN
      src/assets/image/gs3.png
  26. BIN
      src/assets/image/gs4.png
  27. BIN
      src/assets/image/guidang.png
  28. BIN
      src/assets/image/head_default.png
  29. BIN
      src/assets/image/invite_new_company.png
  30. BIN
      src/assets/image/jt.png
  31. BIN
      src/assets/image/kq1.png
  32. BIN
      src/assets/image/kq2.png
  33. BIN
      src/assets/image/my_publish.png
  34. BIN
      src/assets/image/nav_jx_1.png
  35. BIN
      src/assets/image/nav_jx_2.png
  36. BIN
      src/assets/image/nav_jx_3.png
  37. BIN
      src/assets/image/nav_jx_4.png
  38. BIN
      src/assets/image/nodata_default.png
  39. BIN
      src/assets/image/noperson_default.png
  40. BIN
      src/assets/image/performance.png
  41. BIN
      src/assets/image/prizeBuckle.png
  42. BIN
      src/assets/image/statistics_NO1.png
  43. BIN
      src/assets/image/statistics_NO2.png
  44. BIN
      src/assets/image/statistics_NO3.png
  45. BIN
      src/assets/image/task.png
  46. BIN
      src/assets/image/task_hall.png
  47. BIN
      src/assets/image/ts.png
  48. BIN
      src/assets/image/tz.png
  49. BIN
      src/assets/image/wn.png
  50. BIN
      src/assets/image/zq.png
  51. 0 754
      src/components/EmployeeSelector.vue
  52. 0 86
      src/components/Steps.vue
  53. 0 268
      src/components/Suggest.vue
  54. 5 6
      src/components/SvgIcon/index.vue
  55. 0 110
      src/components/VirtualList.vue
  56. 0 819
      src/components/applicationIntegrationPopup.vue
  57. 74 0
      src/components/assessManage/AssessConfigTab.vue
  58. 410 0
      src/components/assessManage/SelectAttendanceGroup.vue
  59. 0 954
      src/components/bonusPointsPopup.vue
  60. 336 0
      src/components/evaluate/BasicMessage.vue
  61. 709 0
      src/components/evaluate/Flow - 副本.vue
  62. 720 0
      src/components/evaluate/Flow.vue
  63. 1278 0
      src/components/evaluate/Template.vue
  64. 0 777
      src/components/examinePopup.vue
  65. 363 0
      src/components/flow/Affirm - 副本.vue
  66. 385 0
      src/components/flow/Affirm.vue
  67. 365 0
      src/components/flow/Examine - 副本.vue
  68. 386 0
      src/components/flow/Examine.vue
  69. 428 0
      src/components/flow/SuperiorFlow - 副本.vue
  70. 470 0
      src/components/flow/SuperiorFlow.vue
  71. 667 0
      src/components/public/ActionPlan.vue
  72. 144 0
      src/components/public/BrawerBox.vue
  73. 155 0
      src/components/public/ClassSet.vue
  74. 893 0
      src/components/public/EmployeeSelector.vue
  75. 108 0
      src/components/public/JxSearch.vue
  76. 2 2
      src/components/public/NoData.vue
  77. 71 0
      src/components/public/PageHead.vue
  78. 61 0
      src/components/public/PageHeadTwo.vue
  79. 69 0
      src/components/public/Pagination.vue
  80. 52 0
      src/components/public/PreBox.vue
  81. 327 0
      src/components/public/Preview.vue
  82. 115 0
      src/components/public/Record.vue
  83. 181 0
      src/components/public/TableBox.vue
  84. 764 0
      src/components/public/TrackManagement.vue
  85. 42 24
      src/components/public/UserImage.vue
  86. 71 32
      src/components/public/season.vue
  87. 249 0
      src/components/public/upload.vue
  88. 0 163
      src/components/publics/workpoints.vue
  89. 252 0
      src/components/set/BasicsSet.vue
  90. 319 0
      src/components/set/EvaluateSet.vue
  91. 989 0
      src/components/set/IndexSet.vue
  92. 640 0
      src/components/set/JurisdictionSet.vue
  93. 0 164
      src/components/toLead.vue
  94. 0 214
      src/components/upload.vue
  95. 0 38
      src/dome.vue
  96. 2 3
      src/hint.vue
  97. 0 1758
      src/home.vue
  98. 5 2
      src/icons/index.js
  99. 10 0
      src/icons/svg-icons/generateIconsView.js
  100. 77 0
      src/icons/svg-icons/index.vue

+ 3 - 3
.env.development

@@ -1,4 +1,4 @@
 NODE_ENV="development"
-VUE_APP_BASE_API="https://test-ding.g107.com/"
-VUE_APP_APPID="50530"
-VUE_APP_WEBSCOKET="test-ding.g107.com"
+VUE_APP_BASE_API="https://dp-test.g107.com"
+VUE_APP_APPID="107002"
+VUE_APP_WEBSCOKET="dp-test.g107.com"

+ 1 - 1
README.md

@@ -1,4 +1,4 @@
-# ddpc
+# dd_jx_pc
 
 ## Project setup
 ```

+ 0 - 31
package-lock.json

@@ -7511,37 +7511,6 @@
       "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
       "dev": true
     },
-    "image-webpack-loader": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/image-webpack-loader/-/image-webpack-loader-8.0.1.tgz",
-      "integrity": "sha512-IarGZ9kUo1mdnnKsk/b+BImysNS09/KaqeKRTXNPpz02tRSU1Fpm5wdD09CqlfuPMgsb4rpuuMpwIrPbSxn30Q==",
-      "dev": true,
-      "requires": {
-        "imagemin": "^7.0.1",
-        "imagemin-gifsicle": "^7.0.0",
-        "imagemin-mozjpeg": "^9.0.0",
-        "imagemin-optipng": "^8.0.0",
-        "imagemin-pngquant": "^9.0.2",
-        "imagemin-svgo": "^9.0.0",
-        "imagemin-webp": "^6.0.0",
-        "loader-utils": "^2.0.0",
-        "object-assign": "^4.1.1",
-        "schema-utils": "^2.7.1"
-      },
-      "dependencies": {
-        "loader-utils": {
-          "version": "2.0.2",
-          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
-          "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
-          "dev": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^2.1.2"
-          }
-        }
-      }
-    },
     "imagemin": {
       "version": "7.0.1",
       "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-7.0.1.tgz",

+ 1 - 1
package.json

@@ -40,7 +40,7 @@
     "babel-eslint": "^10.1.0",
     "eslint": "^6.7.2",
     "eslint-plugin-vue": "^6.2.2",
-    "image-webpack-loader": "^8.0.1",
+    "image-webpack-loader": "^8.1.0",
     "sass": "^1.26.5",
     "sass-loader": "^8.0.2",
     "script-loader": "^0.7.2",

+ 2 - 1
public/index.html

@@ -8,7 +8,7 @@
 <!-- 	<link rel="Bookmark" type="image/x-icon" href="b/img/icon/favicon.ico" />
 	<link rel="icon" type="image/x-icon" href="b/img/icon/favicon.ico" />
 	<link rel="shortcut icon" type="image/x-icon" href="b/img/icon/favicon.ico" /> -->
-    <title>功道云积分制</title>
+    <title>功道云绩效版</title>
   </head>
   <body>
     <noscript>
@@ -16,5 +16,6 @@
     </noscript>
     <div id="app"></div>
     <!-- built files will be auto injected -->
+	<script src="https://g.alicdn.com/dingding/dingtalk-jsapi/2.13.42/dingtalk.open.js"></script>
   </body>
 </html>

+ 191 - 63
src/api/auth.js

@@ -1,7 +1,182 @@
 const TokenKey = 'A-Token'
 const UserIdKey = 'userData'
-const TypesKey = 'types'
+const EmployeelistKey='employeeList'
+const DeptTreeKeu='deptTree'
 import Vue from 'vue'
+/* 角色*/
+/*
+创始人 creator
+主管理员 masterAdministrator
+子管理员 childAdministrator
+部门管理员 deptManager
+员工 employee
+*/
+// 权限
+/*
+1   绩效考核
+2   OKR
+3   管理范围 全公司
+4   管理范围 所在部门以及下级部门
+5   管理范围 特定部门
+6   考核管理 可见考核结果
+7   考核管理 发起考核
+8   考核管理 开始评分
+9   考核管理 调整结果
+10  考核管理 调整等级
+11  考核管理 导出报表
+12  指标库管理
+13  指定考核表管理
+14  全部考核表管理
+15  基础设置
+16  绩效报表
+*/
+
+// 获取当前登录者在绩效系统中的身份
+export function getRole(type) {
+  /* type为判断哪些角色*/
+  var role = JSON.parse(localStorage.getItem('role'))
+  let is = false
+  switch (type) {
+    case 1: // 判断是否是主,子管理员
+      if (role == 'masterAdministrator' || role == 'childAdministrator') {
+        is = true
+      }
+      break
+    case 2: // 判断是否是部门管理员
+      if (role == 'deptManager') {
+        is = true
+      }
+      break
+    case 3: // 判断是否是员工
+      if (role == 'employee') {
+        is = true
+      }
+      break
+    case 4: // 判断是否是创始人
+      if (role == 'creator') {
+        is = true
+      }
+      break
+  }
+	return is
+}
+// 获取当前用户详情
+export function getUserData() {
+  return getCache(UserIdKey)||{}
+}
+export function setUserData(data) {
+  return setCache(UserIdKey,data)
+}
+// 获取用户列表
+export function getEmployeeList() {
+  return getCache(EmployeelistKey)||{}
+}
+export function setEmployeeList(data) {
+  return setCache(EmployeelistKey,data)
+}
+// 获取部门列表
+export function getDeptTree() {
+  return getCache(DeptTreeKeu)||{}
+}
+export function setDeptTree(data) {
+  return setCache(DeptTreeKeu,data)
+}
+
+//返回用户Code
+export function returnCode(data) {
+	let list=getEmployeeList();
+	if(!list||!list[data]){
+		return data
+	}
+	if(!data){
+		return ''
+	}
+	if(Array.isArray(data)){
+		let result =data.map(e=>{
+			if(list[e]){
+				return list[e].code
+			}
+		})
+		return JSON.stringify(result)
+	}else{
+		data=data.toString()
+		var arr = data.split(",");
+		let result =arr.map(e=>{
+			if(list[e]){
+				return list[e].code
+			}
+		})
+		return result.toString()
+	}
+}
+
+// 判断是否有绩效的某项权限
+export function isAuthoritys(id, arr) { // 判断是否为某项权限:id为权限ID,arr为数据源
+  var jurisdictions
+  if (arr) {
+    jurisdictions = arr.map((item) => {
+      return item.id
+    })
+  } else {
+    jurisdictions = getUserData().permission_info.permission.map((item) => {
+      return item.id
+    })
+  }
+  if (typeof(id) === 'number') { // 单个权限
+    return jurisdictions.indexOf(id) >= 0
+  } else { // 多个权限一起判断,如果有一个真就返回真
+    const is = jurisdictions.some(item => {
+      if (id.indexOf(item) >= 0) {
+        return true
+      }
+    })
+    return is
+  }
+}
+
+// 考核表类型设置
+export function getCycleType(id) {
+  const options = [{
+      value: 0,
+      label: '全部'
+    },
+    {
+      value: 2,
+      label: '月度'
+    },
+    {
+      value: 3,
+      label: '季度'
+    },
+    {
+      value: 4,
+      label: '半年度'
+    },
+    {
+      value: 5,
+      label: '年度'
+    },
+    {
+      value: 1,
+      label: '天'
+    },
+    {
+      value: 6,
+      label: '自定义'
+    }
+  ]
+  if (id) {
+    let str = ''
+    options.forEach(item => {
+      if (id == item.value) {
+        str = item.label
+      }
+    })
+    return str
+  } else {
+    return options
+  }
+}
 
 // 获取唯一标识(uid)
 export function generateUUID() {
@@ -25,99 +200,52 @@ export function setCache(key, data) {
 export function removeCache(key) {
 	localStorage.removeItem(key)
 }
-
-function getClass(o) { //判断数据类型
+//判断数据类型
+export function getClass(o) {
 	return Object.prototype.toString.call(o).slice(8, -1);
 }
-
-function deepCopy(obj) { //深度拷贝对象
+//深度拷贝对象
+export function deepCopy(obj) {
 	var result, oClass = getClass(obj);
 	if (oClass == "Object") result = {}; //判断传入的如果是对象,继续遍历
 	else if (oClass == "Array") result = []; //判断传入的如果是数组,继续遍历
 	else return obj; //如果是基本数据类型就直接返回
 	for (var i in obj) {
 		var copy = obj[i];
-		if (getClass(copy) == "Object" || getClass(copy) == "Array") result[i] = deepCopy(
-		copy); //递归方法 ,如果对象继续变量obj[i],下一级还是对象,就obj[i][i]
-		// else if (getClass(copy) == "Array") result[i] = deepCopy(copy); //递归方法 ,如果对象继续数组obj[i],下一级还是数组,就obj[i][i]
+		if (getClass(copy) == "Object" || getClass(copy) == "Array") result[i] = deepCopy(copy); //递归方法 ,如果对象继续变量obj[i],下一级还是对象,就obj[i][i]
 		else result[i] = copy; //基本数据类型则赋值给属性
 	}
 	return result;
 }
 
-export function openError(data) {
-	if (process.env.NODE_ENV == 'production') {
-		Vue.prototype.$axios('post', '/api/e', data)
-	}
-}
-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 getTypsName(id) {
-	return getTyps(id).name
-}
 // 判断是否创始人
 export function getIsCreator(key) {
-	let is = false;
-	getUserData().employee_detail.role_list.forEach(item => {
-		if (key == item.name) {
-			is = true;
-		}
-	})
-	return is
+	return key==JSON.parse(localStorage.getItem('role'))
 }
-
-export function supremeAuthority() { //获取当前角色最高权限     判断是否为某项权限:this.$authoritys('dept_manager') 或 this.$supremeAuthority() == 'dept_manager'
+export function supremeAuthority() { 
 	if (getIsCreator('creator')) {
 		return 'creator'
-	} else if (getIsCreator('admin')) {
-		return 'admin'
-	} else if (getIsCreator('point_manager')) {
-		return 'point_manager'
-	} else if (getIsCreator('dept_manager')) {
-		return 'dept_manager'
+	} else if (getIsCreator('masterAdministrator')) {
+		return 'masterAdministrator'
+	} else if (getIsCreator('childAdministrator')) {
+		return 'childAdministrator'
+	} else if (getIsCreator('deptManager')) {
+		return 'deptManager'
 	} else if (getIsCreator('employee')) {
 		return 'employee'
 	}
 }
-export function authoritys(key) { //判断是否为某项权限:this.$authoritys('dept_manager')
+//判断是否有某项权限:this.$authoritys('masterAdministrator')
+export function authoritys(key) {
 	return supremeAuthority() == key
 }
-//过滤绩效分
-function GlTypes(arr) {
-	return arr.filter(function(item) {
-		return item.code != 'JX'
-	})
-}
-export function setTyps(data) {
-	var arr = GlTypes(data);
-	localStorage.setItem(TypesKey, JSON.stringify(arr))
-}
 
 export function getToken() {
 	return localStorage.getItem(TokenKey)
 }
-
 export function setToken(token) {
 	localStorage.setItem(TokenKey, token)
 }
-
 // 防抖
 export function _debounce(fn, delay = 500) {
 	let timer = null

+ 3 - 14
src/api/axios.js

@@ -1,14 +1,10 @@
 import axios from 'axios'
 import {Message} from 'element-ui'
-import {
-	getToken,
-	setToken,
-	openError
-} from './auth.js'
+import {getToken,setToken} from './auth.js'
 import qs from 'qs'
 const service = axios.create({
 	baseURL: process.env.VUE_APP_BASE_API, 
-	// baseURL:'https://ding.insys.g107.com/',
+	// baseURL:'http://ding.jx.g107.com/',
 	timeout: 20000,
 	headers: {
 		'Content-Type': 'application/x-www-form-urlencoded',
@@ -36,7 +32,7 @@ service.interceptors.request.use(
 service.interceptors.response.use(
 	response => {
 		if (response.data.code === 1) {
-			if(response.data.data.token){
+			if(response.data.data.token&&url!='/api/per/user/download_token'){
 				setToken(response.data.data.token);
 			}else if (response.data.refresh_token) {
 				if (response.data.refresh_token !== getToken()) {
@@ -83,13 +79,6 @@ service.interceptors.response.use(
 			console.log('网络异常,请检查网络是否畅通,再重新进入应用')
 			return Promise.reject(error.message)
 		}else if(error.message=='timeout of 20000ms exceeded'){
-			if(url=='/api/integral/review/a/entry'||url=='/api/integral/point/entry'){
-				let sum=0;
-				if(data){
-					sum=data.items.length*data.members.length
-				}
-				openError({sum:sum,message:'钉钉PC'})
-			}
 			Message({
 				message: '请求超时,请稍后再试',
 				type: 'error',

+ 36 - 0
src/api/clipboard.js

@@ -0,0 +1,36 @@
+import Vue from 'vue'
+import Clipboard from 'clipboard'
+
+function clipboardSuccess() {
+  Vue.prototype.$message({
+    message: '复制成功',
+    type: 'success',
+    duration: 1500
+  })
+}
+
+function clipboardError() {
+  Vue.prototype.$message({
+    message: 'Copy failed',
+    type: 'error'
+  })
+}
+
+export default function handleClipboard(text, event) {
+  const clipboard = new Clipboard(event.target, {
+    text: () => text
+  })
+  clipboard.on('success', () => {
+    clipboardSuccess()
+    clipboard.off('error')
+    clipboard.off('success')
+    clipboard.destroy()
+  })
+  clipboard.on('error', () => {
+    clipboardError()
+    clipboard.off('error')
+    clipboard.off('success')
+    clipboard.destroy()
+  })
+  clipboard.onClick(event)
+}

Plik diff jest za duży
+ 2 - 5
src/assets/css/iconfont.css


Plik diff jest za duży
+ 0 - 0
src/assets/css/iconfont.js


+ 0 - 86
src/assets/css/iconfont.json

@@ -1,86 +0,0 @@
-{
-  "id": "2916418",
-  "name": "钉钉PC",
-  "font_family": "iconfont",
-  "css_prefix_text": "icon-",
-  "description": "",
-  "glyphs": [
-    {
-      "icon_id": "15023955",
-      "name": "设置_基础设置",
-      "font_class": "shezhi_jichushezhi",
-      "unicode": "e70c",
-      "unicode_decimal": 59148
-    },
-    {
-      "icon_id": "15023958",
-      "name": "设置_角色",
-      "font_class": "shezhi_jiaose",
-      "unicode": "e70f",
-      "unicode_decimal": 59151
-    },
-    {
-      "icon_id": "15023959",
-      "name": "设置_自动积分",
-      "font_class": "shezhi_zidongjifen",
-      "unicode": "e710",
-      "unicode_decimal": 59152
-    },
-    {
-      "icon_id": "15023960",
-      "name": "设置_组织架构",
-      "font_class": "shezhi_zuzhijiagou",
-      "unicode": "e711",
-      "unicode_decimal": 59153
-    },
-    {
-      "icon_id": "12097436",
-      "name": "福利中心",
-      "font_class": "fulizhongxin",
-      "unicode": "e652",
-      "unicode_decimal": 58962
-    },
-    {
-      "icon_id": "15023948",
-      "name": "考勤_考勤月报表",
-      "font_class": "kaoqin_kaoqinyuebaobiao",
-      "unicode": "e708",
-      "unicode_decimal": 59144
-    },
-    {
-      "icon_id": "15023956",
-      "name": "设置_积分规则",
-      "font_class": "shezhi_jifenguize",
-      "unicode": "e70d",
-      "unicode_decimal": 59149
-    },
-    {
-      "icon_id": "16909825",
-      "name": "PC_工作台_AB分",
-      "font_class": "PC_gongzuotai_ABfen",
-      "unicode": "e71d",
-      "unicode_decimal": 59165
-    },
-    {
-      "icon_id": "17517997",
-      "name": "钉钉PC_设置",
-      "font_class": "dingdingPC_shezhi1",
-      "unicode": "e725",
-      "unicode_decimal": 59173
-    },
-    {
-      "icon_id": "17517998",
-      "name": "钉钉PC_统计",
-      "font_class": "dingdingPC_tongji1",
-      "unicode": "e726",
-      "unicode_decimal": 59174
-    },
-    {
-      "icon_id": "739117",
-      "name": "首页",
-      "font_class": "shouye",
-      "unicode": "e639",
-      "unicode_decimal": 58937
-    }
-  ]
-}

BIN
src/assets/css/iconfont.ttf


BIN
src/assets/css/iconfont.woff


BIN
src/assets/css/iconfont.woff2


+ 21 - 5
src/assets/css/reset.css

@@ -27,12 +27,16 @@ table { border-collapse:collapse; border-spacing:0; }
   overflow: hidden;
 }
 .boxMinHeight{
-  min-height: calc(100vh - 110px);
+  min-height: calc(100vh - 160px);
 }
 
 .el-form-item__content{
 	line-height:36px !important;
 }
+.form-titem{
+	font-size: 14px;
+	font-weight: 600;
+}
 
 /* 盒子模型 */
 .flex-box {
@@ -50,7 +54,7 @@ table { border-collapse:collapse; border-spacing:0; }
   display: flex;
   -webkit-box-orient: vertical;
   -webkit-flex-flow: column;
-  flex-flow: column !important;
+  flex-flow: column;
 }
 /*flex-box与 flex-v-ce结合*/
 .flex-box-ce {
@@ -165,7 +169,18 @@ table { border-collapse:collapse; border-spacing:0; }
   text-overflow: ellipsis;
   white-space: nowrap;
 }
-
+.clamp2{
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 2;
+	overflow: hidden;
+}
+.clamp3{
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 3;
+	overflow: hidden;
+}
 /* 内容超出部分自动换行 */
 .flex-d-wrap {
   flex-wrap: wrap;
@@ -217,12 +232,13 @@ table { border-collapse:collapse; border-spacing:0; }
 .fontColorT {
 	color: #C0C4CC!important;
 }
-
+.fl {
+    float: left;
+}
 /* 整体布局样式 */
 .all{
 	background-color: #fff;
 	border-radius: 5px;
-	min-height:calc(100vh - 120px);
 	min-width: 800px;
 	position: relative;
 }

BIN
src/assets/image/1.png


BIN
src/assets/image/2.png


BIN
src/assets/image/3.png


BIN
src/assets/image/4.png


BIN
src/assets/image/a_apply.png


BIN
src/assets/image/entry_list.png


BIN
src/assets/image/giveayypicaexample.png


BIN
src/assets/image/gs1.png


BIN
src/assets/image/gs2.png


BIN
src/assets/image/gs3.png


BIN
src/assets/image/gs4.png


BIN
src/assets/image/guidang.png


BIN
src/assets/image/head_default.png


BIN
src/assets/image/invite_new_company.png


BIN
src/assets/image/jt.png


BIN
src/assets/image/kq1.png


BIN
src/assets/image/kq2.png


BIN
src/assets/image/my_publish.png


BIN
src/assets/image/nav_jx_1.png


BIN
src/assets/image/nav_jx_2.png


BIN
src/assets/image/nav_jx_3.png


BIN
src/assets/image/nav_jx_4.png


BIN
src/assets/image/nodata_default.png


BIN
src/assets/image/noperson_default.png


BIN
src/assets/image/performance.png


BIN
src/assets/image/prizeBuckle.png


BIN
src/assets/image/statistics_NO1.png


BIN
src/assets/image/statistics_NO2.png


BIN
src/assets/image/statistics_NO3.png


BIN
src/assets/image/task.png


BIN
src/assets/image/task_hall.png


BIN
src/assets/image/ts.png


BIN
src/assets/image/tz.png


BIN
src/assets/image/wn.png


BIN
src/assets/image/zq.png


+ 0 - 754
src/components/EmployeeSelector.vue

@@ -1,754 +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
-								v-model="dept_id"
-								ref="dept"
-								:options="dept_list"
-								:props="{ checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
-								clearable
-								filterable
-								placeholder="全公司"
-							></el-cascader>
-						</div>
-					</div>
-					<div class="flex-box-end" style="padding: 10px;border-bottom: 1px solid #f1f1f1;height: 40px;box-sizing: border-box;">
-						<el-checkbox v-if="isChecKedAll && multi" v-model="checked" @change="checkedChange" :indeterminate="indeterminate">全选</el-checkbox>
-					</div>
-					<el-scrollbar :style="{ height: can_select_dept ? '310px' : '350px' }" :native="false" v-loading="table_loading">
-						<div class="choose_left">
-							<div class="persons_box" v-if="list.length > 0">
-								<div class="employee_cell_a"  v-for="(item, index) in list" :key="index">
-									<div class="employee_cell flex-box flex-v-ce" v-show="can_select_employee" @click.prevent.stop="select_employee(item)">
-										<div class="employee_checkbox"><el-checkbox v-model="item.checked"></el-checkbox></div>
-										<img :src="item.img_url" width="30" height="30" class="imgUrl" v-if="item.img_url">
-										<div class="imgUrl" v-else style="background: #238DFA;color: #fff;">{{item.name.substring(item.name.length-2)}}</div>
-										<div class="employee_name">{{ item.name }}</div>
-									</div>
-								</div>
-							</div>
-							<div v-else class="fontColorF" style="text-align: center;margin-top: 50px;">暂无可选人员</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: 390px;">
-						<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>
-							<div class="flex-box-ce employee_cell2" v-for="(item, index) in employee_selected_list" :key="index">
-								<div class="flex-box-ce flex-1">
-									<img :src="item.img_url" width="30" height="30" style="margin-right: 8px;" class="imgUrl" v-if="item.img_url">
-									<div class="imgUrl" v-else style="background: #238DFA;color: #fff;margin-right: 8px;">{{item.name.substring(item.name.length-2)}}</div>
-									<div class="userName font-flex-word">{{ item.name }}</div>
-								</div>
-								<i class="el-icon-error deleteUser" v-if="!item.is_creator || !createDimness" @click="employee_cancel(item, true)"></i>
-							</div>
-						</div>
-					</el-scrollbar>
-				</el-col>
-			</el-row>
-		</div>
-	</div>
-</template>
-
-<script>
-// import Item  from './Item'
-// import VirtualList from 'vue-virtual-scroll-list'
-export default {
-	props: {
-		can_select_dept: {
-			//指定是否能选择部门
-			type: Boolean,
-			default: true
-		},
-		can_select_employee: {
-			//指定是否能选择员工
-			type: Boolean,
-			default: true
-		},
-		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
-		},
-		isCreatorSelect: {
-			//当employee_list为空时,依然显示空值而不是显示人员列表
-			type: Boolean,
-			default: false
-		},
-		use_Administrator_list: {
-			//未指定员工并请求人员接口时,保留管理员,过滤员工
-			type: Boolean,
-			default: false
-		},
-		createDimness: {
-			//组织架构设置上级专用-不清除创始人
-			type: Boolean,
-			default: false
-		}
-	},
-	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,
-			all_list: [],
-			searchBox: [], //用于搜索的全部人员
-		};
-	},
-	watch: {
-		dept_id(val) {
-			if (val.length > 1) {
-				this.pid = val[val.length - 1];
-			} else {
-				this.pid = val[0];
-			}
-			this.$nextTick(() => {
-				this.$refs.dept.dropDownVisible = false;
-				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.list = this.searchBox.filter(item => item.name.includes(this.keyword));
-			if (!val) {
-			  this.checked = false;
-			}
-		}
-	},
-	methods: {
-		//全选择
-		checkedChange(val) {
-			if (val) {
-				this.$nextTick(() => {
-				  let employeeSelectedList = JSON.parse(JSON.stringify(this.employee_selected_list)); //获取选择的人员
-				  
-				  let employeeSelectedIds = [],total = 0;
-				  employeeSelectedList.forEach(element => {
-				    employeeSelectedIds.push(element.id);
-				  });
-				  for (let i in this.list) {
-				    this.$set(this.list[i], 'checked', true);
-				    if (!employeeSelectedIds.includes(this.list[i].id)) {
-				      //去除已经选择的人员
-				      this.employee_selected_list.push(this.list[i]);
-				    }
-				  }
-				});
-				
-				// 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 = [];
-			if(this.createDimness){
-				this.employee_selected_list = this.employee_selected_list.filter(x => x.is_creator);
-			}else{
-				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();
-		},
-		filtration() {
-			//获取员工列表,限制已禁用的员工
-			this.$axios('get', '/api/employee/index', { dept_id: this.pid, page: 0, page_size: 3000,is_official:1 })
-				.then(res => {
-					if (res.data.code == 1) {
-						let list = res.data.data.list;
-						let data = [];
-						// list.forEach((item, index) => {
-						// 	if (item.is_official == 1) {
-						// 		data.push(item);
-						// 	}
-						// });
-						this.userdatars(list);
-					} else {
-						this.userdatars();
-					}
-				})
-				.catch(() => {
-					this.userdatars();
-				});
-		},
-		userdatars(userlist) {
-			var employee_selected_list = this.employee_selected_list;
-			let list = this.employee_list;
-			if (userlist) {
-				list = [...userlist].filter(x => [...list].some(y => y.id === x.id));
-				employee_selected_list=[...userlist].filter(x => [...employee_selected_list].some(y => y.id === x.id));
-			}
-			list.map(item => {
-				item['checked'] = false;
-				for (var i in employee_selected_list) {
-					//判断传进来的员工是否是员工集合里的,是就设为已点击状态
-					if (employee_selected_list[i].id == item.id) {
-						item['checked'] = true;
-					}
-				}
-			});
-			this.employee_selected_list = employee_selected_list;
-			this.list = list;
-			this.searchBox=list;
-			this.table_loading = false;
-		},
-		//获取员工详情
-		get_user_list() {
-			this.table_loading = true;
-			var that = this;
-			var employee_selected_list = this.employee_selected_list;
-			if (this.employee_list.length > 0 || this.isCreatorSelect) {
-				this.filtration();
-				return false;
-			}
-			this.list = [];
-			this.$axios('get', '/api/employee/index', { dept_id: this.pid, keywords: this.keyword, page: 0, page_size: 3000,is_official:1 })
-				.then(res => {
-					var employee = res.data.data.list || [];
-					if (this.use_Administrator_list) {
-						//使用管理员列表
-						employee = this.useAdministratorList(employee);
-					}
-					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.id) {
-							userAll.push(item);
-						}
-						// 前端先隐藏过滤未开启的人员的功能
-						// } 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;
-							}
-						}
-					});
-					// employee_selected_list=[...employee].filter(x => [...employee_selected_list].some(y => y.id === x.id));
-					// that.employee_selected_list = employee_selected_list;
-					that.list = userAll;
-					this.searchBox=userAll;
-				})
-				.finally(() => {
-					that.table_loading = false;
-			});
-		},
-		useAdministratorList(list) {
-			//过滤掉普通员工,返回管理员
-			let arr = [];
-			list.forEach((item, i) => {
-				if (
-					item.employee_detail.role_list.findIndex(
-						value => value.name == 'dept_manager' || value.name == 'creator' || value.name == 'point_manager' || value.name == 'admin'
-					) >= 0
-				) {
-					arr.push(item);
-				}
-			});
-			return arr;
-		}
-	},
-	created() {
-		this.checked = false;
-		setTimeout(() => {
-			this.get_user_list();
-			if (this.can_select_dept) {
-				this.get_dept_list();
-			}
-		}, 200);
-	}
-};
-</script>
-
-<style scoped>
-.deleteUser{
-	font-size: 16px;
-	padding: 8px;
-	color: #777777;
-	cursor: pointer;
-}
-.deleteUser:hover{
-	color: #F56C6C;
-}
-.userName{
-	width: 170px;
-}	
-.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;
-}
-
-.employee_selector_box .choose_left .employee_cell {
-	border-bottom: 1px #f1f1f1 solid;
-}
-
-
-.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_cell2{
-	padding: 8px 0;
-	height: 50px;
-	box-sizing: border-box;
-	border-bottom: 1px #f1f1f1 solid;
-}
-.employee_selector_box ::v-deep .employee_cell {
-	padding: 8px 0;
-	height: 50px;
-	box-sizing: border-box;
-}
-
-.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;
-	border-bottom: 1px #f1f1f1 solid;
-}
-
-
-.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);
-}
-.imgUrl{
-	border-radius: 50%;
-	height: 30px;
-	width: 30px;
-	box-sizing: border-box;
-	text-align: center;
-	line-height: 30px;
-	font-size: 0.6rem;
-}
-</style>

+ 0 - 86
src/components/Steps.vue

@@ -1,86 +0,0 @@
-<template>
-  <div>
-    <p class="row_title">
-      审批
-      <span class="row_tips fontColorB">多人审批时,以最后一人为准</span>
-    </p>
-    <div class="examine_steps">
-      <el-steps direction="vertical" :space="50">
-        <el-step v-for="(item, index) in 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>
-              <div class="flex-box-ce" style="color: #303133;font-size:14px;margin-top:-2px;">
-                <div class="flex-1">
-                  {{ item.name }}
-                  <span style="margin: 0 5px;">
-                    <span v-if="item.remark == '待审核'" style="color:#E6A23C;font-size:13px">待审批</span>
-                    <span v-else-if="item.remark == '审核通过'" style="color:#67C23A;font-size:13px">审批通过</span>
-                    <span v-else-if="item.remark == '审核驳回'" style="color:#F56C6C;font-size:13px">审批驳回</span>
-                    <span v-else>{{ item.remark }}</span>
-                  </span>
-                  <strong style="font-weight: 500;">
-                    <span class="red point" v-show="item.review_point > 0">+{{ item.review_point }}</span>
-                    <span class="green point" v-show="item.review_point < 0">{{ item.review_point }}</span>
-                  </strong>
-                </div>
-                <span class="fontColorF" style="font-size:12px;">{{ item.time }}</span>
-              </div>
-            </div>
-          </template>
-          <template slot="description" style="">
-            <div class="fontColorB" style="margin: 5px 0;">{{ item.review_remark }}</div>
-          </template>
-        </el-step>
-      </el-steps>
-    </div>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'Steps',
-  props: {
-    process: {
-      type: Array,
-      default: () => {
-        return [];
-      }
-    }
-  },
-  data() {
-    return {};
-  },
-  methods: {}
-};
-</script>
-
-<style scoped="scoped" lang="scss">
-.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;
-  }
-}
-.row_tips{
-	font-size: 12px;
-}
-</style>

+ 0 - 268
src/components/Suggest.vue

@@ -1,268 +0,0 @@
-<template>
-	<el-dialog title="添加公告" :visible.sync="visible_" :close-on-click-modal="false" :before-close="close_before" append-to-body width="640px" top="5%">
-		<el-form ref="dialogData" label-width="100px" class="form">
-			<el-form-item label="公告标题" :rules="[{ required: true, message: '请输入公告标题', trigger: 'blur' }]">
-				<el-input type="text" v-model="params.name" placeholder="请输入公告标题" maxlength="30" show-word-limit></el-input>
-			</el-form-item>
-			<div style="border: 1px solid #ccc;margin-bottom: 20px;" v-if="visible_">
-				<!-- 工具栏 -->
-				<Toolbar style="border-bottom: 1px solid #ccc" :editorId="editorId" :defaultConfig="toolbarConfig"/>
-				<!-- 编辑器 -->
-				<Editor style="height: 300px" :editorId="editorId" :defaultConfig="editorConfig" :defaultContent="getDefaultContent" @onChange="onChange" />
-			</div>
-			<el-form-item label="图片">
-				<uploadOss
-					:headers="Xtoken"
-					:action="'https://' + 'integralsys.oss-cn-shenzhen.aliyuncs.com'"
-					:show-file-list="true"
-					:file-list="img_fileList"
-					:on-success="handleFilesSuccess"
-					:on-preview="onFilePreView"
-					:before-upload="beforeUpload"
-					:on-remove="onFileRemove"
-					:limit="1"
-					:multiple="true"
-				>
-					<el-button type="primary" size="small">点击上传</el-button>
-					(最多选择1张)
-				</uploadOss>
-			</el-form-item>
-		</el-form>
-		<span slot="footer" class="dialog-footer">
-			<el-button @click="close">取 消</el-button>
-			<el-button type="primary" @click="confirm">确 定</el-button>
-		</span>
-	</el-dialog>
-</template>
-
-<script>
-import uploadOss from '@/components/upload';
-import { Editor, Toolbar, getEditor, removeEditor, createEditor } from '@wangeditor/editor-for-vue';
-import cloneDeep from 'lodash.clonedeep';
-import { getToken } from '@/api/auth';
-export default {
-	name: 'Suggest',
-	components: { uploadOss, Editor, Toolbar },
-	props: {
-		isAdd: {
-			type: Boolean,
-			default: true
-		},
-		visible: {
-			// 是否显示组件
-			type: Boolean,
-			default: false
-		},
-		detaliData:{
-			type: Object,
-			default:()=>{
-				return {}
-			}
-		}
-	},
-	data() {
-		return {
-			Xtoken: { 'X-Token': getToken() },
-			visible_: false,
-			// 建议
-			img_fileList: [], // 图片附件
-			save_loading: false,
-			params: {
-				name: '',
-				html: '',
-				content: '',
-				file_list: [],
-				// tag: ['福利']
-			},
-
-			// 富文本
-			editorId: 'wangEditor-1', // 定义一个编辑器 id ,要求:全局唯一且不变。重要!!!
-			defaultContent: [], // 编辑器的默认内容,只在初始化时使用
-			latestContent: [], // 用于存储编辑器最新的内容,onChange 时修改
-			toolbarConfig: {
-				mode: 'simple',
-				toolbarKeys: [
-					'headerSelect', // 分割线
-					'|',
-					'bold',
-					'italic',
-					'underline',
-					'through',
-					'color',
-					'bgColor',
-					'indent',
-					'justifyLeft',
-					'justifyRight',
-					'justifyCenter',
-					'justifyJustify',
-					'bulletedList',
-					'numberedList',
-					'clearStyle'
-				]
-			},
-			editorConfig: {
-				placeholder: '请输入内容...'
-			}
-		};
-	},
-	computed: {
-		// <!-- 注意,这里使用 computed 的结果 -->
-		getDefaultContent() {
-			return cloneDeep(this.defaultContent); // 深拷贝,重要!!!
-		}
-	},
-	watch: {
-		visible(val) {
-			if(!this.isAdd&&val){
-				let detaliData=this.detaliData;
-				if(detaliData.content.content){
-					this.defaultContent=JSON.parse(detaliData.content.content);
-					if(detaliData.file_list){
-						this.img_fileList=[{name:'图片',url:detaliData.file_list}]
-						this.params.file_list=[detaliData.file_list]
-					}
-					
-				}
-				this.params.name=detaliData.name
-			}
-			this.visible_ = JSON.parse(JSON.stringify(val));
-		}
-	},
-	methods: {
-		onChange(editor) {
-			this.params.content = editor.children;
-			this.params.html = editor.getHtml();
-		},
-		// 图片上传
-		beforeUpload(file) {
-			const isJPG = /^image\/(jpeg|png|jpg)$/.test(file.type);
-			const isLt2M = file.size / 1024 / 1024 < 2;
-			if (!isJPG) {
-				this.$message.error('上传图片只能是 jpeg|png|jpg 格式!');
-			}
-			if (!isLt2M) {
-				this.$message.error('上传图片大小不能超过 2MB!');
-			}
-			return isJPG && isLt2M;
-		},
-		onFilePreView(file) {
-			window.open(file.url, '_blank');
-		},
-		onFileRemove(file, fileList) {
-			this.img_fileList = fileList;
-			let imgs = [];
-			fileList.forEach((element, index) => {
-				imgs.push(element.url);
-			});
-			this.params.file_list = imgs;
-		},
-		handleFilesSuccess(response, file, fileList) {
-			this.img_fileList = fileList;
-			let imgs = [];
-			fileList.forEach((element, index) => {
-				imgs.push(element.url);
-			});
-			this.params.file_list = imgs;
-		},
-
-		// 确定
-		confirm() {
-			if (!this.params.name) {
-				this.$message.error('请填写标题');
-				return false;
-			}
-			this.params.content=JSON.stringify(this.params.content)
-			if(!this.isAdd){
-				this.params.id=this.detaliData.id;
-				this.$axios('post','/api/information/update',this.params).then(res => {
-						this.$message.success('发布成功');
-						this.$parent.noticeList();
-						this.close();
-				})
-			}else{
-				this.$axios('post','/api/information/create',this.params).then(res => {
-						this.$message.success('发布成功');
-						this.$parent.noticeList();
-						this.close();
-				})
-			}
-		},
-		close_before(done) {
-			this.close();
-			done();
-		},
-		close() {
-			this.img_fileList=[];
-			this.defaultContent=[];
-			this.params={
-				name: '',
-				html: '',
-				content: '',
-				file_list: [],
-			};
-			this.beforeDestroys();
-			this.$emit('update:visible', false);
-		},
-		beforeDestroys() {
-			const editor = getEditor(this.editorId);
-			if (editor == null) return;
-			editor.destroy(); // 组件销毁时,及时销毁编辑器 ,重要!!!
-			removeEditor(this.editorId);
-		}
-	},
-};
-</script>
-<style src="@wangeditor/editor/dist/css/style.css"></style>
-<style scoped="scoped" lang="scss">
-/* 表格 */
-table {
-	border-collapse: collapse;
-}
-table th,
-table td {
-	border: 1px solid #ccc;
-	min-width: 50px;
-	height: 20px;
-	text-align: left;
-}
-table th {
-	background-color: #f1f1f1;
-	text-align: center;
-}
-
-/* 代码块 */
-pre > code {
-	display: block;
-	border: 1px solid hsl(0, 0%, 91%);
-	border-radius: 4px 4px;
-	text-indent: 0;
-	background-color: #fafafa;
-	padding: 10px;
-	font-size: 14px;
-}
-
-/* 引用 */
-blockquote {
-	display: block;
-	border-left: 8px solid #d0e5f2;
-	padding: 10px 10px;
-	margin: 10px 0;
-	background-color: #f1f1f1;
-}
-
-/* 列表 */
-ul,
-ol {
-	margin: 10px 0 10px 20px;
-}
-
-/* 分割线 */
-hr {
-	display: block;
-	width: 90%;
-	margin: 20px auto;
-	border: 0;
-	height: 1px;
-	background-color: #ccc;
-}
-</style>

+ 5 - 6
src/components/SvgIcon/index.vue

@@ -1,20 +1,19 @@
 <template>
-  <svg :class="svgClass" aria-hidden="true" v-on="$listeners">
-    <use :xlink:href="iconName" />
+  <svg :class="svgClass" aria-hidden="true">
+    <use :xlink:href="iconName"></use>
   </svg>
 </template>
 
 <script>
 export default {
-  name: 'SvgIcon',
+  name: 'svg-icon',
   props: {
     iconClass: {
       type: String,
       required: true
     },
     className: {
-      type: String,
-      default: ''
+      type: String
     }
   },
   computed: {
@@ -40,4 +39,4 @@ export default {
   fill: currentColor;
   overflow: hidden;
 }
-</style>
+</style>

+ 0 - 110
src/components/VirtualList.vue

@@ -1,110 +0,0 @@
-<template>
-  <div ref="list" class="infinite-list-container" @scroll="scrollEvent($event)">
-    <div class="infinite-list-phantom" :style="{ height: listHeight + 'px' }"></div>
-    <div class="infinite-list" :style="{ transform: getTransform }">
-      <div ref="items" class="infinite-list-item"  v-for="item in visibleData"  :key="item.id"
-	   :style="{ height: itemSize + 'px',lineHeight: itemSize + 'px' }"
-      >{{ item.value }}</div>
-    </div>
-  </div>
-</template>
-
-<script>
-export default {
-  name:'VirtualList',
-  props: {
-    //所有列表数据
-    listData:{
-      type:Array,
-      default:()=>[]
-    },
-    //每项高度
-    itemSize: {
-      type: Number,
-      default:200
-    }
-  },
-  data() {
-    return {
-      //可视区域高度
-      screenHeight:0,
-      //偏移量
-      startOffset:0,
-      //起始索引
-      start:0,
-      //结束索引
-      end:null,
-    };
-  },
-  computed:{
-    //列表总高度
-    listHeight(){
-      return this.listData.length * this.itemSize;
-    },
-    //可显示的列表项数
-    visibleCount(){
-	  //  Math.ceil() 方法可对一个数进行向上取整。
-      return Math.ceil(this.screenHeight / this.itemSize)
-    },
-    //偏移量对应的style
-    getTransform(){
-      return `translate3d(0,${this.startOffset}px,0)`;
-    },
-    //获取真实显示列表数据
-    visibleData(){
-      return this.listData.slice(this.start, Math.min(this.end,this.listData.length));
-    }
-  },
-  mounted() {
-	 //可视区域高度 
-    this.screenHeight = this.$el.clientHeight;
-	
-    this.start = 0;
-    this.end = this.start + this.visibleCount;
-  },
-  methods: {
-    scrollEvent() {
-      //当前滚动位置
-      let scrollTop = this.$refs.list.scrollTop;
-      //此时的开始索引
-	  // Math.floor方法可对一个数进行下舍入。
-      this.start = Math.floor(scrollTop / this.itemSize);
-      //此时的结束索引
-      this.end = this.start + this.visibleCount;
-      //此时的偏移量
-      this.startOffset = scrollTop - (scrollTop % this.itemSize);
-    }
-  }
-};
-</script>
-<style scoped>
-.infinite-list-container {
-  height: 100%;
-  overflow: auto;
-  position: relative;
-  -webkit-overflow-scrolling: touch;
-}
-
-.infinite-list-phantom {
-  position: absolute;
-  left: 0;
-  top: 0;
-  right: 0;
-  z-index: -1;
-}
-
-.infinite-list {
-  left: 0;
-  right: 0;
-  top: 0;
-  position: absolute;
-  text-align: center;
-}
-
-.infinite-list-item {
-  padding: 10px;
-  color: #555;
-  box-sizing: border-box;
-  border-bottom: 1px solid #999;
-}
-</style>

+ 0 - 819
src/components/applicationIntegrationPopup.vue

@@ -1,819 +0,0 @@
-<template>
-	<div>
-		<!-- 奖扣ab分弹窗 -->
-		<el-dialog :title="title" :visible.sync="visible" :close-on-click-modal="false" :before-close="closeDialog2" 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;" class="flex-box flex-v-ce">
-							<span style="line-height: 36px;" class="flex-1">申请明细({{ index + 1 }})</span>
-							<el-button type="text" 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>
-
-							<el-dialog title="选择人员" width="640px" :visible.sync="item.show_employee_selector" append-to-body :before-close="handleClose">
-								<EmployeeSelector
-									v-if="item.show_employee_selector"
-									ref="employee"
-									:multi="false"
-									:user_no_select="false"
-									:selected="item.employee_selected"
-									@confirm="employee_confirm"
-								/>
-								<span slot="footer" class="dialog-footer">
-									<el-button @click="item.show_employee_selector = false">取 消</el-button>
-									<el-button type="primary" @click="submitMembers('employee')">确 定</el-button>
-								</span>
-							</el-dialog>
-						</el-form-item>
-						<el-form-item label="指定规则"><el-switch v-model="item.rule_switch" @change="switchChange(index, item.rule_switch)" :disabled="ruleOnoff"></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: 'change' }]"
-						>
-							<el-cascader
-								v-model="item.rule_item_list_value"
-								ref="ruleItem"
-								:popper-class="'itemClass'"
-								:options="rule_item_list"
-								@change="ruleItemChange"
-								:show-all-levels="false"
-								filterable
-								clearable
-								:props="{ children: 'child', label: 'name', value: 'id' }"
-							></el-cascader>
-						</el-form-item>
-
-						<el-form-item v-if="item.rule_switch && item.rule_id">
-							<div style="line-height: 24px;" v-show="item.rule_item_details.range_type == 1">
-								{{ item.rule_item_details.min_point }}
-								<span class="blue">{{ $getTypsName(item.rule_item_details.pt_id) }}</span>
-							</div>
-							<div style="line-height: 24px;" v-show="item.rule_item_details.range_type == 2">
-								{{ item.rule_item_details.min_point }} ~ {{ item.rule_item_details.max_point }}
-								<span class="blue">{{ $getTypsName(item.rule_item_details.pt_id) }}</span>
-							</div>
-							<div style="line-height: 24px;">{{ 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"
-										:picker-options="pickerBeginDateBefore"
-										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="3" placeholder="请输入事件内容" style="width: 100%;" v-model="item.remark"></el-input></el-col>
-							</el-row>
-						</el-form-item>
-
-						<el-form-item label="图片" label-width="100px">
-							<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
-							v-loading.lock="fullscreenLoading"
-							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 @click="approval_selected_null(item)" style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"></div>
-								</el-col>
-							</el-row>
-							<el-dialog title="选择人员" width="640px" :visible.sync="item.show_approval_selector" append-to-body :before-close="handleClose">
-								<EmployeeSelector
-									:can_select_employee="true"
-									v-if="item.show_approval_selector"
-									ref="approval"
-									:multi="false"
-									:employee_list="item.approval_employee_list"
-									:user_no_select="false"
-									:isCreatorSelect="true"
-									:selected="item.approval_selected"
-									@confirm="approval_confirm"
-								/>
-								<span slot="footer" class="dialog-footer">
-									<el-button @click="item.show_approval_selector = false">取 消</el-button>
-									<el-button type="primary" @click="submitApproval('approval')">确 定</el-button>
-								</span>
-							</el-dialog>
-						</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="closeDialog2('dialogData')">取 消</el-button>
-						<el-button :disabled="btn_loading" :loading="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" :before-close="closeDialog2" :append-to-body="true" width="700px">
-			<el-table :data="error_list">
-				<el-table-column prop="target" 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="remark" label="备注信息"></el-table-column>
-			</el-table>
-		</el-dialog>
-		
-		<el-dialog title="提交结果" :visible.sync="isResult"  width="800" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false">
-			<div class="" v-if="!isShowError">
-				<div style="text-align: center;margin-bottom: 10px;" class="red" v-if="isShowError2">{{errorMsg}}</div>
-				<el-progress :text-inside="true" :stroke-width="24" :percentage="percentage"></el-progress>
-				<div style="margin-top: 20px;border: 1px solid #f1f1f1;">
-					<div class="flex-box-ce results" style="font-weight: 600;">
-						<div  style="border-right: 1px solid #f1f1f1;width: 50px;">序号</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">奖扣对象</div>
-						<div class="flex-2" style="border-right: 1px solid #f1f1f1;">申请内容</div>
-						<!-- <div class="flex-1" style="border-right: 1px solid #f1f1f1;">积分</div> -->
-						<div class="flex-2" >处理结果</div>
-					</div>
-					<div class="flex-box-ce results" v-for="(item, index) in results" :key="index">
-						<div  style="border-right: 1px solid #f1f1f1;width: 50px;">{{results.length-index}}</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.target }}</div>
-						<div class="flex-2" style="border-right: 1px solid #f1f1f1;">{{ item.remark }}</div>
-<!-- 						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">
-						    {{ item.point>0? '+'+item.point:item.point }} 
-							<span>{{ item.task.msg.pt_id==3? 'B分':'A分' }}</span>
-						</div> -->
-						<div class="flex-2 green" v-if="item.status == 1">{{ item.msg }}</div>
-						<div class="flex-2 red" v-else>{{ item.msg }}</div>
-					</div>
-				</div>
-				<span slot="footer">
-					<div class="flex-box-end" style="margin-top: 20px;" v-show="isShowError2&&results.length!=resultList.length"><el-button type="primary" @click="isResult = false" size="small">确 定</el-button></div>
-					<div class="flex-box-end" style="margin-top: 20px;" v-show="results.length==resultList.length">
-						<el-button type="primary" @click="isResult = false" size="small">确 定</el-button>
-					</div>
-				</span>
-			</div>
-			<div v-else>
-				<div style="text-align: center;" class="red">{{errorMsg}}</div>
-				<span slot="footer">
-					<div class="flex-box-end" style="margin-top: 20px;"><el-button type="primary" @click="isResult = false" size="small">确 定</el-button></div>
-				</span>
-			</div>
-		</el-dialog>
-		
-		<!-- 缓存的奖扣 -->
-		<el-dialog title="网络中断申请列表" :visible.sync="isShowBreak"  width="800" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false">
-			<div>
-				<div style="margin-top: 20px;border: 1px solid #f1f1f1;max-height: 500px;overflow-y: auto;" class="scroll-bar">
-					<div class="flex-box-ce results" style="font-weight: 600;">
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">奖扣对象</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">分类</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">规则</div>
-						<div class="flex-2" style="border-right: 1px solid #f1f1f1;">事件内容</div>
-						<!-- <div class="flex-1" style="border-right: 1px solid #f1f1f1;">积分</div> -->
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">递交人员</div>
-					</div>
-					<div class="flex-box-ce results" v-for="(item, index) in breakList" :key="index">
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.name }}</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">
-							<span v-if="item.rule_name">{{ item.rule_name }}</span>
-							<span v-else>--</span>
-						</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">
-							<span v-if="item.item_name">{{ item.item_name }}</span>
-							<span v-else>--</span>
-						</div>
-						<div class="flex-2" style="border-right: 1px solid #f1f1f1;">{{ item.remark }}</div>
-<!-- 						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.point }} 
-							<span>{{ item.pt_id==3? 'B分':'A分' }}</span>
-						</div> -->
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.reviewer_name }}</div>
-					</div>
-				</div>
-				<span slot="footer">
-					<div class="flex-box-end" style="margin-top: 20px;">
-						<el-button type="primary" @click="colseBreak()" size="small">取 消</el-button>
-						<el-button type="primary" @click="submitBreak()" size="small">再次提交</el-button>
-					</div>
-				</span>
-			</div>
-		</el-dialog>
-	
-	</div>
-</template>
-
-<script>
-import moment from 'moment';
-import EmployeeSelector from '@/components/EmployeeSelector';
-import uploadOss from '@/components/upload';
-export default {
-	name: 'applicationIntegration',
-	// 数据
-	model: {
-		prop: 'list',
-		event: 'value'
-	},
-	props: {
-		title: {
-			type: String,
-			default: ''
-		},
-		visible: {
-			type: Boolean,
-			default: false
-		},
-		isBreak: { //是否打开缓存的未完成奖扣
-			type: Boolean,
-			default: false
-		},
-		integralType: {
-			type: Number,
-			default: 0
-		},
-		ruleOnoff: {
-			type: Boolean,
-			default: false
-			//true:选择规则; false:选择分类
-		}
-	},
-	data() {
-		var getUserData = this.$getUserData();
-		return {
-			pickerBeginDateBefore: {
-				disabledDate(time) {
-					return time.getTime() > Date.now();
-				}
-			},
-			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'),
-
-						// 录入对象
-						employee_id: getUserData.id,
-						employeeName: getUserData.name,
-						employee_selected: { dept: [], employee: [{ id: getUserData.id, name: getUserData.name }] },
-						show_employee_selector: false,
-
-						// 审批人信息
-						reviewer_id: '',
-						approvalName: '',
-						approval_selected: { dept: [], employee: [] },
-						approval_employee_list: [], //当前选中人的 上级
-						show_approval_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,
-			btn_loading: false,
-			itemIndex: 0,
-			fullscreenLoading: false, //选择审批人时需要,获取录入对象的上级
-			LocalValObj: { id: '', name: '' } ,//当前录入的审批人缓存
-			
-			// 长连接结果
-			results: [], //提交的返回结果集合
-			isResult: false,
-			percentage: 0,
-			resultList:[],//要发送数据的集合
-			resultIndex:0,
-			isShowError:false,
-			isShowError2:false,
-			errorMsg:'服务器繁忙,请稍后再试',
-			breakList:[],
-			isShowBreak:false,
-		};
-	},
-	components: { EmployeeSelector, uploadOss },
-	async mounted() {
-		this.user_info = this.$getUserData();
-		var reviewerObj = await this.getLocalVal(this.user_info.id);
-		var res = reviewerObj ? reviewerObj : { id: '', name: '' };
-		this.LocalValObj = res;
-		this.getRuleItemData();
-		// 初始化审批人
-		if (this.LocalValObj.id) {
-			this.dialogData.items[0].approval_selected.employee = [this.LocalValObj];
-			this.dialogData.items[0].reviewer_id = this.LocalValObj.id;
-			this.dialogData.items[0].approvalName = this.LocalValObj.name;
-		}
-		if(this.isBreak){
-			let data=this.$getCache('apply_list');
-			data.forEach(item=>{
-				item.name=this.$getCache('userList')[item.employee_id]?this.$getCache('userList')[item.employee_id].name:'--';
-				item.reviewer_name=this.$getCache('userList')[item.reviewer_id]?this.$getCache('userList')[item.reviewer_id].name:'--';
-			})
-			this.breakList=data;
-			this.isShowBreak=true;
-		}
-	},
-	watch:{
-		isResult(val){
-			if(!val){
-				this.isShowError=false;
-				this.isShowBreak = false;
-				this.errorMsg='服务器繁忙,请稍后再试';
-				this.$refs['dialogData'].resetFields();
-				this.closeDialog();
-				this.closeDialog2();
-				this.$socketApi.closewebsocket();
-			}
-		}
-	},
-	methods: {
-		// 关闭缓存弹窗
-		colseBreak(){
-			this.isShowBreak = false;
-			this.breakList=[];
-			this.$removeCache('apply_list');
-			this.closeDialog();
-			this.closeDialog2();
-		},
-		// 提交缓存申请
-		submitBreak(){
-			this.$removeCache('apply_list');
-			this.resultList=JSON.parse(JSON.stringify(this.breakList));
-			this.resultIndex=0;
-			this.percentage=0;
-			this.results=[];
-			this.isResult=true;
-			this.opneWebSocket()
-		},
-		
-		//获取缓存起来的审批人
-		getLocalVal(id) {
-			return new Promise((resolve, reject) =>{
-				let obj;
-				this.$axios('get', '/api/employee/info', { id: id }).then(res =>{
-					if(res.data.code == 1){
-						let data = res.data.data;
-						if(data.employee_detail.superior_list && data.employee_detail.superior_id != 0){
-							obj = data.employee_detail.superior_list.filter(x => x.id == data.employee_detail.superior_id)[0];
-							if(obj.id == this.user_info.id){
-								obj = this.$getCache(id)
-							}
-						}else{
-							obj = this.$getCache(id);
-						}
-					}
-				}).finally(_ =>{
-					resolve(obj)
-				})
-			})
-		},
-		submitMembers(name) {
-			this.$refs[name][0].confirm(); //调用组件的confirm();
-		},
-		submitApproval(name) {
-			this.$refs[name][0].confirm(); //调用组件的confirm();
-		},
-		//关闭
-		handleClose(done) {
-			done();
-		},
-		// 附件上传
-		beforeUpload(file) {
-			const isJPG = /^image\/(jpeg|png|jpg)$/.test(file.type);
-			const isLt2M = file.size / 1024 / 1024 < 1;
-			if (!isJPG) {
-				this.$message.error('上传头像图片只能是 JPEG,PNG,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(item) {
-			if (!item.employee_id) {
-				this.$message.error('请先选择录入对象');
-			} else {
-				this.fullscreenLoading = true;
-				this.getEmployeeList(item.employee_id, function(res) {
-					if (res.length > 0) {
-						item.approval_employee_list = res;
-						item.show_approval_selector = true;
-					} else {
-						this.$message.error('您没有审批人,请联系管理员');
-					}
-				});
-			}
-		},
-		//获取人员(上级人员)
-		getEmployeeList(userIdArr, callBack) {
-			this.$axios('get', 'api/employee/superior', { employee_id: userIdArr, filter_applyor: 1 })
-				.then(res => {
-					callBack(res.data.data.list);
-				})
-				.finally(() => {
-					this.fullscreenLoading = false;
-				});
-		},
-		// 获取规则信息
-		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);
-			});
-		},
-		// 获取规则细则
-		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;
-				}
-			});
-		},
-		// 规则细则变化关闭down
-		ruleItemChange(value) {
-			const item = this.dialogData.items[this.itemIndex];
-			if(value.length>0){
-				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.pt_id = ruleItemDetail.pt_id;
-				item.item_id = value[value.length - 1];
-				item.item_name = ruleItemDetail.name;
-				this.$refs.ruleItem.dropDownVisible = false;
-			}else{
-				item.rule_id = '';
-				item.pt_id="";
-				item.item_id = '';
-				item.remark =  '';
-				item.item_name =  '';
-				item.rule_item_list_value = '';
-				item.rule_item_details = { range_type: '' };
-			}	
-		},
-		// 递归判断列表,把最后的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;
-		},
-		// 选择对象
-		async employee_confirm(data) {
-			const item = this.dialogData.items[this.itemIndex];
-			item.employeeName = '';
-			item.employee_selected = { 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;
-
-				var reviewerObj = await this.getLocalVal(data.employee[0].id);
-				var revieObj = reviewerObj ? reviewerObj : { id: '', name: '' };
-				// 清空审批人数据
-				if (revieObj.id) {
-					item.approval_selected = { dept: [], employee: [revieObj] };
-				} else {
-					item.approval_selected = { dept: [], employee: [] };
-				}
-				item.reviewer_id = revieObj.id;
-				item.approvalName = revieObj.name;
-				item.approval_employee_list = []; //当前选中人的 上级
-			}
-			item.show_employee_selector = false;
-		},
-
-		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() {
-			// if(this.dialogData.items.length==10){
-			// 	this.$message({
-			// 		type:"warning",
-			// 		message: '一次只能添加10条申请'
-			// 	});
-			// 	return false
-			// }
-			this.dialogData.items.push({
-				rule_switch: true,
-				rule_id: '',
-				item_id: '',
-				remark: '',
-				event_time: moment().format('YYYY-MM-DD'),
-
-				// 录入对象
-				employee_id: this.user_info.id,
-				employeeName: this.user_info.name,
-				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,
-
-				// 审批人信息
-				reviewer_id: this.LocalValObj.id,
-				approvalName: this.LocalValObj.name,
-				approval_selected: { dept: [], employee: this.LocalValObj.id ? [this.LocalValObj] : [] },
-				approval_employee_list: [], //当前选中人的 上级
-				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 = [
-				{
-					rule_switch: true,
-					rule_id: '',
-					item_id: '',
-					remark: '',
-					event_time: moment().format('YYYY-MM-DD'),
-
-					// 录入对象
-					employee_id: this.user_info.id,
-					employeeName: this.user_info.name,
-					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,
-
-					// 审批人信息
-					reviewer_id: '',
-					approvalName: '',
-					approval_employee_list: [], //当前选中人的 上级
-					approval_selected: { dept: [], employee: [] },
-					show_approval_selector: false,
-
-					// 附件
-					fileList: [],
-					files: [],
-					// 规则分类 与 规则细则 名称
-					rule_list_value: null,
-					rule_item_list_value: null,
-					rule_item_details: { range_type: '' }
-				}
-			];
-		},
-		delItem(index) {
-			this.$confirm('你确定要删除奖扣明细' + parseInt(index + 1) + '吗?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			}).then(() => {
-				this.dialogData.items.splice(index, 1);
-				this.$message({
-					type: 'success',
-					message: '删除成功!'
-				});
-			});
-		},
-		subData(formName) {
-			this.$refs[formName].validate(valid => {
-				if (valid) {
-					this.save();
-				}
-			});
-		},
-		closeDialog2(){
-			this.$emit('update:visible', false);
-		},
-		// 提交数据
-		save() {
-			let data = { items: [] };
-			this.dialogData.items.forEach(element => {
-				data.items.push({
-					rule_id: element.rule_id || 0,
-					employee_id: element.employee_id,
-					item_id: element.item_id || 0,
-					item_name: element.item_name,
-					remark: element.remark,
-					event_time: element.event_time,
-					pt_id: element.pt_id,
-					reviewer_id: element.reviewer_id || 0,
-					approvalName: element.approvalName,
-					files: element.files
-				});
-			});
-			this.webSocket(data);
-			// 走长连接处理
-			return false;
-			this.btn_loading = true;
-			this.$axios('post', '/api/integral/review/apply', data)
-				.then(res => {
-					if (res.data.code == 1) {
-						this.closeDialog();
-						this.error_list = res.data.data.list;
-						this.error_list_show = true;
-					}
-				})
-				.finally(() => {
-					this.btn_loading = false;
-					data.items.forEach(element => {
-						this.$setCache(element.employee_id,{ id: element.reviewer_id, name: element.approvalName });
-					});
-				});
-		},
-		webSocket(data){
-			data.items.forEach(item=>{
-				item.type='point_apply';
-				this.$setCache(item.employee_id,{ id: item.reviewer_id, name: item.approvalName });
-			})
-			this.resultList=data.items;
-			this.resultIndex=0;
-			this.percentage=0;
-			this.results=[];
-			this.isResult=true;
-			this.opneWebSocket()
-		},
-		opneWebSocket() {
-			let wsData=this.resultList;
-			if(wsData[this.resultIndex]){
-				this.$socketApi.sendData(wsData[this.resultIndex],this.onmessageWS)
-			}else{
-				console.log(this.results)
-			}
-			
-		},
-		onmessageWS(e){
-			if(e.type=='point_apply'){
-				this.results.push(e.result);
-				this.resultIndex++;
-				this.opneWebSocket();
-				// 进度条
-				let lng = this.resultList.length;
-				this.percentage += Math.floor(100 / lng);
-				if (lng == this.results.length) {
-					this.percentage = 100;
-				}
-			}
-			// 中途断开
-			if(e.type=='break'){
-				let wsData=this.resultList;
-				this.errorMsg=e.msg
-				this.$setCache('apply_list',wsData.slice(this.resultIndex,wsData.length));
-				this.isShowError2 = true;
-			}
-			// 连接不上
-			if(e.type=='error'){
-				this.errorMsg=e.msg
-				this.isShowError = true;
-			}
-		},
-		// 当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.remark =  '';
-				item.rule_item_details = { range_type: '' };
-			} else {
-				item.rule_id = '';
-				item.rule_list_value = '';
-			}
-		},
-		// 选择审核人
-		approval_confirm(data) {
-			const item = this.dialogData.items[this.itemIndex];
-			item.approvalName = '';
-			item.approval_selected = { 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.show_approval_selector = 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;
-	}
-}
-.results {
-	border-bottom: 1px solid #f1f1f1;
-	text-align: center;
-}
-.results div {
-	padding: 10px;
-}
-</style>

+ 74 - 0
src/components/assessManage/AssessConfigTab.vue

@@ -0,0 +1,74 @@
+<template>
+    <div class="scoreTab">
+        <el-table :data="advconTab1" stripe style="width: 100%">
+        <el-table-column prop="name"></el-table-column>
+        <el-table-column
+            prop="name"
+            label="本人评分">
+            <template slot-scope="scope">
+                <el-radio v-model="scope.row.iScore" :disabled="scope.row.forbidden" label="1">{{""}}</el-radio>
+            </template>
+        </el-table-column>
+        <el-table-column
+            prop="address"
+            label="所有评分">
+            <template slot-scope="scope">
+                <el-radio v-model="scope.row.iScore" :disabled="scope.row.forbidden" label="2">{{""}}</el-radio>
+            </template>
+        </el-table-column>
+        </el-table>
+    </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+        dswScore_details1:false,//评分详情---对被考核人可不可见
+
+        advconTab1:[
+          {name:'被考核人',iScore:'1',forbidden:false},
+          {name:'上级评分',iScore:'2',forbidden:false},
+          {name:'指定评分人',iScore:'1',forbidden:false},
+          {name:'互评(同级、下级)',iScore:'1',forbidden:false},
+          {name:'审批人',iScore:'2',forbidden:true},
+        ],
+    };
+  },
+  components:{},
+  watch: {
+    dswScore_details1(val){
+      if(val){
+        this.advconTab1[0].iScore = '2'
+      }else{
+        this.advconTab1[0].iScore = '1'
+      }
+    },
+    'advconTab1':{//监听advconTab1
+      handler(objval,oldval){
+        if(objval[0].iScore=='1'){
+          this.dswScore_details1 = false
+        }else{
+          this.dswScore_details1 = true
+        }
+      },
+      deep:true//深度监听
+    },
+  },
+  created() {},
+  mounted() {},
+  methods: {
+  }
+};
+</script>
+
+<style scoped="scoped">
+.scoreTab ::v-deep .el-table th{
+  background-color: #f5f5f5;
+  font-size: 13px;
+  padding: 0;
+}
+.scoreTab ::v-deep .el-table .el-table__row .cell{
+  font-size: 12px;
+}
+</style>

+ 410 - 0
src/components/assessManage/SelectAttendanceGroup.vue

@@ -0,0 +1,410 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="visible_"
+    :close-on-click-modal="false"
+    :before-close="close_before"
+    append-to-body
+    @open="openDialog"
+    width="720px"
+    class="selectAG"
+  >
+    <el-container>
+      <el-aside style="width:438px;">
+        <div class="flex-box flex-d-center asideHead">
+          <span v-for="(item,index) in activeList" :key="index" :class="{'active':item.value == asidetableparams.cycle_type}" @click="cliasideHead(item.value)">{{item.label}}</span>
+        </div>
+        <div style="padding: 15px 5px 15px 0;">
+          <JxSearch :screen="1" title="请输入关键字搜索" @confirm="groupSearch"></JxSearch>
+        </div>
+        <el-table
+			stripe
+          ref="asideTabData"
+          max-height="350"
+          :data="asidetableData"
+          tooltip-effect="dark"
+          style="width: 100%"
+          @selection-change="asideSChange"
+          v-loading="asideTabLoad"
+          @cell-click="asideSClick"
+          class="asideTable"
+        >
+          <el-table-column type="selection" width="55" :selectable="selectable"></el-table-column>
+          <el-table-column label="全选">
+            <template slot-scope="scope">
+              <div class="flex-box flex-d-center asidetabDie">
+                <span>{{scope.row.name}}</span>
+                <span>
+                  <span>{{
+                    scope.row.cycle_type == 1?'天':
+                    scope.row.cycle_type == 2?'月度':
+                    scope.row.cycle_type == 3?'季度':
+                    scope.row.cycle_type == 4?'半年度':
+                    scope.row.cycle_type == 5?'年度':
+                    scope.row.cycle_type == 6?'自定义':''
+                  }}</span>
+                  <span>{{scope.row.employee_num}}人</span>
+                </span>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-aside>
+
+      <el-main>
+        <div class="mainHead flex-box flex-d-center" v-if="asideSChangeData.length>0">
+          <span>已选择{{asideSChangeData.length}}个</span>
+          <span @click="mainEmpty">清空</span>
+        </div>
+        <div class="mainTag">
+          <el-tag
+            v-for="(item,index) in asideSChangeData"
+            :key="index"
+            closable
+            :disable-transitions="true"
+            @close="mainTagClose(item,index)">
+            {{item.name}}
+          </el-tag>
+        </div>
+      </el-main>
+    </el-container>
+    <el-footer class="flex-box flex-box-end">
+      <el-button round @click="dialogno">取消</el-button>
+      <el-button type="primary" round @click="dialogok" >确定</el-button>
+    </el-footer>
+  </el-dialog>
+</template>
+
+<script>
+import JxSearch from '@/components/public/JxSearch'
+export default {
+  props:{
+    title:{//头部title
+      type: String,
+      default: '考核表筛选'
+    },
+    visible:{//弹窗开关
+      type: Boolean,
+      default: false,
+    },
+    selectedAG:{
+      type: [Array,Object],
+      default:[],
+    }
+
+  },
+  data() {
+    return {
+      // asideinput:'',//搜索
+      asidetableData:[],//考核表数据列表
+      asidetableparams:{
+        search_words :null,
+        cycle_type :0,//选项时间的标识
+        page :0,
+        page_size:null,
+        // permissions:0
+      },
+      asideSChangeData:[],//已选考核表
+      asideTabLoad:false,//考核表TabLoading
+
+      visible_:false,//弹窗开关
+      activeList: [
+        { value: 0, label: "全部" },
+        { value: 2, label: "月度" },
+        { value: 3, label: "季度" },
+        { value: 4, label: "半年度" },
+        { value: 5, label: "年度" },
+        { value: 1, label: "日" },
+        { value: 6, label: "自定义" }
+      ],
+    };
+  },
+  components:{JxSearch},
+  watch: {
+    visible(val){
+      this.visible_ = val
+    },
+  },
+  created() {
+    this.asideData()
+  },
+  mounted() {},
+  methods: {
+    selectable(row,index){
+      return row.employee_num==0? false:true
+    },
+    groupSearch(data){//搜索huidiao
+      this.asidetableparams.search_words = data
+      this.asideData()
+    },
+    //点击取消
+    dialogno(){
+      this.close()
+    },
+    //点击确定
+    dialogok(){
+      if(this.asideSChangeData.length>0){
+        let list = this.asideSChangeData[0].cycle_type
+        let waitCT = false
+        this.asideSChangeData.forEach((item,index)=>{
+          if(list != item.cycle_type){
+            waitCT = true
+            return
+          }
+        })
+        if(waitCT){
+          this.errorage('只能选择同一周期类型的考核表')
+        }else{
+          this.$emit('confirm', {
+            assessgroup: this.asideSChangeData
+          });
+          this.close()
+        }
+      }else{
+        this.errorage('请选择考核表')
+      }
+    },
+    errorage(arr){
+      this.$message({
+        message: arr,
+        type: 'warning'
+      });
+    },
+    //请求考核表列表
+    asideData(){
+      this.asideTabLoad = true
+      this.$axios('get','/api/per/evaluation/all_group',this.asidetableparams).then((res)=>{
+        if(res.data.code == 1){
+          this.asidetableData  = res.data.data.list
+          this.$nextTick(()=>{
+            if(this.selectedAG.length>0){
+              let arrInter = [...this.asidetableData].filter(x => [...this.selectedAG].some(y => y.id === x.id));
+              this.toggleSelection(arrInter)
+            }
+          })
+        }
+      }).finally(()=>{
+        this.asideTabLoad = false
+      })
+    },
+    //打开Dialog回调
+    openDialog() {
+      if(this.selectedAG.length>0){
+        this.cliasideHead(this.selectedAG[0].cycle_type)//传入已选的时间标识 cycle_type
+      }
+    },
+    //关闭前的回调
+    close_before(){
+      this.close()
+    },
+    //关闭Dialog
+    close(){
+      this.$emit('update:visible',false)
+      setTimeout(()=>{//延迟清空
+        this.mainEmpty()//清空选中
+      },150)
+    },
+
+
+    cliasideHead(value){//时间选项点击
+      this.asidetableparams.cycle_type = value//传入标识-作用变色
+      this.asideData()//请求数据
+      this.mainEmpty()//清空选中
+    },
+
+    asideSChange(val){
+      this.asideSChangeData = val
+      // console.log(val)
+    },
+    //表格点击行
+    asideSClick(row, column, cell, event) {
+      if(row.employee_num==0){
+        return false
+      }
+      this.toggleSelection([row]);
+    },
+    //点击行选中
+    toggleSelection(rows) {
+      if (rows) {
+        rows.forEach(row => {
+          this.$refs.asideTabData.toggleRowSelection(row);
+        });
+      } else {
+        this.$refs.asideTabData.clearSelection();
+      }
+    },
+    mainEmpty(){//清空选中
+      this.toggleSelection(this.asideSChangeData)
+    },
+
+    mainTagClose(item,index){//清除右侧tag
+      this.asideSChangeData.splice(index,1)
+      this.toggleSelection([item])
+    },
+  }
+};
+</script>
+
+<style scoped="scoped" lang="scss">
+.selectAG{
+  ::v-deep .el-dialog{
+    border-radius: 5px;
+  }
+  ::v-deep .el-dialog__header{
+    background-color: #ECF5FF;
+    border-top-right-radius: 5px;
+    border-top-left-radius: 5px;
+  }
+  ::v-deep .el-dialog__title{
+    font-size: 16px;
+  }
+  ::v-deep .el-dialog__body{
+    padding: 0;
+  }
+  ::v-deep aside{
+    width:440px;
+    height:500px;
+    padding: 20px;
+    border-right: 1px solid #e6e6e6;
+  }
+}
+.asideHead {
+  span{
+    width: 52px;
+    height: 30px;
+    line-height: 30px;
+    display: inline-block;
+    text-align: center;
+    border-radius: 3px;
+    color: rgb(65, 65, 65);
+    font-size: 13px;
+    cursor:pointer;
+  }
+  ::v-deep .active{
+    background-color: #409EFF;
+    color: #fff;
+  }
+}
+.asideTable ::v-deep td,.asideTable ::v-deep th,.asideTable ::v-deep tr{
+  border: 0;
+}
+.asideTable::before{
+  width: 0;
+}
+
+
+
+
+/* .asideTable ::v-deep th{
+  border: 0;
+} */
+.asidetabDie{
+  cursor:pointer;
+}
+
+/* 滚动条样式 */
+aside ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
+  width: 6px;
+  height: 6px;
+}
+aside ::v-deep .el-table__body-wrapper::-webkit-scrollbar-track {
+  width: 6px;
+  background-color: #fff0;
+  -webkit-border-radius: 2em;
+  -moz-border-radius: 2em;
+  border-radius: 2em;
+}
+/*滚动条的设置*/
+aside ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
+  background-color: #fff0;
+  background-clip: padding-box;
+  min-height: 28px;
+  -webkit-border-radius: 2em;
+  -moz-border-radius: 2em;
+  border-radius: 2em;
+}
+/*滚动条移上去的背景*/
+aside ::v-deep .el-table__body-wrapper:hover::-webkit-scrollbar-thumb {
+  background-color: rgba(144, 147, 153, 0.3);
+}
+
+
+.mainHead{
+  margin-bottom: 13px;
+  span:nth-child(2){
+    color: #409EFF;
+    cursor:pointer;
+  }
+}
+.mainTag{
+  height: 430px;
+  overflow-x: hidden;
+  overflow-y: auto;
+  ::v-deep .el-tag--medium{
+    background-color: #fff;
+    border: 1px solid #e4e4e4;
+    border-radius: 20px;
+    color: #4c4c4c;
+    margin: 5px 5px 5px 0;
+    max-width: 240px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    position: relative;
+    padding: 0 20px 0 10px;
+  }
+  .el-tag--medium ::v-deep i{
+    color: #8f8f8f;
+    position: absolute;
+    right: 5px;
+    top: 5px;
+  }
+  .el-tag--medium ::v-deep i:hover{
+    background-color: #9b9b9b;
+    color: #fff;
+  }
+}
+
+/* 滚动条样式 */
+.mainTag::-webkit-scrollbar {
+  width: 6px;
+  height: 6px;
+}
+.mainTag::-webkit-scrollbar-track {
+  width: 6px;
+  background-color: #fff0;
+  -webkit-border-radius: 2em;
+  -moz-border-radius: 2em;
+  border-radius: 2em;
+}
+/*滚动条的设置*/
+.mainTag::-webkit-scrollbar-thumb {
+  background-color: #fff0;
+  background-clip: padding-box;
+  min-height: 28px;
+  -webkit-border-radius: 2em;
+  -moz-border-radius: 2em;
+  border-radius: 2em;
+}
+/*滚动条移上去的背景*/
+.mainTag:hover::-webkit-scrollbar-thumb {
+  background-color: rgba(144, 147, 153, 0.3);
+}
+
+footer{
+  border-top: 1px solid #e6e6e6;
+}
+footer button{
+  height: 40px;
+  width: 90px;
+  margin-top: 9px;
+};
+
+
+
+
+
+
+
+
+</style>

+ 0 - 954
src/components/bonusPointsPopup.vue

@@ -1,954 +0,0 @@
-<template>
-	<div>
-		<!-- 奖扣ab分弹窗 -->
-		<el-dialog :title="title" :visible.sync="visible" top="3%" :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 @click="noPersonnelListTips" style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"></div>
-								<slot></slot>
-							</el-col>
-						</el-row>
-					</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 :disabled="ruleOnoff" @change="switchChange(index, item.rule_switch)" v-model="item.rule_switch"></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'+index"
-								:popper-class="'ruleClass'"
-								filterable
-								clearable
-								: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'"
-								filterable
-								clearable
-								: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 style="line-height: 24px;" v-show="item.rule_item_details.range_type == 1">
-								{{ item.rule_item_details.min_point }}
-								<span class="blue">{{ $getTypsName(ptid) }}</span>
-							</div>
-							<div style="line-height: 24px;" v-show="item.rule_item_details.range_type == 2">
-								{{ item.rule_item_details.min_point }} ~ {{ item.rule_item_details.max_point }}
-								<span class="blue">{{ $getTypsName(ptid) }}</span>
-							</div>
-							<div style="line-height: 24px;">{{ 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.number="item.point"></el-input-number>
-							<el-input-number v-else :disabled="item.rule_item_details.range_type == 1" v-model.number="item.point"></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"
-										:picker-options="pickerBeginDateBefore"
-										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: 2, max: 100, message: '长度在 3 到 100 个字符', trigger: 'blur' }]"
-						>
-							<el-row>
-								<el-col :span="18"><el-input type="textarea" rows="3" placeholder="请输入事件内容" style="width: 100%;" v-model="item.remark"></el-input></el-col>
-							</el-row>
-						</el-form-item>
-
-						<el-form-item label="图片">
-							<upload
-								: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张)
-							</upload>
-						</el-form-item>
-						<el-form-item label="递交审批" v-if="$getUserData().is_creator == 0">
-							<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>
-							<el-dialog title="选择人员" width="640px" :visible.sync="item.show_approval_selector" append-to-body :before-close="handleClose">
-								<EmployeeSelector
-									v-if="item.show_approval_selector"
-									ref="superior"
-									:multi="false"
-									:isCreatorSelect="true"
-									:user_no_select="false"
-									:employee_list="superior_list"
-									:selected="item.approval_selected"
-									@confirm="approval_confirm"
-								/>
-								<span slot="footer" class="dialog-footer">
-									<el-button @click="item.show_approval_selector = false">取 消</el-button>
-									<el-button type="primary" @click="submitEmployee('superior')">确 定</el-button>
-								</span>
-							</el-dialog>
-						</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" :loading="btn_loading">确 认</el-button>
-					</el-form-item>
-				</el-form>
-			</div>
-			<el-dialog title="选择人员" width="640px" :visible.sync="show_employee_selector" append-to-body :before-close="handleClose">
-				<EmployeeSelector
-					v-if="show_employee_selector"
-					ref="members"
-					:isChecKedAll="false"
-					:isCreatorSelect="true"
-					:user_no_select="false"
-					:max="30"
-					:employee_list="manage_scope"
-					:selected="employee_selected"
-					@confirm="move_employee_confirm"
-				/>
-				<span slot="footer" class="dialog-footer">
-					<el-button @click="show_employee_selector = false">取 消</el-button>
-					<el-button type="primary" @click="submitMembers()">确 定</el-button>
-				</span>
-			</el-dialog>
-		</el-dialog>
-
-		<el-dialog :title="'提交结果'" :visible.sync="error_list_show" :append-to-body="true" width="700px">
-			<el-table :data="error_list">
-				<el-table-column prop="target" label="员工"></el-table-column>
-				<el-table-column prop="point" label="积分">
-					<template slot-scope="scope">
-						<span>
-							{{ scope.row.point }}
-							<span>{{ integralType == 2 ? 'A分' : 'B分' }}</span>
-						</span>
-					</template>
-				</el-table-column>
-				<el-table-column prop="status" label="处理状态">
-					<template slot-scope="scope">
-						<span :style="'color:' + (scope.row.status == 0 ? '#f70000' : '#47bf47')">{{ scope.row.msg }}</span>
-					</template>
-				</el-table-column>
-				<el-table-column prop="remark" label="备注信息"></el-table-column>
-			</el-table>
-		</el-dialog>
-	
-		<el-dialog title="提交结果" :visible.sync="isResult"  width="800" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false">
-			<div v-if="!isShowError">
-				<div style="text-align: center;margin-bottom: 10px;" class="red" v-if="isShowError2">{{errorMsg}}</div>
-				<el-progress :text-inside="true" :stroke-width="24" :percentage="percentage"></el-progress>
-				<div style="margin-top: 20px;border: 1px solid #f1f1f1;max-height: 500px;overflow-y: auto;" class="scroll-bar">
-					<div class="flex-box-ce results" style="font-weight: 600;">
-						<div style="border-right: 1px solid #f1f1f1;width: 50px;">序号</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">奖扣对象</div>
-						<div class="flex-2" style="border-right: 1px solid #f1f1f1;">事件内容</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">积分</div>
-						<div class="flex-2" >处理结果</div>
-					</div>
-					<div class="flex-box-ce results" v-for="(item, index) in results" :key="index">
-						<div style="border-right: 1px solid #f1f1f1;width: 50px;">{{results.length-index}}</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.target }}</div>
-						<div class="flex-2" style="border-right: 1px solid #f1f1f1;">{{ item.task.msg.remark }}</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">
-							{{ item.point>0? '+'+item.point:item.point }} 
-							<span>{{ item.task.msg.pt_id==3? 'B分':'A分' }}</span>
-						</div>
-						<div class="flex-2" v-if="item.status == 1">
-							<span v-if="item.msg=='奖扣成功'" class="green">{{ item.msg }}</span>
-							<span v-else class="blue">{{ item.msg }}</span>	
-						</div>
-						<div class="flex-2 red" v-else>{{ item.msg }}</div>
-					</div>
-				</div>
-				<span slot="footer">
-					<div class="flex-box-end" style="margin-top: 20px;" v-show="isShowError2&&results.length!=resultList.length"><el-button type="primary" @click="isResult = false" size="small">确 定</el-button></div>
-					<div class="flex-box-end" style="margin-top: 20px;" v-show="results.length==resultList.length"><el-button type="primary" @click="isResult = false" size="small">确 定</el-button></div>
-				</span>
-			</div>
-			<div v-else>
-				<div style="text-align: center;" class="red">{{errorMsg}}</div>
-				<span slot="footer">
-					<div class="flex-box-end" style="margin-top: 20px;"><el-button type="primary" @click="isResult = false" size="small">确 定</el-button></div>
-				</span>
-			</div>
-		</el-dialog>
-		<!-- 缓存的奖扣 -->
-		<el-dialog title="网络中断奖扣列表" :visible.sync="isShowBreak"  width="800" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false">
-			<div>
-				<div style="margin-top: 20px;border: 1px solid #f1f1f1;max-height: 500px;overflow-y: auto;" class="scroll-bar">
-					<div class="flex-box-ce results" style="font-weight: 600;">
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">奖扣对象</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">分类</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">规则</div>
-						<div class="flex-2" style="border-right: 1px solid #f1f1f1;">事件内容</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">积分</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">递交人员</div>
-					</div>
-					<div class="flex-box-ce results" v-for="(item, index) in breakList" :key="index">
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.name }}</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">
-							<span v-if="item.rule_name">{{ item.rule_name }}</span>
-							<span v-else>--</span>
-						</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">
-							<span v-if="item.item_name">{{ item.item_name }}</span>
-							<span v-else>--</span>
-						</div>
-						<div class="flex-2" style="border-right: 1px solid #f1f1f1;">{{ item.remark }}</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.point }} 
-							<span>{{ item.pt_id==3? 'B分':'A分' }}</span>
-						</div>
-						<div class="flex-1" style="border-right: 1px solid #f1f1f1;">{{ item.reviewer_name }}</div>
-					</div>
-				</div>
-				<span slot="footer">
-					<div class="flex-box-end" style="margin-top: 20px;">
-						<el-button type="primary" @click="colseBreak()" size="small">取 消</el-button>
-						<el-button type="primary" @click="submitBreak()" size="small">再次提交</el-button>
-					</div>
-				</span>
-			</div>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-import moment from 'moment';
-import EmployeeSelector from '@/components/EmployeeSelector.vue';
-import upload from '@/components/upload';
-export default {
-	name: 'bonusPointsForm',
-	// 数据
-	model: {
-		prop: 'list',
-		event: 'value'
-	},
-	props: {
-		title: {
-			type: String,
-			default: ''
-		},
-		visible: {
-			type: Boolean,
-			default: false
-		},
-		isBreak: { //是否打开缓存的未完成奖扣
-			type: Boolean,
-			default: false
-		},
-		refresh: {
-			type: String,
-			default: ''
-		},
-		integralType: {
-			type: Number,
-			default: 0
-			// 1 是绩效分 , 2 是A分 , 3 是B分
-		},
-		ruleOnoff: {
-			type: Boolean,
-			default: false
-			//true:选择规则; false:选择分类
-		}
-	},
-	data() {
-		return {
-			pickerBeginDateBefore: {
-				disabledDate(time) {
-					return time.getTime() > Date.now();
-				}
-			},
-			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: [] },
-			manage_scope: [], //下属人员
-			superior_list: [], //上级人员
-			show_employee_selector: false,
-			// 规则分类
-			rule_list: [],
-			// 规则细则
-			rule_item_list: [],
-			flatteningIntegralRules: null,
-			ptid: 0,
-			itemIndex: 0,
-
-			// 错误提示
-			error_list: [], //错误信息数组
-			error_list_show: false ,//错误信息弹窗
-			
-			// 长连接结果
-			results: [], //提交的返回结果集合
-			isResult: false,
-			percentage: 0,
-			resultList:[],//要发送数据的集合
-			resultIndex:0,
-			isShowError:false,
-			isShowError2:false,
-			errorMsg:'服务器繁忙,请稍后再试',
-			breakList:[],
-			isShowBreak:false,
-		};
-	},
-	components: { EmployeeSelector, upload },
-	watch: {
-		isBreak(){
-			let data=this.$getCache('award_punish').obj;
-			data.forEach(item=>{
-				item.name=this.$getCache('userList')[item.employee_id]?this.$getCache('userList')[item.employee_id].name:'--';
-				item.reviewer_name=this.$getCache('userList')[item.reviewer_id]?this.$getCache('userList')[item.reviewer_id].name:'--';
-			})
-			this.breakList=data;
-			this.isShowBreak=true;
-		},
-		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: [] };
-			}
-		},
-		isResult(val){
-			if(!val){
-				this.isShowError = false;
-				this.isShowBreak = false;
-				this.$refs['dialogData'].resetFields();
-				this.$emit('update:refresh',this.$moment().format().valueOf());
-				this.closePopup();
-				this.errorMsg='服务器繁忙,请稍后再试';
-				this.$socketApi.closewebsocket();
-			}
-		},
-	},
-	mounted() {
-		var that = this;
-		this.getUserDetail(function(data) {
-			that.manage_scope = data.manage_scope;
-			that.superior_list = data.superior_list;
-		});
-	},
-	methods: {
-		// 关闭缓存弹窗
-		colseBreak(){
-			this.isShowBreak = false;
-			this.breakList=[];
-			this.$removeCache('award_punish');
-			this.$emit('update:refresh',this.$moment().format().valueOf());
-			this.closePopup();
-		},
-		// 提交缓存奖扣
-		submitBreak(){
-			this.$removeCache('award_punish');
-			this.resultList=JSON.parse(JSON.stringify(this.breakList));
-			this.resultIndex=0;
-			this.percentage=0;
-			this.results=[];
-			this.isResult=true;
-			this.opneWebSocket()
-		},
-		getUserDetail(func) {
-			this.$axios('get', '/api/employee/detail').then(res => {
-				this.$setUserData(res.data.data.user);
-				func(res.data.data.user.employee_detail);
-			});
-		},
-		submitEmployee(name) {
-			this.$refs[name][0].confirm(); //调用组件的confirm();
-		},
-		submitMembers() {
-			this.$refs.members.confirm(); //调用组件的confirm();
-		},
-		//关闭
-		handleClose(done) {
-			done();
-		},
-		// 附件上传
-		beforeUpload(file) {
-			const isJPG = /^image\/(jpeg|png|jpg)$/.test(file.type);
-			const isLt2M = file.size / 1024 / 1024 < 1;
-			if (!isJPG) {
-				this.$message.error('上传头像图片只能是 JPEG,PNG,JPG 格式!');
-			}
-			if (!isLt2M) {
-				this.$message.error('上传头像图片大小不能超过 2MB!');
-			}
-			return isJPG && isLt2M;
-		},
-		onFilePreView(file) {
-			if (file.response) {
-				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);
-			});
-		},
-
-		// 没有人员提示
-		noPersonnelListTips() {
-			this.show_employee_selector = true;
-		},
-		// 当switch 改变了
-		switchChange(index, value) {
-			this.itemIndex = index;
-			const item = this.dialogData.items[this.itemIndex];
-			if (!value) {
-				item.remark = '';
-				item.rule_id = '';
-				item.item_id = '';
-				item.rule_item_list_value = '';
-				item.rule_item_details = { range_type: '' };
-				item.max = 0;
-				item.min = 0;
-				item.point = '0';
-			} 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);
-				});
-			}
-			this.show_employee_selector = false;
-		},
-		// 获取规则类型
-		getRuleData() {
-			let data = { cycle_type: '1', pt_id: this.integralType };
-			this.$axios('get', '/api/integral/rule/trees', data).then(res => {
-				if (res.data.code == 1) {
-					this.rule_list = this.getTreeData(res.data.data.rule_tree);
-				}
-			});
-		},
-
-		// 获取规则细则
-		getRuleItemData() {
-			let data = { cycle_type: '1', pt_id: this.integralType };
-			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;
-				}
-			});
-		},
-
-		// 规则细则变化关闭down
-		ruleItemChange(value) {
-			const item = this.dialogData.items[this.itemIndex];
-			if (value.length > 0) {
-				let ruleItemDetails = null;
-				this.flatteningIntegralRules.forEach(element => {
-					if (element.id == value[value.length - 1]) {
-						ruleItemDetails = { ...element };
-					}
-				});
-				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;
-			} else {
-				item.remark = '';
-				item.rule_id = '';
-				item.item_id = '';
-				item.rule_item_list_value = '';
-				item.rule_item_details = { range_type: '' };
-				item.max = 0;
-				item.min = 0;
-				item.point = '0';
-			}
-		},
-		// 规则分类变化关闭dewn
-		ruleChange(value) {
-			const item = this.dialogData.items[this.itemIndex];
-			if (value.length > 0) {
-				const user_info = this.$getUserData();
-				let ruleCascader='ruleCascader'+this.itemIndex;
-				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][0].dropDownVisible = false;
-				item.rule_id = value[value.length - 1];
-				item.rule_name = this.$refs.[ruleCascader][0].getCheckedNodes()[0].label;
-			} else {
-				item.rule_id = '';
-				item.rule_list_value = '';
-				item.rule_name='';
-			}
-		},
-		// 递归判断列表,把最后的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() {
-			if (this.dialogData.items.length == 10) {
-				this.$message({
-					type: 'warning',
-					message: '一次只能添加10条奖扣'
-				});
-				return false;
-			}
-			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();
-		},
-		delItem(index) {
-			this.$confirm('你确定要删除奖扣明细' + parseInt(index + 1) + '吗?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			}).then(() => {
-				this.dialogData.items.splice(index, 1);
-				this.$message({
-					type: 'success',
-					message: '删除成功!'
-				});
-			});
-		},
-		subData(formName) {
-			this.$refs[formName].validate(valid => {
-				if (valid) {
-					this.save();
-				}
-			});
-		},
-		// 提交数据
-		save() {
-			let data = {
-				members: this.dialogData.members,
-				items: []
-			};
-			const user_info = this.$getUserData();
-			const index = user_info.point_config.point_limit.findIndex(o => o.pt_id === this.integralType);
-			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 = 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;
-				}
-			}
-			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,
-							rule_name:element.rule_name,
-							item_name:element.rule_item_details.name,
-							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,
-								rule_name:element.rule_name,
-								item_name:element.rule_item_details.name,
-							});
-						} else {
-							this.$message.error('第' + (index + 1) + '条输入积分分值超出权限,请选择审批人递交');
-							throw new Error();
-						}
-					});
-				}
-			} catch (e) {
-				this.btn_loading = false;
-				return false;
-			}
-			this.webSocket(data);
-			// 走长连接处理
-			return false
-			this.btn_loading = true;
-			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) {
-						var is = true,msg;
-						if (this.integralType == '3') {
-							res.data.data.list.forEach(item => {
-								if (item.status != 1) {
-									is = false;
-									msg = item.msg;
-								}
-							});
-						} else {
-							res.data.data.list.forEach(item => {
-								if (item.status != 1) {
-									is = false;
-									msg = item.rule_item;
-								}
-							});
-						}
-						if (is) {
-							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.closePopup();
-							this.error_list = res.data.data.list;
-							this.error_list_show = true;
-						}
-					}
-				})
-				.finally(e => {
-					this.btn_loading = false;
-				});
-		},
-		webSocket(data){
-			let {members,items}=data;
-			let arr=[];
-			members.forEach(item=>{
-				items.forEach(item2=>{
-					item2.type = this.integralType === 2?'pea':'peb';
-					item2.employee_id=item;
-					arr.push(JSON.parse(JSON.stringify(item2)))
-				})
-			})
-			this.resultList=arr;
-			this.resultIndex=0;
-			this.percentage=0;
-			this.results=[];
-			this.isResult=true;
-			this.opneWebSocket()
-		},
-		opneWebSocket() {
-			let wsData=this.resultList;
-			if(wsData[this.resultIndex]&&!this.isShowError){
-				this.$socketApi.sendData(wsData[this.resultIndex],this.onmessageWS)
-			}
-		},
-		onmessageWS(e){
-			if(e.type=='peb'||e.type=='pea'){
-				this.results.unshift(e.result);
-				this.resultIndex++;
-				this.opneWebSocket();
-				// 进度条
-				let lng = this.resultList.length;
-				this.percentage += Math.floor(100 / lng);
-				if (lng == this.results.length) {
-					this.percentage = 100;
-				}
-			}
-			// 中途断开
-			if(e.type=='break'){
-				let wsData=this.resultList;
-				this.errorMsg=e.msg
-				let data={
-					type:this.integralType,
-					obj:wsData.slice(this.resultIndex,wsData.length)
-				}
-				this.$setCache('award_punish',data);
-				this.isShowError2 = true;
-			}
-			// 连接不上
-			if(e.type=='error'){
-				this.errorMsg=e.msg
-				this.isShowError = true;
-			}
-			
-		},
-		// 选择审核人
-		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) : '';
-			item.show_approval_selector = false;
-		},
-		// 关闭弹窗
-		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.$nextTick(() => {
-				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;
-	}
-}
-.results {
-	border-bottom: 1px solid #f1f1f1;
-	text-align: center;
-}
-.results div {
-	padding: 10px;
-}
-</style>

+ 336 - 0
src/components/evaluate/BasicMessage.vue

@@ -0,0 +1,336 @@
+
+<template>
+  <div class="all" v-loading="loading">
+    <div class="demo-ruleForm">
+      <div class="title">分组信息</div>
+      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px">
+        <el-form-item label="考评表名称:" prop="name">
+          <el-popover placement="right" width="400" trigger="hover" v-model="visible">
+            <div class="fontColorB">
+              考评表用来做什么?
+              <br />
+              相同考核周期、考核内容的员工可以放在同一考评表,支持跨部门同岗位统一考核
+              <br />
+              如:20个销售员可以放在同个考评表里面
+            </div>
+            <el-input type="textarea" v-model="ruleForm.name" slot="reference" placeholder="请输入名称" class="width-250 scroll-bar"
+            :autosize="{ minRows: 2, maxRows: 6}"
+            show-word-limit maxlength="100"
+            ></el-input>
+          </el-popover>
+        </el-form-item>
+        <el-form-item label="周期类型">
+          <el-radio-group v-model="ruleForm.cycle_type">
+            <el-radio :label="item.value" v-for="(item,index) in $getCycleType()" :key="item.value" v-show="item.value!=0">{{item.label}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="考评表管理员">
+          <div class="border flex-box-ce">
+            <div class="flex-1" v-if="Administrator.length == 0">请选择管理员</div>
+            <div v-else style="width: 180px;" class="font-flex-word">
+              <span v-for="(item, index) in Administrator" :key="index">
+                <i v-if="index != 0">,</i>{{ item.name }}
+              </span>
+            </div>
+            <span v-if="Administrator.length >0" class="blue">{{Administrator.length}}人</span>
+            <i class="el-icon-arrow-down icon-right" v-else></i>
+            <div @click="openAdministrator()" class="inputDc"></div>
+          </div>
+        </el-form-item>
+        <el-form-item label="被考核人" prop="employee_ids">
+          <div class="border flex-box-ce">
+            <div class="flex-1" v-if="selected.employee.length == 0">请选择被考核人</div>
+            <div v-else style="width: 180px;" class="font-flex-word">
+              <span v-for="(item, index) in selected.employee" :key="index">
+                <i v-if="index != 0">,</i>{{ item.name }}
+              </span>
+            </div>
+            <span v-if="selected.employee.length >0" class="blue">{{selected.employee.length}}人</span>
+            <i class="el-icon-arrow-down icon-right" v-else></i>
+            <div @click="setAdministrator = true" class="inputDc"></div>
+          </div>
+        </el-form-item>
+      </el-form>
+    </div>
+
+    <!-- 选择子管理员 -->
+    <EmployeeSelector :selected="selected"  title="选择被考核人" :visible.sync="setAdministrator" :is_filtration_creator="false" @confirm="confirmAdministrator" />
+
+    <BrawerBox drawerTitle="从绩效管理员中选择" :showDrawer.sync="isChecks">
+      <template slot="main">
+       <ul>
+          <li v-for="(item, index) in gzList" :key="index" class="li">
+              <el-popover v-if="item.disabled" class="without-outline" placement="bottom"  width="850" trigger="hover" content="该管理员具有全部考评表的权限,无法取消勾选,如须调整可联系绩效系统主管理员前往“权限设置”处进行调整。">
+                <el-checkbox slot="reference" v-model="item.check" class="flex-box-ce" :disabled="item.disabled">
+                  <div class="flex-box-ce">
+                    <userImage :user_name="item.name" :img_url="item.img_url"></userImage>
+                    <div style="margin: 0 10px;">{{item.name}}</div>
+                   <div v-if="item.dept.length>0" style="width: 200px;" class="font-flex-word">
+                        <span v-for="(deptItme,index2) in item.dept" :key="index2">
+                          {{deptItme.name}}
+                        </span>
+                    </div>
+                  </div>
+                </el-checkbox>
+              </el-popover>
+              <el-checkbox  v-else v-model="item.check" class="flex-box-ce">
+                <div class="flex-box-ce">
+                  <userImage :user_name="item.name" :img_url="item.img_url"></userImage>
+                  <div style="margin: 0 10px;">{{item.name}}</div>
+                   <div v-if="item.dept.length>0" style="width: 200px;" class="font-flex-word">
+                        <span v-for="(deptItme,index2) in item.dept" :key="index2">
+                          {{deptItme.name}}
+                        </span>
+                    </div>
+                </div>
+              </el-checkbox>
+          </li>
+      </ul>
+      </template>
+      <template slot="footer">
+          <el-button plain @click="isChecks = false">取消</el-button>
+          <el-button type="primary" @click="submitForm()">保存</el-button>
+      </template>
+    </BrawerBox>
+  </div>
+</template>
+
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import BrawerBox from '@/components/public/BrawerBox'
+export default {
+  components: { EmployeeSelector,BrawerBox },
+  name: 'BasicMessage',
+  props:{
+    data:{
+      type:Object,
+      default:{}
+    }
+  },
+  data() {
+    return {
+      visible: false,
+      loading:false,
+      setAdministrator: false,
+      isChecks: false,
+      gzList:[],
+      Administrator:[],//管理者列表
+      selected:{ employee: [], dept: [] },//执行者列表
+      ruleForm: {
+        name:'',
+        cycle_type: 2,//周期类型 1-天 2-月度 3-季度 4-半年度 5-年度 6-自定义
+        mannager_ids:'',
+        employee_ids:'',
+      },
+      rules: {
+        name: [{ required: true, message: '请输入考核表名称', trigger: 'blur' }, { min: 2, message: '长度最少为2个字符', trigger: 'blur' }],
+        employee_ids: [{ required: true, message: '请选择被考核人员', trigger: 'change' }],
+      },
+    };
+  },
+  watch: {
+    data(val){
+       if(val.name){
+         this.recoverData();
+       }
+    },
+    Administrator(val) {
+       let ids=val.map(item=>{
+         return item.id
+       })
+       this.ruleForm.mannager_ids=ids.toString()||'';
+    },
+    'selected.employee'(val) {
+       let ids=val.map(item=>{
+         return item.id
+       })
+       this.ruleForm.employee_ids=ids.toString()||'';
+    },
+  },
+  mounted() {
+      this.loading=true;
+      setTimeout(() => {
+        this.getList();
+      }, 200);
+  },
+  methods: {
+    // 编辑时复原整个流程数据
+    recoverData(){
+        this.ruleForm.name=this.data.name;
+        this.ruleForm.cycle_type=this.data.cycle_type;//周期类型 1-天 2-月度 3-季度 4-半年度 5-年度 6-自定义
+        this.selected.employee=this.data.employees.map(e=>{
+			return this.$getEmployeeList()[e.id]
+		})
+    },
+    // 获取子管理员
+    getList(){
+      this.$axios('get','/api/per/user/manager_info',{range:2}).then(res=>{
+            let data=res.data.data.list||[];
+			data=data.filter(item=>{
+				if(item.is_official&&item.is_scope){
+					return item
+				}
+			})
+            let Administrator=[];
+            data.forEach(item=>{
+              item.check=false;
+              if(item.main==1||this.$isAuthoritys(14,item.permission)){//主管或者子管(全公司)
+                item.check=true;
+                item.disabled=true;
+                Administrator.push(item);
+              }else{
+                item.disabled=false;
+                item.check=false;
+                if(this.data.id){//子管理的特定管理范围下是否包含当前考评表
+                  if(item.group_ids.indexOf(this.data.id)>=0){
+                    item.check=true;
+                    Administrator.push(item);
+                  }
+                }
+              }
+            })
+            let AdministratorAll=JSON.parse(JSON.stringify(Administrator));
+            let mannager_ids=this.data.mannager_ids;
+            let arr=AdministratorAll.filter(x=>mannager_ids.some(y=>y.id==x.id))
+            if(mannager_ids.length>0){
+              this.Administrator=arr
+            }else{
+               this.Administrator=Administrator
+            }
+            this.gzList=data;
+      }).finally(()=>{
+        this.loading=false;
+        this.$emit('update:isShowBtn',true)
+      })
+    },
+
+    confirmAdministrator(e) {
+        this.selected.employee=e.employee.length>0?e.employee:[]
+    },
+    //过滤数组,返回数据中的ID
+    filtrationArr(arr){
+      if(arr.length==0){
+        return [];
+      }
+      return arr.map(item=>{
+        return item.id
+      })
+    },
+    openAdministrator(){
+      let selectIds=this.Administrator.map((item) => {
+         if(item.check){
+            return item.id
+         }
+      })
+      this.gzList.forEach((item,index)=>{
+        if(selectIds.indexOf(item.id)>=0){
+          this.$set(this.gzList[index],'check',true)
+        }else{
+           this.$set(this.gzList[index],'check',false)
+        }
+      })
+      this.isChecks=true;
+    },
+    //选择管理者
+    submitForm(){
+      let list=JSON.parse(JSON.stringify(this.gzList));
+      let Administrator=[];
+      list.forEach(item=>{
+        if(item.check){
+          Administrator.push(item)
+        }
+      })
+      this.Administrator=Administrator;
+      this.isChecks=false;
+    },
+  }
+};
+</script>
+<style scoped="scoped">
+.border {
+  -webkit-appearance: none;
+  background-color: #fff;
+  background-image: none;
+  border-radius: 4px;
+  border: 1px solid #dcdfe6;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  color: #C0C4CF;
+  font-size: inherit;
+  height: auto;
+  outline: 0;
+  padding: 0 15px;
+  width: 250px;
+  position: relative;
+  cursor: pointer;
+}
+.border .font-flex-word{
+  color: #606266;
+}
+.all {
+  padding: 20px;
+  font-size: 14px;
+}
+.demo-ruleForm {
+  width: 600px;
+  margin: 30px auto 0 auto;
+}
+.title {
+  margin-bottom: 30px;
+  margin-left: 40px;
+}
+.remark {
+  padding-left: 120px;
+}
+.width-250 {
+  width: 350px;
+}
+.inputDc {
+  position: absolute;
+  top: 0;
+  right: 0;
+  left: 0;
+  bottom: 0;
+  z-index: 9;
+  cursor: pointer;
+}
+.li{
+  padding: 15px 0;
+  border-bottom: 1px solid #ebebeb;
+}
+.li:hover{
+    background-color: #F5F7FA;
+}
+.checkbox ::v-deep .el-checkbox__input{
+    position: relative;
+    top:12px;
+}
+ ::v-deep :focus{
+    outline: 0;
+}
+::v-deep .el-textarea__inner::-webkit-scrollbar {
+  width: 6px;
+  height: 4px;
+}
+/*外层轨道。可以用display:none让其不显示,也可以添加背景图片,颜色改变显示效果*/
+::v-deep .el-textarea__inner::-webkit-scrollbar-track {
+  width: 6px;
+  background-color: #fff0;
+  -webkit-border-radius: 2em;
+  -moz-border-radius: 2em;
+  border-radius: 2em;
+}
+/*滚动条的设置*/
+::v-deep .el-textarea__inner::-webkit-scrollbar-thumb {
+  background-color: #fff0;
+  background-clip: padding-box;
+  -webkit-border-radius: 2em;
+  -moz-border-radius: 2em;
+  border-radius: 2em;
+}
+/*滚动条移上去的背景*/
+::v-deep .el-textarea__inner:hover::-webkit-scrollbar-thumb {
+  background-color: rgba(144, 147, 153, 0.3);
+  height: 20px;
+}
+</style>

+ 709 - 0
src/components/evaluate/Flow - 副本.vue

@@ -0,0 +1,709 @@
+<template>
+	<div class="all">
+		<div class="main">
+			<div class="main-top flex-box">
+				<div class="flex-box-v flex-d-wrap">
+					<div
+						@click="activeFlow(item.index)"
+						class="flex-box-v flex-center-center flow-item  flex-d-wrap"
+						:class="[isActive == item.index ? 'isActive' : '']"
+						v-for="(item, index) in flowList"
+						:key="index"
+						v-show="item.isShow"
+					>
+						<div class="fontColorZ">{{ item.name }}</div>
+						<div class="fontColorF" style="font-size: 13px;" v-if="item.stateText">{{ item.stateText }}</div>
+						<!-- <i class="el-icon-right fontColorT" v-if="flowList.length != index + 1" style="font-size: 26px;margin: 0 20px;"></i> -->
+					</div>
+				</div>
+				<div>
+					<!-- 目标制定 -->
+					<div v-show="isActive == 1">
+						<div class="nweTitle">目标制定</div>
+						<el-form label-width="120px">
+							<el-form-item label="制定人:">
+								<el-radio-group v-model="target.type">
+									<el-radio :label="1">系统(使用考核模板)</el-radio>
+									<el-radio :label="2">被考核人</el-radio>
+									<el-radio :label="3">指定成员</el-radio>
+									<el-radio :label="4">管理员(指定一级)</el-radio>
+								</el-radio-group>
+								<div class="flex-box-ce" style="margin-top: 10px;" v-show="target.type == 4">
+									<span>被考评人的</span>
+									<el-select v-model="target.manager_level" placeholder="请选择级别" style="margin: 0 10px;">
+										<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+									</el-select>
+									<el-tooltip class="item" effect="dark" content="找不到确认人时,由上级管理员替代" placement="top-start">
+										<i class="fontColorF el-icon-warning"></i>
+									</el-tooltip>
+								</div>
+								<div class="border flex-box-ce" style="position: relative;" v-show="target.type == 3">
+									<div class="fontColorF flex-1" v-if="target.employeeList.length == 0">请选择指定人员</div>
+									<div v-else style="width: 180px;" class="font-flex-word">
+										<span v-for="(j, index2) in target.employeeList" :key="index2">
+											<i v-if="index2 != 0">,</i>
+											{{ j.name }}
+										</span>
+									</div>
+									<span v-if="target.employeeList.length > 0" class="blue">{{ target.employeeList.length }}人</span>
+									<i class="el-icon-arrow-down icon-right" v-else></i>
+									<div @click="setEmployeeList(target.employeeList)" class="inputDc"></div>
+								</div>
+							</el-form-item>
+							<el-form-item label="制定人多人时:" v-if="target.type == 3 || target.type == 4">
+								<el-radio-group v-model="target.multi_executor">
+									<el-radio :label="1">依次制定</el-radio>
+									<el-radio :label="2">任一人制定即可</el-radio>
+								</el-radio-group>
+							</el-form-item>
+						</el-form>
+					</div>
+					<!-- 执行中 -->
+					<div v-show="isActive == 2">
+						<div class="flex-box-v flex-center-center" style="margin-top: 10%;">
+							<img src="@/assets/image/invite_new_company.png" style="width: 200px;height: 200px;margin-bottom: 10px;" />
+							<div class="fontColorF" style="line-height: 30px;">
+								1、目标制定并确认后,将自动进入此节点;
+								<br />
+								2、执行节点中,执行人可以制定执行计划,管理者可以添加管理跟踪记录;
+								<br />
+								3、管理员设置【开始评分】后,自动进入评分节点
+							</div>
+						</div>
+					</div>
+					<!-- 评分:上级评分 -->
+					<SuperiorFlow v-show="isActive == 3" ref="SuperiorFlow" @setInput="setInput" :data="superiorFlow"></SuperiorFlow>
+					<!-- 评分:指定评分人 -->
+					<div v-show="isActive == 4">
+						<div class="nweTitle">
+							指定评分人
+							<el-tooltip effect="dark" content="当指标有指定评分人时,应用以下配置" placement="top"><i class="el-icon-warning blue"></i></el-tooltip>
+						</div>
+						<div class="flex-box-ce" style="margin-left: 13px;margin-bottom: 20px;">
+							<span class="label">评分人:</span>
+							<div style="color: #606266;">指定评分人</div>
+						</div>
+						<div class="flex-box-ce" style="margin-left: 13px;">
+							<span class="label">必填项:</span>
+							<el-checkbox v-model="special_scorer.comment">指标评分说明</el-checkbox>
+							<!-- <el-checkbox v-model="special_scorer.summar">评分总结</el-checkbox> -->
+						</div>
+					</div>
+					<!-- 审批节点 -->
+					<Examine v-show="isActive == 5" ref="Examine" @setIs="setIs" :data="examine"></Examine>
+					<!-- 抄送 -->
+					<div v-show="isActive == 6">
+						<div class="nweTitle">
+							抄送
+							<el-switch v-model="cc.enable" style="margin-left: 10px;" :active-value="1" :inactive-value="0"></el-switch>
+						</div>
+						<el-form :model="cc" label-width="120px" v-show="cc.enable == 1">
+							<el-form-item label="抄送人:">
+								<el-radio-group v-model="cc.type">
+									<el-radio :label="1">管理员</el-radio>
+									<el-radio :label="2">指定成员</el-radio>
+								</el-radio-group>
+								<div class="flex-box-ce" style="margin-top: 10px;" v-show="cc.type == 1">
+									<span>被考评人的</span>
+									<el-select v-model="cc.manager_level" placeholder="请选择级别" style="margin: 0 10px;">
+										<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+									</el-select>
+								</div>
+								<div class="border flex-box-ce" style="position: relative;" v-show="cc.type == 2">
+									<div class="fontColorF flex-1" v-if="cc.employeeList.length == 0">请选择指定人员</div>
+									<div style="width: 180px;" class="font-flex-word" v-if="cc.employeeList[0]">
+										<span v-for="(j, index2) in cc.employeeList" :key="index2">
+											<i v-if="index2 != 0">,</i>
+											<span v-if="j.name">{{ j.name }}</span>
+										</span>
+									</div>
+									<span v-if="cc.employeeList.length > 0" class="blue">{{ cc.employeeList.length }}人</span>
+									<i class="el-icon-arrow-down icon-right" v-else></i>
+									<div @click="setEmployeeList(cc.employeeList)" class="inputDc"></div>
+								</div>
+							</el-form-item>
+							<el-form-item label="抄送条件:">
+								<el-radio-group v-model="cc.condition">
+									<el-radio :label="1">得出结果后抄送</el-radio>
+									<!-- <el-radio :label="2">公布结果后抄送</el-radio> -->
+								</el-radio-group>
+							</el-form-item>
+						</el-form>
+					</div>
+					<!-- 目标确认 -->
+					<Affirm v-show="isActive == 7" ref="Affirm" @setIs="setIs" :data="confirm"></Affirm>
+				</div>
+			</div>
+		</div>
+		<!-- 同步规则 -->
+		<el-dialog title="同步规则" :visible.sync="isRule" width="700px" :close-on-click-modal="false">
+			<div>
+				<div class="dialog-title">将考核表规则同步到已发起的考核:</div>
+				<div class="flex-box-ce dialog-item">
+					<span>1</span>
+					<div class="label">选择同步的考核</div>
+					<div style="position: relative;">
+						<el-input v-model="isRule" placeholder="请选择考核" style="width:250px"></el-input>
+						<div @click="isChecks = true" class="inputDc"></div>
+					</div>
+				</div>
+				<div class="flex-box-ce dialog-item">
+					<span>2</span>
+					<div class="label">选择同步的被考核人</div>
+					<div style="position: relative;">
+						<el-input v-model="isRule" placeholder="请选择考核人" style="width:250px"></el-input>
+						<div @click="isRule2 = true" class="inputDc"></div>
+					</div>
+				</div>
+				<div class="flex-box-ce dialog-item">
+					<span>3</span>
+					<div class="label">评分节点同步</div>
+					<div>
+						评分节点同步
+						<el-tooltip effect="dark" placement="top">
+							<div slot="content">
+								<i class="el-icon-caret-right" style="color: #fff;"></i>
+								已经进入评分的流程会重置到第一个评分环节继续评分
+								<br />
+								<i class="el-icon-caret-right" style="color: #fff;"></i>
+								未开始评分的评分流程直接更新
+							</div>
+							<i class="el-icon-warning blue"></i>
+						</el-tooltip>
+					</div>
+				</div>
+			</div>
+			<span slot="footer" class="dialog-footer">
+				<div class="flex-box-ce">
+					<div class="flex-1 yellow" style="text-align: left;">注意:24h内仅允许对该考核表相同人员同步一次</div>
+					<div>
+						<el-button @click="isRule = false">取 消</el-button>
+						<el-button type="primary" @click="isRule = false">保存考核表并同步</el-button>
+					</div>
+				</div>
+			</span>
+		</el-dialog>
+
+		<!-- 选择考核 -->
+		<BrawerBox drawerTitle="选择考核" :showDrawer.sync="isChecks">
+			<template slot="main">
+				<el-input placeholder="搜索考核" v-model="radio"></el-input>
+				<ul class="ul">
+					<li v-for="(item, index) in gzList" :key="index" class="flex-box-ce li">
+						<el-checkbox class="flex-1" v-model="item.check" :label="item.label" @change="actionCheck($event, item)"></el-checkbox>
+						<div class="blue" v-if="item.num > 0">{{ item.num }} 人</div>
+					</li>
+				</ul>
+			</template>
+			<template slot="footer">
+				<el-button plain @click="isChecks = false">取消</el-button>
+				<el-button type="primary" :loading="loading" @click="submitForm('detailForm')">确定</el-button>
+			</template>
+		</BrawerBox>
+
+		<!-- 选择同步人员 -->
+		<EmployeeSelector :selected="selected" :is_filtration_creator="false" :visible.sync="setAdministrator" @confirm="confirmAdministrator" />
+	</div>
+</template>
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import BrawerBox from '@/components/public/BrawerBox';
+import SuperiorFlow from '@/components/flow/SuperiorFlow';
+import Examine from '@/components/flow/Examine';
+import Affirm from '@/components/flow/Affirm';
+export default {
+	components: { EmployeeSelector, BrawerBox, SuperiorFlow, Examine, Affirm },
+	name: 'Flow',
+	props: {
+		isShowScore: {
+			type: Boolean,
+			default: false
+		},
+		data: {
+			type: Object,
+			default: {}
+		}
+	},
+	watch: {
+		data(val) {
+			if (val.process) {
+				this.recoverData();
+			}
+		},
+		'target.type'(val) {
+			this.flowList.forEach((item, index) => {
+				if (item.index == 1) {
+					let str = '系统';
+					if (val == 1) {
+						str = '系统';
+					} else if (val == 2) {
+						str = '被考核人';
+					} else if (val == 3) {
+						str = '指定成员';
+					} else {
+						str = '管理员';
+					}
+					this.$set(this.flowList[index], 'stateText', str);
+				}
+			});
+		},
+		isShowScore(val) {
+			//根据是否有指定评分人,来是否显示指定评分人模块
+			if (!val) {
+				if (this.isActive == 4) {
+					this.isActive = 1;
+				}
+			}
+			this.setExamineShow(val);
+		},
+		'cc.enable'(val) {
+			this.flowList.forEach((item, index) => {
+				if (item.index == 6) {
+					this.$set(this.flowList[index], 'stateText', val == 1 ? '' : '已禁用');
+				}
+			});
+		}
+	},
+	data() {
+		return {
+			radio: 1,
+			isActive: 1,
+			checkbox: true,
+			gzList: [1],
+			loading: false,
+			isChecks: false,
+			isRule: false, //同步规则
+			isRule2: false, //同步规则
+
+			superiorFlow: {}, //上级评分(编辑)
+			examine: {}, //审批节点(编辑)
+			confirm: {}, //目标确认(编辑)
+
+			selected: { employee: [], dept: [] }, //执行者列表
+			setAdministrator: false,
+			type: 1, //流程方式 1-按评分人设置流程(默认) 2-按指标设置流程
+
+			// 下面是流程的数据
+			target: {
+				//目标制定
+				enable: 1, //是否启用 1-启用 0-禁用
+				type: 1, //制定者类型 1-系统(默认模板,不可制定目标直接进入下一步) 2-被考核人 3-制定成员 4-主管
+				action: {
+					//可执行动作(允许编辑内容)
+					score_type: 1, //评分方式是否可编辑 1-可以 0-不可以
+					result_source: 1, //结果值数据来源 1-可以 0-不可以
+					reviewer: 1 //制定评分人 1-可以 0-不可以
+				},
+				multi_executor: 1, //执行人多人时处理方式 1-依次制定 2-任一人制定即可
+				manager_level: 1, //上级等级
+				supervisor_confirm: 1, //是否有上级主管代替 1-是 0-否
+				employee_ids: [], //制定成员id列表
+				employeeList: []
+			},
+
+			special_scorer: {
+				//指定评分人(只有维度数据中有指定评分人的指标才会有)
+				enable: 1, //是否启用 1-启用 0-禁用
+				action: ['comment', 'summar'], //必填项 'comment', //指标评分说明'summar
+				comment: false, //必填项 'comment',
+				summar: false //指标评分说明'summar'
+			},
+			cc: {
+				//抄送配置
+				enable: 0, //是否启用 1-启用 0-禁用
+				type: 1, //抄送人类型 1-主管 2-指定成员 3-角色
+				manager_level: 1, //主管等级(只有抄送人类型为主管时有效)
+				employee_ids: [], //指定成员id列表(只有抄送人类型为指定成员时有效)
+				employeeList: [],
+				// role_name: "creator",        //角色名称(只有抄送人类型为角色时有效)
+				condition: 1 //抄送结果 1-得出总分 2-公示结果
+			},
+			ruleForm: {
+				type: 1, //流程方式 1-按评分人设置流程(默认) 2-按指标设置流程
+				target: {
+					//目标制定配置结果
+					enable: 1, //是否启用 1-启用 0-禁用
+					type: 1, //制定者类型 1-系统(默认模板,不可制定目标直接进入下一步) 2-被考核人 3-制定成员 4-主管
+					action: {
+						//可执行动作(允许编辑内容)
+						score_type: 1, //评分方式是否可编辑 1-可以 0-不可以
+						result_source: 1, //结果值数据来源 1-可以 0-不可以
+						reviewer: 1 //制定评分人 1-可以 0-不可以
+					},
+					multi_executor: 1, //执行人多人时处理方式 1-依次制定 2-任一人制定即可
+					manager_level: 1, //上级等级
+					supervisor_confirm: 1, //是否有上级主管代替 1-是 0-否
+					employee_ids: [] //制定成员id列表
+				},
+				confirm: {
+					//目标确认配置结果
+					enable: 0, //是否启用 1-启用 0-禁用
+					confirmor: [
+						//确认人员列表
+						{
+							type: 1, //确认人类型 1-主管 2-指定成员 3-被考核人 4-角色
+							manager_level: 1, //主管级别
+							supervisor_confirm: 1, //找不到确认人,有上级主管代替 1-是 0-否
+							multi_executor: 1, //确认人多人时处理方式 1-依次确认 2-任一人确认 3-均需确认
+							action: [
+								//允许确认人动作
+								'index', //修改指标
+								'transfer' //转交
+							],
+							employee_ids: [], //指定成员用户id列表(类型为指定成员时)
+							role_name: 'creator' //角色名称(类型为指定角色时)
+						}
+					],
+					unique: 1 //重复去重
+				},
+				execution: {
+					//执行中制定配置结果
+					enable: 1 //是否启用 1-启用 0-禁用
+				},
+				score_self: {
+					//自评指定配置结果
+					enable: 0, //是否启用 1-启用 0-禁用
+					weight: 0, //权重
+					action: [
+						//必填项动作
+						'comment', //指标评分说明
+						'summary' //评分总结
+					],
+					rating: 0, //是否手动评级
+					unique: 1 //评分人去重
+				},
+				score_mutual: {
+					//互评配置结果
+					enable: 0 //是否启用 1-启用 0-禁用
+				},
+				score_supervisor: {
+					//上级评分
+					enable: 1, //是否启用 1-启用 0-禁用
+					unique: 1, //评分人去重 1-是 0-否
+					supervisor: [
+						//上级配置列表
+						{
+							type: 1, //评分人类型 1-主管 2-指定成员 3-角色
+							manager_level: 1, //主管等级(只有评分人类型为主管时有效)
+							supervisor_confirm: 1, //找不到确认人时是否由上级主管代替(只有评分人类型为主管时有效) 1-是 0-否
+							role_name: 'creator', //角色名(只有评分人类型为角色时有效)
+							employee_ids: [], //用户id列表(只有评分人类型为指定人员时有效)
+							weight: 10, //权重
+							multi_executor: 1, //评分人多人时 1-各自评分 2-任一人评分
+							rule: 1, //评分规则 1-指标均要评分 2-评分总结
+							action: [
+								//必填项
+								'comment', //指标评分说明
+								'summary' //评分总结
+							],
+							rating: 0, //是否手动评分 1-是 0-否
+							transfer: 1 //是否允许转交 1-是 0-否
+						}
+					]
+				},
+				special_scorer: {
+					//指定评分人(只有维度数据中有指定评分人的指标才会有)
+					enable: 1, //是否启用 1-启用 0-禁用
+					action: ['comment', 'summar'] //必填项 'comment', //指标评分说明'summar ' //评分总
+				},
+				review: {
+					//审批节点
+					enable: 1, //是否启用 1-启用 0-禁用
+					unique: 1, //评分人去重 1-是 0-否
+					reviewer: [
+						//审批人配置列表
+						{
+							type: 1, //用户种类 1-主管 2-指定成员 3-被考核人 4-角色
+							action: ['transfer', 'refuse'], //转交//驳回                  //允许审批人动作
+							manager_level: 1, //主管级别(只有用户种类为主管有效)
+							supervisor_confirm: 1, //找不到审批人时,是否由上级主管代替(只有用户种类为主管有效)
+							multi_executor: 1, //审批人多人时选项 1-依次确认 2-任一人审批 3-均需审批(只有用户种类为主管、指定成员、角色时有效)
+							employee_ids: [], //用户id列表(只有用户种类为指定成员时有效)
+							role_name: 'creator' //角色名(只有用户种类为角色时有效)
+						}
+					]
+				},
+				cc: {
+					//抄送配置
+					enable: 1, //是否启用 1-启用 0-禁用
+					employee: {
+						//抄送人员配置
+						type: 1, //抄送人类型 1-主管 2-指定成员 3-角色
+						manager_level: 1, //主管等级(只有抄送人类型为主管时有效)
+						employee_ids: [1, 2], //指定成员id列表(只有抄送人类型为指定成员时有效)
+						role_name: 'creator', //角色名称(只有抄送人类型为角色时有效)
+						condition: 1 //抄送结果 1-得出总分 2-公示结果
+					}
+				}
+			},
+			flowList: [
+				{ name: '目标制定', stateText: '系统', index: 1, isShow: true },
+				{ name: '目标确认', stateText: '已禁用', index: 7, isShow: true },
+				{ name: '执行中', stateText: '', index: 2, isShow: true },
+				{ name: '评分:上级评分', stateText: '已禁用', index: 3, isShow: true },
+				{ name: '评分:指定评分人', stateText: '', index: 4, isShow: false },
+				{ name: '审批', stateText: '已禁用', index: 5, isShow: true },
+				{ name: '抄送', stateText: '已禁用', index: 6, isShow: true }
+			],
+			options: [
+				{
+					value: 1,
+					label: '直接管理员'
+				},
+				{
+					value: 2,
+					label: '二级管理员'
+				},
+				{
+					value: 3,
+					label: '三级管理员'
+				},
+				{
+					value: 4,
+					label: '四级管理员'
+				},
+				{
+					value: 5,
+					label: '五级管理员'
+				},
+				{
+					value: 6,
+					label: '六级管理员'
+				}
+			]
+		};
+	},
+	created() {},
+	mounted() {},
+	methods: {
+		recoverData() {
+			let data = this.data.process;
+			let employeeMap = this.$getEmployeeList();
+			this.type = data.type; //流程方式 1-按评分人设置流程(默认) 2-按指标设置流程
+			let target = data.target;
+			// 目标制定
+			this.target = {
+				//目标制定
+				enable: 1, //是否启用 1-启用 0-禁用
+				type: target.type, //制定者类型 1-系统(默认模板,不可制定目标直接进入下一步) 2-被考核人 3-制定成员 4-主管
+				action: {
+					//可执行动作(允许编辑内容)
+					score_type: 1, //评分方式是否可编辑 1-可以 0-不可以
+					result_source: 1, //结果值数据来源 1-可以 0-不可以
+					reviewer: 1 //制定评分人 1-可以 0-不可以
+				},
+				multi_executor: target.multi_executor, //执行人多人时处理方式 1-依次制定 2-任一人制定即可
+				manager_level: target.manager_level, //上级等级
+				supervisor_confirm: 1, //是否有上级主管代替 1-是 0-否
+				employee_ids: target.employee_ids, //制定成员id列表
+				employeeList: target.employee_ids.map(item => {
+					return employeeMap[item];
+				})
+			};
+			// 目标确认
+			this.confirm = data.confirm;
+			// 上级评分
+			this.superiorFlow = data.score_supervisor;
+
+			// 审批节点
+			this.examine = data.review;
+
+			//指定评分人(只有维度数据中有指定评分人的指标才会有)
+			this.special_scorer = {
+				enable: data.special_scorer.enable, //是否启用 1-启用 0-禁用
+				action: data.special_scorer.action, //必填项 'comment', //指标评分说明'summar
+				comment: data.special_scorer.action.indexOf('comment') >= 0 ? true : false, //必填项 'comment',
+				summar: data.special_scorer.action.indexOf('summar') >= 0 ? true : false //指标评分说明'summar'
+			};
+			//抄送配置
+			let employee = data.cc.employee;
+			this.cc.enable = data.cc.enable;
+			this.cc.type = employee.type;
+			this.cc.manager_level = employee.manager_level;
+			this.cc.condition = employee.condition;
+			this.cc.employee_ids = employee.employee_ids;
+			this.cc.employeeList = employee.employee_ids.map(item => {
+				return employeeMap[item];
+			});
+		},
+		setEmployeeList(item) {
+			this.selected.employee = item[0] ? item : [];
+			this.setAdministrator = true;
+		},
+		confirmAdministrator(e) {
+			if (this.isActive == 1) {
+				this.target.employeeList = e.employee.length > 0 ? e.employee : [];
+			} else {
+				this.cc.employeeList = e.employee.length > 0 ? e.employee : [];
+			}
+		},
+		setExamineShow(is) {
+			this.flowList.forEach((item, index) => {
+				if (item.index == 4) {
+					this.$set(this.flowList[index], 'isShow', is);
+				}
+			});
+		},
+		//设置审批节点的状态
+		setIs(str, itemIndex) {
+			this.flowList.forEach((item, index) => {
+				if (item.index == itemIndex) {
+					this.$set(this.flowList[index], 'stateText', str);
+				}
+			});
+		},
+		// 设置上级评分人的权重
+		setInput(num, is) {
+			this.flowList.forEach((item, index) => {
+				if (item.index == 3) {
+					if (is) {
+						this.$set(this.flowList[index], 'stateText', '评分权重:' + num + '%');
+					} else {
+						this.$set(this.flowList[index], 'stateText', '已禁用');
+					}
+				}
+			});
+		},
+		activeFlow(index) {
+			this.isActive = index;
+		},
+		actionCheck(e, obj) {
+			if (obj.child) {
+				obj.child.forEach(item => {
+					item.check = true;
+				});
+			}
+		},
+		submitForm() {}
+	}
+};
+</script>
+<style scoped="scoped">
+.all {
+	font-size: 14px;
+	min-height: 600px;
+}
+.header {
+	border-bottom: 1px solid #ebebeb;
+	padding: 20px;
+	font-size: 16px;
+}
+.main-top,
+.main-bottom {
+	padding: 20px 0px;
+}
+::v-deep :focus {
+	outline: 0;
+}
+.flow-item {
+	background-color: #f4f6f9;
+	border-radius: 3px;
+	width: 140px;
+	min-width: 120px;
+	height: 60px;
+	margin-right: 60px;
+	position: relative;
+	margin-top: 30px;
+	box-sizing: border-box;
+	cursor: pointer;
+}
+.flow-item:hover {
+	background-color: #409eff;
+	color: #fff !important;
+}
+.flow-item:hover .fontColorZ {
+	color: #fff !important;
+}
+.flow-item:hover .fontColorF {
+	color: #fff !important;
+}
+.flow-item .el-icon-right {
+	position: absolute;
+	right: -60px;
+}
+.flow-item .fontColorF {
+	margin-top: 10px;
+}
+.isActive {
+	background-color: #409eff;
+	color: #fff !important;
+}
+.isActive .fontColorZ,
+.isActive .fontColorF {
+	color: #fff !important;
+}
+.nweTitle {
+	margin: 30px 0;
+	padding-left: 10px;
+	border-left: 3px solid #409eff;
+}
+.radio {
+	position: relative;
+	top: 2px;
+}
+.label {
+	width: 80px;
+	text-align: left;
+}
+.inputDc {
+	position: absolute;
+	top: 0;
+	width: 250px;
+	left: 0;
+	bottom: 0;
+	z-index: 9;
+}
+::v-deep .el-dialog__body {
+	padding: 20px;
+}
+.dialog-title {
+	font-size: 15px;
+	margin-bottom: 20px;
+}
+.dialog-item {
+	margin-bottom: 10px;
+	height: 45px;
+}
+.dialog-item span {
+	width: 22px;
+	height: 22px;
+	border-radius: 50%;
+	border: 1px solid #409eff;
+	color: #409eff;
+	display: inline-block;
+	line-height: 22px;
+	font-size: 12px;
+	text-align: center;
+}
+.dialog-item .label {
+	width: 130px;
+	margin: 0 10px;
+}
+.ul {
+	margin: 20px 0;
+}
+.li {
+	padding: 15px 0;
+	border-bottom: 1px solid #f1f1f1;
+}
+.li:hover {
+	background-color: #f5f7fa;
+}
+.border {
+	-webkit-appearance: none;
+	background-color: #fff;
+	background-image: none;
+	border-radius: 4px;
+	border: 1px solid #dcdfe6;
+	-webkit-box-sizing: border-box;
+	box-sizing: border-box;
+	color: #606266;
+	font-size: inherit;
+	height: auto;
+	outline: 0;
+	padding: 0 15px;
+	width: 250px;
+	position: relative;
+	margin-top: 10px;
+}
+</style>

+ 720 - 0
src/components/evaluate/Flow.vue

@@ -0,0 +1,720 @@
+<template>
+	<div class="all">
+		<div class="main">
+			<div class="main-top flex-box">
+				<div class="flex-box-v flex-d-wrap">
+					<div style="font-size: 16px;">流程节点</div>
+					<div
+						@click="activeFlow(item.index)"
+						class="flex-box-ce flow-item  flex-d-wrap"
+						:class="[isActive == item.index ? 'isActive' : '']"
+						v-for="(item, index) in flowList"
+						:key="index"
+						v-show="item.isShow"
+					>
+						<i :class="item.icon" class="iconfont"></i>
+						<div class="fontColorZ flex-1">{{ item.name }}</div>
+						<!-- <div class="fontColorF" style="font-size: 13px;" v-if="item.stateText">{{ item.stateText }}</div> -->
+						<!-- <i class="el-icon-right fontColorT" v-if="flowList.length != index + 1" style="font-size: 26px;margin: 0 20px;"></i> -->
+					</div>
+					
+				</div>
+				<div class="flex-1">
+					<!-- 目标制定 -->
+					<div v-show="isActive == 1">
+						<div class="nweTitle">目标制定</div>
+						<el-form label-width="80px">
+							<el-form-item>
+								<div class="form-titem">制定人:</div>
+								<el-radio-group v-model="target.type">
+									<el-radio :label="1">系统(使用考核模板)</el-radio>
+									<el-radio :label="2">被考核人</el-radio>
+									<el-radio :label="3">指定成员</el-radio>
+									<el-radio :label="4">管理员(指定一级)</el-radio>
+								</el-radio-group>
+								<div class="flex-box-ce" style="margin-top: 10px;" v-show="target.type == 4">
+									<span>被考评人的</span>
+									<el-select v-model="target.manager_level" placeholder="请选择级别" style="margin: 0 10px;">
+										<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+									</el-select>
+									<el-tooltip class="item" effect="dark" content="找不到确认人时,由上级管理员替代" placement="top-start">
+										<i class="fontColorF el-icon-warning"></i>
+									</el-tooltip>
+								</div>
+								<div class="border flex-box-ce" style="position: relative;" v-show="target.type == 3">
+									<div class="fontColorF flex-1" v-if="target.employeeList.length == 0">请选择指定人员</div>
+									<div v-else style="width: 180px;" class="font-flex-word">
+										<span v-for="(j, index2) in target.employeeList" :key="index2">
+											<i v-if="index2 != 0">,</i>
+											{{ j.name }}
+										</span>
+									</div>
+									<span v-if="target.employeeList.length > 0" class="blue">{{ target.employeeList.length }}人</span>
+									<i class="el-icon-arrow-down icon-right" v-else></i>
+									<div @click="setEmployeeList(target.employeeList)" class="inputDc"></div>
+								</div>
+							</el-form-item>
+							<el-form-item  v-if="target.type == 3 || target.type == 4">
+								<div class="form-titem">制定人多人时:</div>
+								<el-radio-group v-model="target.multi_executor">
+									<el-radio :label="1">依次制定</el-radio>
+									<el-radio :label="2">任一人制定即可</el-radio>
+								</el-radio-group>
+							</el-form-item>
+						</el-form>
+					</div>
+					<!-- 执行中 -->
+					<div v-show="isActive == 2">
+						<div class="flex-box-v flex-center-center" style="margin-top: 10%;">
+							<img src="@/assets/image/invite_new_company.png" style="width: 200px;height: 200px;margin-bottom: 10px;" />
+							<div class="fontColorF" style="line-height: 30px;">
+								1、目标制定并确认后,将自动进入此节点;
+								<br />
+								2、执行节点中,执行人可以制定执行计划,管理者可以添加管理跟踪记录;
+								<br />
+								3、管理员设置【开始评分】后,自动进入评分节点
+							</div>
+						</div>
+					</div>
+					<!-- 评分:上级评分 -->
+					<SuperiorFlow v-show="isActive == 3" ref="SuperiorFlow" @setInput="setInput" :data="superiorFlow"></SuperiorFlow>
+					<!-- 评分:指定评分人 -->
+					<div v-show="isActive == 4">
+						<div class="nweTitle">
+							指定评分人
+							<el-tooltip effect="dark" content="当指标有指定评分人时,应用以下配置" placement="top"><i class="el-icon-warning blue"></i></el-tooltip>
+						</div>
+						<div  style="margin-left: 80px;margin-bottom: 20px;">
+							<div class="form-titem" style="height: 36px;">评分人:</div>
+							<div style="color: #606266;">指定评分人</div>
+						</div>
+						<div style="margin-left: 80px;">
+							<div class="form-titem" style="height: 36px;">必填项:</div>
+							<el-checkbox v-model="special_scorer.comment">指标评分说明</el-checkbox>
+							<!-- <el-checkbox v-model="special_scorer.summar">评分总结</el-checkbox> -->
+						</div>
+					</div>
+					<!-- 审批节点 -->
+					<Examine v-show="isActive == 5" ref="Examine" @setIs="setIs" :data="examine"></Examine>
+					<!-- 抄送 -->
+					<div v-show="isActive == 6">
+						<div class="nweTitle">
+							抄送
+							<el-switch v-model="cc.enable" style="margin-left: 10px;" :active-value="1" :inactive-value="0"></el-switch>
+						</div>
+						<el-form :model="cc" label-width="80px" v-show="cc.enable == 1">
+							<el-form-item>
+								<div class="form-titem">抄送人:</div>
+								<el-radio-group v-model="cc.type">
+									<el-radio :label="1">管理员</el-radio>
+									<el-radio :label="2">指定成员</el-radio>
+								</el-radio-group>
+								<div class="flex-box-ce" style="margin-top: 10px;" v-show="cc.type == 1">
+									<span>被考评人的</span>
+									<el-select v-model="cc.manager_level" placeholder="请选择级别" style="margin: 0 10px;">
+										<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+									</el-select>
+								</div>
+								<div class="border flex-box-ce" style="position: relative;" v-show="cc.type == 2">
+									<div class="fontColorF flex-1" v-if="cc.employeeList.length == 0">请选择指定人员</div>
+									<div style="width: 180px;" class="font-flex-word" v-if="cc.employeeList[0]">
+										<span v-for="(j, index2) in cc.employeeList" :key="index2">
+											<i v-if="index2 != 0">,</i>
+											<span v-if="j.name">{{ j.name }}</span>
+										</span>
+									</div>
+									<span v-if="cc.employeeList.length > 0" class="blue">{{ cc.employeeList.length }}人</span>
+									<i class="el-icon-arrow-down icon-right" v-else></i>
+									<div @click="setEmployeeList(cc.employeeList)" class="inputDc"></div>
+								</div>
+							</el-form-item>
+							<el-form-item>
+								<div class="form-titem">抄送条件:</div>
+								<el-radio-group v-model="cc.condition">
+									<el-radio :label="1">得出结果后抄送</el-radio>
+									<!-- <el-radio :label="2">公布结果后抄送</el-radio> -->
+								</el-radio-group>
+							</el-form-item>
+						</el-form>
+					</div>
+					<!-- 目标确认 -->
+					<Affirm v-show="isActive == 7" ref="Affirm" @setIs="setIs" :data="confirm"></Affirm>
+				</div>
+			</div>
+		</div>
+		<!-- 同步规则 -->
+		<el-dialog title="同步规则" :visible.sync="isRule" width="700px" :close-on-click-modal="false">
+			<div>
+				<div class="dialog-title">将考核表规则同步到已发起的考核:</div>
+				<div class="flex-box-ce dialog-item">
+					<span>1</span>
+					<div class="label">选择同步的考核</div>
+					<div style="position: relative;">
+						<el-input v-model="isRule" placeholder="请选择考核" style="width:250px"></el-input>
+						<div @click="isChecks = true" class="inputDc"></div>
+					</div>
+				</div>
+				<div class="flex-box-ce dialog-item">
+					<span>2</span>
+					<div class="label">选择同步的被考核人</div>
+					<div style="position: relative;">
+						<el-input v-model="isRule" placeholder="请选择考核人" style="width:250px"></el-input>
+						<div @click="isRule2 = true" class="inputDc"></div>
+					</div>
+				</div>
+				<div class="flex-box-ce dialog-item">
+					<span>3</span>
+					<div class="label">评分节点同步</div>
+					<div>
+						评分节点同步
+						<el-tooltip effect="dark" placement="top">
+							<div slot="content">
+								<i class="el-icon-caret-right" style="color: #fff;"></i>
+								已经进入评分的流程会重置到第一个评分环节继续评分
+								<br />
+								<i class="el-icon-caret-right" style="color: #fff;"></i>
+								未开始评分的评分流程直接更新
+							</div>
+							<i class="el-icon-warning blue"></i>
+						</el-tooltip>
+					</div>
+				</div>
+			</div>
+			<span slot="footer" class="dialog-footer">
+				<div class="flex-box-ce">
+					<div class="flex-1 yellow" style="text-align: left;">注意:24h内仅允许对该考核表相同人员同步一次</div>
+					<div>
+						<el-button @click="isRule = false">取 消</el-button>
+						<el-button type="primary" @click="isRule = false">保存考核表并同步</el-button>
+					</div>
+				</div>
+			</span>
+		</el-dialog>
+
+		<!-- 选择考核 -->
+		<BrawerBox drawerTitle="选择考核" :showDrawer.sync="isChecks">
+			<template slot="main">
+				<el-input placeholder="搜索考核" v-model="radio"></el-input>
+				<ul class="ul">
+					<li v-for="(item, index) in gzList" :key="index" class="flex-box-ce li">
+						<el-checkbox class="flex-1" v-model="item.check" :label="item.label" @change="actionCheck($event, item)"></el-checkbox>
+						<div class="blue" v-if="item.num > 0">{{ item.num }} 人</div>
+					</li>
+				</ul>
+			</template>
+			<template slot="footer">
+				<el-button plain @click="isChecks = false">取消</el-button>
+				<el-button type="primary" :loading="loading" @click="submitForm('detailForm')">确定</el-button>
+			</template>
+		</BrawerBox>
+
+		<!-- 选择同步人员 -->
+		<EmployeeSelector :selected="selected" :is_filtration_creator="false" :visible.sync="setAdministrator" @confirm="confirmAdministrator" />
+	</div>
+</template>
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import BrawerBox from '@/components/public/BrawerBox';
+import SuperiorFlow from '@/components/flow/SuperiorFlow';
+import Examine from '@/components/flow/Examine';
+import Affirm from '@/components/flow/Affirm';
+export default {
+	components: { EmployeeSelector, BrawerBox, SuperiorFlow, Examine, Affirm },
+	name: 'Flow',
+	props: {
+		isShowScore: {
+			type: Boolean,
+			default: false
+		},
+		data: {
+			type: Object,
+			default:{}
+		}
+	},
+	watch: {
+		data(val) {
+			if (val.process) {
+				this.recoverData();
+			}
+		},
+		'target.type'(val) {
+			this.flowList.forEach((item, index) => {
+				if (item.index == 1) {
+					let str = '系统';
+					if (val == 1) {
+						str = '系统';
+					} else if (val == 2) {
+						str = '被考核人';
+					} else if (val == 3) {
+						str = '指定成员';
+					} else {
+						str = '管理员';
+					}
+					this.$set(this.flowList[index], 'stateText', str);
+				}
+			});
+		},
+		isShowScore(val) {
+			//根据是否有指定评分人,来是否显示指定评分人模块
+			if (!val) {
+				if (this.isActive == 4) {
+					this.isActive = 1;
+				}
+			}
+			this.setExamineShow(val);
+		},
+		'cc.enable'(val) {
+			this.flowList.forEach((item, index) => {
+				if (item.index == 6) {
+					this.$set(this.flowList[index], 'stateText', val == 1 ? '' : '已禁用');
+				}
+			});
+		}
+	},
+	data() {
+		return {
+			radio: 1,
+			isActive: 1,
+			checkbox: true,
+			gzList: [1],
+			loading: false,
+			isChecks: false,
+			isRule: false, //同步规则
+			isRule2: false, //同步规则
+
+			superiorFlow: {}, //上级评分(编辑)
+			examine: {}, //审批节点(编辑)
+			confirm: {}, //目标确认(编辑)
+
+			selected: { employee: [], dept: [] }, //执行者列表
+			setAdministrator: false,
+			type: 1, //流程方式 1-按评分人设置流程(默认) 2-按指标设置流程
+
+			// 下面是流程的数据
+			target: {
+				//目标制定
+				enable: 1, //是否启用 1-启用 0-禁用
+				type: 1, //制定者类型 1-系统(默认模板,不可制定目标直接进入下一步) 2-被考核人 3-制定成员 4-主管
+				action: {
+					//可执行动作(允许编辑内容)
+					score_type: 1, //评分方式是否可编辑 1-可以 0-不可以
+					result_source: 1, //结果值数据来源 1-可以 0-不可以
+					reviewer: 1 //制定评分人 1-可以 0-不可以
+				},
+				multi_executor: 1, //执行人多人时处理方式 1-依次制定 2-任一人制定即可
+				manager_level: 1, //上级等级
+				supervisor_confirm: 1, //是否有上级主管代替 1-是 0-否
+				employee_ids: [], //制定成员id列表
+				employeeList: []
+			},
+
+			special_scorer: {
+				//指定评分人(只有维度数据中有指定评分人的指标才会有)
+				enable: 1, //是否启用 1-启用 0-禁用
+				action: ['comment', 'summar'], //必填项 'comment', //指标评分说明'summar
+				comment: false, //必填项 'comment',
+				summar: false //指标评分说明'summar'
+			},
+			cc: {
+				//抄送配置
+				enable: 0, //是否启用 1-启用 0-禁用
+				type: 1, //抄送人类型 1-主管 2-指定成员 3-角色
+				manager_level: 1, //主管等级(只有抄送人类型为主管时有效)
+				employee_ids: [], //指定成员id列表(只有抄送人类型为指定成员时有效)
+				employeeList: [],
+				// role_name: "creator",        //角色名称(只有抄送人类型为角色时有效)
+				condition: 1 //抄送结果 1-得出总分 2-公示结果
+			},
+			ruleForm: {
+				type: 1, //流程方式 1-按评分人设置流程(默认) 2-按指标设置流程
+				target: {
+					//目标制定配置结果
+					enable: 1, //是否启用 1-启用 0-禁用
+					type: 1, //制定者类型 1-系统(默认模板,不可制定目标直接进入下一步) 2-被考核人 3-制定成员 4-主管
+					action: {
+						//可执行动作(允许编辑内容)
+						score_type: 1, //评分方式是否可编辑 1-可以 0-不可以
+						result_source: 1, //结果值数据来源 1-可以 0-不可以
+						reviewer: 1 //制定评分人 1-可以 0-不可以
+					},
+					multi_executor: 1, //执行人多人时处理方式 1-依次制定 2-任一人制定即可
+					manager_level: 1, //上级等级
+					supervisor_confirm: 1, //是否有上级主管代替 1-是 0-否
+					employee_ids: [] //制定成员id列表
+				},
+				confirm: {
+					//目标确认配置结果
+					enable: 0, //是否启用 1-启用 0-禁用
+					confirmor: [
+						//确认人员列表
+						{
+							type: 1, //确认人类型 1-主管 2-指定成员 3-被考核人 4-角色
+							manager_level: 1, //主管级别
+							supervisor_confirm: 1, //找不到确认人,有上级主管代替 1-是 0-否
+							multi_executor: 1, //确认人多人时处理方式 1-依次确认 2-任一人确认 3-均需确认
+							action: [
+								//允许确认人动作
+								'index', //修改指标
+								'transfer' //转交
+							],
+							employee_ids: [], //指定成员用户id列表(类型为指定成员时)
+							role_name: 'creator' //角色名称(类型为指定角色时)
+						}
+					],
+					unique: 1 //重复去重
+				},
+				execution: {
+					//执行中制定配置结果
+					enable: 1 //是否启用 1-启用 0-禁用
+				},
+				score_self: {
+					//自评指定配置结果
+					enable: 0, //是否启用 1-启用 0-禁用
+					weight: 0, //权重
+					action: [
+						//必填项动作
+						'comment', //指标评分说明
+						'summary' //评分总结
+					],
+					rating: 0, //是否手动评级
+					unique: 1 //评分人去重
+				},
+				score_mutual: {
+					//互评配置结果
+					enable: 0 //是否启用 1-启用 0-禁用
+				},
+				score_supervisor: {
+					//上级评分
+					enable: 1, //是否启用 1-启用 0-禁用
+					unique: 1, //评分人去重 1-是 0-否
+					supervisor: [
+						//上级配置列表
+						{
+							type: 1, //评分人类型 1-主管 2-指定成员 3-角色
+							manager_level: 1, //主管等级(只有评分人类型为主管时有效)
+							supervisor_confirm: 1, //找不到确认人时是否由上级主管代替(只有评分人类型为主管时有效) 1-是 0-否
+							role_name: 'creator', //角色名(只有评分人类型为角色时有效)
+							employee_ids: [], //用户id列表(只有评分人类型为指定人员时有效)
+							weight: 10, //权重
+							multi_executor: 1, //评分人多人时 1-各自评分 2-任一人评分
+							rule: 1, //评分规则 1-指标均要评分 2-评分总结
+							action: [
+								//必填项
+								'comment', //指标评分说明
+								'summary' //评分总结
+							],
+							rating: 0, //是否手动评分 1-是 0-否
+							transfer: 1 //是否允许转交 1-是 0-否
+						}
+					]
+				},
+				special_scorer: {
+					//指定评分人(只有维度数据中有指定评分人的指标才会有)
+					enable: 1, //是否启用 1-启用 0-禁用
+					action: ['comment', 'summar'] //必填项 'comment', //指标评分说明'summar ' //评分总
+				},
+				review: {
+					//审批节点
+					enable: 1, //是否启用 1-启用 0-禁用
+					unique: 1, //评分人去重 1-是 0-否
+					reviewer: [
+						//审批人配置列表
+						{
+							type: 1, //用户种类 1-主管 2-指定成员 3-被考核人 4-角色
+							action: ['transfer', 'refuse'], //转交//驳回                  //允许审批人动作
+							manager_level: 1, //主管级别(只有用户种类为主管有效)
+							supervisor_confirm: 1, //找不到审批人时,是否由上级主管代替(只有用户种类为主管有效)
+							multi_executor: 1, //审批人多人时选项 1-依次确认 2-任一人审批 3-均需审批(只有用户种类为主管、指定成员、角色时有效)
+							employee_ids: [], //用户id列表(只有用户种类为指定成员时有效)
+							role_name: 'creator' //角色名(只有用户种类为角色时有效)
+						}
+					]
+				},
+				cc: {
+					//抄送配置
+					enable: 1, //是否启用 1-启用 0-禁用
+					employee: {
+						//抄送人员配置
+						type: 1, //抄送人类型 1-主管 2-指定成员 3-角色
+						manager_level: 1, //主管等级(只有抄送人类型为主管时有效)
+						employee_ids: [1, 2], //指定成员id列表(只有抄送人类型为指定成员时有效)
+						role_name: 'creator', //角色名称(只有抄送人类型为角色时有效)
+						condition: 1 //抄送结果 1-得出总分 2-公示结果
+					}
+				}
+			},
+			flowList: [
+				{ name: '目标制定', stateText: '系统', index: 1, isShow: true,icon:'icon-RectangleCopy' },
+				{ name: '目标确认', stateText: '已禁用', index: 7, isShow: true,icon:'icon-gongdanqueren' },
+				{ name: '执行中', stateText: '', index: 2, isShow: true,icon:'icon-shouye1' },
+				{ name: '评分:上级评分', stateText: '已禁用', index: 3, isShow: true,icon:'icon-star-half' },
+				{ name: '评分:指定评分人', stateText: '', index: 4, isShow: false,icon:'icon-yonghujihuo' },
+				{ name: '审批', stateText: '已禁用', index: 5, isShow: true,icon:'icon-tianshenpi' },
+				{ name: '抄送', stateText: '已禁用', index: 6, isShow: true,icon:'icon-a-chaosongrenchaosongyonghu-01' }
+			],
+			options: [
+				{
+					value: 1,
+					label: '直接管理员'
+				},
+				{
+					value: 2,
+					label: '二级管理员'
+				},
+				{
+					value: 3,
+					label: '三级管理员'
+				},
+				{
+					value: 4,
+					label: '四级管理员'
+				},
+				{
+					value: 5,
+					label: '五级管理员'
+				},
+				{
+					value: 6,
+					label: '六级管理员'
+				}
+			]
+		};
+	},
+	created() {},
+	mounted() {},
+	methods: {
+		recoverData() {
+			let data = this.data.process;
+			let employeeMap = this.$getEmployeeList();
+			this.type = data.type; //流程方式 1-按评分人设置流程(默认) 2-按指标设置流程
+			let target = data.target;
+			// 目标制定
+			this.target = {
+				//目标制定
+				enable: 1, //是否启用 1-启用 0-禁用
+				type: target.type, //制定者类型 1-系统(默认模板,不可制定目标直接进入下一步) 2-被考核人 3-制定成员 4-主管
+				action: {
+					//可执行动作(允许编辑内容)
+					score_type: 1, //评分方式是否可编辑 1-可以 0-不可以
+					result_source: 1, //结果值数据来源 1-可以 0-不可以
+					reviewer: 1 //制定评分人 1-可以 0-不可以
+				},
+				multi_executor: target.multi_executor, //执行人多人时处理方式 1-依次制定 2-任一人制定即可
+				manager_level: target.manager_level, //上级等级
+				supervisor_confirm: 1, //是否有上级主管代替 1-是 0-否
+				employee_ids: target.employee_ids, //制定成员id列表
+				employeeList: target.employee_ids.map(item => {
+					return employeeMap[item];
+				})
+			};
+			// 目标确认
+			this.confirm = data.confirm;
+			// 上级评分
+			this.superiorFlow = data.score_supervisor;
+
+			// 审批节点
+			this.examine = data.review;
+
+			//指定评分人(只有维度数据中有指定评分人的指标才会有)
+			this.special_scorer = {
+				enable: data.special_scorer.enable, //是否启用 1-启用 0-禁用
+				action: data.special_scorer.action, //必填项 'comment', //指标评分说明'summar
+				comment: data.special_scorer.action.indexOf('comment') >= 0 ? true : false, //必填项 'comment',
+				summar: data.special_scorer.action.indexOf('summar') >= 0 ? true : false //指标评分说明'summar'
+			};
+			//抄送配置
+			let employee = data.cc.employee;
+			this.cc.enable = data.cc.enable;
+			this.cc.type = employee.type;
+			this.cc.manager_level = employee.manager_level;
+			this.cc.condition = employee.condition;
+			this.cc.employee_ids = employee.employee_ids;
+			this.cc.employeeList = employee.employee_ids.map(item => {
+				return employeeMap[item];
+			});
+		},
+		setEmployeeList(item) {
+			this.selected.employee = item[0] ? item : [];
+			this.setAdministrator = true;
+		},
+		confirmAdministrator(e) {
+			if (this.isActive == 1) {
+				this.target.employeeList = e.employee.length > 0 ? e.employee : [];
+			} else {
+				this.cc.employeeList = e.employee.length > 0 ? e.employee : [];
+			}
+		},
+		setExamineShow(is) {
+			this.flowList.forEach((item, index) => {
+				if (item.index == 4) {
+					this.$set(this.flowList[index], 'isShow', is);
+				}
+			});
+		},
+		//设置审批节点的状态
+		setIs(str, itemIndex) {
+			this.flowList.forEach((item, index) => {
+				if (item.index == itemIndex) {
+					this.$set(this.flowList[index], 'stateText', str);
+				}
+			});
+		},
+		// 设置上级评分人的权重
+		setInput(num, is) {
+			this.flowList.forEach((item, index) => {
+				if (item.index == 3) {
+					if (is) {
+						this.$set(this.flowList[index], 'stateText', '评分权重:' + num + '%');
+					} else {
+						this.$set(this.flowList[index], 'stateText', '已禁用');
+					}
+				}
+			});
+		},
+		activeFlow(index) {
+			this.isActive = index;
+		},
+		actionCheck(e, obj) {
+			if (obj.child) {
+				obj.child.forEach(item => {
+					item.check = true;
+				});
+			}
+		},
+		submitForm() {}
+	}
+};
+</script>
+<style scoped="scoped">
+.all {
+	font-size: 14px;
+	min-height: 600px;
+}
+.header {
+	border-bottom: 1px solid #ebebeb;
+	padding: 20px;
+	font-size: 16px;
+}
+.main-top,
+.main-bottom {
+	padding: 20px 0px;
+}
+::v-deep :focus {
+	outline: 0;
+}
+.flow-item {
+	/* background-color: #f4f6f9; */
+	border: 2px solid #ccc;
+	border-radius: 3px;
+	width: 160px;
+	min-width: 120px;
+	/* height: 60px; */
+	padding: 10px;
+	margin-right: 60px;
+	position: relative;
+	margin-top: 16px;
+	box-sizing: border-box;
+	cursor: pointer;
+}
+.flow-item .iconfont{
+	font-size: 16px;
+	margin-right: 10px;
+}
+/* .flow-item:hover {
+	background-color: #409eff;
+	color: #fff !important;
+}
+.flow-item:hover .fontColorZ {
+	color: #fff !important;
+}
+.flow-item:hover .fontColorF {
+	color: #fff !important;
+} */
+.flow-item .el-icon-right {
+	position: absolute;
+	right: -60px;
+}
+.isActive {
+	/* background-color: #409eff; */
+	color: #409eff !important;
+	border: 2px solid #409eff;
+}
+.isActive .fontColorZ,
+.isActive .fontColorF {
+	color: #409eff !important;
+}
+.nweTitle {
+	margin: 30px 0;
+	padding-left: 10px;
+	border-left: 3px solid #409eff;
+}
+.radio {
+	position: relative;
+	top: 2px;
+}
+.label {
+	width: 80px;
+	text-align: left;
+}
+.inputDc {
+	position: absolute;
+	top: 0;
+	width: 250px;
+	left: 0;
+	bottom: 0;
+	z-index: 9;
+}
+::v-deep .el-dialog__body {
+	padding: 20px;
+}
+.dialog-title {
+	font-size: 15px;
+	margin-bottom: 20px;
+}
+.dialog-item {
+	margin-bottom: 10px;
+	height: 45px;
+}
+.dialog-item span {
+	width: 22px;
+	height: 22px;
+	border-radius: 50%;
+	border: 1px solid #409eff;
+	color: #409eff;
+	display: inline-block;
+	line-height: 22px;
+	font-size: 12px;
+	text-align: center;
+}
+.dialog-item .label {
+	width: 130px;
+	margin: 0 10px;
+}
+.ul {
+	margin: 20px 0;
+}
+.li {
+	padding: 15px 0;
+	border-bottom: 1px solid #f1f1f1;
+}
+.li:hover {
+	background-color: #f5f7fa;
+}
+.border {
+	-webkit-appearance: none;
+	background-color: #fff;
+	background-image: none;
+	border-radius: 4px;
+	border: 1px solid #dcdfe6;
+	-webkit-box-sizing: border-box;
+	box-sizing: border-box;
+	color: #606266;
+	font-size: inherit;
+	height: auto;
+	outline: 0;
+	padding: 0 15px;
+	width: 250px;
+	position: relative;
+	margin-top: 10px;
+}
+</style>

+ 1278 - 0
src/components/evaluate/Template.vue

@@ -0,0 +1,1278 @@
+<template>
+	<div class="all" v-loading="indexLoading">
+		<div class="content">
+			<div class="title">总分计算公式</div>
+			<div class="flex-box-ce" style="max-width: 1100px;">
+				<div class="flex-1 message flex-box-v flex-center-center">
+					<template v-if="ruleForm.calc_type == 1">
+						<div class="message-text">
+							<span v-if="ruleForm.calc_dimension">总分=评分 X 维度权重,再累加</span>
+							<span v-else>总分=评分直接累加</span>
+						</div>
+					</template>
+					<template v-if="ruleForm.calc_type == 2">
+						<div class="message-text">
+							<span v-if="ruleForm.calc_dimension">总分=评分 X 维度权重 X 指标权重,再累加</span>
+							<span v-else>总分=评分 X 指标权重,再累加</span>
+						</div>
+					</template>
+					<el-popover placement="bottom" width="500" trigger="hover">
+						<div style="padding: 10px;">
+							<div class="flex-box-ce popover-text">
+								<template v-if="ruleForm.calc_type == 1">
+									<div class="fontColorB">
+										<span v-if="ruleForm.calc_dimension">
+											<span class="blue" slot="reference">示例</span>
+											总分=评分 X 维度权重,再累加
+										</span>
+										<span v-else>
+											<span class="blue" slot="reference">示例</span>
+											总分=评分直接累加
+										</span>
+									</div>
+								</template>
+								<template v-if="ruleForm.calc_type == 2">
+									<div class="fontColorB">
+										<span v-if="ruleForm.calc_dimension">
+											<span class="blue" slot="reference">示例</span>
+											总分=评分 X 维度权重 X 指标权重,再累加
+										</span>
+										<span v-else>
+											<span class="blue" slot="reference">示例</span>
+											总分=评分 X 指标权重,再累加
+										</span>
+									</div>
+								</template>
+							</div>
+						</div>
+						<template v-if="ruleForm.calc_type == 1">
+							<img v-if="ruleForm.calc_dimension" src="@/assets/image/gs3.png" class="popover-img" style="height: auto;" />
+							<img v-else src="@/assets/image/gs4.png" class="popover-img" style="height: auto;" />
+						</template>
+						<template v-if="ruleForm.calc_type == 2">
+							<img v-if="ruleForm.calc_dimension" src="@/assets/image/gs1.png" class="popover-img" style="height: auto;" />
+							<img v-else src="@/assets/image/gs2.png" class="popover-img" style="height: auto;" />
+						</template>
+						<span class="blue" slot="reference">示例</span>
+					</el-popover>
+				</div>
+				<div class="flex-box-v flex-center-center fontColorB" style="padding: 0 20px;height: 100px;">
+					<div style="font-size: 14px;margin-bottom: 5px;">修改总分计算公式</div>
+					<div><i class="el-icon-d-arrow-right" style="font-size: 18px;"></i></div>
+				</div>
+				<div class="flex-1 message">
+					<el-form ref="detailForm" label-width="150px">
+						<el-form-item label="指标评分计算方式" style="margin-bottom: 0px;margin-top: 15px;">
+							<el-radio-group v-model="ruleForm.calc_type">
+								<el-radio :label="1">加和计算</el-radio>
+								<el-radio :label="2">加权计算</el-radio>
+							</el-radio-group>
+						</el-form-item>
+						<el-form-item label="维度权重参与计算" style="margin-bottom: 0px;">
+							<el-switch v-model="ruleForm.calc_dimension" :active-value="1" :inactive-value="0">备选项</el-switch>
+						</el-form-item>
+					</el-form>
+				</div>
+			</div>
+		</div>
+		<div class="flex-box-ce pop-up">
+			<el-button type="primary" @click="addDimensionality = true">
+				<i class="el-icon-plus"></i>
+				添加考核维度
+			</el-button>
+			<div class="fontColorB" style="margin-left: 20px;" v-if="dimensionalityList.length > 0">
+				共
+				<span class="blue">{{ sumText.num }}</span>
+				个维度
+				<span v-if="ruleForm.calc_dimension == 1">
+					,所有维度权重合计:
+					<span style="font-weight: 600;color: #222;">{{ sumText.val }}</span>
+					%
+				</span>
+			</div>
+		</div>
+
+		<div class="wds" v-for="(item, index) in dimensionalityList" :key="index">
+			<div class="wd-header">
+				<div class="flex-box-ce wd-title">
+					<div class="flex-1 fontColorZ" style="font-size: 18px;">{{ item.name }}</div>
+					<div class="flex-box-ce titles">
+						<div v-if="item.index_type == 1">量化指标</div>
+						<div v-if="item.index_type == 2">非量化指标</div>
+						<div v-if="item.index_type == 3">额外加分项</div>
+						<div v-if="item.index_type == 4">额外扣分项</div>
+						<div v-if="item.index_type != 3 && item.index_type != 4 && ruleForm.calc_dimension == 1">维度权重{{ item.dimension_weight }}%</div>
+					</div>
+					<el-tooltip effect="dark" content="修改维度名称" placement="top">
+						<i class="el-icon-edit" @click="compileItem(item, index)" style="margin-right: 10px;"></i>
+					</el-tooltip>
+					<el-tooltip effect="dark" content="删除此维度" placement="top"><i class="el-icon-delete-solid" @click="deleteItem(item, index)"></i></el-tooltip>
+				</div>
+			</div>
+			<el-table stripe :data="item.index" style="width: 100%; margin-top: 10px;">
+				<el-table-column prop="name" label="指标名称"></el-table-column>
+				<el-table-column
+					prop="per_remark"
+					min-width="200"
+					:label="item.index_type == 3 || item.index_type == 4 ? (item.index_type == 3 ? '加分标准' : '扣分标准') : '考核标准'"
+				>
+					<template slot-scope="scope">
+						<PreBox :value="scope.row.per_remark"></PreBox>
+					</template>
+				</el-table-column>
+				<el-table-column prop="point_limit" :label="item.index_type == 3 ? '加分上限' : '扣分上限'" v-if="item.index_type == 3 || item.index_type == 4"></el-table-column>
+				<el-table-column prop="target" label="目标值" v-if="item.index_type == 1">
+					<template slot-scope="scope">
+						<PreBox v-if="scope.row.target" :value="scope.row.target + '' + scope.row.unit"></PreBox>
+					</template>
+				</el-table-column>
+				<!-- <el-table-column prop="unit" label="量化指标单位" v-if="item.index_type == 1"></el-table-column> -->
+				<el-table-column prop="weight" label="权重(%)" v-if="item.index_type == 1 || item.index_type == 2"></el-table-column>
+				<el-table-column label="结果值录入人" v-if="item.index_type == 1">
+					<template slot-scope="scope">
+						<span v-if="scope.row.result_type == 'none'">不开启</span>
+						<span v-if="scope.row.result_type == 'self'">被考核人</span>
+						<span v-if="scope.row.result_type == 'special'">指定员工 ({{ scope.row.result_employee_name }})</span>
+						<span v-if="scope.row.result_type == 'supervisor'">直接管理员</span>
+					</template>
+				</el-table-column>
+				<el-table-column prop="reviewer_name" label="指定评分人"></el-table-column>
+				<el-table-column label="操作">
+					<template slot-scope="scope">
+						<el-button @click="compileIndex(scope, index)" type="text">编辑</el-button>
+						<el-button @click="deleteIndex(scope, index)" type="text">删除</el-button>
+					</template>
+				</el-table-column>
+			</el-table>
+			<div class="wd-footer flex-box-ce">
+				<div class="flex-box flex-1">
+					<el-button class="primaryBtn" @click="selectIndex(item, index)">
+						<i class="el-icon-s-operation blue"></i>
+						选择指标项
+					</el-button>
+					<el-button class="primaryBtn" @click="addIndex(item, index)">
+						<i class="el-icon-plus blue"></i>
+						增加指标项
+					</el-button>
+				</div>
+				<div class="yellow" style="font-size: 16px;font-weight: 700;">
+					共
+					<span class="blue">{{ getIndexNum(index, 1) }}</span>
+					项指标
+					<span v-if="item.index_type == 1 || item.index_type == 2">
+						,所有指标权重合计:
+						<span style="font-weight: 600;color: #222;">{{ getIndexNum(index, 2) }}</span>
+						%
+					</span>
+				</div>
+			</div>
+		</div>
+
+		<!-- 提示弹窗 -->
+		<el-dialog
+			:title="ruleForm.calc_type == 1 ? '维度权重参与计算(加和)' : '维度权重参与计算(加权)'"
+			:visible.sync="dialogVisible"
+			width="500px"
+			:show-close="false"
+			:close-on-click-modal="false"
+		>
+			<el-alert type="warning" :closable="false" show-icon style="margin: 20px 0;">
+				<p><b>请谨慎启用<维度权重参与计算>,如不符合以下条件,请勿启用</b></p>
+				<li class="headLi" style="margin-bottom: 10px;">- 必须保证每个考核维度内的指标权重总和为100%</li>
+				<li class="headLi">- 维度权重会参与计算得分,可参考下图</li>
+			</el-alert>
+			<img src="@/assets/image/gs3.png" v-if="ruleForm.calc_type == 1" style="width: 100%;height: auto;" />
+			<img src="@/assets/image/gs1.png" v-else style="width: 100%;height: auto;" />
+			<span slot="footer" class="dialog-footer">
+				<el-button @click="ruleForm.calc_dimension = 0">不启用</el-button>
+				<el-button @click="dialogVisible = false">启用</el-button>
+			</span>
+		</el-dialog>
+
+		<!-- 新增指标 -->
+		<BrawerBox drawerTitle="指标设置" :showDrawer.sync="isAddIndex" :closeModal="false">
+			<template slot="main">
+				<el-form ref="saveAddIndex" :model="addIndexForm" :rules="addIndexFormRule" @submit.native.prevent label-width="120px">
+					<el-form-item label="指标类型:" prop="type">
+						<el-select v-model="addIndexForm.type" disabled placeholder="请选择指标类型" class="width-250">
+							<el-option label="量化指标" :value="1"></el-option>
+							<el-option label="非量化指标" :value="2"></el-option>
+							<el-option label="额外加分项" :value="3"></el-option>
+							<el-option label="额外扣分项" :value="4"></el-option>
+						</el-select>
+					</el-form-item>
+					<el-form-item label="指标名称:" prop="name">
+						<el-input v-model="addIndexForm.name" placeholder="请输入指标名称" maxlength="30" show-word-limit></el-input>
+					</el-form-item>
+					<el-form-item :label="fromName" prop="per_remark">
+						<el-input type="textarea" placeholder="请输入" v-model="addIndexForm.per_remark" autosize clearable show-word-limit maxlength="500"></el-input>
+					</el-form-item>
+					<el-form-item label="加分上限" prop="point_limit" v-if="addIndexForm.type == 3">
+						<el-input placeholder="请输入加分上限" v-model="addIndexForm.point_limit" id="input3" @input="checkCountry2('input3')"></el-input>
+					</el-form-item>
+					<el-form-item label="扣分上限" prop="point_limit" v-if="addIndexForm.type == 4">
+						<el-input placeholder="请输入扣分上限" v-model="addIndexForm.point_limit" id="input4" @input="checkCountry2('input4')"></el-input>
+					</el-form-item>
+					<el-form-item label="备注:" prop="remark">
+						<el-input type="textarea" placeholder="请输入" v-model="addIndexForm.remark" :rows="4" show-word-limit maxlength="500"></el-input>
+					</el-form-item>
+					<el-form-item label="目标值:" prop="target" v-if="addIndexForm.type == 1">
+						<el-input v-model="addIndexForm.target" placeholder="请输入目标值"></el-input>
+					</el-form-item>
+					<el-form-item label="量化指标单位:" prop="unit" v-if="addIndexForm.type == 1">
+						<el-input v-model="addIndexForm.unit" placeholder="请输入量化指标单位"></el-input>
+					</el-form-item>
+					<el-form-item v-if="addIndexForm.type == 1">
+						<template slot="label">
+							<span>结果值录入:</span>
+							<el-tooltip effect="dark" placement="top">
+								<template slot="content">
+									开启后,当前指标评分前需要先录入结果值。结果值用来记录考核周期内指标的实际完成情况。
+								</template>
+								<i class="el-icon-warning"></i>
+							</el-tooltip>
+						</template>
+						<el-select v-model="addIndexForm.result_type" placeholder="请选择指标类型" class="width-250">
+							<el-option label="不开启" value="none"></el-option>
+							<el-option label="被考核人" value="self"></el-option>
+							<el-option label="指定员工" value="special"></el-option>
+							<el-option label="直接管理员" value="supervisor"></el-option>
+						</el-select>
+						<div style="position: relative;margin-top: 10px;" v-if="addIndexForm.result_type == 'special'" class="width-250">
+							<el-input v-model="assignUser.name" placeholder="请选择指定员工"></el-input>
+							<div @click="addUser(1)" class="inputDc"></div>
+						</div>
+					</el-form-item>
+					<el-form-item label="权重:" prop="weight" v-if="addIndexForm.type == 2 || addIndexForm.type == 1">
+						<el-input placeholder="请输入权重(1~100)" id="input2" @input="checkCountry('input2')" v-model.number="addIndexForm.weight">
+							<template slot="append">
+								%
+							</template>
+						</el-input>
+					</el-form-item>
+					<el-form-item label="评分方式:" v-if="addIndexForm.type == 1"><el-input placeholder="直接输入分数" disabled></el-input></el-form-item>
+					<el-form-item label="管理记录人" prop="employee_ids">
+						<div class="border flex-box-ce">
+							<div class="flex-1" v-if="record_ids.length == 0">请选择记录人</div>
+							<div v-else style="width: 250px;" class="font-flex-word">
+								<span v-for="(item, index) in record_ids" :key="index">
+									<i v-if="index != 0">,</i>
+									{{ item.name }}
+								</span>
+							</div>
+							<span v-if="record_ids.length > 0" class="blue">{{ record_ids.length }}人</span>
+							<i class="el-icon-arrow-down icon-right" v-else></i>
+							<div @click="isShowRecordFun()" class="inputDc"></div>
+						</div>
+					</el-form-item>
+					<el-form-item label="开启指定评分人:" prop="isReviewer">
+						<el-switch v-model="addIndexForm.isReviewer"></el-switch>
+						<div style="position: relative;" v-if="addIndexForm.isReviewer">
+							<el-input v-model="assignScoreUser.name" placeholder="请选择评分人" class="width-250"></el-input>
+							<div @click="addUser(2)" class="inputDc"></div>
+						</div>
+					</el-form-item>
+				</el-form>
+				<div>
+					<span style="font-weight: 600;font-size: 14px;color: #606266;">按分数展示对应的评级:</span>
+					<el-select v-model="addIndexForm.index_level_id" @change="levelReadOnly" filterable clearable placeholder="请选择对应的评级">
+						<el-option v-for="item in levelOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
+					</el-select>
+				</div>
+				<ClassSet
+					v-if="addIndexForm.index_level_id != 0 && getIs"
+					ref="ClassSet"
+					:readOnly="true"
+					:inputs="inputs"
+					style="padding-top: 20px;"
+					:inputsStyle="{ paddingLeft: '0px', width: '450px' }"
+				></ClassSet>
+			</template>
+			<template slot="footer">
+				<el-button plain @click="closeAddIndexForm('saveAddIndex')">取消</el-button>
+				<el-button type="primary" @click="saveAddIndex('saveAddIndex', 1)" v-if="isSave">提交</el-button>
+				<el-button type="primary" @click="saveAddIndex('saveAddIndex', 2)" v-else>保存</el-button>
+			</template>
+		</BrawerBox>
+
+		<!-- 选择指标项 -->
+		<BrawerBox drawerTitle="选择指标项" :showDrawer.sync="isSelectIndex">
+			<template slot="main">
+				<div class="flex-box-ce">
+					<el-select v-model="cate_id" filterable placeholder="请选择或搜索分类" class="flex-2">
+						<el-option v-for="item in indexTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
+					</el-select>
+					<el-select v-model="tabIds" multiple placeholder="标签搜索" class="flex-1" style="margin-left: 10px;" v-if="tabs.length > 0">
+						<el-option v-for="item in tabs" :key="item.id" :label="item.name" :value="item.id"></el-option>
+					</el-select>
+				</div>
+				<template v-if="indexList.length > 0">
+					<div class="flex-box-ce li" style="margin-top: 20px;">
+						<el-checkbox class="flex-box-ce" style="display: flex;" v-model="isAllSelectIndex" label="全选"></el-checkbox>
+					</div>
+					<div class="infinite-list-wrapper scroll-bar">
+						<ul class="ul" v-loading="indexLoading2" v-infinite-scroll="load" infinite-scroll-disabled="disabled">
+							<li v-for="(item, index) in indexList" :key="index" class="flex-box li">
+								<el-checkbox class="flex-box-ce" style="display: flex;" v-model="item.check" :label="item.name">
+									<div>
+										<div>
+											<svg-icon v-if="item.enable_ds == 1" icon-class="menu_middle_icon" class="menu_middle_icon "></svg-icon>
+											{{ item.name }}
+										</div>
+										<div class="fontColorT" style="font-size: 12px;">{{ item.cate_name }}</div>
+									</div>
+								</el-checkbox>
+							</li>
+							<div class="fontColorF" style="text-align: center;padding: 10px 0;font-size: 12px;">没有更多了</div>
+						</ul>
+					</div>
+				</template>
+				<NoData v-else></NoData>
+			</template>
+			<template slot="footer">
+				<el-button plain @click="isSelectIndex = false">取消</el-button>
+				<el-button type="primary" :loading="indexLoading2" @click="selectCate()">确定</el-button>
+			</template>
+		</BrawerBox>
+
+		<!-- 添加维度 -->
+		<BrawerBox drawerTitle="维度设置" :showDrawer.sync="addDimensionality" :closeModal="false">
+			<template slot="main">
+				<el-form ref="detailForm" :model="dimensionalityForm" @submit.native.prevent label-width="150px" class="detailForm">
+					<el-form-item prop="name" label="维度名称:" :rules="[{ required: true, message: '维度名称不能为空' }]">
+						<el-input
+							type="textarea"
+							v-model="dimensionalityForm.name"
+							:rows="2"
+							:autofocus="false"
+							placeholder="请输入维度名称"
+							class="width-250"
+							clearable
+							maxlength="30"
+							show-word-limit
+						></el-input>
+					</el-form-item>
+					<el-form-item label="维度指标类型:">
+						<el-select v-model="dimensionalityForm.index_type" :disabled="compileWd" placeholder="请选择指标类型" class="width-250">
+							<el-option label="量化指标" :value="1"></el-option>
+							<el-option label="非量化指标" :value="2"></el-option>
+							<el-option label="额外加分项" :value="3"></el-option>
+							<el-option label="额外扣分项" :value="4"></el-option>
+						</el-select>
+					</el-form-item>
+					<el-form-item
+						label="维度权重:"
+						prop="dimension_weight"
+						:rules="[{ required: true, message: '维度权重不能为空' }]"
+						v-if="dimensionalityForm.index_type != 3 && dimensionalityForm.index_type != 4 && ruleForm.calc_dimension"
+					>
+						<el-input placeholder="请输入" v-model.number="dimensionalityForm.dimension_weight" @input="checkCountry('input')" class="width-250" id="input">
+							<el-button slot="append">%</el-button>
+						</el-input>
+					</el-form-item>
+				</el-form>
+			</template>
+			<template slot="footer">
+				<el-button plain @click="closeWd()">取消</el-button>
+				<el-button type="primary" @click="saveForm('detailForm')" v-if="compileWd">保存</el-button>
+				<el-button type="primary" @click="submitForm('detailForm')" v-else>提交</el-button>
+			</template>
+		</BrawerBox>
+		<!-- 评分人 -->
+		<EmployeeSelector
+			:multi="false"
+			:is_filtration_creator="false"
+			:selected="selected"
+			:isChecKedAll="false"
+			:visible.sync="setAdministrator"
+			@confirm="confirmAdministrator"
+		/>
+		<!-- 管理记录人 -->
+		<EmployeeSelector :is_filtration_creator="false" :selected="selected2" :visible.sync="isShowRecord" @confirm="confirmAdministrator2" />
+	</div>
+</template>
+
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import BrawerBox from '@/components/public/BrawerBox';
+import ClassSet from '@/components/public/ClassSet';
+export default {
+	components: { EmployeeSelector, BrawerBox, ClassSet },
+	name: 'Template',
+	props: {
+		data: {
+			type: Object,
+			default: {}
+		}
+	},
+	data() {
+		return {
+			inputs: [], //分值区间(只读)
+			levelOptions: [], //指标等级列表
+			loading: false,
+			compileWd: false, //编辑维度时控制是否可选择
+			dimension: true,
+			ruleForm: {
+				calc_type: 1, //指标评分计算方式 1-加和计算 2-加权计算
+				calc_dimension: 0 //是否维度权重参与计算 1-是 0-否
+			},
+			dialogVisible: false, //弹窗
+			addDimensionality: false, //显示添加维度
+			dimensionalityForm: {
+				name: '',
+				index_type: 1, //维度类型
+				dimension_weight: 100, //维度权重
+				index_num: 0, //所含指标数量
+				weight_type: '', //所含指标总权重
+				target_index: true, //制定目标时是否可以增加指标 1-可以 0-不可以
+				// all_dimension_index_weight:0,//维度内指标总权重数值
+				// total_weight:0,//所有维度所有指标总权重.
+				index: []
+			},
+			dimensionalityList: [],
+			selectItemIndex: 0, //选择的维度下标,
+			selectItemIndex_index: 0, //选择的指标下标,
+
+			indexLoading: false,
+			isSelectIndex: false, //选择指标弹窗控制
+			isAllSelectIndex: false, //是否全选指标
+			cate_id: 0,
+			indexType: 0, //指标分类
+			indexList: [],
+			indexTypeList: [],
+
+			indexLoading2: false,
+			indexPage: 1,
+			isAfterLoading: false, //是否加载完
+
+			// 添加指标
+			selected2: { employee: [], dept: [] }, //已经选择人员
+			isAddIndex: false,
+			addIndexForm: {
+				// cate_id: '', //指标分类id
+				id: 0,
+				custom: 1,
+				name: '', //指标名称
+				per_remark: '', //考核标准
+				remark: '', //备注
+				type: '', //默认1 指标种类 1-量化指标 2-非量化指标 3-额外加分项 4-额外扣分项
+				unit: '', //量化指标单位
+				target: '', //目标值
+				result_type: 'none', //(结果值录入者设置,none-不开启 self-被考核人 special-指定员工 supervisor-指定主管’
+				result_employee_id: '', //结果值录入者id, 只有result_type为special时才需要指定
+				weight: '', //权重 0-100之间
+				reviewer_id: '', //指定审批人(评分人)id
+				point_limit: '', //分数上限,只对额外加分项以及额外扣分项有用
+				// tag_ids:'',//指标id 数组或逗号分割
+				// 自定义
+				isReviewer: false, //
+				index_level_id: '', //指标等级
+				record_ids: [] //管理记录人
+			},
+			record_ids: [],
+			isShowRecord: false,
+			fromName: '考核标准:',
+			assignUser: {}, //指定人员
+			assignScoreUser: {}, //指定评分人
+			selected: { employee: [], dept: [] }, //已经选择人员
+			setAdministrator: false,
+			isUserIndex: 1, //判断选择什么人,1是指定人员,2是评分人
+			isSave: true, //判断指标是提交还是编辑
+			addIndexFormRule: {
+				name: [{ required: true, message: '请输入指标名称', trigger: 'blur' }, { min: 2, message: '最少2个字', trigger: 'blur' }],
+				per_remark: [{ required: true, message: '请输入考核标准', trigger: 'blur' }, { min: 2, message: '最少2个字', trigger: 'blur' }],
+				weight: [{ required: true, message: '请输入权重', trigger: 'blur' }]
+			},
+			ids: [], //需要过滤的指标ID
+			isTan: true,
+			sumText: {
+				num: 0,
+				val: 0
+			},
+			// 标签相关
+			tabs: [],
+			tabIds: []
+		};
+	},
+	watch: {
+		isAllSelectIndex(val) {
+			this.indexList.forEach(item => {
+				item.check = val;
+			});
+		},
+		'addIndexForm.type'(val) {
+			if (val == 3) {
+				this.fromName = '加分标准:';
+			} else if (val == 4) {
+				this.fromName = '扣分标准:';
+			} else {
+				this.fromName = '考核标准:';
+			}
+		},
+		data(val) {
+			if (val.calc_type) {
+				this.recoverData();
+			}
+		},
+		'ruleForm.calc_dimension'(val) {
+			this.dialogVisible = false;
+			if (val == 1 && this.isTan) {
+				this.dialogVisible = true;
+			}
+		},
+		cate_id() {
+			this.indexPage = 1;
+			this.isAfterLoading = false;
+			this.getIndexList();
+		},
+		isSelectIndex(val) {
+			//关闭选择指标时清空过滤的指标
+			if (!val) {
+				this.ids = [];
+				this.tabIds = [];
+				this.isAfterLoading = false;
+				this.isAllSelectIndex = false;
+				this.cate_id = 0;
+				this.indexPage = 1;
+			}
+		},
+		tabIds(val) {
+			this.indexPage = 1;
+			this.isAfterLoading = false;
+			this.isAllSelectIndex = false;
+			this.getIndexList();
+		},
+		record_ids(val) {
+			let ids = val.map(item => {
+				return item.id;
+			});
+			this.addIndexForm.record_ids = ids || '';
+		}
+	},
+	created() {
+		this.getTagList();
+		this.getIndexType();
+		this.gradeSetList();
+	},
+	computed: {
+		getIs() {
+			if (this.levelOptions.length > 0) {
+				let is = false;
+				this.levelOptions.forEach(item => {
+					if (item.id == this.addIndexForm.index_level_id) {
+						is = true;
+					}
+				});
+				return is;
+			} else {
+				return false;
+			}
+		},
+		disabled() {
+			return this.indexLoading2 || this.isAfterLoading;
+		}
+	},
+	methods: {
+		isShowRecordFun() {
+			this.selected2.employee = this.record_ids;
+			this.isShowRecord = true;
+		},
+		confirmAdministrator2(e) {
+			this.record_ids = e.employee.length > 0 ? e.employee : [];
+		},
+		load() {
+			this.indexLoading2 = true;
+			this.indexPage = this.indexPage + 1;
+			setTimeout(() => {
+				this.getIndexList();
+				this.indexLoading2 = false;
+			}, 500);
+		},
+		levelReadOnly(item) {
+			var newArr = this.levelOptions.filter(function(obj) {
+				return obj.id == item;
+			});
+			if (newArr.length > 0) {
+				this.islevel(newArr[0]);
+			}
+		},
+		islevel(levels) {
+			var inputs = [];
+			var max = 0; //最大值
+			levels.scope.forEach((item, index) => {
+				var obj;
+				if (index == 0) {
+					obj = { name: item.name, max: Number(item.value), min: 0 };
+				} else {
+					obj = { name: item.name, max: Number(item.value), min: max }; //当不是第一个等级时,最小值为上一个的最大值
+				}
+				max = item.value;
+				inputs.push(obj);
+			});
+			this.$nextTick(() => {
+				this.inputs = inputs;
+			});
+		},
+		//指标等级列表
+		gradeSetList() {
+			this.$axios('get', '/api/per/index/level/list').then(res => {
+				if (res.data.code == 1) {
+					let list = res.data.data.list;
+					this.levelOptions = list;
+				}
+			});
+		},
+		checkCountry2(str) {
+			//解决v-model与oninput同时使用失效问题
+			var dom = document.getElementById(str);
+			var value = dom.value;
+			//写你自己的输入规则
+			value = value.replace(/[^\d]/g, '');
+			dom.value = value; //输入框赋值
+			this.addIndexForm.point_limit = dom.value;
+		},
+		checkCountry(str) {
+			//解决v-model与oninput同时使用失效问题
+			var dom = document.getElementById(str);
+			var value = dom.value;
+			//写你自己的输入规则
+			value = value.replace(/[^\d]/g, '');
+			if (value > 100) {
+				str == 'input' ? (this.dimensionalityForm.dimension_weight = '') : (this.addIndexForm.weight = '');
+				this.$message.error('不能大于100');
+				return false;
+			}
+			dom.value = value; //输入框赋值
+			str == 'input' ? (this.dimensionalityForm.dimension_weight = dom.value) : (this.addIndexForm.weight = dom.value);
+		},
+		// 统计指标
+		getIndexNum(index, type) {
+			let num = this.dimensionalityList[index].index.length;
+			let val = 0;
+			if (type == 1) {
+				return num;
+			} else {
+				this.dimensionalityList[index].index.forEach(item => {
+					val += Number(item.weight);
+				});
+				return val;
+			}
+		},
+		// 统计维度
+		getNum() {
+			let num = this.dimensionalityList.length;
+			let val = 0;
+			this.dimensionalityList.forEach(item => {
+				if (item.index_type == 1 || item.index_type == 2) {
+					val += Number(item.dimension_weight);
+				}
+			});
+			this.sumText = {
+				num: num,
+				val: val
+			};
+		},
+		// 编辑时复原整个流程数据
+		recoverData() {
+			let data = this.data;
+			let employeeMap = this.$getEmployeeList();
+			this.isTan = false;
+			this.ruleForm.calc_type = data.calc_type;
+			this.ruleForm.calc_dimension = data.calc_dimension;
+			data.dimension.forEach(item => {
+				if (item.index.length > 0) {
+					item.index.forEach(item2 => {
+						item2.result_employee_name = employeeMap[item2.result_employee_id] ? employeeMap[item2.result_employee_id].name : '';
+						item2.reviewer_name = employeeMap[item2.reviewer_id] ? employeeMap[item2.reviewer_id].name : '';
+					});
+				}
+			});
+			this.dimensionalityList = data.dimension;
+			this.$nextTick(() => {
+				setTimeout(() => {
+					this.isTan = true;
+					this.getNum();
+				}, 200);
+			});
+		},
+		// 保存||编辑指标
+		saveAddIndex(formName, val) {
+			this.$refs[formName].validate(valid => {
+				if (valid) {
+					if (this.addIndexForm.result_type == 'special') {
+						if (!this.assignUser.id) {
+							this.$message.error('请选择指定人员');
+							return;
+						}
+					}
+					if (this.addIndexForm.type == 3 || this.addIndexForm.type == 4) {
+						if (this.addIndexForm.point_limit === 0) {
+							this.$message.error('分数上限不能为0');
+							return;
+						}
+					}
+					if (this.addIndexForm.type == 1 || this.addIndexForm.type == 2) {
+						if (this.addIndexForm.weight == 0) {
+							this.$message.error('权重不能为0');
+							return;
+						}
+						if (this.addIndexForm.weight > 100) {
+							this.$message.error('权重不能大于100');
+							return;
+						}
+					}
+					if (this.addIndexForm.isReviewer) {
+						if (!this.assignScoreUser.id) {
+							this.$message.error('请选择指定评分人');
+							return;
+						}
+					}
+					// console.log(this.addIndexForm)
+					var index = {
+						id: this.addIndexForm.id ? this.addIndexForm.id : 0, //对应的指标库id,0-标识为自定义添加的指标
+						custom: this.addIndexForm.custom,
+						type: this.addIndexForm.type, //指标种类 1-量化指标 2-非量化指标 3-额外加分项 4-额外扣分项
+						name: this.addIndexForm.name, //指标名
+						per_remark: this.addIndexForm.per_remark, //考核标准,加分标准,扣分标准等说明
+						remark: this.addIndexForm.remark, //指标备注
+						target: this.addIndexForm.target, //目标值
+						unit: this.addIndexForm.unit, //量化指标单位
+						point_limit: this.addIndexForm.point_limit, //分数上限,只对额外加分项以及额外扣分项有用
+						weight: this.addIndexForm.weight, //权重 0-100之间
+						result_type: this.addIndexForm.result_type, //结果值录入者设置,none-不开启 self-被考核人 special-指定员工 supervisor-指定主管)
+						index_level_id: this.addIndexForm.index_level_id, //指标等级
+						// 当录入者是指定人员时才录入
+						result_employee_id: this.addIndexForm.result_type == 'special' ? this.assignUser.id : '', //结果值录入者id,只有result_type为special时才需要指定
+						result_employee_name: this.addIndexForm.result_type == 'special' ? this.assignUser.name : '',
+
+						// 当开启了指定审批人时才录入值
+						reviewer_id: this.addIndexForm.isReviewer ? this.assignScoreUser.id : '', //指定审批人(评分人)id
+						reviewer_name: this.addIndexForm.isReviewer ? this.assignScoreUser.name : '', //指定审批人名称
+						record_ids: this.addIndexForm.record_ids.length > 0 ? this.addIndexForm.record_ids : [] //指定跟踪管理记录人 数组
+					};
+					if (val == 1) {
+						this.dimensionalityList[this.selectItemIndex].index.push(index);
+					} else {
+						this.dimensionalityList[this.selectItemIndex].index.splice(this.selectItemIndex_index, 1, index); //替换元素
+					}
+					this.closeAddIndexForm(formName);
+				}
+			});
+		},
+		// 删除维度
+		deleteItem(e, index) {
+			this.$confirm('确定删除该维度所有内容,删除后无法恢复', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			})
+				.then(() => {
+					this.dimensionalityList.splice(index, 1);
+					this.getNum();
+				})
+				.catch(() => {});
+		},
+		// 编辑维度
+		compileItem(e, index) {
+			this.selectItemIndex = index;
+			this.dimensionalityForm = JSON.parse(JSON.stringify(e));
+			this.compileWd = true;
+			this.addDimensionality = true;
+		},
+		closeAddIndexForm(formName) {
+			// 清空数据
+			// this.$nextTick(()=>{
+			//   this.$refs[formName].resetFields();
+			// })
+			this.addIndexForm = {
+				id: 0,
+				custom: 1,
+				name: '', //指标名称
+				per_remark: '', //考核标准
+				remark: '', //备注
+				type: '', //默认1 指标种类 1-量化指标 2-非量化指标 3-额外加分项 4-额外扣分项
+				unit: '', //量化指标单位
+				target: '', //目标值
+				result_type: 'none', //(结果值录入者设置,none-不开启 self-被考核人 special-指定员工 supervisor-指定主管’
+				result_employee_id: '', //结果值录入者id, 只有result_type为special时才需要指定
+				weight: 0, //权重 0-100之间
+				reviewer_id: '', //指定审批人(评分人)id
+				point_limit: '', //分数上限,只对额外加分项以及额外扣分项有用
+				// tag_ids:'',//指标id 数组或逗号分割
+				// 自定义
+				isReviewer: false, //
+				index_level_id: '',
+				record_ids: []
+			};
+			this.assignUser = {}; //指定人员
+			this.assignScoreUser = {}; //指定评分人
+			this.record_ids = [];
+			this.isSave = true;
+			this.isAddIndex = false;
+		},
+		//添加指标
+		addIndex(e, index) {
+			this.selectItemIndex = index;
+			this.addIndexForm.type = e.index_type;
+			this.isAddIndex = true;
+		},
+		//选择指标
+		selectIndex(e, index) {
+			this.selectItemIndex = index;
+			this.indexType = e.index_type;
+			this.ids = e.index.map(item => {
+				//过滤已经选择的指标
+				return item.id;
+			});
+			// console.log(this.ids);
+			this.indexLoading = true;
+			this.getIndexList(() => {
+				this.indexLoading = false;
+				this.isSelectIndex = true;
+			});
+		},
+		//删除指标
+		deleteIndex(e, index) {
+			this.$confirm('确定删除该指标', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			})
+				.then(() => {
+					this.dimensionalityList[index].index.splice(e.$index, 1);
+				})
+				.catch(() => {});
+		},
+		//编辑指标
+		compileIndex(e, index) {
+			this.selectItemIndex = index;
+			this.selectItemIndex_index = e.$index;
+			let obj = e.row;
+			this.addIndexForm = {
+				id: obj.id,
+				custom: obj.custom,
+				name: obj.name, //指标名称
+				per_remark: obj.per_remark, //考核标准
+				remark: obj.remark, //备注
+				type: obj.type, //默认1 指标种类 1-量化指标 2-非量化指标 3-额外加分项 4-额外扣分项
+				unit: obj.unit, //量化指标单位
+				target: obj.target, //目标值
+				result_type: obj.result_type, //(结果值录入者设置,none-不开启 self-被考核人 special-指定员工 supervisor-指定主管’
+				result_employee_id: obj.result_employee_id, //结果值录入者id, 只有result_type为special时才需要指定
+				weight: obj.weight, //权重 0-100之间
+				reviewer_id: obj.reviewer_id, //指定审批人(评分人)id
+				point_limit: obj.point_limit, //分数上限,只对额外加分项以及额外扣分项有用
+				index_level_id: obj.index_level_id ? obj.index_level_id : '',
+				// 自定义
+				isReviewer: obj.reviewer_id ? true : false, //是否显示指定审批人
+
+				record_ids: obj.record_ids ? obj.record_ids : []
+			};
+			if (obj.index_level_id && obj.index_level_id > 0 && obj.index_level_id != '') {
+				this.levelReadOnly(obj.index_level_id);
+			}
+			let employeeMap = this.$getEmployeeList();
+			// 管理记录
+			if (obj.record_ids) {
+				this.record_ids = obj.record_ids.map(e => {
+					let user = employeeMap[e];
+					return user;
+				});
+			}
+			if (obj.result_employee_id) {
+				this.assignUser = {
+					name: employeeMap[obj.result_employee_id].name,
+					id: employeeMap[obj.result_employee_id].id
+				};
+			}
+			if (obj.reviewer_id) {
+				this.assignScoreUser = {
+					name: employeeMap[obj.reviewer_id].name,
+					id: employeeMap[obj.reviewer_id].id
+				};
+			}
+			this.isSave = false;
+			this.isAddIndex = true;
+		},
+		//保存人员
+		confirmAdministrator(e) {
+			if (this.isUserIndex == 1) {
+				this.assignUser = e.employee.length > 0 ? e.employee[0] : [];
+			} else {
+				this.assignScoreUser = e.employee.length > 0 ? e.employee[0] : [];
+			}
+			this.setAdministrator = false;
+		},
+		//筛选指标分类
+		selectCate() {
+			let indexList = JSON.parse(JSON.stringify(this.indexList));
+			let arr = [];
+			indexList.forEach(item => {
+				if (item.check) {
+					if (item.type == 3 || item.type == 4) {
+						if (item.point_limit == 0) {
+							item.point_limit = '';
+						}
+					}
+					arr.push(item);
+				}
+			});
+			this.dimensionalityList[this.selectItemIndex].index.push(...arr);
+			this.isSelectIndex = false;
+		},
+		//选择人员
+		addUser(index) {
+			if (index == 1) {
+				this.selected.employee = this.assignUser.name ? [this.assignUser] : [];
+			} else {
+				this.selected.employee = this.assignScoreUser.name ? [this.assignScoreUser] : [];
+			}
+			this.isUserIndex = index;
+			this.setAdministrator = true;
+		},
+		//获取指标分类
+		getIndexType() {
+			this.$axios('get', 'api/per/index/cate/list', { page: 0 }).then(res => {
+				let data = res.data.data.list;
+				let indexTypeList = [{ label: '全部', value: 0 }];
+				data.forEach(item => {
+					indexTypeList.push({ label: item.name, value: item.id });
+				});
+				this.indexTypeList = indexTypeList;
+			});
+		},
+		//获取指标
+		getIndexList(fun = function() {}) {
+			let employeeMap = this.$getEmployeeList();
+			this.$axios('get', '/api/per/index/list', {
+				type: this.indexType,
+				cate_id: this.cate_id,
+				page: this.indexPage,
+				page_size: 30,
+				tag_ids: JSON.stringify(this.tabIds)
+			}).then(res => {
+				let list = res.data.data.list || [];
+				let indexList = [];
+				list.forEach(item => {
+					if (this.ids.indexOf(item.id) < 0) {
+						//过滤已经选择的指标
+						item.check = false;
+						item.result_employee_name = employeeMap[item.result_employee_id] ? employeeMap[item.result_employee_id].name : '';
+						item.reviewer_name = employeeMap[item.reviewer_id] ? employeeMap[item.reviewer_id].name : '';
+						item.custom = 0;
+						indexList.push(item);
+					}
+				});
+				if (list.length != 30) {
+					this.isAfterLoading = true;
+				}
+				if (this.indexPage === 1) {
+					this.indexList = indexList;
+				} else {
+					this.indexList = this.indexList.concat(indexList);
+				}
+				fun();
+			});
+		},
+		//关闭维度
+		closeWd() {
+			this.dimensionalityForm = {
+				name: '',
+				index_type: 1, //维度类型
+				dimension_weight: 100, //维度权重
+				index_num: 0, //所含指标数量
+				weight_type: 0, //所含指标总权重
+				target_index: true, //制定目标时是否可以增加指标 1-可以 0-不可以
+				index: []
+			};
+			this.$nextTick(() => {
+				//消除form自动触发验证的问题
+				this.$refs.detailForm.clearValidate();
+			});
+			this.getNum();
+			this.compileWd = false;
+			this.addDimensionality = false;
+		},
+		//保存维度
+		saveForm(formName) {
+			this.$refs[formName].validate(valid => {
+				if (valid) {
+					let isName = true;
+					if (this.dimensionalityList[this.selectItemIndex].name != this.dimensionalityForm.name) {
+						//排除修改本身名称的情况
+						this.dimensionalityList.some(item => {
+							if (item.name == this.dimensionalityForm.name) {
+								isName = false;
+								return true;
+							}
+						});
+					}
+					if (!isName) {
+						this.$message.error('维度名称不能重复');
+						return false;
+					}
+					if (this.ruleForm.calc_dimension && (this.dimensionalityForm.index_type == 1 || this.dimensionalityForm.index_type == 2)) {
+						if (this.dimensionalityForm.dimension_weight == 0) {
+							this.$message.error('权重不能为0');
+							return;
+						}
+					}
+					if (this.dimensionalityForm.dimension_weight > 100) {
+						this.$message.error('权重不能大于100');
+						return;
+					}
+					this.dimensionalityList[this.selectItemIndex] = this.dimensionalityForm;
+					this.$nextTick(() => {
+						this.closeWd();
+					});
+				} else {
+					console.log('error submit!!');
+					return false;
+				}
+			});
+		},
+		//获取标签列表
+		getTagList() {
+			this.$axios('get', '/api/per/index/tag').then(res => {
+				this.tabs = res.data.data.list || [];
+			});
+		},
+		// 添加维度
+		submitForm(formName) {
+			this.$refs[formName].validate(valid => {
+				if (valid) {
+					let isName = true;
+					this.dimensionalityList.some(item => {
+						if (item.name == this.dimensionalityForm.name) {
+							isName = false;
+							return true;
+						}
+					});
+					if (!isName) {
+						this.$message.error('维度名称不能重复');
+						return false;
+					}
+					if (this.ruleForm.calc_dimension && (this.dimensionalityForm.index_type == 1 || this.dimensionalityForm.index_type == 2)) {
+						if (this.dimensionalityForm.dimension_weight == 0) {
+							this.$message.error('权重不能为0');
+							return;
+						}
+					}
+					if (this.dimensionalityForm.dimension_weight > 100) {
+						this.$message.error('权重不能大于100');
+						return;
+					}
+					this.dimensionalityList.push(this.dimensionalityForm);
+					this.$nextTick(() => {
+						this.closeWd();
+					});
+				} else {
+					console.log('error submit!!');
+					return false;
+				}
+			});
+		}
+	}
+};
+</script>
+<style scoped="scoped">
+.border {
+	-webkit-appearance: none;
+	background-color: #fff;
+	background-image: none;
+	border-radius: 4px;
+	border: 1px solid #dcdfe6;
+	-webkit-box-sizing: border-box;
+	box-sizing: border-box;
+	color: #c0c4cf;
+	font-size: inherit;
+	height: auto;
+	outline: 0;
+	padding: 0 15px;
+	width: 330px;
+	position: relative;
+	cursor: pointer;
+}
+.border .font-flex-word {
+	color: #606266;
+}
+.infinite-list-wrapper {
+	height: calc(100vh - 270px);
+	overflow: auto;
+	overflow-x: hidden;
+}
+.pop-up {
+	position: sticky;
+	top: 0px;
+	z-index: 999;
+	background-color: #fff;
+	padding: 10px 0;
+}
+.diy-tip {
+	margin-bottom: 15px;
+	border: 1px solid #e6a23c;
+	padding: 20px 16px;
+	background-color: #fdf6ec;
+	p {
+		color: #e6a23c !important;
+		font-size: 15px;
+		margin: 0 !important;
+		padding-bottom: 4px;
+	}
+}
+::v-deep .el-dialog__header {
+	padding: 20px;
+	border-bottom: 1px solid #ebebeb;
+}
+::v-deep .el-dialog__body {
+	padding: 20px;
+	padding-top: 0px;
+}
+.all {
+	font-size: 14px;
+	padding: 20px 0;
+}
+.title {
+	font-size: 16px;
+	font-weight: 500;
+	margin-bottom: 15px;
+	position: relative;
+	left: -15px;
+}
+.title::after {
+	content: ' ';
+	position: absolute;
+	width: 2px;
+	height: 18px;
+	background-color: #26a2ff;
+	left: -5px;
+	top: 2px;
+}
+.popover-img {
+	width: 100%;
+	height: 200px;
+}
+.el-icon-warning {
+	color: #ccc;
+}
+.inputDc {
+	position: absolute;
+	top: 0;
+	right: 0;
+	left: 0;
+	bottom: 0;
+	z-index: 9;
+	cursor: pointer;
+}
+.inputDc1 {
+	position: absolute;
+	top: 0;
+	left: 85px;
+	bottom: 0;
+	z-index: 9;
+}
+.inputDc2 {
+	position: absolute;
+	top: 0;
+	left: 195px;
+	bottom: 0;
+	z-index: 9;
+}
+.content {
+	/* background-color: #f9fdff; */
+	padding: 15px;
+	margin-bottom: 20px;
+	/* border: 1px solid #ecf5ff; */
+	border-radius: 4px;
+}
+.message {
+	background-color: #ecf5ff;
+	height: 100px;
+	border-radius: 5px;
+}
+.message-text {
+	font-size: 16px;
+	color: #222;
+	margin-bottom: 8px;
+}
+.blue {
+	cursor: pointer;
+	padding: 0 5px;
+}
+.width-250 {
+	width: 250px;
+}
+.wd-header {
+	background-color: #ecf5ff;
+}
+.wd-header i {
+	font-size: 24px;
+	margin-left: 10px;
+	cursor: pointer;
+	color: #888888;
+}
+.wds {
+	border: 1px solid #ebebeb;
+	margin-top: 20px;
+}
+.wd-title {
+	padding: 12px 20px;
+	/* border-bottom: 1px solid #ebebeb; */
+	color: #777777;
+}
+.wd-footer {
+	padding: 12px 20px;
+}
+.titles div {
+	padding-right: 12px;
+	margin-right: 12px;
+	border-right: 1px solid #ccc;
+}
+/* .titles div:last-child {
+  border-right: none;
+} */
+.el-icon-edit:hover {
+	color: #26a2ff;
+}
+.el-icon-delete-solid:hover {
+	color: #f56c6c;
+}
+.ul {
+	margin: 20px 0;
+	margin-top: 0;
+}
+.li {
+	border-bottom: 1px solid #ebebeb;
+}
+.li .flex-box-ce {
+	padding: 15px 0;
+}
+.li:hover {
+	background-color: #f5f7fa;
+}
+::v-deep .el-textarea__inner::-webkit-scrollbar {
+	width: 6px;
+	height: 4px;
+}
+/*外层轨道。可以用display:none让其不显示,也可以添加背景图片,颜色改变显示效果*/
+::v-deep .el-textarea__inner::-webkit-scrollbar-track {
+	width: 6px;
+	background-color: #fff0;
+	-webkit-border-radius: 2em;
+	-moz-border-radius: 2em;
+	border-radius: 2em;
+}
+/*滚动条的设置*/
+::v-deep .el-textarea__inner::-webkit-scrollbar-thumb {
+	background-color: #fff0;
+	background-clip: padding-box;
+	-webkit-border-radius: 2em;
+	-moz-border-radius: 2em;
+	border-radius: 2em;
+}
+/*滚动条移上去的背景*/
+::v-deep .el-textarea__inner:hover::-webkit-scrollbar-thumb {
+	background-color: rgba(144, 147, 153, 0.3);
+	height: 20px;
+}
+</style>

+ 0 - 777
src/components/examinePopup.vue

@@ -1,777 +0,0 @@
-<template>
-	<div>
-		<el-drawer :title="title" :visible.sync="show" :with-header="false" :size="'600px'" :before-close="closeDetail" direction="rtl">
-			<div class="drawer_title">审批详情</div>
-			<div v-loading="detail_loading" style="height: 100%;">
-				<div class="detail_popup" v-if="detail_info !== null">
-					<el-row :gutter="10" style="padding-bottom:20px;border-bottom:1px #f8f8f8 solid;position: relative;">
-						<el-col :span="24">
-							<template>
-								<userImage class="fl" :user_name="detail_info.employee_name" :img_url="detail_info.employee_img" width="50px" height="50px"></userImage>
-							</template>
-							<template>
-								<div class="flex-box flex-v-ce">
-									<span style="line-height:50px; margin-left:10px;margin-right:10px;">{{ detail_info.employee_name }}</span>
-									<span class="point" v-if="detail_info.status == 1">
-										<span class="red" v-if="detail_info.review_point > 0">+{{ detail_info.review_point }}</span>
-										<span v-else class="green">{{ detail_info.review_point }}</span>
-										<span style="margin-left: 5px;">{{ $getTypsName(detail_info.pt_id) }}</span>
-									</span>
-									<div style="margin-left: 5px;">
-										<span v-if="detail_info.status == 1" class="green">审批通过</span>
-										<span v-else-if="detail_info.status == 2" class="red">审批驳回</span>
-										<span v-else-if="detail_info.status == 0" class="yellow">待审批</span>
-										<span v-else></span>
-									</div>
-								</div>
-							</template>
-						</el-col>
-					</el-row>
-					<el-row :gutter="10" v-if="detail_info.pt_id">
-						<el-col :span="4">积分类型</el-col>
-						<el-col :span="20" class="blue">{{ detail_info.pt_id == 3 ? 'B分' : detail_info.pt_id == 2 ? 'A分' : detail_info.pt_id == 1 ? '绩效分' : '' }}</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 == '附件' || item.key == '完成附件' || 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 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.item_name != ''">
-						<p class="row_title">
-							规则依据 &nbsp;
-							<span class="row_tips" style="font-size:12px;color:#909399">此事件打分参考以下积分规则</span>
-						</p>
-						<el-row>
-							<el-col :span="4">事件分类</el-col>
-							<el-col :span="20">{{ detail_info.rule_name }}</el-col>
-						</el-row>
-						<el-row>
-							<el-col :span="4">积分规则</el-col>
-							<el-col :span="20">{{ detail_info.item_name }}</el-col>
-						</el-row>
-						<el-row>
-							<el-col :span="4">规则积分</el-col>
-							<el-col :span="20">
-								<template v-if="detail_info.item_range_type == 1">
-									<span v-if="detail_info.item_max_point > 0">+</span>
-									{{ detail_info.item_max_point }}{{ detail_info.pt_id == 3 ? 'B分' : detail_info.pt_id == 2 ? 'A分' : detail_info.pt_id == 1 ? '绩效分' : '' }}
-								</template>
-								<template v-else>
-									{{ detail_info.item_min_point }}~{{ detail_info.item_max_point
-									}}{{ detail_info.pt_id == 3 ? 'B分' : detail_info.pt_id == 2 ? 'A分' : detail_info.pt_id == 1 ? '绩效分' : '' }}
-								</template>
-							</el-col>
-						</el-row>
-					</div>
-
-					<div v-show="detail_info.process"><Steps :process="detail_info.process"></Steps></div>
-				</div>
-
-				<div class="detailBut">
-					<div style="text-align: right;padding-top:20px" v-if="detail_info.status == 0 && detail_info.reviewer_id == $getUserData().id">
-						<el-button v-if="detail_info.pt_id == 1" @click="closeDetail">取消</el-button>
-						<el-button v-else @click="rejectBtn">驳回</el-button>
-						<el-button type="primary" @click="adoptBtn">通过</el-button>
-					</div>
-					<div style="text-align: right;padding-top:20px" v-if="detail_info.can_refuse == '1'">
-						<span style="color:#909399;font-size:12px;padding-right:20px">撤回后需重新审批</span>
-						<el-button type="primary" @click="revokeApproval">撤回审批</el-button>
-					</div>
-				</div>
-			</div>
-		</el-drawer>
-
-		<el-dialog title="	" :visible.sync="rejectShow" :before-close="rejectClose" width="520px">
-			<el-form :model="rejectForm" ref="rejectForm" label-width="80px" v-loading="rejectLoading">
-				<el-form-item
-					label="审批意见"
-					prop="remark"
-					:rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }, { min: 3, max: 50, message: '长度在 3 到 50 个字符', trigger: 'blur' }]"
-				>
-					<el-input type="textarea" :rows="4" v-model="rejectForm.remark" placeholder="请输入审批意见(限50字)"></el-input>
-				</el-form-item>
-				<el-form-item style="text-align: right; margin-bottom: 0">
-					<el-button @click="cancelReject('rejectForm')">取消</el-button>
-					<el-button type="primary" @click="confirmReject('rejectForm')">确认驳回</el-button>
-				</el-form-item>
-			</el-form>
-		</el-dialog>
-
-		<el-dialog title="审批通过" :visible.sync="adoptShow" width="571px" :before-close="adoptClose">
-			<el-form :model="adoptForm" ref="adoptForm" label-width="80px" v-loading="determinedBy">
-				<template v-if="detail_info.source_type != 4">
-					<el-form-item label="指定规则" v-if="!detail_info.rule_id && !detail_info.item_id"><el-switch v-model="adoptForm.ruleOrItem"></el-switch></el-form-item>
-					<el-form-item
-						label="分类"
-						v-show="(detail_info.rule_id && !detail_info.item_id) || !adoptForm.ruleOrItem"
-						prop="rule_id"
-						:rules="[{ required: true, message: '请选择规则分类', trigger: 'blur' }]"
-					>
-						<el-cascader
-							:disabled="guol(detail_info)"
-							class="date-picker-width"
-							v-model="adoptForm.rule_id"
-							:options="ruleTrees"
-							:props="{ value: 'id', label: 'name', children: 'child' }"
-							@change="ruleChange"
-							ref="rule"
-							clearable
-							filterable
-							change-on-select
-							placeholder="请选择规则分类"
-						></el-cascader>
-					</el-form-item>
-					<el-form-item label="规则内容" v-if="(detail_info.rule_id && detail_info.item_name) || (detail_info.item_id && detail_info.item_name)">
-						<span>{{ detail_info.item_name }}</span>
-					</el-form-item>
-					<el-form-item
-						label="规则"
-						v-show="(detail_info.rule_id && detail_info.item) || adoptForm.ruleOrItem"
-						prop="item_id"
-						:rules="[{ required: true, message: '请选择规则细则', trigger: 'blur' }]"
-					>
-						<el-cascader
-							:disabled="guol(detail_info)"
-							:popper-class="'itemClass'"
-							v-model="adoptForm.item_id"
-							:options="item_list"
-							:props="{ value: 'id', label: 'name', children: 'child' }"
-							ref="ruleItem"
-							clearable
-							filterable
-							:show-all-levels="false"
-							@change="cascaderItemIdChange"
-							placeholder="请选择规则细则"
-						></el-cascader>
-					</el-form-item>
-				</template>
-				<el-form-item label="规则积分" v-show="detail_info.item_id">
-					{{
-						detail_info.item_range_type == 1
-							? detail_info.item_min_point
-							: detail_info.item_range_type == -1
-							? detail_info.item_min_point
-							: detail_info.item_min_point + '~' + detail_info.item_max_point
-					}}{{ detail_info.pt_id == 3 ? 'B分' : detail_info.pt_id == 2 ? 'A分' : detail_info.pt_id == 1 ? '绩效分' : '' }}
-				</el-form-item>
-
-				<el-form-item label="" v-if="rangeType.rule_rangeType_pt_id == 2 || rangeType.rule_rangeType_pt_id == 3">
-					<div style="line-height: 24px;">
-						{{ rangeType.rule_min_point == rangeType.rule_max_point ? rangeType.rule_min_point : rangeType.rule_min_point + '~' + rangeType.rule_max_point }}
-						<span class="blue" style="margin-left: 5px;">{{ rangeType.rule_rangeType_pt_id == 3 ? 'B分' : 'A分' }}</span>
-					</div>
-					<div style="line-height: 24px;">{{ rangeType.rule_rangeType_name }}</div>
-				</el-form-item>
-				<el-form-item label="审批积分">
-					<el-col :span="10">
-						<el-input-number
-							v-if="detail_info.item_range_type == 2"
-							:min="detail_info.item_min_point"
-							:max="detail_info.item_max_point"
-							v-model="adoptForm.point"
-							type="number"
-						></el-input-number>
-						<el-input-number
-							v-else-if="detail_info.item_range_type == 1"
-							:disabled="detail_info.item_range_type == 1"
-							v-model="adoptForm.point"
-							placeholder="请输入分值"
-						></el-input-number>
-						<div v-else>
-							<el-input-number
-								v-if="rangeType.rule_range_type == 2"
-								:disabled="forbiddenInputNum"
-								:min="rangeType.rule_min_point"
-								:max="rangeType.rule_max_point"
-								v-model="adoptForm.point"
-								placeholder="请输入分值"
-							></el-input-number>
-							<el-input-number v-else :disabled="forbiddenInputNum" v-model="adoptForm.point" placeholder="请输入分值"></el-input-number>
-						</div>
-					</el-col>
-				</el-form-item>
-				<el-form-item
-					v-if="detail_info.source_type == 4"
-					label="审批意见"
-					prop="remark"
-					:rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }, { max: 100, message: '长度不能超过 100 个字符', trigger: 'blur' }]"
-				>
-					<el-input :rows="4" type="textarea" v-model="adoptForm.remark" placeholder="说点什么(限100字)"></el-input>
-				</el-form-item>
-				<div style="padding-left: 80px">奖票用于优秀表现和重要事项的表彰</div>
-				<el-form-item label="发放奖票"><el-switch v-model="adoptForm.switch"></el-switch></el-form-item>
-				<el-form-item label="递交审批" v-if="$getUserData().is_creator == 0">
-					<el-row>
-						<el-col :span="18">
-							<el-input auto-complete="off" v-model="manager" placeholder="请选择上级递交审批"></el-input>
-							<div @click="show_employee_selector = true" style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"></div>
-						</el-col>
-					</el-row>
-
-					<el-dialog title="选择人员" width="640px" :visible.sync="show_employee_selector" append-to-body :before-close="handleClose">
-						<EmployeeSelector
-							:can_select_employee="true"
-							v-if="show_employee_selector"
-							ref="approval"
-							:multi="false"
-							:employee_list="employee_lists"
-							:isCreatorSelect="true"
-							:user_no_select="false"
-							:selected="manager_selected"
-							@confirm="employee_confirm"
-						/>
-						<span slot="footer" class="dialog-footer">
-							<el-button @click="show_employee_selector = false">取 消</el-button>
-							<el-button type="primary" @click="submitApproval('approval')">确 定</el-button>
-						</span>
-					</el-dialog>
-				</el-form-item>
-				<el-form-item v-if="detail_info.source_type != 4" label="审批意见" prop="remark" :rules="[{ max: 100, message: '长度不能超过 100 个字符', trigger: 'blur' }]">
-					<el-input :rows="4" type="textarea" v-model="adoptForm.remark" placeholder="说点什么(限100字)"></el-input>
-				</el-form-item>
-
-				<el-form-item>
-					<el-button @click="adoptClose">取 消</el-button>
-					<el-button type="primary" @click="submitAdopt('adoptForm')">确定通过</el-button>
-				</el-form-item>
-			</el-form>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-import EmployeeSelector from '@/components/EmployeeSelector';
-import Steps from '@/components/Steps';
-export default {
-	name: 'examinePopup',
-	data() {
-		return {
-			employee_lists: [],
-			itemParticulars: false,
-			rangeType: {
-				rule_range_type: 0,
-				rule_min_point: 0,
-				rule_max_point: 0,
-				rule_rangeType_pt_id: 0,
-				rule_rangeType_name: ''
-			},
-			itemMaxPoint: 1,
-			forbiddenInputNum: false,
-			determinedBy: false, //确定通过loading
-			rejectLoading: false, //驳回loading
-			detail_id: null,
-			detail_loading: false,
-			detailShow: false,
-			detail_info: {
-				rule_id: ''
-			},
-			rejectShow: false,
-			adoptShow: false,
-			rejectForm: {
-				remark: ''
-			},
-			adoptForm: {
-				ruleOrItem: false,
-				rule_id: null,
-				item_id: 0,
-				showPoint: null,
-				point: null,
-				switch: false,
-				remark: ''
-			},
-			// 规则 or 细则
-			ruleTrees: null,
-			item_list: null,
-			// 奖扣积分数组
-			awardPointsArray: [{ name: '奖分', value: 1 }, { name: '扣分', value: 2 }],
-			awardPoints: 1,
-
-			// 下一个审批人
-			manager: '',
-			employee_not_select: [],
-			manager_selected: { dept: [], employee: [] },
-			show_employee_selector: false,
-			flatteningIntegralRules: {}
-		};
-	},
-	props: {
-		id: {
-			type: Number,
-			default: 0
-		},
-		show: {
-			type: Boolean,
-			default: false
-		},
-		title: {
-			type: String,
-			default: ''
-		}
-	},
-	watch: {
-		id(val) {
-			this.detail_id = val;
-		},
-		show(val) {
-			if (val) {
-				this.detail_info = { rule_id: '' };
-				this.getDetail();
-			}
-		},
-		'adoptForm.ruleOrItem'(val) {
-			if (val) {
-				this.adoptForm.rule_id = 0;
-			} else {
-				this.rangeType = {
-					rule_range_type: 0,
-					rule_min_point: 0,
-					rule_max_point: 0,
-					rule_rangeType_pt_id: 0,
-					rule_rangeType_name: ''
-				};
-				this.forbiddenInputNum = false;
-				this.adoptForm.item_id = 0;
-			}
-		}
-	},
-	components: { EmployeeSelector, Steps },
-	mounted() {
-		this.getRuleItem();
-		this.getRuleItemTree();
-		this.employee_lists = this.$getUserData().employee_detail.superior_list;
-	},
-	methods: {
-		guol(data) {
-			if (data.rule_id || data.item_id) {
-				return true;
-			} else {
-				return false;
-			}
-		},
-		submitApproval(name) {
-			this.$refs[name].confirm(); //调用组件的confirm();
-		},
-		//关闭
-		handleClose(done) {
-			done();
-		},
-		cascaderItemIdChange(val) {
-			if (val.length > 0) {
-				let datas = null;
-				this.flatteningIntegralRules.forEach(element => {
-					if (element.id == val[val.length - 1]) {
-						datas = { ...element };
-					}
-				});
-				console.log(datas);
-				// return
-				// let datas = this.$refs['ruleItem'].getCheckedNodes()[0].data;
-				if (datas.range_type == 1) {
-					this.forbiddenInputNum = true;
-				} else {
-					this.forbiddenInputNum = false;
-				}
-				this.rangeType.rule_range_type = datas.range_type;
-				this.rangeType.rule_min_point = datas.min_point;
-				this.rangeType.rule_max_point = datas.max_point;
-				this.rangeType.rule_rangeType_pt_id = datas.pt_id;
-				this.rangeType.rule_rangeType_name = datas.name;
-				this.adoptForm.point = datas.min_point;
-				this.adoptForm.rule_id = datas.rule_id;
-			} else {
-				this.rangeType = {
-					rule_range_type: 0,
-					rule_min_point: 0,
-					rule_max_point: 0,
-					rule_rangeType_pt_id: 0,
-					rule_rangeType_name: ''
-				};
-				this.adoptForm.point = '';
-				this.forbiddenInputNum = false;
-				this.adoptForm.item_id = 0;
-			}
-		},
-		//审批撤销
-		revokeApproval() {
-			this.$confirm('确定要撤回此项吗?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
-				type: 'warning'
-			}).then(() => {
-				this.detail_loading = true;
-				this.$axios('post', '/api/integral/review/destroy', { review_id: this.detail_id })
-					.then(res => {
-						if (res.data.code == 1) {
-							this.$message.success(res.data.msg);
-							this.closeDetail(); //关闭抽屉
-							this.$parent.getSpList(); //刷新列表
-						}
-					})
-					.finally(() => {
-						this.detail_loading = false;
-					});
-			});
-		},
-		// 选择规则分类关闭down
-		ruleChange(val) {
-			if (val.length == 0) {
-				this.adoptForm.rule_id = 0;
-			} else {
-				this.adoptForm.rule_id = val[val.length - 1];
-			}
-			this.$nextTick(() => {
-				this.$refs.rule.dropDownVisible = false;
-			});
-		},
-		// 选择规则细则
-		itemChange(val) {
-			if (val.length == 0) {
-				this.adoptForm.item_id = 0;
-			} else {
-				this.adoptForm.item_id = val[val.length - 1];
-			}
-			this.$nextTick(() => {
-				this.$refs.ruleItem.dropDownVisible = false;
-			});
-		},
-		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;
-		},
-		// 获取规则细则树
-		getRuleItemTree() {
-			let self = this;
-			let params = {
-				pt_id: this.detail_info.pt_id,
-				cycle_type: '1'
-			};
-			this.$axios('get', '/api/integral/rule/trees', params, 'v2').then(res => {
-				if (res.data.code == 1) {
-					self.item_list = res.data.data.tree;
-					this.flatteningIntegralRules = this.getItemDetail(self.item_list);
-				} else {
-					self.$message.error(res.data.data.msg);
-				}
-			});
-		},
-		// 获取规则分类规则细则信息
-		getRuleItem() {
-			let self = this;
-			let params = {
-				cycle_type: 1
-			};
-			this.$axios('get', '/api/integral/rule/trees', params).then(res => {
-				if (res.data.code == 1) {
-					self.ruleTrees = this.getTreeData(res.data.data.rule_tree);
-				} else {
-					self.$message.error(res.data.data.msg);
-				}
-			});
-		},
-		// 打开详情
-		getDetail() {
-			let self = this;
-			let params = {
-				review_id: self.detail_id
-			};
-			self.detailShow = true;
-			self.detail_loading = true;
-			this.$axios('get', '/api/integral/review', params)
-				.then(res => {
-					if (res.data.code == 1) {
-						self.detail_info = res.data.data;
-						self.detail_info.rule_id ? (self.adoptForm.rule_id = self.detail_info.rule_id) : '';
-						if (res.data.data.item_id) {
-							self.adoptForm.item_id = self.detail_info.item_id;
-							self.adoptForm.showPoint = self.detail_info.point;
-							self.detail_info.point > 0 ? (self.awardPoints = 1) : (self.awardPoints = 2);
-							// self.adoptForm.point = Math.abs(self.detail_info.point);
-							self.adoptForm.point = self.detail_info.point;
-						}
-					}
-				})
-				.finally(e => {
-					self.detail_loading = false;
-				});
-		},
-		// 关闭抽屉
-		closeDetail() {
-			this.$emit('update:show', false);
-		},
-		// 驳回按钮
-		rejectBtn() {
-			this.rejectShow = true;
-		},
-		// 关闭驳回弹窗
-		rejectClose() {
-			this.rejectShow = false;
-			this.$refs['rejectForm'].resetFields();
-		},
-		// 确定驳回
-		confirmReject(formName) {
-			let self = this;
-			self.$refs[formName].validate(valid => {
-				if (valid) {
-					let data = {
-						review_id: self.detail_id,
-						action: 'refuse',
-						ticket_count: '0',
-						remark: self.rejectForm.remark
-					};
-					this.rejectLoading = true;
-					this.$axios('post', '/api/integral/review', data)
-						.then(res => {
-							if (res.data.code == 1) {
-								self.rejectShow = false;
-								self.detail_info.status = 2;
-								self.$message.success(res.data.msg);
-								self.rejectClose(); //关闭驳回弹窗
-								self.closeDetail(); //关闭抽屉
-								self.$parent.getSpList(); //刷新列表
-							}
-						})
-						.finally(e => {
-							setTimeout(() => {
-								//延迟关闭,防止重复点击
-								self.rejectLoading = false;
-							}, 200);
-						});
-				}
-			});
-		},
-		// 取消驳回
-		cancelReject(formName) {
-			this.rejectShow = false;
-			this.$refs[formName].resetFields();
-		},
-		// 通过按钮
-		adoptBtn() {
-			// if (this.detail_info.item_range_type == 1) {
-			// 	this.adoptForm.point = Math.abs(this.detail_info.point);
-			// } else {
-			// 	this.adoptForm.point = this.detail_info.point;
-			// }
-			this.adoptForm.point = this.detail_info.point;
-			this.detail_info.point > 0 ? (this.awardPoints = 1) : (this.awardPoints = 2);
-			this.adoptForm.rule_id = this.detail_info.rule_id;
-			this.adoptForm.item_id = this.detail_info.item_id;
-			if (this.detail_info.rule_id == 0 && this.detail_info.item_id == 0 && this.detail_info.pt_id != 1) {
-				//没有  规则分类 与 规则细则 与 不是绩效任务时,才请求规则细则(减少请求)
-				this.getRuleItemTree();
-			}
-			this.adoptShow = true;
-
-			this.rangeType = {
-				rule_range_type: 0,
-				rule_min_point: 0,
-				rule_max_point: 0,
-				rule_rangeType_pt_id: 0,
-				rule_rangeType_name: ''
-			};
-		},
-		// 递归判断列表,把最后的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;
-		},
-		// 下一个审批人
-		employee_confirm(data) {
-			this.manager_selected = { dept: [], employee: [] };
-			this.adoptForm.reviewer_id = '';
-			this.manager = '';
-			if (data.employee !== null && data.employee.length != 0) {
-				this.manager_selected.employee = data.employee;
-				this.adoptForm.reviewer_id = data.employee[0].id;
-				this.manager = data.employee[0].name;
-			}
-			this.show_employee_selector = false;
-		},
-		// 关闭通过弹窗
-		adoptClose() {
-			this.adoptForm.rule_id = 0;
-			this.adoptForm.item_id = 0;
-			this.forbiddenInputNum = false;
-			this.adoptForm.reviewer_id = 0;
-			this.adoptShow = false;
-			this.manager = ''; //清空递交审批
-			this.manager_selected = { dept: [], employee: [] }; //清空递交审批
-			this.adoptForm.remark = '';
-			this.adoptForm.switch = false;
-		},
-		// 确定通过
-		submitAdopt(formName) {
-			let self = this;
-			self.$refs[formName].validate(valid => {
-				if (valid) {
-					let data = {
-						review_id: self.detail_id,
-						action: 'complete',
-						rule_id: self.adoptForm.rule_id,
-						item_id: 0,
-						point: self.adoptForm.point,
-						reviewer_id: '',
-						remark: self.adoptForm.remark,
-						ticket_count: 0
-					};
-					self.adoptForm.item_id ? (data.item_id = self.adoptForm.item_id) : (data.item_id = 0);
-					self.adoptForm.reviewer_id ? (data.reviewer_id = self.adoptForm.reviewer_id) : (data.reviewer_id = 0);
-					self.adoptForm.switch ? (data.ticket_count = 1) : (data.ticket_count = 0);
-					if (this.detail_info.item_range_type == 1) {
-						data.point = self.adoptForm.point;
-						// 	if (self.awardPoints === 1) {
-						// 		data.point = self.adoptForm.point;
-						// 	} else {
-						// 		data.point = self.adoptForm.point * -1;
-						// 	}
-					}
-
-					if (data.rule_id == '' || data.rule_id == null) {
-						data.rule_id = 0;
-					}
-					if (this.detail_info.item_range_type == -1) {
-						let itemID = '';
-						for (let i in data.item_id) {
-							itemID = data.item_id[i];
-						}
-						data.item_id = itemID;
-					}
-					if (data.item_id == '' || data.item_id == null) {
-						data.item_id = 0;
-					}
-					if (self.adoptForm.ruleOrItem) {
-						if (data.item_id == 0) {
-							self.$message.error('请选择所属规则');
-							return;
-						}
-					} else {
-						if (data.rule_id == 0) {
-							self.$message.error('请选择所属分类');
-							return;
-						}
-					}
-					if (data.point == 0 || !data.point) {
-						self.$message.error('积分不能为0或空');
-						return;
-					}
-					this.determinedBy = true;
-					this.$axios('post', '/api/integral/review', data)
-						.then(res => {
-							if (res.data.code == 1) {
-								self.adoptShow = false;
-								self.detail_info.status = 2;
-								self.$message.success(res.data.msg);
-								self.adoptClose(); //关闭通过弹窗
-								self.closeDetail(); //关闭抽屉
-								self.$parent.getSpList(); //刷新列表
-							}
-						})
-						.finally(e => {
-							setTimeout(() => {
-								//预防重复点击
-								this.determinedBy = false;
-							}, 200);
-						});
-				}
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss" scoped="scoped">
-label {
-	font-weight: 700;
-}
-.fl {
-	float: left;
-}
-.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;
-	}
-}
-
-.detailBut {
-	border-top: 1px solid rgb(248, 248, 248);
-	width: 100%;
-	position: absolute;
-	bottom: 0px;
-	right: 0;
-	padding: 0 20px 10px 0;
-	z-index: 1;
-	background-color: #fff;
-}
-.detail_popup {
-	padding: 20px;
-	overflow-y: auto;
-	overflow-x: hidden !important;
-	height: calc(100vh - 184px);
-	padding-bottom: 30px;
-	.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;
-}
-.examine_steps {
-	.el-step {
-		flex-basis: auto !important;
-	}
-}
-</style>

+ 363 - 0
src/components/flow/Affirm - 副本.vue

@@ -0,0 +1,363 @@
+<template>
+  <div class="all">
+    <div class="flex-box-ce" style="margin-left: 10px;margin-top: 30px;">
+      <span>目标确认:</span>
+      <el-switch v-model="enable" :active-value="1" :inactive-value="0"></el-switch>
+    </div>
+	
+    <div class="flex-box-ce" v-show="enable == 1" style="position: relative;">
+      <div class="flex-box-v flex-center-center flex-d-wrap flow" :class="[isActive == index ? 'isActive' : '']" v-for="(item, index) in confirmor" :key="index">
+        <div @click="activeFlow(index)" class="flex-box-v flex-center-center  flow-item">
+          <div class="fontColorB font-flex-word" v-show="item.type == 1" style="font-size: 13px;width: 120px;">{{ options[item.manager_level - 1].label }}</div>
+          <div class="fontColorB font-flex-word" v-show="item.type == 2" style="font-size: 13px;width: 120px;">
+            <span v-if="item.employeeList.length > 0">{{ item.employeeList[0].name }}等({{ item.employeeList.length }})人</span>
+            <span v-else>未指定人员</span>
+          </div>
+          <div class="fontColorB font-flex-word" v-show="item.type == 3" style="font-size: 13px;width: 120px;">被考核人</div>
+          <i class="el-icon-error" style="font-size: 18px;color: #C0C4CC;" @click="deleteFlow(index)"></i>
+        </div>
+        <div class="flow-index">
+          <span>{{ index + 1 }}</span>
+          <div class="dian"></div>
+          <i class="el-icon-arrow-up jt-top" v-if="isActive == index"></i>
+          <div class="add-flow" v-if="confirmor.length == index + 1">
+            <i class="el-icon-circle-plus-outline blue" style="cursor: pointer;" v-if="confirmor.length != 6" @click="addFlow()"></i>
+            <i class="el-icon-video-pause fontColorF" v-else></i>
+          </div>
+        </div>
+        <div class="flow-box" v-show="isActive == index">
+          <el-form label-width="120px">
+            <el-form-item label="确认人:">
+              <el-radio-group v-model="item.type">
+                <el-radio :label="1">管理员(指定一级)</el-radio>
+                <el-radio :label="2">指定成员</el-radio>
+                <el-radio :label="3">被考核人</el-radio>
+              </el-radio-group>
+              <div class="flex-box-ce" style="margin-top: 10px;" v-show="item.type == 1">
+                <span>被考评人的</span>
+                <el-select v-model="item.manager_level" placeholder="请选择级别"  style="margin: 0 10px;">
+                  <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+                </el-select>
+                <el-tooltip class="item" effect="dark" content="找不到确认人时,由上级管理员替代" placement="top-start">
+                  <i class="fontColorF el-icon-warning"></i>
+                </el-tooltip>
+              </div>
+              <div class="border flex-box-ce" style="position: relative;" v-show="item.type == 2">
+                <div class="fontColorF flex-1" v-if="item.employeeList.length == 0">请选择指定人员</div>
+                <div v-else style="width: 180px;" class="font-flex-word">
+                  <span v-for="(j, index2) in item.employeeList" :key="index2">
+                    <i v-if="index2 != 0">,</i>
+                    {{ j.name }}
+                  </span>
+                </div>
+                <span v-if="item.employeeList.length > 0" class="blue">{{ item.employeeList.length }}人</span>
+                <i class="el-icon-arrow-down icon-right" v-else></i>
+                <div @click="setEmployeeList(item, index)" class="inputDc"></div>
+              </div>
+            </el-form-item>
+            <el-form-item label="确认人多人时:" v-if="item.type != 3">
+              <el-radio-group v-model="item.multi_executor">
+                <el-radio :label="1">依次确认</el-radio>
+                <el-radio :label="2">任一人确认</el-radio>
+                <el-radio :label="3">均需确认</el-radio>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item label="允许确认人:">
+              <el-checkbox v-model="item.index">修改指标</el-checkbox>
+              <el-checkbox v-model="item.transfer">转交</el-checkbox>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+    </div>
+
+    <!-- 选择子管理员 -->
+    <EmployeeSelector :selected="selected" :is_filtration_creator="false" :visible.sync="setAdministrator" @confirm="confirmAdministrator" />
+  </div>
+</template>
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import BrawerBox from '@/components/public/BrawerBox';
+export default {
+  components: { EmployeeSelector, BrawerBox },
+  name: 'Affirm',
+  props: {
+    data: {
+      type: Object,
+      default:()=>{
+		  return {}
+	  }
+    }
+  },
+  data() {
+    return {
+      loading: false,
+
+      isActive: '0',
+      selected: { employee: [], dept: [] }, //执行者列表
+      setAdministrator: false,
+
+      flowIndex: 0,
+      enable: 0, //是否启用 1-启用 0-禁用
+      unique: 1, //评分人去重 1-是 0-否
+      confirmor: [
+        //确认人员列表
+        {
+          type: 1, //确认人类型 1-主管 2-指定成员 3-被考核人 4-角色
+          manager_level: 1, //主管级别
+          supervisor_confirm: 1, //找不到确认人,有上级主管代替 1-是 0-否
+          multi_executor: 1, //确认人多人时处理方式 1-依次确认 2-任一人确认 3-均需确认
+          action: [//允许确认人动作
+            'index', //修改指标
+            'transfer' //转交
+          ],
+          index:true,
+          transfer:true,
+          employee_ids: [], //指定成员用户id列表(类型为指定成员时)
+          employeeList:[],
+          role_name: 'creator' //角色名称(类型为指定角色时)
+        }
+      ],
+      options: [
+        {
+          value: 1,
+          label: '直接管理员'
+        },
+        {
+          value: 2,
+          label: '二级管理员'
+        },
+        {
+          value: 3,
+          label: '三级管理员'
+        },
+        {
+          value: 4,
+          label: '四级管理员'
+        },
+        {
+          value: 5,
+          label: '五级管理员'
+        },
+        {
+          value: 6,
+          label: '六级管理员'
+        }
+      ]
+    };
+  },
+  watch: {
+    data(val) {
+      this.enable = val.enable;
+      if (val.enable) {
+        this.recoverData();
+      }
+    },
+    enable(val) {
+      if (val == 1) {
+        this.$emit('setIs', '',7);
+      } else {
+        this.$emit('setIs', '已禁用',7);
+      }
+    }
+  },
+  methods: {
+    recoverData() {
+      let data = this.data;
+      let employeeMap = this.$getEmployeeList();
+      data.confirmor.forEach(item => {
+        item.manager_level = item.manager_level == 0 ? 1 : item.manager_level;
+        item.employeeList = item.employee_ids.map(item => {
+          return employeeMap[item];
+        });
+        item.transfer = item.action.indexOf('transfer') >= 0 ? true : false;
+        item.index = item.action.indexOf('index') >= 0 ? true : false;
+      });
+      this.confirmor = JSON.parse(JSON.stringify(data.confirmor));
+    },
+    activeFlow(index) {
+      this.isActive = index;
+    },
+    //删除主管
+    deleteFlow(index) {
+      this.$confirm('确定删除', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+          if (this.confirmor.length == 1) {
+            this.$message.error('至少保留一个');
+            return false;
+          }
+          this.confirmor.splice(index, 1);
+          this.isActive = this.confirmor.length - 1;
+      }).catch(() => {});
+    },
+    //添加主管
+    addFlow() {
+      var leth = this.confirmor.length + 1;
+      var confirmor = {
+          type: 1, //确认人类型 1-主管 2-指定成员 3-被考核人 4-角色
+          manager_level: 1, //主管级别
+          supervisor_confirm: 1, //找不到确认人,有上级主管代替 1-是 0-否
+          multi_executor: 1, //确认人多人时处理方式 1-依次确认 2-任一人确认 3-均需确认
+          action: [//允许确认人动作
+            'index', //修改指标
+            'transfer' //转交
+          ],
+          index:true,
+          transfer:true,
+          employee_ids: [], //指定成员用户id列表(类型为指定成员时)
+          employeeList:[],
+          role_name: 'creator' //角色名称(类型为指定角色时)
+      };
+      this.confirmor.push(confirmor);
+    },
+    setEmployeeList(item, index) {
+      this.flowIndex = index;
+      this.selected.employee = item.employeeList;
+      this.setAdministrator = true;
+    },
+    confirmAdministrator(e) {
+      this.confirmor[this.flowIndex].employeeList = e.employee.length > 0 ? e.employee : [];
+    },
+    submitForm() {}
+  }
+};
+</script>
+
+<style scoped="scoped">
+.border {
+  -webkit-appearance: none;
+  background-color: #fff;
+  background-image: none;
+  border-radius: 4px;
+  border: 1px solid #dcdfe6;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  color: #606266;
+  font-size: inherit;
+  height: auto;
+  outline: 0;
+  padding: 0 15px;
+  width: 250px;
+  position: relative;
+}
+.all {
+  font-size: 14px;
+}
+.nweTitle {
+  margin: 30px 0;
+  padding-left: 10px;
+  border-left: 3px solid #409eff;
+}
+.flow {
+  margin-right: 30px;
+}
+.flow-item {
+  border-radius: 3px;
+  width: 120px;
+  height: 50px;
+  position: relative;
+  margin-top: 30px;
+  box-sizing: border-box;
+  text-align: center;
+  border: 1px solid #f4f6f9;
+}
+.flow-item .el-icon-error {
+  position: absolute;
+  right: 3px;
+  top: 3px;
+  display: none;
+}
+.flow-item:hover {
+  background-color: #e7f5fe;
+}
+.flow-item:hover .el-icon-error {
+  display: block !important;
+}
+.flow-item .el-icon-error:hover {
+  color: #f56c6c !important;
+}
+.flow-item .fontColorT {
+  margin-top: 10px;
+}
+.flow-index {
+  width: 120px;
+  text-align: center;
+  position: relative;
+  margin-top: 10px;
+}
+.flow-index span {
+  width: 22px;
+  height: 22px;
+  border-radius: 50%;
+  border: 1px solid #909399;
+  color: #909399;
+  display: inline-block;
+  line-height: 22px;
+  font-size: 12px;
+}
+.add-flow {
+  position: absolute;
+  right: -100px;
+  z-index: 2;
+  top: 0px;
+}
+.add-flow i {
+  font-size: 26px;
+}
+.isActive .flow-item {
+  background-color: #ecf5ff;
+  color: #409eff !important;
+}
+.isActive .flow-item .fontColorB,
+.isActive .fontColorT {
+  color: #409eff !important;
+}
+.isActive .flow-index span {
+  border: 1px solid #409eff !important;
+  color: #409eff !important;
+}
+.isActive .el-icon-error {
+  display: block;
+}
+.dian {
+  position: absolute;
+  height: 1px;
+  border-top: 1px dashed #ccc;
+  width: 127px;
+  top: 50%;
+  left: 71px;
+}
+.flow-box {
+  border: 1px dashed #409eff;
+  border-radius: 3px;
+  padding: 20px;
+  width: 100%;
+  position: absolute;
+  left: 0;
+  right: 0;
+  top: 140px;
+  background-color: #ecf5ff;
+  z-index: 2;
+}
+.jt-top {
+  position: absolute;
+  color: #409eff;
+  font-size: 18px;
+  font-weight: 600;
+  top: 160%;
+  left: 50px;
+  background-color: #fff;
+  z-index: 3;
+}
+.inputDc {
+  position: absolute;
+  top: 0;
+  width: 250px;
+  left: 0;
+  bottom: 0;
+  z-index: 9;
+}
+</style>

+ 385 - 0
src/components/flow/Affirm.vue

@@ -0,0 +1,385 @@
+<template>
+  <div class="all">
+    <div class="flex-box-ce" style="margin-left: 10px;margin-top: 30px;">
+      <span>目标确认:</span>
+      <el-switch v-model="enable" :active-value="1" :inactive-value="0"></el-switch>
+    </div>
+	
+    <div class="flex-box-ce" v-show="enable == 1" style="position: relative;background-color: #F5F9FF;padding:20px;border-radius: 5px;margin-top: 20px;max-width: 1000px;">
+      <div class="flex-box-v flex-center-center flex-d-wrap flow" @click="activeFlow(index)" :class="[isActive == index ? 'isActive' : '']" v-for="(item, index) in confirmor" :key="index">
+        <div class="flex-box-v flex-center-center  flow-item">
+          <div class="fontColorB font-flex-word" v-show="item.type == 1" style="width: 120px;">{{ options[item.manager_level - 1].label }}</div>
+          <div class="fontColorB font-flex-word" v-show="item.type == 2" style="width: 120px;">
+            <span v-if="item.employeeList.length > 0">{{ item.employeeList[0].name }}等({{ item.employeeList.length }})人</span>
+            <span v-else>未指定人员</span>
+          </div>
+          <div class="fontColorB font-flex-word" v-show="item.type == 3" style="width: 120px;">被考核人</div>
+          <i class="el-icon-error" style="font-size: 18px;color: #C0C4CC;" @click="deleteFlow(index)"></i>
+        </div>
+        <div class="flow-index">
+          <span></span>
+          <div class="dian"></div>
+          <i class="el-icon-arrow-up jt-top" v-if="isActive == index"></i>
+		  
+          <div class="add-flow" v-if="confirmor.length == index + 1">
+            <i class="el-icon-circle-plus-outline blue" style="cursor: pointer;" v-if="confirmor.length != 6" @click="addFlow()"></i>
+            <i class="el-icon-video-pause fontColorF" v-else></i>
+          </div>
+        </div>
+        <div class="flow-box" v-show="isActive == index">
+          <el-form label-width="80px">
+            <el-form-item>
+			  <div class="form-titem">确认人:</div>
+              <el-radio-group v-model="item.type">
+                <el-radio :label="1">管理员(指定一级)</el-radio>
+                <el-radio :label="2">指定成员</el-radio>
+                <el-radio :label="3">被考核人</el-radio>
+              </el-radio-group>
+              <div class="flex-box-ce" style="margin-top: 10px;" v-show="item.type == 1">
+                <span>被考评人的</span>
+                <el-select v-model="item.manager_level" placeholder="请选择级别"  style="margin: 0 10px;">
+                  <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+                </el-select>
+                <el-tooltip class="item" effect="dark" content="找不到确认人时,由上级管理员替代" placement="top-start">
+                  <i class="fontColorF el-icon-warning"></i>
+                </el-tooltip>
+              </div>
+              <div class="border flex-box-ce" style="position: relative;" v-show="item.type == 2">
+                <div class="fontColorF flex-1" v-if="item.employeeList.length == 0">请选择指定人员</div>
+                <div v-else style="width: 180px;" class="font-flex-word">
+                  <span v-for="(j, index2) in item.employeeList" :key="index2">
+                    <i v-if="index2 != 0">,</i>
+                    {{ j.name }}
+                  </span>
+                </div>
+                <span v-if="item.employeeList.length > 0" class="blue">{{ item.employeeList.length }}人</span>
+                <i class="el-icon-arrow-down icon-right" v-else></i>
+                <div @click="setEmployeeList(item, index)" class="inputDc"></div>
+              </div>
+            </el-form-item>
+            <el-form-item  v-if="item.type != 3">
+			  <div class="form-titem">确认人多人时:</div>
+              <el-radio-group v-model="item.multi_executor">
+                <el-radio :label="1">依次确认</el-radio>
+                <el-radio :label="2">任一人确认</el-radio>
+                <el-radio :label="3">均需确认</el-radio>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item>
+			  <div class="form-titem">允许确认人:</div>
+              <el-checkbox v-model="item.index">修改指标</el-checkbox>
+              <el-checkbox v-model="item.transfer">转交</el-checkbox>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+    </div>
+
+    <!-- 选择子管理员 -->
+    <EmployeeSelector :selected="selected" :is_filtration_creator="false" :visible.sync="setAdministrator" @confirm="confirmAdministrator" />
+  </div>
+</template>
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import BrawerBox from '@/components/public/BrawerBox';
+export default {
+  components: { EmployeeSelector, BrawerBox },
+  name: 'Affirm',
+  props: {
+    data: {
+      type: Object,
+      default:()=>{
+		  return {}
+	  }
+    }
+  },
+  data() {
+    return {
+      loading: false,
+
+      isActive: '0',
+      selected: { employee: [], dept: [] }, //执行者列表
+      setAdministrator: false,
+
+      flowIndex: 0,
+      enable: 0, //是否启用 1-启用 0-禁用
+      unique: 1, //评分人去重 1-是 0-否
+      confirmor: [
+        //确认人员列表
+        {
+          type: 1, //确认人类型 1-主管 2-指定成员 3-被考核人 4-角色
+          manager_level: 1, //主管级别
+          supervisor_confirm: 1, //找不到确认人,有上级主管代替 1-是 0-否
+          multi_executor: 1, //确认人多人时处理方式 1-依次确认 2-任一人确认 3-均需确认
+          action: [//允许确认人动作
+            'index', //修改指标
+            'transfer' //转交
+          ],
+          index:true,
+          transfer:true,
+          employee_ids: [], //指定成员用户id列表(类型为指定成员时)
+          employeeList:[],
+          role_name: 'creator' //角色名称(类型为指定角色时)
+        }
+      ],
+      options: [
+        {
+          value: 1,
+          label: '直接管理员'
+        },
+        {
+          value: 2,
+          label: '二级管理员'
+        },
+        {
+          value: 3,
+          label: '三级管理员'
+        },
+        {
+          value: 4,
+          label: '四级管理员'
+        },
+        {
+          value: 5,
+          label: '五级管理员'
+        },
+        {
+          value: 6,
+          label: '六级管理员'
+        }
+      ]
+    };
+  },
+  watch: {
+    data(val) {
+      this.enable = val.enable;
+      if (val.enable) {
+        this.recoverData();
+      }
+    },
+    enable(val) {
+      if (val == 1) {
+        this.$emit('setIs', '',7);
+      } else {
+        this.$emit('setIs', '已禁用',7);
+      }
+    }
+  },
+  methods: {
+    recoverData() {
+      let data = this.data;
+      let employeeMap = this.$getEmployeeList();
+      data.confirmor.forEach(item => {
+        item.manager_level = item.manager_level == 0 ? 1 : item.manager_level;
+        item.employeeList = item.employee_ids.map(item => {
+          return employeeMap[item];
+        });
+        item.transfer = item.action.indexOf('transfer') >= 0 ? true : false;
+        item.index = item.action.indexOf('index') >= 0 ? true : false;
+      });
+      this.confirmor = JSON.parse(JSON.stringify(data.confirmor));
+    },
+    activeFlow(index) {
+      this.isActive = index;
+    },
+    //删除主管
+    deleteFlow(index) {
+      this.$confirm('确定删除', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+          if (this.confirmor.length == 1) {
+            this.$message.error('至少保留一个');
+            return false;
+          }
+          this.confirmor.splice(index, 1);
+          this.isActive = this.confirmor.length - 1;
+      }).catch(() => {});
+    },
+    //添加主管
+    addFlow() {
+      var leth = this.confirmor.length + 1;
+      var confirmor = {
+          type: 1, //确认人类型 1-主管 2-指定成员 3-被考核人 4-角色
+          manager_level: 1, //主管级别
+          supervisor_confirm: 1, //找不到确认人,有上级主管代替 1-是 0-否
+          multi_executor: 1, //确认人多人时处理方式 1-依次确认 2-任一人确认 3-均需确认
+          action: [//允许确认人动作
+            'index', //修改指标
+            'transfer' //转交
+          ],
+          index:true,
+          transfer:true,
+          employee_ids: [], //指定成员用户id列表(类型为指定成员时)
+          employeeList:[],
+          role_name: 'creator' //角色名称(类型为指定角色时)
+      };
+      this.confirmor.push(confirmor);
+    },
+    setEmployeeList(item, index) {
+      this.flowIndex = index;
+      this.selected.employee = item.employeeList;
+      this.setAdministrator = true;
+    },
+    confirmAdministrator(e) {
+      this.confirmor[this.flowIndex].employeeList = e.employee.length > 0 ? e.employee : [];
+    },
+    submitForm() {}
+  }
+};
+</script>
+
+<style scoped="scoped">
+.border {
+  -webkit-appearance: none;
+  background-color: #fff;
+  background-image: none;
+  border-radius: 4px;
+  border: 1px solid #dcdfe6;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  color: #606266;
+  font-size: inherit;
+  height: auto;
+  outline: 0;
+  padding: 0 15px;
+  width: 250px;
+  position: relative;
+}
+.all {
+  font-size: 14px;
+}
+.nweTitle {
+  margin: 30px 0;
+  padding-left: 10px;
+  border-left: 3px solid #409eff;
+}
+.flow {
+  margin-right: 30px;
+  cursor: pointer;
+}
+.flow-item {
+  border-radius: 3px;
+  width: 120px;
+  /* height: 50px; */
+  position: relative;
+  /* margin-top: 30px; */
+  box-sizing: border-box;
+  text-align: center;
+  /* border: 1px solid #f4f6f9; */
+}
+.flow-item .el-icon-error {
+  position: absolute;
+  right: 0px;
+  top: -14px;
+  display: none;
+}
+.flow-item:hover {
+  /* background-color: #e7f5fe; */
+  font-weight: 600;
+  font-size: 16px;
+}
+.flow-item:hover .el-icon-error {
+  display: block !important;
+}
+.flow-item .el-icon-error:hover {
+  color: #f56c6c !important;
+}
+.flow-item .fontColorT {
+  margin-top: 10px;
+}
+.flow-index {
+  width: 120px;
+  text-align: center;
+  position: relative;
+  margin-top: 10px;
+}
+.flow-index span {
+  width: 18px;
+  height: 18px;
+  border-radius: 50%;
+  border: 1px solid #ccc;
+  color: #909399;
+  display: inline-block;
+  line-height: 22px;
+  font-size: 12px;
+  position: relative;
+}
+.flow-index span::after{
+  width: 10px;
+  height: 10px;
+  content: " ";
+  top: 50%;
+  left: 50%;
+  margin-top: -5px;
+  margin-left: -5px;
+  background-color: #409eff;
+  border-radius: 50%;
+  position: absolute;
+}
+.add-flow {
+  position: absolute;
+  right: -100px;
+  z-index: 2;
+  top: 0px;
+}
+.add-flow i {
+  font-size: 26px;
+}
+.isActive .flow-item {
+  /* background-color: #ecf5ff; */
+  font-weight: 600;
+  font-size: 16px;
+  color: #409eff !important;
+}
+.isActive .flow-item .fontColorB,
+.isActive .fontColorT {
+  color: #409eff !important;
+}
+.isActive .flow-index span {
+  border: 1px solid #409eff !important;
+  color: #409eff !important;
+}
+.isActive .el-icon-error {
+  display: block;
+}
+.dian {
+  position: absolute;
+  height: 1px;
+  border-top: 1px dashed #ccc;
+  width: 127px;
+  top: 40%;
+  left: 71px;
+}
+.flow-box {
+  /* border: 1px dashed #409eff; */
+  border-radius: 3px;
+  padding: 20px;
+  width: 1000px;
+  position: absolute;
+  left: 0;
+  right: 0;
+  top: 120px;
+  background-color: rgb(245, 249, 255);;
+  z-index: 2;
+}
+.jt-top {
+  position: absolute;
+  color: #409eff;
+  font-size: 18px;
+  font-weight: 600;
+  top: 50px;
+  left: 50px;
+  background-color: #fff;
+  z-index: 3;
+}
+.inputDc {
+  position: absolute;
+  top: 0;
+  width: 250px;
+  left: 0;
+  bottom: 0;
+  z-index: 9;
+}
+</style>

+ 365 - 0
src/components/flow/Examine - 副本.vue

@@ -0,0 +1,365 @@
+  <template>
+  <div class="all">
+    <div class="flex-box-ce" style="margin-left: 10px;margin-top: 30px;">
+      <span>审批:</span>
+      <el-switch v-model="enable" :active-value="1" :inactive-value="0"></el-switch>
+    </div>
+    <div class="flex-box-ce" v-show="enable == 1" style="position: relative;">
+      <div class="flex-box-v flex-center-center flex-d-wrap flow" :class="[isActive == index ? 'isActive' : '']" v-for="(item, index) in review" :key="index">
+        <div @click="activeFlow(index)" class="flex-box-v flex-center-center  flow-item">
+          <div class="fontColorB font-flex-word" v-show="item.type == 1" style="font-size: 13px;width: 120px;">{{ options[item.manager_level - 1].label }}</div>
+          <div class="fontColorB font-flex-word" v-show="item.type == 2" style="font-size: 13px;width: 120px;">
+            <span v-if="item.employeeList.length > 0">{{ item.employeeList[0].name }}等({{ item.employeeList.length }})人</span>
+            <span v-else>未指定人员</span>
+          </div>
+          <div class="fontColorB font-flex-word" v-show="item.type == 3" style="font-size: 13px;width: 120px;">被考核人</div>
+          <i class="el-icon-error" style="font-size: 18px;color: #C0C4CC;" @click="deleteFlow(index)"></i>
+        </div>
+        <div class="flow-index">
+          <span>{{ index + 1 }}</span>
+          <div class="dian"></div>
+          <i class="el-icon-arrow-up jt-top" v-if="isActive == index"></i>
+          <div class="add-flow" v-if="review.length == index + 1">
+            <i class="el-icon-circle-plus-outline blue" style="cursor: pointer;" v-if="review.length!=6" @click="addFlow()"></i>
+            <i class="el-icon-video-pause fontColorF" v-else></i>
+          </div>
+        </div>
+        <div class="flow-box" v-show="isActive == index">
+          <el-form label-width="120px">
+            <el-form-item label="审批人:">
+              <el-radio-group v-model="item.type">
+                <el-radio :label="1">管理员(指定一级)</el-radio>
+                <el-radio :label="2">指定成员</el-radio>
+                <el-radio :label="3">被考核人</el-radio>
+              </el-radio-group>
+              <div class="flex-box-ce" style="margin-top: 10px;" v-show="item.type == 1">
+                <span>被考评人的</span>
+                <el-select v-model="item.manager_level" placeholder="请选择级别"  style="margin: 0 10px;">
+                  <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+                </el-select>
+                <el-tooltip class="item" effect="dark" content="找不到确认人时,由上级管理员替代" placement="top-start"><i class="fontColorF el-icon-warning"></i></el-tooltip>
+              </div>
+              <div class="border flex-box-ce" style="position: relative;" v-show="item.type == 2">
+                <div class="fontColorF flex-1" v-if="item.employeeList.length == 0">请选择指定人员</div>
+                <div v-else style="width: 180px;" class="font-flex-word">
+                  <span v-for="(j, index2) in item.employeeList" :key="index2">
+                    <i v-if="index2 != 0">,</i>
+                    {{ j.name }}
+                  </span>
+                </div>
+                <span v-if="item.employeeList.length > 0" class="blue">{{ item.employeeList.length }}人</span>
+                <i class="el-icon-arrow-down icon-right" v-else></i>
+                <div @click="setEmployeeList(item, index)" class="inputDc"></div>
+              </div>
+            </el-form-item>
+            <el-form-item label="审批人多人时:" v-if="item.type!=3">
+              <el-radio-group v-model="item.multi_executor">
+                <el-radio :label="1">依次确认</el-radio>
+                <el-radio :label="2">任一人审批</el-radio>
+                <el-radio :label="3">均需审批</el-radio>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item label="允许审批人:">
+              <el-checkbox v-model="item.transfer">转交</el-checkbox>
+              <el-checkbox v-model="item.refuse">驳回</el-checkbox>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+    </div>
+
+    <!-- 选择子管理员 -->
+    <EmployeeSelector :selected="selected" :is_filtration_creator="false" :visible.sync="setAdministrator" @confirm="confirmAdministrator" />
+  </div>
+</template>
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import BrawerBox from '@/components/public/BrawerBox';
+export default {
+  components: { EmployeeSelector, BrawerBox },
+  name: 'Examine',
+  props:{
+    data:{
+      type:Object,
+      default:{}
+    }
+  },
+  data() {
+    return {
+      loading: false,
+
+      isActive: '0',
+      selected: { employee: [], dept: [] }, //执行者列表
+      setAdministrator: false,
+
+      flowIndex: 0,
+      enable: 0, //是否启用 1-启用 0-禁用
+      unique: 1, //评分人去重 1-是 0-否
+      review: [//审批节点
+        {
+          type: 1, //用户种类 1-主管 2-指定成员 3-被考核人 4-角色
+          action: [ //允许审批人动作
+            'transfer', //转交
+            'refuse' //驳回
+          ],
+          transfer: true, //转交
+          refuse: true, //驳回
+          manager_level: 1, //主管级别(只有用户种类为主管有效)
+          supervisor_confirm: 1, //找不到确认人时是否由上级主管代替(只有评分人类型为主管时有效) 1-是 0-否
+          is_supervisor_confirm: true,
+          multi_executor: 3, //审批人多人时选项 1-依次确认 2-任一人审批 3-均需审批(只有用户种类为主管、指定成员、角色时有效)
+          employee_ids: [], //用户id列表(只有用户种类为指定成员时有效)
+          employeeList:[],
+          role_name: 'creator' //角色名(只有用户种类为角色时有效)
+        }
+      ],
+      options: [
+        {
+          value: 1,
+          label: '直接管理员'
+        },
+        {
+          value: 2,
+          label: '二级管理员'
+        },
+        {
+          value: 3,
+          label: '三级管理员'
+        },
+        {
+          value: 4,
+          label: '四级管理员'
+        },
+        {
+          value: 5,
+          label: '五级管理员'
+        },
+        {
+          value: 6,
+          label: '六级管理员'
+        }
+      ]
+    };
+  },
+  watch: {
+    data(val){
+       if(val.enable){
+         this.recoverData();
+       }
+    },
+    enable(val) {
+       if(val==1){
+         this.$emit('setIs','',5)
+       }else{
+         this.$emit('setIs','已禁用',5)
+       }
+    }
+  },
+  created() {},
+  mounted() {},
+  methods: {
+    recoverData(){
+      let data=this.data;
+      let employeeMap=this.$getEmployeeList()
+      this.enable=data.enable;
+      this.unique=data.unique;
+      data.reviewer.forEach(item=>{
+        item.is_supervisor_confirm=item.supervisor_confirm==1? true:false;
+        item.manager_level=item.manager_level==0? 1:item.manager_level
+        item.employeeList=item.employee_ids.map(item=>{
+          return employeeMap[item]
+        })
+        item.transfer=item.action.indexOf('transfer')>=0? true:false
+        item.refuse=item.action.indexOf('refuse')>=0? true:false
+      })
+      this.review=JSON.parse(JSON.stringify(data.reviewer))
+    },
+    activeFlow(index) {
+      this.isActive = index;
+    },
+    //删除主管
+    deleteFlow(index) {
+      this.$confirm('确定删除', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          if(this.review.length==1){
+            this.$message.error('至少保留一个');
+            return false
+          }
+          this.review.splice(index, 1);
+          this.isActive = this.review.length - 1;
+        })
+        .catch(() => {});
+    },
+    //添加主管
+    addFlow() {
+      var leth = this.review.length + 1;
+      var review ={
+          type: 1, //用户种类 1-主管 2-指定成员 3-被考核人 4-角色
+          action: [ //允许审批人动作
+            'transfer', //转交
+            'refuse' //驳回
+          ],
+          transfer: true, //转交
+          refuse: true, //驳回
+          manager_level: leth, //主管级别(只有用户种类为主管有效)
+          supervisor_confirm: 1, //找不到确认人时是否由上级主管代替(只有评分人类型为主管时有效) 1-是 0-否
+          is_supervisor_confirm: true,
+          multi_executor: 1, //审批人多人时选项 1-依次确认 2-任一人审批 3-均需审批(只有用户种类为主管、指定成员、角色时有效)
+          employee_ids: [], //用户id列表(只有用户种类为指定成员时有效)
+          employeeList:[],
+          role_name: 'creator' //角色名(只有用户种类为角色时有效)
+        };
+      this.review.push(review);
+    },
+    setEmployeeList(item, index) {
+      this.flowIndex = index;
+      this.selected.employee = item.employeeList;
+      this.setAdministrator = true;
+    },
+    confirmAdministrator(e) {
+      this.review[this.flowIndex].employeeList = e.employee.length > 0 ? e.employee : [];
+    },
+    submitForm() {}
+  }
+};
+</script>
+
+<style scoped="scoped">
+.border {
+  -webkit-appearance: none;
+  background-color: #fff;
+  background-image: none;
+  border-radius: 4px;
+  border: 1px solid #dcdfe6;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  color: #606266;
+  font-size: inherit;
+  height: auto;
+  outline: 0;
+  padding: 0 15px;
+  width: 250px;
+  position: relative;
+}
+.all {
+  font-size: 14px;
+}
+.nweTitle {
+  margin: 30px 0;
+  padding-left: 10px;
+  border-left: 3px solid #409eff;
+}
+.flow {
+  margin-right: 30px;
+}
+.flow-item {
+  border-radius: 3px;
+  width: 120px;
+  height: 50px;
+  position: relative;
+  margin-top: 30px;
+  box-sizing: border-box;
+  text-align: center;
+  border: 1px solid #f4f6f9;
+}
+.flow-item .el-icon-error {
+  position: absolute;
+  right: 3px;
+  top: 3px;
+  display: none;
+}
+.flow-item:hover {
+  background-color: #e7f5fe;
+}
+.flow-item:hover .el-icon-error {
+  display: block !important;
+}
+.flow-item .el-icon-error:hover {
+  color: #f56c6c !important;
+}
+.flow-item .fontColorT {
+  margin-top: 10px;
+}
+.flow-index {
+  width: 120px;
+  text-align: center;
+  position: relative;
+  margin-top: 10px;
+}
+.flow-index span {
+  width: 22px;
+  height: 22px;
+  border-radius: 50%;
+  border: 1px solid #909399;
+  color: #909399;
+  display: inline-block;
+  line-height: 22px;
+  font-size: 12px;
+}
+.add-flow {
+  position: absolute;
+  right: -100px;
+  z-index: 2;
+  top: 0px;
+}
+.add-flow i {
+  font-size: 26px;
+}
+.isActive .flow-item {
+  background-color: #ECF5FF;
+  color: #409eff !important;
+}
+.isActive .flow-item .fontColorB,
+.isActive .fontColorT {
+  color: #409eff !important;
+}
+.isActive .flow-index span {
+  border: 1px solid #409eff !important;
+  color: #409eff !important;
+}
+.isActive .el-icon-error {
+  display: block;
+}
+.dian {
+  position: absolute;
+  height: 1px;
+  border-top: 1px dashed #ccc;
+  width: 127px;
+  top: 50%;
+  left: 71px;
+}
+.flow-box {
+  border: 1px dashed #409eff;
+  border-radius: 3px;
+  padding: 20px;
+  width: 100%;
+  position: absolute;
+  left: 0;
+  right: 0;
+  top: 140px;
+  background-color: #ECF5FF;
+  z-index: 2;
+}
+.jt-top {
+  position: absolute;
+  color: #409eff;
+  font-size: 18px;
+  font-weight: 600;
+  top: 160%;
+  left: 50px;
+  background-color: #fff;
+  z-index: 3;
+}
+.inputDc {
+  position: absolute;
+  top: 0;
+  width: 250px;
+  left: 0;
+  bottom: 0;
+  z-index: 9;
+}
+</style>

+ 386 - 0
src/components/flow/Examine.vue

@@ -0,0 +1,386 @@
+  <template>
+  <div class="all">
+    <div class="flex-box-ce" style="margin-left: 10px;margin-top: 30px;">
+      <span>审批:</span>
+      <el-switch v-model="enable" :active-value="1" :inactive-value="0"></el-switch>
+    </div>
+    <div class="flex-box-ce" v-show="enable == 1" style="position: relative;background-color: #F5F9FF;padding:20px;border-radius: 5px;margin-top: 20px;max-width: 1000px;">
+      <div class="flex-box-v flex-center-center flex-d-wrap flow" :class="[isActive == index ? 'isActive' : '']" v-for="(item, index) in review" :key="index">
+        <div @click="activeFlow(index)" class="flex-box-v flex-center-center  flow-item">
+          <div class="fontColorB font-flex-word" v-show="item.type == 1" style="width: 120px;">{{ options[item.manager_level - 1].label }}</div>
+          <div class="fontColorB font-flex-word" v-show="item.type == 2" style="width: 120px;">
+            <span v-if="item.employeeList.length > 0">{{ item.employeeList[0].name }}等({{ item.employeeList.length }})人</span>
+            <span v-else>未指定人员</span>
+          </div>
+          <div class="fontColorB font-flex-word" v-show="item.type == 3" style="font-size: 13px;width: 120px;">被考核人</div>
+          <i class="el-icon-error" style="font-size: 18px;color: #C0C4CC;" @click="deleteFlow(index)"></i>
+        </div>
+        <div class="flow-index">
+          <span></span>
+          <div class="dian"></div>
+          <i class="el-icon-arrow-up jt-top" v-if="isActive == index"></i>
+          <div class="add-flow" v-if="review.length == index + 1">
+            <i class="el-icon-circle-plus-outline blue" style="cursor: pointer;" v-if="review.length!=6" @click="addFlow()"></i>
+            <i class="el-icon-video-pause fontColorF" v-else></i>
+          </div>
+        </div>
+        <div class="flow-box" v-show="isActive == index">
+          <el-form label-width="80px">
+            <el-form-item>
+			  <div class="form-titem">审批人:</div>
+              <el-radio-group v-model="item.type">
+                <el-radio :label="1">管理员(指定一级)</el-radio>
+                <el-radio :label="2">指定成员</el-radio>
+                <el-radio :label="3">被考核人</el-radio>
+              </el-radio-group>
+              <div class="flex-box-ce" style="margin-top: 10px;" v-show="item.type == 1">
+                <span>被考评人的</span>
+                <el-select v-model="item.manager_level" placeholder="请选择级别"  style="margin: 0 10px;">
+                  <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+                </el-select>
+                <el-tooltip class="item" effect="dark" content="找不到确认人时,由上级管理员替代" placement="top-start"><i class="fontColorF el-icon-warning"></i></el-tooltip>
+              </div>
+              <div class="border flex-box-ce" style="position: relative;" v-show="item.type == 2">
+                <div class="fontColorF flex-1" v-if="item.employeeList.length == 0">请选择指定人员</div>
+                <div v-else style="width: 180px;" class="font-flex-word">
+                  <span v-for="(j, index2) in item.employeeList" :key="index2">
+                    <i v-if="index2 != 0">,</i>
+                    {{ j.name }}
+                  </span>
+                </div>
+                <span v-if="item.employeeList.length > 0" class="blue">{{ item.employeeList.length }}人</span>
+                <i class="el-icon-arrow-down icon-right" v-else></i>
+                <div @click="setEmployeeList(item, index)" class="inputDc"></div>
+              </div>
+            </el-form-item>
+            <el-form-item  v-if="item.type!=3">
+				<div class="form-titem">审批人多人时:</div>
+              <el-radio-group v-model="item.multi_executor">
+                <el-radio :label="1">依次确认</el-radio>
+                <el-radio :label="2">任一人审批</el-radio>
+                <el-radio :label="3">均需审批</el-radio>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item>
+				<div class="form-titem">允许审批人:</div>
+              <el-checkbox v-model="item.transfer">转交</el-checkbox>
+              <el-checkbox v-model="item.refuse">驳回</el-checkbox>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+    </div>
+
+    <!-- 选择子管理员 -->
+    <EmployeeSelector :selected="selected" :is_filtration_creator="false" :visible.sync="setAdministrator" @confirm="confirmAdministrator" />
+  </div>
+</template>
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import BrawerBox from '@/components/public/BrawerBox';
+export default {
+  components: { EmployeeSelector, BrawerBox },
+  name: 'Examine',
+  props:{
+    data:{
+      type:Object,
+      default:{}
+    }
+  },
+  data() {
+    return {
+      loading: false,
+
+      isActive: '0',
+      selected: { employee: [], dept: [] }, //执行者列表
+      setAdministrator: false,
+
+      flowIndex: 0,
+      enable: 0, //是否启用 1-启用 0-禁用
+      unique: 1, //评分人去重 1-是 0-否
+      review: [//审批节点
+        {
+          type: 1, //用户种类 1-主管 2-指定成员 3-被考核人 4-角色
+          action: [ //允许审批人动作
+            'transfer', //转交
+            'refuse' //驳回
+          ],
+          transfer: true, //转交
+          refuse: true, //驳回
+          manager_level: 1, //主管级别(只有用户种类为主管有效)
+          supervisor_confirm: 1, //找不到确认人时是否由上级主管代替(只有评分人类型为主管时有效) 1-是 0-否
+          is_supervisor_confirm: true,
+          multi_executor: 3, //审批人多人时选项 1-依次确认 2-任一人审批 3-均需审批(只有用户种类为主管、指定成员、角色时有效)
+          employee_ids: [], //用户id列表(只有用户种类为指定成员时有效)
+          employeeList:[],
+          role_name: 'creator' //角色名(只有用户种类为角色时有效)
+        }
+      ],
+      options: [
+        {
+          value: 1,
+          label: '直接管理员'
+        },
+        {
+          value: 2,
+          label: '二级管理员'
+        },
+        {
+          value: 3,
+          label: '三级管理员'
+        },
+        {
+          value: 4,
+          label: '四级管理员'
+        },
+        {
+          value: 5,
+          label: '五级管理员'
+        },
+        {
+          value: 6,
+          label: '六级管理员'
+        }
+      ]
+    };
+  },
+  watch: {
+    data(val){
+       if(val.enable){
+         this.recoverData();
+       }
+    },
+    enable(val) {
+       if(val==1){
+         this.$emit('setIs','',5)
+       }else{
+         this.$emit('setIs','已禁用',5)
+       }
+    }
+  },
+  created() {},
+  mounted() {},
+  methods: {
+    recoverData(){
+      let data=this.data;
+      let employeeMap=this.$getEmployeeList()
+      this.enable=data.enable;
+      this.unique=data.unique;
+      data.reviewer.forEach(item=>{
+        item.is_supervisor_confirm=item.supervisor_confirm==1? true:false;
+        item.manager_level=item.manager_level==0? 1:item.manager_level
+        item.employeeList=item.employee_ids.map(item=>{
+          return employeeMap[item]
+        })
+        item.transfer=item.action.indexOf('transfer')>=0? true:false
+        item.refuse=item.action.indexOf('refuse')>=0? true:false
+      })
+      this.review=JSON.parse(JSON.stringify(data.reviewer))
+    },
+    activeFlow(index) {
+      this.isActive = index;
+    },
+    //删除主管
+    deleteFlow(index) {
+      this.$confirm('确定删除', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          if(this.review.length==1){
+            this.$message.error('至少保留一个');
+            return false
+          }
+          this.review.splice(index, 1);
+          this.isActive = this.review.length - 1;
+        })
+        .catch(() => {});
+    },
+    //添加主管
+    addFlow() {
+      var leth = this.review.length + 1;
+      var review ={
+          type: 1, //用户种类 1-主管 2-指定成员 3-被考核人 4-角色
+          action: [ //允许审批人动作
+            'transfer', //转交
+            'refuse' //驳回
+          ],
+          transfer: true, //转交
+          refuse: true, //驳回
+          manager_level: leth, //主管级别(只有用户种类为主管有效)
+          supervisor_confirm: 1, //找不到确认人时是否由上级主管代替(只有评分人类型为主管时有效) 1-是 0-否
+          is_supervisor_confirm: true,
+          multi_executor: 1, //审批人多人时选项 1-依次确认 2-任一人审批 3-均需审批(只有用户种类为主管、指定成员、角色时有效)
+          employee_ids: [], //用户id列表(只有用户种类为指定成员时有效)
+          employeeList:[],
+          role_name: 'creator' //角色名(只有用户种类为角色时有效)
+        };
+      this.review.push(review);
+    },
+    setEmployeeList(item, index) {
+      this.flowIndex = index;
+      this.selected.employee = item.employeeList;
+      this.setAdministrator = true;
+    },
+    confirmAdministrator(e) {
+      this.review[this.flowIndex].employeeList = e.employee.length > 0 ? e.employee : [];
+    },
+    submitForm() {}
+  }
+};
+</script>
+
+<style scoped="scoped">
+.border {
+  -webkit-appearance: none;
+  background-color: #fff;
+  background-image: none;
+  border-radius: 4px;
+  border: 1px solid #dcdfe6;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  color: #606266;
+  font-size: inherit;
+  height: auto;
+  outline: 0;
+  padding: 0 15px;
+  width: 250px;
+  position: relative;
+}
+.all {
+  font-size: 14px;
+}
+.nweTitle {
+  margin: 30px 0;
+  padding-left: 10px;
+  border-left: 3px solid #409eff;
+}
+.flow {
+  margin-right: 30px;
+  cursor: pointer;
+}
+.flow-item {
+  border-radius: 3px;
+  width: 120px;
+  /* height: 50px; */
+  position: relative;
+  /* margin-top: 30px; */
+  box-sizing: border-box;
+  text-align: center;
+  /* border: 1px solid #f4f6f9; */
+}
+.flow-item .el-icon-error {
+  position: absolute;
+  right: 0px;
+  top: -14px;
+  display: none;
+}
+.flow-item:hover {
+  /* background-color: #e7f5fe; */
+  font-weight: 600;
+  font-size: 16px;
+}
+.flow-item:hover .el-icon-error {
+  display: block !important;
+}
+.flow-item .el-icon-error:hover {
+  color: #f56c6c !important;
+}
+.flow-item .fontColorT {
+  margin-top: 10px;
+}
+.flow-index {
+  width: 120px;
+  text-align: center;
+  position: relative;
+  margin-top: 10px;
+}
+.flow-index span {
+  width: 18px;
+  height: 18px;
+  border-radius: 50%;
+  border: 1px solid #ccc;
+  color: #909399;
+  display: inline-block;
+  line-height: 22px;
+  font-size: 12px;
+  position: relative;
+}
+.flow-index span::after{
+  width: 10px;
+  height: 10px;
+  content: " ";
+  top: 50%;
+  left: 50%;
+  margin-top: -5px;
+  margin-left: -5px;
+  background-color: #409eff;
+  border-radius: 50%;
+  position: absolute;
+}
+.add-flow {
+  position: absolute;
+  right: -100px;
+  z-index: 2;
+  top: 0px;
+}
+.add-flow i {
+  font-size: 26px;
+}
+.isActive .flow-item {
+  /* background-color: #ecf5ff; */
+  font-weight: 600;
+  font-size: 16px;
+  color: #409eff !important;
+}
+.isActive .flow-item .fontColorB,
+.isActive .fontColorT {
+  color: #409eff !important;
+}
+.isActive .flow-index span {
+  border: 1px solid #409eff !important;
+  color: #409eff !important;
+}
+.isActive .el-icon-error {
+  display: block;
+}
+.dian {
+  position: absolute;
+  height: 1px;
+  border-top: 1px dashed #ccc;
+  width: 127px;
+  top: 40%;
+  left: 71px;
+}
+.flow-box {
+  /* border: 1px dashed #409eff; */
+  border-radius: 3px;
+  padding: 20px;
+  width: 1000px;
+  position: absolute;
+  left: 0;
+  right: 0;
+  top: 120px;
+  background-color: rgb(245, 249, 255);;
+  z-index: 2;
+}
+.jt-top {
+  position: absolute;
+  color: #409eff;
+  font-size: 18px;
+  font-weight: 600;
+  top: 50px;
+  left: 50px;
+  background-color: #fff;
+  z-index: 3;
+}
+.inputDc {
+  position: absolute;
+  top: 0;
+  width: 250px;
+  left: 0;
+  bottom: 0;
+  z-index: 9;
+}
+</style>

+ 428 - 0
src/components/flow/SuperiorFlow - 副本.vue

@@ -0,0 +1,428 @@
+<template>
+  <div class="all">
+    <div class="flex-box-ce" style="margin-left: 10px;margin-top: 30px;">
+      <span>上级评分:</span>
+      <el-switch v-model="enable" :active-value="1" :inactive-value="0"></el-switch>
+    </div>
+    <div class="flex-box-ce" v-show="enable == 1" style="position: relative;">
+      <div class="flex-box-v flex-center-center flex-d-wrap flow" :class="[isActive == index ? 'isActive' : '']" v-for="(item, index) in score_supervisor" :key="index">
+        <div @click="activeFlow(index)" class="flex-box-v flex-center-center  flow-item">
+          <div class="fontColorB font-flex-word" v-show="item.type == 1" style="font-size: 13px;width: 120px;">{{ options[item.manager_level - 1].label }}</div>
+          <div class="fontColorB font-flex-word" v-show="item.type == 2" style="font-size: 13px;width: 120px;">
+            <span v-if="item.employeeList.length > 0">{{ item.employeeList[0].name }}等({{ item.employeeList.length }})人</span>
+            <span v-else>未指定人员</span>
+          </div>
+          <div class="fontColorT font-flex-word" style="font-size: 12px;width: 120px;">评分权重:{{ item.weight }}%</div>
+          <i class="el-icon-error" style="font-size: 18px;color: #C0C4CC;" @click="deleteFlow(index)"></i>
+        </div>
+        <div class="flow-index">
+          <span>{{ index + 1 }}</span>
+          <div class="dian"></div>
+          <i class="el-icon-arrow-up jt-top" v-if="isActive == index"></i>
+          <div class="add-flow" v-if="score_supervisor.length == index + 1">
+            <i class="el-icon-circle-plus-outline blue" style="cursor: pointer;" v-if="score_supervisor.length != 6" @click="addFlow()"></i>
+            <i class="el-icon-video-pause fontColorF" v-else></i>
+          </div>
+        </div>
+        <div class="flow-box" v-show="isActive == index">
+          <el-form label-width="120px">
+            <el-form-item label="评分人:">
+              <el-radio-group v-model="item.type">
+                <el-radio :label="1">管理员(指定一级)</el-radio>
+                <el-radio :label="2">指定成员</el-radio>
+              </el-radio-group>
+              <div class="flex-box-ce" style="margin-top: 10px;" v-show="item.type == 1">
+                <span>被考评人的</span>
+                <el-select v-model="item.manager_level" placeholder="请选择级别"  style="margin: 0 10px;">
+                  <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+                </el-select>
+                <el-tooltip class="item" effect="dark" content="找不到确认人时,由上级管理员替代" placement="top-start"><i class="fontColorF el-icon-warning"></i></el-tooltip>
+              </div>
+              <div class="border flex-box-ce" style="position: relative;" v-show="item.type == 2">
+                <div class="fontColorF flex-1" v-if="item.employeeList.length == 0">请选择指定人员</div>
+                <div v-else style="width: 180px;" class="font-flex-word">
+                  <span v-for="(j, index2) in item.employeeList" :key="index2">
+                    <i v-if="index2 != 0">,</i>
+                    {{ j.name }}
+                  </span>
+                </div>
+                <span v-if="item.employeeList.length > 0" class="blue">{{ item.employeeList.length }}人</span>
+                <i class="el-icon-arrow-down icon-right" v-else></i>
+                <div @click="setEmployeeList(item, index)" class="inputDc"></div>
+              </div>
+            </el-form-item>
+            <el-form-item label="评分权重:">
+              <el-input laceholder="请输入评分权重(0~100)" @input="checkCountry($event, index)" v-model="item.weight" style="width:250px" @blur="setInput()" :id="index + 'input'">
+                <span slot="append">%</span>
+              </el-input>
+              <el-popover placement="bottom" width="450" trigger="hover">
+                <div style="padding: 10px;width: 100%;" class="flex-box">
+                  <img src="@/assets/image/ts.png" style="width: 100%; height: auto;" />
+                </div>
+                <span slot="reference">
+                  <i class="fontColorF el-icon-warning"></i>
+                </span>
+              </el-popover>
+            </el-form-item>
+            <el-form-item label="评分人多人时:">
+              <el-radio-group v-model="item.multi_executor">
+                <el-radio :label="1">各自评分取平均值</el-radio>
+                <el-radio :label="2">任一人评分</el-radio>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item label="评分规则:">
+              <el-radio-group v-model="item.rule">
+                <el-radio :label="1">指标均要评分</el-radio>
+                <el-radio :label="2">只评总分</el-radio>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item label="必填项:">
+              <el-checkbox v-model="item.comment">评分说明</el-checkbox>
+              <!-- <el-checkbox v-model="item.summary" >评分总结</el-checkbox> -->
+            </el-form-item>
+            <!-- <el-form-item label="手动评级:"></el-form-item> -->
+            <el-form-item label="允许评分人:"><el-checkbox v-model="item.isTransfer">转交</el-checkbox></el-form-item>
+          </el-form>
+        </div>
+      </div>
+    </div>
+
+    <!-- 选择子管理员 -->
+    <EmployeeSelector title="指定成员" :selected="selected" :is_filtration_creator="false" :visible.sync="setAdministrator" @confirm="confirmAdministrator" />
+  </div>
+</template>
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import BrawerBox from '@/components/public/BrawerBox';
+export default {
+  components: { EmployeeSelector, BrawerBox },
+  name: 'SuperiorFlow',
+  props: {
+    data: {
+      type: Object,
+      default: {}
+    }
+  },
+  data() {
+    return {
+      loading: false,
+
+      isActive: '0',
+      selected: { employee: [], dept: [] }, //执行者列表
+      setAdministrator: false,
+
+      flowIndex: 0,
+      enable: 0, //是否启用 1-启用 0-禁用
+      unique: 1, //评分人去重 1-是 0-否
+      score_supervisor: [
+        //上级配置列表
+        {
+          type: 1, //评分人类型 1-主管 2-指定成员 3-角色
+          manager_level: 1, //主管等级(只有评分人类型为主管时有效)
+          supervisor_confirm: 1, //找不到确认人时是否由上级主管代替(只有评分人类型为主管时有效) 1-是 0-否
+          is_supervisor_confirm: true,
+          // role_name: "creator",            //角色名(只有评分人类型为角色时有效)
+          employee_ids: [], //用户id列表(只有评分人类型为指定人员时有效)
+          employeeList: [], //人员集合
+          weight: 100, //权重
+          multi_executor: 1, //评分人多人时 1-各自评分 2-任一人评分
+          rule: 1, //评分规则 1-指标均要评分 2-评分总结
+          action: [
+            //必填项
+            'comment', //指标评分说明
+            'summary' //评分总结
+          ],
+          comment: false, //指标评分说明
+          summary: false, //评分总结
+          rating: 0, //是否手动评分 1-是 0-否
+          transfer: 1, //是否允许转交 1-是 0-否
+          isTransfer: true //是否允许转交 1-是 0-否
+        }
+      ],
+      options: [
+        {
+          value: 1,
+          label: '直接管理员'
+        },
+        {
+          value: 2,
+          label: '二级管理员'
+        },
+        {
+          value: 3,
+          label: '三级管理员'
+        },
+        {
+          value: 4,
+          label: '四级管理员'
+        },
+        {
+          value: 5,
+          label: '五级管理员'
+        },
+        {
+          value: 6,
+          label: '六级管理员'
+        }
+      ]
+    };
+  },
+  watch: {
+    data(val) {
+      if (val.enable) {
+        this.recoverData();
+      }
+    },
+    enable(val) {
+      this.setInput(!val);
+    }
+  },
+  created() {},
+  mounted() {},
+  methods: {
+    recoverData() {
+      let data = this.data;
+      let employeeMap = this.$getEmployeeList();
+      this.enable = data.enable;
+      this.unique = data.unique;
+      data.supervisor.forEach(item => {
+        item.is_supervisor_confirm = item.supervisor_confirm == 1 ? true : false;
+        item.manager_level = item.manager_level == 0 ? 1 : item.manager_level;
+        item.employeeList = item.employee_ids.map(item => {
+          return employeeMap[item];
+        });
+        item.comment = item.action.indexOf('comment') >= 0 ? true : false;
+        item.summary = item.action.indexOf('summary') >= 0 ? true : false;
+        item.isTransfer = item.transfer == 1 ? true : false;
+      });
+      // 注意:el-checked绑定的数据要在data里面一开始就有,不后期追加,会导致点击失效,解决方案如下
+      this.score_supervisor = JSON.parse(JSON.stringify(data.supervisor));
+    },
+    // 最大值不能大于100
+    checkCountry(e, index) {
+      //解决v-model与oninput同时使用失效问题
+      var dom = document.getElementById(index + 'input');
+      var value = dom.value;
+      //写你自己的输入规则
+      value = value.replace(/[^\d]/g, '');
+      if (value > 100) {
+        this.$set(this.score_supervisor[index], 'weight', 0);
+        this.$message.error('不能大于100');
+        return false;
+      }
+      dom.value = value; //输入框赋值
+      this.$set(this.score_supervisor[index], 'weight', dom.value);
+    },
+    //计算权重
+    setInput(is) {
+      if (is) {
+        this.$emit('setInput', '', false);
+      } else {
+        let num = 0;
+        this.score_supervisor.forEach(item => {
+          num += Number(item.weight);
+        });
+        this.$emit('setInput', num, true);
+      }
+    },
+    activeFlow(index) {
+      this.isActive = index;
+    },
+    //删除主管
+    deleteFlow(index) {
+      this.$confirm('确定删除', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          if (this.score_supervisor.length == 1) {
+            this.$message.error('至少保留一个');
+            return false;
+          }
+          this.score_supervisor.splice(index, 1);
+          this.isActive = this.score_supervisor.length - 1;
+          this.setInput();
+        })
+        .catch(() => {});
+    },
+    //添加主管
+    addFlow() {
+      if (this.score_supervisor.length == 6) {
+        return false;
+      }
+      var leth = this.score_supervisor.length + 1;
+      var score_supervisor = {
+        type: 1, //评分人类型 1-主管 2-指定成员 3-角色
+        manager_level: leth, //主管等级(只有评分人类型为主管时有效)
+        supervisor_confirm: 1, //找不到确认人时是否由上级主管代替(只有评分人类型为主管时有效) 1-是 0-否
+        is_supervisor_confirm: true,
+        // role_name: "creator",            //角色名(只有评分人类型为角色时有效)
+        employee_ids: [], //用户id列表(只有评分人类型为指定人员时有效)
+        employeeList: [], //人员集合
+        weight: 0, //权重
+        multi_executor: 1, //评分人多人时 1-各自评分 2-任一人评分
+        rule: 1, //评分规则 1-指标均要评分 2-评分总结
+        action: [
+          //必填项
+          'comment', //指标评分说明
+          'summary' //评分总结
+        ],
+        comment: false, //指标评分说明
+        summary: false, //评分总结
+        rating: 0, //是否手动评分 1-是 0-否
+        transfer: 1, //是否允许转交 1-是 0-否
+        isTransfer: true //是否允许转交 1-是 0-否
+      };
+      this.score_supervisor.push(score_supervisor);
+    },
+    setEmployeeList(item, index) {
+      this.flowIndex = index;
+      this.selected.employee = item.employeeList;
+      this.setAdministrator = true;
+    },
+    confirmAdministrator(e) {
+      this.score_supervisor[this.flowIndex].employeeList = e.employee.length > 0 ? e.employee : [];
+    },
+    submitForm() {}
+  }
+};
+</script>
+
+<style scoped="scoped">
+.border {
+  -webkit-appearance: none;
+  background-color: #fff;
+  background-image: none;
+  border-radius: 4px;
+  border: 1px solid #dcdfe6;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  color: #606266;
+  font-size: inherit;
+  height: auto;
+  outline: 0;
+  padding: 0 15px;
+  width: 250px;
+  position: relative;
+}
+.all {
+  font-size: 14px;
+  min-height: 600px;
+}
+.nweTitle {
+  margin: 30px 0;
+  padding-left: 10px;
+  border-left: 3px solid #409eff;
+}
+.flow {
+  margin-right: 30px;
+}
+.flow-item {
+  border-radius: 3px;
+  width: 120px;
+  height: 60px;
+  position: relative;
+  margin-top: 30px;
+  box-sizing: border-box;
+  text-align: center;
+  border: 1px solid #f4f6f9;
+  /* background-color: #f4f6f9; */
+}
+.flow-item .el-icon-error {
+  position: absolute;
+  right: 3px;
+  top: 3px;
+  display: none;
+}
+.flow-item:hover {
+  background-color: #e7f5fe;
+}
+.flow-item:hover .el-icon-error {
+  display: block !important;
+}
+.flow-item .el-icon-error:hover {
+  color: #f56c6c !important;
+}
+.flow-item .fontColorT {
+  margin-top: 10px;
+}
+.flow-index {
+  width: 120px;
+  text-align: center;
+  position: relative;
+  margin-top: 10px;
+}
+.flow-index span {
+  width: 22px;
+  height: 22px;
+  border-radius: 50%;
+  border: 1px solid #909399;
+  color: #909399;
+  display: inline-block;
+  line-height: 22px;
+  font-size: 12px;
+}
+.add-flow {
+  position: absolute;
+  right: -100px;
+  z-index: 2;
+  top: 0px;
+}
+.add-flow i {
+  font-size: 26px;
+}
+.isActive .flow-item {
+  background-color: #ecf5ff;
+  color: #409eff !important;
+}
+.isActive .flow-item .fontColorB,
+.isActive .fontColorT {
+  color: #409eff !important;
+}
+.isActive .flow-index span {
+  border: 1px solid #409eff !important;
+  color: #409eff !important;
+}
+.isActive .el-icon-error {
+  display: block;
+}
+.dian {
+  position: absolute;
+  height: 1px;
+  border-top: 1px dashed #ccc;
+  width: 127px;
+  top: 50%;
+  left: 71px;
+}
+.flow-box {
+  border: 1px dashed #409eff;
+  border-radius: 3px;
+  padding: 20px;
+  width: 100%;
+  position: absolute;
+  left: 0;
+  right: 0;
+  top: 140px;
+  background-color: #ecf5ff;
+  z-index: 2;
+}
+.jt-top {
+  position: absolute;
+  color: #409eff;
+  font-size: 18px;
+  font-weight: 600;
+  top: 120%;
+  left: 50px;
+  background-color: #fff;
+  z-index: 3;
+}
+.inputDc {
+  position: absolute;
+  top: 0;
+  width: 250px;
+  left: 0;
+  bottom: 0;
+  z-index: 9;
+}
+</style>

+ 470 - 0
src/components/flow/SuperiorFlow.vue

@@ -0,0 +1,470 @@
+<template>
+	<div class="all">
+		<div class="flex-box-ce" style="margin-left: 10px;margin-top: 30px;">
+			<span>上级评分:</span>
+			<el-switch v-model="enable" :active-value="1" :inactive-value="0"></el-switch>
+			<div v-if="enable" style="padding-left: 10px;">
+				评分权重:
+				<span class="blue">{{ num }}%</span>
+			</div>
+		</div>
+		<div class="flex-box-ce" v-show="enable == 1" style="position: relative;background-color: #F5F9FF;padding:20px;border-radius: 5px;margin-top: 20px;max-width: 1000px;">
+			<div
+				class="flex-box-v flex-center-center flex-d-wrap flow"
+				@click="activeFlow(index)"
+				:class="[isActive == index ? 'isActive' : '']"
+				v-for="(item, index) in score_supervisor"
+				:key="index"
+			>
+				<div class="flex-box-v flex-center-center  flow-item">
+					<div class="fontColorB font-flex-word" v-show="item.type == 1" style="width: 120px;">{{ options[item.manager_level - 1].label }}</div>
+					<div class="fontColorB font-flex-word" v-show="item.type == 2" style="width: 120px;">
+						<span v-if="item.employeeList.length > 0">{{ item.employeeList[0].name }}等({{ item.employeeList.length }})人</span>
+						<span v-else>未指定人员</span>
+					</div>
+					<div class="fontColorT font-flex-word" style="font-size: 12px;width: 120px;">评分权重:{{ item.weight }}%</div>
+					<i class="el-icon-error" style="font-size: 18px;color: #C0C4CC;" @click="deleteFlow(index)"></i>
+				</div>
+				<div class="flow-index">
+					<span></span>
+					<div class="dian"></div>
+					<i class="el-icon-arrow-up jt-top" v-if="isActive == index"></i>
+					<div class="add-flow" v-if="score_supervisor.length == index + 1">
+						<i class="el-icon-circle-plus-outline blue" style="cursor: pointer;" v-if="score_supervisor.length != 6" @click="addFlow()"></i>
+						<i class="el-icon-video-pause fontColorF" v-else></i>
+					</div>
+				</div>
+				<div class="flow-box" v-show="isActive == index">
+					<el-form label-width="80px">
+						<el-form-item>
+							<div class="form-titem">评分人:</div>
+							<el-radio-group v-model="item.type">
+								<el-radio :label="1">管理员(指定一级)</el-radio>
+								<el-radio :label="2">指定成员</el-radio>
+							</el-radio-group>
+							<div class="flex-box-ce" style="margin-top: 10px;" v-show="item.type == 1">
+								<span>被考评人的</span>
+								<el-select v-model="item.manager_level" placeholder="请选择级别" style="margin: 0 10px;">
+									<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+								</el-select>
+								<el-tooltip class="item" effect="dark" content="找不到确认人时,由上级管理员替代" placement="top-start">
+									<i class="fontColorF el-icon-warning"></i>
+								</el-tooltip>
+							</div>
+							<div class="border flex-box-ce" style="position: relative;" v-show="item.type == 2">
+								<div class="fontColorF flex-1" v-if="item.employeeList.length == 0">请选择指定人员</div>
+								<div v-else style="width: 180px;" class="font-flex-word">
+									<span v-for="(j, index2) in item.employeeList" :key="index2">
+										<i v-if="index2 != 0">,</i>
+										{{ j.name }}
+									</span>
+								</div>
+								<span v-if="item.employeeList.length > 0" class="blue">{{ item.employeeList.length }}人</span>
+								<i class="el-icon-arrow-down icon-right" v-else></i>
+								<div @click="setEmployeeList(item, index)" class="inputDc"></div>
+							</div>
+						</el-form-item>
+						<el-form-item>
+							<div class="form-titem">评分权重:</div>
+							<el-input
+								laceholder="请输入评分权重(0~100)"
+								@input="checkCountry($event, index)"
+								v-model="item.weight"
+								style="width:250px"
+								@blur="setInput()"
+								:id="index + 'input'"
+							>
+								<span slot="append">%</span>
+							</el-input>
+							<el-popover placement="bottom" width="450" trigger="hover">
+								<div style="padding: 10px;width: 100%;" class="flex-box"><img src="@/assets/image/ts.png" style="width: 100%; height: auto;" /></div>
+								<span slot="reference"><i class="fontColorF el-icon-warning"></i></span>
+							</el-popover>
+						</el-form-item>
+						<el-form-item>
+							<div class="form-titem">评分人多人时:</div>
+							<el-radio-group v-model="item.multi_executor">
+								<el-radio :label="1">各自评分取平均值</el-radio>
+								<el-radio :label="2">任一人评分</el-radio>
+							</el-radio-group>
+						</el-form-item>
+						<el-form-item>
+							<div class="form-titem">评分规则:</div>
+							<el-radio-group v-model="item.rule">
+								<el-radio :label="1">指标均要评分</el-radio>
+								<el-radio :label="2">只评总分</el-radio>
+							</el-radio-group>
+						</el-form-item>
+						<el-form-item>
+							<div class="form-titem">必填项:</div>
+							<el-checkbox v-model="item.comment">评分说明</el-checkbox>
+							<!-- <el-checkbox v-model="item.summary" >评分总结</el-checkbox> -->
+						</el-form-item>
+						<!-- <el-form-item label="手动评级:"></el-form-item> -->
+						<el-form-item>
+							<div class="form-titem">允许评分人:</div>
+							<el-checkbox v-model="item.isTransfer">转交</el-checkbox>
+						</el-form-item>
+					</el-form>
+				</div>
+			</div>
+		</div>
+
+		<!-- 选择子管理员 -->
+		<EmployeeSelector title="指定成员" :selected="selected" :is_filtration_creator="false" :visible.sync="setAdministrator" @confirm="confirmAdministrator" />
+	</div>
+</template>
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import BrawerBox from '@/components/public/BrawerBox';
+export default {
+	components: { EmployeeSelector, BrawerBox },
+	name: 'SuperiorFlow',
+	props: {
+		data: {
+			type: Object,
+			default: {}
+		}
+	},
+	data() {
+		return {
+			loading: false,
+			num: 100,
+
+			isActive: '0',
+			selected: { employee: [], dept: [] }, //执行者列表
+			setAdministrator: false,
+
+			flowIndex: 0,
+			enable: 0, //是否启用 1-启用 0-禁用
+			unique: 1, //评分人去重 1-是 0-否
+			score_supervisor: [
+				//上级配置列表
+				{
+					type: 1, //评分人类型 1-主管 2-指定成员 3-角色
+					manager_level: 1, //主管等级(只有评分人类型为主管时有效)
+					supervisor_confirm: 1, //找不到确认人时是否由上级主管代替(只有评分人类型为主管时有效) 1-是 0-否
+					is_supervisor_confirm: true,
+					// role_name: "creator",            //角色名(只有评分人类型为角色时有效)
+					employee_ids: [], //用户id列表(只有评分人类型为指定人员时有效)
+					employeeList: [], //人员集合
+					weight: 100, //权重
+					multi_executor: 1, //评分人多人时 1-各自评分 2-任一人评分
+					rule: 1, //评分规则 1-指标均要评分 2-评分总结
+					action: [
+						//必填项
+						'comment', //指标评分说明
+						'summary' //评分总结
+					],
+					comment: false, //指标评分说明
+					summary: false, //评分总结
+					rating: 0, //是否手动评分 1-是 0-否
+					transfer: 1, //是否允许转交 1-是 0-否
+					isTransfer: true //是否允许转交 1-是 0-否
+				}
+			],
+			options: [
+				{
+					value: 1,
+					label: '直接管理员'
+				},
+				{
+					value: 2,
+					label: '二级管理员'
+				},
+				{
+					value: 3,
+					label: '三级管理员'
+				},
+				{
+					value: 4,
+					label: '四级管理员'
+				},
+				{
+					value: 5,
+					label: '五级管理员'
+				},
+				{
+					value: 6,
+					label: '六级管理员'
+				}
+			]
+		};
+	},
+	watch: {
+		data(val) {
+			if (val.enable) {
+				this.recoverData();
+			}
+		},
+		enable(val) {
+			this.setInput(!val);
+		}
+	},
+	created() {},
+	mounted() {},
+	methods: {
+		recoverData() {
+			let data = this.data;
+			let employeeMap = this.$getEmployeeList();
+			this.enable = data.enable;
+			this.unique = data.unique;
+			data.supervisor.forEach(item => {
+				item.is_supervisor_confirm = item.supervisor_confirm == 1 ? true : false;
+				item.manager_level = item.manager_level == 0 ? 1 : item.manager_level;
+				item.employeeList = item.employee_ids.map(item => {
+					return employeeMap[item];
+				});
+				item.comment = item.action.indexOf('comment') >= 0 ? true : false;
+				item.summary = item.action.indexOf('summary') >= 0 ? true : false;
+				item.isTransfer = item.transfer == 1 ? true : false;
+			});
+			// 注意:el-checked绑定的数据要在data里面一开始就有,不后期追加,会导致点击失效,解决方案如下
+			this.score_supervisor = JSON.parse(JSON.stringify(data.supervisor));
+		},
+		// 最大值不能大于100
+		checkCountry(e, index) {
+			//解决v-model与oninput同时使用失效问题
+			var dom = document.getElementById(index + 'input');
+			var value = dom.value;
+			//写你自己的输入规则
+			value = value.replace(/[^\d]/g, '');
+			if (value > 100) {
+				this.$set(this.score_supervisor[index], 'weight', 0);
+				this.$message.error('不能大于100');
+				return false;
+			}
+			dom.value = value; //输入框赋值
+			this.$set(this.score_supervisor[index], 'weight', dom.value);
+		},
+		//计算权重
+		setInput(is) {
+			if (is) {
+				this.$emit('setInput', '', false);
+			} else {
+				let num = 0;
+				this.score_supervisor.forEach(item => {
+					num += Number(item.weight);
+				});
+				this.num = num;
+				// console.log(num);
+				// this.$emit('setInput', num, true);
+			}
+		},
+		activeFlow(index) {
+			this.isActive = index;
+		},
+		//删除主管
+		deleteFlow(index) {
+			this.$confirm('确定删除', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			})
+				.then(() => {
+					if (this.score_supervisor.length == 1) {
+						this.$message.error('至少保留一个');
+						return false;
+					}
+					this.score_supervisor.splice(index, 1);
+					this.isActive = this.score_supervisor.length - 1;
+					this.setInput();
+				})
+				.catch(() => {});
+		},
+		//添加主管
+		addFlow() {
+			if (this.score_supervisor.length == 6) {
+				return false;
+			}
+			var leth = this.score_supervisor.length + 1;
+			var score_supervisor = {
+				type: 1, //评分人类型 1-主管 2-指定成员 3-角色
+				manager_level: leth, //主管等级(只有评分人类型为主管时有效)
+				supervisor_confirm: 1, //找不到确认人时是否由上级主管代替(只有评分人类型为主管时有效) 1-是 0-否
+				is_supervisor_confirm: true,
+				// role_name: "creator",            //角色名(只有评分人类型为角色时有效)
+				employee_ids: [], //用户id列表(只有评分人类型为指定人员时有效)
+				employeeList: [], //人员集合
+				weight: 0, //权重
+				multi_executor: 1, //评分人多人时 1-各自评分 2-任一人评分
+				rule: 1, //评分规则 1-指标均要评分 2-评分总结
+				action: [
+					//必填项
+					'comment', //指标评分说明
+					'summary' //评分总结
+				],
+				comment: false, //指标评分说明
+				summary: false, //评分总结
+				rating: 0, //是否手动评分 1-是 0-否
+				transfer: 1, //是否允许转交 1-是 0-否
+				isTransfer: true //是否允许转交 1-是 0-否
+			};
+			this.score_supervisor.push(score_supervisor);
+		},
+		setEmployeeList(item, index) {
+			this.flowIndex = index;
+			this.selected.employee = item.employeeList;
+			this.setAdministrator = true;
+		},
+		confirmAdministrator(e) {
+			this.score_supervisor[this.flowIndex].employeeList = e.employee.length > 0 ? e.employee : [];
+		},
+		submitForm() {}
+	}
+};
+</script>
+
+<style scoped="scoped">
+.border {
+	-webkit-appearance: none;
+	background-color: #fff;
+	background-image: none;
+	border-radius: 4px;
+	border: 1px solid #dcdfe6;
+	-webkit-box-sizing: border-box;
+	box-sizing: border-box;
+	color: #606266;
+	font-size: inherit;
+	height: auto;
+	outline: 0;
+	padding: 0 15px;
+	width: 250px;
+	position: relative;
+}
+.all {
+	font-size: 14px;
+}
+.nweTitle {
+	margin: 30px 0;
+	padding-left: 10px;
+	border-left: 3px solid #409eff;
+}
+.flow {
+	margin-right: 30px;
+	cursor: pointer;
+}
+.flow-item {
+	border-radius: 3px;
+	width: 120px;
+	/* height: 50px; */
+	position: relative;
+	/* margin-top: 30px; */
+	box-sizing: border-box;
+	text-align: center;
+	/* border: 1px solid #f4f6f9; */
+}
+.flow-item .el-icon-error {
+	position: absolute;
+	right: 0px;
+	top: -14px;
+	display: none;
+}
+.flow-item:hover {
+	/* background-color: #e7f5fe; */
+	font-weight: 600;
+	font-size: 16px;
+}
+.flow-item:hover .el-icon-error {
+	display: block !important;
+}
+.flow-item .el-icon-error:hover {
+	color: #f56c6c !important;
+}
+.flow-item .fontColorT {
+	margin-top: 10px;
+}
+.flow-index {
+	width: 120px;
+	text-align: center;
+	position: relative;
+	margin-top: 10px;
+}
+.flow-index span {
+	width: 18px;
+	height: 18px;
+	border-radius: 50%;
+	border: 1px solid #ccc;
+	color: #909399;
+	display: inline-block;
+	line-height: 22px;
+	font-size: 12px;
+	position: relative;
+}
+.flow-index span::after {
+	width: 10px;
+	height: 10px;
+	content: ' ';
+	top: 50%;
+	left: 50%;
+	margin-top: -5px;
+	margin-left: -5px;
+	background-color: #409eff;
+	border-radius: 50%;
+	position: absolute;
+}
+.add-flow {
+	position: absolute;
+	right: -100px;
+	z-index: 2;
+	top: 0px;
+}
+.add-flow i {
+	font-size: 26px;
+}
+.isActive .flow-item {
+	/* background-color: #ecf5ff; */
+	font-weight: 600;
+	font-size: 16px;
+	color: #409eff !important;
+}
+.isActive .flow-item .fontColorB,
+.isActive .fontColorT {
+	color: #409eff !important;
+}
+.isActive .flow-index span {
+	border: 1px solid #409eff !important;
+	color: #409eff !important;
+}
+.isActive .el-icon-error {
+	display: block;
+}
+.dian {
+	position: absolute;
+	height: 1px;
+	border-top: 1px dashed #ccc;
+	width: 127px;
+	top: 40%;
+	left: 71px;
+}
+.flow-box {
+	/* border: 1px dashed #409eff; */
+	border-radius: 3px;
+	padding: 20px;
+	width: 1000px;
+	position: absolute;
+	left: 0;
+	right: 0;
+	top: 146px;
+	background-color: rgb(245, 249, 255);
+	z-index: 2;
+}
+.jt-top {
+	position: absolute;
+	color: #409eff;
+	font-size: 18px;
+	font-weight: 600;
+	top: 50px;
+	left: 50px;
+	background-color: #fff;
+	z-index: 3;
+}
+.inputDc {
+	position: absolute;
+	top: 0;
+	width: 250px;
+	left: 0;
+	bottom: 0;
+	z-index: 9;
+}
+</style>

+ 667 - 0
src/components/public/ActionPlan.vue

@@ -0,0 +1,667 @@
+<template>
+  <div>
+    <el-drawer title="执行计划" :visible.sync="showDrawerTow" direction="btt" class="all-derawer" :before-close="handleClose">
+      <div class="flex-box" style="height: calc(100vh - 10%);">
+        <div class="drawer-left scroll-bar">
+          <div class="draft-content" v-for="(item, index) in actionPlanList" :key="index">
+            <div class="drawer-left-title font-flex-word">{{ item.name }}</div>
+            <div
+              class="drawer-item  flex-box-ce"
+              :class="[activeDrawerIndex == index + '-' + index2 ? 'active-drawer-item' : '']"
+              v-for="(item2, index2) in item.index"
+              :key="index2"
+              @click="activeItem(index, index2)"
+            >
+              <div style="width:200px;" class="font-flex-word">{{ item2.name }}</div>
+              <div style="padding: 0 10px;" class="blue">({{ item2.schedule.length }})</div>
+            </div>
+          </div>
+        </div>
+        <div class="drawer-right scroll-bar flex-1" style="overflow: auto;background-color: #fff;">
+          <div class="drawer-right-header">
+            <div class="drawer-right-title">{{ indexItem.name }}</div>
+            <div class="yellow" style="margin: 10px 0;">考核标准</div>
+            <div class="remark">{{ indexItem.per_remark }}</div>
+          </div>
+          <div class="drawer-right-main">
+            <div class="flex-box-ce">
+              <div class="flex-1" style="font-size: 16px;">执行计划</div>
+              <el-button type="primary" size="mini" @click="addPlan()" v-if="!isShowAdd && !isFill && isOperation && isCz">新增</el-button>
+            </div>
+          </div>
+          <div class="flex-box" v-if="indexItem.schedule.length > 0">
+            <div class="plan-left flex-1" style="padding-bottom: 60px;">
+              <div
+                class="plan-left-content flex-box"
+                @click="activePlan(item, index)"
+                :class="[activePlanIndex == index ? 'active-drawer-item' : '']"
+                v-for="(item, index) in indexItem.schedule"
+                :key="index"
+              >
+                <div class="plan-title flex-1">{{ item.title }}</div>
+                <template v-if="item.images">
+                   <i v-if="item.images.length > 0" class="el-icon-picture fontColorB" style="font-size: 18px;padding-right: 10px;"></i>
+                </template>
+                <i v-if="item.append" class="el-icon-paperclip fontColorB" style="font-size: 18px;padding-right: 10px;"></i>
+                <div style="position: relative;top: 3px;">{{ item.date }}</div>
+              </div>
+            </div>
+            <div class="plan-right flex-3">
+              <div class="flex-box-end btns" v-if="isOperation && isCz">
+                <el-button class="dangerBtn" size="mini" round plain @click="deletePlan()">删除</el-button>
+                <el-button class="primaryBtn" size="mini" round @click="saveActionPlan()">提交</el-button>
+              </div>
+              <div class="plan-right-date fontColorB">{{ planData.date }}</div>
+              <el-input
+                type="textarea"
+                @blur="inputBlur"
+                @focus="inputFocus"
+                @input="inputText"
+                class="plan-right-title"
+                rows="4"
+                clearable
+                ref="inputTitle"
+                placeholder="请输入执行计划内容"
+                v-model="planData.title"
+                maxlength="200"
+                show-word-limit
+              ></el-input>
+              <el-input
+                ref="inputTitle2"
+                type="textarea"
+                @blur="inputBlur"
+                @focus="inputFocus"
+                @input="inputText"
+                class="plan-textarea"
+                rows="5"
+                clearable
+                maxlength="500"
+                show-word-limit
+                placeholder="选填,请输入备注"
+                v-model="planData.remark"
+              ></el-input>
+              <div class="flex-box">
+                <uploadOss
+                  :headers="Xtoken"
+                  class="avatar-uploader"
+                  :action="'https://' + 'integralsys.oss-cn-shenzhen.aliyuncs.com'"
+                  :show-file-list="true"
+                  :file-list="img_fileList"
+                  :on-success="handleFilesSuccess"
+                  :on-preview="onFilePreView"
+                  :before-upload="beforeUpload"
+                  :on-remove="onFileRemove"
+                  :limit="3"
+                  :multiple="true"
+                >
+                  <el-button class="primaryBtn" icon="el-icon-picture-outline" plain size="small">图片</el-button>
+                  <!-- (最多选择3张) -->
+                </uploadOss>
+                <div style="width: 30px;"></div>
+                <uploadOss
+                  class="avatar-uploader"
+                  :headers="Xtoken"
+                  :show-file-list="true"
+                  :multiple="true"
+                  ref="upload"
+                  :limit="1"
+                  :file-list="file_fileList"
+                  :action="'https://' + 'integralsys.oss-cn-shenzhen.aliyuncs.com'"
+                  :on-preview="onFilePreView2"
+                  :on-remove="handleRemove"
+                  :on-success="handleSuccess"
+                  :before-upload="beforeFilesUpload"
+                >
+                  <el-button class="primaryBtn" icon="el-icon-paperclip" plain size="small">附件</el-button>
+                  <!-- (仅支持上传xlsx,xls,doc,docx,pdf,txt,最多一份附件) -->
+                </uploadOss>
+              </div>
+            </div>
+          </div>
+          <div v-else style="background-color: #fff;padding-top: 10px;">
+            <el-alert title="执行计划用来做什么?" type="info" description show-icon>
+              <div class="alert-text">
+                1.可以填写如何达成指标的计划,并记录进展行动
+                <br />
+                2.填写的内容将给评分人作为参考
+              </div>
+            </el-alert>
+            <NoData content="暂无执行计划" imgW="150px" imgH="100px">
+              <el-button type="primary" round style="width: 100px;margin: 0 auto;margin-top: 10px;" @click="addPlan()" v-if="isOperation && isCz">
+                <i class="el-icon-plus"></i>
+                新建
+              </el-button>
+            </NoData>
+          </div>
+        </div>
+      </div>
+    </el-drawer>
+    <el-dialog title="图片查看" :visible.sync="isShowImg" width="50%" >
+      <img :src="imgUrl" style="width: 100%;">
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="isShowImg = false">取 消</el-button>
+        <el-button type="primary" @click="isShowImg = false">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import uploadOss from '@/components/public/upload';
+export default {
+  components: { uploadOss },
+  name: 'ActionPlan',
+  props: {
+    id: {
+      //员工考核记录的ID
+      type: Number,
+      default: 0
+    },
+    // 是否显示组件
+    showDrawer: {
+      type: Boolean,
+      default: false
+    },
+    //数据源
+    apList: {
+      type: Array,
+      default: () => {
+        return [];
+      }
+    },
+    //默认显示的指标 [0]:维度下标,[1]:指标下标
+    planIndex: {
+      type: Array,
+      default: () => {
+        return [];
+      }
+    },
+    //绩效考核的被考核人ID
+    assessId: {
+      type: Number,
+      default: 0
+    },
+    // 是否在关闭时刷新外面的表格,和是否可以操作
+    isCz: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data() {
+    return {
+      drawer: false,
+      activeDrawerIndex: '0-0',
+      actionPlanList: [],
+      indexItem: {
+        //选中的指标
+        schedule: []
+      },
+      activePlanIndex: 0,
+      planData: {
+        //执行计划(单个)
+        title: '',
+        employee_id: '',
+        images: [],
+        append: '', //附件
+        appendName: '' //附件名称
+      },
+      planData2: {}, //备用数据,当不修改时使用
+      showDrawerTow: false,
+      isFill: false, //是否填写了
+      isFill2: false, //添加执行计划时用,判断是要清空添加的,还是还原编辑的数据
+      isShowAdd: false,
+      isOperation: false, //判断是否能操作执行计划
+
+      selectItemIndex: 0, //维度当前下标
+
+      // 上传图标与附件
+      Xtoken: { 'X-Token': this.$getToken() },
+      img_fileList: [], // 图片附件
+      file_fileList: [], //文件附件
+      imgs: [],
+      doc: '',
+      isShowImg:false,
+      imgUrl:'',
+    };
+  },
+  watch: {
+    showDrawer(val) {
+      this.showDrawerTow = val;
+      if (val) {
+        if (this.assessId == this.$getUserData().id) {
+          this.isOperation = true;
+        }
+        this.actionPlanList = this.apList;
+        this.getShowData();
+      }
+    }
+  },
+  methods: {
+    // 图片上传
+    beforeUpload(file) {
+      const isJPG = /^image\/(jpeg|png|jpg)$/.test(file.type);
+      const isLt2M = file.size / 1024 / 1024 < 2;
+      if (!isJPG) {
+        this.$message.error('上传图片只能是 jpeg|png|jpg 格式!');
+      }
+      if (!isLt2M) {
+        this.$message.error('上传图片大小不能超过 2MB!');
+      }
+      return isJPG && isLt2M;
+    },
+    onFilePreView(file) {
+      this.imgUrl=file.url;
+      this.isShowImg=true;
+    },
+    onFilePreView2(file) {
+      window.open(file.url, '_blank');
+    },
+    onFileRemove(file, fileList) {
+      this.img_fileList = fileList;
+      this.planData.images = [];
+      let images = [];
+      fileList.forEach((element, index) => {
+        images.push({ url: element.url, name: element.name });
+      });
+      this.planData.images = images;
+      this.isFill = true;
+    },
+    handleFilesSuccess(response, file, fileList) {
+      this.img_fileList = fileList;
+      this.planData.images = [];
+      let images = [];
+      fileList.forEach((element, index) => {
+        images.push({ url: element.url, name: element.name });
+      });
+      this.planData.images = images;
+      this.isFill = true;
+    },
+
+    handleSuccess(response, file, fileList) {
+      this.file_fileList = fileList;
+      this.planData.append = fileList[0].url;
+      this.planData.append_name = fileList[0].name;
+      this.isFill = true;
+    },
+    handleRemove(file, fileList) {
+      this.file_fileList = fileList;
+      this.planData.append = '';
+      this.planData.append_name = '';
+      this.isFill = true;
+    },
+    beforeFilesUpload(file) {
+      const $ext_list = ['xlsx', 'xls', 'doc', 'docx', 'pdf'];
+      const isLt2M = file.size / 1024 / 1024 < 5;
+      let len = file.name.split('.').length - 1;
+      const $ext_name = file.name.split('.')[len];
+      let isFile = $ext_list.indexOf($ext_name) != -1;
+      if (!isLt2M) {
+        this.$message.error('文件大小不能超过 5MB!');
+      }
+      if (!isFile) {
+        this.$message.warning('文件格式上传错误,仅支持上传xlsx,xls,doc,docx,pdf)');
+      }
+      return isFile && isLt2M;
+    },
+
+    deletePlan() {
+      this.$confirm('确认删除执行计划:' + this.planData.title + '?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          let data = {
+            action_id: this.planData.id ? this.planData.id : '', //执行计划id 编辑的时候要传
+            package_employee_id: this.id, //员工考核记录信息id
+            index_id: this.indexItem.id, //指标id
+            dimension_xb: this.selectItemIndex
+          };
+          if (this.planData.id) {
+            this.$axios('post', 'api/per/package/action/del', data).then(res => {
+              this.indexItem.schedule.splice(this.activePlanIndex, 1);
+              this.activePlanIndex = 0;
+              this.planData = this.indexItem.schedule[0] ? this.indexItem.schedule[0] : [];
+              this.isFill = false;
+              this.isFill2 = false;
+              this.$message.success('删除成功');
+            });
+          } else {
+            this.indexItem.schedule.splice(this.activePlanIndex, 1);
+            this.activePlanIndex = 0;
+            this.planData = this.indexItem.schedule[0] ? this.indexItem.schedule[0] : [];
+            this.isFill = false;
+            this.isFill2 = false;
+            this.$message.success('删除成功');
+          }
+        })
+        .catch(() => {});
+    },
+    // 添加
+    addPlan() {
+      var len = this.indexItem.schedule.length;
+     this.img_fileList=[]; // 图片附件
+     this.file_fileList=[]; //文件附件
+      let obj = {
+        date: this.$moment().format('YYYY-MM-DD'),
+        title: '执行计划' + (len + 1),
+        remark: '',
+        images: [],
+        append: '', //附件
+        appendName: '' //附件名称
+      };
+      this.indexItem.schedule.unshift(obj);
+      if (this.indexItem.schedule.length == 1) {
+        this.planData = this.indexItem.schedule[0];
+        this.$nextTick(() => {
+          this.$refs.inputTitle.focus();
+          this.isFill = true;
+        });
+      } else {
+        this.activePlanIndex = 0;
+        this.planData = this.indexItem.schedule[0];
+        this.$nextTick(() => {
+          this.$refs.inputTitle.focus();
+          this.isFill = true;
+        });
+      }
+      this.isFill2 = true;
+    },
+    // 提交执行计划
+    saveActionPlan(f = function() {}) {
+      if (!this.planData.title) {
+        this.$message.error('请输入执行计划内容');
+        return false;
+      }
+      this.isFill = false;
+      let data = {
+        action_id: this.planData.id ? this.planData.id : '', //执行计划id 编辑的时候要传
+        dimension_xb: this.selectItemIndex,
+        package_employee_id: this.id, //员工考核记录信息id
+        index_id: this.indexItem.id, //指标id
+        title: this.planData.title, //标题
+        remark: this.planData.remark, //内容
+        images: JSON.stringify(this.planData.images),
+        append: this.planData.append,
+        append_name: this.planData.append_name
+      };
+      this.$axios('post', '/api/per/package/action', data).then(res => {
+        this.$message.success('填写成功');
+        this.planData.id = res.data.data.id;
+        f();
+      });
+    },
+    setActivePlan(item, index) {
+      this.planData = item;
+      this.setFlie();
+      this.activePlanIndex = index;
+      this.isFill = false;
+      this.isFill2 = false;
+    },
+    // 点击执行计划
+    activePlan(item, index) {
+      if (this.activePlanIndex == index) {
+        return false;
+      }
+      if (this.isFill) {
+        this.$confirm('请确认提交执行计划:' + this.planData.title + '?', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(() => {
+            this.saveActionPlan(() => {
+              this.setActivePlan(item, index);
+            });
+          })
+          .catch(() => {
+            if (this.isFill2) {
+              this.indexItem.schedule.splice(this.activePlanIndex, 1);
+              this.setActivePlan(item, index);
+            } else {
+              this.indexItem.schedule[this.activePlanIndex] = this.planData2;
+              this.planData = this.planData2;
+              this.$nextTick(() => {
+                setTimeout(() => {
+                  this.setActivePlan(item, index);
+                }, 200);
+              });
+            }
+          });
+      } else {
+        this.planData2 = JSON.parse(JSON.stringify(item));
+        this.setActivePlan(item, index);
+      }
+    },
+    setActiveItem(index, index2) {
+      this.getShowData(index, index2);
+      this.activeDrawerIndex = index + '-' + index2;
+      this.activePlanIndex = 0;
+      this.isFill = false;
+      this.isFill2 = false;
+    },
+    // 点击指标
+    activeItem(index, index2) {
+      this.selectItemIndex = index;
+      if (this.activeDrawerIndex == index + '-' + index2) {
+        return false;
+      }
+      if (this.isFill) {
+        this.$confirm('请确认提交执行计划:' + this.planData.title + '?', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(() => {
+            this.saveActionPlan(() => {
+              this.setActiveItem(index, index2);
+            });
+          })
+          .catch(() => {
+            if (this.isFill2) {
+              this.indexItem.schedule.splice(this.activePlanIndex, 1);
+              this.setActiveItem(index, index2);
+            } else {
+              this.indexItem.schedule[this.activePlanIndex] = this.planData2;
+              this.planData = this.planData2;
+              this.$nextTick(() => {
+                setTimeout(() => {
+                  this.setActiveItem(index, index2);
+                }, 200);
+              });
+            }
+          });
+      } else {
+        this.setActiveItem(index, index2);
+      }
+    },
+    // 设置选中数据
+    getShowData(index, index2) {
+      if (index != undefined) {
+        this.indexItem = this.actionPlanList[index].index[index2];
+        this.planData = this.indexItem.schedule[0];
+        this.setFlie();
+        if (this.planData) {
+          this.planData2 = JSON.parse(JSON.stringify(this.planData));
+        }
+      } else {
+        if (this.planIndex.length > 0) {
+          //如果有指定下标展示
+          this.indexItem = this.actionPlanList[this.planIndex[0]].index[this.planIndex[1]];
+          this.planData = this.indexItem.schedule[0];
+          this.selectItemIndex = this.planIndex[0];
+          this.setFlie();
+          if (this.planData) {
+            this.planData2 = JSON.parse(JSON.stringify(this.planData));
+          }
+          this.activeDrawerIndex = this.planIndex[0] + '-' + this.planIndex[1];
+        } else {
+          this.indexItem = this.actionPlanList[0].index[0];
+          this.planData = this.indexItem.schedule[0];
+          this.setFlie();
+          if (this.planData) {
+            this.planData2 = JSON.parse(JSON.stringify(this.planData));
+          }
+        }
+      }
+    },
+    setFlie() {
+      this.img_fileList = [];
+      this.file_fileList = [];
+      if (this.planData) {
+        this.img_fileList = this.planData.images;
+        if (this.planData.append) {
+          this.file_fileList = [{ name: this.planData.append_name, url: this.planData.append }];
+        }
+      }
+    },
+    handleClose(done) {
+      this.$emit('update:showDrawer', false);
+      if (this.isCz) {
+        this.$emit('confirm');
+      }
+      this.activeDrawerIndex = '0-0';
+      this.activePlanIndex = 0;
+      this.showDrawerTow = false;
+      this.isFill = false; //是否填写了
+      this.isFill2 = false; //添加执行计划时用,判断是要清空添加的,还是还原编辑的数据
+      this.isShowAdd = false;
+        done();
+    },
+    // 监听是否填写
+    inputText(val) {
+      if (!this.isFill) {
+        this.isFill = true;
+      }
+    },
+    inputBlur() {
+      this.isShowAdd = false;
+    },
+    inputFocus() {
+      this.isShowAdd = true;
+    }
+  }
+};
+</script>
+
+<style scoped="scoped">
+.all-derawer ::v-deep.el-drawer {
+  height: 90% !important;
+  border-radius: 10px 10px 0 0;
+  background-color: #f5f7fa;
+  min-width: 1100px !important;
+}
+.all-derawer ::v-deep.el-drawer__header {
+  background-color: #f5f7fa;
+  padding: 12px 20px;
+  margin-bottom: 0px;
+  font-size: 16px;
+}
+::v-deep .el-upload-list__item-name {
+  max-width: 250px;
+}
+::v-deep :focus {
+  outline: 0;
+}
+.btns {
+  position: absolute;
+  right: 20px;
+  top: 16px;
+  z-index: 999;
+}
+.plan-right {
+  padding: 20px;
+  position: relative;
+  background-color: #f5f7fa;
+  min-height: 600px;
+}
+.plan-right-date {
+  text-align: center;
+  position: relative;
+  margin-bottom: 30px;
+}
+.plan-textarea ::v-deep textarea {
+  background-color: #f5f7fa;
+  border: none;
+}
+.plan-right-title {
+  border-bottom: 1px solid #f1f1f1;
+}
+.plan-right-title ::v-deep textarea {
+  background-color: #f5f7fa;
+  border: none;
+}
+.drawer-left {
+  background-color: #fff;
+  padding: 0 15px;
+  width: 280px;
+  border-right: 1px solid #f1f1f1;
+  overflow: auto;
+  padding-bottom: 60px;
+}
+.drawer-left-title {
+  padding: 16px 0;
+  font-weight: 600;
+  font-size: 16px;
+  color: #222;
+  border-bottom: 1px solid #f1f1f1;
+}
+.drawer-item {
+  padding: 16px 0;
+  cursor: pointer;
+}
+.drawer-item:hover {
+  background-color: #f5f7fa;
+}
+.drawer-left .active-drawer-item {
+  background-color: #f5f7fa;
+  border-right: 2px solid #409eff;
+}
+.plan-left-content:hover {
+  background-color: #f5f7fa;
+}
+.plan-left .active-drawer-item {
+  background-color: #f5f7fa;
+}
+.drawer-right-header {
+  background-color: #fff;
+  border-bottom: 1px solid #f1f1f1;
+  padding: 20px;
+}
+.drawer-right-main {
+  padding: 0px 20px;
+  height: 50px;
+  line-height: 50px;
+  background-color: #fff;
+  border-bottom: 1px solid #f1f1f1;
+}
+.plan-title {
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 2;
+  overflow: hidden;
+  padding-right: 5px;
+}
+.plan-left {
+  background-color: #fff;
+  border-right: 1px solid #f1f1f1;
+  overflow: auto;
+}
+.remark {
+  height: 100px;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 6;
+  overflow: hidden;
+}
+.plan-left-content {
+  border-bottom: 1px solid #f1f1f1;
+  padding: 16px;
+  cursor: pointer;
+  box-sizing: border-box;
+}
+.plan-left-content div:nth-child(2) {
+  font-size: 12px;
+  color: #666666;
+}
+</style>

+ 144 - 0
src/components/public/BrawerBox.vue

@@ -0,0 +1,144 @@
+<template>
+  <el-drawer :visible.sync="showDrawerTow" :append-to-body="true" :before-close="handleClose" @open="openD()" :with-header="false" :wrapperClosable="closeModal">
+    <input ref="input" tabindex="0" style="position: absolute;right: 0;top: 0;width: 0px;opacity: 0;" />
+    <header class="drawer-header flex-box-ce">
+      <span class="flex-1">{{ drawerTitle }}</span>
+      <i v-if="closeModal" @click="handleClose2" class="el-icon-close"></i>
+    </header>
+    <div class="drawer-main"><slot name="main"></slot></div>
+    <footer v-if="footNo" class="drawer-footer flex-box-end flex-v-ce"><slot name="footer"></slot></footer>
+  </el-drawer>
+</template>
+<script>
+export default {
+  name: 'BrawerBox',
+  props: {
+    showDrawer: {
+      type: Boolean,
+      default: false
+    },
+    drawerTitle: {
+      type: String,
+      default: '设置'
+    },
+    closeModal: {
+      //是否可以通过点击 modal 关闭 Dialog
+      type: Boolean,
+      default: true
+    },
+    footNo: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data() {
+    return {
+      showDrawerTow: false
+    };
+  },
+  watch: {
+    showDrawer(val) {
+      this.showDrawerTow = val;
+      if (val) {
+        this.openend();
+      }
+    }
+  },
+  methods: {
+    // 解决打开首页输入组件自动聚焦问题
+    openend() {
+      this.$nextTick(() => {
+        this.$refs.input.focus();
+        setTimeout(() => {
+          this.$refs.input.blur();
+        }, 200);
+      });
+    },
+    openD() {},
+    handleClose(done) {
+      this.$emit('update:showDrawer', false);
+      this.showDrawerTow = false;
+      done();
+    },
+    handleClose2() {
+      this.$emit('update:showDrawer', false);
+      this.showDrawerTow = false;
+    }
+  }
+};
+</script>
+
+<style scoped="scoped">
+.el-icon-close {
+  cursor: pointer;
+  padding: 8px;
+  position: relative;
+  right: -8px;
+}
+.el-icon-close:hover {
+  color: #f56c6c;
+}
+::v-deep .li .el-checkbox__label {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  display: block;
+  width: 440px;
+}
+::v-deep .li .el-radio__label {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  display: block;
+  width: 100%;
+  max-width: 440px;
+}
+::v-deep .el-drawer {
+  width: 500px !important;
+}
+.drawer-header {
+  height: 60px;
+  border-bottom: 1px solid #ebebeb;
+  line-height: 60px;
+  font-size: 18px;
+  font-weight: 500;
+  padding: 0 20px;
+}
+.drawer-main {
+  height: calc(100vh - 120px);
+  padding: 20px;
+  overflow-y: scroll;
+  min-width: 450px;
+  font-size: 14px;
+}
+.drawer-main::-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);
+}
+.drawer-main::-webkit-scrollbar {
+  width: 5px;
+  background-color: rgba(201, 201, 201, 0);
+}
+.drawer-main::-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-main ::v-deep .flex-box-ce{
+	display: flex !important;
+	align-items: center !important;
+}
+.drawer-footer {
+  background-color: #fff;
+  border-top: 1px solid #ebebeb;
+  padding: 10px 20px;
+  font-size: 14px;
+}
+::v-deep .width-150 {
+  width: 180px;
+}
+::v-deep :focus {
+  outline: 0;
+}
+</style>

+ 155 - 0
src/components/public/ClassSet.vue

@@ -0,0 +1,155 @@
+<template>
+  <div class="inputs" :style="inputsStyle">
+    <div class="flex-box inputs-h">
+      <div class="flex-3" style="margin-right: 20px;">等级名称</div>
+      <div class="flex-5">分数区间范围</div>
+    </div>
+    <div class="flex-box inputs-m" v-for="(item, index) in inputsList" :key="index">
+      <div class="flex-3" style="margin-right: 20px;"><el-input :disabled="readOnly" v-model="item.name" placeholder="请输入" ></el-input></div>
+      <div class="flex-5 flex-box-ce">
+        <el-input v-model.number="item.min"  disabled style="width: 80px;"></el-input>
+        <span class="inputs-text">
+          <span>≤</span>
+            分数 <
+        </span>
+        <el-input
+         :disabled="readOnly"
+          v-model.number="item.max"
+          style="width: 80px"
+          :min="item.min"
+          
+          @input="checkCountry($event, index)"
+          :id="index + 'input'"
+          placeholder="请输入"
+          @blur="InputBiur($event, index)"
+        ></el-input>
+        <i class="el-icon-delete" v-if="inputsList.length!=1 && !readOnly" @click="deleteInput(index)"></i>
+      </div>
+    </div>
+    <div v-if="!readOnly" class="fontColorF" style="font-size: 12px;margin: 10px 0;text-align: center;">等级从劣到优设置</div>
+    <div v-if="!readOnly" class="blue inputs-add">
+      <span @click="addInput()">
+        <i class="el-icon-circle-plus-outline"></i>
+        添加等级
+      </span>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'ClassSet',
+  props: {
+    readOnly: {//只读
+      type: Boolean,
+      default: false,
+    },
+    inputs: {
+      type: Array,
+      default: () => {
+        return [];
+      }
+    },
+    inputsStyle: {
+      type: Object,
+      default: () => {
+        return { paddingLeft: '0px', width: '450px' };
+      }
+    }
+  },
+  data() {
+    return {
+      inputsList: [{ name: 'C', min: 0, max: 60 }, { name: 'B', min: 60, max: 80 }, { name: 'A', min: 80, max: 100 }], //分值区间
+      isSave: true
+    };
+  },
+  watch: {
+    inputs(val) {
+      if (val.length > 0) {
+        this.inputsList = val;
+      }
+    }
+  },
+  methods: {
+    checkCountry(e, index) {
+      //解决v-model与oninput同时使用失效问题
+      var dom = document.getElementById(index + 'input');
+      var value = dom.value;
+      //写你自己的输入规则
+      value = value.replace(/[^\d]/g, '');
+      dom.value = value; //输入框赋值
+      this.$set(this.inputsList[index], 'max', dom.value);
+    },
+    // 监听最大值输入
+    InputBiur(e, index) {
+      this.isSave = true;
+      var max = Number(this.inputsList[index].max);
+      var min = Number(this.inputsList[index].min);
+      if (max == 0) {
+        return false;
+      }
+      if (min >= max) {
+        this.$message.error('不能小于或等于' + min);
+        this.$set(this.inputsList[index], 'max', 0);
+        this.isSave = false;
+        return false;
+      }
+      if (this.inputsList[index + 1]) {
+        this.$set(this.inputsList[index + 1], 'min', max);
+      }
+    },
+    addInput() {
+      if (this.inputsList.length == 10) {
+        this.$message.error('最高10个级别');
+        return false;
+      }
+      var max = this.inputsList[this.inputsList.length - 1].max;
+      this.inputsList.push({ name: '', min: max, max: 0 });
+    },
+    deleteInput(index) {
+      // if (index == 0) {
+      //   this.$message.error('至少保留一个等级');
+      //   return false;
+      // }
+      var min = this.inputsList[index].min; //获取当前元素最小值
+      this.inputsList.splice(index, 1);
+      if (index != this.inputsList.length) {
+        //当删除不是最后一位时
+        this.$set(this.inputsList[index], 'min', min);
+      }
+    }
+  }
+};
+</script>
+
+<style scoped="scoped">
+.inputs {
+  font-size: 14px;
+}
+.inputs-h {
+  font-size: 14px;
+  font-weight: 600;
+  margin-bottom: 10px;
+}
+.inputs-m {
+  margin-bottom: 5px;
+}
+.inputs-text {
+  margin: 0 10px;
+}
+.el-icon-delete {
+  margin-left: 10px;
+  font-size: 24px;
+  color: #777777;
+  cursor: pointer;
+}
+.el-icon-delete:hover {
+  color: #f56c6c;
+}
+.inputs-add {
+  margin: 10px 0 20px 0;
+}
+.inputs-add span {
+  cursor: pointer;
+}
+</style>

+ 893 - 0
src/components/public/EmployeeSelector.vue

@@ -0,0 +1,893 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="visible_"
+    :close-on-click-modal="false"
+    :before-close="close_before"
+    append-to-body
+    @open="openDialog"
+    width="640px"
+    top="5%"
+    class="employee_select_dialog"
+  >
+    <slot name="header"></slot>
+    <div class="search-box flex-box-ce" v-if="can_select_employee">
+      <div class="search flex-box">
+        <el-cascader
+          v-show="can_select_employee && deptId == 0"
+          v-model="dept_id"
+          ref="dept"
+          :options="dept_list"
+          :props="{ checkStrictly: true, value: 'dept_id', label: 'name', children: '_child' }"
+          clearable
+          :disabled="deptId > 0"
+          placeholder="全公司"
+        ></el-cascader>
+      </div>
+      <div class="search flex-box"><el-input prefix-icon="el-icon-search" v-model="keyword" placeholder="请输入姓名" clearable></el-input></div>
+    </div>
+    <div class="dept_path scroll-bar flex-box flex-d-wrap" v-if="can_select_dept">
+      <template v-if="pid_list_arr.length > 0">
+        <div @click="back_by_index(0)" class="blue" style="cursor: pointer;">全公司</div>
+        <div v-for="(item, index) in pid_list_arr" :key="index" @click="back_by_index(index + 1, item)" class="font-flex-word" style="max-width: 120px;">
+          <i class="el-icon-arrow-right"></i>
+          <span class="blue" style="cursor: pointer;">{{ item.name }}</span>
+        </div>
+      </template>
+    </div>
+    <div class="employee_selector_box" v-if="visible_">
+      <div class="flex-box-ce">
+        <div class="scroller-box flex-1">
+          <!-- 人员 -->
+          <div v-if="can_select_employee && isChecKedAll && multi" class="option-box flex-box flex-box-ce" style="padding-left: 22px;">
+            <el-checkbox v-model="checked" @change="checkedChange">全选</el-checkbox>
+          </div>
+          <el-scrollbar :native="false" v-loading="table_loading" :style="styleObject">
+            <div class="choose_left">
+              <template v-if="can_select_dept">
+                <div class="persons_box" v-if="dept_list.length > 0">
+                  <div v-for="(item, index) in dept_list" :key="index">
+                    <div class="flex-box flex-v-ce deptList" @click="select_dept(item, index)" v-show="item.name.indexOf(keyword) >= 0">
+                      <div :class="[item.checked ? 'showCheckbox' : '']" class="checkbox"><span class="isCheckbox"></span></div>
+                      <div class="employee_name flex-1 font-flex-word">{{ item.name }}</div>
+                      <div v-if="item._child" class="blue" @click.stop="show_child(item)">| 下级</div>
+                    </div>
+                  </div>
+                </div>
+              </template>
+              <template v-if="can_select_employee">
+                <div class="persons_box" v-if="list.length > 0">
+                  <div class="employee_cell" @click.prevent.stop="select_employee(item)" v-for="(item, index) in list" :key="index" v-show="item.id">
+                    <div class="employee_checkbox"><el-checkbox v-model="item.checked"></el-checkbox></div>
+                    <div class="employee_img_url"><img :src="item.img_url" class="employee_cell_head_img" /></div>
+                    <div class="employee_name">{{ item.name }}</div>
+                    <div class="employee_cell_clear"></div>
+                  </div>
+                </div>
+                <div v-else class="fontColorF" style="text-align: center;margin-top: 50px;">暂无可选人员</div>
+              </template>
+            </div>
+          </el-scrollbar>
+        </div>
+        <div class="col-line"><span style="opacity: 0;">空</span></div>
+        <div class="scroller-box flex-1">
+          <div class="option-box flex-box-ce flex-d-center">
+            <span v-if="multi && can_select_employee">
+              已选择
+              <span class="blue" style="padding: 0 2px;">{{ employee_selected_list.length }}</span>
+              个员工
+            </span>
+            <span></span>
+            <el-button size="small" class="dangerBtn" @click="clear_data">清空</el-button>
+          </div>
+          <el-scrollbar :native="false" style="height: 405px;">
+            <div class="choose_right">
+              <div class="employee_cell" 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_delete(item, index)" 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">
+                <div class="employee_img_url" v-if="item.img_url"><img :src="item.img_url" class="employee_cell_head_img" /></div>
+                <div class="employee_img_url" v-else><img src="@/assets/image/head_default.png" class="employee_cell_head_img" /></div>
+                <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>
+        </div>
+      </div>
+    </div>
+    <!-- <div class="fontColorT" style="text-align: center;">以上人员列表只显示“在职”人员</div> -->
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="close">取 消</el-button>
+      <el-button type="primary" @click="confirm">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  props: {
+    title: {
+      // 标题
+      type: String,
+      default: '选择部门和员工'
+    },
+    deptId: {
+      //指定部门ID,人员列表就是该部门的
+      type: Number,
+      default: 0
+    },
+    visible: {
+      // 是否显示组件
+      type: Boolean,
+      default: false
+    },
+    can_select_dept: {
+      // 是否只能选择部门(单选择部门,不能选择人员)
+      type: Boolean,
+      default: false
+    },
+    dept_not_select: {
+      // 排除部门ID
+      type: Array,
+      default: () => {
+        return [];
+      }
+    },
+    dept_multi: {
+      // 指定部门是否能多选
+      type: Boolean,
+      default: true
+    },
+    dept_children: {
+      //选择部门时是否包含子部门
+      type: Boolean,
+      default: true
+    },
+    can_select_employee: {
+      // 指定是否能选择员工
+      type: Boolean,
+      default: true
+    },
+    employee_not_select: {
+      // 排除员工的ID,包含ID时不出现在选择列表中
+      type: Array,
+      default: () => {
+        return [];
+      }
+    },
+    selected: {
+      // 已经选择的员工和部门
+      type: Object,
+      default: () => {
+        return { employee: [], dept: [] };
+      }
+    },
+	isChecKedAll: {
+	  //是否全选
+	  type: Boolean,
+	  default: true
+	},
+    multi: {
+      // 指定员工是否能多选
+      type: Boolean,
+      default: true
+    },
+	max: {
+	  //选择的人数限制
+	  type: Number,
+	  default: 0
+	},
+    is_employee_list: {
+      // 为true时,employee_list才生效
+      type: Boolean,
+      default: false
+    },
+    employee_list: {
+      // 指定显示的员工列表,注意:传值后组件的员工数据将不是统一向服务器获取的,而是指定的员工列表,格式是:[{id: 1, name: “张三”, img_url: “”}]
+      type: Array,
+      default: () => {
+        return [];
+      }
+    },
+    close_clear_data: {
+      //关闭时是否清除选择的数据
+      type: Boolean,
+      default: true
+    },
+    is_filtration_creator: {
+      //是否去除创始人
+      type: Boolean,
+      default: true
+    },
+    include_self: {
+      //是否显示自己
+      type: Boolean,
+      default: true
+    },
+    isRequired: {
+      //是否必须选择人员或者部门
+      type: Boolean,
+      default: false
+    }
+  },
+  name: 'EmployeeSelector',
+  data() {
+    return {
+      // 基础配置
+      table_loading: false,
+      searchBox: [], //用于搜索的全部人员
+      keyword: '',
+      checked: false,
+      visible_: false,
+      // 选择人员相关
+      employee_selected_list: [],
+      employee_selected: [],
+      list: [],
+      // 选择部门相关
+      dept_selected_list: [],
+      dept_name: '',
+      dept_id: [],
+      dept_select_id: 0,
+      dept_list: [],
+      dept_list_all: [], //备用全部部门
+      pid_list_arr: [],
+      styleObject: {
+        height: '405px'
+      }
+    };
+  },
+  watch: {
+    visible(val) {
+      this.visible_ = JSON.parse(JSON.stringify(val));
+      if (val) {
+        setTimeout(() => {
+          this.get_user_list();
+          this.get_dept_list();
+        }, 200);
+      }
+    },
+    dept_id(val) {
+      this.dept_select_id = val[val.length - 1];
+      this.$nextTick(() => {
+        if (this.can_select_employee) {
+          this.$refs.dept.dropDownVisible = false;
+        }
+        this.get_user_list();
+        this.checked = false;
+      });
+    },
+    keyword(val) {
+      this.list = this.searchBox.filter(item => item.name.includes(this.keyword));
+      if (!val) {
+        this.checked = false;
+      }
+    }
+  },
+  methods: {
+    //打开Dialog的回调,用刷每次打开都初始化selected
+    openDialog() {
+      if (this.deptId != 0) {
+        this.dept_id = [this.deptId];
+        this.dept_select_id = this.deptId;
+      }
+      let selected = this.selected;
+      this.employee_selected = [];
+      this.employee_selected_list = JSON.parse(JSON.stringify(selected.employee));
+      this.dept_selected_list = JSON.parse(JSON.stringify(selected.dept));
+      for (let i in selected.employee) {
+        this.employee_selected.push(selected.employee[i].id);
+      }
+      if (this.can_select_employee && this.isChecKedAll && this.multi) {
+        this.styleObject = {
+          height: '405px'
+        };
+      } else {
+        this.styleObject = {
+          height: '455px'
+        };
+      }
+    },
+    close_before(done) {
+      this.close();
+      done();
+    },
+    // 全选(只用选择人员)
+    checkedChange(val) {
+      if (val) {
+        this.$nextTick(() => {
+          let employeeSelectedList = JSON.parse(JSON.stringify(this.employee_selected_list)); //获取选择的人员
+          let employeeSelectedIds = [],total = 0;
+          employeeSelectedList.forEach(element => {
+            employeeSelectedIds.push(element.id);
+          });
+          for (let i in this.list) {
+            this.$set(this.list[i], 'checked', true);
+            if (!employeeSelectedIds.includes(this.list[i].id)) {
+              //去除已经选择的人员
+              this.employee_selected_list.push(this.list[i]);
+            }
+          }
+        });
+      } else {
+        this.employee_selected_list = [];
+        this.employee_selected = [];
+        for (let i in this.list) {
+          this.$set(this.list[i], 'checked', false);
+        }
+      }
+    },
+    // 点击部门导航
+    back_by_index(index, item) {
+      this.pid_list_arr.splice(index, 100);
+      if (index == 0) {
+        this.dept_list = this.dept_list_all;
+        return false;
+      }
+      if (item._child) {
+        this.dept_list = item._child;
+      }
+    },
+    //下一级
+    show_child(item) {
+      if (item._child) {
+        this.dept_list = item._child;
+      }
+      this.pid_list_arr.push(item);
+    },
+    //获取一个部门的下的所有子部门
+    getChildrens(list) {
+      var dept_list = [];
+      list.forEach(item => {
+        item.checked = true;
+        dept_list.push({ dept_id: item.dept_id, dept_name: item.name, avatar: '@/assets/image/e66f.jpg' });
+        if (item._child) {
+          dept_list.push(...this.getChildrens(item._child));
+        }
+      });
+      return dept_list;
+    },
+    //选择部门
+    select_dept(item, index) {
+      if (item.checked) {
+        this.dept_cancel(item);
+      } else {
+        if (!this.dept_multi) {
+          //是否能多选
+          this.dept_selected_list = [];
+          for (let i in this.dept_list_all) {
+            this.dept_cancel(this.dept_list_all[i], true);
+          }
+        }
+        item.checked = true;
+        if (item._child && this.dept_children) {
+          //是否存在子部门
+          this.dept_selected_list.push({ dept_id: item.dept_id, dept_name: item.name, avatar: '@/assets/image/e66f.jpg' });
+          var arr = this.getChildrens(item._child);
+          this.dept_selected_list.push(...arr);
+        } else {
+          this.dept_selected_list.push({ dept_id: item.dept_id, dept_name: item.name, avatar: '@/assets/image/e66f.jpg' });
+        }
+      }
+    },
+    //清除选择的部门
+    dept_cancel(item, is) {
+      item.checked = false;
+      if (item._child) {
+        //左边
+        item._child.forEach(childrens => {
+          this.dept_cancel(childrens);
+        });
+      }
+      if (is) {
+        return false;
+      }
+      var deptSelectedList = this.dept_selected_list;
+      deptSelectedList.forEach((dept, index) => {
+        //右边
+        if (dept.dept_id == item.dept_id) {
+          deptSelectedList.splice(index, 1);
+        }
+      });
+    },
+    //删除部门
+    dept_delete(item) {
+      var dept_list = this.dept_list;
+      var obj = this.getDeptz(item.dept_id, dept_list); //递归找到所属部门
+      this.dept_cancel(obj);
+    },
+    // 递归获取指定ID部门
+    getDeptz(id, arr) {
+      var obj = {};
+      for (let i = 0; i < arr.length; i++) {
+        if (id == arr[i].dept_id) {
+          obj = arr[i];
+          break;
+        } else if (arr[i]._child) {
+          if (this.getDeptz(id, arr[i]._child).dept_id) {
+            obj = this.getDeptz(id, arr[i]._child);
+          }
+        }
+      }
+      return obj;
+    },
+
+    //清除选择的人员
+    employee_cancel(item) {
+      this.checked = false;
+      this.employee_selected.splice(this.employee_selected.indexOf(item.id), 1);
+      let delete_index = -1;
+      for (let i in this.employee_selected_list) {
+        if (this.employee_selected.indexOf(this.employee_selected_list[i].id) < 0) {
+          delete_index = i;
+        }
+      }
+      if (delete_index >= 0) {
+        for (let i in this.list) {
+          if (this.list[i].id == item.id) {
+            this.$set(this.list[i], 'checked', false);
+          }
+        }
+        for (let i in this.employee_selected_list) {
+          if (this.employee_selected_list[i].id == item.id) {
+            this.employee_selected_list.splice(i, 1);
+          }
+        }
+      }
+    },
+    //选择人员
+    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.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.checked = false;
+      this.employee_selected = [];
+      this.employee_selected_list = [];
+      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);
+      }
+    },
+    //关闭||清空数据
+    close() {
+      this.$emit('update:visible', false);
+      if (this.close_clear_data) {
+        this.checked = false;
+        this.keyword = '';
+        this.employee_selected = [];
+        this.employee_selected_list = [];
+        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() {
+      if (this.isRequired) {
+        if (this.employee_selected_list.length == 0) {
+          this.$message.error('请选择人员');
+          return false;
+        }
+      }
+      this.$emit('confirm', {
+        employee: this.employee_selected_list,
+        dept: this.dept_selected_list
+      });
+      this.close();
+    },
+    // 获取部门
+    get_dept_list() {
+      this.$axios('get', '/api/per/user/department').then(res => {
+        var list = res.data.data.dept_tree;
+        var dept_list = [];
+        // 排除部门
+        if (this.dept_not_select.length > 0) {
+          dept_list = list.filter(item => {
+            return this.dept_not_select.indexOf(item.id) == -1;
+          });
+        } else {
+          dept_list = list;
+        }
+        dept_list = this.getTreeData(dept_list); //过滤children
+        //默认选中部门
+        if (this.dept_selected_list.length > 0) {
+          this.dept_selected_list.forEach(item => {
+            this.setDeptChecked(item.dept_id, dept_list);
+          });
+        }
+        this.dept_list = dept_list;
+        this.dept_list_all = this.dept_list;
+      });
+    },
+    //设置默认部门
+    setDeptChecked(id, arr) {
+      for (let i = 0; i < arr.length; i++) {
+        if (id == arr[i].dept_id) {
+          arr[i].checked = true;
+          break;
+        } else if (arr[i]._child) {
+          this.setDeptChecked(id, arr[i]._child);
+        }
+      }
+    },
+    getTreeData(data) {
+      for (var i = 0; i < data.length; i++) {
+        data[i].checked = false;
+        if (data[i]._child.length < 1) {
+          // _child若为空数组,则将_child设为undefined
+          data[i]._child = undefined;
+        } else {
+          // _child若不为空数组,则继续 递归调用 本方法
+          this.getTreeData(data[i]._child);
+        }
+      }
+      return data;
+    },
+
+    // 默认选择中的人勾上
+    parse_list(data) {
+      let _list = [];
+      data.map(item => {
+        item['checked'] = false;
+        for (var i in this.employee_selected_list) {
+          //判断传进来的员工是否是员工集合里的,是就设为已点击状态
+          if (this.employee_selected_list[i].id == item.id) {
+            item['checked'] = true;
+          }
+        }
+        if (item.img_url == '') {
+          item.img_url = require('@/assets/image/head_default.png');
+        }
+      });
+      this.searchBox = data;
+      this.list = data;
+    },
+    //获取人员
+    get_user_list() {
+      this.table_loading = true;
+      this.$axios('get', '/api/per/user/employee_list', { dept_id: this.dept_select_id,page: 1, page_size: 10000,official:1})
+        .then(res => {
+          let list = this.filtration(res.data.data.list);
+          // 当有指定显示列表时
+          if (this.is_employee_list) {
+            var employee_list = this.employee_list;
+            var userData = [];
+            list.map(item => {
+              // 列表数据是否是自己的管理范围
+              employee_list.map(item2 => {
+                if (item.id == item2.id) {
+                  userData.push(item);
+                }
+              });
+            });
+            this.parse_list(userData);
+          } else {
+            // 没有指定人员列表
+            this.parse_list(list);
+          }
+        })
+        .finally(() => {
+          this.table_loading = false;
+        });
+    },
+    // 过滤各种条件:如:自己,创始人
+    filtration(data) {
+      var list = data;
+	  
+      // 过滤自己
+      if (!this.include_self) {
+        const currUserId = this.$getUserData().id;
+        for (let i = 0; i < list.length; i++) {
+          if (list[i].id == currUserId) {
+            list.splice(i, 1);
+            i--;
+          }
+        }
+      }
+      // 过滤创始人
+      if (this.is_filtration_creator) {
+        for (let i = 0; i < list.length; i++) {
+          if (list[i].is_creator == 1) {
+            list.splice(i, 1);
+            i--;
+          }
+        }
+      }
+      //过滤指定人员[]
+      if (this.employee_not_select.length > 0) {
+        for (let i = 0; i < list.length; i++) {
+          if (this.employee_not_select.indexOf(list[i].id) >= 0) {
+            list.splice(i, 1);
+            i--;
+          }
+        }
+      }
+      return list;
+    }
+  },
+  created() {}
+};
+</script>
+
+<style scoped>
+::v-deep .el-dialog__header {
+  text-align: center;
+  background-color: #ecf5ff;
+}
+::v-deep .el-dialog__body {
+  padding: 20px;
+}
+.showCheckbox .isCheckbox {
+  height: 7px;
+  width: 7px;
+  background-color: #26a2ff;
+  display: inline-block;
+  border-radius: 2px;
+  line-height: 14px;
+  position: relative;
+  top: -3px;
+}
+.showCheckbox {
+  border: 1px solid #26a2ff !important;
+}
+.checkbox {
+  height: 14px;
+  width: 14px;
+  border: 1px solid #dcdfe6;
+  background: #fff;
+  border-radius: 2px;
+  position: relative;
+  box-sizing: border-box;
+  text-align: center;
+}
+.deptList {
+  padding: 12px 0;
+  border-bottom: 1px solid #f1f1f1;
+  cursor: pointer;
+}
+.employee_selector_box {
+  width: 600px;
+  box-sizing: border-box;
+  margin: 0 auto;
+}
+
+/* 搜索框 */
+.search {
+  min-height: 36px;
+  margin-right: 10px;
+}
+.search-box button {
+  display: inline-block;
+  vertical-align: middle;
+  margin-left: 10px;
+  width: auto;
+  padding: 0;
+  background: none;
+  border-radius: 0px;
+  border: none;
+}
+/* 左边框 */
+.employee_selector_box .choose_left {
+  padding: 8px 10px 8px 10px;
+}
+
+.employee_selector_box .choose_left .employee_cell {
+  border-bottom: 1px #f1f1f1 solid;
+}
+
+.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 .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: 10px 0;
+  border-bottom: 1px #f1f1f1 solid;
+}
+
+.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-right: 0px !important;
+  background-color: #fdfdfd;
+  border: 1px solid #eee;
+  border-radius: 4px;
+  overflow: hidden;
+}
+.col-line {
+  position: relative;
+  height: 400px;
+  padding: 0 10px;
+}
+
+.col-line:before {
+  content: ' ';
+  width: 1px;
+  height: 400px;
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  left: 50%;
+  background-color: #eee;
+}
+
+.search-box {
+  background-color: #fff;
+  margin-bottom: 20px;
+}
+
+.option-box {
+  padding: 5px;
+  background-color: #fff;
+  border-bottom: 1px solid #eee;
+  height: 50px;
+  box-sizing: border-box;
+}
+
+.child_btn {
+  color: #409eff;
+}
+.dept_path {
+  padding: 10px 0;
+  min-height: 37px;
+}
+
+.scrollbarHeight1 {
+  height: 310px;
+}
+.scrollbarHeight2 {
+  height: 350px;
+}
+</style>

+ 108 - 0
src/components/public/JxSearch.vue

@@ -0,0 +1,108 @@
+<template>
+  <div class="allInput">
+    <div :class="screen==1?'asideinput1':screen==2?'asideinput2':''">
+        <el-input  v-model="asideinput" :placeholder="title" clearable></el-input>
+        <i class="el-icon-search" :style="i_style" :class="size=='medium'?'i-medium':size=='small'?'i-small':size=='mini'?'i-mini':''"></i>
+    </div>
+  </div>
+</template>
+
+<script>
+import {_debounce} from '@/api/auth';	
+export default {
+    name:'JxSearch',
+    props:{
+        title:{
+            type: String,
+            default: '请输入',
+        },
+        screen:{//搜索框样式
+            type: Number,
+            default: 1,
+        },
+        size:{//medium / small / mini
+            type: String,
+            default: 'medium',
+        },
+        i_style:{//i样式
+            type: String,
+            default: '',
+        },
+        times:{//延迟时间
+            type: Number,
+            default: 400,
+        },
+    },
+  data() {
+    return {
+        asideinput:'',
+    };
+  },
+  watch: {
+    asideinput:_debounce(
+      function () {
+        this.$emit('confirm', this.asideinput)
+      },
+    ),
+  },
+  created() {
+  },
+  mounted() {},
+  methods: {
+  }
+};
+</script>
+
+<style scoped="scoped" lang="scss">
+
+/* .asideinput{
+} */
+
+
+.allInput{
+  position: relative;
+  i{
+    position: absolute;
+    left: 13px;
+    color: #a5a5a5;
+  }
+  
+  /* 样式1 */
+  .asideinput1 {
+    ::v-deep .el-input__inner{
+      background-color: #f3f3f3;
+      border: 0;
+      padding-left: 32px;
+      border-radius: 20px;
+    }
+    ::v-deep .el-input__inner::placeholder{
+      color:#aaaaaa;;
+    }
+  }
+
+  /* 样式2 */
+  .asideinput2 {
+    ::v-deep .el-input__inner{
+      background-color: #ffffff;
+      padding-left: 32px;
+      border-radius: 4px;
+    }
+    ::v-deep .el-input__inner::placeholder{
+      color:#aaaaaa;;
+    }
+  }
+  
+  .i-medium{
+    top: 11px;
+    font-size: 14px;
+  }
+  .i-small{
+    top: 9px;
+    font-size: 14px;
+  }
+  .i-mini{
+    top: 8px;
+    font-size: 12px;
+  }
+}
+</style>

+ 2 - 2
src/components/noData.vue → src/components/public/NoData.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="flex-box-v flex-v-zhu">
-      <img src="../assets/image/nodata.png"  :style="{ width: imgW, height: imgH }" style="margin: 30px auto;">
+      <img src="@/assets/image/nodata.png"  :style="{ width: imgW, height: imgH }" style="margin: 30px auto;">
       <div class="fontColorF"  style="text-align: center;line-height: 28px;" v-if="!isSolt">{{content}}</div>
       <slot></slot>
     </div>
@@ -10,7 +10,7 @@
 <!-- isSolt:是否显示自定义内容  -->
 <script>
   export default {
-    name:'noData',
+    name:'NoData',
     props:{
       content:{
         type:String,

+ 71 - 0
src/components/public/PageHead.vue

@@ -0,0 +1,71 @@
+<template>
+  <div class="PageHead">
+      <div class="flex-box-ce">
+         <span class="return" @click="routePush?$router.push(routePush):$router.go(-1)">返回</span>
+         <span v-if="phName!=''">{{phName}}</span>
+         <div v-else class="slot">
+           <slot name="headMent"></slot>
+         </div>
+      </div>
+  </div>
+</template>
+
+<script>
+export default {
+    name:'pageHead',
+    props:{
+      phName:{
+        type:String,
+        default:''
+      },
+      routePush:{
+        type:String,
+        default:null
+      }
+    },
+  data() {
+    return {};
+  },
+  watch: {},
+  created() {},
+  mounted() {},
+  methods: {}
+};
+</script>
+
+<style scoped="scoped" lang="scss">
+.PageHead {
+  height: 42px;
+  font-size: 14px;
+  span{
+    height: 32px;
+    line-height: 32px;
+  }
+  span:nth-child(1) {
+    cursor: pointer;
+    width: 42px;
+    color: #8f8f8f;
+    position: relative;
+  }
+  span:nth-child(1)::after{
+    position: absolute;
+    content: " ";
+    height: 18px;
+    width: 1px;
+    background-color: #8f8f8f;
+    right: 0px;
+    top: 50%;
+    margin-top: -9px;
+  }
+  span:nth-child(1):hover {
+    color: #1299f9;
+  }
+  span:nth-child(2) {
+    padding-left: 12px;
+    color: #585858;
+  }
+  .slot{
+    margin-left: 12px;
+  }
+}
+</style>

+ 61 - 0
src/components/public/PageHeadTwo.vue

@@ -0,0 +1,61 @@
+<template>
+    <header class="header">
+      <div class="header-title flex-box-ce" @click="$router.go(-1)">
+        <i class="el-icon-arrow-left fontColorF"></i>
+        <div class="text fontColorB font-flex-word">{{title}}</div>
+      </div>
+    </header>
+</template>
+
+<script>
+export default {
+    name:'PageHeadTwo',
+    props:{
+      title:{
+        type:String,
+        default:'详情'
+      },
+    },
+  data() {
+    return {};
+  },
+  watch: {},
+  created() {},
+  mounted() {},
+  methods: {}
+};
+</script>
+
+<style scoped="scoped" lang="scss">
+.header{
+  border-bottom: 1px solid #f1f1f1;
+  padding-bottom: 10px;
+}
+.header-title {
+  box-sizing: border-box;
+  cursor: pointer;
+  position: relative;
+  width: 200px;
+}
+.el-icon-arrow-left {
+  font-size: 20px;
+}
+.header-title:hover .el-icon-arrow-left {
+  background-color: #f5f7fa;
+  color: #222;
+}
+.text {
+  font-size: 16px;
+  padding-left: 30px;
+}
+.text::before {
+  position: absolute;
+  content: '';
+  width: 1px;
+  height: 60px;
+  background-color: #ebebeb;
+  left: 34px;
+  top: 50%;
+  margin-top: -18px;
+}
+</style>

+ 69 - 0
src/components/public/Pagination.vue

@@ -0,0 +1,69 @@
+<template>
+  <center style="padding: 20px 0;width: 100%;">
+    <el-pagination
+      background
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :page-sizes="page_sizes"
+      :current-page="page"
+      layout="total, sizes, prev, pager, next"
+      :page-size="page_size"
+      :total="total"
+    ></el-pagination>
+  </center>
+</template>
+
+<script>
+  export default {
+    name: 'Pagination',
+    props:{
+      page:{
+        type:Number,
+        default:1
+      },
+      page_size:{
+        type:Number,
+        default:10
+      },
+      total:{
+        type:Number,
+        default:0
+      },
+      page_sizes:{
+        type:Array,
+        default:()=>{
+         return [10, 20, 50, 100]
+        }
+      }
+    },
+    data() {
+      return {
+        showDrawerTow:false
+      };
+    },
+    watch: {
+     showDrawer(val) {
+       this.showDrawerTow=val;
+     },
+    },
+    created() {},
+    mounted() {
+
+    },
+    methods: {
+        // 页面变更
+        handleCurrentChange(val) {
+           this.$emit('handleCurrentChange',val)
+        },
+        // 页面跳转
+        handleSizeChange(val) {
+          this.$emit('handleSizeChange',val)
+        },
+    }
+  };
+
+</script>
+
+<style>
+
+</style>

+ 52 - 0
src/components/public/PreBox.vue

@@ -0,0 +1,52 @@
+<template>
+   <div class="PreBox">
+<!--        <el-popover placement="top-start" width="400" trigger="hover">
+          <pre>{{value}}</pre>
+          <pre slot="reference" class="pre">{{value}}</pre>
+        </el-popover> -->
+      <el-tooltip  effect="dark" placement="top-start">
+         <pre slot="content" class="pre text">{{value}}</pre>
+         <pre class="pre preH">{{value}}</pre>
+      </el-tooltip>
+   </div>
+</template>
+
+<script>
+var that;
+export default {
+  name: 'PreBox',
+  props: {
+    value:{
+      type:String,
+      default:'',
+    },
+  },
+  data() {
+    return {
+    };
+  },
+};
+</script>
+
+<style scoped="scoped" lang="scss">
+  .pre{
+    margin: 0 !important;
+    font-family: 微软雅黑;
+  }
+ .preH{
+   overflow : hidden;
+   text-overflow: ellipsis;
+   display: -webkit-box;
+   -webkit-line-clamp: 3;
+   -webkit-box-orient: vertical;
+   padding: 0 5px;
+ }
+ .text{
+   max-width: 800px;
+   white-space:pre-wrap;/*css-3*/
+   white-space:-moz-pre-wrap;/*Mozilla,since1999*/
+   white-space:-pre-wrap;/*Opera4-6*/
+   white-space:-o-pre-wrap;/*Opera7*/
+   word-wrap:break-word;/*InternetExplorer5.5+*/
+ }
+</style>

+ 327 - 0
src/components/public/Preview.vue

@@ -0,0 +1,327 @@
+<template>
+  <div class="container">
+    <div class="all">
+      <!-- <PageHeadTwo title="预览"></PageHeadTwo> -->
+      <div class="main scroll-bar">
+        <div class="flex-box-ce">
+          <userImage :user_name="userData.name" :img_url="userData.img_url" fontSize="14" width="50px" height="50px"></userImage>
+          <div>
+            <div class="name" style="margin: 0 10px;margin-bottom: 5px;">{{ userData.name }}</div>
+            <div class="name fontColorF" style="margin: 0 10px;" v-for="(item,index) in dept_list" :key="index">{{item.name}}</div>
+          </div>
+          <el-button class="primaryBtn"  @click="addUser()">更换</el-button>
+        </div>
+        <div class="flex-box-ce flex-d-wrap" style="margin-top: 30px;">
+            <div v-for="(item, index) in flow" :key="index" :class="[index == 0 ? 'flow-item-start' : 'flow-item']" class="flex-box-ce flex-center-center">
+                <el-tooltip effect="dark" :content="item.code == 'execution' ? execution : item.remarks" placement="top">
+                  <span class="flow-box">
+                    <span>{{ index + 1 }}.{{ item.remark }}</span>
+                    <span v-if="item.code == 'execution'"><i class="el-icon-warning-outline"></i>:</span>
+                    <template v-if="item.target.length > 0">
+                      <span v-for="(item2, index2) in item.target" :key="index2">
+                        {{ item2.employee_name }}
+                        <span v-if="item.target.length - index2 > 1">,</span>
+                      </span>
+                    </template>
+                  </span>
+                </el-tooltip>
+              <div @click.stop="processDet(item)" style="width: 20px;" v-if="item.target.length>0"><svg-icon icon-class="detailsPonit" class="detailsPonit"/></div>
+            </div>
+        </div>
+      <el-table :data="tableData" stripe :span-method="objectSpanMethod" border style="width: 100%; margin-top: 20px" :header-cell-style="{ background: '#ECF5FF'}">
+        <el-table-column prop="wdName" label="维度"></el-table-column>
+        <el-table-column prop="name" label="名称"></el-table-column>
+        <el-table-column prop="point_limit" label="加扣分上限"></el-table-column>
+        <el-table-column prop="per_remark" label="考核标准"></el-table-column>
+        <el-table-column prop="weight" label="指标权重(%)"></el-table-column>
+        <el-table-column prop="remark" label="备注"></el-table-column>
+      </el-table>
+      </div>
+    </div>
+    <!-- 流程详情 -->
+    <BrawerBox :drawerTitle="flowTitle" :showDrawer.sync="isFlow">
+      <template slot="main">
+        <ul class="ul">
+          <li v-for="(item, index) in target" :key="index" class="flex-box-ce li">
+            <div class="flex-box-ce" style="margin-right: 20px;width: 150px;">
+              <userImage :user_name="item.employee_name" :img_url="getUserImg(item.employee_id)"></userImage>
+              <span style="margin-left: 10px;">{{ item.employee_name }}</span>
+            </div>
+          </li>
+        </ul>
+      </template>
+    </BrawerBox>
+    <!-- 选择被考核人员 -->
+    <EmployeeSelector
+      :selected="selected"
+      :isRequired="true"
+      title="选择被考核人员"
+      :isChecKedAll="false"
+      :employee_list="employee_list"
+      :visible.sync="setAdministrator"
+      :multi="false"
+      :is_employee_list="true"
+      :is_filtration_creator="false"
+      @confirm="confirmAdministrator"
+    />
+  </div>
+</template>
+
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import PageHeadTwo from '@/components/public/PageHeadTwo';
+import BrawerBox from '@/components/public/BrawerBox';
+export default {
+  name: 'Preview',
+  components: { EmployeeSelector, PageHeadTwo,BrawerBox },
+  props:{
+    parameter:{
+      type:Object,
+      default:()=>{
+        return {}
+      }
+    },
+    employeeList:{
+      type:Array,
+      default:()=>{
+        return []
+      }
+    },
+    employeeId:{
+      type:Array,
+      default:()=>{
+        return []
+      }
+    },
+    groupId:{
+       type:Number,
+       default:()=>{
+        return []
+      }
+     },
+  },
+  data() {
+    return {
+      selected: { employee: [], dept: [] }, //已经选择人员
+      setAdministrator: false,
+      // parameter:{},
+      employee_list:[],
+      dept_list:{name:''},
+      userData:{
+        id:'',
+        name:'',
+        img_url:''
+      },//被预览用户
+      group_id:'',//被预览考核表ID 非原生数据,必填
+      raw_data:0,//是否原生数据 0 否 1 是
+      dimension:{},//原生维度数据 原生数据,必填
+      process:{},//原生流程数据 原生数据 必填
+
+      flow:[],//
+      tableData:[],
+      execution: '目标制定并确认完毕后,进入到【执行中】阶段,期间员工执行计划,上级跟踪过程。管理员可以点击【开始评分】后,进入结果数据收集和评分阶段',
+      isFlow: false,
+      target: [],
+      flowTitle:''
+    };
+  },
+  mounted() {
+    let userData=this.employeeId;
+    this.employee_list=this.employeeList;
+    this.userData=userData[0]
+    this.selected.employee=userData
+    this.group_id=this.groupId
+    this.raw_data=this.groupId? 0:1
+    this.getDeptLlist();
+    if(this.parameter){
+      this.getData();
+    }
+  },
+  methods: {
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+        return {
+          rowspan: row.wdLeg,
+          colspan: 1
+        };
+      }
+    },
+    getUserImg(id) {
+      return this.$getEmployeeList()[id].img_url;
+    },
+    //点击流程
+    processDet(obj) {
+      this.flowTitle = obj.remark;
+      obj.target.forEach(item => {
+        item.status_tow = obj.status;
+      });
+      this.target = obj.target;
+      this.isFlow = true;
+    },
+    getData(){
+      let data={
+         employee_id_code:this.$returnCode(this.userData.id),//被预览用户
+         // group_id:this.group_id,//被预览考核表ID 非原生数据,必填
+         raw_data:1,//是否原生数据 0 否 1 是
+         dimension:this.parameter.dimension,//原生维度数据 原生数据,必填
+         process:this.parameter.process,//原生流程数据 原生数据 必填
+      }
+      this.$axios('post', '/api/per/evaluation/preview', data).then(res => {
+        if (res.data.code == 1) {
+
+            let flow=res.data.data.list[0].process;
+            let dimension=res.data.data.list[0].dimension
+            let tableData=[]
+            dimension.forEach(item=>{
+              if(item.index.length>0){
+                item.index.forEach(item2=>{
+                   item2.wdName=item.name;
+                   item2.wdLeg=0;
+                   item.index[0].wdLeg=item.index.length
+                   tableData.push(item2)
+                })
+              }
+            })
+            flow.forEach(item => {
+              let remName = item.remark;
+              item.target.forEach((add, att) => {
+                remName += add.employee_name;
+                remName += item.target.length - att > 1 ? ',' : '';
+              });
+              item.remarks = remName;
+              item.remarkDel = item.remark.split(':')[0];
+            });
+            this.flow=flow
+            this.tableData=tableData
+        }
+      });
+    },
+
+    //选择人员
+    addUser() {
+      this.selected.employee = this.userData.name ? [this.userData] : [];
+      this.setAdministrator = true;
+    },
+    confirmAdministrator(e) {
+      this.userData = e.employee.length > 0 ? e.employee[0] : [];
+      this.getDeptLlist();
+      this.getData();
+      this.setAdministrator = false;
+    },
+    getDeptLlist(){
+      this.$nextTick(()=>{
+        if(this.$getEmployeeList()[this.userData.id]){
+         this.dept_list=this.$getEmployeeList()[this.userData.id].dept_list
+        }
+      })
+    }
+  }
+};
+</script>
+
+<style scoped="scoped">
+.container {
+  height: 100%;
+  font-size: 14px;
+  width: 100%;
+}
+.all {
+  position: relative;
+  min-width: 1100px;
+  box-sizing: border-box;
+  padding: 20px;
+}
+.main {
+  margin-top: 40px;
+  overflow: auto;
+}
+.inputDc {
+  position: absolute;
+  top: 0;
+  right: 0;
+  left: 0;
+  bottom: 0;
+  z-index: 9;
+}
+.primaryBtn {
+  margin-left: 20px;
+}
+.el-icon-more {
+  cursor: pointer;
+  width: 20px;
+  vertical-align: middle;
+}
+.flow-item-start,
+.flow-item {
+  background-color: #f4f6f9;
+  height: 36px;
+  width: 300px;
+  text-align: center;
+  position: relative;
+  margin-right: 20px;
+  margin-top: 20px;
+  padding: 0 10px;
+}
+.flow-box{
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  width: 240px;
+  display: inline-block;
+}
+.flow-item-start::after {
+  position: absolute;
+  content: '';
+  width: 0;
+  height: 0;
+  border-top: 18px solid transparent;
+  border-left: 20px solid #f4f6f9;
+  border-bottom: 18px solid transparent;
+  border-radius: 2px;
+  top: 0;
+  right: -20px;
+}
+.flow-item::before {
+  content: '';
+  position: absolute;
+  width: 0;
+  height: 0;
+  border-top: 18px solid transparent;
+  border-left: 20px solid #fff;
+  border-bottom: 18px solid transparent;
+  border-radius: 2px;
+  top: 0;
+  left: 0px;
+}
+.flow-item::after {
+  content: '';
+  position: absolute;
+  width: 0;
+  height: 0;
+  border-top: 18px solid transparent;
+  border-left: 20px solid #f4f6f9;
+  border-bottom: 18px solid transparent;
+  border-radius: 2px;
+  top: 0;
+  right: -20px;
+}
+.detailsPonit{
+  margin-left:10px;
+  font-size: 14px;
+  color: #848484;
+  cursor:pointer;
+}
+.li {
+  border-bottom: 1px solid #f1f1f1;
+  padding: 10px 0;
+}
+.ul {
+  margin: 20px 0;
+  margin-top: 10px;
+}
+.btn {
+  padding: 5px 10px;
+  border-radius: 3px;
+  font-size: 12px;
+}
+</style>

+ 115 - 0
src/components/public/Record.vue

@@ -0,0 +1,115 @@
+<template>
+  <div class="record" v-if="record.length>0">
+    <div class="record-title">记录</div>
+    <div v-for="(item,index) in record" :key="index" :class="[record.length-index>1?'record-list':'']">
+      <div class="flex-box-ce record-date fontColorB">
+        <userImage :user_name="item.userData.name" :img_url="item.userData.img_url" fontSize="12" width="32px" height="32px"></userImage>
+        <div class="record-name">{{item.userData.name}}</div>
+        <span class="fontColorF"> {{item.time}}</span>
+      </div>
+      <div class="record-message flex-box-ce">
+        <div class="blue"># {{item.remark}} #</div>
+      </div>
+      <div class="record-content" v-if="item.content">
+        <pre class="pre">{{item.content}}</pre>
+<!--        <el-input  type="textarea" class="textarea" v-model="item.content" :rows="2" disabled>
+
+        </el-input> -->
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'Record',
+  props:{
+    record:{
+      type:Array,
+      default:()=>{
+        return []
+      }
+    }
+  },
+  data() {
+    return {
+    };
+  },
+  watch: {},
+  created() {},
+  mounted() {},
+  methods: {
+
+  }
+};
+</script>
+
+<style scoped="scoped">
+  .pre{
+    margin: 0 !important;
+    font-family: 微软雅黑;
+    background-color:#f4f6f9 ;
+    width: 800px;
+    white-space:pre-wrap;/*css-3*/
+    white-space:-moz-pre-wrap;/*Mozilla,since1999*/
+    white-space:-pre-wrap;/*Opera4-6*/
+    white-space:-o-pre-wrap;/*Opera7*/
+    word-wrap:break-word;/*InternetExplorer5.5+*/
+  }
+  .textarea ::v-deep textarea{
+    background-color:#f4f6f9 ;
+    border: none;
+    padding: 0;
+    width: 500px;
+    color: #222 !important;
+  }
+  .record-message{
+    font-size: 13px;
+    margin: 15px 60px;
+  }
+  .record-list{
+    position: relative;
+    padding-bottom: 20px;
+  }
+  .record-title{
+    padding: 16px 0;
+    font-size: 16px;
+
+  }
+  .record-date{
+    padding-left:20px;
+    position: relative;
+    font-size: 13px;
+  }
+  .record-date::after{
+    content: "";
+    position: absolute;
+    width: 8px;
+    height: 8px;
+    background-color: #238DFA;
+    left: 0;
+    top: 50%;
+    margin-top: -4px;
+    border-radius: 50%;
+    z-index: 2;
+  }
+  .record-list::after{
+    content: "";
+    position: absolute;
+    width: 1px;
+    top: 4px;
+    left: 3px;
+    bottom: 0;
+    border-right: 1px dashed #ccc;
+  }
+  .record-content{
+    margin-left: 60px;
+    background-color: #f4f6f9;
+    padding: 10px;
+    display: inline-block;
+  }
+  .record-name{
+    margin-right: 10px;
+    margin-left: 10px;
+  }
+</style>

+ 181 - 0
src/components/public/TableBox.vue

@@ -0,0 +1,181 @@
+<template>
+   <div class="table-box" ref="tableBox">
+     <template v-if="isShowYd">
+       <div class="rightBtn" @click="showDeleteButton(true)"><i class="el-icon-d-arrow-right"></i></div>
+       <div class="rightBtn2" @click="showDeleteButton(false)"><i class="el-icon-d-arrow-left"></i></div>
+     </template>
+      <el-table :data="tableData" stripe :show-summary="showSummary" ref="tableDataRef" :span-method="objectSpanMethod" border :style="'width: 100%;' + Styles" :cell-style="cellStyle" :header-cell-style="headerCellStyle">
+        <slot></slot>
+      </el-table>
+   </div>
+</template>
+
+<script>
+var that;
+export default {
+  name: 'TableBox',
+  props: {
+    tableData: {
+      type: Array,
+      default:()=>{
+        return []
+      }
+    },
+    headerCellStyle:{
+      type:Object,
+      default:()=>{
+        return {background: '#ECF5FF'}
+      }
+    },
+    cellStyle:{
+      type:Object,
+      default:()=>{
+        return {}
+      }
+    },
+    Styles:{
+      type:String,
+      default:'',
+    },
+    objectSpanMethod:{
+      type:Function,
+      default:()=>{
+        return {}
+      }
+    },
+    showSummary:{
+      type:Boolean,
+      default:false
+    },
+    isShowYd:{
+      type:Boolean,
+      default:false
+    },
+  },
+  data() {
+    return {
+    };
+  },
+  watch: {
+    tableData(){
+      this.$nextTick(()=>{
+        this.$refs.tableDataRef.doLayout()
+      })
+    }
+  },
+  methods:{
+    showDeleteButton(is){
+        let dome = this.$refs.tableDataRef.bodyWrapper
+        let maxWidth=dome.scrollWidth-dome.offsetWidth
+        if(is){
+          if(dome.scrollLeft>=maxWidth){
+            return false
+          }
+          let interval=setInterval(()=>{
+            dome.scrollLeft+=10;
+            if(dome.scrollLeft>=maxWidth){
+              clearInterval(interval)
+            }
+          },10);
+        }else{
+          if(dome.scrollLeft<=0){
+            return false
+          }
+          let interval=setInterval(()=>{
+            dome.scrollLeft-=10;
+            if(dome.scrollLeft<=0){
+              clearInterval(interval)
+            }
+          },10);
+        }
+
+    },
+  }
+};
+</script>
+
+<style scoped="scoped" lang="scss">
+.rightBtn{
+  position: absolute;
+  right: -10px;
+  width: 40px;
+  height: 40px;
+  text-align: center;
+  line-height: 40px;
+  background-color: #999;
+  color: #fff;
+  box-shadow: 0 0 3px #ccc;
+  top: 50%;
+  margin-top: -20px;
+  z-index: 999;
+  border-radius: 50%;
+  font-size: 18px;
+  cursor: pointer;
+}
+.rightBtn2{
+  position: absolute;
+  left: -10px;
+  width: 40px;
+  height: 40px;
+  text-align: center;
+  line-height: 40px;
+  background-color: #999;
+  color: #fff;
+  box-shadow: 0 0 3px #ccc;
+  top: 50%;
+  margin-top: -20px;
+  z-index: 999;
+  border-radius: 50%;
+  font-size: 18px;
+  cursor: pointer;
+}
+.el-table__body {
+    width: 100%;
+    table-layout: fixed !important;
+}
+.table-box{
+   padding: 20px 0;
+   width: 100%;
+   position: relative;
+   transition: all 3s;
+  ::v-deep .el-table__body{
+    box-sizing: border-box;
+    overflow: hidden;
+    width: 100%;
+    table-layout: fixed !important;
+  }
+  ::v-deep th .cell {
+    color: #989898;
+    font-size: 14px;
+    overflow: hidden;
+  }
+  ::-webkit-scrollbar {
+    width: 6px;
+    height: 10px;
+  }
+  /*外层轨道。可以用display:none让其不显示,也可以添加背景图片,颜色改变显示效果*/
+  ::-webkit-scrollbar-track {
+    width: 6px;
+    background-color: #fff0;
+    border-radius: 2em;
+    -webkit-border-radius: 2em;
+    -moz-border-radius: 2em;
+    -o-border-radius: 2em;
+    -ms-border-radius: 2em;
+  }
+  /*滚动条的设置*/
+  ::-webkit-scrollbar-thumb {
+    background-color: #fff0;
+    background-clip: padding-box;
+    min-height: 28px;
+    border-radius: 2em;
+    -webkit-border-radius: 2em;
+    -moz-border-radius: 2em;
+    -o-border-radius: 2em;
+    -ms-border-radius: 2em;
+  }
+  ::-webkit-scrollbar-thumb {
+    background-color: rgba(144, 147, 153, 0.3);
+  }
+}
+</style>

+ 764 - 0
src/components/public/TrackManagement.vue

@@ -0,0 +1,764 @@
+<template>
+	<div>
+		<el-drawer title="跟踪管理记录" :visible.sync="showDrawerTow" direction="btt" class="all-derawer" :before-close="handleClose">
+			<div class="flex-box" style="height: calc(100vh - 10%);">
+				<div class="drawer-left scroll-bar">
+					<div class="draft-content" v-for="(item, index) in actionPlanList" :key="index" v-if="item.index.length > 0">
+						<div class="drawer-left-title font-flex-word">{{ item.name }}</div>
+						<div
+							class="drawer-item  flex-box-ce"
+							:class="[activeDrawerIndex == index + '-' + index2 ? 'active-drawer-item' : '']"
+							v-for="(item2, index2) in item.index"
+							:key="index2"
+							@click="activeItem(index, index2, item2)"
+						>
+							<div style="width:200px;" class="font-flex-word">{{ item2.name }}</div>
+							<div style="padding: 0 10px;" class="blue">({{ item2.mamage_record.length }})</div>
+						</div>
+					</div>
+				</div>
+				<div class="drawer-right flex-box-v scroll-bar flex-1" style="overflow: auto;background-color: #fff;">
+					<div class="drawer-right-header">
+						<div class="drawer-right-title">{{ indexItem.name }}</div>
+						<div class="yellow" style="margin: 10px 0;">考核标准</div>
+						<div class="remark">{{ indexItem.per_remark }}</div>
+					</div>
+					<div class="drawer-right-main">
+						<div class="flex-box-ce">
+							<div class="flex-1" style="font-size: 16px;">跟踪管理记录</div>
+							<el-button type="primary" size="mini" @click="addPlan()" v-if="!isShowAdd && !isFill && isOperation && isCz && isOperationTwo">新增</el-button>
+						</div>
+					</div>
+					<div class="flex-box flex-1" v-if="indexItem.mamage_record.length > 0">
+						<div class="plan-left flex-3">
+							<div
+								class="plan-left-content"
+								@click="activePlan(item, index)"
+								:class="[activePlanIndex == index ? 'active-drawer-item' : '']"
+								v-for="(item, index) in indexItem.mamage_record"
+								:key="index"
+							>
+								<div class="flex-box-ce">
+									<div class="plan-right-name flex-1" v-if="item.employee_id">记录人:{{ $getEmployeeList()[item.employee_id].name }}</div>
+									<template v-if="item.images">
+										<i v-if="item.images.length > 0" class="el-icon-picture fontColorB" style="font-size: 18px;padding-right: 10px;"></i>
+									</template>
+									<!-- <i v-if="item.images.length > 0" class="el-icon-picture fontColorB" style="font-size: 18px;padding-right: 10px;"></i> -->
+									<i v-if="item.append" class="el-icon-paperclip fontColorB" style="font-size: 18px;padding-right: 10px;"></i>
+									<div class="fontColorB">{{ item.date }}</div>
+								</div>
+								<div class="plan-title">{{ item.title }}</div>
+							</div>
+						</div>
+						<div class="plan-right flex-2">
+							<div class="flex-box-end btns" v-if="isOperation && isCz && isOperationTwo">
+								<el-button class="dangerBtn" size="mini" round plain @click="deletePlan()">删除</el-button>
+								<el-button class="primaryBtn" size="mini" round @click="saveActionPlan()">提交</el-button>
+							</div>
+							<div class="plan-right-date fontColorB">{{ planData.date }}</div>
+							<el-input
+								type="textarea"
+								@blur="inputBlur"
+								@focus="inputFocus"
+								@input="inputText"
+								class="plan-right-title"
+								rows="6"
+								clearable
+								ref="inputTitle"
+								placeholder="请输入跟踪管理记录内容"
+								v-model="planData.title"
+								maxlength="200"
+								show-word-limit
+							></el-input>
+							<el-input
+								ref="inputTitle2"
+								type="textarea"
+								@blur="inputBlur"
+								@focus="inputFocus"
+								@input="inputText"
+								class="plan-textarea"
+								rows="5"
+								maxlength="500"
+								show-word-limit
+								clearable
+								placeholder="选填,请输入备注"
+								v-model="planData.remark"
+							></el-input>
+							<div style="margin-bottom: 20px;">
+								<uploadOss
+									:headers="Xtoken"
+									class="avatar-uploader"
+									:action="'https://' + 'integralsys.oss-cn-shenzhen.aliyuncs.com'"
+									:show-file-list="true"
+									:file-list="img_fileList"
+									:on-success="handleFilesSuccess"
+									:on-preview="onFilePreView"
+									:before-upload="beforeUpload"
+									:on-remove="onFileRemove"
+									:limit="3"
+									:multiple="true"
+								>
+									<el-button class="primaryBtn" icon="el-icon-picture-outline" plain size="small">图片</el-button>
+									<!-- (最多选择3张) -->
+								</uploadOss>
+							</div>
+							<div>
+								<uploadOss
+									class="avatar-uploader"
+									:headers="Xtoken"
+									:show-file-list="true"
+									:multiple="true"
+									ref="upload"
+									:limit="1"
+									:file-list="file_fileList"
+									:action="'https://' + 'integralsys.oss-cn-shenzhen.aliyuncs.com'"
+									:on-preview="onFilePreView2"
+									:on-remove="handleRemove"
+									:on-success="handleSuccess"
+									:before-upload="beforeFilesUpload"
+								>
+									<el-button class="primaryBtn" icon="el-icon-paperclip" plain size="small">附件</el-button>
+									<!-- (仅支持上传xlsx,xls,doc,docx,pdf,txt,最多一份附件) -->
+								</uploadOss>
+							</div>
+						</div>
+					</div>
+					<div v-else style="background-color: #fff;">
+						<el-alert title="跟踪管理记录用来做什么?" type="info" description show-icon>
+							<div class="alert-text">
+								1、填写工作执行过程的实际情况、表现好坏及奖惩情况
+								<br />
+								2、填写管理指导的过程记录
+								<br />
+								3、填写的内容可以给评分人作为参考
+							</div>
+						</el-alert>
+						<NoData content="暂无跟踪管理记录" imgW="150px" imgH="100px">
+							<el-button type="primary" round style="width: 100px;margin: 0 auto;margin-top: 10px;" @click="addPlan()" v-if="isOperation && isCz && isOperationTwo">
+								<i class="el-icon-plus"></i>
+								新建
+							</el-button>
+						</NoData>
+					</div>
+				</div>
+			</div>
+		</el-drawer>
+		<el-dialog title="图片查看" :visible.sync="isShowImg" width="50%">
+			<img :src="imgUrl" style="width: 100%;" />
+			<span slot="footer" class="dialog-footer">
+				<el-button @click="isShowImg = false">取 消</el-button>
+				<el-button type="primary" @click="isShowImg = false">确 定</el-button>
+			</span>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+import uploadOss from '@/components/public/upload';
+export default {
+	components: { uploadOss },
+	name: 'TrackManagement',
+	props: {
+		id: {
+			//员工考核记录的ID
+			type: Number,
+			default: 0
+		},
+		// 是否显示组件
+		showDrawer: {
+			type: Boolean,
+			default: false
+		},
+		//数据源
+		apList: {
+			type: Array,
+			default: () => {
+				return [];
+			}
+		},
+		//默认显示的指标 [0]:维度下标,[1]:指标下标
+		planIndex: {
+			type: Array,
+			default: () => {
+				return [];
+			}
+		},
+		//绩效考核的被考核人ID
+		assessId: {
+			type: Number,
+			default: 0
+		},
+		// 是否在关闭时刷新外面的表格,和是否可以操作
+		isCz: {
+			type: Boolean,
+			default: true
+		},
+		// 指定管理者记录id,目前在我管理记录列表点击填写管理记录才有
+		recordMemberIds: {
+			type: Array,
+			default: () => {
+				return [];
+			}
+		}
+	},
+	data() {
+		return {
+			drawer: false,
+			activeDrawerIndex: '0-0',
+			actionPlanList: [],
+			indexItem: {
+				//选中的指标
+				mamage_record: []
+			},
+			activePlanIndex: 0,
+			planData: {
+				//执行计划(单个)
+				title: '',
+				employee_id: '',
+				images: [],
+				append: '', //附件
+				appendName: '' //附件名称
+			},
+			planData2: {}, //备用数据,当不修改时使用
+			showDrawerTow: false,
+			isFill: false, //是否填写了
+			isFill2: false, //添加执行计划时用,判断是要清空添加的,还是还原编辑的数据
+			isShowAdd: false,
+			isOperation: false, //判断是否能操作执行计划
+			selectItemIndex: 0, //维度当前下标
+
+			isOperationTwo: true, //管理记录人是否能操作指定指标
+
+			// 上传图标与附件
+			Xtoken: { 'X-Token': this.$getToken() },
+			img_fileList: [], // 图片附件
+			file_fileList: [], //文件附件
+			imgs: [],
+			doc: '',
+			isShowImg: false,
+			imgUrl: '',
+
+			userData: this.$getUserData()
+		};
+	},
+	watch: {
+		showDrawer(val) {
+			this.showDrawerTow = val;
+			let isFiltration = true; //是否需要过滤数据源
+			if (val) {
+				this.superiorList(this.assessId).then(res => {
+					if (this.$getRole(3)) {
+						//如果员工
+						isFiltration = false;
+						this.isOperation = false;
+					}
+					if (this.recordMemberIds.length > 0) {
+						//指定管理记录人中包含自己,就可操作
+						this.recordMemberIds.some(item => {
+							if (item == this.userData.id) {
+								isFiltration = true;
+								this.isOperation = true;
+								return true;
+							}
+						});
+					}
+					let superior_list = res.data.data;
+					superior_list.some(item => {
+						//判断被考核人的上级是否包含登录者
+						if (item.id == this.userData.id) {
+							this.isOperation = true;
+							isFiltration = false;
+							return true;
+						}
+					});
+					if (this.$getEmployeeList()[this.userData.id].is_creator == 1) {
+						//如果是创始人也可以操作
+						isFiltration = false;
+						this.isOperation = true;
+					}
+					if (this.$isAuthoritys(3)) {
+						//如果是子管理员并且管理范围权限为“全公司”
+						isFiltration = false;
+						this.isOperation = true;
+					}
+					
+
+					if (isFiltration) {
+						//当只是管理记录人员时设置指定数据
+						let actionPlanList = JSON.parse(JSON.stringify(this.apList));
+						actionPlanList.forEach((item, index) => {
+							item.index.forEach(item2 => {
+								item2.dimension_xb = index;
+								item2.isOperation = false;
+								if (item2.record_ids.indexOf(this.userData.id) >= 0) {
+									item2.isOperation = true;
+								}
+							});
+						});
+						this.actionPlanList = actionPlanList;
+					} else {
+						this.apList.forEach((item, index) => {
+							item.index.forEach(item2 => {
+								item2.dimension_xb = index;
+								item2.isOperation = true;
+							});
+						});
+						this.actionPlanList = this.apList;
+					}
+
+					this.getShowData();
+				});
+			}
+		}
+	},
+	methods: {
+		//获取上级列表
+		async superiorList(id) {
+			return this.$axios('get', '/api/per/user/manager_list', { id_code:this.$returnCode(id)});
+		},
+		// 图片上传
+		beforeUpload(file) {
+			const isJPG = /^image\/(jpeg|png|jpg)$/.test(file.type);
+			const isLt2M = file.size / 1024 / 1024 < 2;
+			if (!isJPG) {
+				this.$message.error('上传图片只能是 jpeg|png|jpg 格式!');
+			}
+			if (!isLt2M) {
+				this.$message.error('上传图片大小不能超过 2MB!');
+			}
+			return isJPG && isLt2M;
+		},
+		onFilePreView(file) {
+			if (file.url) {
+				this.imgUrl = file.url;
+				this.isShowImg = true;
+			}
+		},
+		onFilePreView2(file) {
+			window.open(file.url, '_blank');
+		},
+		onFileRemove(file, fileList) {
+			this.img_fileList = fileList;
+			this.planData.images = [];
+			let images = [];
+			fileList.forEach((element, index) => {
+				images.push({ url: element.url, name: element.name });
+			});
+			this.planData.images = images;
+			this.isFill = true;
+		},
+		handleFilesSuccess(response, file, fileList) {
+			this.img_fileList = fileList;
+			this.planData.images = [];
+			let images = [];
+			fileList.forEach((element, index) => {
+				images.push({ url: element.url, name: element.name });
+			});
+			this.planData.images = images;
+			this.isFill = true;
+		},
+		handleSuccess(response, file, fileList) {
+			this.file_fileList = fileList;
+			this.planData.append = fileList[0].url;
+			this.planData.append_name = fileList[0].name;
+			this.isFill = true;
+		},
+		handleRemove(file, fileList) {
+			this.file_fileList = fileList;
+			this.planData.append = '';
+			this.planData.append_name = '';
+			this.isFill = true;
+		},
+		beforeFilesUpload(file) {
+			const $ext_list = ['xlsx', 'xls', 'doc', 'docx', 'pdf'];
+			const isLt2M = file.size / 1024 / 1024 < 5;
+			let len = file.name.split('.').length - 1;
+			const $ext_name = file.name.split('.')[len];
+			let isFile = $ext_list.indexOf($ext_name) != -1;
+			if (!isLt2M) {
+				this.$message.error('文件大小不能超过 5MB!');
+			}
+			if (!isFile) {
+				this.$message.warning('文件格式上传错误,仅支持上传xlsx,xls,doc,docx,pdf)');
+			}
+			return isFile && isLt2M;
+		},
+
+		deletePlan() {
+			this.$confirm('确认删除跟踪记录:' + this.planData.title + '?', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			})
+				.then(() => {
+					let data = {
+						track_id: this.planData.id ? this.planData.id : '', //执行计划id 编辑的时候要传
+						package_employee_id: this.id, //员工考核记录信息id
+						index_id: this.indexItem.id, //指标id
+						dimension_xb: this.selectItemIndex
+					};
+					if (this.planData.id) {
+						if (this.planData.employee_id != this.userData.id) {
+							this.$message.error('不能删除其他管理者的管理记录!');
+							return false;
+						}
+						this.$axios('post', 'api/per/package/track/del', data).then(res => {
+							this.indexItem.mamage_record.splice(this.activePlanIndex, 1);
+							this.activePlanIndex = 0;
+							this.planData = this.indexItem.mamage_record[0] ? this.indexItem.mamage_record[0] : [];
+							this.isFill = false;
+							this.isFill2 = false;
+							this.$message.success('删除成功');
+						});
+					} else {
+						this.indexItem.mamage_record.splice(this.activePlanIndex, 1);
+						this.activePlanIndex = 0;
+						this.planData = this.indexItem.mamage_record[0] ? this.indexItem.mamage_record[0] : [];
+						this.isFill = false;
+						this.isFill2 = false;
+						this.$message.success('删除成功');
+					}
+				})
+				.catch(() => {});
+		},
+		// 添加
+		addPlan() {
+			this.img_fileList = []; // 图片附件
+			this.file_fileList = []; //文件附件
+			let obj = {
+				date: this.$moment().format('YYYY-MM-DD'),
+				title: '',
+				remark: '',
+				images: [],
+				append: '', //附件
+				appendName: '' //附件名称
+			};
+			this.indexItem.mamage_record.unshift(obj);
+			if (this.indexItem.mamage_record.length == 1) {
+				this.planData = this.indexItem.mamage_record[0];
+				this.$nextTick(() => {
+					this.$refs.inputTitle.focus();
+					this.isFill = true;
+				});
+			} else {
+				this.activePlanIndex = 0;
+				this.planData = this.indexItem.mamage_record[0];
+				this.$nextTick(() => {
+					this.$refs.inputTitle.focus();
+					this.isFill = true;
+				});
+			}
+			// console.log( this.activePlanIndex)
+			this.isFill2 = true;
+		},
+		// 提交执行计划
+		saveActionPlan(f = function() {}) {
+			if (!this.planData.title) {
+				this.$message.error('请输入跟踪管理记录内容');
+				return false;
+			}
+			if (this.planData.id) {
+				if (this.planData.employee_id != this.userData.id) {
+					this.$message.error('不能编辑其他管理者的管理记录!');
+					return false;
+				}
+			}
+			this.isFill = false;
+			let data = {
+				track_id: this.planData.id ? this.planData.id : '', //执行计划id 编辑的时候要传
+				dimension_xb: this.selectItemIndex,
+				package_employee_id: this.id, //员工考核记录信息id
+				index_id: this.indexItem.id, //指标id
+				title: this.planData.title, //标题
+				remark: this.planData.remark, //内容
+				images: JSON.stringify(this.planData.images),
+				append: this.planData.append,
+				append_name: this.planData.append_name
+			};
+			// return false;
+			this.$axios('post', '/api/per/package/track', data).then(res => {
+				this.$message.success('填写成功');
+				this.planData.id = res.data.data.id;
+				this.planData.employee_id = res.data.data.employee_id;
+				f();
+			});
+		},
+		// 点击执行计划
+		activePlan(item, index) {
+			if (this.activePlanIndex == index) {
+				return false;
+			}
+			if (this.isFill) {
+				this.$confirm('请确认提交跟踪记录:' + this.planData.title + '?', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				})
+					.then(() => {
+						this.saveActionPlan(() => {
+							this.setActivePlan(item, index);
+						});
+					})
+					.catch(() => {
+						if (this.isFill2) {
+							this.indexItem.mamage_record.splice(this.activePlanIndex, 1);
+							this.setActivePlan(item, index);
+						} else {
+							this.indexItem.mamage_record[this.activePlanIndex] = this.planData2;
+							this.planData = this.planData2;
+							this.$nextTick(() => {
+								setTimeout(() => {
+									this.setActivePlan(item, index);
+								}, 200);
+							});
+						}
+					});
+			} else {
+				this.planData2 = JSON.parse(JSON.stringify(item));
+				this.setActivePlan(item, index);
+			}
+		},
+		setActivePlan(item, index) {
+			this.planData = item;
+			this.setFlie();
+			this.activePlanIndex = index;
+			this.isFill = false;
+			this.isFill2 = false;
+		},
+		setActiveItem(index, index2) {
+			this.getShowData(index, index2);
+			this.activeDrawerIndex = index + '-' + index2;
+			this.activePlanIndex = 0;
+			this.isFill = false;
+			this.isFill2 = false;
+		},
+		// 点击指标
+		activeItem(index, index2, item) {
+			this.selectItemIndex = item.dimension_xb;
+			this.isOperationTwo = item.isOperation;
+			if (this.activeDrawerIndex == index + '-' + index2) {
+				return false;
+			}
+			if (this.isFill) {
+				this.$confirm('请确认提交跟踪记录:' + this.planData.title + '?', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				})
+					.then(() => {
+						this.saveActionPlan(() => {
+							this.setActiveItem(index, index2);
+						});
+					})
+					.catch(() => {
+						if (this.isFill2) {
+							this.indexItem.mamage_record.splice(this.activePlanIndex, 1);
+							this.setActiveItem(index, index2);
+						} else {
+							this.indexItem.mamage_record[this.activePlanIndex] = this.planData2;
+							this.planData = this.planData2;
+							this.$nextTick(() => {
+								setTimeout(() => {
+									this.setActiveItem(index, index2);
+								}, 200);
+							});
+						}
+					});
+			} else {
+				this.setActiveItem(index, index2);
+			}
+		},
+		// 设置选中数据
+		getShowData(index, index2) {
+			if (index != undefined) {
+				this.indexItem = this.actionPlanList[index].index[index2];
+				this.planData = this.indexItem.mamage_record[0];
+				this.setFlie();
+				this.isOperationTwo = this.indexItem.isOperation;
+				if (this.planData) {
+					this.planData2 = JSON.parse(JSON.stringify(this.planData));
+				}
+			} else {
+				if (this.planIndex.length > 0) {
+					//如果有指定下标展示
+					this.indexItem = this.actionPlanList[this.planIndex[0]].index[this.planIndex[1]];
+					this.planData = this.indexItem.mamage_record[0];
+					this.setFlie();
+					this.selectItemIndex = this.planIndex[0];
+					this.isOperationTwo = this.indexItem.isOperation;
+					if (this.planData) {
+						this.planData2 = JSON.parse(JSON.stringify(this.planData));
+					}
+					this.activeDrawerIndex = this.planIndex[0] + '-' + this.planIndex[1];
+				} else {
+					this.indexItem = this.actionPlanList[0].index[0];
+					this.planData = this.indexItem.mamage_record[0];
+					this.setFlie();
+					this.isOperationTwo = this.indexItem.isOperation;
+					if (this.planData) {
+						this.planData2 = JSON.parse(JSON.stringify(this.planData));
+					}
+				}
+			}
+		},
+		setFlie() {
+			this.img_fileList = [];
+			this.file_fileList = [];
+			if (this.planData) {
+				this.img_fileList = this.planData.images;
+				if (this.planData.append) {
+					this.file_fileList = [{ name: this.planData.append_name, url: this.planData.append }];
+				}
+			}
+		},
+
+		handleClose(done) {
+			this.$emit('update:showDrawer', false);
+			if (this.isCz) {
+				this.$emit('confirm');
+			}
+			this.activeDrawerIndex = '0-0';
+			this.activePlanIndex = 0;
+			this.showDrawerTow = false;
+			this.isFill = false; //是否填写了
+			this.isFill2 = false; //添加执行计划时用,判断是要清空添加的,还是还原编辑的数据
+			this.isShowAdd = false;
+			done();
+		},
+		// 监听是否填写
+		inputText(val) {
+			if (!this.isFill) {
+				this.isFill = true;
+			}
+		},
+		inputBlur() {
+			this.isShowAdd = false;
+		},
+		inputFocus() {
+			this.isShowAdd = true;
+		}
+	}
+};
+</script>
+
+<style scoped="scoped">
+::v-deep .el-icon-picture-outline {
+}
+.all-derawer ::v-deep.el-drawer {
+	height: 90% !important;
+	border-radius: 10px 10px 0 0;
+	background-color: #f5f7fa;
+	min-width: 1100px !important;
+}
+.all-derawer ::v-deep.el-drawer__header {
+	background-color: #f5f7fa;
+	padding: 12px 20px;
+	margin-bottom: 0px;
+	font-size: 16px;
+}
+::v-deep .el-upload-list__item-name {
+	max-width: 250px;
+}
+::v-deep :focus {
+	outline: 0;
+}
+.btns {
+	position: absolute;
+	right: 20px;
+	top: 16px;
+	z-index: 999;
+}
+.plan-right-name {
+	color: #222;
+}
+.plan-right {
+	padding: 20px;
+	position: relative;
+	background-color: #f5f7fa;
+	min-height: 600px;
+}
+.plan-right-date {
+	text-align: center;
+	position: relative;
+	margin-bottom: 30px;
+}
+.plan-textarea ::v-deep textarea {
+	background-color: #f5f7fa;
+	border: none;
+}
+.plan-right-title {
+	border-bottom: 1px solid #f1f1f1;
+}
+.plan-right-title ::v-deep textarea {
+	background-color: #f5f7fa;
+	border: none;
+}
+.drawer-left {
+	background-color: #fff;
+	padding: 0 15px;
+	width: 280px;
+	border-right: 1px solid #f1f1f1;
+	overflow: auto;
+	padding-bottom: 60px;
+}
+.drawer-left-title {
+	padding: 16px 0;
+	font-weight: 600;
+	font-size: 16px;
+	color: #222;
+	border-bottom: 1px solid #f1f1f1;
+}
+.drawer-item {
+	padding: 16px 0;
+	cursor: pointer;
+}
+.drawer-item:hover {
+	background-color: #f5f7fa;
+}
+.drawer-left .active-drawer-item {
+	background-color: #f5f7fa;
+	border-right: 2px solid #409eff;
+}
+.plan-left-content:hover {
+	background-color: #f5f7fa;
+}
+.plan-left .active-drawer-item {
+	background-color: #f5f7fa;
+}
+.drawer-right-header {
+	background-color: #fff;
+	border-bottom: 1px solid #f1f1f1;
+	padding: 20px;
+}
+.drawer-right-main {
+	padding: 0px 20px;
+	height: 50px;
+	line-height: 50px;
+	background-color: #fff;
+	border-bottom: 1px solid #f1f1f1;
+}
+.plan-title {
+	font-size: 14px;
+	color: #666666;
+	margin-top: 5px;
+}
+.plan-left {
+	background-color: #fff;
+	border-right: 1px solid #f1f1f1;
+	overflow: auto;
+}
+.remark {
+	height: 100px;
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 6;
+	overflow: hidden;
+}
+.plan-left-content {
+	border-bottom: 1px solid #f1f1f1;
+	padding: 10px 16px;
+	cursor: pointer;
+	width: 100%;
+	  box-sizing: border-box;
+}
+</style>

+ 42 - 24
src/components/UserImage.vue → src/components/public/UserImage.vue

@@ -1,13 +1,12 @@
 <template>
-  <div style="box-sizing: border-box;">
-    <img v-if="imgUrl" class="logo_img" :src="imgUrl" :width="width" :height="height" />
-    <div v-else class="user_name_div" :style="{
-	   width: width,
-	   height: height,
-	   lineHeight: height, 
-	   fontSize: fontSize + 'rem'}">
-	   {{name}}
-	 </div>
+  <div style="text-align: center;">
+    <el-image v-if="imgUrl" :src="imgUrl" :style="{ width: width, height: height }" style="border-radius: 50%;margin: 0 auto;" fit="fill">
+      <div slot="error" class="image-slot"><i class="el-icon-picture"></i></div>
+    </el-image>
+    <span class="img_round" v-else>
+      <div class="user_name_div" :style="{ width: width, height: height, lineHeight: height, fontSize: fontSize + 'px' }">{{ name }}</div>
+      <div class="user_img_bg" :style="{ width: width, height: height }"></div>
+    </span>
   </div>
 </template>
 <script>
@@ -16,11 +15,11 @@
     props: {
       width: {
         type: String,
-        default: '0.8rem'
+        default: '40px'
       },
       height: {
         type: String,
-        default: '0.8rem'
+        default: '40px'
       },
       id:{
         type: Number,
@@ -36,7 +35,7 @@
       },
       fontSize:{
         type: String,
-        default: '0.8'
+        default: '16'
       }
     },
     // 数据
@@ -44,7 +43,7 @@
       return {
         imgUrl: "",
         name: "",
-		employeeMap:this.$getCache("userList")
+		employeeMap:this.$getEmployeeList()
       }
     },
 	watch:{
@@ -83,15 +82,34 @@
   }
 </script>
 <style scoped>
-  .user_name_div{
-    border-radius: 50%;
-    background: #238dfa;
-    text-align: center;
-    color: #fff;
-    margin: 0 auto;
-	box-sizing: border-box;
-  }
-  .logo_img{
-    border-radius: 50%;
-  }
+.img_round {
+  position: relative;
+  display: inline-block;
+  vertical-align: top;
+}
+.img_round .user_img_bg {
+  border-radius: 50%;
+  background: #238dfa;
+}
+.user_name_div {
+  position: absolute;
+  z-index: 1;
+  text-align: center;
+  color: #fff;
+}
+.logo_img {
+  border-radius: 50%;
+}
+::v-deep .image-slot {
+  font-size: 30px;
+  line-height: 50px;
+  text-align: center;
+  background: #f1f1f1;
+}
+::v-deep .van-image {
+  vertical-align: top;
+}
+::v-deep .el-image{
+  display: block
+}
 </style>

+ 71 - 32
src/components/season.vue → src/components/public/season.vue

@@ -11,7 +11,12 @@
         <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>
+      <div v-if="halfyear">
+        <span v-for="(item,index) in halfMonth" :key="index" class="selectMonth" @click="selectQuarter(item)">
+               {{ item }}
+        </span>
+      </div>
+      <div v-else>
         <span v-for="(item,index) in fullMonth" :key="index" class="selectMonth" @click="selectQuarter(item)">
                {{ item }}
         </span>
@@ -34,6 +39,7 @@ import moment from "moment";
         showTime1a: false,
         year: new Date().getFullYear(),
         fullMonth: ['第一季度', '第二季度', '第三季度', '第四季度'],
+        halfMonth: ['上半年', '下半年'],
         choseQuarter: '',
         choseQuarter1: ''
       }
@@ -46,7 +52,17 @@ import moment from "moment";
       defaultHint:{
         type:Boolean,
         default:false
-      }
+      },
+      halfyear:{//判断季度还是半年度
+        type:Boolean,
+        default:false
+      },
+    },
+    watch:{
+      halfyear(){//切换季度、半年度
+        this.choseQuarter = '';//清空输入框
+        this.showTime1a = false;//关闭选择框
+      },
     },
     mounted() {
       if(this.defaultHint){
@@ -57,20 +73,31 @@ import moment from "moment";
         '第四季度':''
       }
       
-      if(!this.isActive){
+      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]
+        if(this.halfyear){
+          var arrs=this.halfMonth;
+          var str=""
+          if(date<=6){
+            str=arrs[0]
+          }else{
+            str=arrs[1]
+          }
+          this.selectQuarter(str);
+        }else{//季度
+          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);
         }
-        this.selectQuarter(str);
       }
      },
     methods: {
@@ -94,23 +121,36 @@ import moment from "moment";
       },
       // 点击选项事件
       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
+        if(this.halfyear){
+          switch (item) {
+            case '上半年':
+              this.choseQuarter1 = this.year + '1'
+              this.choseQuarter = this.year + '年 上半年'
+              break
+            case '下半年':
+              this.choseQuarter1 = this.year + '2'
+              this.choseQuarter = this.year + '年 下半年'
+              break
+          }
+        }else{
+          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
@@ -134,7 +174,6 @@ import moment from "moment";
     box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
     background: #fff;
     padding: 5px;
-    padding-right: 20px;
   }
 
   .show1 p:nth-child(1) {

+ 249 - 0
src/components/public/upload.vue

@@ -0,0 +1,249 @@
+<template>
+	<div>
+		<el-upload
+			ref="upload_com"
+			:headers="headers"
+			:action="action"
+			:show-file-list="showFileList"
+			:file-list="fileList"
+			:on-success="_onSuccess"
+			:on-preview="_onPreview"
+			:http-request="oss_upload"
+			:on-remove="_onRemove"
+			:before-remove="_onBeforeRemove"
+			:before-upload="_beforeUpload"
+			:on-exceed="_onExceed"
+			:limit="limit"
+			:on-change="handleChange"
+			:multiple="multiple"
+		>
+			<slot></slot>
+			<slot name="tip"></slot>
+		</el-upload>
+		<el-progress v-show="showProcess" :percentage="processLength" :stroke-width="2"></el-progress>
+	</div>
+</template>
+
+<script>
+function noop() {}
+
+import moment from 'moment';
+import axios from 'axios';
+
+export default {
+	props: {
+		action: {
+			type: String,
+			required: true
+		},
+		headers: {
+			type: Object,
+			default() {
+				return {};
+			}
+		},
+		data: Object,
+		multiple: Boolean,
+		name: {
+			type: String,
+			default: 'file'
+		},
+		drag: Boolean,
+		dragger: Boolean,
+		withCredentials: Boolean,
+		showFileList: {
+			type: Boolean,
+			default: false
+		},
+		accept: String,
+		type: {
+			type: String,
+			default: 'select'
+		},
+		beforeUpload: Function,
+		beforeRemove: Function,
+		onRemove: {
+			type: Function,
+			default: noop
+		},
+		onBeforeRemove: {
+			type: Function,
+			default: noop
+		},
+		onChange: {
+			type: Function,
+			default: noop
+		},
+		onPreview: {
+			type: Function
+		},
+		onSuccess: {
+			type: Function,
+			default: noop
+		},
+		onProgress: {
+			type: Function,
+			default: noop
+		},
+		onError: {
+			type: Function,
+			default: noop
+		},
+		fileList: {
+			type: Array,
+			default() {
+				return [];
+			}
+		},
+		autoUpload: {
+			type: Boolean,
+			default: true
+		},
+		listType: {
+			type: String,
+			default: 'text' // text,picture,picture-card
+		},
+		httpRequest: Function,
+		disabled: Boolean,
+		limit: {
+			type: Number,
+			default: () => {
+				return 1;
+			}
+		},
+		onExceed: {
+			type: Function,
+			default: noop
+		}
+	},
+	name: 'upload',
+	data() {
+		return {
+			processLength: 0,
+			showProcess: false,
+			files: {},
+			config: null
+		};
+	},
+	methods: {
+		handleChange(file, fileList) {
+			this.files = file;
+		},
+		handleChanges(file) {
+			if (file.status === 'ready') {
+				this.processLength = 0;
+				this.showProcess = true;
+				const interval = setInterval(() => {
+					if (this.processLength >= 99) {
+						clearInterval(interval);
+						return;
+					}
+					this.processLength += 1;
+				}, 20);
+			}
+			if (file.status === 'success') {
+				this.processLength = 100;
+				this.showProcess = false;
+			}
+		},
+		get_sign(callback) {
+			axios.get('https://intesys.cms.g107.com/integral.php/Api/get_signature', {
+					headers: {
+						'Content-Type': 'application/json; charset=utf-8',
+						'A-Token': this.$getToken()
+					}
+				})
+				.then(res => {
+					this.config = res.data.data;
+					callback();
+				});
+		},
+		_beforeUpload(file) {
+			if (!this.beforeUpload(file)) {
+				return false;
+			} else {
+				this.handleChanges(this.files);
+			}
+		},
+		oss_upload(upload_obj) {
+			let self = this;
+			this.get_sign(function() {
+				self.upload(upload_obj.file);
+			});
+		},
+		_onExceed(files, fileList) {
+			this.$message.warning(`当前限制选择 ${this.limit} 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
+		},
+		_onSuccess(response, file, fileList) {
+			this.onSuccess(response, file, fileList);
+		},
+		_onPreview(file) {
+			this.onPreview(file);
+		},
+		_onRemove(file, fileList) {
+			this.onRemove(file, fileList);
+		},
+		_onBeforeRemove(file, fileList) {
+			if (file.status == 'success') {
+				return this.$confirm(`确定移除此项?`);
+			}
+		},
+		random_string(len) {
+			len = len || 32;
+			var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
+			var maxPos = chars.length;
+			var pwd = '';
+			for (let i = 0; i < len; i++) {
+				pwd += chars.charAt(Math.floor(Math.random() * maxPos));
+			}
+			return pwd;
+		},
+		upload(item) {
+			let self = this;
+			const photo = item; // 获取图片对象
+			const photoName = item.name; // 原图片的名称
+			const url = 'https://gdyapp.oss-cn-shenzhen.aliyuncs.com';
+			let date = moment().format('YYYY/MM/DD');
+			let param = new FormData();
+			let randomStr = this.random_string(32);
+			let key = 'intesys/ddJx/' + this.$getUserData().site.id + '/' + date + '/' + randomStr + '/' + photoName;
+			param.append('Filename', photoName);
+			param.append('key', key);
+			param.append('policy', this.config.policy);
+			param.append('OSSAccessKeyId', this.config.accessid);
+			param.append('success_action_status', '200'); // 不要问为什么,照做
+			param.append('callback', this.config.callback);
+			param.append('signature', this.config.signature);
+			param.append('file', photo); // 这个**切记**一定要放到最后去 append ,不然阿里云会一直报 key 的错误
+			axios.post(url, param, {
+					headers: {
+						'Content-Type': 'multipart/form-data'
+					}
+				})
+				.then(response => {
+					if (response.data.Status == 'Ok') {
+						this.processLength = 100;
+						this.showProcess = false;
+						setTimeout(() => {
+							this.processLength = 0;
+						}, 200);
+						self.fileList.push({
+							name: randomStr + photoName,
+							url: 'https://gdyapp.oss-cn-shenzhen.aliyuncs.com/' + key,
+							name: item.name,
+							response: {
+								url: 'https://gdyapp.oss-cn-shenzhen.aliyuncs.com/' + key
+							}
+						});
+						self._onSuccess({ status: 1, url: 'https://gdyapp.oss-cn-shenzhen.aliyuncs.com/' + key, file_name: randomStr + photoName }, item, self.fileList);
+					}
+				})
+				.catch(err => {
+					this.showProcess = false;
+				});
+		}
+	}
+};
+</script>
+
+<style scoped></style>

+ 0 - 163
src/components/publics/workpoints.vue

@@ -1,163 +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>
-		  <div v-else-if="v.type=='object'" style="padding: 20px 0px;margin-left: 160px;">
-			<div style="margin-bottom: 10px;">全勤加分需同时满足以下条件</div>
-			<div style="padding-left: 23px;">1、当月无旷工</div>
-			<div style="margin: 15px 0;">
-				<div><el-checkbox v-model="v.absent_holiday.enable" :true-label="1" :false-label="0">2、当月未提交以下请假
-					<el-tooltip placement="top" content="填写的请假名称必须与钉钉考勤打卡-假期管理-假期规则对应,否则此项不生效">
-					  <span class="initia_mark" style="background-color: #666;">?</span>
-					</el-tooltip>
-				</el-checkbox></div>
-				<div class="flex-box" style="margin-top: 10px;padding-left: 20px;">
-					<el-input :disabled="v.absent_holiday.enable==1?false:true" style="width: 150px;" :key="1" type="text" v-model="val1" placeholder="假期类型"></el-input>
-					<el-input :disabled="v.absent_holiday.enable==1?false:true" style="width: 150px;margin: 0 10px;" :key="2" type="text" v-model="val2" placeholder="假期类型"></el-input>
-					<el-input :disabled="v.absent_holiday.enable==1?false:true" style="width: 150px;" type="text" :key="3" v-model="val3" placeholder="假期类型"></el-input>
-				</div>
-			</div>
-			<div>
-				<div><el-checkbox v-model="v.absent_late.enable" :true-label="1" :false-label="0">
-				3、当月迟到少于 
-				<el-input @input="[v.absent_late.count=v.absent_late.count.replace(/[^\d]/g,'')]" :disabled="v.absent_late.enable==1?false:true" style="width: 150px;" v-model="v.absent_late.count" placeholder="次数"></el-input>
-				 次</el-checkbox></div>
-<!-- 				<div class="flex-box">
-					<el-input style="width: 150px;" placeholder="假期类型"></el-input>
-					<el-input style="width: 150px;margin: 0 10px;" placeholder="假期类型"></el-input>
-					<el-input style="width: 150px;" placeholder="假期类型"></el-input>
-				</div> -->
-			</div>
-		  </div>  
-          <el-form-item  style="margin: 20px 0 0 0 " v-else>
-            <template slot="label">
-				<template v-if="v.message">
-					<el-popover placement="bottom" width="400" trigger="hover">
-					  <div style="padding: 10px;">{{v.message}}</div>
-					  <span slot="reference" :style="'width:'+initia_head.initial_left">{{v.initialName}} <i class="el-icon-warning"></i></span>
-					</el-popover>
-				</template>
-				<template v-else>
-					<span slot="reference" :style="'width:'+initia_head.initial_left">{{v.initialName}}</span>
-				</template>
-            </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,
-		checked1:'',
-		val1:'',
-		val2:'',
-		val3:'',
-	};
-  },
-  created() {
-	 if(this.initia_arr.length==9){
-		 this.val1=this.initia_arr[8].absent_holiday.list[0]
-		 this.val2=this.initia_arr[8].absent_holiday.list[1]
-		 this.val3=this.initia_arr[8].absent_holiday.list[2]
-	 }
-  },
-  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 = [];
-	  let checkAllData={};//全勤配置
-      for (var i = 0; i < this.initia_arr.length; i++) {
-		  if(this.initia_arr[i].type!='object'){
-			 arr.push({sj: this.initia_arr[i].initia_input.age});
-		  }else{
-			  checkAllData=this.initia_arr[i]
-			  let list=[this.val1,this.val2,this.val3];
-			  checkAllData.absent_holiday.list=list.filter(x=>{
-				  if(x){
-					  return x
-				  }
-			  })
-		  }
-      }
-	  this.$emit("initia", {arr,checkAllData});
-    },
-  },
-};
-</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>

+ 252 - 0
src/components/set/BasicsSet.vue

@@ -0,0 +1,252 @@
+
+<template>
+  <div class="all">
+    <div class="flex-box main">
+      <div class="flex-1 left">
+        <ul class="ul">
+          <!-- <li class="li fontColorB" :class="[isActive == 1 ? 'active-li' : '']" @click="active(1)">评分设置</li> -->
+          <li class="li fontColorB" :class="[isActive == 2 ? 'active-li' : '']" @click="active(2)">绩效等级配置(默认)</li>
+        </ul>
+      </div>
+      <div class="flex-5 right">
+        <div v-show="isActive == 1">
+          <el-form ref="detailForm" :model="ruleForm" :rules="rules" @submit.native.prevent label-width="150px">
+            <div class="title">
+              总分规则
+              <span class="fontColorB">(量化指标和非量化指标)</span>
+            </div>
+            <el-form-item label="自定义" prop="dept_id">
+              <el-select v-model="ruleForm.region" placeholder="请选择自定义" disabled style="width: 300px;">
+                <el-option label="量化指标和非量化指标合并计算" value="shanghai"></el-option>
+                <el-option label="量化指标和非量化指标分开计算" value="beijing"></el-option>
+              </el-select>
+            </el-form-item>
+            <div class="title">量化指标</div>
+            <el-form-item label="指标类型" prop="name">
+              <el-select v-model="ruleForm.region" disabled style="width: 300px;"><el-option label="数字类型" value="shanghai"></el-option></el-select>
+            </el-form-item>
+            <el-form-item label="总分自动加和" prop="tel"><el-switch v-model="ruleForm.delivery" disabled></el-switch></el-form-item>
+            <el-form-item label="录入方式" prop="company_id">
+              <el-select v-model="ruleForm.region" disabled style="width: 300px;"><el-option label="文本框输入" value="shanghai"></el-option></el-select>
+            </el-form-item>
+          </el-form>
+        </div>
+        <div v-show="isActive == 2">
+          <el-form ref="detailForm" :model="ruleForm" :rules="rules" @submit.native.prevent label-width="150px">
+            <div class="title">绩效等级配置</div>
+<!--            <el-form-item label="绩效等级" prop="tel">
+              <template slot="label">
+                <span>绩效等级</span>
+                <el-tooltip effect="dark" content="设置公司的等级名称及对应占比,考核结束后,将按照考核结果的排名,正态强制分布。如:排名前10%的员工绩效等级为3.75" placement="top">
+                  <i class="el-icon-warning"></i>
+                </el-tooltip>
+              </template>
+              <el-switch v-model="level_enable" disabled :active-value="1" :inactive-value="0"></el-switch>
+            </el-form-item>
+            <el-form-item label="录入方式" prop="company_id">
+              <el-select v-model="ruleForm.region" disabled><el-option label="文本框输入" value="shanghai"></el-option></el-select>
+            </el-form-item> -->
+            <div style="height: 30px;"></div>
+            <ClassSet ref="ClassSet" :inputs="inputs" :inputsStyle="{paddingLeft:'150px',width: '600px'}"></ClassSet>
+          </el-form>
+        </div>
+      </div>
+    </div>
+    <div class="footer"><el-button type="primary" :loading="loading" @click="save()">保存设置</el-button></div>
+  </div>
+</template>
+
+<script>
+import ClassSet from '@/components/public/ClassSet';
+export default {
+  components:{ClassSet},
+  name: 'BasicsSet',
+  data() {
+    return {
+      loading:false,
+      isActive: 2,
+      ruleForm: {
+        region:'shanghai',
+        delivery:true
+      },
+      rules: {},
+      inputs: [],//分值区间
+      level_enable:true,//是否开启绩效等级
+      isSave:true
+    };
+  },
+  watch: {},
+  created() {
+    this.getAllSet();
+  },
+  mounted() {},
+  methods: {
+    // 获取全局设置
+    getAllSet(){
+      this.$axios('get','api/per/user/base_config').then(res=>{
+            let data=res.data.data;
+            let levels=data.level_scope.levels;
+            this.level_enable=data.level_enable;
+            var inputs=[];
+            var max=0;//最大值
+            if(levels){
+              levels.forEach((item,index)=>{
+                var obj;
+                if(index==0){
+                  obj={name:item.name,max:Number(item.value),min:0};
+                }else{
+                  obj={name:item.name,max:Number(item.value),min:max};//当不是第一个等级时,最小值为上一个的最大值
+                }
+                max=item.value;
+                inputs.push(obj);
+              })
+              this.inputs=inputs
+            }
+      })
+    },
+    //保存
+    save(){
+        let is=true,level_scope=[];
+        let isSave=this.$refs.ClassSet.isSave
+        let inputsList=this.$refs.ClassSet.inputsList
+        if(!isSave){
+          return false
+        }
+        inputsList.some(item=>{
+          if(!item.name){
+            this.$message.error('等级的名称不能为空');
+            is=false;
+            return true;
+          }
+          if(item.max==0){
+            this.$message.error('最大值不能为空或者0');
+            is=false;
+            return true;
+          }
+          level_scope.push({name:item.name,value:Number(item.max)});
+        })
+
+        var level_scopes={//参数的数据结构
+          levels:level_scope
+        };
+        if(is){
+          this.loading=true;
+          this.$axios('post','api/per/user/set_base_config',{level_scope:JSON.stringify(level_scopes)}).then(res=>{
+             this.$message.success('设置成功');
+             this.getAllSet();
+          }).finally(()=>{
+             this.loading=false;
+          })
+        }
+    },
+    // 监听最大值输入
+    InputBiur(e, index) {
+      this.isSave=true
+      var max = this.inputsList[index].max;
+      var min = this.inputsList[index].min;
+      if (max == 0) {
+        return false;
+      }
+      if (min >= max) {
+        this.$message.error('不能小于或等于' + min);
+        this.$set(this.inputsList[index], 'max', 0);
+        this.isSave=false
+        return false;
+      }
+      if (this.inputsList[index + 1]) {
+        this.$set(this.inputsList[index + 1], 'min', max);
+      }
+    },
+    addInput() {
+      if(this.inputsList.length==10){
+        this.$message.error('最高10个级别');
+        return false;
+      }
+      var max = this.inputsList[this.inputsList.length - 1].max;
+      this.inputsList.push({ name: '', min: max, max: 0 });
+    },
+    deleteInput(index) {
+      if (index == 0) {
+        this.$message.error('至少保留一个等级');
+        return false;
+      }
+      var min = this.inputsList[index].min; //获取当前元素最小值
+      this.inputsList.splice(index, 1);
+      if (index != this.inputsList.length) {
+        //当删除不是最后一位时
+        this.$set(this.inputsList[index],'min', min);
+      }
+      // // this.inputsList.some((item, i) => {
+      // //   if (i == index) {
+      //     this.inputsList.splice(i, 1); //在数组的some方法中,如果return true,就会立即终止这个数组的后续循环
+      // //     return true;
+      // //   }
+      // // });
+    },
+    active(index) {
+      this.isActive = index;
+    }
+  }
+};
+</script>
+<style scoped="scoped">
+.all {
+  padding: 10px;
+  min-height: calc(100vh - 210px);
+  position: relative;
+
+}
+.title {
+  font-weight: 600;
+  margin-bottom: 10px;
+  background-color: #f5f7fa;
+  padding: 15px;
+}
+.main {
+  min-height: calc(100% - 40px);
+}
+.title-f {
+  margin-bottom: 20px;
+}
+.footer {
+  background-color: #fff;
+  border-top: 1px solid #ebebeb;
+  height: 40px;
+  text-align: center;
+  padding-top: 10px;
+}
+.checkChild {
+  background-color: #fbfdff;
+  margin-left: 20px;
+}
+.left,
+.right {
+  height: 100%;
+  overflow: auto;
+}
+.ul {
+  border: 1px solid #ebebeb;
+  height: 100%;
+  border-bottom: none;
+}
+.li {
+  padding: 15px;
+  position: relative;
+}
+.li:hover {
+  background-color: #f5f7fa;
+}
+.active-li {
+  color: #409eff !important;
+  background-color: #f5f7fa;
+}
+.active-li::before {
+  content: '';
+  position: absolute;
+  width: 3px;
+  height: 100%;
+  background-color: #409eff;
+  left: 0;
+  top: 0;
+}
+</style>

+ 319 - 0
src/components/set/EvaluateSet.vue

@@ -0,0 +1,319 @@
+<template>
+  <div class="all">
+    <header class="flex-box-ce">
+      <div class="flex-1"><el-input prefix-icon="el-icon-search" placeholder="搜索考核表" v-model="search_words" class="width-250" clearable></el-input></div>
+      <div class="flex-box-ce" v-if="$isAuthoritys($14)">
+        <el-button type="text" style="margin-right: 10px;text-decoration:underline" @click="openUsers">无考核表人员</el-button>
+        <el-button type="primary" style="margin-right: 10px;" @click="handleCommand('A')">新增考核表</el-button>
+        <el-button class="primaryBtn" @click="handleCommand('B')">复制考核表</el-button>
+      </div>
+    </header>
+    <div class="main">
+      <div style="margin-top: 20px;">
+        <div class="yellow">相同岗位且考核流程一致时,可建立同一个考核表;考核流程不同时,请分开多个考核表进行考核</div>
+        <el-table stripe :data="tableData" class="table-box scroll-bar" style="width: 100%;" v-loading="loading">
+          <el-table-column prop="name" sortable label="名称">
+            <template slot-scope="scope">
+              <PreBox :value="scope.row.name"></PreBox>
+            </template>
+          </el-table-column>
+          <el-table-column prop="employee_num" label="参与人数"></el-table-column>
+          <el-table-column prop="cycle_type" label="周期类型" sortable>
+            <template slot-scope="scope">
+              <span>{{ $getCycleType(scope.row.cycle_type) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="address" label="操作">
+            <template slot-scope="scope">
+              <div class="is">
+                <el-link type="primary" @click="compile(scope.row,'1')">人员分组</el-link>
+                <el-link type="primary" style="margin: 0 10px;" @click="compile(scope.row,'2')">考核模板</el-link>
+                <el-link type="primary" @click="compile(scope.row,'3')">具体流程</el-link>
+
+              <!-- <el-tooltip effect="dark" content="编辑" placement="top"><i class="el-icon-edit yellow" @click="compile(scope.row)"></i></el-tooltip>
+                <el-tooltip effect="dark" content="预览流程" placement="top"><i class="el-icon-tickets blue" @click="preview(scope.row)"></i></el-tooltip>
+                <el-tooltip effect="dark" content="删除" placement="top"><i class="el-icon-delete red" @click="deleteItem(scope.row.id)"></i></el-tooltip> -->
+              </div>
+              <el-dropdown placement="bottom" :show-timeout="150" :hide-timeout="150">
+                <span class="el-dropdown-links">···</span>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item :disabled="false">
+                    <el-button type="text" class="color-red" v-loading.fullscreen.lock="bodyLoad" @click.stop="preview(scope.row)">预览流程</el-button>
+                  </el-dropdown-item>
+                  <el-dropdown-item :disabled="false">
+                    <el-button type="text" class="color-red" v-loading.fullscreen.lock="bodyLoad" @click.stop="deleteItem(scope.row.id)">删除</el-button>
+                  </el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+            </template>
+          </el-table-column>
+        </el-table>
+        <Pagination :page="page" :page_size="page_size" :total="total" @handleSizeChange="handleSizeChange" @handleCurrentChange="handleCurrentChange"></Pagination>
+      </div>
+    </div>
+
+    <BrawerBox drawerTitle="选择考核表" :showDrawer.sync="isChecks">
+      <template slot="main">
+        <div class="flex-box-ce">
+          <el-input prefix-icon="el-icon-search" placeholder="搜索考核" v-model="search_words2"></el-input>
+          <el-select v-model="cycle_type" placeholder="" style="margin: 0 10px;">
+            <el-option v-for="item in $getCycleType()" :key="item.value" :label="item.label" :value="item.value"></el-option>
+          </el-select>
+        </div>
+        <ul class="ul" v-if="allData.length > 0">
+          <li v-for="(item, index) in allData" :key="index" class="flex-box-ce li" v-if="item.name.indexOf(search_words2) >= 0">
+            <el-radio v-model="cycleId" :label="item.id" class="flex-box-ce flex-1" style="padding: 15px 0;">
+              <div class="flex-box-ce">
+                <div class="flex-1">{{ item.name }}</div>
+                <div class="blue" v-if="item.employee_num > 0">{{ item.employee_num }} 人</div>
+              </div>
+            </el-radio>
+          </li>
+        </ul>
+        <NoData v-else content="暂无内容"></NoData>
+      </template>
+      <template slot="footer">
+        <el-button plain @click="isChecks = false">取消</el-button>
+        <el-button type="primary" :loading="loading" @click="submitForm('detailForm')">确定</el-button>
+      </template>
+    </BrawerBox>
+
+    <BrawerBox drawerTitle="无考核表人员" :showDrawer.sync="isNoUser">
+      <template slot="main">
+        <div class="flex-box-ce"><el-input prefix-icon="el-icon-search" placeholder="人员搜索" v-model="search_words3"></el-input></div>
+        <ul class="ul" v-if="isNoUserList.length > 0">
+          <li v-for="(item, index) in isNoUserList" :key="index" class="flex-box-ce li" style="padding: 15px 0;" v-if="item.name.indexOf(search_words3) >= 0">
+            <userImage :user_name="item.name" fontSize="14" :img_url="item.img_url"></userImage>
+            <div class="flex-box-v" style="margin: 0 10px;">
+              <div>{{ item.name }}</div>
+              <div v-if="item.dept_list.length > 0" style="margin-top: 5px;" class="fontColorF font-flex-word">
+                <span v-for="(item2, index2) in item.dept_list" :key="index2">
+                  <span>{{ item2.name }}</span>
+                  <span v-if="item.dept_list.length - index2 > 1">,</span>
+                </span>
+              </div>
+            </div>
+          </li>
+        </ul>
+        <NoData v-else content="暂无内容"></NoData>
+      </template>
+      <template slot="footer">
+        <el-button plain @click="isNoUser = false">关闭</el-button>
+      </template>
+    </BrawerBox>
+  </div>
+</template>
+
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import BrawerBox from '@/components/public/BrawerBox';
+import { _debounce } from '@/api/auth';
+export default {
+  components: { EmployeeSelector, BrawerBox },
+  name: 'EvaluateSet',
+  data() {
+    return {
+      total: 0,
+      page: 1,
+      page_size: 10,
+      tableData: [],
+      allData: [],
+      search_words: '', //关键字
+      search_words2: '',
+      search_words3: '',
+      isChecks: false,
+      loading: false,
+      cycle_type: 0,
+      cycleId: '',
+      // 获取未加入考核表相关
+      isNoUser: false,
+      isNoUserList: [],
+
+      bodyLoad: false
+    };
+  },
+  watch: {
+    isNoUser(val) {
+      if (!val) {
+        this.search_words3 = '';
+      }
+    },
+    search_words: {
+      deep: true,
+      handler: _debounce(function(val) {
+        this.page = 1;
+        this.getList();
+      })
+    },
+    cycle_type() {
+      this.getAllList();
+    }
+  },
+  created() {
+    this.getList();
+    this.getAllList();
+  },
+  methods: {
+    openUsers() {
+      this.getNoEmployee(() => {
+        this.isNoUser = true;
+      });
+    },
+    // 获取未加入考核表人员
+    getNoEmployee(fun = function() {}) {
+      this.$axios('get', 'api/per/package/free_man').then(res => {
+        this.isNoUserList = res.data.data.list;
+        fun();
+      });
+    },
+    //预览流程
+    preview(item) {
+      if (item.employee_num == 0) {
+        this.$message.warning('该考核表没有参与人数,不可预览');
+        return false;
+      }
+      this.$router.push({ path: '/previewTow', query: { group_id: item.id, name: item.name } });
+    },
+    //删除
+    deleteItem(id) {
+      this.$confirm('确定删除该考核表', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.$axios('post', '/api/per/evaluation/delete_group', { id: id }).then(res => {
+            this.$message.success('删除成功');
+            this.getList();
+          });
+        })
+        .catch(() => {});
+    },
+    //编辑
+    compile(item,index) {
+      let http = this.$axios('get', '/api/per/evaluation/group_detail', { id: item.id });
+      let http2 = this.$axios('get', '/api/per/evaluation/manager', { id: item.id });
+      Promise.all([http, http2]).then(res => {
+        res[0].data.data.mannager_ids = res[1].data.data.list;
+        this.$router.push({ path: '/evaluate', query: { data: JSON.stringify(res[0].data.data),index:index } });
+      });
+    },
+    search() {
+      this.page = 1;
+      this.getList();
+    },
+    // 获取全部考核表
+    getAllList() {
+      this.$axios('get', '/api/per/evaluation/all_group', { cycle_type: this.cycle_type }).then(res => {
+        let data = res.data.data.list || [];
+        this.allData = data;
+      });
+    },
+    // 获取考核表
+    getList() {
+      this.loading = true;
+      this.$axios('get', '/api/per/evaluation/all_group', { page: this.page, page_size: this.page_size, search_words: this.search_words })
+        .then(res => {
+          let data = res.data.data.list || [];
+          this.total = res.data.data.total;
+          this.tableData = data;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    actionCheck(e, obj) {},
+    handleCommand(e) {
+      if (e == 'A') {
+        this.$router.push({ path: '/evaluate' });
+      } else {
+        this.isChecks = true;
+      }
+    },
+    submitForm() {
+      if (!this.cycleId) {
+        this.$message.error('请选择考核表');
+        return false;
+      }
+      let http = this.$axios('get', '/api/per/evaluation/group_detail', { id: this.cycleId });
+      this.isChecks = false;
+      Promise.all([http]).then(res => {
+        res[0].data.data.mannager_ids = [];
+        res[0].data.data.id = '';
+        res[0].data.data.name = '';
+        this.$router.push({ path: '/evaluate', query: { data: JSON.stringify(res[0].data.data) } });
+      });
+    },
+    openHome() {
+      this.$router.push({ path: '/home' });
+    },
+    // 页面变更
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getList();
+    },
+    // 页面跳转
+    handleSizeChange(val) {
+      this.page_size = val;
+      this.getList();
+    }
+  }
+};
+</script>
+<style scoped="scoped">
+.el-dropdown-links {
+  font-size: 20px;
+  cursor: pointer;
+  color: #a6a8aa;
+}
+
+::v-deep .el-table tr:hover {
+  cursor: pointer;
+}
+.is i {
+  font-size: 18px;
+  padding: 0 10px;
+  /* cursor: pointer; */
+}
+.all {
+  padding: 10px;
+  min-height: calc(100vh - 210px);
+  position: relative;
+}
+.title {
+  font-size: 18px;
+  font-weight: 500;
+  margin-bottom: 10px;
+}
+.width-250 {
+  width: 250px;
+}
+.title-f {
+  margin-bottom: 20px;
+}
+.inputDc {
+  position: absolute;
+  top: 0;
+  right: 0;
+  left: 0;
+  bottom: 0;
+  z-index: 9;
+}
+.checkChild {
+  background-color: #fbfdff;
+  margin-left: 20px;
+}
+.li {
+  border-bottom: 1px solid #f1f1f1;
+}
+.li:hover {
+  background-color: #f5f7fa;
+}
+.ul {
+  margin-top: 20px;
+}
+.table-box {
+  /* max-height: calc(100vh - 330px); */
+  overflow: auto;
+}
+</style>

+ 989 - 0
src/components/set/IndexSet.vue

@@ -0,0 +1,989 @@
+<template>
+  <div class="all">
+    <header class="flex-box-ce">
+      <div class="flex-1">
+        <el-select v-model="type" placeholder="指标类型"  style="width: 200px;">
+          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+        </el-select>
+        <el-select v-model="tabIds" multiple placeholder="标签搜索"  style="width: 200px;margin: 0 10px;">
+          <el-option v-for="item in tabs" :key="item.id" :label="item.name" :value="item.id"></el-option>
+        </el-select>
+        <el-input placeholder="搜索指标名称" prefix-icon="el-icon-search"  v-model="keywords" style="width: 200px;" clearable></el-input>
+      </div>
+      <div class="flex-box-ce">
+        <el-button type="primary"  @click="openAdd()">新增指标</el-button>
+        <el-button type="success"  @click="dialogVisible = true">标签库</el-button>
+        <el-button type="danger"  :disabled="SelectionChange.length == 0" @click="deleteIndex()">删除</el-button>
+        <el-button  @click="showMove = true" style="margin-right: 10px;" :disabled="SelectionChange.length == 0">移动到</el-button>
+        <el-dropdown @command="handleCommand2">
+          <el-button >
+            更多
+            <i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item command="A">导入指标</el-dropdown-item>
+            <el-dropdown-item command="B">导出指标</el-dropdown-item>
+            <el-dropdown-item command="C">指标设置</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </div>
+    </header>
+    <div class="main">
+      <div class="flex-box" style="margin-top: 20px;">
+        <div class="main-left">
+          <div class="flex-box-ce left-title">
+            <div class="flex-1">指标分类</div>
+            <i class="el-icon-plus" style="cursor: pointer;" @click="showAddCate = true"></i>
+          </div>
+          <ul class="ul scroll-bar" v-if="indexTypeList.length > 0">
+            <li class="flex-box-ce li" v-for="(item, index) in indexTypeList" :key="index" :class="[cate_id == item.id ? 'isActiveLi' : '']" @click="activeLi(item, index)">
+              <div class="index-name font-flex-word" v-if="item.id != 0">{{ item.name }}</div>
+              <div class="index-name font-flex-word" v-else>
+                <i class="el-icon-s-help"></i>
+                {{ item.name }}
+              </div>
+              <div style="width: 14px;" v-if="item.id == 0"></div>
+              <el-dropdown @command="handleCommand($event, item)" v-else>
+                <i class="el-icon-more" style="cursor: pointer;"></i>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item command="A">
+                    <i class="el-icon-edit"></i>
+                    编辑
+                  </el-dropdown-item>
+                  <el-dropdown-item command="B">
+                    <i class="el-icon-delete"></i>
+                    删除
+                  </el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+            </li>
+          </ul>
+          <NoData v-else content="暂无分类" imgW="120px" imgH="80px"></NoData>
+        </div>
+        <div class="main-right">
+          <div class="fontColorB flex-box flex-d-center">
+            <div>{{ typeName }}</div>
+            <div><el-checkbox v-model="enableDs_checked">只看已开启【加入统计项】的指标</el-checkbox></div>
+          </div>
+          <el-table :data="indexList" stripe v-loading="loading" class="table-box scroll-bar" @selection-change="handleSelectionChange" @row-click="rowClick">
+            <el-table-column type="selection"></el-table-column>
+            <el-table-column prop="enable_ds" label="" width="42px">
+              <template slot-scope="scope">
+                <el-tooltip v-if="scope.row.enable_ds == 1" class="item" effect="dark" content="已加入【数据中台】统计项,请谨慎修改此指标" placement="top">
+                  <!-- menu_but_icon -->
+                  <!-- menu_middle_icon -->
+                  <!-- el-icon-loading -->
+                  <svg-icon icon-class="menu_middle_icon" class="menu_middle_icon "></svg-icon>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column prop="name" sortable label="名称">
+              <template slot-scope="scope">
+                <PreBox :value="scope.row.name"></PreBox>
+              </template>
+            </el-table-column>
+            <el-table-column prop="cate_name"  label="指标分类"></el-table-column>
+            <el-table-column prop="type" sortable label="指标类型">
+              <template slot-scope="scope">
+                <span v-if="scope.row.type == 1">量化指标</span>
+                <span v-if="scope.row.type == 2">非量化指标</span>
+                <span v-if="scope.row.type == 3">额外加分项</span>
+                <span v-if="scope.row.type == 4">额外扣分项</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="per_remark" label="考核标准" min-width="200">
+              <template slot-scope="scope">
+                  <PreBox :value="scope.row.per_remark"></PreBox>
+              </template>
+            </el-table-column>
+            <el-table-column prop="weight" label="权重">
+              <template slot-scope="scope">
+                <span v-if="scope.row.weight">{{ scope.row.weight }}%</span>
+                <span v-else>-</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="tag" label="标签">
+              <template slot-scope="scope">
+                <template v-if="scope.row.tag.length > 0">
+                  <el-tag v-for="item in scope.row.tag" :key="item.id">{{ item.name }}</el-tag>
+                </template>
+                <span v-else>-</span>
+              </template>
+            </el-table-column>
+          </el-table>
+          <Pagination :page="page" :page_size="page_size" :total="total" @handleSizeChange="handleSizeChange" @handleCurrentChange="handleCurrentChange"></Pagination>
+        </div>
+      </div>
+    </div>
+
+    <!-- 标签库 -->
+    <el-dialog title="标签库" :visible.sync="dialogVisible" width="500px" :close-on-click-modal="false">
+      <el-tag :key="index" v-for="(tag, index) in tabs" closable :disable-transitions="false" @close="handleClose(tag)">
+        <span v-if="tag.name">{{ tag.name }}</span>
+        <span v-else>{{ tag }}</span>
+      </el-tag>
+      <el-input
+        class="input-new-tag"
+        v-if="inputVisible"
+        v-model="inputValue"
+        ref="saveTagInput"
+        size="mini"
+        @keyup.enter.native="handleInputConfirm"
+        @blur="handleInputConfirm"
+         maxlength="10"
+        show-word-limit
+      ></el-input>
+      <el-button v-else class="button-new-tag" size="mini" @click="showInput">
+        <i class="el-icon-plus"></i>
+        添加
+      </el-button>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取消</el-button>
+        <el-button type="primary" @click="saveTabs()">保存</el-button>
+      </span>
+    </el-dialog>
+    <!-- 添加分类 -->
+    <el-dialog :title="cateTitle" :visible.sync="showAddCate" width="30%" :close-on-click-modal="false">
+      <el-form ref="form" label-width="80px" style="margin-top: 20px;">
+        <el-form-item label="分类名称"><el-input v-model="cateName"></el-input></el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="showAddCate = false">取 消</el-button>
+        <el-button type="primary" @click="addCate()">确 定</el-button>
+      </span>
+    </el-dialog>
+    <!-- 移动 -->
+    <BrawerBox drawerTitle="移动到" :showDrawer.sync="showMove">
+      <template slot="main">
+        <el-input placeholder="选择分类" v-model="cateVal" clearable></el-input>
+        <ul style="margin-top: 20px;">
+          <li v-for="(item, index) in indexTypeList" :key="index" class="flex-box-ce li" v-if="item.id != 0 && item.name.indexOf(cateVal) >= 0">
+            <el-radio v-model="selectCateId" :label="item.id" class="flex-box-ce flex-1" style="padding: 15px 0;">
+              <div class="flex-box-ce">
+                <div class="flex-1">{{ item.name }}</div>
+              </div>
+            </el-radio>
+          </li>
+        </ul>
+      </template>
+      <template slot="footer">
+        <el-button plain @click="showMove = false">取消</el-button>
+        <el-button type="primary" @click="Move()">确定</el-button>
+      </template>
+    </BrawerBox>
+    <!-- 导入规则 -->
+    <el-dialog title="导入指标" :visible.sync="import_rules_show" width="500px" :close-on-click-modal="false">
+      <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="$serverdomain + '/api/download/index/template'"><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="integralUpload"
+              :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>
+    <!-- 导入结果 -->
+    <el-dialog title="导入结果" :visible.sync="error_list_show" @close="error_list_SX" :append-to-body="true" width="700px" :close-on-click-modal="false">
+      <el-table :data="error_list" stripe>
+        <el-table-column prop="name" label="指标名称"></el-table-column>
+        <el-table-column prop="error" label="错误信息"></el-table-column>
+      </el-table>
+    </el-dialog>
+    <!-- 指标等级设置 -->
+    <BrawerBox :showDrawer.sync="indexSetting"  drawerTitle="指标等级设置">
+      <template slot="main">
+        <div>
+          <div style="color: #656565;">每项指标评分后,按分数展示对应的评级,此处可设置多项评级标准。<br/>指标设置或新增时自由选择评级方式。</div>
+          <el-button type="primary" @click="indexSetNew" plain style="margin: 5px 0;">新增 +</el-button>
+        </div>
+        <div class="drawer_center" v-loading="indexSerLoad">
+          <div class="isList">
+            <div v-for="(item,index) in isList" :key="index" @click="isLsI(item)" class="flex-box flex-d-center isListI">
+              <span>{{item.name}}</span>
+              <div @click.stop="isLIDelete(item)">
+                <svg-icon icon-class="delete_jx" style="font-size:16px;margin-bottom:2px"/>
+              </div>
+            </div>
+          </div>
+        </div>
+      </template>
+    </BrawerBox>
+
+    <!-- 等级配置 -->
+    <el-dialog title="等级配置" :visible.sync="levelConfigVisible" :close-on-click-modal="false" width="700px">
+      <div v-loading="levelConLoad">
+        <div style="padding-top: 20px;">
+          <span style="margin-right: 15px;font-weight: 600;">名称</span><el-input
+            type="text"
+            style="width: 200px;"
+            placeholder="请输入名称"
+            v-model="levelConList.name"
+            maxlength="15"
+            show-word-limit
+          ></el-input>
+        </div>
+        <ClassSet ref="ClassSet" :inputs="inputs" style="padding-top: 20px;" :inputsStyle="{paddingLeft:'0px',width: '600px'}"></ClassSet>
+        <span slot="footer" class="dialog-footer flex-box flex-box-end">
+          <el-button @click="levelConfigVisible = false">取消</el-button>
+          <el-button type="primary" @click="levelConSave()">保存</el-button>
+        </span>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import {_debounce } from '@/api/auth';
+import ClassSet from '@/components/public/ClassSet';
+
+export default {
+  components: { EmployeeSelector, ClassSet },
+  name: 'EvaluateSet',
+  data() {
+    return {
+      levelConLoad: false,
+      levelConList: {
+        name: '',
+        id: 0
+      },
+      inputs: [],//分值区间
+      levelConfigVisible: false,//等级配置
+      indexSetting: false,
+      indexSerLoad: false,
+      isList: [],
+      total: 0,
+      page: 1,
+      page_size: 10,
+      // 标签库相关
+      tabs: [],
+      tabsAll: [],
+      tabIds: [],
+      enableDs_checked: false,
+      inputVisible: false,
+      inputValue: '',
+      typeName: '全部分类',
+
+      type: '0',
+      options: [
+        {
+          value: '0',
+          label: '全部'
+        },
+        {
+          value: '1',
+          label: '量化指标'
+        },
+        {
+          value: '2',
+          label: '非量化指标'
+        },
+        {
+          value: '3',
+          label: '额外加分项'
+        },
+        {
+          value: '4',
+          label: '额外扣分项'
+        }
+      ],
+      value2: [],
+      indexTypeList: [], //指标分类
+      indexList: [], //指标列表
+      cate_id: 0,
+      cateName: '',
+      cateId2: '', //编辑分类使用
+      cateTitle: '新建分类',
+      showMove: false, //
+
+      keywords: '',
+      loading: false,
+      dialogVisible: false,
+      showAddCate: false,
+      selectCateId: '', //移动指标用到
+      SelectionChange: [], //选择的指标
+      cateVal: '',
+      // 导入导出相关
+      import_rules_show: false,
+      ATOKEN: { 'A-TOKEN': this.$getToken() },
+      integralUpload: this.$serverdomain + '/api/per/file/import/index',
+      save_loading: false,
+      import_btn_show: false,
+      fileList: [],
+      file: null,
+      error_list_show: false,
+      error_list: [],
+      indexSet:'',
+    };
+  },
+  watch: {
+    import_rules_show(val) {
+      if (!val) {
+        this.$refs.upload.clearFiles();
+        this.import_btn_show = false;
+      }
+    },
+    dialogVisible(val) {
+      if (!val) {
+        this.getTagList();
+      }
+    },
+    showMove(val) {
+      if (!val) {
+        this.selectCateId = '';
+        this.cateVal = '';
+      }
+    },
+    showAddCate(val) {
+      if (!val) {
+        this.cateName = '';
+        this.cateId2 = '';
+        this.cateTitle = '新建分类';
+      }
+    },
+    type() {
+      this.page=1;
+      this.getIndexList();
+    },
+    keywords: {
+      deep: true,
+      handler: _debounce(function(val) {
+        this.page=1;
+        this.getIndexList();
+      })
+    },
+    tabIds(val) {
+      this.page=1;
+      this.getIndexList();
+    },
+    enableDs_checked(val) {
+      this.getIndexList();
+    }
+  },
+  created() {
+    this.indexSet=this.$getCache("indexSet")
+    this.getTagList();
+    this.getIndexType();
+    this.getIndexList(true);
+  },
+  mounted() {
+  },
+  methods: {
+    isSave(){},//指标设置保存
+    isCancel(){},//指标设置取消
+    //指标等级列表
+    gradeSetList(){
+      this.indexSetting = true
+      this.indexSerLoad = true
+      this.$axios('get', '/api/per/index/level/list').then(res => {
+        if(res.data.code == 1){
+          let list = res.data.data.list
+          this.isList = list
+        }
+      }).finally(()=>{
+        this.indexSerLoad = false
+      })
+    },
+    //指标项点击
+    isLsI(levels){
+      var inputs=[];
+      var max=0;//最大值
+      levels.scope.forEach((item,index)=>{
+        var obj;
+        if(index==0){
+          obj={name:item.name,max:Number(item.value),min:0};
+        }else{
+          obj={name:item.name,max:Number(item.value),min:max};//当不是第一个等级时,最小值为上一个的最大值
+        }
+        max=item.value;
+        inputs.push(obj);
+      })
+      this.levelConfigVisible = true
+      this.$nextTick(()=>{
+        this.levelConList = {name: levels.name, id: levels.id}
+        this.inputs=inputs
+      })
+    },
+    //指标项删除
+    isLIDelete(item){
+        this.$confirm('确认删除指标等级:'+ item.name +'?', '删除等级', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$axios('post', '/api/per/index/level_del', {id: item.id}).then(res => {
+            if(res.data.code == 1){
+              this.$message.success('删除成功');
+              this.gradeSetList()
+            }
+          })
+        }).catch(() => {
+        });
+    },
+    //新增
+    indexSetNew(){
+      if(this.isList.length>=20){
+        this.$message.warning('指标等级达上限');
+        return
+      }
+      this.levelConfigVisible = true
+      this.$nextTick(()=>{
+        this.levelConList = {name: '',id: null}
+        this.inputs=[{ name: 'C', min: 0, max: 60 }, { name: 'B', min: 60, max: 80 }, { name: 'A', min: 80, max: 100 }]
+      })
+    },
+    //等级配置保存
+    levelConSave(){
+      let is=true,level_scope=[];
+      let isSave=this.$refs.ClassSet.isSave
+      let inputsList=this.$refs.ClassSet.inputsList
+      if(!isSave){
+        return false
+      }
+      if(!this.levelConList.name && this.levelConList.name == ''){
+        this.$message.warning('请输入名称');
+        return
+      }
+      inputsList.some(item=>{
+        if(!item.name){
+          this.$message.warning('等级的名称不能为空');
+          is=false;
+          return true;
+        }
+        if(item.max==0){
+          this.$message.warning('最大值不能为空或者0');
+          is=false;
+          return true;
+        }
+        level_scope.push({name:item.name,value:Number(item.max)});
+      })
+
+      let data = {
+        name: this.levelConList.name,
+        scope: JSON.stringify(level_scope)
+      }
+      if(this.levelConList.id){
+        data.id = this.levelConList.id
+      }
+      if(is){
+        this.levelConLoad = true;
+        this.$axios('post','/api/per/index/level',data).then(res=>{
+            this.$message.success('保存成功');
+            this.levelConfigVisible = false
+            this.gradeSetList()
+        }).finally(()=>{
+          setTimeout(()=>{
+            this.levelConLoad = false;
+          },300)
+        })
+      }
+    },
+
+    //关闭错误信息时的回调
+    error_list_SX() {
+      this.getIndexList();
+    },
+    submitUpload() {
+      this.save_loading = true;
+      let params = {
+        file: this.file
+      };
+      this.$axios('post', '/api/per/file/import/index', params)
+        .then(res => {
+          if (res.data.code == 1) {
+
+          }
+        })
+        .finally(() => {
+          this.save_loading = false;
+        });
+    },
+    // 上传成功的回调
+    handleSuccess(res) {
+	console.log(res)
+      if (res.code == 1) {
+        // this.file = response.data;
+		this.import_rules_show = false;
+		this.$message.success({ message: res.msg });
+		if (res.data.error.length != 0) {
+		  this.error_list_show = true;
+		  this.error_list = res.data.error;
+		} else {
+		  this.getIndexList();
+		}
+      }
+    },
+    // 删除文件的回调
+    handleRemove(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;
+      }
+    },
+    //保持标签
+    saveTabs() {
+      let tabs = JSON.parse(JSON.stringify(this.tabs));
+      let tag = tabs.map(item => {
+        let obj = {};
+        if (!item.name) {
+          obj.id = '';
+          obj.tag_name = item;
+          return obj;
+        } else {
+          item.tag_name = item.name;
+          return item;
+        }
+      });
+      this.$axios('post', '/api/per/index/tag', { tag: tag }).then(res => {
+        this.$message.success('设置成功');
+        this.getTagList();
+        this.dialogVisible = false;
+      });
+    },
+    //获取标签列表
+    getTagList() {
+      this.$axios('get', '/api/per/index/tag').then(res => {
+        this.tabs = res.data.data.list || [];
+      });
+    },
+    // 编辑指标
+    rowClick(e) {
+      this.$axios('get', '/api/per/index/info', { index_id: e.id }).then(res => {
+        this.$setCache('indexSet',{cate_id:this.cate_id,page:this.page})
+        this.$router.push({ path: '/addIndexSet', query: { item: JSON.stringify(res.data.data) } });
+      });
+    },
+    // 移动指标
+    Move() {
+      if (!this.selectCateId) {
+        this.$message.error('请选择分类');
+        return false;
+      }
+      let ids = this.SelectionChange.map(item => {
+        return item.id;
+      });
+      let data = {
+        replace_cate: 1,
+        cate_id: this.selectCateId,
+        index_ids: ids
+      };
+      this.$axios('post', '/api/per/index/update', data).then(res => {
+        this.$message.success('设置成功');
+        this.showMove = false;
+        this.getIndexList();
+      });
+    },
+    // 删除指标
+    deleteIndex() {
+      this.$confirm('确定删除选中指标', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          let ids = this.SelectionChange.map(item => {
+            return item.id;
+          });
+          this.$axios('post', '/api/per/index/del', { index_ids: ids.toString() }).then(res => {
+            this.$message.success('删除成功');
+            this.getIndexList();
+          });
+        })
+        .catch(() => {});
+    },
+    // 添加编辑分类
+    addCate() {
+      if (!this.cateName) {
+        this.$message.error('请输入分类名称');
+        return false;
+      }
+      var url = this.cateId2 ? '/api/per/index/cate/update' : '/api/per/index/cate/add';
+      var data = { name: this.cateName };
+      this.cateId2 ? (data.cate_id = this.cateId2) : '';
+      this.$axios('post', url, data).then(res => {
+        this.$message.success(this.cateId2 ? '编辑成功' : '添加成功');
+        this.getIndexType();
+
+        this.showAddCate = false;
+      });
+    },
+    handleSelectionChange(e) {
+      this.SelectionChange = e;
+    },
+    //获取指标列表
+    getIndexList(is) {
+      this.loading = true;
+      if(this.indexSet&&is){
+        this.page=this.indexSet.page? this.indexSet.page:1
+        this.cate_id=this.indexSet.cate_id
+      }
+      this.$axios('get', 'api/per/index/list', {
+        page: this.page,
+        page_size: this.page_size,
+        cate_id: this.cate_id,
+        type: this.type,
+        keywords: this.keywords,
+        tag_ids: JSON.stringify(this.tabIds),
+        enable_ds: this.enableDs_checked ? 1 : null
+      })
+        .then(res => {
+          let data = res.data.data.list;
+          data.forEach(item => {
+            item.name = this.initData(item.name);
+            item.type = this.initData(item.type);
+            item.per_remark = this.initData(item.per_remark);
+          });
+          this.total = res.data.data.total;
+          this.indexList = data;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    //数据初始化,没有值或者空数组的显示-
+    initData(str) {
+      if (str == null) {
+        return str ? str : '-';
+      }
+      if (typeof str == 'object') {
+        return str.length > 0 ? str : '-';
+      } else {
+        return str ? str : '-';
+      }
+    },
+    //获取指标分类
+    getIndexType() {
+      this.$axios('get', 'api/per/index/cate/list').then(res => {
+        let data = res.data.data.list || [];
+        if (data.length > 0) {
+          data.unshift({ name: '全部分类', id: 0 });
+          this.indexTypeList = data;
+          if(this.indexSet){
+            this.cate_id=this.indexSet.cate_id
+          }
+        }
+      });
+    },
+    activeLi(item, index) {
+      this.cate_id = item.id;
+      this.typeName = item.name;
+      this.page = 1;
+      this.getIndexList();
+    },
+    handleCommand2(e, item) {
+      if (e == 'A') {
+        this.import_rules_show = true;
+      } else if (e == 'B'){
+        this.$axios('post', '/api/per/user/download_token').then(res => {
+		  let token=res.data.data.token
+		  window.open(process.env.VUE_APP_BASE_API +'/api/download/export/index?token=' +token,'_blank');
+        });
+      } else if (e == 'C'){
+        this.gradeSetList()
+      }
+    },
+    handleCommand(e, item) {
+      if (e == 'A') {
+        this.cateName = item.name;
+        this.cateId2 = item.id;
+        this.cateTitle = '编辑分类';
+        this.showAddCate = true;
+      } else {
+        this.$confirm('确定删除该指标分类', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(() => {
+            this.$axios('post', '/api/per/index/cate/del', { cate_id: item.id }).then(res => {
+              this.$message.success('删除成功');
+              this.getIndexType();
+              if (item.id == this.cate_id) {
+                //如果删除的是当前展示的这个
+                this.cate_id = 0;
+                this.getIndexList();
+              }
+            });
+          })
+          .catch(() => {});
+      }
+    },
+    submitForm() {
+      this.$router.push({ path: '/evaluate' });
+    },
+    openAdd() {
+      if (this.indexTypeList.length == 0) {
+        this.$message.error('请先创建指标分类');
+        return;
+      }
+      this.$setCache('indexSet',{cate_id:this.cate_id})
+      this.$router.push({ path: '/addIndexSet',query:{cate_id:this.cate_id? this.cate_id:''}});
+    },
+    // 标签库相关
+    handleClose(tag) {
+      this.tabs.splice(this.tabs.indexOf(tag), 1);
+    },
+
+    showInput() {
+      this.inputVisible = true;
+      this.$nextTick(_ => {
+        this.$refs.saveTagInput.$refs.input.focus();
+      });
+    },
+
+    handleInputConfirm(e) {
+      let is = true;
+      this.tabs.some(item => {
+        if (item.name == this.inputValue) {
+          this.$message.error('标签名称重复');
+          this.inputValue = '';
+          is = false;
+          return true;
+        }
+      });
+      if (!is) {
+        return false;
+      }
+      let inputValue = this.inputValue;
+      if (inputValue) {
+        this.tabs.push(inputValue);
+      }
+      this.inputVisible = false;
+      this.inputValue = '';
+    },
+    // 页面变更
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getIndexList();
+    },
+    // 页面跳转
+    handleSizeChange(val) {
+      this.page_size = val;
+      this.getIndexList();
+    }
+  }
+};
+</script>
+<style scoped="scoped" lang="scss">
+.text-center{
+	text-align: center;
+}
+.text-center p{
+	padding: 10px 0;
+}
+.all {
+  padding: 10px;
+  min-height: calc(100vh - 210px);
+  position: relative;
+}
+.title {
+  font-size: 18px;
+  font-weight: 500;
+  margin-bottom: 10px;
+}
+.width-250 {
+  width: 250px;
+}
+.title-f {
+  margin-bottom: 20px;
+}
+.inputDc {
+  position: absolute;
+  top: 0;
+  right: 0;
+  left: 0;
+  bottom: 0;
+  z-index: 9;
+}
+.checkChild {
+  background-color: #fbfdff;
+  margin-left: 20px;
+}
+.el-icon-more {
+  display: none;
+}
+.li {
+  height: 53px;
+  line-height: 53px;
+  padding: 0 10px;
+  border-bottom: 1px solid #f8f8f8;
+  color: #777777;
+  width: 100%;
+}
+.li:hover {
+  background-color: #f5f7fa;
+}
+.li:hover .el-icon-more {
+  display: block;
+}
+.main-left {
+  width: 200px;
+  margin-right: 20px;
+  border: 1px solid #f1f1f1;
+  border-radius: 3px;
+  box-sizing: border-box;
+}
+.left-title {
+  height: 53px;
+  line-height: 53px;
+  padding: 0 10px;
+  background-color: #f5f7fa;
+  border-bottom: 1px solid #f1f1f1;
+  color: #222;
+  font-size: 15px;
+  font-weight: 600;
+  border-top-left-radius: 3px;
+  border-top-right-radius: 3px;
+}
+.index-name {
+  width: 170px;
+}
+.ul {
+  max-height: calc(100vh - 330px);
+  overflow: auto;
+  width: 200px;
+}
+.isActiveLi {
+  background-color: #f5f7fa;
+  color: #409eff !important;
+  position: relative;
+}
+.isActiveLi .el-icon-more {
+  display: block;
+}
+.table-box {
+  // max-height: calc(100vh - 330px);
+  cursor: pointer;
+  overflow: auto;
+  .menu_middle_icon{
+    width: 1.3em;
+    height: 1.3em;
+  }
+}
+.main-right {
+  overflow-x: hidden;
+  width: 100%;
+}
+::v-deep .el-dialog__header {
+  padding: 20px;
+  border-bottom: 1px solid #f1f1f1;
+}
+::v-deep .el-dialog__body {
+  padding: 20px;
+  padding-top: 0px;
+}
+.el-tag {
+  margin-left: 10px;
+  margin-top: 10px;
+}
+.button-new-tag {
+  margin-left: 10px;
+  margin-top: 10px;
+}
+.input-new-tag {
+  width: 90px;
+  margin-left: 10px;
+  vertical-align: bottom;
+}
+.drawer_center {
+  overflow-y: auto;
+  overflow-x: hidden;
+  max-height: calc(100vh - 200px);
+  .isList{
+    padding: 0 0px 0 0;
+    .isListI{
+      padding: 15px 0;
+      border-bottom: 1px solid #D7E2EF;
+      background-color: #fff;
+      cursor: pointer;
+      color: black;
+      transition: .5s;
+    }
+    .isListI:hover{
+      transition: .5s;
+      background-color: rgb(253, 253, 253);
+      color: rgb(55, 154, 247);
+    }
+}
+
+
+  /* 滚动条样式 */
+  .drawer_center::-webkit-scrollbar {
+    width: 6px;
+    height: 6px;
+  }
+  .drawer_center::-webkit-scrollbar-track {
+    width: 6px;
+    background-color: #fff0;
+    -webkit-border-radius: 2em;
+    -moz-border-radius: 2em;
+    border-radius: 2em;
+  }
+  /*滚动条的设置*/
+  .drawer_center::-webkit-scrollbar-thumb {
+    background-color: #fff0;
+    background-clip: padding-box;
+    min-height: 28px;
+    -webkit-border-radius: 2em;
+    -moz-border-radius: 2em;
+    border-radius: 2em;
+  }
+  /*滚动条移上去的背景*/
+  .drawer_center:hover::-webkit-scrollbar-thumb {
+    background-color: rgba(144, 147, 153, 0.3);
+  }
+
+  .modifyConfigDrawer {
+    position: fixed;
+    bottom: 0;
+    background-color: #fff;
+    border-top: 1px solid rgb(233, 233, 233);
+    width: 100%;
+    height: 60px;
+    line-height: 60px;
+    padding-left: 20px;
+  }
+}
+.disnone{
+  display: none;
+  transition: .5s;
+}
+</style>

+ 640 - 0
src/components/set/JurisdictionSet.vue

@@ -0,0 +1,640 @@
+<template>
+  <div class="all">
+    <div class="flex-box-ce">
+      <div class="flex-1">
+        <div class="title">绩效主管理员</div>
+        <div class="text fontColorF">拥有全部权限,支持更换主管理员</div>
+      </div>
+      <el-button  plain @click="setCreator = true" v-if="isCreator" class="primaryBtn"><i class="el-icon-plus"></i>添加</el-button>
+    </div>
+	<div class="flex-box flex-d-wrap" style="width: 900px;padding-top: 16px;">
+		<div class="flex-box-ce zitem"  v-for="(item,index) in userMain" :key="index">
+		  <userImage :user_name="item.name" :img_url="item.img_url" :id="item.id" fontSize="14"></userImage>
+		  <span class="name flex-1">{{ item.name }}</span>
+		  <i class="el-icon-close" v-if="item.id!=$getUserData().id"  @click="deleteUser2(item.id)"></i>
+		  <!-- <el-button @click="deleteUser2(item.id)" type="text" class="red" v-if="item.id!=$getUserData().id">删除</el-button> -->
+		</div>
+	</div>
+    <div class="flex-box-ce" style="margin-top: 20px;">
+      <div class="flex-1">
+        <div class="title">绩效子管理员</div>
+        <div class="text fontColorB">负责绩效考核日常的管理工作,由主管理员分配权限</div>
+      </div>
+      <el-button  class="primaryBtn" plain @click="isAdministrator = true"><i class="el-icon-plus"></i>添加</el-button>
+    </div>
+    <div class="table-box" style="margin-top: 20px;">
+      <el-table stripe :data="AdministratorList" style="width: 100%;" v-loading="loading">
+        <el-table-column prop="date" label="姓名">
+          <template slot-scope="scope">
+            <div class="flex-box-ce">
+              <userImage :user_name="scope.row.name" fontSize="14" :img_url="scope.row.img_url"></userImage>
+              <span class="name">{{ scope.row.name }}</span>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="range" label="管理范围">
+          <template slot-scope="scope">
+            <span>{{ filtrationStr(scope.row.range) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="menu" label="权限菜单">
+          <template slot-scope="scope">
+            <span>{{ filtrationStr(scope.row.menu) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="group" label="管理考核表">
+          <template slot-scope="scope">
+            <span>{{ filtrationStr(scope.row.group) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作">
+          <template slot-scope="scope">
+            <el-button @click="compile(scope.row)" type="text" >编辑</el-button>
+            <el-button @click="deleteUser(scope.row.id)" type="text" class="red" >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <Pagination :page="page" :page_size="page_size" :page_sizes="[5]" :total="total" @handleSizeChange="handleSizeChange" @handleCurrentChange="handleCurrentChange"></Pagination>
+    </div>
+    <div>
+      <!-- <div class="title-f fontColorB">其他角色权限说明</div> -->
+      <div class="title-f">
+        <div class="title">部门管理员</div>
+        <div class="text fontColorB">部门管理员在【组织架构】设置,可以对管理范围下的员工进行沟通反馈,评分,查看考核结果</div>
+      </div>
+      <div class="title-f">
+        <div class="title">普通员工</div>
+        <div class="text fontColorB">员工只能看到自己的绩效,编写执行计划并进行沟通反馈</div>
+      </div>
+    </div>
+
+    <!-- 更换主管理员 -->
+    <EmployeeSelector
+      title="设置主管理员"
+      :is_filtration_creator="false"
+      :multi="false"
+      :isChecKedAll="false"
+      :visible.sync="setCreator"
+      @confirm="confirmCreator"
+    />
+
+    <!-- 绩效子管理员设置 -->
+    <BrawerBox drawerTitle="绩效子管理员设置" :showDrawer.sync="isAdministrator" :closeModal="false">
+      <template slot="main">
+        <el-form ref="detailForm" @submit.native.prevent label-width="130px">
+          <el-form-item label="子管理员:">
+            <el-input v-model="userData.name" placeholder="请选择子管理员" class="width-150" :disabled="isDisabled"></el-input>
+            <div @click="addUser()" class="inputDc" v-if="!isDisabled"></div>
+          </el-form-item>
+          <el-form-item>
+            <template slot="label">
+              <span>管理范围:</span>
+            </template>
+            <el-radio-group v-model="scope">
+              <el-radio :label="3">全公司</el-radio>
+              <el-radio :label="4">管理范围下的人员</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="菜单权限:">
+            <div v-for="(item, index) in checkboxs" :key="index">
+              <el-checkbox v-model="item.check" :label="item.label" @change="actionCheck($event, item)"></el-checkbox>
+              <div v-if="item.child" class="flex-box flex-d-wrap checkChild">
+                <el-checkbox v-model="item2.check" :label="item2.label" @change="actionCheck2($event, item.child)" v-for="(item2, index2) in item.child" :key="index2"></el-checkbox>
+              </div>
+            </div>
+          </el-form-item>
+          <el-form-item label="考核表权限:" v-show="isReviewShow">
+            <el-radio-group v-model="review">
+              <el-radio :label="14">全部考核表</el-radio>
+              <el-radio :label="13">特定考核表</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="特定考核表:" v-show="isReviewShow2 && isReviewShow">
+            <el-button @click="openKp()" plain class="primaryBtn" >请选择</el-button>
+            <div v-for="(item, index) in selectGroup">
+              <el-tag type="success">{{ item.name }}</el-tag>
+            </div>
+          </el-form-item>
+        </el-form>
+      </template>
+      <template slot="footer">
+        <el-button plain @click="closeBrawer()">取消</el-button>
+        <el-button type="primary" :loading="loading" @click="submitForm()">保存</el-button>
+      </template>
+    </BrawerBox>
+
+    <!-- 嵌套Brawer -->
+    <BrawerBox drawerTitle="选择考核表" :showDrawer.sync="isChecks" :closeModal="false">
+      <template slot="main">
+        <el-input prefix-icon="el-icon-search" placeholder="搜索考核表" v-model="searchWords" class="input-all" clearable></el-input>
+        <div>
+          <ul class="ul">
+            <div class="flex-box-end" style="margin-bottom: 10px;"><el-button plain @click="qkSelect()" type="danger" size="mini">清空</el-button></div>
+            <li v-for="(item, index) in groupList" :key="index" class="flex-box-ce li" v-if="returnName(item)">
+              <el-checkbox class="flex-box-ce flex-1" v-model="item.check" style="padding: 15px 0;">
+                <div class="flex-box-ce">
+                  <div class="flex-1">{{item.name}}</div>
+                 <div class="blue" v-if="item.employee_num > 0">{{ item.employee_num }} 人</div>
+                </div>
+              </el-checkbox>
+            </li>
+          </ul>
+        </div>
+      </template>
+      <template slot="footer">
+        <div>
+          <el-button  @click="isChecks = false">取消</el-button>
+          <el-button type="primary"  @click="saveKp()">保存</el-button>
+        </div>
+      </template>
+    </BrawerBox>
+
+    <!-- 选择子管理员 -->
+    <EmployeeSelector
+	:selected="selected"
+	:is_filtration_creator="false"
+	:multi="false"
+	:isChecKedAll="false"
+	:visible.sync="setAdministrator"
+	@confirm="confirmAdministrator"
+	:employee_not_select="employee_not_select"
+	/>
+  </div>
+</template>
+
+<script>
+import EmployeeSelector from '@/components/public/EmployeeSelector';
+import BrawerBox from '@/components/public/BrawerBox';
+export default {
+  components: { EmployeeSelector, BrawerBox },
+  name: 'JurisdictionSet',
+  data() {
+    return {
+      total: 0,
+      page: 1,
+      page_size: 5,
+      loading: false,
+      isAdministrator: false,
+      isChecks: false,
+      setAdministrator: false,
+
+      // 编辑添加管理员
+      checkboxs: [
+        { label: '全部权限', id: 'all', check: true },
+        {
+          label: '考核管理',
+          id: 'kh',
+          check: true,
+          child: [
+            { label: '发起考核', id: '7', check: true },
+            { label: '开始评分', id: '8', check: true },
+            { label: '调整结果', id: '9', check: true },
+            { label: '调整等级', id: '10', check: true },
+            { label: '导出报表', id: '11', check: true }
+          ]
+        },
+        { label: '指标库', id: '12', check: true },
+        { label: '基础设置', id: '15', check: true },
+        { label: '绩效报表', id: '16', check: true },
+        { label: '考核设置', id: 'kp', check: true }
+      ],
+      selected: { employee: [], dept: [] },
+      // 考核表
+      searchWords: '',
+      groupList: [],
+      userMain: {}, //主管理员
+      AdministratorList: [], //子管理员列表
+      setCreator: false, //更换主管理员
+      isCreator: false, //是否创始人
+      employee_not_select: [],//过滤的管理员
+
+      // 添加编辑子管理员
+      userData:{},
+      scope: 3, //管理范围
+      isKjJg: true, //是否可见考核结果
+      review: 14, //考核表
+      isReviewShow: true, //控制考核表是否能显示
+      isReviewShow2: false, //控制考核表是否能显示
+      parameter: {
+        id: '',
+        permission: '',
+        group: '',
+		main:0
+      },
+      selectGroup: [], //选择的考核表
+      isDisabled: false,
+      id: ''
+    };
+  },
+  watch: {
+	searchWords(val){
+		console.log(val) 
+	}, 
+    review(val) {
+      this.isReviewShow2 = val == 14 ? false : true;
+    },
+  },
+  computed:{
+	returnName(){
+		return (item)=>{
+			return item.name.indexOf(this.searchWords) >= 0
+		}
+	}  
+  },
+  created() {
+    this.isCreator = this.$authoritys('masterAdministrator');//是否主管理员
+    this.getList();
+    this.getList2();
+    this.getGroups();
+  },
+  mounted() {
+    this.$nextTick(() => {});
+  },
+  methods: {
+    actionCheck2(e, obj){
+      let data=obj.filter(item=>{
+        return item.check
+      })
+      if(data.length==0){
+        for (let i in this.checkboxs) {
+          if(this.checkboxs[i].id=='kh'){
+            this.$set(this.checkboxs[i], 'check', false);
+          }
+        }
+      }
+      if(e){
+        for (let i in this.checkboxs) {
+          if(this.checkboxs[i].id=='kh'){
+            this.$set(this.checkboxs[i], 'check', true);
+          }
+        }
+      }
+    },
+    deleteUser(id) {
+      this.$confirm('确定删除该子管理员', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.$axios('POST', '/api/per/user/delete_sub_manager', { id_code: this.$returnCode(id) }).then(res => {
+            this.$message.success('删除成功');
+            this.getList();
+          });
+        })
+        .catch(() => {});
+    },
+	//删除主管理员
+	deleteUser2(id) {	
+	  this.$confirm('确定删除该主管理员', '提示', {
+	    confirmButtonText: '确定',
+	    cancelButtonText: '取消',
+	    type: 'warning'
+	  })
+	    .then(() => {
+	      this.$axios('POST', '/api/per/user/delete_sub_manager', { id_code: this.$returnCode(id) }).then(res => {
+	        this.$message.success('删除成功');
+	        this.getList2();
+	      });
+	    })
+	    .catch(() => {});
+	},
+    // 过滤
+    filtrationStr(str, is) {
+      if (is) {
+        var text = [...str].toString();
+        return str.length > 0 ? text : '--';
+      } else {
+        return str ? str : '--';
+      }
+    },
+    // 关闭
+    closeBrawer() {
+      this.qkSelect();
+      this.scope = 3;
+      this.review = 14;
+      this.isKjJg = true;
+      this.isReviewShow = true;
+      this.isReviewShow2 = false;
+      this.userData = {};
+      this.parameter = { id: '',permission: '',group: '',main:0},
+      this.selected = { employee: [], dept: [] };
+      this.isDisabled = false;
+      this.isAdministrator = false;
+    },
+    qkSelect() {
+      // 初始化数据
+      this.selectGroup = [];
+      for (let i in this.groupList) {
+        this.$set(this.groupList[i], 'check', false);
+      }
+      for (let i in this.checkboxs) {
+        this.$set(this.checkboxs[i], 'check', true);
+        if (this.checkboxs[i].child) {
+          for (let j in this.checkboxs[i].child) {
+            this.$set(this.checkboxs[i].child[j], 'check', true);
+          }
+        }
+      }
+    },
+    //获取考核表
+    getGroups() {
+      this.$axios('get', '/api/per/evaluation/all_group').then(res => {
+        let list = res.data.data.list || [];
+        list.forEach(item => {
+          item.check = false;
+        });
+        this.groupList = list;
+      });
+    },
+    // 获取主管理员
+    getList2() {
+      this.$axios('get', '/api/per/user/manager_info', { range: 1 }).then(res => {
+        let userMain = res.data.data.list || [];
+		this.userMain = userMain.filter(item => {
+			item.name=this.$getEmployeeList()[item.id].name
+			return item
+		});
+      });
+    },
+    // 获取子管理员
+    getList() {
+      this.loading = true;
+      this.$axios('get', '/api/per/user/manager_info', { page: this.page, page_size: this.page_size, range: 0 })
+        .then(res => {
+          let data = res.data.data.list || [];
+          this.total = res.data.data.total;
+          this.AdministratorList = data.filter(item => {
+			item.name=this.$getEmployeeList()[item.id].name
+            this.employee_not_select.push(item.id);
+            return item.main == 0;
+          });
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    // 编辑
+    compile(obj) {
+      this.setCheckboxs();
+      // 人员复原
+      this.userData={
+        name: obj.name,
+        id: obj.id,
+        img_url: obj.img_url
+      }
+      // this.selected = { employee: [{ name: obj.name, id: obj.id, img_url: obj.img_url }], dept: [] };
+      // 权限复原
+      let permissionIds = obj.permission.map(item => {
+        return item.id;
+      }); //返回权限ID
+      var checkboxs = this.checkboxs;
+      this.isKjJg = false;
+      let isReviewShow = false;
+      permissionIds.forEach(item => {
+        if (item == 6) {
+          this.isKjJg = true;
+        }
+        if (item == 3 || item == 4) {
+          this.scope = item;
+        }
+        if (item == 13 || item == 14) {
+          this.review = item;
+          isReviewShow = true;
+        }
+        for (let i in checkboxs) {
+          if (checkboxs[i].id == item) {
+            this.$set(checkboxs[i], 'check', true);
+          }
+          if ((item == 13 || item == 14) && checkboxs[i].id == 'kp') {
+            this.$set(checkboxs[i], 'check', true);
+          }
+          if (checkboxs[i].child) {
+            for (let j in checkboxs[i].child) {
+              if (checkboxs[i].child[j].id == item) {
+                this.$set(checkboxs[i], 'check', true);
+                this.$set(checkboxs[i].child[j], 'check', true);
+              }
+            }
+          }
+        }
+      });
+      //特定考评复原
+      this.selectGroup = obj.group_list;
+      this.isReviewShow = isReviewShow;
+      this.isDisabled = true;
+      this.isAdministrator = true;
+    },
+    //将权限全部取消
+    setCheckboxs() {
+      for (let i in this.checkboxs) {
+        this.$set(this.checkboxs[i], 'check', false);
+        if (this.checkboxs[i].child) {
+          for (let j in this.checkboxs[i].child) {
+            this.$set(this.checkboxs[i].child[j], 'check', false);
+          }
+        }
+      }
+    },
+    // 添加子管理员
+    submitForm() {
+      this.parameter.id = this.userData.id;
+	  this.parameter.id_code = this.$returnCode(this.userData.id);
+      var parameter = JSON.parse(JSON.stringify(this.parameter));
+      if (!parameter.id) {
+        this.$message.error('请选择子管理员');
+        return false;
+      }
+      // 权限
+      var permission = [];
+      this.checkboxs.forEach(item => {
+        if (item.check) {
+          if (item.id != 'all' && item.id != 'kh' && item.id != 'kp') {
+            permission.push(Number(item.id));
+          }
+          if (item.child) {
+            item.child.forEach(item2 => {
+              if (item2.check) {
+                permission.push(Number(item2.id));
+              }
+            });
+          }
+        }
+      });
+      permission.push(this.scope); //管理范围
+      if (this.isKjJg) {
+        permission.push(6);
+      } //可见考核结果
+      // 指定考核表
+      if (this.checkboxs[this.checkboxs.length - 1].check) {
+        permission.push(this.review); //考核表
+        if (this.review == 13) {
+          let group = [];
+          this.selectGroup.forEach(item => {
+            group.push(item.id);
+          });
+          parameter.group = group.toString();
+        }
+      }
+      parameter.permission = [...new Set(permission)].toString();
+      this.$axios('post', '/api/per/user/add_sub_manager', parameter).then(res => {
+        this.$message.success('添加成功');
+        this.getList();
+        this.getList2();
+        this.closeBrawer();
+      });
+    },
+    actionCheck(e, obj) {
+      if (obj.id == 'all') {
+        //点击全部
+        this.checkboxs.forEach(item => {
+          item.check = e;
+          if (item.child) {
+            item.child.forEach(item2 => {
+              item2.check = e;
+            });
+          }
+        });
+        this.isReviewShow = e;
+        if (!e) {
+          //当取消全部时的处理
+          this.isReviewShow2 = e;
+          this.review = 14;
+        }
+        return false;
+      }
+      if (obj.id == 'kp') {
+        //点击考核表
+        this.isReviewShow = e;
+      }
+      if (obj.child && obj.id == 'kh') {
+        if (e) {
+          obj.child.forEach(item => {
+            item.check = true;
+          });
+        } else {
+          obj.child.forEach(item => {
+            item.check = false;
+          });
+        }
+      }
+      if (!e) {
+        this.$set(this.checkboxs[0], 'check', false);
+      }
+    },
+    openKp(){
+      let group_ids=this.selectGroup.map(item=>{return item.id})
+      this.groupList.forEach((item, index) => {
+        this.$set(this.groupList[index], 'check', false);
+        if (group_ids.indexOf(item.id) >= 0) {
+          this.$set(this.groupList[index], 'check', true);
+        }
+      });
+      this.isChecks=true
+    },
+    saveKp(){
+      let selectGroup = [];
+      this.groupList.forEach(item=>{
+        if(item.check){
+          selectGroup.push(item)
+        }
+      })
+      this.selectGroup=selectGroup;
+      this.isChecks=false
+    },
+    //设置主管理员
+    confirmCreator(e) {
+      if (e.employee.length == 0) {
+        return;
+      }
+	 let data={
+		 id_code:this.$returnCode(e.employee[0].id),
+		 permission:'1,2,3,6,7,8,9,10,11,14,15,16',
+		 main:1
+	 }
+      this.$axios('post', '/api/per/user/add_sub_manager', data).then(res => {
+        this.$message.success('设置成功');
+		this.getList();
+        this.getList2();
+      });
+    },
+    //选择人员
+    addUser(){
+      this.selected.employee=this.userData.name? [this.userData]:[];
+      this.setAdministrator=true;
+    },
+    //设置子管理员
+    confirmAdministrator(e) {
+      this.userData=e.employee.length>0? e.employee[0]:{};
+      this.setAdministrator=false;
+    },
+    // 页面变更
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getList();
+    },
+    // 页面跳转
+    handleSizeChange(val) {
+      this.page_size = val;
+      this.getList();
+    }
+  }
+};
+</script>
+
+<style scoped="scoped">
+.el-icon-close{
+	position: relative;
+	top: -14px;
+	cursor: pointer;
+}
+.el-icon-close:hover{
+	color: #F56C6C;
+}
+.zitem{
+	padding: 10px;
+	width: 180px;
+	border-radius: 5px;
+	background-color: #F5F9FF;
+	margin-right: 10px;
+	margin-bottom: 10px;
+}	
+.all {
+  min-height: calc(100vh - 210px);
+  overflow: auto;
+  padding: 10px;
+}
+.title {
+  font-size: 18px;
+  font-weight: 500;
+  margin-bottom: 10px;
+}
+.name {
+  padding-left: 10px;
+}
+.title-f {
+  margin-bottom: 20px;
+}
+.inputDc {
+  position: absolute;
+  top: 0;
+  right: 0;
+  left: 0;
+  bottom: 0;
+  z-index: 9;
+}
+.checkChild {
+  background-color: #fbfdff;
+  margin-left: 20px;
+}
+.li {
+  border-bottom: 1px solid #f1f1f1;
+}
+.li:hover {
+  background-color: #f5f7fa;
+}
+.ul {
+  margin: 20px 0;
+  margin-top: 10px;
+}
+</style>

+ 0 - 164
src/components/toLead.vue

@@ -1,164 +0,0 @@
-<template>
-	<div>
-		<el-dialog :visible.sync="visible" width="700px" :close-on-click-modal="false" :before-close="closePopup">
-            <div class="flex-box flex-dv-center" style="padding: 0 20px;">
-                    <div v-for="(item,index) in headStep" :key="index" class="listg" :class="{listg1: item.id < nowIndex}">
-                        <span class="border" :class="{border1: item.id < nowIndex}" v-if="item.id == 2 || item.id == 3"></span>
-                        <span class="indexnum" v-if="item.id >= nowIndex" :class="{indexnow:nowIndex == item.id}">{{item.id}}</span>
-                        <span class="el-icon-circle-check numicon" v-if="item.id < nowIndex"></span>
-                        <span class="ramin">{{item.name}}</span>
-                    </div>
-            </div>
-			<div :style="dstyle" style="height:150px;padding: 40px 140px">
-                <slot name="1" v-if="nowIndex == 1"></slot>
-                <div v-if="nowIndex == 2" style="text-align: center;">
-                    <div>
-                        <span>导入中</span>
-                        <span class="el-icon-loading"></span>
-                    </div>
-                    <div>
-                        导入需要一定时间,请不要关闭当前窗口
-                    </div>
-                </div>
-                <div v-if="nowIndex == 3" class="leadtree">
-                    <div class="lead-tit">导入结果</div>
-                    <div class="lead-cent">
-                        <div v-if="tolead.id == 1">
-                            <div>共{{toleadall(tolead.error,tolead.success)}}条数据,已处理{{toleadall(tolead.error,tolead.success)}}条,导入情况如下:</div>
-                            <div><svg-icon icon-class="leadThenGreen" /> 导入成功{{tolead.success.length}}条</div>
-                            <div><svg-icon icon-class="leadErrRed" /> 导入失败{{tolead.error.length}}条 &nbsp; &nbsp; <span v-if="tolead.error.length > 0" style="cursor:pointer;color: #409EFF;" @click="errClick(tolead.bs_id)">点击下载失败数据</span></div>
-                        </div>
-                        <div v-else-if="tolead.id == 0">
-                            <span><svg-icon icon-class="leadJgRed" /> 导入异常:{{tolead.name}}</span>
-                        </div>
-                    </div>
-                    <div class="lead-but">
-                        <el-button v-if="tolead.id == 1 && tolead.error.length > 0" type="primary" @click="$emit('update:nowIndex', 1)">我已修改文件,重新导入</el-button>
-                        <el-button v-else type="primary" @click="closePopup">确认</el-button>
-                    </div>
-                </div>
-            </div>
-		</el-dialog>
-	</div>
-</template>
-<script>
-  export default {
-    props: {
-		visible: {
-			type: Boolean,
-			default: false
-        },
-        nowIndex: {//当前步骤
-			type: Number,
-			default: 1
-        },
-        tolead: {//导入数据
-			type: Object,
-			default: {}
-        },
-        export_type: {//导出类型
-			type: String,
-			default: ''
-        },
-        dstyle: {
-			type: String,
-			default: ''
-        },
-    },
-    name: "toLead",
-    data() {
-      return {
-          headStep:[
-              {id: 1,name: '选择文件',},
-              {id: 2,name: '正在处理',},
-              {id: 3,name: '导入结果',},
-          ],
-      }
-    },
-    methods: {
-        errClick(id){
-			window.open(
-				process.env.VUE_APP_BASE_API +
-                '/api/download/fail_data_export?employee_id=' + 
-                this.$getUserData().id 
-                + '&bs_id=' + id 
-                + '&export_type=' 
-                + this.export_type
-                , '_blank'
-			);
-        },
-        toleadall(err,then){
-            return err.length + then.length
-        },
-		closePopup() {
-			this.$nextTick(() => {
-                if(this.tolead.success && this.tolead.success.length > 0) this.$emit('confirm');
-				this.$emit('update:visible', false);
-			});
-		},
-    }
-  }
-</script>
-
-<style scoped lang="scss">
- .listg{
-     .indexnum{
-        width: 30px;
-        height: 30px;
-        display: inline-block;
-        border: 1px solid #cecece;
-        border-radius: 50%;
-        text-align: center;
-        color: #a9a9a9;
-        line-height: 30px;
-        margin-right: 5px;
-     }
-    .indexnow{
-         background-color:#409EFF;
-         color: #fff;
-         border: 1px solid #fff;
-     }
-     .border{
-        display: inline-block;
-        width: 160px;
-        margin: 0 5px 2px 5px;
-        height: 1px;
-        background-color: #eaeaea;
-     }
-     .border1{
-         margin-top: 18px;
-     }
-     .numicon{
-        color: #41b9ff;
-        font-size: 30px;
-        margin-right: 5px;
-     }
- }
- .listg1{
-     display: flex;
-    .ramin{
-        line-height: 32px;
-    }
- }
- .leadtree{
-     .lead-tit{
-        font-size: 19px;
-        color: black;
-        text-align: center;
-     }
-     .lead-cent{
-        width: 280px;
-        margin: 0 auto;
-        min-height: 100px;
-        padding: 10px 0 0 0;
-        div{
-            div{
-                padding: 4px 0;
-            }
-        }
-     }
-     .lead-but{
-         text-align: center;
-     }
- }
-</style>

+ 0 - 214
src/components/upload.vue

@@ -1,214 +0,0 @@
-<template>
-<div>
-  <el-upload
-    ref="upload_com"
-    :headers="headers"
-    :action="action"
-    :show-file-list="showFileList"
-    :file-list="fileList"
-    :on-success="_onSuccess"
-    :on-preview="_onPreview"
-    :http-request="oss_upload"
-    :on-remove="_onRemove" 
-    :before-remove="_onBeforeRemove"
-    :before-upload="_beforeUpload"
-    :on-exceed="_onExceed"
-    :limit="limit"
-    :on-change="handleChange"
-    :multiple="multiple">
-    <slot></slot>
-    <slot name="tip"></slot>
-  </el-upload>
-  <el-progress v-show="showProcess" :percentage="processLength" :stroke-width="2"></el-progress>
-</div>
-</template>
-
-<script>
-  function noop() {}
-  import moment from 'moment'
-  import axios from 'axios'
-  export default {
-    props: {
-      action: { //必选参数,上传的地址
-        type: String,
-        required: true
-      },
-      headers: {//设置上传的请求头部
-        type: Object,
-        default() {
-          return {};
-        }
-      },
-      data: Object,//上传时附带的额外参数
-      multiple: Boolean,//是否支持多选文件
-      name: {//上传的文件字段名
-        type: String,
-        default: 'file'
-      },
-      drag: Boolean,//是否启用拖拽上传
-      showFileList: {//是否显示已上传文件列表
-        type: Boolean,
-        default: false
-      },
-      accept: String,//	接受上传的文件类型(thumbnail-mode 模式下此参数无效)
-
-      beforeUpload: Function,//	上传文件之前的钩子,参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传。
-      onRemove: {//文件列表移除文件时的钩子
-        type: Function,
-        default: noop
-      },
-      onBeforeRemove:{//删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。
-        type: Function,
-        default: noop
-      },
-      onPreview: {//点击文件列表中已上传的文件时的钩子
-        type: Function
-      },
-      onSuccess: {//文件上传成功时的钩子
-        type: Function,
-        default: noop
-      },
-      fileList: {//必选参数,上传的地址
-        type: Array,
-        default() {
-          return [];
-        }
-      },
-      limit: {//必选参数,上传的地址
-        type: Number,
-        default: ()=>{
-          return 1
-        }
-      },
-      onExceed: {//必选参数,上传的地址
-        type: Function,
-        default: noop
-      }
-    },
-    name: "upload",
-    data() {
-      return {
-        processLength:0,
-        showProcess:false,
-        files:{},
-        config: null
-      }
-    },
-    methods: {
-      handleChange(file,fileList){
-        this.files = file
-      },
-      handleChanges(file){
-        if(file.status === 'ready'){
-          this.processLength = 0 
-          this.showProcess = true
-          const interval = setInterval(() => {
-            if(this.processLength >= 99){
-            clearInterval(interval) 
-            return
-            }
-            this.processLength += 1
-          },20)
-        }
-        if(file.status === 'success'){
-          this.processLength =100
-          this.showProcess = false
-        }
-      },
-      get_sign(callback) {
-        // 测试添加 'https://intesys.cms.g107.com'
-        axios.get('https://intesys.cms.g107.com'+'/integral.php/Api/get_signature',{
-            headers: {
-              'Content-Type': 'application/json; charset=utf-8',
-			  'A-Token': this.$getToken()
-            }
-          }).then(res => {
-          this.config = res.data.data
-          callback()
-        })
-      },
-      _beforeUpload(file) {
-        if(!this.beforeUpload(file)){
-          return false
-        }else{
-          this.handleChanges(this.files)
-        }
-
-      },
-      oss_upload(upload_obj){
-        let self = this
-        this.get_sign(function () {
-          self.upload(upload_obj.file)
-        })
-      },
-      _onExceed(files, fileList){
-        this.$message.warning(`最多选择 ${this.limit} 个文件`)
-      },
-      _onSuccess(response, file, fileList) {
-        this.onSuccess(response, file, fileList)
-      },
-      _onPreview(file) {
-        this.onPreview(file)
-      },
-      _onRemove(file, fileList) {
-        this.onRemove(file, fileList)
-      },
-      _onBeforeRemove(file, fileList){
-        if(file.status == "success"){
-          return this.$confirm(`确定移除此项?`)
-        }
-      },
-      random_string(len) {
-        len = len || 32
-        var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
-        var maxPos = chars.length
-        var pwd = ''
-        for (let i = 0; i < len; i++) {
-          pwd += chars.charAt(Math.floor(Math.random() * maxPos))
-        }
-        return pwd
-      },
-      upload(item) {
-        let self = this
-        const photo = item // 获取图片对象
-        const photoName = item.name // 原图片的名称
-        const url = 'https://integralsys.oss-cn-shenzhen.aliyuncs.com'
-        let date = moment().format('YYYY/MM/DD')
-        let param = new FormData()
-        let randomStr = this.random_string(32)
-        let key = 'intesys/dd/' + this.$getUserData().site_id+ '/' + date + '/' + randomStr + '.png'
-        param.append('Filename', photoName)
-        param.append('key', key)
-        param.append('policy', this.config.policy)
-        param.append('OSSAccessKeyId', this.config.accessid)
-        param.append('success_action_status', '200') // 不要问为什么,照做
-        param.append('callback', this.config.callback)
-        param.append('signature', this.config.signature)
-        param.append('file', photo) // 这个**切记**一定要放到最后去 append ,不然阿里云会一直报 key 的错误
-        axios.post(url, param, {
-            headers: {
-              'Content-Type': 'multipart/form-data'
-            }
-          }).then(response => {
-            if(response.data.Status == 'Ok'){
-                this.processLength = 100
-                this.showProcess = false
-              setTimeout(()=>{
-                this.processLength = 0
-              },200)
-              self.fileList.push({name: randomStr + photoName, url: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/' + key, name: item.name, response:{
-                  url: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/' + key
-                }})
-              self._onSuccess({status: 1, url: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/' + key, file_name: randomStr + photoName}, item, self.fileList)
-            }
-          }).catch(err => {
-            this.showProcess = false
-          })
-      },
-    }
-  }
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 38
src/dome.vue

@@ -1,38 +0,0 @@
-<template>
-<div id="app">
-  <VirtualList :listData="data" :itemSize="100"/>
-</div>
-</template>
-
-<script>
-import VirtualList from "@/components/VirtualList";
-let d = [];
-for (let i = 0; i < 50; i++) {
-  d.push({ id: i, value: i });
-}
-
-export default {
-  name: "App",
-  data() {
-    return {
-      data: d
-    };
-  },
-  components: {
-    VirtualList
-  }
-};
-</script>
-
-<style>
-html{
-  height: 100%;
-}
-body{
-  height: 100%;
-  margin:0;
-}
-#app{
-  height:100%;
-}
-</style>

+ 2 - 3
src/hint.vue

@@ -1,9 +1,9 @@
 <template>
 	<div>
 		<div @click="init()">
-			<img src="./assets/image/pc.png" style="width:100%;height:auto" v-if="type == 'PC'" />
+			<img src="assets/image/pc.png" style="width:100%;height:auto" v-if="type == 'PC'" />
 			<div class="app" v-else :style="{ width: width }">
-				<img src="./assets/image/app1.png" :style="{ width: width, height: 'auto' }" />
+				<img src="assets/image/app1.png" :style="{ width: width, height: 'auto' }" />
 			</div>
 		</div>
 	</div>
@@ -36,7 +36,6 @@ export default {
 		}else{
 			this.type ='PC';
 		}
-		console.log(data,this.type)
 		if (this.corpId) {
 			this.$nextTick(()=>{
 				this.init();

+ 0 - 1758
src/home.vue

@@ -1,1758 +0,0 @@
-<template>
-	<div class="">
-		<div class="flex-box ts flex-center-center" v-if="isSubject">
-			<img mode="scaleToFill" src="./assets/image/tz.png" />
-			<div class="flex-1">你正在使用个人体验版,如需正式使用,请联系管理员</div>
-			<div class="btn" type="primary" @click="openGly">联系管理员</div>
-		</div>
-		<el-row style="min-width:1160px;">
-			<el-col :span="18" style="min-width:780px;">
-				<el-row class="home-left-header">
-					<el-col :span="7" class="hlheader-user">
-						<el-row :gutter="40">
-							<el-col :span="24" class="hlheader-user-info">
-								<div class="headimg" style=" margin-right: 0px;cursor:pointer;">
-									<userImage :user_name="user_info.name" :img_url="user_info.img_url" fontSize="1.1" width="60px" height="60px"></userImage>
-								</div>
-								<div class="headtext">
-									<div class="greetings" style="margin-top:7px;">
-										<div style="margin-top:2px;">{{ user_info.name }}</div>
-										&nbsp;
-										<span style="margin-top:2px;">
-											{{
-												time <= 4
-													? '夜深了'
-													: time > 4 && time <= 11
-													? '早上好'
-													: time > 11 && time <= 14
-													? '中午好'
-													: time > 14 && time <= 19
-													? '下午好'
-													: time > 19 && time <= 24
-													? '晚上好'
-													: ''
-											}}
-										</span>
-									</div>
-									<p style="margin-top: 16px; color: #666;">
-										<span>
-											{{
-												time <= 4
-													? '烦恼尽退散'
-													: time > 4 && time <= 11
-													? '又是美好的一天'
-													: time > 11 && time <= 14
-													? '吃饱睡好更有动力'
-													: time > 14 && time <= 19
-													? '致敬奋斗中的自己'
-													: time > 19 && time <= 24
-													? '该养精蓄锐了'
-													: ''
-											}}
-										</span>
-									</p>
-								</div>
-							</el-col>
-						</el-row>
-					</el-col>
-
-					<el-col :span="17" style="margin:0;padding:0;" v-if="creatorJurisdiction">
-						<el-col :gutter="50" style="margin:0;padding:34px 0 0 0;" class="quick_button_box">
-							<div style="display:flex;justify-content: space-around;">
-								<div v-for="(item, index) in fits" :key="index" @click="openGzd(item.url)" style="display:flex;cursor:pointer;padding:0 5px 0 5px">
-									<img :src="item.img" style="width:46px;height:46px;margin:10px 5px 0 0" />
-									<p style="display: inline-block;width:100%;">
-										<b style="display: inline-block;color:#303133;font-size:16px;margin-top:11px;">{{ item.name }}</b>
-										<br />
-										<span style="color:#606266;font-size:12px;display: inline-block;margin-top:8px;">{{ item.value }}</span>
-									</p>
-								</div>
-							</div>
-						</el-col>
-					</el-col>
-					<el-col v-else :span="17" style="margin-top:34px;padding:0 0 10px 0;height:58px;" v-loading="authorityManagerHeaderLoad">
-						<el-col :gutter="50" style="margin:0;padding:0;" class="quick_button_box">
-							<div style="display:flex;justify-content: space-around;">
-								<p style="text-align:center;cursor:pointer;margin: 0;" @click="$router.push({ path: '/individual_statistics' })">
-									<b style="color:#26A2FF;font-size:27px;">{{ headDayBs.b ? headDayBs.b : '0' }}</b>
-									<br />
-									<span style="color:#606266;font-size:14px;padding-top:8px;display: inline-block;">今日B分</span>
-								</p>
-								<p style="text-align:center;cursor:pointer;margin: 0;" @click="$router.push({ path: '/individual_statistics' })">
-									<b style="color:#26A2FF;font-size:27px;">{{ authorityManagerHeaders.b ? authorityManagerHeaders.b : '0' }}</b>
-									<br />
-									<span style="color:#606266;font-size:14px;padding-top:8px;display: inline-block;">本月B分</span>
-								</p>
-								<p style="text-align:center;cursor:pointer;margin: 0;" @click="$router.push({ path: '/individual_statistics' })">
-									<b style="color:#26A2FF;font-size:27px;">{{ authorityManagerHeaders.a ? authorityManagerHeaders.a : '0' }}</b>
-									<br />
-									<span style="color:#606266;font-size:14px;padding-top:8px;display: inline-block;">本月A分</span>
-								</p>
-								<p style="text-align:center;cursor:pointer;margin: 0;" @click="$router.push({ path: '/my_task' })">
-									<b style="color:#26A2FF;font-size:27px;">
-										{{
-											authorityManagerHeaders.performance
-												? authorityManagerHeaders.performance.complete_count + '/' + authorityManagerHeaders.performance.total_count
-												: '0/0'
-										}}
-									</b>
-									<br />
-									<span style="color:#606266;font-size:14px;padding-top:8px;display: inline-block;">本月任务进度</span>
-								</p>
-							</div>
-						</el-col>
-					</el-col>
-				</el-row>
-
-				<el-row class="left-all-style">
-					<el-row>
-						<el-col :span="22"><span class="title">排行榜</span></el-col>
-						<el-col :span="2"><span class="noremind" @click="$router.push({ path: RankingPush })">查看详情</span></el-col>
-					</el-row>
-					<div v-loading="tabPositionLoad">
-						<div style="width:100%;height:30px;margin-top:20px;">
-							<el-radio-group v-model="tabPosition" style="margin-bottom: 30px;display:flex">
-								<div v-for="(item, index) in rankingList" :key="index" style="">
-									<el-radio-button :label="item.val" @click.native="tabPositions($event, item)">
-										<span style="width:84px;coloe:#606266;display: block;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;">
-											{{ item.group_name }}
-										</span>
-									</el-radio-button>
-								</div>
-							</el-radio-group>
-						</div>
-						<div style="display:flex;margin-top:16px;padding-top:24px;height:100%;" v-loading="addUpRankingLoad">
-							<div class="nopoint_box" style="" v-if="rankingListDetails.length == 0">
-								<div class="noimg" style="margin:0;"></div>
-								<span class="title1" style="margin:0;">暂无积分数据</span>
-							</div>
-							<div v-else v-for="(item, index) in rankingListDetails" :key="index" style="text-align:center;width:80px;cursor:pointer;margin:0 20px;">
-								<div class="" style="cursor:pointer;position: relative;height: 60px;">
-									<svg-icon
-										v-if="item.rank <= 3"
-										:icon-class="item.rank == 1 ? 'first' : item.rank == 2 ? 'secondPlace' : item.rank == 3 ? 'third' : ''"
-										style="z-index:1;position: absolute;left: 26px;top: -18px;font-size:28px;"
-									/>
-									<div
-										v-if="item.rank == 4 || item.rank == 5"
-										style="z-index:1;position: absolute;left: 27px;top: -14px;width:24px;height:24px;border:1px solid #C0C4CC;border-radius:50%;background-color:#fff;font-size:12px;text-align-center;line-height:24px;color:#303133;"
-									>
-										<b style="">{{ item.rank }}</b>
-									</div>
-									<div
-										v-if="item.employee_id == user_info.id && index == 0 && item.rank > 3"
-										style="z-index:1;position: absolute;left: 26px;top: -14px;width:25px;height:25px;border:1px solid #C0C4CC;border-radius:50%;background-color:#fff;font-size:12px;text-align-center;line-height:24px;color:#303133;"
-									>
-										<b>{{ item.rank }}</b>
-									</div>
-									<div style="position: absolute;left: 8px;top: -16px;z-index:2;">
-										<div
-											v-if="index == 5 || index == 6"
-											style="width:60px;height:24px;border:1px solid #C0C4CC;background-color:#fff;border-radius:20px;font-size:12px;color:#303133;text-align:center;line-height:24px"
-										>
-											<b>{{ index == 5 ? '倒数第2' : index == 6 ? '倒数第1' : '' }}</b>
-										</div>
-									</div>
-									<userImage :img_url="item.employee_img_url" fontSize="1" :user_name="item.employee_name" width="60px" height="60px"></userImage>
-								</div>
-								<span
-									style="color:#303133;font-size:14px;text-align:center;margin-top:10px;display: inline-block;width:100%;display: block;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;"
-								>
-									{{ item.employee_name }}
-									<span v-if="item.employee_id == user_info.id">(我)</span>
-								</span>
-							</div>
-						</div>
-					</div>
-				</el-row>
-
-				<el-row class="left-all-style">
-					<el-row style="">
-						<el-col :span="24"><b class="title" style="margin-bottom:15px;display:block">积分构成</b></el-col>
-
-						<div v-loading="IntegralFormChartLoad">
-							<el-col :span="5" style="position: relative;left:10px;z-index:1;margin-top:10px;" v-if="!this.employeeRout">
-								<el-cascader
-									v-model="dept_name1"
-									:options="dept_tree"
-									@change="dept1_null"
-									:props="{ checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
-									ref="dept1"
-									filterable
-									change-on-select
-									placeholder="请选择部门"
-									clearable
-								></el-cascader>
-							</el-col>
-							<div class="nopoint_box" style="height:325px;" v-show="IntegralFormnone">
-								<div class="noimg" style="width: 150px;height: 150px;margin-top:94px;"></div>
-								<span class="title1">
-									暂无积分数据,
-									<span v-if="$supremeAuthority()!='employee'" @click="$router.push({ path: '/award_punish' })" style="color:#409EFF;cursor:pointer;">去奖扣积分></span>
-								</span>
-							</div>
-							<div v-show="!IntegralFormnone" style="margin-top:20px;"><div ref="IntegralFormChart" :style="{ width: '100%', height: '400px' }"></div></div>
-						</div>
-					</el-row>
-				</el-row>
-
-				<el-row class="left-all-style">
-					<el-row style="">
-						<el-col :span="24" style="display:flex">
-							<b class="title" style="margin:0 20px 15px 0;display:block">本月积分情况</b>
-							<el-checkbox v-model="exclusiveMonthChecked">不包含自动积分加分项</el-checkbox>
-						</el-col>
-						<div v-loading="monthlyIntegralloading">
-							<el-col :span="5" style="position: relative;left:10px;z-index:1;" v-if="!this.employeeRout">
-								<el-cascader
-									v-model="dept_name2"
-									:options="dept_tree"
-									@change="monthlyIntegralchange"
-									:props="{ checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
-									ref="dept2"
-									filterable
-									change-on-select
-									placeholder="请选择部门"
-									clearable
-								></el-cascader>
-							</el-col>
-
-							<div class="nopoint_box" style="height:381px;" v-if="monthlyIntegralnone">
-								<div class="noimg" style="width: 150px;height: 150px;margin-top:90px;"></div>
-								<span class="title1">暂无积分数据</span>
-							</div>
-
-							<div v-show="!monthlyIntegralnone">
-								<div ref="monthlyIntegralChart" :style="{ width: '100%', height: '350px', marginTop: '40px' }"></div>
-								<div style="width:90%;display:flex;justify-content: space-around;margin-top:30px;padding-left:40px">
-									<p v-for="(item, index) in monthlyIntegralList" :key="index" style="text-align:center">
-										<b style="display:block;color:#303133;font-size:18px;" v-if="index < 3">
-											{{ index == 0 ? item.total_point : index == 1 ? item.reward_point : index == 2 ? item.deduction_point : '' }}
-										</b>
-										<b style="display:block;color:#303133;font-size:18px;" v-else-if="index == 3">{{ item.ratio == -1 ? '—' : item.ratio + ':1' }}</b>
-										<b style="display:block;color:#303133;font-size:18px;" v-else>
-											{{ item.toRatio.ratio + '%' }}
-											<svg-icon
-												:icon-class="item.toRatio.type == 1 ? 'litrearrows' : item.toRatio.type == 2 ? 'droparrows' : ''"
-												style="font-size:10px;margin-bottom:2px"
-											/>
-										</b>
-										<span style="color:rgb(48, 49, 51);font-size:14px;margin-top:5px;display:block;">{{ item.name }}</span>
-									</p>
-								</div>
-							</div>
-						</div>
-					</el-row>
-				</el-row>
-
-				<el-row v-if="!this.employeeRout" class="left-all-style" style="">
-					<el-row style="">
-						<el-col :span="24"><b class="title" style="margin-bottom:15px;display:block">管理者奖扣任务执行情况</b></el-col>
-						<div v-loading="ManagerSAwardloading">
-							<el-col :span="5" style="position: relative;left:10px;z-index:1;">
-								<el-cascader
-									v-model="dept_name3"
-									:options="dept_tree"
-									@change="ManagerSAwardlchange"
-									:props="{ checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
-									ref="dept3"
-									filterable
-									change-on-select
-									placeholder="请选择部门"
-									clearable
-								></el-cascader>
-							</el-col>
-							<div class="nopoint_box" style="height:401px;" v-if="ManagerSAwardnone">
-								<div class="noimg" style="width: 150px;height: 170px;margin-top:90px;"></div>
-								<span class="title1">暂无积分数据</span>
-							</div>
-							<div v-show="!ManagerSAwardnone" :style="{ width: widths }">
-								<div ref="ManagerSAwardChart" :style="{ width: widths, height: '400px', marginTop: '40px' }"></div>
-								<div style="width:90%;display:flex;justify-content: space-around;padding-left:40px">
-									<p
-										v-for="(item, index) in ManagerSAwardlList"
-										:key="index"
-										style="z-index:1;"
-										class="ManagerSAwardlStyle"
-										@click="$router.push({ path: '/manager_statistics' })"
-									>
-										<b class="ManagerSAwardlStyleB" v-if="index != 2">{{ item.val }}</b>
-										<b class="ManagerSAwardlStyleB" v-else-if="index == 2">{{ item.val == -1 ? '—' : item.val + ':1' }}</b>
-										<span class="ManagerSAwardlStyleSpan">{{ item.name }}</span>
-									</p>
-								</div>
-							</div>
-						</div>
-					</el-row>
-				</el-row>
-			</el-col>
-			<el-col :span="6" style="min-width:280px;">
-				<el-row v-if="$supremeAuthority()!='employee'&&$supremeAuthority()!='creator'">
-					<div class="right-all-style flex-box-ce" style="background-color:#fff;padding:20px;;text-align:left;margin-bottom: 10px;cursor: pointer;" @click="ruleQRcode">
-						<img src="./assets/image/zq.png" style="width: 20px;height: 20px;margin-right: 10px;"/>
-						<div style="font-size: 15px;" class="zb flex-1">{{thisweek}} 积分周报</div>
-						<i class="el-icon-arrow-right" style="font-size: 18px;"></i>
-					</div>
-				</el-row>
-				<el-row v-if="!creatorJurisdiction">
-					<div class="right-all-style" style="background-color:#fff;padding:20px;;text-align:left;margin-bottom: 10px;">
-						<span class="title">常用</span>
-						<div>
-							<span v-for="(item, index) in inCommonUse" :key="index" @click="$router.push({ path: item.push })" class="inCommonUseStyle">
-								<img :src="item.image" alt="" style="width:31px;height:31px;margin:11px 10% 0 8%;" />
-								<b>{{ item.name }}</b>
-							</span>
-						</div>
-					</div>
-				</el-row>
-				<el-row>
-					<div class="right-all-style" v-loading="highestPrizeBuckleloading" style="background:#fff;padding: 20px 20px 0;">
-						<span class="title">待我审批({{ auditList.length }})</span>
-
-						<div class="nopoint_box" v-if="auditList.length == 0">
-							<div class="noimg"></div>
-							<span class="title1" style="padding-bottom:20px;">还没有待我审批</span>
-						</div>
-
-						<div v-else style="padding:20px 0 20px 0;" class="flex-box-v">
-							<div
-								v-for="(item, index) in auditList"
-								class="List_border"
-								:key="index"
-								style="cursor:pointer;display:flex;padding-top:10px;"
-								@click="openDetail(item)"
-							>
-								<userImage width="45px" height="45px" :id="item.employee_id" :user_name="item.employee_name" style="margin-right:8px"></userImage>
-								<div class="rightexamineAndApproveList2">
-									<p style="width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#303133;font-size:16px">
-										<b>
-											{{ item.employee_name
-											}}{{
-												item.source_type == 1
-													? '的积分任务'
-													: item.source_type == 2
-													? '的积分申请'
-													: item.source_type == 3
-													? '的积分录入'
-													: item.source_type == 4
-													? '的绩效工作'
-													: ''
-											}}
-										</b>
-									</p>
-									<p
-										style="padding:10px 0;font-size:13px;line-height:20px;color:#303133;overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2; "
-									>
-										{{ item.remark.rule || item.remark.customize }}
-									</p>
-									<div style="display:flex;padding-bottom:10px;justify-content: space-between;">
-										<span style="color:#909399">{{ item.event_time }}</span>
-										<div><span style="color:#26A2FF;cursor:pointer">审批</span></div>
-									</div>
-								</div>
-							</div>
-							<div
-								class="more"
-								v-show="auditList.length >= 3"
-								style="text-align: center;color: #909399;font-size: 14px; padding:16px 16px 0 16px; cursor: pointer;"
-								@click="$router.push({ path: '/approval_list' })"
-							>
-								查看更多
-							</div>
-						</div>
-					</div>
-				</el-row>
-				<el-row>
-					<div class="right-all-style" v-loading="highestPrizeBuckleloading" style="background:#fff;padding: 20px 20px 0;">
-						<span class="title">本周奖分最高</span>
-
-						<div class="nopoint_box" v-if="!prize.id">
-							<div class="noimg"></div>
-							<span class="title1" style="padding-bottom:20px;">暂无积分数据</span>
-						</div>
-
-						<div v-else style="display:flex;padding:20px 0 20px 0;">
-							<userImage width="45px" height="45px" :user_name="prize.name" fontSize=".9" style="margin-right:8px"></userImage>
-							<div class="rightexamineAndApproveList" style="border:0px">
-								<p
-									style="width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#73767c;font-size:16px;display:flex;justify-content: space-between;"
-								>
-									<b style="color:#303133;font-size:16px;margin:0px 0 0 5px;">{{ prize.name }}</b>
-									<span style="color:#26A2FF;font-size:16px;">
-										<span v-if="prize.point > 0">+</span>
-										{{ prize.point }} B分
-									</span>
-								</p>
-								<p
-									style="margin:8px 0 0 5px;font-size:13px;line-height:20px;color:#303133;overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:3;"
-								>
-									{{ prize.remark ? prize.remark.customize : '' }}
-								</p>
-							</div>
-						</div>
-					</div>
-				</el-row>
-
-				<el-row>
-					<div class="right-all-style" v-loading="highestPrizeBuckleloading" style="background:#fff;padding: 20px 20px 0;">
-						<span class="title">本周扣分最多</span>
-
-						<div class="nopoint_box" v-if="!buckle.id">
-							<div class="noimg"></div>
-							<span class="title1" style="padding-bottom:10px;">暂无积分数据</span>
-						</div>
-
-						<div v-else style="display:flex;padding:20px 0 20px 0;">
-							<userImage width="45px" height="45px" :user_name="buckle.name" fontSize=".9" style="margin-right:8px"></userImage>
-							<div class="rightexamineAndApproveList">
-								<p
-									style="width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#73767c;font-size:16px;display:flex;justify-content: space-between;"
-								>
-									<b style="color:#303133;font-size:16px;margin:0px 0 0 5px;">{{ buckle.name }}</b>
-									<span style="color:#FF9600;font-size:16px;">{{ buckle.point }} B分</span>
-								</p>
-								<p
-									style="margin:8px 0 0 5px;font-size:13px;line-height:20px;color:#303133;overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:3;"
-								>
-									{{ buckle.remark ? buckle.remark.customize : '' }}
-								</p>
-							</div>
-						</div>
-					</div>
-				</el-row>
-
-				<el-row>
-					<div class="right-all-style" v-loading="announLoad" style="background:#fff;padding: 20px 20px 20px 20px;">
-						<div style="display:flex;justify-content: space-between;">
-							<span class="title">系统通知</span>
-							<span v-if="announcement.title" @click="$router.push({ path: '/update_notice' })" class="announcementc" style="font-size:13px;">查看详情</span>
-						</div>
-						<div v-if="announcement.title" class="announs">
-							<b style="font-size:15px;margin:10px 0 0 10px;display: inline-block;">{{ announcement.title }}</b>
-							<div class="announDetails" style="padding:0 0 0 18px;margin-top:10px;" v-html="announcement.focus"></div>
-						</div>
-						<div v-else class="nopoint_box">
-							<div class="noimg"></div>
-							<span class="title1" style="padding-bottom:10px;">暂无系统通知</span>
-						</div>
-					</div>
-				</el-row>
-			</el-col>
-		</el-row>
-		<div class="updateNotice">
-			<el-dialog title="系统通知" :visible.sync="updateVisible" width="500px" top="20vh" :before-close="updateClose">
-				<b style="font-size:16px;margin:0 0 10px 0;display: inline-block;">{{ announcement.title }}</b>
-				<div class="announDetails" style="padding:0 0 0 0" v-html="announcement.focus"></div>
-				<span slot="footer" class="dialog-footer"><el-button @click="$router.push({ path: '/update_notice' })" type="primary" round>查看详情</el-button></span>
-			</el-dialog>
-		</div>
-		<el-dialog @close="closeCode"  :visible.sync="innerVisible" width="444px">
-			<div style="border-radius: 15px;border: 1px solid #f1f1f1;padding: 10px; width: 346px;box-sizing: border-box;margin: 0 auto;">
-				<div id="qrcode" ref="qrcode"></div>
-			</div>
-			<div style="margin-top: 10px;text-align: center;color: #666;">请使用钉钉APP扫描二维码</div>
-		</el-dialog>
-		<examinePopup :title="'审核详情'" :id="detail_id" :show.sync="detailShow"></examinePopup>
-	</div>
-</template>
-
-<script>
-var bool = true; // 五秒执行一次变量
-import QRCode from 'qrcodejs2';
-import examinePopup from '@/components/examinePopup';
-import { contactAdminToUseApp } from 'dingtalk-design-libs';
-export default {
-	components: { examinePopup },
-	data() {
-		return {
-			isSubject: false, //判断是否是个人版进入
-			mainCorpId: '', //如果是个人版,这个企业ID是登录者所在的企业ID,不是钉钉那边提供的隐藏企业ID
-
-			announLoad: false,
-			announcement: {},
-
-			updateVisible: false,
-
-			employeeRout: this.$authoritys('employee'),
-
-			authorityManagerHeaderLoad: false, //管理员头部loading
-			authorityManagerHeaders: {}, //管理员头部 数据
-			headDayBs: {},//管理员头部 数据 天
-			creatorJurisdiction: this.$getIsCreator('creator'), //是否创始人
-
-			widths: '100%',
-			time: this.$moment().format('HH'),
-			user_info: this.$getUserData(),
-			fits: [
-				{
-					name: '奖扣A/B分',
-					value: '表现好坏,有奖有罚',
-					img: require('./assets/image/prizeBuckle.png'),
-					url: '/award_punish'
-				},
-				// {
-				//   name: "绩效",
-				//   value: "工作目标与价值的体现",
-				//   img: require("./assets/image/performance.png"),
-				//   url: "/award_punish",
-				// },
-				{
-					name: '管理者奖扣',
-					value: '管理执行到位,奖罚分明',
-					img: require('./assets/image/performance.png'),
-					url: '/manager_statistics'
-				},
-				{
-					name: '任务',
-					value: '认可积极完成任务的人',
-					img: require('./assets/image/task.png'),
-					url: '/my_issue'
-				}
-			],
-
-			//排行榜
-			RankingPush: '', //查看更多跳转
-			tabPositionLoad: false, //排名分类loading
-			addUpRankingLoad: false, //排名人员loading
-			tabPosition: '0',
-			rankingList: [], //排行榜数据
-			rankingListDetails: [], //排行榜人员列表
-
-			//积分构成
-			IntegralFormnone: false, //积分构成为空或报错,展示的开关
-			dept_name1: [], //积分构成--部门
-			IntegralFormChartLoad: false, //积分构成loading
-
-			//本月积分情况
-			exclusiveMonthBranch: 0, //本月积分情况--部门
-			exclusiveMonthChecked: true, //本月积分情况--不包含自动积分加分项
-			dept_name2: [], //本月积分情况--部门
-			monthlyIntegralList: [
-				//本月积分情况数据
-				{ total_point: '0', name: '本月总积分' },
-				{ reward_point: '0', name: '本月总奖分' },
-				{ deduction_point: '0', name: '本月总扣分' },
-				{ ratio: '0', name: '奖扣分比例' },
-				{ toRatio: { ratio: '0', type: 0 }, name: '对比上月总分' },
-				{ toRatio: { ratio: '0', type: 0 }, name: '对比上月奖分' },
-				{ toRatio: { ratio: '0', type: 0 }, name: '对比上月扣分' }
-			],
-			monthlyIntegralloading: false, //本月积分情况loading
-			monthlyIntegralnone: false, //本月积分情况为空或报错,展示的开关
-
-			//管理者奖扣
-			dept_name3: [], //管理者统计数据--部门
-			ManagerSAwardloading: false, //管理者统计 loading
-			ManagerSAwardnone: false, //管理者奖扣执行情况为空或报错,展示的开关
-			ManagerSAwardlList: [
-				//管理者统计数据
-				{ val: '0', name: '总奖分' },
-				{ val: '0', name: '总扣分' },
-				{ val: '0', name: '奖扣分比例' },
-				{ val: '0', name: '奖扣人次' },
-				{ val: '0', name: '奖扣执行人数' },
-				{ val: '0', name: '达标人数' },
-				{ val: '0', name: '未达标人数' }
-			],
-
-			dept_tree: [], //部门列表
-
-			//奖扣分
-			highestPrizeBuckleloading: false, //奖扣分最高loading
-			prize: {}, //奖分
-			buckle: {}, //扣分
-
-			inCommonUse: [
-				{ name: '奖扣积分', image: require('./assets/image/entry_list.png'), push: '/award_punish' },
-				{ name: '发布任务', image: require('./assets/image/my_publish.png'), push: '/my_issue' },
-				{ name: '申请积分', image: require('./assets/image/a_apply.png'), push: '/apply_list' },
-				{ name: '领任务', image: require('./assets/image/task_hall.png'), push: '/get_task' }
-			],
-			// 待我审批模块
-			auditList: [],
-			detail_id: 0,
-			detailShow: false,
-			thisweek:'',
-			innerVisible:false
-		};
-	},
-	watch: {
-		exclusiveMonthChecked() {
-			this.monthlyIntegral();
-		}
-	},
-	mounted() {
-		console.log(this.$supremeAuthority())
-		if (this.employeeRout) {
-			this.inCommonUse = [];
-			this.inCommonUse.push(
-				{ name: '申请积分', image: require('./assets/image/a_apply.png'), push: '/apply_list' },
-				{ name: '领任务', image: require('./assets/image/task_hall.png'), push: '/get_task' }
-			);
-		}
-		this.function_All();
-		window.addEventListener('resize', this.selfAdaption);
-		// 个人版处理
-		if (this.$getUserData().is_personal == 1) {
-			this.isSubject = true;
-			this.mainCorpId = this.$getUserData().main_corp_id;
-		}
-		var url = window.location.href;
-		var rUrl = this.GetRequest(url).url || '';
-		// console.log('url=' + rUrl);
-		this.$nextTick(function() {
-			if (rUrl) {
-				setTimeout(() => {
-					this.$router.push({ path: '/' + rUrl });
-				}, 200);
-			}
-		});
-		this.setDate()
-	},
-	methods: {
-		// 关闭弹框,清除已经生成的二维码
-		closeCode() {
-			setTimeout(() => {
-				this.$refs.qrcode.innerHTML = '';
-			}, 150);
-		},
-		ruleQRcode() {
-			this.innerVisible = true;
-			// 使用$nextTick确保数据渲染
-			this.$nextTick(() => {
-				this.payOrder();
-			});
-		},
-		payOrder () {// 展示二维码
-			let url = 'dingtalk://dingtalkclient/action/open_micro_app'
-			let appid = '?appId='+this.$appId
-			let corpId = '&corpId='+this.$getCache('corpId')
-			let page = '&page='+encodeURIComponent(`pages/reportBox/report/report?employee_id=${encodeURIComponent(this.$getUserData().id)}`)//encodeURIComponent('小米')
-			let urls = url+appid+corpId+page
-			var qrcode = new QRCode('qrcode', {
-				text: urls, // 二维码内容
-				width: 325,
-				height: 325,
-				render: 'table', // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
-				colorDark: '#34373e', // 二维码色
-				colorLight: '#ffffff', // 背景色
-				correctLevel: QRCode.CorrectLevel.H // 容错等级,H是heigh,最高,所以二维码看起来很密
-			})
-		},
-		  setDate() {
-			var thisweek = {};
-			var date = new Date();
-			// 本周一的日期
-			date.setDate(date.getDate() - date.getDay() + 1);
-			let month = (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
-			let getDate = date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()
-			thisweek.start_day = month + "-" + getDate;
-			// thisweek.start_day = date.getFullYear() + "-" + month + "-" + getDate;
-		
-			// 本周日的日期
-			date.setDate(date.getDate() + 6);
-			let month2 = (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
-			let getDate2 = date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()
-			thisweek.end_day =month2 + "-" + getDate2;
-			// thisweek.end_day = date.getFullYear() + "-" + month2 + "-" + getDate2;
-			this.thisweek=thisweek.start_day+'~'+thisweek.end_day
-		  },
-		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;
-		},
-		openGly() {
-			contactAdminToUseApp({ id: '55493', corpId: this.mainCorpId }).catch(err => {
-				// 入参不正确,或者遇到技术异常时才会进入这个链路
-				console.error(err);
-			});
-		},
-		function_All() {
-			if (this.$getIsCreator('creator')) {
-				//是否是创始人
-			} else {
-				this.authorityManagerHeader();
-			}
-			this.noticeList(); //系统公告
-			this.integralForm(); //积分构成
-			this.getDepartment(); //获取部门列表
-			this.rankingListname(); //获取自定义排行榜名
-			this.monthlyIntegral(); //本月积分情况
-			this.getSpList(); //待我审批列表
-			if (!this.employeeRout) {
-				this.ManagerSAward(); //管理者奖扣任务执行情况
-			}
-			this.highestPrizeBuckle(); //奖扣分最高积分事件
-		},
-		//审批
-		openDetail(item) {
-			this.detail_id = item.id;
-			this.detailShow = true;
-		},
-		// 待我审批列表
-		getSpList() {
-			let params = {
-				source_type: 0,
-				type: 'waiting',
-				page: 1,
-				pt_id: 0,
-				page_size: '3'
-			};
-			this.$axios('get', '/api/integral/review/list', params)
-				.then(res => {
-					if (res.data.code == 1) {
-						this.auditList = res.data.data.list;
-					}
-				})
-				.finally(() => {});
-		},
-		noticeList() {
-			//系统公告
-			this.announLoad = true;
-			let params = {
-				page: 1,
-				page_size: 10
-			};
-			this.$axios('get', '/api/announcement/list', params)
-				.then(res => {
-					if (res.data.code == 1) {
-						let list = res.data.data.list[0];
-						if (this.$getCache('noticeId')) {
-							if (this.$getCache('noticeId') != list.id) {
-								this.updateVisible = true;
-								this.$setCache('noticeId', list.id);
-							}
-						} else {
-							this.$setCache('noticeId', list.id);
-							this.updateVisible = true;
-						}
-						this.announcement = list;
-					}
-				})
-				.finally(() => {
-					this.announLoad = false;
-				});
-		},
-		updateClose(none) {
-			none();
-		},
-		//echarts自适应
-		selfAdaption() {
-			var myChart1 = this.$echarts.init(this.$refs.monthlyIntegralChart);
-			var myChart2 = this.$echarts.init(this.$refs.IntegralFormChart);
-			var myChart3 = this.$echarts.init(this.$refs.ManagerSAwardChart);
-			myChart1.resize();
-			myChart2.resize();
-			myChart3.resize();
-		},
-		openGzd(val) {
-			val ? this.$router.push({ path: val }) : '';
-		},
-		popout() {
-			if (bool) {
-				const h = this.$createElement;
-				this.$notify({
-					message: h('b', { style: 'color:rgb(38, 162, 255)' }, '任务功能将在近期开放,敬请期待')
-				});
-				bool = false;
-				setTimeout(() => {
-					bool = true;
-				}, 5000);
-			} else {
-			}
-		},
-		Administrator() {
-			this.popout();
-		},
-
-		//管理员头部
-		authorityManagerHeader() {
-			this.authorityManagerHeaderLoad = true;
-			let params1 = this.$axios('get', '/api/integral/statistics/', {employee_id: this.user_info.id, month: this.$moment().format('YYYY-MM')}, 'v2')
-			let params2 = this.$axios('get', '/api/integral/statistics/', {employee_id: this.user_info.id, day: this.$moment().format('YYYY-MM-DD')}, 'v2')
-			Promise.all([params1, params2]).then(res => {
-				this.authorityManagerHeaders = res[0].data.data;
-				this.headDayBs = res[1].data.data;
-			})
-			.finally(() => {
-				this.authorityManagerHeaderLoad = false;
-			});
-		},
-
-		//排行榜
-		customRanking(target_id, date_interval) {
-			//自定义排名   date_interval=时间
-			let data = {
-				group_id: target_id,
-				pt_id: 3,
-				index_ranking: 1
-			};
-			data.date =
-				date_interval == 1
-					? this.$moment().format('YYYYMM')
-					: date_interval == 2
-					? this.$moment().format('YYYYQ')
-					: date_interval == 3
-					? this.$moment().format('YYYY')
-					: '0';
-			this.$axios('get', '/api/integral/statistics/groups/rank', data)
-				.then(res => {
-					let lists = res.data.data.list;
-					let rankingList = [];
-					let arr = false;
-					for (let i in lists) {
-						let rankingJson = {};
-						if (lists[i].employee_name) {
-							arr = true;
-						} else {
-							arr = false;
-							rankingJson.employee_id = lists[i].employee_id;
-							rankingJson.employee_img_url = lists[i].img_url;
-							rankingJson.employee_name = lists[i].name;
-							rankingJson.point = lists[i].point;
-							rankingJson.rank = lists[i].rank;
-							rankingJson.status_remark = '';
-							rankingList.push(rankingJson);
-						}
-					}
-					if (arr) {
-						this.rankingListDetails = lists;
-					} else {
-						this.rankingListDetails = rankingList;
-					}
-				})
-				.finally(() => {
-					this.addUpRankingLoad = false;
-				});
-		},
-		addUpRanking() {
-			//累计B分排名
-			let params = {
-				dept_id: 0,
-				sort: 'DESC',
-				page: 1,
-				page_size: 10,
-				pt_id: 3,
-				type: 'all',
-				index_ranking: 1
-			};
-			this.$axios('get', '/api/integral/statistics/ranking', params, 'v2')
-				.then(res => {
-					this.rankingListDetails = res.data.data.list;
-				})
-				.finally(() => {
-					this.addUpRankingLoad = false;
-				});
-		},
-		departmentOfRanking() {
-			//部门B分排名
-			this.RankingPush = '/dept_rank';
-			let params = {
-				dept_id: 0,
-				sort: 'DESC',
-				pt_id: 3,
-				time_type: 1,
-				page: 1,
-				page_size: 10,
-				position: 'all',
-				month: this.$moment().format('YYYY-MM'),
-				index_ranking: 1
-			};
-			this.$axios('get', '/api/integral/statistics/ranking', params, 'v2')
-				.then(res => {
-					this.rankingListDetails = res.data.data.list;
-				})
-				.finally(() => {
-					this.addUpRankingLoad = false;
-				});
-		},
-		rankingListname() {
-			//获取排名列表
-			this.tabPositionLoad = true;
-			let params = {
-				page: 1,
-				page_size: 7
-			};
-			this.$axios('get', '/api/integral/statistics/ranking/list', params)
-				.then(res => {
-					if (res.data.code == 1) {
-						let lists = res.data.data.list;
-						for (let i in lists) {
-							lists[i].val = i;
-							if (lists[i].type == 'normal') {
-								lists[i].group_name = '阶段排名(月)';
-							}
-							if (lists[i].type == 'all') {
-								lists[i].group_name = '累计B分排名';
-							}
-							this.rankingList.push(lists[i]);
-						}
-
-						this.addUpRankingLoad = true;
-						this.departmentOfRanking(); //进入获取部门B分排名数据
-					} else {
-						self.$message.error(res.data.data.msg);
-					}
-				})
-				.finally(() => {
-					this.tabPositionLoad = false;
-					// self.item_loading = false;
-				});
-		},
-		tabPositions(e, item) {
-			//排行榜点击分类
-			if (e.target.tagName === 'INPUT') return;
-			if (item) {
-				this.addUpRankingLoad = true;
-			}
-			if (item.type == 'normal') {
-				this.RankingPush = '/dept_rank';
-				this.departmentOfRanking();
-			} else if (item.type == 'all') {
-				this.RankingPush = '/total_rank';
-				this.addUpRanking();
-			} else if (item.type == 'custom') {
-				this.RankingPush = '/custom_rank';
-				this.customRanking(item.target_id, item.date_interval);
-			}
-		},
-
-		//积分构成
-		dept1_null(val) {
-			let valItem = 0;
-			for (let i in val) {
-				valItem = val[i];
-			}
-			this.integralForm(valItem);
-			this.$nextTick(() => {
-				this.$refs.dept1.dropDownVisible = false;
-			});
-		},
-		integralForm(item) {
-			this.IntegralFormChartLoad = true;
-			let listslength = [];
-			let params = {};
-			if (item) {
-				(params.dept_id = item), (params.month = this.$moment().format('YYYY-MM'));
-			} else {
-				(params.dept_id = null), (params.month = this.$moment().format('YYYY-MM'));
-			}
-			if (this.employeeRout) {
-				params.employee_id = this.$getUserData().id;
-			}
-			this.$axios('get', '/api/integral/statistics/pie/b', params, 'v2')
-				.then(res => {
-					let lists = res.data.data.list;
-					listslength = lists;
-					let legendData1 = [];
-					let legendData2 = [];
-					let dadalist = [];
-					//分为两列展示
-					for (let i in lists) {
-						if (lists[i].name.length > 15) {
-							lists[i].name = lists[i].name.slice(0, 15) + '...';
-						}
-
-						//分为两列展示
-						if (i < 8) {
-							legendData1.push(lists[i].name + ' ' + '奖' + lists[i].reward + ' ' + '扣' + lists[i].deduction + ' ' + lists[i].ratio + '%');
-						} else {
-							legendData2.push(lists[i].name + ' ' + '奖' + lists[i].reward + ' ' + '扣' + lists[i].deduction + ' ' + lists[i].ratio + '%');
-						}
-						let dataListDx = {};
-						if (lists[i].ratio < 0) {
-							dataListDx.value = 0;
-						} else {
-							dataListDx.value = lists[i].ratio;
-						}
-						dataListDx.name = lists[i].name + ' ' + '奖' + lists[i].reward + ' ' + '扣' + lists[i].deduction + ' ' + lists[i].ratio + '%';
-						dadalist.push(dataListDx);
-					}
-					this.drawLine(legendData1, dadalist); //图表
-				})
-				.finally(() => {
-					if (listslength.length == 0) {
-						this.IntegralFormnone = true;
-					} else {
-						this.IntegralFormnone = false;
-					}
-					this.IntegralFormChartLoad = false;
-				});
-		},
-		//分为两列展示,多传legendDataTwo
-		drawLine(legendDataOne, dadalist) {
-			const chart = this.$refs.IntegralFormChart;
-			//此处可给固定颜色,不给就所有颜色随机
-			let colors = ['rgb(38, 162, 255)', '#f36f2a', '#fecb09', '#00b6bd', '#e85d53', '#fecb09', '#725197', '#fcb814', '#41a08d', '#425a95', '#ea8b84', '#9d1d62', '#fcb814'];
-			let legendDataLeng = legendDataOne.length;
-			if (legendDataLeng > colors.length) {
-				//当列表大于固定颜色时,给随机颜色
-				let colorsLeng = colors.length;
-				for (let i = 0; i <= legendDataLeng - colorsLeng; i++) {
-					colors.push('rgb(' + Math.round(Math.random() * 255) + ',' + Math.round(Math.random() * 255) + ',' + Math.round(Math.random() * 255) + ')');
-				}
-			}
-
-			//只显示 N 条标题,多余隐藏,但是饼图不会隐藏
-			let DataLengths = [];
-			let left1 = '45%';
-			let left2 = '45%';
-			let leftBT = '25%';
-			if (chart) {
-				const myChart = this.$echarts.init(chart);
-				var legendData1 = legendDataOne;
-				// var legendData2 = DataLengths;
-				const option = {
-					tooltip: {
-						trigger: 'item',
-						formatter: '{b}'
-					},
-					legend: [
-						{
-							type: 'scroll',
-							orient: 'vertical',
-							icon: 'square',
-							left: left1,
-							align: 'left',
-							top: '23%',
-							itemGap: 20,
-							// bottom:'50%',
-							textStyle: {
-								fontSize: 14,
-								color: 'rgb(48, 49, 51)'
-							},
-							data: legendData1
-						}
-					],
-					color: colors,
-					grid: {
-						x: 25,
-						y: 45,
-						x2: 5,
-						y2: 20,
-						borderWidth: 1
-					},
-					toolbox: {
-						show: true,
-						feature: {
-							mark: { show: true },
-							magicType: {
-								show: true,
-								type: ['pie', 'funnel']
-							}
-						}
-					},
-					series: [
-						{
-							name: '',
-							type: 'pie',
-							radius: [20, 110],
-							center: [leftBT, '50%'],
-							roseType: 'radius',
-							label: {
-								show: false
-							},
-							emphasis: {
-								label: {
-									show: false
-								}
-							},
-							data: dadalist
-						}
-					]
-				};
-				myChart.setOption(option);
-			}
-		},
-
-		//月度积分
-		monthlyIntegralRanking(date, total, reward, deduction) {
-			const chart = this.$refs.monthlyIntegralChart;
-			if (chart) {
-				const myChart = this.$echarts.init(chart);
-				const option = {
-					tooltip: {
-						trigger: 'axis'
-					},
-					color: ['#F56C6C', '#26A2FF', '#FFC100'],
-					legend: {
-						right: '0%',
-						data: ['总积分', '奖分', '扣分']
-					},
-					grid: {
-						left: '3%',
-						right: '4%',
-						bottom: '3%',
-						containLabel: true
-					},
-					toolbox: {
-						feature: {}
-					},
-					xAxis: {
-						type: 'category',
-						boundaryGap: false,
-						data: date
-					},
-					yAxis: {
-						type: 'value',
-						axisLine: {
-							show: false
-						},
-						axisTick: {
-							show: false
-						}
-					},
-					series: [
-						{
-							name: '总积分',
-							type: 'line',
-							data: total
-						},
-						{
-							name: '奖分',
-							type: 'line',
-							data: reward
-						},
-						{
-							name: '扣分',
-							type: 'line',
-							data: deduction
-						}
-					]
-				};
-				myChart.setOption(option);
-			}
-		},
-		//月度积分
-		monthlyIntegralchange(val) {
-			if (val.length == 0) {
-				this.exclusiveMonthBranch = 0;
-			} else {
-				let valItem = 0;
-				for (let i in val) {
-					valItem = val[i];
-				}
-				this.exclusiveMonthBranch = valItem;
-			}
-			this.monthlyIntegral();
-			this.$nextTick(() => {
-				this.$refs.dept2.dropDownVisible = false;
-			});
-		},
-		monthlyIntegral() {
-			this.monthlyIntegralloading = true;
-			let params = {};
-			let listslength = [];
-			if (this.employeeRout) {
-				params.employee_id = this.$getUserData().id;
-			} else {
-				params.dept_id = this.exclusiveMonthBranch;
-			}
-			params.month = this.$moment().format('YYYY-MM');
-			if (this.exclusiveMonthChecked) {
-				params.include_fixed = 1;
-			} else {
-				params.include_fixed = 0;
-			}
-			this.$axios('get', '/api/integral/statistics/curve', params)
-				.then(res => {
-					if (res.data.code == 1) {
-						let lists = res.data.data;
-						listslength = lists;
-						this.monthlyIntegralList[0].total_point = lists.total_point;
-						this.monthlyIntegralList[1].reward_point = lists.reward_point;
-						this.monthlyIntegralList[2].deduction_point = lists.deduction_point;
-						this.monthlyIntegralList[3].ratio = lists.ratio;
-						this.monthlyIntegralList[4].toRatio = lists.contrast_total;
-						this.monthlyIntegralList[5].toRatio = lists.contrast_reward;
-						this.monthlyIntegralList[6].toRatio = lists.contrast_deduction;
-						let dates = []; //日期
-						let totals = []; //总积分
-						let rewards = []; //奖分
-						let deductions = []; //扣分
-						for (let i in lists.total) {
-							dates.push(lists.total[i].date);
-							totals.push(lists.total[i].point);
-						}
-						for (let i in lists.reward) {
-							rewards.push(lists.reward[i].point);
-						}
-						for (let i in lists.deduction) {
-							deductions.push(lists.deduction[i].point);
-						}
-						this.monthlyIntegralRanking(dates, totals, rewards, deductions);
-					}
-				})
-				.finally(() => {
-					if (listslength.total.length == 0) {
-						this.monthlyIntegralnone = true;
-					} else {
-						this.monthlyIntegralnone = false;
-					}
-					this.monthlyIntegralloading = false;
-				});
-		},
-
-		//管理者奖扣统计
-		ManagerSAwardCharts(Name, Award, Deduct) {
-			//管理着奖扣统计表
-			const chart = this.$refs.ManagerSAwardChart;
-			if (chart) {
-				const myChart = this.$echarts.init(chart);
-				const option = {
-					tooltip: {
-						trigger: 'axis',
-						axisPointer: {
-							// type: 'cross',
-							crossStyle: {
-								color: '#999'
-							}
-						}
-					},
-					grid: {
-						//表格偏移量
-						// top: '5% '
-						left: '5%',
-						right: '0%'
-					},
-					toolbox: {
-						feature: {
-							// dataView: {show: false, readOnly: true},
-							// magicType: {show: false, type: ['line', 'bar']},
-							// restore: {show: false},
-							// saveAsImage: {show: false}
-						}
-					},
-					color: ['#26A2FF', '#FFC100'],
-					legend: {
-						right: '0%', //设置位置
-						data: ['奖分', '扣分']
-					},
-					xAxis: [
-						{
-							type: 'category',
-							data: Name,
-							axisPointer: {
-								type: 'shadow'
-							},
-							axisLabel: {
-								interval: 0 //横轴信息全部显示
-								// rotate:-30,//-30度角倾斜显示
-							},
-							axisLine: {
-								//去掉X轴线
-								show: false
-							},
-							axisTick: {
-								//去掉X轴刻度
-								show: false
-							}
-						}
-					],
-					yAxis: [
-						{
-							type: 'value',
-							axisLabel: {
-								formatter: '{value}'
-							},
-							axisLine: {
-								//去掉Y轴线
-								show: false
-							},
-							axisTick: {
-								//去掉Y轴刻度
-								show: false
-							}
-						}
-					],
-					series: [
-						{
-							name: '奖分',
-							type: 'bar',
-							barWidth: 14, //柱图宽度
-							barGap: '0%', //柱图间距
-							data: Award
-						},
-						{
-							name: '扣分',
-							type: 'bar',
-							barWidth: 14, //柱图宽度
-							barGap: '0%', //柱图间距
-							data: Deduct
-						}
-					]
-				};
-				myChart.setOption(option);
-			}
-		},
-		ManagerSAwardlchange(val) {
-			//选中规则
-			let valItem = 0;
-			for (let i in val) {
-				valItem = val[i];
-			}
-			this.ManagerSAward(valItem);
-			this.$nextTick(() => {
-				this.$refs.dept3.dropDownVisible = false;
-			});
-		},
-		ManagerSAward(item) {
-			//管理者奖扣请求
-			this.ManagerSAwardloading = true;
-			let params = {};
-			let listslength = [];
-			if (item) {
-				(params.dept_id = item), (params.month = this.$moment().format('YYYY-MM'));
-			} else {
-				(params.dept_id = 0), (params.month = this.$moment().format('YYYY-MM'));
-			}
-			this.$axios('get', '/api/integral/statistics/task/pie', params, 'v2')
-				.then(res => {
-					let datas = res.data.data;
-					listslength = datas.list;
-					let histogramName = [];
-					let histogramAward = [];
-					let histogramDeduct = [];
-					for (let i in datas.list) {
-						histogramName.push(datas.list[i].name);
-						histogramAward.push(datas.list[i].reward_point);
-						histogramDeduct.push(datas.list[i].deduction_point);
-					}
-					this.ManagerSAwardlList[0].val = datas.reward_point;
-					this.ManagerSAwardlList[1].val = datas.deduction_point;
-					this.ManagerSAwardlList[2].val = datas.ratio;
-					this.ManagerSAwardlList[3].val = datas.exec_count;
-					this.ManagerSAwardlList[4].val = datas.manager_count;
-					this.ManagerSAwardlList[5].val = datas.pass_count;
-					this.ManagerSAwardlList[6].val = datas.fail_count;
-					this.ManagerSAwardCharts(histogramName, histogramAward, histogramDeduct);
-				})
-				.finally(() => {
-					if (listslength.length == 0) {
-						this.ManagerSAwardnone = true;
-					} else {
-						this.ManagerSAwardnone = false;
-					}
-					this.ManagerSAwardloading = false;
-				});
-		},
-
-		//奖扣分最高积分事件
-		highestPrizeBuckle() {
-			this.highestPrizeBuckleloading = true;
-			let params = {
-				time_type: '1',
-				pt_id: '3',
-				page: '1',
-				page_size: '1'
-			};
-			this.$axios('get', '/api/integral/statistics/prize/buckle/ranking', params)
-				.then(res => {
-					if (res.data.code == 1) {
-						if (res.data.data.prize.length != 0) {
-							this.prize = res.data.data.prize[0];
-						} else {
-							this.prize = [];
-						}
-						if (res.data.data.buckle.length != 0) {
-							this.buckle = res.data.data.buckle[0];
-						} else {
-							this.buckle = [];
-						}
-					}
-				})
-				.finally(() => {
-					this.highestPrizeBuckleloading = false;
-				});
-		},
-
-		//获取部门
-		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++) {
-				if (data[i]._child.length < 1) {
-					// children若为空数组,则将children设为undefined
-					data[i]._child = undefined;
-				} else {
-					// children若不为空数组,则继续 递归调用 本方法
-					this.getTreeData(data[i]._child);
-				}
-			}
-			return data;
-		}
-	},
-	beforeDestroy() {
-		//离开路由
-		window.removeEventListener('resize', this.selfAdaption); //取消echarts自适应
-	}
-};
-</script>
-
-<style scoped="scoped" lang="scss">
-.zb:hover{
-	color: #089fff;
-}	
-.ts {
-	height: 64px;
-	padding: 8px 16px;
-	font-size: 14px;
-	color: #089fff;
-	background: #e6f3ff;
-	font-weight: 500;
-	box-sizing: border-box;
-	margin-bottom: 10px;
-}
-.ts img {
-	width: 24px;
-	height: 24px;
-}
-.ts .flex-1 {
-	padding: 0 8px;
-}
-.ts .btn {
-	width: 94px;
-	height: 28px;
-	background-color: #089fff;
-	line-height: 28px;
-	font-size: 14px;
-	color: #fff;
-	border-radius: 3px;
-	cursor: pointer;
-	text-align: center;
-}
-
-.updateNotice ::v-deep .el-dialog {
-	border-radius: 10px;
-	.el-dialog__header {
-		padding: 13px 20px;
-		text-align: center;
-		background-color: #3193fc;
-		border-radius: 8px 8px 0 0;
-		.el-dialog__title {
-			font-size: 16px;
-			color: #fff;
-		}
-		.el-icon-close {
-			color: #fff;
-		}
-	}
-	.el-dialog__body {
-		padding: 20px 20px 30px 20px;
-	}
-	.el-dialog__footer {
-		.dialog-footer {
-			.is-round {
-				padding: 10px 19px;
-				border-radius: 15px;
-			}
-		}
-	}
-}
-
-.refresh {
-	margin-top: 100px;
-	width: 100px;
-}
-.noData {
-	text-align: center;
-	position: fixed;
-	left: 0;
-	top: 0;
-	right: 0;
-	bottom: 0;
-}
-.data-all {
-	margin-bottom: 10%;
-	color: #595959;
-}
-// .left-all-style{
-// 	background: #fff;
-// 	border-radius: 5px;
-//     margin: 20px 0 20px 0;
-// 	.title{
-// 		padding-left: 10px;
-// 		font-size: 16px;
-// 		font-weight: normal;
-// 		border-left: 2px solid #409EFF;
-// 	}
-// }
-.left-all-style {
-	margin-top: 10px;
-	padding: 20px;
-	background: #fff;
-	border-radius: 5px;
-	.title {
-		padding-left: 10px;
-		font-size: 16px;
-		font-weight: normal;
-		border-left: 2px solid #409eff;
-	}
-	.titledes {
-		display: block;
-		padding-top: 10px;
-		font-size: 14px;
-		color: #909399;
-	}
-	.noremind {
-		display: block;
-		text-align: right;
-		font-size: 12px;
-		color: #909399;
-		cursor: pointer;
-	}
-	.noremind:hover {
-		color: #409eff;
-	}
-	.noremind:active {
-		color: #409eff;
-	}
-}
-.right-all-style {
-	background: #fff;
-	border-radius: 5px;
-	margin: 0 0 10px 10px;
-	.title {
-		padding-left: 10px;
-		font-size: 16px;
-		font-weight: normal;
-		border-left: 2px solid #409eff;
-	}
-}
-
-.home-left-header {
-	background: #fff;
-	border-radius: 5px;
-	// border:1px #e1e4e7 solid;
-	// box-shadow: 0 2px 4px rgba(140,140,140,0.1);
-	.hlheader-user {
-		border-right: 1px #cecccc solid;
-		margin: 34px 0;
-	}
-	.hlheader-user-info .greetings div {
-		max-width: 95px;
-		display: inline-block;
-		overflow: hidden;
-		white-space: nowrap;
-		text-overflow: ellipsis;
-		vertical-align: top;
-	}
-	.hlheader-user-info {
-		display: flex;
-		.headimg {
-			margin: 0 auto;
-		}
-		.headtext {
-			margin: 0 auto;
-		}
-		.greetings {
-			margin: 0 auto;
-			font-size: 16px;
-			font-weight: bold;
-			// div {
-			//   max-width: 95px;
-			//   display: inline-block;
-			//   overflow: hidden;
-			//   white-space: nowrap;
-			//   text-overflow: ellipsis;
-			//   vertical-align: top;
-			// }
-			span {
-				font-size: 14px;
-				color: #666;
-				display: inline-block;
-				vertical-align: top;
-				padding-left: 5px;
-			}
-			p span {
-				line-height: 30px;
-				font-size: 14px;
-				color: #666;
-				display: inline-block;
-				vertical-align: top;
-			}
-		}
-	}
-}
-
-.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('./assets/image/nodata_default.png') no-repeat center;
-		background-size: 99%;
-	}
-	.noperson {
-		display: inline-block;
-		width: 110px;
-		height: 110px;
-		margin: 22px auto 16px;
-		background: url('./assets/image/noperson_default.png') no-repeat center;
-		background-size: 99%;
-	}
-	.title1 {
-		display: block;
-		text-align: center;
-		font-size: 12px !important;
-		color: #909399 !important;
-		padding: 0;
-	}
-	a {
-		color: #26a2ff;
-	}
-}
-.ManagerSAwardlStyle {
-	text-align: center;
-	display: block;
-	cursor: pointer;
-	b {
-		color: #303133;
-		font-size: 18px;
-		transition: all 0.5s;
-	}
-	span {
-		color: rgb(48, 49, 51);
-		font-size: 14px;
-		margin-top: 5px;
-		display: block;
-	}
-}
-.ManagerSAwardlStyle:hover .ManagerSAwardlStyleB {
-	color: #4eb2ff;
-}
-
-::v-deep .el-radio-button__inner {
-	border: 0px solid #dcdfe6;
-	border-radius: 5px;
-	padding: 0px 18px;
-	height: 36px;
-	line-height: 38px;
-}
-::v-deep .el-radio-button--medium .el-radio-button__inner {
-	padding: 7px 13px;
-}
-.el-radio-button:first-child ::v-deep .el-radio-button__inner {
-	border: 0px solid #dcdfe6;
-	border-radius: 5px;
-}
-.el-radio-button:last-child ::v-deep .el-radio-button__inner {
-	border-radius: 5px;
-}
-
-.rightexamineAndApproveList {
-	text-align: left;
-	width: 100%;
-	// border-bottom:1px solid #EFEFEF;
-}
-.rightexamineAndApproveList2 {
-	text-align: left;
-	width: 100%;
-	border-bottom: 1px solid #efefef;
-}
-.inCommonUseStyle {
-	width: 95%;
-	height: 54px;
-	border: 1px solid #c0c4cc;
-	display: block;
-	margin: 16px 0 0 10px;
-	display: flex;
-	line-height: 54px;
-	border-radius: 5px;
-	cursor: pointer;
-	transition: all 0.5s;
-}
-.inCommonUseStyle b {
-	transition: all 0.5s;
-	color: #303133;
-	font-size: 14px;
-}
-.inCommonUseStyle:hover {
-	background-color: #fcfcfc;
-	border: 1px solid #409eff;
-}
-.inCommonUseStyle:hover b {
-	color: #409eff;
-}
-.announs {
-	padding: 0 0 10px 0;
-	border: 1px solid rgb(236, 236, 236);
-	border-radius: 10px;
-	overflow: hidden;
-	cursor: default;
-	// min-height: calc(60vh - 160px);
-	margin: 10px 0 0 0;
-}
-::v-deep .announDetails {
-	// max-height: 410px;
-	// overflow-y: auto;
-	// *{
-	// 	color: #8c8c8c !important;
-	// }
-	// img{
-	// 	width: 100% !important;
-	// }
-}
-.announDetails {
-	max-height: 410px;
-	overflow-y: auto;
-}
-.announDetails::-webkit-scrollbar {
-	width: 9px;
-	height: 9px;
-}
-.announDetails::-webkit-scrollbar-track {
-	width: 6px;
-	background-color: #fff0;
-	-webkit-border-radius: 2em;
-	-moz-border-radius: 2em;
-	border-radius: 2em;
-}
-.announDetails::-webkit-scrollbar-thumb {
-	background-color: #fff0;
-	background-clip: padding-box;
-	min-height: 28px;
-	-webkit-border-radius: 2em;
-	-moz-border-radius: 2em;
-	border-radius: 2em;
-}
-.announDetails:hover::-webkit-scrollbar-thumb {
-	overflow-x: none;
-	background-color: rgba(144, 147, 153, 0.3);
-}
-.announcementc {
-	display: block;
-	text-align: right;
-	font-size: 13px;
-	color: #909399;
-	cursor: pointer;
-}
-.announcementc:hover {
-	color: #409eff;
-}
-.announcementc:active {
-	color: #409eff;
-}
-</style>

+ 5 - 2
src/icons/index.js

@@ -1,9 +1,12 @@
 import Vue from 'vue'
 import SvgIcon from '@/components/SvgIcon'// svg组件
+import generateIconsView from '@/icons/svg-icons/generateIconsView.js'// just for @/views/icons , you can delete it
 
 // register globally
 Vue.component('svg-icon', SvgIcon)
 
-const req = require.context('./svg', false, /\.svg$/)
 const requireAll = requireContext => requireContext.keys().map(requireContext)
-requireAll(req)
+const req = require.context('./svg', false, /\.svg$/)
+const iconMap = requireAll(req)
+
+generateIconsView.generate(iconMap) // just for @/views/icons , you can delete it

+ 10 - 0
src/icons/svg-icons/generateIconsView.js

@@ -0,0 +1,10 @@
+const data = {
+  state: {
+    iconsMap: []
+  },
+  generate(iconsMap) {
+    this.state.iconsMap = iconsMap
+  }
+}
+
+export default data

+ 77 - 0
src/icons/svg-icons/index.vue

@@ -0,0 +1,77 @@
+<template>
+  <div class="icons-container">
+    <p class="warn-content">
+      <a href="https://panjiachen.github.io/vue-element-admin-site/guide/advanced/icon.html" target="_blank">Add and use
+      </a>
+    </p>
+    <div class="icons-wrapper">
+      <div v-for="item of iconsMap" :key="item" @click="handleClipboard(generateIconCode(item),$event)">
+        <el-tooltip placement="top">
+          <div slot="content">
+            {{generateIconCode(item)}}
+          </div>
+          <div class="icon-item">
+            <svg-icon class-name="disabled" :icon-class="item" />
+            <span>{{item}}</span>
+          </div>
+        </el-tooltip>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import icons from './generateIconsView'
+import clipboard from '@/api/clipboard.js'
+
+export default {
+  name: 'icons',
+  data() {
+    return {
+      iconsMap: []
+    }
+  },
+  mounted() {
+    const iconsMap = icons.state.iconsMap.map((i) => {
+      return i.default.id.split('-')[1]
+    })
+    this.iconsMap = iconsMap
+  },
+  methods: {
+    generateIconCode(symbol) {
+      return `<svg-icon icon-class="${symbol}" />`
+    },
+    handleClipboard(text, event) {
+      clipboard(text, event)
+    }
+  }
+}
+</script>
+
+<style rel="stylesheet/scss" lang="scss" scoped>
+.icons-container {
+  margin: 10px 20px 0;
+  overflow: hidden;
+  .icons-wrapper {
+    margin: 0 auto;
+  }
+  .icon-item {
+    margin: 20px;
+    height: 110px;
+    text-align: center;
+    width: 110px;
+    float: left;
+    font-size: 30px;
+    color: #24292e;
+    cursor: pointer;
+  }
+  span {
+    display: block;
+    font-size: 24px;
+    margin-top: 10px;
+  }
+  .disabled{
+    pointer-events: none;
+  }
+}
+</style>

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików