347617796@qq.com 2 年之前
父節點
當前提交
3cdd302b47

+ 1 - 1
src/api/auth.js

@@ -21,7 +21,7 @@ import Vue from 'vue'
 7   考核管理 发起考核
 8   考核管理 开始评分
 9   考核管理 调整结果
-10  考核管理 调整等级
+10  考核管理 等级配置
 11  考核管理 导出报表
 12  指标库管理
 13  指定考核表管理

+ 2 - 1
src/api/axios.js

@@ -58,8 +58,9 @@ service.interceptors.response.use(
 				Router.push({
 				  path: '/noAccess'
 				})
-				// return Promise.reject(response.data.msg)
 			}
+		}else if(response.data.code === 4000||response.data.code === 4001){ //4000 ,4001 企业信息未同步
+			return response
 		}else{
 			Message({
 				message: response.data.msg,

二進制
src/assets/image/bj.jpg


二進制
src/assets/image/nav_jx_1.jpg


二進制
src/assets/image/nav_jx_1.png


二進制
src/assets/image/nav_jx_2.jpg


二進制
src/assets/image/nav_jx_2.png


二進制
src/assets/image/nav_jx_3.jpg


二進制
src/assets/image/nav_jx_3.png


二進制
src/assets/image/nav_jx_4.jpg


二進制
src/assets/image/nav_jx_4.png


二進制
src/assets/image/yd1-2.png


二進制
src/assets/image/yd1.png


二進制
src/assets/image/yd2.png


二進制
src/assets/image/yd3-1.png


二進制
src/assets/image/yd3.png


二進制
src/assets/image/yd4.png


二進制
src/assets/image/yd5.png


二進制
src/assets/image/yd6.png


+ 3 - 1
src/components/set/JurisdictionSet.vue

@@ -189,7 +189,7 @@ export default {
             { label: '发起考核', id: '7', check: true },
             { label: '开始评分', id: '8', check: true },
             { label: '调整结果', id: '9', check: true },
-            // { label: '调整等级', id: '10', check: true },
+            { label: '等级配置', id: '10', check: true },
             { label: '导出报表', id: '11', check: true },
 			{ label: '批量转交', id: '17', check: true },
 			{ label: '批量修改目标值', id: '18', check: true },
@@ -479,6 +479,8 @@ export default {
         }
       }
       parameter.permission = [...new Set(permission)].toString();
+	  // console.log(parameter)
+	  // return false;
       this.$axios('post', '/api/per/user/add_sub_manager', parameter).then(res => {
         this.$message.success('添加成功');
         this.getList();

+ 285 - 103
src/index.vue

@@ -6,16 +6,16 @@
 				<div>功道云绩效</div>
 			</div>
 			<div class="flex-1 flex-box-ce" style="padding: 0 20px;">
-				<div class="flex-1">{{userInfo.site.name}}</div>
-				<div class="flex-box-ce megData" style="cursor: pointer;">
-				  <div>{{userInfo.site.user_count_max}}用户</div>
-				  <div >剩余{{returnT(userInfo.site.expire_time)}}天</div>
+				<div class="flex-1">{{ userInfo.site.name }}</div>
+				<div class="flex-box-ce megData" style="cursor: pointer;" @click="isTz = true">
+					<div>{{ userInfo.site.user_count_max }}用户</div>
+					<div>剩余{{ returnT(userInfo.site.expire_time) }}天</div>
 				</div>
-				<el-button size="small" @click="isTz = true" class="upgrade" type="primary" icon="el-icon-upload">续费升级</el-button>
+<!-- 				<el-button size="small" @click="isTz = true" class="upgrade" type="primary" icon="el-icon-upload">续费升级</el-button>
 				<div class="flex-box flex-center-center PCtutorials" v-if="getRole" @click="strategys">
 					<svg-icon icon-class="PCtutorial" style="margin-right: 10px;position: relative;top: 0px;font-size: 18px;" />
 					<span>新手引导</span>
-				</div>
+				</div> -->
 				<div style="margin-left: 20px;border: 2px solid #fff;border-radius: 50%;width: 44px;height: 44px;">
 					<userImage :user_name="userInfo.name" :img_url="userInfo.img_url" width="44px" height="44px"></userImage>
 				</div>
@@ -29,7 +29,6 @@
 						<el-menu-item :index="returnIndex(index, index)" :route="item.path" :ref="item.path" :key="index">
 							<div class="flex-box-ce">
 								<i :class="item.icon" class="iconfont"></i>
-								<!-- <svg-icon :icon-class="item.icon" class="svgIcon"></svg-icon> -->
 								<span slot="title" style="margin-left: 5px;">{{ item.label }}</span>
 							</div>
 						</el-menu-item>
@@ -37,56 +36,96 @@
 				</el-menu>
 			</el-aside>
 			<el-main>
-				<keep-alive :include="keepAliveView"><router-view /></keep-alive>
+				<keep-alive :include="keepAliveView"><router-view :key="$route.query.t" /></keep-alive>
 				<div class="fontColorF" style="text-align: center;margin: 10px 0;">Copyright © 2022 广东功道云数字科技有限公司 All Rights Reserved</div>
 			</el-main>
 		</el-container>
 		<!-- 续费升级 -->
-		<el-dialog class="续费升级" :visible.sync="isTz" width="400px">
+		<el-dialog title="续费升级" :visible.sync="isTz" width="400px">
 			<div style="border-radius: 15px;border: 1px solid #f1f1f1;padding: 10px; width: 276px;box-sizing: border-box;margin: 0 auto;">
-				<img src="@/assets/image/code.png"/>
+				<img src="@/assets/image/code.png" />
 			</div>
 			<div class="fontColorF" style="text-align: center;margin-top: 15px;font-size: 18px;">手机钉钉扫码,付费升级</div>
 		</el-dialog>
-		<el-dialog :visible.sync="usingTheStrategy" width="680px" :before-close="navDialog" :close-on-click-modal="false">
-			<div>
-				<img style="width: 100%;" :src="navList[navNew].image" alt="" />
-				<div class="flex-box flex-d-center">
-					<el-button @click="navPath(navList[navNew].paths)" type="primary" plain>{{ navList[navNew].name }}</el-button>
-					<div>
-						<el-button v-if="navNew > 0" @click="navNew--">上一页</el-button>
-						<el-button v-if="navNew < 3" @click="navNew++" type="primary">下一页</el-button>
-						<el-button v-if="navNew == 3" type="primary" @click="usingTheStrategy = false">开始使用</el-button>
+
+		<div class="ydBox" v-if="showYd">
+			<div class="close" @click="showYd=false" style="position: absolute;right: 20px;top: 10px;cursor: pointer;z-index: 99999;"><i class="el-icon-error" style="font-size:30px;"></i></div>
+			<div class="center" style="padding: 20px 0;">
+				<div v-for="(item,index) in tabs" :key="index" class="flex-box">
+					<div class="flex-box-ce" :class="index==tabIndex? 'active':''" style="margin-bottom: 14px;font-size: 18px;">
+						<span class="dian"></span>
+						<div class="tabItem" @click="tabActive(index)">{{index+1}}-{{item.name}}</div>
+					</div>
+					<div v-if="index==tabIndex" class="flex-box-ce imgBox">
+						<template v-if="item.image.length>1">
+							<div style="position: relative;" v-for="(e,index2) in item.image" :key="index2">
+								<img style="margin: 0 10px;width: 440px;border-radius: 5px;margin-top: 6px;" :src="e"/>
+								<el-button v-if="masterAdministrator&&item.urls.length>0"  class="pBtn" type="primary" size="mini" @click="openHome(item.urls[index2].url)">{{item.urls[index2].name}}</el-button>
+							</div>
+						</template>
+						<template v-else>
+							<div style="position: relative;">
+								<img style="margin: 0 10px;border-radius: 5px;width: 980px;margin-top: 8px;position: relative;" :src="item.image[0]" alt=""/>
+								<template v-if="masterAdministrator">
+									<template v-if="index==1">
+										<el-button type="primary" style="position: absolute;left: 136px;bottom: 30px;" size="mini" @click="openHome(item.urls[0].url)">{{item.urls[0].name}}</el-button>
+										<el-button type="primary" style="position: absolute;right: 260px;bottom: 30px;" size="mini" @click="openHome(item.urls[1].url)">{{item.urls[1].name}}</el-button>
+									</template>
+									<template v-if="index==5">
+										<el-button type="primary" style="position: absolute;left: 50%;bottom: 20px;margin-left: -40px;" size="mini" @click="openHome(item.urls[0].url)">{{item.urls[0].name}}</el-button>
+									</template>
+								</template>
+							</div>
+						</template>
 					</div>
 				</div>
 			</div>
-		</el-dialog>
+		</div>
+		<!-- 悬挂导航 -->
+		<aside class="navigation">
+		  <ul class="navigationBox">
+		    <li v-for="(item,index) in navigationList" :key="index" @click="activeNavigation(item.code)" class="navigationItem">
+				<el-tooltip class="item" effect="dark" :content="item.name" placement="left">
+					<i :class="item.icon"></i>
+				</el-tooltip>
+		    </li>
+		  </ul>
+		</aside>
 	</el-container>
 </template>
 
 <script>
 import { mapGetters, mapState } from 'vuex';
+import openLink from 'dingtalk-jsapi/api/biz/util/openLink';
 export default {
 	name: 'index',
 	data() {
 		return {
-			usingTheStrategy: false,
 			tutorialsvisible: false,
-			navList: [
-				{ name: '去"新建考核表"', image: require('@/assets/image/nav_jx_1.jpg'), paths: 'evaluate' },
-				{ name: '去"发起考核"', image: require('@/assets/image/nav_jx_2.jpg'), paths: 'sponsorAssess' },
-				{ name: '看"考核管理"', image: require('@/assets/image/nav_jx_3.jpg'), paths: 'assessManagement' },
-				{ name: '看"绩效报表"', image: require('@/assets/image/nav_jx_4.jpg'), paths: 'statement' }
-			],
-			navNew: 0,
-			isTz:false,
+			isTz: false,
 			activeIndex: '0-0',
 			routers: [],
 			userInfo: this.$getUserData(),
 			url: '',
 			getRole: this.$getRole(1),
 			keepAliveView: ['home', 'management', 'score', 'assessManagement', 'assessDetails', 'statement', 'set'], //需要缓存的组件名称列表,用逗号分隔
-			keepAliveView2: ['home', 'management', 'score', 'assessManagement', 'assessDetails', 'statement', 'set'], //需要缓存的组件名称列表,用逗号分隔
+			keepAliveView2: ['home', 'management', 'score', 'assessManagement', 'assessDetails', 'statement', 'set'] ,//需要缓存的组件名称列表,用逗号分隔
+			tabs:[
+				{name:'授权人员权限',image:[require('@/assets/image/yd1.png'),require('@/assets/image/yd1-2.png')],urls:[{name:'去授权',url:'/userSet'},{name:'去设置',url:'/userSet?name=jurisdictionSet'}]},
+				{name:'考核表设置与发起',image:[require('@/assets/image/yd2.png')],urls:[{name:'去设置考核表',url:'/set'},{name:'去发起考核',url:'/sponsorAssess'}]},
+				{name:'执行计划与过程管理',image:[require('@/assets/image/yd3.png'),require('@/assets/image/yd3-1.png')],urls:[]},
+				{name:'收集结果数据',image:[require('@/assets/image/yd4.png')],urls:[]},
+				{name:'评分',image:[require('@/assets/image/yd5.png')],urls:[]},
+				{name:'看报表',image:[require('@/assets/image/yd6.png')],urls:[{name:'去看报表',url:'/statement'}]},
+			],
+			tabIndex:0,
+			masterAdministrator:false,//主管理员
+			showYd:false,
+			navigationList:[
+				// {name:'新手引导',icon:'el-icon-data-analysis',code:1},
+			    {name:'教程',icon:'el-icon-reading',code:2},
+			    {name:'客服',icon:'el-icon-service',code:3},
+			],
 		};
 	},
 	watch: {
@@ -103,7 +142,7 @@ export default {
 				this.returnArr('score');
 			} else if (to.name == 'assessManagement' && form.name == 'myPerformance') {
 				//考核管理
-				this.returnArr('assessManagement'); 
+				this.returnArr('assessManagement');
 			} else if (to.name == 'assessDetails' && form.name == 'assessManagement') {
 				//考核管理2
 				this.returnArr('assessDetails');
@@ -115,7 +154,7 @@ export default {
 				this.returnArr('statement');
 			} else if (to.name == 'assessDetails' && form.name == 'statement') {
 				//绩效报表进入考核管理
-				this.returnArr('assessDetails');	
+				this.returnArr('assessDetails');
 			} else if (to.name == 'set' && form.name == 'statement') {
 				//设置
 				this.returnArr('set');
@@ -139,35 +178,50 @@ export default {
 			if (this.$getCache('activeIndex')) {
 				this.activeIndex = this.$getCache('activeIndex');
 			}
-			if (!this.$getCache('newNav') && this.getRole) {
-				this.usingTheStrategy = true;
-				this.$setCache('newNav', true);
-			}
 			this.DDconfig();
 		});
 	},
 	methods: {
-		returnT(date){
-			var timestamp = parseInt(new Date().getTime()/1000);
-			return parseInt((date-timestamp)/86400)
+		activeNavigation(code){
+			if(code==1){
+				this.showYd = true;
+			}else if(code==2){
+				window.open('https://www.yuque.com/docs/share/d3459ec7-5c62-4ae5-b0dc-a3ff2770d462?#', '_blank');
+			}else{
+				let url=`https://page.dingtalk.com/wow/dingtalk/act/serviceconversation?wh_biz=tm&showmenu=false&goodsCode=DT_GOODS_881649645924368&corpId=${this.$getCache('corpId')}&token=b26816672b9a5f26022afcc5f1926d93`
+				this.$dd.biz.util.openSlidePanel({
+				    url:url,//页面名称
+				    title: '客服群',
+				    onSuccess : function() {
+				        /**/
+				    },
+				    onFail : function(err) {}
+				});
+			}
+		},
+		tabActive(index){
+			this.tabIndex=index;
+		},
+		returnT(date) {
+			var timestamp = parseInt(new Date().getTime() / 1000);
+			return parseInt((date - timestamp) / 86400);
 		},
-		DDconfig(){
-			console.log("开始鉴权")
-			let str=location.href
-			str=str.split('#')[0]
-			var that =this;//为解决this作用域问题,将其在函数内赋值给that变量
-			this.$axios('get','api/ding/jsapi/ticket',{
-				url:str
-			}).then((res) => {
-				let data=res.data.data
+		DDconfig() {
+			console.log('开始鉴权');
+			let str = location.href;
+			str = str.split('#')[0];
+			this.$axios('get', 'api/ding/jsapi/ticket', {
+				url: str
+			}).then(res => {
+				let data = res.data.data;
 				//1、鉴权
 				this.$dd.config({
-					agentId:data.agentId,
+					agentId: data.agentId,
 					corpId: data.corpId, //必填,企业ID
 					timeStamp: data.timeStamp, // 必填,生成签名的时间戳
 					nonceStr: data.nonceStr, // 必填,生成签名的随机串
 					signature: data.signature, // 必填,签名
-					jsApiList : [
+					jsApiList: [
 						'biz.cspace.preview',
 						'biz.util.uploadAttachment',
 						'runtime.info',
@@ -177,39 +231,40 @@ export default {
 						'device.notification.alert',
 						'device.notification.prompt',
 						'biz.ding.post',
-						'biz.util.openLink',
+						'biz.util.openLink'
 					] // 必填,需要使用的jsapi列表,注意:不要带dd。
 				});
-				
-				if(this.$getCache('url')){
-						let url=this.$getCache('url')
-						this.$removeCache('url')
-						console.log(decodeURIComponent(url))
-						if(decodeURIComponent(url)=='/'){
-							return false
-						}
-						setTimeout(() => {
-							this.$router.push({ path: '/' + decodeURIComponent(url) });
-						}, 200);
+
+				if (this.$getCache('url')) {
+					let url = this.$getCache('url');
+					this.$removeCache('url');
+					console.log(decodeURIComponent(url));
+					if (decodeURIComponent(url) == '/') {
+						return false;
+					}
+					setTimeout(() => {
+						this.$router.push({ path: '/' + decodeURIComponent(url) });
+					}, 200);
 				}
-				this.$dd.error(function(err) { //验证失败  
+				this.$dd.error(function(err) {
+					//验证失败
 					console.log('dd error: ' + JSON.stringify(err));
-				})
-			})	
+				});
+			});
 		},
 		getEmployeeList() {
 			// 部门列表
 			this.$axios('get', '/api/per/user/department').then(res => {
 				var list = res.data.data.dept_tree;
-				this.$setDeptTree(res.data.data)
+				this.$setDeptTree(res.data.data);
 			});
 			//获取绩效人员列表(包含已被删除的人员)
-			this.$axios('get', '/api/per/user/employee_list',{page_size:0,page:0}).then(res => {
+			this.$axios('get', '/api/per/user/employee_list', { page_size: 0, page: 0 }).then(res => {
 				if (res.data.code == 1) {
 					var list = res.data.data.list;
 					const data = {};
 					for (const i in list) {
-						if (list[i].is_scope === 0||list[i].is_official ===0) {
+						if (list[i].is_scope === 0 || list[i].is_official === 0) {
 							list[i].name = list[i].name + '(未启用)';
 						}
 						data[list[i].id] = list[i];
@@ -221,6 +276,12 @@ export default {
 		login() {
 			this.setRouters();
 			this.getEmployeeList();
+			this.masterAdministrator = this.$authoritys('masterAdministrator');//是否主管理员
+			this.getRole=this.$getRole(1);
+			if (!this.$getCache('newNav') && this.getRole) {
+				this.showYd = true;
+				this.$setCache('newNav', true);
+			}
 		},
 		setRouters() {
 			// 刚进入来清除一些缓存
@@ -239,6 +300,11 @@ export default {
 				}
 			});
 			if (per_role == 'manager') {
+				this.navigationList=[
+					{name:'新手引导',icon:'el-icon-data-analysis',code:1},
+					{name:'教程',icon:'el-icon-reading',code:2},
+					{name:'客服',icon:'el-icon-service',code:3},
+				]
 				if (main == 1) {
 					//主管理员
 					this.setRole('masterAdministrator');
@@ -254,7 +320,7 @@ export default {
 				// 	this.setRole('creator');
 				// 	this.routers = this.getChildRouter(childrenRouter, 'creator');
 				// } else
-				 if (this.userInfo.manage_dept_list.length > 0) {
+				if (this.userInfo.manage_dept_list.length > 0) {
 					this.setRole('deptManager');
 					this.routers = this.getChildRouter(childrenRouter, 'deptManager');
 				} else {
@@ -262,6 +328,7 @@ export default {
 					this.routers = this.getChildRouter(childrenRouter, 'employee');
 				}
 			}
+			
 		},
 		setRole(str) {
 			this.$setCache('role', str);
@@ -319,48 +386,163 @@ export default {
 			this.$setCache('setUrlName', null); //清空set页面的保存展示页面
 			this.$setCache('activeIndex', indexPath[1] ? indexPath[1] : indexPath[0]);
 		},
-		navPath(paths) {
-			this.usingTheStrategy = false;
-			this.$router.push({ name: paths });
-		},
-		strategys() {
-			this.usingTheStrategy = true;
-			this.tutorialsvisible = false;
-		},
-		navDialog(done) {
-			done();
-			this.tutorialsvisible = true;
-		},
-		openHome() {
-			this.$router.push({ path: '/home' });
+		openHome(url) {
+			if(url){
+				if(url=='/userSet?name=jurisdictionSet'){
+					this.$router.push({ path: url,query:{ t: Date.now()} });
+				}else{
+					this.$router.push({ path: url });
+				}
+			}else{
+				this.$router.push({ path: '/home' });
+			}
 		}
 	}
 };
 </script>
 <style scoped="scoped" lang="scss">
-	.upgrade {
-		margin-left: 10px;
-		margin-right: 10px;
-	}
-.megData div:nth-child(1) {
-  background-image: linear-gradient(to bottom, #5e6e9b 0%, #232d48 100%);
+.navigation{
+  position: fixed;
+  right: 30px;
+  bottom: 100px;
+  z-index: 999;
+}
+.navigationBox{
+  font-size: 24px;
+  color: #222;
   text-align: center;
-  color: #e1bf66;
-  border-top-left-radius: 25px;
-  border-bottom-left-radius: 25px;
-  line-height: 35px;
-  height: 35px;
-  padding: 0 10px;
 }
-.megData div:nth-child(2) {
-  background-image: linear-gradient(to bottom, #ffeab2 0%, #e1bf66 100%);
+.navigationItem{
+  padding: 6px;
+  cursor: pointer;
+  border-radius: 50%;
+  width: 30px;
+  height: 30px;
+  line-height: 30px;
+  background-color: #fff;
+  border: 1px solid #ccc;
+  box-shadow: 0 0 3px #ccc;
+  margin-bottom: 8px;
+}
+.navigationItem:hover{
+  color: #005bea ;
+  border: 1px solid #005bea;
+}
+.svgIcon {
+  font-size: 20px;
+  color: #99a9bf;
+}
+.money {
+  line-height: 32px;
   text-align: center;
-  color: #232d48;
-  border-top-right-radius: 25px;
-  border-bottom-right-radius: 25px;
-  line-height: 35px;
-  height: 35px;
-  padding: 0 10px;
+  height: 32px;
+  color: #ff9600;
+  width: 88px;
+  background: #ffffff;
+  border: 1px solid #ff9600;
+  opacity: 1;
+  border-radius: 3px;
+  cursor: pointer;
+  margin-left: 20px;
+}
+.money2 {
+  line-height: 32px;
+  text-align: center;
+  height: 32px;
+  color: #238dfa;
+  width: 120px;
+  background: #ffffff;
+  border: 1px solid #238dfa;
+  opacity: 1;
+  border-radius: 3px;
+  cursor: pointer;
+  margin:0 20px;
+  padding-left: 10px;
+}	
+	
+	
+	
+.ydBox{
+	background-color: rgba(35, 141, 250, 0.3);
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	right: 0;
+	// height: 400px;
+	z-index: 9999;
+}
+.pBtn{
+	position: absolute;
+	bottom: 30px;
+	left: 50%;
+	margin-left: -30px;
+}
+.imgBox{
+	position: absolute;
+	left: 280px;
+	// width: 100%;
+	top: 14px;
+	right: 0;
+}
+.imgBox button{
+	font-size: 14px;
+	border-radius: 25px;
+}
+.dian{
+	width: 16px;
+	height: 16px;
+	background-color: #fff;
+	border-radius: 50%;
+}
+.center{
+	width: 1200px;
+	margin: 0 auto;
+	// background-color: #fff;
+	position: relative;
+}
+.tabItem{
+	color: #222;
+	background-color: #fff;
+	border-radius: 5px;
+	padding: 8px 10px;
+	cursor: pointer;
+	margin-left: 16px;
+	width: 200px;
+}
+.active .dian{;
+// background-image: linear-gradient(to top, #00c6fb 0%, #005bea 100%);
+	background-image: linear-gradient(to right, #00c6fb 0%, #005bea 100%);
+}
+.active .tabItem{
+	background-image: linear-gradient(to right, #00c6fb 0%, #005bea 100%);
+	color: #fff;
+}
+	
+	
+	
+.upgrade {
+	margin-left: 10px;
+	margin-right: 10px;
+}
+.megData div:nth-child(1) {
+	background-image: linear-gradient(to bottom, #5e6e9b 0%, #232d48 100%);
+	text-align: center;
+	color: #e1bf66;
+	border-top-left-radius: 25px;
+	border-bottom-left-radius: 25px;
+	line-height: 35px;
+	height: 35px;
+	padding: 0 10px;
+}
+.megData div:nth-child(2) {
+	background-image: linear-gradient(to bottom, #ffeab2 0%, #e1bf66 100%);
+	text-align: center;
+	color: #232d48;
+	border-top-right-radius: 25px;
+	border-bottom-right-radius: 25px;
+	line-height: 35px;
+	height: 35px;
+	padding: 0 10px;
 }
 .svgIcon {
 	font-size: 20px;

+ 28 - 5
src/init.vue

@@ -4,7 +4,12 @@
 			<div class="data-all">
 				<img src="@/assets/image/init.gif" class="appImg" />
 				<div>管理执行难,就用功道云</div>
-				<el-button class="refresh" type="primary" :loading="disabled" :disabled="disabled" v-if="isRefresh" @click="openLogin()">{{ text }}</el-button>
+				<div style="margin-top: 60px;" v-if="num==3">
+					<div style="text-align: center;margin-bottom: 10px;" class="fontColorB">当前企业信息未能成功同步,请联系人工客服为您开通应用</div>
+					<el-button  type="primary" :loading="disabled" :disabled="disabled"  @click="activeNavigation()">联系客服</el-button>
+				</div>
+				
+				<!-- <el-button class="refresh" type="primary" :loading="disabled" :disabled="disabled" v-if="isRefresh" @click="openLogin()">{{ text }}</el-button> -->
 			</div>
 		</div>
 		<el-dialog title="通知" :visible.sync="dialogFormVisible" width="480px" :show-close="false" :close-on-click-modal="false">
@@ -36,19 +41,19 @@ export default {
 			disabled: false,
 			showBtnCunt: 0,
 			dialogFormVisible:false,
-			dialogFormVisible2:false
+			dialogFormVisible2:false,
+			num:0,
 		};
 	},
 	mounted() {
 		this.$setCache('activeIndex',null);
 		var url = window.location.href;
-		var str = this.GetRequest(url).corpId || '123';
+		var str = this.GetRequest(url).corpId || 'ding49b5c3bf0b205896bc961a6cb783455b';
 		var corpId = str.split('#')[0];
 		this.corpId = corpId;
 		if (corpId) {
 			this.login(corpId);
 		}
-		// console.log(JSON.stringify(this.GetRequest(url)))
 		if(this.GetRequest(url).url){
 			this.$setCache("url",this.GetRequest(url).url)
 		}
@@ -65,6 +70,18 @@ export default {
 				}
 			})
 		},
+		
+		activeNavigation(){
+			let url=`https://page.dingtalk.com/wow/dingtalk/act/serviceconversation?wh_biz=tm&showmenu=false&goodsCode=DT_GOODS_881649645924368&corpId=${this.$getCache('corpId')}&token=b26816672b9a5f26022afcc5f1926d93`
+			this.$dd.biz.util.openSlidePanel({
+				url:url,//页面名称
+				title: '客服群',
+				onSuccess : function() {
+					/**/
+				},
+				onFail : function(err) {}
+			});
+		},
 		//重新登录
 		openLogin() {
 			var num = 10;
@@ -97,7 +114,7 @@ export default {
 				corpId: corpId, // 企业id
 				onSuccess: function(info) {
 					that.$axios('post', '/api/ding/login', { authCode: info.code, corpId: corpId }).then(res => {
-						var is = false;
+						// console.log(JSON.stringify(res.data))
 						if (res.data.code == 1) {
 							let user = res.data.data;
 							let timestamp = Date.parse(new Date()); //当前时间戳
@@ -118,6 +135,12 @@ export default {
 							}
 						}else if(res.data.code==2001){
 							that.dialogFormVisible=true;
+						}else if(res.data.code==4000||res.data.code==4001){
+							if (that.num == 3) { return false }
+							setTimeout(()=> {
+							  that.num++
+							  that.login(that.corpId);
+							}, 3000);
 						}
 					}).finally(() => {
 						that.loading = false;

+ 2 - 1
src/main.js

@@ -35,6 +35,7 @@ import {
 	returnCode
 } from './api/auth';
 Vue.prototype.$isAuthoritys = isAuthoritys
+Vue.prototype.$action = 'https://integralsys.oss-cn-shenzhen.aliyuncs.com'
 Vue.prototype.$getCycleType = getCycleType
 Vue.prototype.$getRole = getRole
 Vue.prototype.$getEmployeeList = getEmployeeList
@@ -70,7 +71,7 @@ Vue.component('BrawerBox', BrawerBox)
 Vue.use(ElementUI);
 
 if (process.env.NODE_ENV === 'development') {
-  // new VConsole()
+  new VConsole()
 }
 
 Vue.prototype.$moment = moment

+ 50 - 9
src/views/assessManagement/staffAssDet.vue

@@ -164,19 +164,28 @@
 						</el-table-column>
 					</template>
 
-					<el-table-column prop="target" label="目标值" align="left" min-width="150" v-if="getTableItem('target') || getTableItem('result')">
-						<template slot-scope="scope">
-							<div v-if="scope.row.target != '-' && scope.row.target != undefined && scope.row.target != '0'">
-								目标值:
-								<span>{{ scope.row.target + '' + scope.row.unit }}</span>
+					<el-table-column prop="target" label="目标值" align="left" min-width="150" v-if="getTableItem('target')">
+						  <template slot-scope="scope">
+							<div v-if="scope.row.target != '-' && scope.row.target != undefined&&scope.row.target!='0'">
+							  目标值:
+							 <span>{{ scope.row.target + '' + scope.row.unit }}</span>
 							</div>
 							<span v-else>-</span>
-							<div v-if="scope.row.result != '-' && scope.row.result != undefined" class="yellow">
-								结果值:
-								<span>{{ scope.row.result + '' + scope.row.unit }}</span>
+							<div v-if="scope.row.result !== null&&scope.row.result !== ''&&scope.row.result !== undefined" class="yellow">
+							  <template v-if="scope.row.type==1">
+								  结果值: <span>{{ scope.row.result + '' + scope.row.unit }}</span>
+							  </template>
+							  <template v-if="scope.row.result_file">
+<!-- 								<div v-if="scope.row.result_file.images.length>0">
+								  <div style="margin-bottom: 3px;cursor: pointer;" class="blue" v-for="(item, index) in scope.row.result_file.images" :key="index" @click="onFilePreView(item)">{{ item.name }}</div>
+								</div> -->
+								<div v-if="scope.row.result_file.append.length>0">
+								  <div style="margin-bottom: 3px;cursor: pointer;" class="blue" v-for="(item, index) in scope.row.result_file.append" :key="index" @click="openImg(item)">{{ item.fileName }}</div>
+								</div>
+							  </template>
 							</div>
 							<span v-else>-</span>
-						</template>
+						  </template>
 					</el-table-column>
 
 					<template v-if="isShowOneselfScore">
@@ -918,6 +927,38 @@ export default {
 		}
 	},
 	methods: {
+		openImg(item) {
+			let corpId = this.$getCache('corpId');
+			let loading = this.$loading({
+				lock: true,
+				text: 'Loading',
+				spinner: 'el-icon-loading'
+			});
+			if (item) {
+				this.$axios('get', 'api/drive/grant', { file_id: item.fileId })
+					.then(res => {
+						this.$dd.ready(() => {
+							this.$dd.biz.cspace.preview({
+								corpId: corpId,
+								spaceId: item.spaceId,
+								fileId: item.fileId,
+								fileName: item.fileName,
+								fileSize: item.fileSize,
+								fileType: item.fileType,
+								onSuccess: function(res) {
+									console.log(JSON.stringify(res));
+								},
+								onFail: function(err) {
+									console.log(JSON.stringify(err));
+								}
+							});
+						});
+					})
+					.finally(() => {
+						loading.close();
+					});
+			}
+		},
 		// 获取待办数据
 		getAgency() {
 			if (!this.isJz) {

+ 317 - 219
src/views/job/home.vue

@@ -1,210 +1,245 @@
 <template>
-	<div class="all boxMinHeight">
-		<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>
+		<div v-if="$getRole(1)&&userInfo.is_only_try_order" @click="dialogVisible = true" :style="{ backgroundImage: 'url(' + loginBg + ')' }" style="position: relative;margin-bottom: 10px;height: 77px;" class="headerImg">
+			<div style="position: absolute;width: 440px;font-size: 26px;color: #fff;font-weight: 600;top: 20px;text-align: center;left: 50%;margin-left: -220px;">
+				免费预约演示 获取行业绩效管理方案
+			</div>
 		</div>
-		<div>
-			<div class="left-main" v-if="$getRole(1)">
-				<div class="flex-box-ce" v-if="entranceList.length > 0">
-					<div class="entrance flex-box-ce" v-for="(item, index) in entranceList" :key="index" @click="openUrl(item)">
-						<img :src="item.image" />
-						<span>{{ item.name }}</span>
-					</div>
-				</div>
-				<div v-else><div style="text-align: center;margin: 020px;" class="fontColorF">暂无相关权限</div></div>
+		<div class="all boxMinHeight">
+			<div class="flex-box ts flex-center-center" v-if="isSubject">
+				<img src="@/assets/image/tz.png" />
+				<div class="flex-1">你正在使用个人体验版,如需正式使用,请联系管理员</div>
+				<div class="btn" type="primary" @click="openGly">联系管理员</div>
 			</div>
-			<!-- 待办 -->
-			<div class="flex-box">
-				<div class="flex-1 dispose-left">
-					<div class="more2" v-if="agencyList.length > 0">
-						<span @click="$router.push({ name: 'backlog', query: { activeName: activeName } })">
-							查看更多
-							<i class="el-icon-d-arrow-right"></i>
-						</span>
+			<div>
+				<div class="left-main" v-if="$getRole(1)">
+					<div class="flex-box-ce" v-if="entranceList.length > 0">
+						<div class="entrance flex-box-ce" v-for="(item, index) in entranceList" :key="index" @click="openUrl(item)">
+							<img :src="item.image" />
+							<span>{{ item.name }}</span>
+						</div>
 					</div>
-					<el-tabs v-model="activeName" class="tabs">
-						<el-tab-pane :title="tab.title" :name="tab.name" :key="tab.name" v-for="(tab, index) in editableTabs" v-loading="loading">
-							<span slot="label" v-if="tab.num > 0">
-								<el-badge :value="tab.num" :max="999">
-									<span>{{ tab.title }}</span>
-								</el-badge>
-							</span>
-							<span slot="label" v-else>
-								<div style="position: relative;vertical-align: middle;display: inline-block;">
-									<span>{{ tab.title }}</span>
-								</div>
+					<div v-else><div style="text-align: center;margin: 020px;" class="fontColorF">暂无相关权限</div></div>
+				</div>
+				<!-- 待办 -->
+				<div class="flex-box">
+					<div class="flex-1 dispose-left">
+						<div class="more2" v-if="agencyList.length > 0">
+							<span @click="$router.push({ name: 'backlog', query: { activeName: activeName } })">
+								查看更多
+								<i class="el-icon-d-arrow-right"></i>
 							</span>
-							<template v-if="agencyList.length > 0">
-								<div class="flex-box-ce item" v-for="(item, index) in agencyList" :key="index" @click="openDetail(1, item)">
-									<template v-if="item.userInfo">
-										<userImage :img_url="item.userInfo.img_url" :user_name="item.userInfo.name" fontSize="14" width="40px" height="40px"></userImage>
-									</template>
-									<div class="flex-1 font-flex-word content">
-										<div style="max-width: 700px;" class="font-flex-word">{{ item.content }}</div>
+						</div>
+						<el-tabs v-model="activeName" class="tabs">
+							<el-tab-pane :title="tab.title" :name="tab.name" :key="tab.name" v-for="(tab, index) in editableTabs" v-loading="loading">
+								<span slot="label" v-if="tab.num > 0">
+									<el-badge :value="tab.num" :max="999">
+										<span>{{ tab.title }}</span>
+									</el-badge>
+								</span>
+								<span slot="label" v-else>
+									<div style="position: relative;vertical-align: middle;display: inline-block;">
+										<span>{{ tab.title }}</span>
 									</div>
-									<div class="fontColorB">{{ $moment(item.update_time).format('YYYY-MM-DD HH:mm') }}</div>
-								</div>
-							</template>
-							<NoData v-else content="暂无内容" :isSolt="true">
-								<div class="fontColorF" style="text-align: center;">
-									暂无内容,
-									<span class="blue" style="cursor: pointer;" @click="$router.push({ name: 'backlog', query: { selectIndex: 1 } })">去查看已处理的</span>
-								</div>
-							</NoData>
-						</el-tab-pane>
-					</el-tabs>
-				</div>
-				<div style="width: 300px;margin-left: 10px;padding: 20px 10px;" class="dispose-left">
-					<div class="more2">
-						<span @click="$router.push({ name: 'unread' })">
-							查看更多
-							<i class="el-icon-d-arrow-right"></i>
-						</span>
+								</span>
+								<template v-if="agencyList.length > 0">
+									<div class="flex-box-ce item" v-for="(item, index) in agencyList" :key="index" @click="openDetail(1, item)">
+										<template v-if="item.userInfo">
+											<userImage :img_url="item.userInfo.img_url" :user_name="item.userInfo.name" fontSize="14" width="40px" height="40px"></userImage>
+										</template>
+										<div class="flex-1 font-flex-word content">
+											<div style="max-width: 700px;" class="font-flex-word">{{ item.content }}</div>
+										</div>
+										<div class="fontColorB">{{ $moment(item.update_time).format('YYYY-MM-DD HH:mm') }}</div>
+									</div>
+								</template>
+								<NoData v-else content="暂无内容" :isSolt="true">
+									<div class="fontColorF" style="text-align: center;">
+										暂无内容,
+										<span class="blue" style="cursor: pointer;" @click="$router.push({ name: 'backlog', query: { selectIndex: 1 } })">去查看已处理的</span>
+									</div>
+								</NoData>
+							</el-tab-pane>
+						</el-tabs>
 					</div>
-					<div style="border-bottom: 1px solid #f1f1f1;margin-bottom: 15px;">
-						<el-badge :value="messageNum" :max="999" v-if="messageNum > 0">
-							<div class="message-title">
+					<div style="width: 300px;margin-left: 10px;padding: 20px 10px;" class="dispose-left">
+						<div class="more2">
+							<span @click="$router.push({ name: 'unread' })">
+								查看更多
+								<i class="el-icon-d-arrow-right"></i>
+							</span>
+						</div>
+						<div style="border-bottom: 1px solid #f1f1f1;margin-bottom: 15px;">
+							<el-badge :value="messageNum" :max="999" v-if="messageNum > 0">
+								<div class="message-title">
+									<svg-icon icon-class="unread"></svg-icon>
+									未读消息
+								</div>
+							</el-badge>
+							<div class="message-title" v-else>
 								<svg-icon icon-class="unread"></svg-icon>
 								未读消息
 							</div>
-						</el-badge>
-						<div class="message-title" v-else>
-							<svg-icon icon-class="unread"></svg-icon>
-							未读消息
 						</div>
-					</div>
-					<template v-if="messageList.length > 0">
-						<div class="item" v-for="(item, index) in messageList" :key="index" @click="openDetail(2, item)">
-							<div class="flex-box" v-if="item.type == 4">
-								<div style="width: 25px;padding-top: 6px;"><svg-icon icon-class="message-download"></svg-icon></div>
-								<span class="message-content flex-1">{{ item.content }}</span>
+						<template v-if="messageList.length > 0">
+							<div class="item" v-for="(item, index) in messageList" :key="index" @click="openDetail(2, item)">
+								<div class="flex-box" v-if="item.type == 4">
+									<div style="width: 25px;padding-top: 6px;"><svg-icon icon-class="message-download"></svg-icon></div>
+									<span class="message-content flex-1">{{ item.content }}</span>
+								</div>
+								<div class="flex-box" v-else>
+									<div style="width: 25px;padding-top: 6px;"><svg-icon icon-class="inform"></svg-icon></div>
+									<span class="message-content flex-1">{{ item.content }}</span>
+								</div>
 							</div>
-							<div class="flex-box" v-else>
-								<div style="width: 25px;padding-top: 6px;"><svg-icon icon-class="inform"></svg-icon></div>
-								<span class="message-content flex-1">{{ item.content }}</span>
+						</template>
+						<NoData v-else content="暂无内容" :isSolt="true">
+							<div class="fontColorF" style="text-align: center;">
+								暂无内容,
+								<span class="blue" style="cursor: pointer;" @click="$router.push({ name: 'unread', query: { selectIndex: 1 } })">去查看已读的</span>
 							</div>
-						</div>
-					</template>
-					<NoData v-else content="暂无内容" :isSolt="true">
-						<div class="fontColorF" style="text-align: center;">
-							暂无内容,
-							<span class="blue" style="cursor: pointer;" @click="$router.push({ name: 'unread', query: { selectIndex: 1 } })">去查看已读的</span>
-						</div>
-					</NoData>
-				</div>
-			</div>
-			<!-- 管理 -->
-			<div class="gl-all" v-loading="staffLoad">
-				<div class="flex-box" style="margin-bottom: 20px;">
-					<el-cascader
-						v-model="headValue"
-						:options="options"
-						:show-all-levels="false"
-						:props="{ expandTrigger: 'hover', label: 'name', value: 'id', children: 'list' }"
-					></el-cascader>
-					<div style="margin-left:10px;width:200px;"><JxSearch :screen="2" title="请输入姓名搜索" @confirm="searchList"></JxSearch></div>
+						</NoData>
+					</div>
 				</div>
-				<el-tabs v-model="glIndex">
-					<el-tab-pane :label="item.title" :name="item.name" v-for="(item, index) in glIist" :key="index">
-						<el-table stripe :data="glDataList" v-loading="glLoading" :header-cell-style="{ background: '#EDF4FF' }">
-							<el-table-column prop="name" label="被考核人">
-								<template slot-scope="scope">
-									<div class="flex-box-ce">
-										<userImage
-											:id="scope.row.userInfo.id"
-											:user_name="scope.row.userInfo.name"
-											:img_url="scope.row.userInfo.img_url"
-											width="35px"
-											height="35px"
-											fontSize="12px"
-										></userImage>
-										<span style="margin-left: 10px; line-height: 50px;">{{ scope.row.userInfo.name }}</span>
-										<span style="margin-left: 10px; line-height: 50px;" class="yellow" v-if="scope.row.has_finish">已归档</span>
-									</div>
-								</template>
-							</el-table-column>
-							<el-table-column prop="name" label="部门">
-								<template slot-scope="scope">
-									<div v-if="scope.row.dept_list.length > 0">
-										<span v-for="(item, index) in scope.row.dept_list" :key="index">
-											{{ item.name }}
-											<span v-if="scope.row.dept_list.length - index > 1">,</span>
-										</span>
-									</div>
-									<span v-else>--</span>
-								</template>
-							</el-table-column>
-							<el-table-column prop="package_name" label="考核时段"></el-table-column>
-							<el-table-column prop="name" label="管理记录" v-if="glIndex == '1'">
-								<template slot-scope="scope">
-									<span v-if="scope.row.count_record == 0" class="fontColorB">无管理记录</span>
-									<span v-else class="blue" style="cursor: pointer;" @click="openTx(scope.row)">{{ scope.row.count_record }}条管理记录</span>
-								</template>
-							</el-table-column>
-							<el-table-column prop="name" label="执行计划" v-if="glIndex == '1'">
-								<template slot-scope="scope">
-									<template v-if="scope.row.action_update">
-										<div v-if="returnStr(scope.row.action_update).indexOf('今天') >= 0" class="actionText yellow">{{ returnStr(scope.row.action_update) }}</div>
-										<div v-else-if="returnStr(scope.row.action_update).indexOf('昨天') >= 0" class="actionText green">
-											{{ returnStr(scope.row.action_update) }}
+				<!-- 管理 -->
+				<div class="gl-all" v-loading="staffLoad">
+					<div class="flex-box" style="margin-bottom: 20px;">
+						<el-cascader
+							v-model="headValue"
+							:options="options"
+							:show-all-levels="false"
+							:props="{ expandTrigger: 'hover', label: 'name', value: 'id', children: 'list' }"
+						></el-cascader>
+						<div style="margin-left:10px;width:200px;"><JxSearch :screen="2" title="请输入姓名搜索" @confirm="searchList"></JxSearch></div>
+					</div>
+					<el-tabs v-model="glIndex">
+						<el-tab-pane :label="item.title" :name="item.name" v-for="(item, index) in glIist" :key="index">
+							<el-table stripe :data="glDataList" v-loading="glLoading" :header-cell-style="{ background: '#EDF4FF' }">
+								<el-table-column prop="name" label="被考核人">
+									<template slot-scope="scope">
+										<div class="flex-box-ce">
+											<userImage
+												:id="scope.row.userInfo.id"
+												:user_name="scope.row.userInfo.name"
+												:img_url="scope.row.userInfo.img_url"
+												width="35px"
+												height="35px"
+												fontSize="12px"
+											></userImage>
+											<span style="margin-left: 10px; line-height: 50px;">{{ scope.row.userInfo.name }}</span>
+											<span style="margin-left: 10px; line-height: 50px;" class="yellow" v-if="scope.row.has_finish">已归档</span>
 										</div>
-										<div v-else class="actionText">{{ returnStr(scope.row.action_update) }}</div>
 									</template>
-									<div></div>
-								</template>
-							</el-table-column>
-							<el-table-column prop="status" label="评分进度" v-else>
-								<template slot-scope="scope">
-									<span v-if="scope.row.status == 0" class="yellow">未到评分节点</span>
-									<span v-if="scope.row.status == 1" class="blue">待我评分</span>
-									<span v-if="scope.row.status == 2" class="green">我已评分</span>
-									<span v-if="scope.row.status == 3" class="green">已被其他管理评分</span>
-								</template>
-							</el-table-column>
-							<el-table-column prop="score_info" label="评分" v-if="glIndex == '2'">
-								<template slot-scope="scope">
-									<div v-if="scope.row.score_info.length > 0">
-										<div v-for="(item, index) in returnPoint(scope.row)" :key="index">
-											<div style="margin-top: 5px;" v-if="item.pointList.length > 0">
-												{{ item.name }}:
-												<span class="blue">{{ item.pointList.toString() }}</span>
+								</el-table-column>
+								<el-table-column prop="name" label="部门">
+									<template slot-scope="scope">
+										<div v-if="scope.row.dept_list.length > 0">
+											<span v-for="(item, index) in scope.row.dept_list" :key="index">
+												{{ item.name }}
+												<span v-if="scope.row.dept_list.length - index > 1">,</span>
+											</span>
+										</div>
+										<span v-else>--</span>
+									</template>
+								</el-table-column>
+								<el-table-column prop="package_name" label="考核时段"></el-table-column>
+								<el-table-column prop="name" label="管理记录" v-if="glIndex == '1'">
+									<template slot-scope="scope">
+										<span v-if="scope.row.count_record == 0" class="fontColorB">无管理记录</span>
+										<span v-else class="blue" style="cursor: pointer;" @click="openTx(scope.row)">{{ scope.row.count_record }}条管理记录</span>
+									</template>
+								</el-table-column>
+								<el-table-column prop="name" label="执行计划" v-if="glIndex == '1'">
+									<template slot-scope="scope">
+										<template v-if="scope.row.action_update">
+											<div v-if="returnStr(scope.row.action_update).indexOf('今天') >= 0" class="actionText yellow">
+												{{ returnStr(scope.row.action_update) }}
+											</div>
+											<div v-else-if="returnStr(scope.row.action_update).indexOf('昨天') >= 0" class="actionText green">
+												{{ returnStr(scope.row.action_update) }}
+											</div>
+											<div v-else class="actionText">{{ returnStr(scope.row.action_update) }}</div>
+										</template>
+										<div></div>
+									</template>
+								</el-table-column>
+								<el-table-column prop="status" label="评分进度" v-else>
+									<template slot-scope="scope">
+										<span v-if="scope.row.status == 0" class="yellow">未到评分节点</span>
+										<span v-if="scope.row.status == 1" class="blue">待我评分</span>
+										<span v-if="scope.row.status == 2" class="green">我已评分</span>
+										<span v-if="scope.row.status == 3" class="green">已被其他管理评分</span>
+									</template>
+								</el-table-column>
+								<el-table-column prop="score_info" label="评分" v-if="glIndex == '2'">
+									<template slot-scope="scope">
+										<div v-if="scope.row.score_info.length > 0">
+											<div v-for="(item, index) in returnPoint(scope.row)" :key="index">
+												<div style="margin-top: 5px;" v-if="item.pointList.length > 0">
+													{{ item.name }}:
+													<span class="blue">{{ item.pointList.toString() }}</span>
+												</div>
+												<div v-else>--</div>
 											</div>
-											<div v-else>--</div>
 										</div>
-									</div>
-									<div v-else>--</div>
-								</template>
-							</el-table-column>
-							<el-table-column label="操作">
-								<template slot-scope="scope">
-									<el-button @click="openTx(scope.row)" type="text" v-if="glIndex == '1' && !scope.row.has_finish">填写管理记录</el-button>
-									<el-button @click="openDetail2(scope.row)" type="text">查看详情</el-button>
-									<el-button @click="openDetail2(scope.row)" type="text" v-if="glIndex == '2' && scope.row.status == 1">去评分</el-button>
-								</template>
-							</el-table-column>
-						</el-table>
-						<div class="more">
-							<span @click="$router.push({ name: glIndex == 1 ? 'management' : 'score', query: { headValue: JSON.stringify(headValue) } })">
-								查看更多
-								<i class="el-icon-d-arrow-right"></i>
-							</span>
-						</div>
-					</el-tab-pane>
-				</el-tabs>
+										<div v-else>--</div>
+									</template>
+								</el-table-column>
+								<el-table-column label="操作">
+									<template slot-scope="scope">
+										<el-button @click="openTx(scope.row)" type="text" v-if="glIndex == '1' && !scope.row.has_finish">填写管理记录</el-button>
+										<el-button @click="openDetail2(scope.row)" type="text">查看详情</el-button>
+										<el-button @click="openDetail2(scope.row)" type="text" v-if="glIndex == '2' && scope.row.status == 1">去评分</el-button>
+									</template>
+								</el-table-column>
+							</el-table>
+							<div class="more">
+								<span @click="$router.push({ name: glIndex == 1 ? 'management' : 'score', query: { headValue: JSON.stringify(headValue) } })">
+									查看更多
+									<i class="el-icon-d-arrow-right"></i>
+								</span>
+							</div>
+						</el-tab-pane>
+					</el-tabs>
+				</div>
 			</div>
+			<!-- 跟踪管理 -->
+			<TrackManagement
+				:showDrawer.sync="isTrack"
+				:isCz="has_finish ? true : false"
+				:id="employeeID"
+				:apList="apList"
+				:recordMemberIds="recordMemberIds"
+				:assessId="employee_id"
+				@confirm="getManagement"
+			></TrackManagement>
+
+			<el-dialog class="dialog" :show-close="false" :visible.sync="dialogVisible" width="400px" >
+				<div style="height: 80px;background-image: linear-gradient(180deg, #01A2FE 0%, #0067FF 100%);
+				border-top-left-radius: 25px;border-top-right-radius: 25px;padding-top: 20px;">
+					<div style="font-weight: 600;font-size: 24px;color: #fff;text-align: center;">预约演示功道云绩效</div>
+					<div style="font-weight: 600;font-size: 24px;color: #fff;text-align: center;">绩效专家一对一服务</div>
+				</div>
+				<div style="position: absolute;right: 16px;top: 16px;cursor: pointer;" @click="dialogVisible = false"><i class="el-icon-close" style="font-size:20px;color: #fff;"></i></div>
+				<div>
+					<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="60px" style="width: 260px;margin: 20px auto;position: relative;right: 20px;">
+					  <el-form-item label="公司">
+						  <el-input v-model="userInfo.site.name" disabled></el-input>
+					  </el-form-item>
+					  <el-form-item label="姓名" prop="name">
+					    <el-input v-model="ruleForm.name"></el-input>
+					  </el-form-item>
+					  <el-form-item label="手机" prop="mobile">
+					    <el-input v-model="ruleForm.mobile" @input="ruleForm.mobile=ruleForm.mobile.replace(/[^\d]/g,'')" ></el-input>
+					  </el-form-item>
+					</el-form>
+				</div>
+				<div class="fa">预约赠送绩效考核方案</div>
+				<div  style="text-align: center;padding: 20px 0;">
+					<el-button style="border-radius: 25px;font-size: 16px;padding:7px 20px;" size="mini" type="primary" @click="submitForm('ruleForm')">立即申请</el-button>
+				</div>
+			</el-dialog>
 		</div>
-		<!-- 跟踪管理 -->
-		<TrackManagement
-			:showDrawer.sync="isTrack"
-			:isCz="has_finish ? true : false"
-			:id="employeeID"
-			:apList="apList"
-			:recordMemberIds="recordMemberIds"
-			:assessId="employee_id"
-			@confirm="getManagement"
-		></TrackManagement>
 	</div>
 </template>
 
@@ -218,6 +253,17 @@ export default {
 	components: { JxSearch, TrackManagement },
 	data() {
 		return {
+			userInfo: this.$getUserData(),
+			ruleForm: {
+			  name: '',
+			  mobile: '',
+			},
+			rules: {
+			  name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
+			  mobile: [{ required: true, trigger: 'blur', message: '请输入手机号' }],
+			},  
+			loginBg: require('@/assets/image/bj.jpg'),
+			dialogVisible: false,
 			isSubject: false, //判断是否是个人版进入
 			mainCorpId: '', //如果是个人版,这个企业ID是登录者所在的企业ID,不是钉钉那边提供的隐藏企业ID
 			day: this.$moment().format('YYYY-MM-DD'),
@@ -229,7 +275,6 @@ export default {
 				{ title: '评分', name: '5', num: 0 },
 				{ title: '审批', name: '9', num: 0 }
 			],
-			userInfo: this.$getUserData(),
 			entranceList: [],
 			agencyList: [], //待办列表
 			agencyNum: 0,
@@ -299,6 +344,14 @@ export default {
 			this.getAgencyNum();
 			this.getAgency();
 		},
+		dialogVisible(val) {
+			if(!val){
+				this.ruleForm={
+				  name: '',
+				  mobile: '',
+				};
+			}
+		},
 		glIndex(val) {
 			this.glDataList = [];
 			if (this.headValue.length != 0) {
@@ -311,6 +364,28 @@ export default {
 		}
 	},
 	methods: {
+		submitForm(formName) {
+			this.$refs[formName].validate((valid) => {
+			  if (valid) {
+				  
+				  
+				  if (!/^1[0123456789]\d{9}$/.test( this.ruleForm.mobile)) {
+				    this.$message.error('手机格式有误');
+					return false;
+				  }
+				  
+				  
+				this.$axios('post', '/api/employee/appointment', this.ruleForm).then(res => {
+					this.$message.success('提交成功,我们的绩效老师将在24小时内与您联系');
+				}).finally(() => {
+					this.dialogVisible = false;
+				});
+			  } else {
+				console.log('error submit!!');
+				return false;
+			  }
+			});
+		},
 		openGly() {
 			contactAdminToUseApp({ id: '109758', corpId: this.mainCorpId }).catch(err => {
 				// 入参不正确,或者遇到技术异常时才会进入这个链路
@@ -641,7 +716,7 @@ export default {
 		},
 		setMenu() {
 			let entranceList = [];
-			if (this.$isAuthoritys([this.$7, this.$8, this.$9, this.$10, this.$11,this.$17,this.$18])) {
+			if (this.$isAuthoritys([this.$7, this.$8, this.$9, this.$10, this.$11, this.$17, this.$18])) {
 				entranceList.push({ name: '考核管理', image: require('@/assets/image/1.png'), url: '/assessManagement' });
 			}
 			if (this.$isAuthoritys([this.$13, this.$14])) {
@@ -660,35 +735,58 @@ export default {
 </script>
 
 <style scoped="scoped">
-	.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;
-	}
-.actionText {
+.fa{
+  background-color: #f0a020;
+  color: #fff;
+  width: 200px;
+  font-size: 14px;
+  margin-left: auto;
+  padding: 0.1rem 0.32rem;
+  border-bottom-left-radius: 25px;
+  border-top-left-radius:25px;
+  padding-left: 1.4rem;
+  box-sizing: border-box;
+}	
+.headerImg {
+	background-position: center;
+	background-repeat: no-repeat;
+	background-size: cover;
+	cursor: pointer;
+}
+.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;
+}
+.dialog ::v-deep .el-dialog {
+	border-radius: 25px;
+}
+.dialog ::v-deep .el-dialog__header,.dialog ::v-deep .el-dialog__body {
+	padding: 0;
+	border-radius: 25px;
 }
 .zmBox {
 	width: 18px;
@@ -729,7 +827,7 @@ export default {
 .more2 span:hover {
 	color: #26a2ff;
 }
-.dispose-left{
+.dispose-left {
 	position: relative;
 }
 .dispose-left ::v-deep.el-badge__content.is-fixed {

+ 55 - 14
src/views/myPerformance/myPerformance.vue

@@ -149,20 +149,29 @@
                 </template>
               </el-table-column>
             </template>
-          <el-table-column prop="target" label="目标值" align="left" min-width="150" v-if="getTableItem('target')||getTableItem('result')">
-            <template slot-scope="scope">
-              <div v-if="scope.row.target != '-' && scope.row.target != undefined&&scope.row.target!='0'">
-                目标值:
-               <span>{{ scope.row.target + '' + scope.row.unit }}</span>
-              </div>
-              <span v-else>-</span>
-              <div v-if="scope.row.result != '-'&& scope.row.result != undefined" class="yellow">
-                结果值:
-                <span>{{ scope.row.result + '' + scope.row.unit }}</span>
-              </div>
-              <span v-else>-</span>
-            </template>
-          </el-table-column>
+			<el-table-column prop="target" label="目标值" align="left" min-width="150" v-if="getTableItem('target')">
+				  <template slot-scope="scope">
+					<div v-if="scope.row.target != '-' && scope.row.target != undefined&&scope.row.target!='0'">
+					  目标值:
+					 <span>{{ scope.row.target + '' + scope.row.unit }}</span>
+					</div>
+					<span v-else>-</span>
+					<div v-if="scope.row.result !== null&&scope.row.result !== ''&&scope.row.result !== undefined" class="yellow">
+					  <template v-if="scope.row.type==1">
+						  结果值: <span>{{ scope.row.result + '' + scope.row.unit }}</span>
+					  </template>
+					  <template v-if="scope.row.result_file">
+<!-- 								<div v-if="scope.row.result_file.images.length>0">
+						  <div style="margin-bottom: 3px;cursor: pointer;" class="blue" v-for="(item, index) in scope.row.result_file.images" :key="index" @click="onFilePreView(item)">{{ item.name }}</div>
+						</div> -->
+						<div v-if="scope.row.result_file.append.length>0">
+						  <div style="margin-bottom: 3px;cursor: pointer;" class="blue" v-for="(item, index) in scope.row.result_file.append" :key="index" @click="openImg(item)">{{ item.fileName }}</div>
+						</div>
+					  </template>
+					</div>
+					<span v-else>-</span>
+				  </template>
+			</el-table-column>
 			<template v-if="isShowOneselfScore">
 				<el-table-column prop="point_limit" label="加扣分上限" align="center" width="100" v-if="getTableItem('point_limit')">
 					<template slot-scope="scope">
@@ -827,6 +836,38 @@ export default {
     this.assList();
   },
   methods: {
+	  openImg(item) {
+	  	let corpId = this.$getCache('corpId');
+	  	let loading = this.$loading({
+	  		lock: true,
+	  		text: 'Loading',
+	  		spinner: 'el-icon-loading'
+	  	});
+	  	if (item) {
+	  		this.$axios('get', 'api/drive/grant', { file_id: item.fileId })
+	  			.then(res => {
+	  				this.$dd.ready(() => {
+	  					this.$dd.biz.cspace.preview({
+	  						corpId: corpId,
+	  						spaceId: item.spaceId,
+	  						fileId: item.fileId,
+	  						fileName: item.fileName,
+	  						fileSize: item.fileSize,
+	  						fileType: item.fileType,
+	  						onSuccess: function(res) {
+	  							console.log(JSON.stringify(res));
+	  						},
+	  						onFail: function(err) {
+	  							console.log(JSON.stringify(err));
+	  						}
+	  					});
+	  				});
+	  			})
+	  			.finally(() => {
+	  				loading.close();
+	  			});
+	  	}
+	  },
     //撤销
     revocation() {
         let params={

+ 377 - 215
src/views/myPerformance/resultSet.vue

@@ -1,233 +1,395 @@
 <template>
-  <div class="box-all boxMinHeight">
-    <PageHead :phName="packageName"></PageHead>
-    <div class="main">
-      <div class="flex-box-ce" style="padding: 10px 0;border-bottom: 1px solid #f1f1f1;margin-bottom: 20px;">
-         <span :class="{ active: activeName=='noEntering' }" style="width: 80px;" @click="activeName='noEntering'">未录入({{ noStatusListTotal }})</span>
-         <span :class="{ active: activeName=='entering' }" style="width: 80px;" @click="activeName='entering'">已录入({{ statusListTotal }})</span>
-      </div>
+	<div class="box-all boxMinHeight">
+		<PageHead :phName="packageName"></PageHead>
+		<div class="main">
+			<div class="flex-box-ce" style="padding: 10px 0;border-bottom: 1px solid #f1f1f1;margin-bottom: 20px;">
+				<span :class="{ active: activeName == 'noEntering' }" style="width: 80px;" @click="activeName = 'noEntering'">未录入({{ noStatusListTotal }})</span>
+				<span :class="{ active: activeName == 'entering' }" style="width: 80px;" @click="activeName = 'entering'">已录入({{ statusListTotal }})</span>
+			</div>
 
-     <div v-show="activeName=='noEntering'">
-		 <template v-if="noStatusList.length>0">
-			 <div v-for="(item,index) in noStatusList" :key="index">
-			   <div class="wd-title">{{item.wdName}}</div>
-			   <el-table :data="item.list"  border :header-cell-style="{ background: '#ECF5FF' }">
-			     <el-table-column prop="userName" label="姓名"></el-table-column>
-			     <!-- <el-table-column prop="wdName" label="维度"></el-table-column> -->
-			     <el-table-column prop="name" label="指标名称"></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="target" label="目标值"></el-table-column>
-			     <el-table-column prop="weight" label="权重%"></el-table-column>
-			     <el-table-column prop="remark" label="备注" min-width="200"></el-table-column>
-			     <el-table-column label="实际完成结果值" min-width="150">
-			         <template slot-scope="scope">
-			         <div class="flex-box-ce">
-			           <el-input type="textarea" style="min-width: 130px;" :rows="1" v-model="scope.row.result" placeholder="请输入"></el-input>
-			           <span style="width: 40px;padding-left: 5px;" class="font-flex-word">{{scope.row.unit}}</span>
-			         </div>
-			         </template>
-			     </el-table-column>
-			   </el-table>
-			 </div>
-		 </template>
-		<noData v-else>
-			
-		</noData>
-		
-     </div>
-     <div v-show="activeName=='entering'">
-		 
-		<template v-if="statusList.length>0"> 
-       <div v-for="(item,index) in statusList" :key="index">
-        <div class="wd-title">{{item.wdName}}</div>
-        <el-table :data="item.list"  border :header-cell-style="{ background: '#ECF5FF' }">
-          <el-table-column prop="userName" label="姓名"></el-table-column>
-          <el-table-column prop="name" label="指标名称"></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="target" label="目标值"></el-table-column>
-          <el-table-column prop="weight" label="权重%"></el-table-column>
-          <el-table-column prop="remark" label="备注" min-width="200"></el-table-column>
-          <el-table-column label="实际完成结果值" min-width="150" prop="result">
-            <template slot-scope="scope">
-              <span>
-                <span class="font-flex-word">{{scope.row.result}}</span>
-                <span style="width: 40px;padding-left: 5px;" class="font-flex-word">{{scope.row.unit}}</span>
-              </span>
-            </template>
-          </el-table-column>
-        </el-table>
-       </div>
-	   </template>
-	   <noData v-else>
-	   	
-	   </noData>
-	   
-      </div>
-    </div>
-    <footer class="footer flex-box-end" v-if="activeName == 'noEntering'">
-      <el-button  class="primaryBtn" @click="save(1)">暂存</el-button>
-      <el-button  type="primary" @click="save(0)">提交结果值</el-button>
-    </footer>
-  </div>
+			<div v-show="activeName == 'noEntering'">
+				<template v-if="noStatusList.length > 0">
+					<div v-for="(item, index) in noStatusList" :key="index">
+						<div class="wd-title">{{ item.wdName }}</div>
+						<el-table :data="item.list" border :header-cell-style="{ background: '#ECF5FF' }">
+							<el-table-column prop="userName" label="姓名"></el-table-column>
+							<el-table-column prop="name" label="指标名称"></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="target" label="目标值"></el-table-column>
+							<el-table-column prop="weight" label="权重%"></el-table-column>
+							<el-table-column prop="remark" label="备注" min-width="200"></el-table-column>
+							<el-table-column label="结果值附件" min-width="200">
+								<template slot-scope="scope">
+									<div style="margin-bottom: 10px;" class="flex-box-ce fontColorF">
+										<el-button class="primaryBtn" icon="el-icon-paperclip" plain size="small" @click="uploadOss(scope.row)">附件</el-button>
+										<!-- <div style="padding-left:10px;font-size: 12px;">附件存放在企业钉盘,请确保钉盘有足够空间</div> -->
+									</div>
+									<div class="">
+										<div v-for="(item, index) in scope.row.result_file.append" style="cursor: pointer;margin-bottom: 5px;" :key="index" class="blue flex-box-ce">
+											<i  class="el-icon-paperclip fontColorB" style="font-size: 18px;padding-right: 10px;"></i>
+											<div style="width: 400px;" class="font-flex-word" @click="openImg(item)">{{ item.fileName }}</div>
+											<i class="el-icon-close fontColorB" @click="deleteFile(scope.row.result_file.append,index)" style="font-size: 18px;padding-left: 10px;"></i>
+										</div>
+									</div>
+								</template>
+							</el-table-column>
+							<el-table-column label="实际完成结果值" min-width="150">
+								<template slot-scope="scope">
+									<div class="flex-box-ce" v-if="scope.row.type == 1">
+										<el-input
+											type="textarea"
+											@input="[(scope.row.result = isFloor(scope.row.result))]"
+											style="min-width: 130px;"
+											:rows="1"
+											v-model="scope.row.result"
+											placeholder="请输入"
+										></el-input>
+										<span style="width: 40px;padding-left: 5px;" class="font-flex-word">{{ scope.row.unit }}</span>
+									</div>
+									<div v-else>--</div>
+								</template>
+							</el-table-column>
+						</el-table>
+					</div>
+				</template>
+				<noData v-else></noData>
+			</div>
+			<div v-show="activeName == 'entering'">
+				<template v-if="statusList.length > 0">
+					<div v-for="(item, index) in statusList" :key="index">
+						<div class="wd-title">{{ item.wdName }}</div>
+						<el-table :data="item.list" border :header-cell-style="{ background: '#ECF5FF' }">
+							<el-table-column prop="userName" label="姓名"></el-table-column>
+							<el-table-column prop="name" label="指标名称"></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="target" label="目标值"></el-table-column>
+							<el-table-column prop="weight" label="权重%"></el-table-column>
+							<el-table-column prop="remark" label="备注" min-width="200"></el-table-column>
+							<el-table-column label="结果值附件" min-width="200">
+								<template slot-scope="scope">
+									<div v-if="scope.row.result_file.append.length > 0">
+										<div>附件</div>
+										<div class="">
+											<div v-for="(item, index) in scope.row.result_file.append" style="cursor: pointer;margin-bottom: 5px;" :key="index" class="blue flex-box-ce">
+												<i  class="el-icon-paperclip fontColorB" style="font-size: 18px;padding-right: 10px;"></i>
+												<div style="width: 400px;" class="font-flex-word" @click="openImg(item)">{{ item.fileName }}</div>
+												<!-- <i class="el-icon-close fontColorB" @click="deleteFile(scope.row.result_file.append,index)" style="font-size: 18px;padding-left: 10px;"></i> -->
+											</div>
+										</div>
+									</div>
+								</template>
+							</el-table-column>
+							<el-table-column label="实际完成结果值" min-width="150" prop="result">
+								<template slot-scope="scope">
+									<span v-if="scope.row.type == 1">
+										<span class="font-flex-word">{{ scope.row.result }}</span>
+										<span style="width: 40px;padding-left: 5px;" class="font-flex-word">{{ scope.row.unit }}</span>
+									</span>
+									<div v-else>--</div>
+								</template>
+							</el-table-column>
+						</el-table>
+					</div>
+				</template>
+				<noData v-else></noData>
+			</div>
+		</div>
+		<footer class="footer flex-box-end" v-if="activeName == 'noEntering'">
+			<el-button class="primaryBtn" @click="save(1)">暂存</el-button>
+			<el-button type="primary" @click="save(0)">提交结果值</el-button>
+		</footer>
+	</div>
 </template>
 <script>
 import PageHead from '@/components/public/PageHead'; //头部---返回
+import { _debounce } from '@/api/auth';
 export default {
-  components: { PageHead },
-  name: 'resultSet',
-  data() {
-    return {
-      title: '2024年的绩效考核',
-      activeName: 'noEntering',
-      noStatusList: [],
-      noStatusListTotal:0,
-      statusList: [],
-      statusListTotal:0,
-      id:'',//员工考核记录id
-      packageName:'',//考核包名称 结果值录入用到
-    };
-  },
-  watch: {},
-  created() {
-    if (this.$route.query.id) {
-      this.id = this.$route.query.id;
-      this.packageName=this.$route.query.packageName;
-      this.getPackageDtail();
-    }
-  },
-  mounted() {},
-  methods: {
-    // 提交
-    save(num) {
-      let isLr = false;
-      let data = {
-        id: this.id, //个人考核包ID
-        cache: num, //是否暂存 1 是 0 否(提交)
-        result_info: '' //结果值信息
-      };
-      let result_info = [];
-      this.noStatusList.some(item => {
-        item.list.forEach(e=>{
-          if (e.result) {
-            result_info.push({
-              result: e.result, //单项目结果值
-              dimension_key: e.message.dimension_key, //维度索引
-              index_key: e.message.index_key, //指标索引
-              index_id: e.id //指标ID
-            });
-            isLr = true;
-          }
-        })
-      });
-      if(!isLr){
-        this.$message.error("至少输入一项结果值")
-        return false;
-      }
-      data.result_info=JSON.stringify(result_info);
-      this.$axios('post', '/api/per/package/record_result',data).then(res => {
-           this.$message.success(num==1? '暂存成功':'提交成功');
-           this.getPackageDtail();
-      })
-    },
-    getPackageDtail() {
-      this.$axios('get', '/api/per/package/employee/info', {id: this.id}).then(res => {
-        let data = res.data.data;
-        let dimension = data.dimension;
-        let relevance_employee=data.relevance_employee
-        dimension.forEach((item, index) => {
-          if (item.index.length > 0) {
-            item.index.forEach((item2, index2) => {
-              item2.wdName = item.name;
-              item2.userName = relevance_employee.name;
-            });
-          }
-        });
-        let flow = data.flow;
-        let list = []; //结果值录入集合
-        flow.some(item => {
-          if (item.code == 'result_value') {
-            item.target.forEach(item2 => {
-              if (item2.employee_id == this.$getUserData().id) {
-                list = item2.list;
-                status = item2.status;
-              }
-            });
-            return true
-          }
-        });
-        let statusList = []; //已录入指标
-        let noStatusList = []; //未录入指标
-        list.forEach(item => {//区分录入与未录入
-          if (item.status == 2) {
-            dimension[item.dimension_key].index[item.index_key].message = item;
-            statusList.push(dimension[item.dimension_key].index[item.index_key]);
-          }
-          if (item.status == 1) {
-            dimension[item.dimension_key].index[item.index_key].message = item;
-            if(item.result_cache){//是否有暂存的数据有就显示出来
-              dimension[item.dimension_key].index[item.index_key].result=item.result_cache
-            }
-            noStatusList.push(dimension[item.dimension_key].index[item.index_key]);
-          }
-        });
-        this.statusListTotal=statusList.length;
-        this.noStatusListTotal=noStatusList.length;
-        this.statusList =  this.conformityData(statusList);
-        this.noStatusList = this.conformityData(noStatusList);
-      });
-    },
-    conformityData(arr){
-        let returnArr=[];
-        let strs= new Set(arr.map(item=>{
-            return item.wdName
-        }))
-        strs.forEach(item=>{
-            let obj={
-              wdName:item,
-              list:arr.filter(e=>{
-                return e.wdName==item
-              })
-            }
-            returnArr.push(obj)
-        })
-        return returnArr;
-    },
-  }
+	components: { PageHead },
+	name: 'resultSet',
+	data() {
+		return {
+			title: '2024年的绩效考核',
+			activeName: 'noEntering',
+			noStatusList: [],
+			noStatusListTotal: 0,
+			statusList: [],
+			statusListTotal: 0,
+			id: '', //员工考核记录id
+			packageName: '', //考核包名称 结果值录入用到
+			// 上传图标与附件
+			Xtoken: { 'X-Token': this.$getToken() },
+			img_fileList: [], // 图片附件
+			file_fileList: [], //文件附件
+			imgs: [],
+			doc: '',
+			isShowImg: false,
+			imgUrl: '',
+			selectItem: {},
+			accept: 'image/jpeg,image/png',
+			accept2:
+				'application/pdf,application/vnd.ms-excel,application/msword,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document'
+		};
+	},
+	watch: {},
+	created() {
+		if (this.$route.query.id) {
+			this.id = this.$route.query.id;
+			this.packageName = this.$route.query.packageName;
+			this.getPackageDtail();
+		}
+	},
+	mounted() {},
+	methods: {
+		deleteFile(item,index) {
+			if (item.length == 0) {
+				item = [];
+				return false;
+			}
+			item.splice(index, 1);
+		},
+		openImg(item) {
+			let corpId = this.$getCache('corpId');
+			let loading = this.$loading({
+				lock: true,
+				text: 'Loading',
+				spinner: 'el-icon-loading'
+				// background: 'rgba(0, 0, 0, 0.7)'
+			});
+			if (item) {
+				this.$axios('get', 'api/drive/grant', { file_id: item.fileId })
+					.then(res => {
+						this.$dd.ready(() => {
+							this.$dd.biz.cspace.preview({
+								corpId: corpId,
+								spaceId: item.spaceId,
+								fileId: item.fileId,
+								fileName: item.fileName,
+								fileSize: item.fileSize,
+								fileType: item.fileType,
+								onSuccess: function(res) {
+									console.log(JSON.stringify(res));
+								},
+								onFail: function(err) {
+									console.log(JSON.stringify(err));
+								}
+							});
+						});
+					})
+					.finally(() => {
+						loading.close();
+					});
+			}
+		},
+		uploadOss(item) {
+			let that = this;
+			// let data={
+			// 	fileId: "64856759356",
+			// 	fileName: "指标导入模板.xlsx",
+			// 	fileSize: 30742,
+			// 	fileType: "xlsx",
+			// 	spaceId: "6200066562",
+			// }
+			// item.result_file.append.push(data);
+			// return false
+			let corpId = this.$getCache('corpId');
+			this.$axios('get', 'api/drive/info').then(res => {
+				let spaceId = res.data.data.space_id.toString();
+				this.$dd.ready(() => {
+					this.$dd.biz.util.uploadAttachment({
+						image: {
+							multiple: true,
+							compress: false,
+							max: 5,
+							spaceId: spaceId
+						},
+						space: {
+							corpId: corpId,
+							spaceId: spaceId,
+							max: 5
+						},
+						file: {
+							spaceId: spaceId,
+							max: 5
+						},
+						types: ['photo', 'file', 'space'], //PC端支持["photo","file","space"]
+						onSuccess: function(res) {
+							console.log(JSON.stringify(res));
+							let data = res.data;
+							item.result_file.append.push(...data);
+						},
+						onFail: function(err) {
+							console.log(JSON.stringify(err));
+						}
+					});
+				});
+			});
+		},
+		isFloor(el) {
+			var obj = event.target;
+			var t = el.charAt(0);
+			el = el
+				.replace('.', '$#$') //把第一个字符'.'替换成'$#$'
+				.replace(/\./g, '') //把其余的字符'.'替换为空
+				.replace('$#$', '.') //把字符'$#$'替换回原来的'.'
+				.replace(/[^\d.]/g, '') //只能输入数字和'.'
+				.replace(/^\./g, '') //不能以'.'开头
+				.replace(/([0-9]+\.[0-9]{2})[0-9]*/, '$1'); //只保留2位小数
+			if (t == '-') {
+				el = '-' + el;
+			}
+			return el || null;
+		},
+
+		// 提交
+		save(num) {
+			let isLr = false;
+			let data = {
+				id: this.id, //个人考核包ID
+				cache: num, //是否暂存 1 是 0 否(提交)
+				result_info: '' //结果值信息
+			};
+			let result_info = [];
+			let err = '';
+			this.noStatusList.some(item => {
+				item.list.forEach(e => {
+					if (e.type == 1) {
+						if (e.result) {
+							result_info.push({
+								result: e.result, //单项目结果值
+								dimension_key: e.message.dimension_key, //维度索引
+								index_key: e.message.index_key, //指标索引
+								index_id: e.id, //指标ID
+								result_file: e.result_file
+					 	});
+						}
+					} else {
+						// if (e.result_file.append.length > 0 || e.result_file.images.length > 0) {
+							result_info.push({
+								// result: e.result, //单项目结果值
+								dimension_key: e.message.dimension_key, //维度索引
+								index_key: e.message.index_key, //指标索引
+								index_id: e.id, //指标ID
+								result_file: e.result_file
+							});
+						// }
+					}
+				});
+			});
+			if (result_info.length == 0) {
+				this.$message({ type: 'error', message: '至少输入一项结果值', duration: 3000, center: true });
+				return false;
+			}
+			data.result_info = JSON.stringify(result_info);
+			this.$axios('post', '/api/per/package/record_result', data).then(res => {
+				this.$message.success(num == 1 ? '暂存成功' : '提交成功');
+				this.getPackageDtail();
+			});
+		},
+		getPackageDtail() {
+			this.$axios('get', '/api/per/package/employee/info', { id: this.id }).then(res => {
+				let data = res.data.data;
+				let dimension = data.dimension;
+				let relevance_employee = data.relevance_employee;
+				dimension.forEach((item, index) => {
+					if (item.index.length > 0) {
+						item.index.forEach((item2, index2) => {
+							item2.wdName = item.name;
+							item2.userName = relevance_employee.name;
+						});
+					}
+				});
+				let flow = data.flow;
+				let list = []; //结果值录入集合
+				flow.some(item => {
+					if (item.code == 'result_value') {
+						item.target.forEach(item2 => {
+							if (item2.employee_id == this.$getUserData().id) {
+								list = item2.list;
+								status = item2.status;
+							}
+						});
+						return true;
+					}
+				});
+				let statusList = []; //已录入指标
+				let noStatusList = []; //未录入指标
+				list.forEach(item => {
+					//区分录入与未录入
+					if (item.status == 2) {
+						dimension[item.dimension_key].index[item.index_key].message = item;
+						statusList.push(dimension[item.dimension_key].index[item.index_key]);
+					}
+					if (item.status == 1) {
+						dimension[item.dimension_key].index[item.index_key].message = item;
+						if (item.result_cache) {
+							//是否有暂存的数据有就显示出来
+							dimension[item.dimension_key].index[item.index_key].result = item.result_cache;
+							dimension[item.dimension_key].index[item.index_key].result_file = item.result_file;
+						}
+						noStatusList.push(dimension[item.dimension_key].index[item.index_key]);
+					}
+				});
+				this.statusListTotal = statusList.length;
+				this.noStatusListTotal = noStatusList.length;
+				this.statusList = this.conformityData(statusList);
+				this.noStatusList = this.conformityData(noStatusList);
+				console.log(this.noStatusList)
+			});
+		},
+		conformityData(arr) {
+			let returnArr = [];
+			let strs = new Set(
+				arr.map(item => {
+					return item.wdName;
+				})
+			);
+			strs.forEach(item => {
+				let obj = {
+					wdName: item,
+					list: arr.filter(e => {
+						return e.wdName == item;
+					})
+				};
+				returnArr.push(obj);
+			});
+			return returnArr;
+		}
+	}
 };
 </script>
 <style scoped lang="scss">
-.wd-title{
-    margin: 20px 0;
-    padding-left: 10px;
-    border-left: 3px solid #409eff;
+.wd-title {
+	margin: 20px 0;
+	padding-left: 10px;
+	border-left: 3px solid #409eff;
 }
 .box-all {
-  position: relative;
-  background-color: #fff;
-  font-size: 14px;
-  padding: 20px;
+	position: relative;
+	background-color: #fff;
+	font-size: 14px;
+	padding: 20px;
 }
 .main {
-   margin-bottom: 60px;
+	margin-bottom: 60px;
 }
 .footer {
-  position: fixed;
-  bottom: 0;
-  left: 0;
-  right: 0;
-  background-color: #fff;
-  border-top: 1px solid #e8e8e8;
-  padding: 12px 30px;
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	right: 0;
+	background-color: #fff;
+	border-top: 1px solid #e8e8e8;
+	padding: 12px 30px;
 }
-.active{
-  color: #409EFF;
+.active {
+	color: #409eff;
 }
 </style>

+ 5 - 1
src/views/userSet/userSet.vue

@@ -21,8 +21,12 @@ export default {
 			tabs: []
 		};
 	},
+	activated() {
+		console.log("123")
+	},
 	created() {
 		this.setMenu();
+		console.log(this.$route.query);
 	},
 	methods: {
 		setMenu() {
@@ -31,7 +35,7 @@ export default {
 			if (this.$getUserData().permission_info.main == 1) {
 				tabs.push({ label: '权限设置', name: 'jurisdictionSet' });
 			}
-			this.name = tabs[0].name;
+			this.name =this.$route.query.name? this.$route.query.name:tabs[0].name;
 			this.tabs = tabs;
 		}
 	},