Browse Source

1.0.1 合并版本

347617796@qq.com 4 years ago
parent
commit
9dbd6ece52

+ 4 - 4
package-lock.json

@@ -4334,8 +4334,8 @@
     },
     "echarts": {
       "version": "4.9.0",
-      "resolved": "https://registry.npmjs.org/echarts/-/echarts-4.9.0.tgz",
-      "integrity": "sha512-+ugizgtJ+KmsJyyDPxaw2Br5FqzuBnyOWwcxPKO6y0gc5caYcfnEUIlNStx02necw8jmKmTafmpHhGo4XDtEIA==",
+      "resolved": "https://registry.npm.taobao.org/echarts/download/echarts-4.9.0.tgz",
+      "integrity": "sha1-qbm6oD8Doqcx5jQMVb77V6nhNH0=",
       "requires": {
         "zrender": "4.3.2"
       }
@@ -11995,8 +11995,8 @@
     },
     "zrender": {
       "version": "4.3.2",
-      "resolved": "https://registry.npmjs.org/zrender/-/zrender-4.3.2.tgz",
-      "integrity": "sha512-bIusJLS8c4DkIcdiK+s13HiQ/zjQQVgpNohtd8d94Y2DnJqgM1yjh/jpDb8DoL6hd7r8Awagw8e3qK/oLaWr3g=="
+      "resolved": "https://registry.npm.taobao.org/zrender/download/zrender-4.3.2.tgz?cache=0&sync_timestamp=1605884245353&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fzrender%2Fdownload%2Fzrender-4.3.2.tgz",
+      "integrity": "sha1-7HQy+UFcgsc1hLa3uMR+GwFiCcY="
     }
   }
 }

+ 4 - 4
src/api/axios.js

