Pārlūkot izejas kodu

解放部门管理者,员工进入PC端

347617796@qq.com 4 gadi atpakaļ
vecāks
revīzija
6ae53bbddc

+ 13 - 2
src/assets/css/reset.css

@@ -1,8 +1,9 @@
 body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { margin:0; padding:0; }
 body, button, input, select, textarea {
 	font-size:14px;
-	color: #303133;
-    font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
+  color: #303133;
+    font-family:"楷体","楷体_GB2312";
+    /* font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif; */
 	-webkit-font-smoothing: antialiased;
 	-webkit-tap-highlight-color: transparent;
 }
@@ -258,3 +259,13 @@ table { border-collapse:collapse; border-spacing:0; }
 	width: auto !important;
 }
 
+/* 级联选择器长度限制样式 */
+.el-cascader-menu .el-cascader-menu__wrap .el-scrollbar__view li.el-cascader-node {
+  height: auto;
+  max-width: 500px;
+}
+.el-cascader-menu .el-cascader-menu__wrap .el-scrollbar__view li.el-cascader-node .el-cascader-node__label {
+  white-space: initial;
+  overflow: initial;
+  text-overflow: initial;
+}

+ 85 - 85
src/home.vue

@@ -1279,91 +1279,91 @@ export default {
 		window.removeEventListener('resize', this.selfAdaption); //取消echarts自适应
 	},
 	created() {
-	var user = {
-      accedence_time: "2020-12-26 15:04:33",
-      company_id: '',
-      company_info: { creator_ids: [167], id: 15, industry: '计算机软件', is_official: 1, logo_url: '', name: '测试组织', status: 1, user_count_max: 50 },
-      employee_detail: {
-        dept_list: [],
-        manage_scope: [{"id": 164,"name": "刘瑞欣"},{"id": 165,"name": "方慧毅"},{"id": 166,"name": "郭家裕(创始人)"},{"id": 184,"name": "莫仕钊"},{"id": 185,"name": "秦杨升"}],
-        permission_list: [],
-        role_list: [
-          { id: 15, name: 'employee', remark: '员工' },
-          { id: 12, name: 'admin', remark: '公司管理员' },
-          { id: 14, name: 'dept_manager', remark: '部门管理者' },
-          { id: 13, name: 'point_manager', remark: '积分管理员' },
-        //   { id: 11, name: 'creator', remark: '创始人' }
-        ],
-        superior_list: [{id: 164,name: "刘瑞欣"},
-				{id: 165,name: "方慧毅"},
-				{id: 166,name: "郭家裕(创始人)"},
-				{id: 184,name: "莫仕钊"},
-				{id: 185,name: "秦杨升"},
-				{id: 187,name: "梁丽焕"},
-				{id: 188,name: "刘俊华"},{id: 167,name: "蔡文"}]
-      },
-      id: 186,
-      img_url: "https://static-legacy.dingtalk.com/media/lADPBE1Xcf-wCfbNAwvNAwA_768_779.jpg",
-      is_admin: 0,
-      is_creator: 0,
-      is_official: 1,
-      is_scope: 1,
-      letter_index: 'C',
-      name: '程健',
-      point_config: {
-        deduct_task_monthly: [
-          {
-            name: "A分",
-            point: "0",
-            pt_id: 2
-          },
-          {
-            name: "B分",
-            point: "0",
-            pt_id: 3
-          }
-        ],
-        reward_ratio: 0,
-        exec_count: 0,
-        exec_count_point: 0,
-        reward_ratio_point: 0,
-        service_point: 0,
-        entry_limit: 1000,
-        point_limit: [
-          {
-            name: "A分",
-            point: "200",
-            pt_id: 2
-          },
-          {
-            name: "B分",
-            point: "100",
-            pt_id: 3
-          }
-        ],
-        reward_task_monthly: [
-          {
-            name: "A分",
-            point: "0",
-            pt_id: 2
-          },
-          {
-            name: "B分",
-            point: "0",
-            pt_id: 3
-          }
-        ],
-      },
-      post: '',
-      site_config: {
-        base_point: 120,
-        rule_limit_check: 1,
-        task_review: 0,
-        service_point: 120,
-        a2b: 0
-      },
-      site_id: 15
-    };
+	// var user = {
+    //   accedence_time: "2020-12-26 15:04:33",
+    //   company_id: '',
+    //   company_info: { creator_ids: [167], id: 15, industry: '计算机软件', is_official: 1, logo_url: '', name: '测试组织', status: 1, user_count_max: 50 },
+    //   employee_detail: {
+    //     dept_list: [],
+    //     manage_scope: [{"id": 164,"name": "刘瑞欣"},{"id": 165,"name": "方慧毅"},{"id": 166,"name": "郭家裕(创始人)"},{"id": 184,"name": "莫仕钊"},{"id": 185,"name": "秦杨升"}],
+    //     permission_list: [],
+    //     role_list: [
+    //       { id: 15, name: 'employee', remark: '员工' },
+    //       { id: 12, name: 'admin', remark: '公司管理员' },
+    //       { id: 14, name: 'dept_manager', remark: '部门管理者' },
+    //       { id: 13, name: 'point_manager', remark: '积分管理员' },
+    //     //   { id: 11, name: 'creator', remark: '创始人' }
+    //     ],
+    //     superior_list: [{id: 164,name: "刘瑞欣"},
+	// 			{id: 165,name: "方慧毅"},
+	// 			{id: 166,name: "郭家裕(创始人)"},
+	// 			{id: 184,name: "莫仕钊"},
+	// 			{id: 185,name: "秦杨升"},
+	// 			{id: 187,name: "梁丽焕"},
+	// 			{id: 188,name: "刘俊华"},{id: 167,name: "蔡文"}]
+    //   },
+    //   id: 186,
+    //   img_url: "https://static-legacy.dingtalk.com/media/lADPBE1Xcf-wCfbNAwvNAwA_768_779.jpg",
+    //   is_admin: 0,
+    //   is_creator: 0,
+    //   is_official: 1,
+    //   is_scope: 1,
+    //   letter_index: 'C',
+    //   name: '程健',
+    //   point_config: {
+    //     deduct_task_monthly: [
+    //       {
+    //         name: "A分",
+    //         point: "0",
+    //         pt_id: 2
+    //       },
+    //       {
+    //         name: "B分",
+    //         point: "0",
+    //         pt_id: 3
+    //       }
+    //     ],
+    //     reward_ratio: 0,
+    //     exec_count: 0,
+    //     exec_count_point: 0,
+    //     reward_ratio_point: 0,
+    //     service_point: 0,
+    //     entry_limit: 1000,
+    //     point_limit: [
+    //       {
+    //         name: "A分",
+    //         point: "200",
+    //         pt_id: 2
+    //       },
+    //       {
+    //         name: "B分",
+    //         point: "100",
+    //         pt_id: 3
+    //       }
+    //     ],
+    //     reward_task_monthly: [
+    //       {
+    //         name: "A分",
+    //         point: "0",
+    //         pt_id: 2
+    //       },
+    //       {
+    //         name: "B分",
+    //         point: "0",
+    //         pt_id: 3
+    //       }
+    //     ],
+    //   },
+    //   post: '',
+    //   site_config: {
+    //     base_point: 120,
+    //     rule_limit_check: 1,
+    //     task_review: 0,
+    //     service_point: 120,
+    //     a2b: 0
+    //   },
+    //   site_id: 15
+    // };
     // localStorage.setItem('userData',JSON.stringify(user));
 	}
 };

+ 8 - 6
src/index.vue

@@ -144,12 +144,14 @@ export default {
 			this.getCorp(corpId);
 		}
 		this.$nextTick(function() {
-			if (localStorage.getItem('wn_show')) {
-				this.wn_show = false;
-				this.isShowWn=false;
-			} else {
-				this.wn_show = true;
-				localStorage.setItem('wn_show','true');
+			if(!this.$authoritys('employee') && !this.$authoritys('dept_manager')){
+				if (localStorage.getItem('wn_show')) {
+					this.wn_show = false;
+					this.isShowWn=false;
+				} else {
+					this.wn_show = true;
+					localStorage.setItem('wn_show','true');
+				}
 			}
 		});
 	},

+ 2 - 5
src/init.vue

@@ -79,18 +79,15 @@ export default {
 						var is = false;
 						if (res.data.code == 1) {
 							var { token, user } = res.data.data;
-							if (user.is_official == 1) {
-									is = true;
-							}
 							// user.employee_detail.role_list.forEach(item => {
 							// 	if (user.is_official == 1) {
 							// 		if (item.name == 'admin' || item.name == 'creator' || item.name == 'point_manager') {is = true;}
 							// 	}
 							// });
-							if (is) {
+							if (user.is_official==1) {
 								that.$setUserData(user);
 								that.$router.replace({ path: '/index' });
-							} else {
+							}else{
 								that.$router.replace({ path: '/noAccess' });
 							}
 						}else if(res.data.code==2001){

+ 9 - 9
src/views/common/below/rewardTask.vue

@@ -431,13 +431,13 @@
   }
 </script>
 <style lang="scss">
-  .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;
-    }
-  }
+  // .el-cascader-menu .el-cascader-menu__wrap .el-scrollbar__view li.el-cascader-node {
+  //   height: auto;
+  //   max-width: 500px;
+  //   .el-cascader-node__label {
+  //     white-space: initial;
+  //     overflow: initial;
+  //     text-overflow: initial;
+  //   }
+  // }
 </style>