@@ -8,7 +8,7 @@ import qs from 'qs'
 const service = axios.create({
 	baseURL: process.env.VUE_APP_BASE_API, 
 	// baseURL:'https://ding.insys.g107.com/',
-	timeout: 15000,
+	timeout: 10000,
 	headers: {
 		'Content-Type': 'application/x-www-form-urlencoded',
 	},
@@ -19,8 +19,8 @@ const service = axios.create({
 service.interceptors.request.use(
 	config => {
 		if (getToken()) {
-			// config.headers['A-Token'] = getToken()
-			config.headers['A-Token'] = ' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvdGVzdC1kaW5nLmcxMDcuY29tXC9hcGlcL2RpbmdcL2xvZ2luIiwiaWF0IjoxNjA4NTM1Nzc1LCJleHAiOjE2MDkxMzU3NzUsIm5iZiI6MTYwODUzNTc3NSwianRpIjoidWd5NjNHYTNBY1Jid2JFOCIsInN1YiI6MTY3LCJwcnYiOiJjYTY0ODlkNTBmMjQwN2E2NzgzMGU4MDkwZDAxNDg4MzU2ODU5NjJiIiwicm9sZSI6ImVtcGxveWVlIn0.89yfeHMATS4YIhMn3JTUOc3zdX9W1Q_4pPmKHQB5HVY'
+			config.headers['A-Token'] = getToken()
+			// config.headers['A-Token'] = ' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvdGVzdC1kaW5nLmcxMDcuY29tXC9hcGlcL2RpbmdcL2xvZ2luIiwiaWF0IjoxNjA4NTM1Nzc1LCJleHAiOjE2MDkxMzU3NzUsIm5iZiI6MTYwODUzNTc3NSwianRpIjoidWd5NjNHYTNBY1Jid2JFOCIsInN1YiI6MTY3LCJwcnYiOiJjYTY0ODlkNTBmMjQwN2E2NzgzMGU4MDkwZDAxNDg4MzU2ODU5NjJiIiwicm9sZSI6ImVtcGxveWVlIn0.89yfeHMATS4YIhMn3JTUOc3zdX9W1Q_4pPmKHQB5HVY'
 			// config.headers['A-Token'] = ' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvdGVzdC1kaW5nLmcxMDcuY29tXC9hcGlcL2RpbmdcL2xvZ2luIiwiaWF0IjoxNjA4MTAxMTUwLCJleHAiOjE2MDg3MDExNTAsIm5iZiI6MTYwODEwMTE1MCwianRpIjoiRzd0VURhUmNaYTg4bjF2cyIsInN1YiI6MTY2LCJwcnYiOiJjYTY0ODlkNTBmMjQwN2E2NzgzMGU4MDkwZDAxNDg4MzU2ODU5NjJiIiwicm9sZSI6ImVtcGxveWVlIn0.RIZhoHAsj4Ru_Ap3sKgyfiG1fayG1Hgw7si9aekU8eE'
 		}
 		return config
@@ -71,7 +71,7 @@ service.interceptors.response.use(
 				type: 'error',
 			})
 			return Promise.reject(error.message)
-		}else if(error.message=='timeout of 15000ms exceeded'){
+		}else if(error.message=='timeout of 10000ms exceeded'){
 			Message({
 				message: '请求超时,请稍后再试',
 				type: 'error',

+ 41 - 41
src/components/bonusPointsPopup.vue

@@ -269,47 +269,47 @@ export default {
 	mounted() {
 		this.manage_scope = this.$getUserData().employee_detail.manage_scope;
 		this.superior_list = this.$getUserData().employee_detail.superior_list;
-		var user = {
-			accedence_time: '2020-12-16 16:32:27',
-			company_id: '',
-			company_info: { creator_ids: [167, 166, 165], id: 15, industry: '计算机软件', is_official: 1, logo_url: '', name: '测试组织', status: 1, user_count_max: 50 },
-			employee_detail: {
-				dept_list: [{ dept_id: 432675338, dept_name: '技术' }],
-				manage_scope: [{ id: 164, name: '刘瑞欣' }, { id: 184, 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: 167,
-			img_url: '',
-			is_admin: 0,
-			is_creator: 1,
-			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 }],
-				entry_limit: 0,
-				exec_count: 0,
-				exec_count_point: 0,
-				point_limit: [{ name: 'A分', point: 0, pt_id: 2 }, { name: 'B分', point: 0, pt_id: 3 }],
-				reward_ratio: 0,
-				reward_ratio_point: 0,
-				reward_task_monthly: [{ name: 'A分', point: 0, pt_id: 2 }, { name: 'B分', point: 0, pt_id: 3 }],
-				service_point: 0
-			},
-			post: '',
-			site_config: { a2b: 0, base_point: 0, rule_limit_check: 1, service_point: 0, task_review: 0 },
-			site_id: 15
-		};
-		localStorage.setItem('userData',JSON.stringify(user));
+		// var user = {
+		// 	accedence_time: '2020-12-16 16:32:27',
+		// 	company_id: '',
+		// 	company_info: { creator_ids: [167, 166, 165], id: 15, industry: '计算机软件', is_official: 1, logo_url: '', name: '测试组织', status: 1, user_count_max: 50 },
+		// 	employee_detail: {
+		// 		dept_list: [{ dept_id: 432675338, dept_name: '技术' }],
+		// 		manage_scope: [{ id: 164, name: '刘瑞欣' }, { id: 184, 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: 167,
+		// 	img_url: '',
+		// 	is_admin: 0,
+		// 	is_creator: 1,
+		// 	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 }],
+		// 		entry_limit: 0,
+		// 		exec_count: 0,
+		// 		exec_count_point: 0,
+		// 		point_limit: [{ name: 'A分', point: 0, pt_id: 2 }, { name: 'B分', point: 0, pt_id: 3 }],
+		// 		reward_ratio: 0,
+		// 		reward_ratio_point: 0,
+		// 		reward_task_monthly: [{ name: 'A分', point: 0, pt_id: 2 }, { name: 'B分', point: 0, pt_id: 3 }],
+		// 		service_point: 0
+		// 	},
+		// 	post: '',
+		// 	site_config: { a2b: 0, base_point: 0, rule_limit_check: 1, service_point: 0, task_review: 0 },
+		// 	site_id: 15
+		// };
+		// localStorage.setItem('userData',JSON.stringify(user));
 	},
 	methods: {
 		submitEmployee(name) {

+ 47 - 58
src/home.vue

@@ -1,8 +1,5 @@
 <template>
   <div class="">
-    <!-- <div class="data-all"> -->
-    <!-- <img src="./assets/image/init.gif" class="appImg" />
-			<div>管理执行难,就用功道云</div> -->
     <el-row style="min-width:1160px;">
       <el-col :span="18" style="min-width:780px;">
         <el-row class="home-left-header">
@@ -139,20 +136,12 @@
             </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 style="width:100%;height:40px;margin-top:20px;">
+              <el-radio-group v-model="tabPosition" style="margin-bottom: 30px;display:flex">
+                <div v-for="(item, index) in rankingList" :key="index">
+                  <el-radio-button   :label="item.val"  @click.native="tabPositions($event, item)">
+					  <span class="font-flex-word" style="width:100px;coloe:#606266;display: block;">{{ item.group_name }}</span>
+				  </el-radio-button>
                 </div>
               </el-radio-group>
             </div>
@@ -1375,47 +1364,47 @@ export default {
     },
   },
   created() {
-		var user = {
-      accedence_time: '2020-12-16 16:32:27',
-      company_id: '',
-      company_info: { creator_ids: [167, 166, 165], id: 15, industry: '计算机软件', is_official: 1, logo_url: '', name: '测试组织', status: 1, user_count_max: 50 },
-      employee_detail: {
-        dept_list: [{ dept_id: 432675338, dept_name: '技术' }],
-        manage_scope: [{ id: 164, name: '刘瑞欣' }, { id: 184, 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: 167,
-      img_url: '',
-      is_admin: 0,
-      is_creator: 1,
-      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 }],
-        entry_limit: 0,
-        exec_count: 0,
-        exec_count_point: 0,
-        point_limit: [{ name: 'A分', point: 0, pt_id: 2 }, { name: 'B分', point: 0, pt_id: 3 }],
-        reward_ratio: 0,
-        reward_ratio_point: 0,
-        reward_task_monthly: [{ name: 'A分', point: 0, pt_id: 2 }, { name: 'B分', point: 0, pt_id: 3 }],
-        service_point: 0
-      },
-      post: '',
-      site_config: { a2b: 0, base_point: 0, rule_limit_check: 1, service_point: 0, task_review: 0 },
-      site_id: 15
-    };
-    localStorage.setItem('userData',JSON.stringify(user));
+		// var user = {
+  //     accedence_time: '2020-12-16 16:32:27',
+  //     company_id: '',
+  //     company_info: { creator_ids: [167, 166, 165], id: 15, industry: '计算机软件', is_official: 1, logo_url: '', name: '测试组织', status: 1, user_count_max: 50 },
+  //     employee_detail: {
+  //       dept_list: [{ dept_id: 432675338, dept_name: '技术' }],
+  //       manage_scope: [{ id: 164, name: '刘瑞欣' }, { id: 184, 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: 167,
+  //     img_url: '',
+  //     is_admin: 0,
+  //     is_creator: 1,
+  //     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 }],
+  //       entry_limit: 0,
+  //       exec_count: 0,
+  //       exec_count_point: 0,
+  //       point_limit: [{ name: 'A分', point: 0, pt_id: 2 }, { name: 'B分', point: 0, pt_id: 3 }],
+  //       reward_ratio: 0,
+  //       reward_ratio_point: 0,
+  //       reward_task_monthly: [{ name: 'A分', point: 0, pt_id: 2 }, { name: 'B分', point: 0, pt_id: 3 }],
+  //       service_point: 0
+  //     },
+  //     post: '',
+  //     site_config: { a2b: 0, base_point: 0, rule_limit_check: 1, service_point: 0, task_review: 0 },
+  //     site_id: 15
+  //   };
+  //   localStorage.setItem('userData',JSON.stringify(user));
     
   },
 };

+ 3 - 3
src/main.js

@@ -18,9 +18,9 @@ import userImage from '@/components/UserImage'
 Vue.component('userImage', userImage)
 
 Vue.use(ElementUI);
-// if (process.env.NODE_ENV === 'development') {
-//   new VConsole()
-// }
+if (process.env.NODE_ENV === 'development') {
+  new VConsole()
+}
 Vue.prototype.$echarts = echarts
 Vue.prototype.$dd=dd;
 Vue.prototype.$getToken = getToken

+ 7 - 6
src/views/ranking/custom_rank.vue

@@ -27,7 +27,7 @@
 					<div class="listData" v-loading="table_loading" v-if="table_list.length > 0">
 						<div class="flex-box">
 							<div class="flex-box flex-v-ce margin-bottom">
-								<div class="groupsName">{{groups_info.name}}<span class="blue">({{groups_info.employees.length}}人)</span></div>
+								<div class="groupsName">{{groups_info.name}}<span class="blue">({{total}}人)</span></div>
 								<el-button @click="editGroup" size="medium">编辑</el-button>
 							</div>
 						</div>
@@ -498,11 +498,11 @@ export default {
 				that.newGroupForm.group_name = res.name;
 				
 				// 规则
-				let itemsBjRule_ID = [];
+				that.newGroupForm.items = [];
 				for (let i in res.items) {
-				  itemsBjRule_ID.push(res.items[i].id);
+				  that.newGroupForm.items.push(res.items[i].id);
 				}
-				that.valuesOrLength = itemsBjRule_ID;
+				that.valuesOrLength = that.newGroupForm.items;
 				if (that.valuesOrLength.length >= 1) {
 				  that.newGroupFormRules = that.valuesOrLength.length + '条规则';
 				  that.ruleHint = '统计已选规则的积分(只选分类不指定规则的积分除外)'
@@ -534,7 +534,6 @@ export default {
 		  this.saveLoad = true;
 		  var url=this.popupType? '/api/integral/statistics/groups/create':'/api/integral/statistics/groups'
 		  this.newGroupForm.group_id=this.groups_info.id;
-		  console.log(this.newGroupForm)
 		  // return;
 		  var obj={//为编辑时
 			  name:this.newGroupForm.group_name,
@@ -544,7 +543,6 @@ export default {
 		  this.$axios('post',url,this.newGroupForm).then((res) => {
 		    if (res.data.code == 1) {
 				this.$message.success(res.data.msg);
-				this.resetForm('newGroupForm');
 				if(!this.popupType){//为编辑时
 					this.groups_info=obj;
 				}
@@ -553,6 +551,7 @@ export default {
 				}else{
 					this.get_groups_list()
 				}
+				this.resetForm('newGroupForm');
 		    }else{
 			  this.saveLoad = false
 		      this.$message.error(res.data.msg)
@@ -573,6 +572,7 @@ export default {
 		// 新增分组
 		addGroup(){
 			this.employee_not_select = []
+			this.newGroupFormRules='';
 			this.employees_selected = {employee:[], dept: []}
 			this.newGroupForm = {
 				group_name: "",
@@ -609,6 +609,7 @@ export default {
 		// 选人组件提交
 		move_employee_confirm(data){
 			this.employeeNames='';
+			this.newGroupForm.employees=[];
 			var employee=data.employee;
 			if(employee.length>0){
 				employee.forEach(item=>{

+ 8 - 22
src/views/ranking/manager_statistics.vue

@@ -67,17 +67,10 @@
 		    <el-table :data="last" style="width: 100%" v-loading="loading">
             <el-table-column label="管理者">
               <template slot-scope="scope">
-                <userImage
-                  class="fl"
-                  :id="scope.row.id"
-                  :user_name="scope.row.name"
-                  :img_url="scope.row.img_url"
-                  width="50px"
-                  height="50px"
-                ></userImage>
-                <span
-                  style=" margin-left: 10px; line-height: 50px; display: inline-block;"
-                >{{ scope.row.name }}</span>
+				<div class="flex-box flex-v-ce">
+					<userImage class="fl" :user_name="scope.row.name" :img_url="scope.row.img_url" width="50px"  height="50px"></userImage>
+					<span style=" margin-left: 10px; line-height: 50px; display: inline-block;">{{ scope.row.name }}</span>
+				</div>  
               </template>
             </el-table-column>
             <el-table-column label="奖分" prop="scope_count">
@@ -163,17 +156,10 @@
           <el-table :data="list" style="width: 100%" v-loading="loading" @row-click="open_detail">
             <el-table-column label="管理者">
               <template slot-scope="scope">
-                <userImage
-                  class="fl"
-                  :id="scope.row.id"
-                  :user_name="scope.row.name"
-                  :img_url="scope.row.img_url"
-                  width="50px"
-                  height="50px"
-                ></userImage>
-                <span
-                  style=" margin-left: 10px; line-height: 50px; display: inline-block;"
-                >{{ scope.row.name }}</span>
+				<div class="flex-box flex-v-ce">
+					<userImage class="fl" :user_name="scope.row.name" :img_url="scope.row.img_url" width="50px"  height="50px"></userImage>
+					<span style=" margin-left: 10px; line-height: 50px; display: inline-block;">{{ scope.row.name }}</span>
+				</div>  
               </template>
             </el-table-column>
             <el-table-column label="管理范围(人)" prop="scope_count"></el-table-column>

+ 170 - 19
src/views/set/jurisdiction.vue

@@ -25,23 +25,23 @@
 						<div class="flex-box flex-v-ce">
 							<div class="name">{{ item_info.name }}</div>
 							<div class="flex-1"></div>
-							<el-button type="primary" size="medium" plain @click="open_right(item_info)">刷新</el-button>
+							<el-button type="text" size="medium" style=" padding: 0; line-height: initial;" v-show="item_info.code !== 'creator'" @click="dataAccessPopup">数据查看权限</el-button>
+							<el-button type="text" size="medium" plain @click="open_right(item_info)">刷新</el-button>
 						</div>
-						<div class="user_text fontColorF" v-if="item_info.code == 'creator'">创始人默认为开通【功道云积分制】的人</div>
-						<div class="user_text fontColorF" v-if="item_info.code == 'admin'">公司管理员即钉钉的【子管理员】,在钉钉管理后台设置后即可同步</div>
+						<div class="user_text fontColorF" v-if="item_info.code == 'creator'">创始人默认为开通【功道云积分制】的人,拥有所有的功能及管理权限</div>
+						<div class="user_text fontColorF" v-if="item_info.code == 'admin'">公司管理员一般为合伙人、股东等高级管理人员,可管理多个部门和人员</div>
 						<div class="user_text fontColorF" v-if="item_info.code == 'point_manager'">积分专员一般为人事、行政等管理督办人员,可管理多个部门和人员</div>
 						<div class="user_text fontColorF" v-if="item_info.code == 'dept_manager'">部门管理员一般为部门/团队经理、主管、组长,可管理一部分人员</div>
 						<div class="user_text fontColorF" v-if="item_info.code == 'employee'">员工为默认角色,每个人都拥有员工角色的功能权限,该角色不可修改</div>
 					</div>
 					<div class="flex-box btns flex-v-ce margin-bottom">
-						<el-button size="small" v-show="item_info.code == 'creator' && table_list.length > 1 && isStart" @click="del_creator" type="danger">删除</el-button>
-						<el-button size="small" v-show="item_info.code == 'creator' && isStart" @click="dialogFormVisible=true" type="primary">添加</el-button>
-						
-						<el-button size="small" v-show="item_info.code != 'creator' && table_list.length > 0" @click="del_item" type="danger">删除</el-button>
-						<el-button size="small" v-show="item_info.code != 'creator'" @click="add_item" type="primary">添加</el-button>
+							<el-button size="small" v-show="item_info.code == 'creator' && table_list.length > 1 && isStart" @click="del_creator" type="danger">删除</el-button>
+							<el-button size="small" v-show="item_info.code == 'creator' && isStart" @click="dialogFormVisible=true" type="primary">添加</el-button>
+							<el-button size="small" v-show="item_info.code != 'creator' && table_list.length > 0" @click="del_item" type="danger">删除</el-button>
+							<el-button size="small" v-show="item_info.code != 'creator'" @click="add_item" type="primary">添加</el-button>
 					</div>
 					<div v-if="item_info.code == 'creator'||item_info.code == 'employee'">
-						<el-table :data="table_list"  v-loading="table_loading" v-if="table_list.length > 0">
+						<el-table :data="table_list"  v-loading="table_loading">
 							<el-table-column width="40" fixed  v-if="item_info.code == 'creator' && table_list.length > 1 && isStart">
 								<template slot-scope="scope">
 									<el-radio v-model="radioVal" :label="scope.row.id"></el-radio>
@@ -61,13 +61,13 @@
 									<template v-slot:default>
 										<div style="position: inherit;">
 											还没有{{ item_info.name }},
-											<span style="color:#26A2FF;cursor:pointer;" @click="add_item">去添加>></span>
+											<span style="color:#26A2FF;cursor:pointer;" @click="dialogFormVisible=true">去添加>></span>
 										</div>
 									</template>
 								</noData>
 							</template>
 						</el-table>
-						<div v-else style="text-align: center;">
+<!-- 						<div v-else style="text-align: center;">
 							<template>
 								<div style="margin-top: 10%;margin-bottom: 10px;">
 									创始人即钉钉的主管理员,请确认应用的使用范围中是否选择了主管理员设置步骤:
@@ -76,7 +76,7 @@
 									进入【<span class="blue">钉钉管理后台</span>】→【<span class="blue">工作台</span>】→【<span class="blue">功道云积分制</span>】→【<span class="blue">设置</span>】,修改可见范围为全部员工或从部分员工中选上主管理员
 								</div>
 							</template>
-						</div>
+						</div> -->
 					</div>
 
 					<el-table :data="table_list" fit v-else   v-loading="table_loading">
@@ -408,13 +408,33 @@
 			:can_select_dept="false" 
 			@confirm="selectBoss">
 			</EmployeeSelector>
-		  <div style="text-align: center;" class="fontColorT">创始人至少有一位,创始人不能删除增加</div>
+		  <div style="text-align: center;" class="fontColorT">创始人至少有一位,创始人不能删除自己</div>
 		  <div slot="footer" class="dialog-footer">
 		    <el-button @click="dialogFormVisible=false" :disabled="isShowBoss">取 消</el-button>
 		    <el-button type="primary" :loading="isShowBoss" :disabled="isShowBoss" @click="add_creator()">确 定</el-button>
 		  </div>
 		</el-dialog>
-	
+		<!-- 查看管理范围 -->
+		<el-dialog
+		  title="数据查看权限"
+		  :visible.sync="dataAccessShow"
+		  width="600px">
+		  <div v-loading="dataAccessLoading">
+		    <el-form label-width="120px">
+		      <el-form-item v-for="(item,index) in jurisdiction" :key="index" :label="item.title">
+		        <el-radio-group v-model="item.code">
+		          <el-col :span="24" v-for="(d,index) in item.list" :key="index" style="padding: 10px 0" >
+		            <el-radio :label="d.id" class="radioBox" >{{d.name}}</el-radio>
+		          </el-col>
+		        </el-radio-group>
+		      </el-form-item>
+		    </el-form>
+		  </div>
+		  <span slot="footer">
+		    <el-button :disabled="setDataAccessBtn" @click="dataAccessShow = false">取消</el-button>
+		    <el-button :disabled="setDataAccessBtn" type="primary" @click="setDataAccess">确定</el-button>
+		  </span>
+		</el-dialog>
 	</div>
 </template>
 
@@ -479,7 +499,74 @@ export default {
 			// BOSS操作
 			dialogFormVisible:false,//控制添加老板弹窗
 			bossObj:'',
-			isShowBoss:false
+			isShowBoss:false,
+			
+			// 控制管理范围
+			dataAccessShow: false,
+			setDataAccessBtn: false,
+			dataAccessLoading: false,
+			jurisdiction:[],
+			// 除员工外权限范围数据
+			dataAccessList: [
+			  {
+			    title: '查看积分事件',
+			    name: 'event_range',
+			    code: 0,
+			    list: [
+			      {name: '仅查看自己的数据', id: 1},
+			      {name: '查看自己以及管理范围内用户的数据', id: 2},
+			      {name: '查看全员数据', id: 3}
+			    ]
+			  },
+			  {
+			    title: '管理者奖扣',
+			    name: 'prize_range',
+			    code: 0,
+			    list: [
+			      {name: '查看自己以及管理范围内管理者的数据', id: 1},
+			      {name: '查看全部管理者的数据', id: 2},
+			    ]
+			  },
+			  // {
+			  //   title: '团队绩效',
+			  //   name: 'performance_range',
+			  //   code: 0,
+			  //   list: [
+			  //     {name: '查看自己以及管理范围内用户的数据', id: 1},
+			  //     {name: '查看全员数据', id: 2},
+			  //   ]
+			  // },
+			  // {
+			  //   title: '团队数据',
+			  //   name: 'statistics_range',
+			  //   code: 0,
+			  //   list: [
+			  //     {name: '查看自己以及管理范围内用户的数据', id: 1},
+			  //     {name: '查看全员数据', id: 2},
+			  //   ]
+			  // },
+			],
+			// 员工权限范围数据
+			dataAccessListEmployee: [
+			  {
+			    title: '积分事件',
+			    name: 'event_range',
+			    code: 0,
+			    list: [
+			      {name: '看自己的', id: 2},
+			      {name: '查看全员数据', id: 3}
+			    ]
+			  },
+			  {
+			    title: '团队绩效',
+			    name: 'performance_range',
+			    code: 0,
+			    list: [
+			      {name: '仅查看自己的数据', id: 1},
+			      {name: '查看全员数据', id: 2},
+			    ]
+			  }
+			],
 		};
 	},
 	components: { EmployeeSelector, noData },
@@ -496,6 +583,67 @@ export default {
 		}
 	},
 	methods: {
+		// 数据查看权限弹窗
+		dataAccessPopup(){
+		  this.dataAccessShow = true
+		  this.getDataAccess()
+		},
+		// 获取数据范围权限
+		getDataAccess(){
+		  let self = this
+		  self.dataAccessLoading = true
+		  self.$axios('get','/api/role/range',{role_id: self.item_info.id}).then((res) => {
+		    if (res.data.code == 1) {
+		      const resData = res.data.data
+		      if(this.item_info.id != '909'){
+		        self.dataAccessList.forEach(element => {
+		          element.name == 'event_range'?element.code = resData.event_range:''
+		          element.name == 'prize_range'?element.code = resData.prize_range:''
+		          element.name == 'performance_range'?element.code = resData.performance_range:''
+		          element.name == 'statistics_range'?element.code = resData.statistics_range:''
+		        });
+		      }else{
+		        self.dataAccessListEmployee.forEach(element => {
+		          element.name == 'event_range'?element.code = resData.event_range:''
+		          element.name == 'performance_range'?element.code = resData.performance_range:''
+		        });
+		      }
+		    } else {
+		      self.$message.error(res.data.msg)
+		    }
+		  }).finally(()=>{
+		    self.dataAccessLoading = false
+		  })
+		},
+		// 设置数据范围权限
+		setDataAccess(){
+		  let self = this
+		  let data = {
+		    role_id: self.item_info.id
+		  }
+		  self.setDataAccessBtn = true
+		  self.jurisdiction.forEach(element => {
+		    data[element.name] = element.code
+		  });
+		  if(self.item_info.id == '909'){
+		    data.prize_range = '1',
+		    data.statistics_range = '1'
+		  }
+		  data.performance_range="1";
+		  data.statistics_range="1";
+		  self.$axios('post','/api/role/range',data).then((res) => {
+		    if (res.data.code == 1) {
+		      self.dataAccessShow = false
+		      self.$message.success(res.data.msg)
+		    }else{
+		      self.$message.error(res.data.msg)
+		    }
+		  }).finally(()=>{
+		    self.setDataAccessBtn = false
+		  })
+		},
+		
+		
 		selectBoss(val){
 			if(val.employee.length>0){
 				this.bossObj=val.employee[0].id
@@ -751,6 +899,7 @@ export default {
 				});
 		},
 		open_right(data) {
+			this.jurisdiction=data.code=='employee'? this.dataAccessListEmployee:this.dataAccessList;
 			this.item_info = data;
 			this.get_table_list();
 		},
@@ -774,10 +923,9 @@ export default {
 						});
 						this.table_list = list||[];
 					}
-				})
-				.finally(() => {
-					this.table_loading = false;
-				});
+			}).finally(() => {
+				this.table_loading = false;
+			});
 		},
 		// 关闭提示语
 		tips_close() {
@@ -792,6 +940,9 @@ export default {
 ::v-deep .el-radio .el-radio__label {
 	display: none;
 }
+::v-deep .radioBox .el-radio__label {
+	display: inline-block;
+}
 .tips {
 	background: #dcdfe6;
 	border-radius: 50%;