+ 11 - 0
src/views/ranking/dept_rank.vue

@@ -666,4 +666,15 @@ export default {
 	padding: 9px 20px 7px 10px;
 }
 </style>
+<style lang="scss">
+// .el-cascader-menu .el-cascader-menu__wrap .el-scrollbar__view li.el-cascader-node {
+//   height: auto;
+//   max-width: 500px;
+//   .el-cascader-node__label {
+//     white-space: initial;
+//     overflow: initial;
+//     text-overflow: initial;
+//   }
+// }
+</style>
 <!--  -->

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

@@ -368,3 +368,14 @@ export default {
 	}
 }
 </style>
+<style lang="scss">
+// .el-cascader-menu .el-cascader-menu__wrap .el-scrollbar__view li.el-cascader-node {
+//   height: auto;
+//   max-width: 500px;
+//   .el-cascader-node__label {
+//     white-space: initial;
+//     overflow: initial;
+//     text-overflow: initial;
+//   }
+// }
+</style>

+ 1 - 0
src/views/set/check.vue

@@ -2,6 +2,7 @@
  <div>
 	 <div v-loading="loading" v-if="ding_enable">
 	   <workpoints :initia_arr="initia_arr" v-if="!loading" :initia_head="initia_head" :obj="obj" @initia="initia" />
+  	   <div class="all" v-else></div>
 	 </div>
 	 <div v-else class="all">
 		 <div class="nullD">请到钉钉考勤管理后台-<span class="blue"> 工作台 </span>-<span class="blue"> 考勤打卡 </span>-<span class="blue"> 考勤报表 </span>-<span class="blue">切换新版 </span>-开启新版考勤报表功能</div>

+ 7 - 2
src/views/set/framework.vue

@@ -13,7 +13,7 @@
 		<div class="all">
 			<div class="flex-box">
 				<div class="terr-left">
-					<div class="rule_class_box">
+					<div class="rule_class_box" v-loading="ruleDeprt">
 							<div class="company_name">
 								<img src="@/assets/image/two.png" />
 								<span>组织架构</span>
@@ -140,8 +140,9 @@ export default {
 			tbLoading: false,
 			selectIds: [],
 			enable_loading:false,
-			visible:false
+			visible:false,
 			
+			ruleDeprt:false,
 		};
 	},
 	components: {
@@ -223,6 +224,7 @@ export default {
 		},
 		//获取公司信息
 		getInfo(is) {
+			this.ruleDeprt = true
 			// api/test?employee_id=155
 			this.$axios('get','/api/site/info').then(res => {
 				this.info = res.data.data;
@@ -244,6 +246,7 @@ export default {
 		},
 		//获取部门
 		getDepartment() {
+			this.ruleDeprt = true
 			this.$axios('get','/api/department/tree').then(res => {
 				var list=[{
 					id:0,
@@ -251,6 +254,8 @@ export default {
 					_child:res.data.data.list
 				}]
 				this.bmList = list;
+			}).finally(()=>{
+				this.ruleDeprt = false
 			});
 		},
 		//获取员工