Jelajahi Sumber

添加权限划分,防多次点击功能

347617796@qq.com 4 tahun lalu
induk
melakukan
5b40dfdb73

+ 4 - 2
src/api/axios.js

@@ -20,8 +20,8 @@ const service = axios.create({
 service.interceptors.request.use(
 	config => {
 		// if (getToken()) {
-			// config.headers['A-Token'] = getToken()
-			config.headers['A-Token'] = ' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC90ZXN0LWRpbmcuZzEwNy5jb21cL2FwaVwvdGVzdCIsImlhdCI6MTU5NzczMjEyMCwiZXhwIjoxNTk4MzMyMTIwLCJuYmYiOjE1OTc3MzIxMjAsImp0aSI6IkpXdnYwVkw2NUhNWlJsYmoiLCJzdWIiOjIsInBydiI6ImNhNjQ4OWQ1MGYyNDA3YTY3ODMwZTgwOTBkMDE0ODgzNTY4NTk2MmIiLCJyb2xlIjoiZW1wbG95ZWUifQ.TENwTUJ7bLzy7JuSnTpvDT-YXA6Tg8CILVQ2qMnbQzo'
+		// 	config.headers['A-Token'] = getToken()
+			config.headers['A-Token'] = ' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC90ZXN0LWRpbmcuZzEwNy5jb21cL2FwaVwvdGVzdCIsImlhdCI6MTU5ODMxOTYyMCwiZXhwIjoxNTk4OTE5NjIwLCJuYmYiOjE1OTgzMTk2MjAsImp0aSI6IndjelpldVZ6ZnlOdHRQYmgiLCJzdWIiOjIsInBydiI6ImNhNjQ4OWQ1MGYyNDA3YTY3ODMwZTgwOTBkMDE0ODgzNTY4NTk2MmIiLCJyb2xlIjoiZW1wbG95ZWUifQ.zdDyluo2f4Ilk1EDwZ2fd0Fr_tuhqwMoTXkfzRRrWWk'
 		// }
 		return config
 	},
@@ -45,11 +45,13 @@ service.interceptors.response.use(
 				message: response.data.msg,
 				type: 'error',
 			})
+			return Promise.reject('error')
 		}else{
 			Message({
 				message: response.data.msg,
 				type: 'error',
 			})
+			return Promise.reject('error')
 		}
 	
 	},

+ 10 - 1
src/assets/css/reset.css

@@ -188,7 +188,6 @@ table { border-collapse:collapse; border-spacing:0; }
 .all{
 	background-color: #fff;
 	border-radius: 5px;
-	/* height: 100%; */
 	min-height:calc(100vh - 184px);
 	min-width: 800px;
 }
@@ -196,6 +195,16 @@ table { border-collapse:collapse; border-spacing:0; }
 	width: 200px;
 	box-sizing: border-box;
 	padding: 20px 10px;
+	max-height: 600px;
+	overflow: auto;
+}
+.terr-left::-webkit-scrollbar {
+	width: 3px;
+	height: 3px;
+	background-color: #fff;
+}
+.terr-left::-webkit-scrollbar-thumb {
+	background-color: #D9D9D9;
 }
 .terr-right{
 	padding: 20px;

+ 2 - 3
src/components/EmployeeSelector.vue

@@ -242,6 +242,7 @@
       }
     },
     methods: {
+		//全选择
       checkedChange(val){
         if (val) {
           for (let i in this.list) {
@@ -260,8 +261,7 @@
                 this.employee_selected_list.push(this.list[i])
               }
             }
-            // 未处理好 20200713
-            this.lsit.length == total?this.indeterminate = true:this.indeterminate = false
+            this.list.length == total?this.indeterminate = true:this.indeterminate = false
           })
         }else{
           this.clear_data()
@@ -399,7 +399,6 @@
       },
 
       close() {
-        //this.visible = false
         this.$emit('update:visible', false)
         this.$emit('cancel')
         if (this.close_clear_data) {

+ 35 - 14
src/index.vue

@@ -10,7 +10,7 @@
 					<div class="name flex-1">{{ info.name }}</div>
 					<div class="flex-box flex-v-ce">
 						<div>您当前的版本:15~20人(剩余231天)</div>
-						<el-button size="small" class="upgrade" type="primary" icon="el-icon-upload">续费升级</el-button>
+						<el-button size="small" @click="tz" class="upgrade" type="primary" icon="el-icon-upload">续费升级</el-button>
 						<span class="wn">?</span>
 						<userImage :user_name="userData.name" :img_url="userData.img_url" width="44px" height="44px"></userImage>
 					</div>
@@ -45,29 +45,42 @@ export default {
 		this.routers = this.$router.options.routes[0].children;
 	},
 	mounted() {
-		// var url = window.location.href;
-		// var str = this.GetRequest(url).corpId || '123';
-		// var corpId = str.split('#')[0];
-		// if (corpId) {
-		// 	this.login(corpId);
-		this.getTypes();
-		// }
+		var url = window.location.href;
+		var str = this.GetRequest(url).corpId || '123';
+		var corpId = str.split('#')[0];
+		if (corpId) {
+			this.login(corpId);
+			this.getTypes();
+		}
 	},
 	methods: {
+		tz(){},
 		login(corpId) {
 			var that = this;
+			this.loading=true;
 			this.$dd.runtime.permission.requestAuthCode({
 				corpId: corpId, // 企业id
 				onSuccess: function(info) {
 					that.$axios.post('api/ding/login', { authCode: info.code, corpId: corpId }).then(res => {
-						console.log(res.data.code);
+						var is=false;
 						if (res.data.code == 1) {
 							var { token, user } = res.data.data;
-							that.$setToken(token);
-							that.$setUserData(user);
-							that.userData = user;
-							that.getInfo();
+							user.employee_detail.role_list.forEach(item=>{
+								if(item.name=='admin'||item.name=='creator'||item.name=='point_manager'){
+									is=true;
+								}
+							})
+							if(!is){
+								that.$setUserData(user);
+								that.userData = user;
+								that.getInfo();
+							}else{
+								that.$router.replace({path:'/noAccess'})
+							}
 						}
+					}).finally(() => {
+						console.log("|123")
+						that.loading = false;
 					});
 				}
 			});
@@ -76,7 +89,6 @@ export default {
 			var that = this;
 			this.$axios.get('api/site/info').then(res => {
 				that.info = res.data.data;
-				that.loading = false;
 			});
 		},
 		getTypes() {
@@ -147,6 +159,15 @@ export default {
 	background-color: #ccc;
 	height: calc(100vh - 60px);
 	overflow-y: scroll;
+	padding: 10px;
+}
+.el-main::-webkit-scrollbar{
+	width: 3px;
+	height: 10px;
+	background-color: #fff;
+}
+.el-main::-webkit-scrollbar-thumb {
+	background-color: #D9D9D9;
 }
 .logo-box {
 	width: 200px;

+ 3 - 3
src/main.js

@@ -14,9 +14,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.$dd=dd;
 Vue.prototype.$axios = service

+ 13 - 0
src/noAccess.vue

@@ -0,0 +1,13 @@
+<template>
+	<div class="noData">您不是相关管理人员,请联系管理员给与对应管理权限</div>
+</template>
+
+<script>
+</script>
+
+<style scoped="scoped">
+	.noData{
+		text-align: center;
+		margin-top: 25%;
+	}
+</style>

+ 5 - 0
src/router/index.js

@@ -48,6 +48,11 @@ Vue.use(VueRouter)
 		}
 	]
   },
+  {
+  path: '/noAccess',
+  name: '无权限',
+  component: () => import('@/noAccess'),
+  }
 ]
 
 const router = new VueRouter({

+ 12 - 3
src/views/framework.vue

@@ -46,7 +46,7 @@
 				</div>
 				<div class="terr-right border-right flex-1">
 					<div class="margin-bottom">
-						<el-button @click="participation()" size="medium" type="primary" style="margin-right: 10px;" v-show="selectIds.length > 0">参与积分管理</el-button>
+						<el-button @click="participation()" :loading="enable_loading" size="medium" type="primary" style="margin-right: 10px;" v-show="selectIds.length > 0">参与积分管理</el-button>
 						<el-input placeholder="输入同事姓名" size="medium" style="width: 230px;" v-model="keywords">
 							<el-button slot="append" icon="el-icon-search" @click="getEmployee()"></el-button>
 						</el-input>
@@ -118,7 +118,9 @@ export default {
 
 			tableToading: false,
 			tbLoading: false,
-			selectIds: []
+			selectIds: [],
+			enable_loading:false
+			
 		};
 	},
 	components: {
@@ -152,7 +154,6 @@ export default {
 			Promise.all([http1, http2]).then(res => {
 				this.tbLoading = false;
 				if (res[0]) {
-					this.tbLoading = false;
 					this.$message.success({ message: res[0].data.msg });
 					this.getInfo();
 				}
@@ -166,14 +167,20 @@ export default {
 					this.$message.success({ message: res.data.msg });
 				}
 				this.getEmployee();
+			}).catch(err=>{
+				console.log("123")
 			});
 		},
 		//批量开通权限
 		participation() {
+			this.enable_loading=true;
 			this.$axios.post('api/employee/enable', { employee_id: this.selectIds }).then(res => {
+				this.enable_loading=false;
 				if (res) {
 					this.getEmployee();
 				}
+			}).catch(err=>{
+				this.enable_loading=false;
 			});
 		},
 		//获取公司信息
@@ -208,6 +215,8 @@ export default {
 				this.tableToading = false;
 				this.total = res.data.data.pageInfo.count;
 				this.userList = res.data.data.list;
+			}).catch(err=>{
+				this.tableToading=false;
 			});
 		},
 		//关闭提示

+ 17 - 9
src/views/jurisdiction.vue

@@ -270,7 +270,7 @@
 		    </el-form-item>
 		    <el-form-item style="text-align: right; margin-bottom: 0">
 		      <el-button @click="integral_limit_show = false">取消</el-button>
-		      <el-button type="primary" @click="sub_employee_limit">确定</el-button>
+		      <el-button type="primary" :loading="integral_loading" @click="sub_employee_limit">确定</el-button>
 		    </el-form-item>
 		  </el-form>
 		</el-dialog>
@@ -283,7 +283,7 @@
 		  <EmployeeSelector v-if="management_scope_show" ref="Employee" :employee_not_select="employee_not_select" :max='add_employee_max' :selected="management_scope_arr" :can_select_dept="false"  @confirm="management_scope_confirm"></EmployeeSelector>
 		  <span slot="footer">
 		    <el-button @click="publicClose()">取消</el-button>
-		    <el-button type="primary" @click="sub_management_scope">完成</el-button>
+		    <el-button type="primary" :loading="scope_loading" @click="sub_management_scope">完成</el-button>
 		  </span>
 		</el-dialog>
 		<el-dialog
@@ -364,7 +364,7 @@
 		    </el-form-item>
 		    <el-form-item style=" text-align: right; margin-bottom: 0;">
 		      <el-button @click="bonus_deducted_colse('integral_limit_form')">取消</el-button>
-		      <el-button type="primary" @click="sub_bonus_deducted('integral_limit_form')">确定</el-button>
+		      <el-button type="primary" :loading="bonus_loading" @click="sub_bonus_deducted('integral_limit_form')">确定</el-button>
 		    </el-form-item>
 		  </el-form>
 		</el-dialog>
@@ -407,10 +407,14 @@ export default {
 			employee_not_select:[],
 			add_employee_max: 0,
 			management_scope_arr: {employee: [], dept: []},
+			scope_loading:false,
+			integral_loading:false,
+			
 			
 			// 设置奖扣任务相关
 			bonus_deducted_show:false,
 			bonus_deducted_loading:false,
+			bonus_loading:false,
 			integral_limit_rules:{
 			  exec_count:[
 			    { required: true, validator: minimum, trigger: 'blur' },
@@ -445,6 +449,7 @@ export default {
 		  this.get_employee_limit(item.id)
 		},
 		sub_bonus_deducted(fromName){
+		  this.bonus_loading=true;	
 		  this.integral_limit_form.employee_id = this.set_mployee_limit_id
 		  this.$refs[fromName].validate((valid) => {
 		    if (valid) {
@@ -462,7 +467,7 @@ export default {
 		        }else{
 		          this.$message.error(res.data.msg)
 		        }
-		      })
+		      }).finally(() => { this.bonus_loading=false;})
 		    }
 		  });
 		},
@@ -472,6 +477,7 @@ export default {
 		},
 		//设置管理范围
 		sub_management_scope(){
+		  this.scope_loading=true;
 		  this.$refs.Employee.confirm();//调用组件的confirm();
 		  this.$axios({
 		    url: '/api/employee/scope',
@@ -489,7 +495,7 @@ export default {
 		    } else{
 		      this.$message.error(res.data.msg)
 		    }
-		  }).catch((e) => {this.$message.error(e.data.msg)})
+		  }).catch((e) => {this.$message.error(e.data.msg)}).finally(() => { this.scope_loading=false;})
 		},
 		//添加编辑管理范围
 		management_scope_confirm(val){
@@ -514,6 +520,7 @@ export default {
 		  })
 		},
 		sub_employee_limit(){
+		  this.integral_loading=true;
 		  this.integral_limit_form.employee_id = this.set_mployee_limit_id
 		  this.$axios.post('/api/integral/employee/limit',this.integral_limit_form).then((res) => {
 		    if (res.data.code == 1) {
@@ -523,7 +530,9 @@ export default {
 		    }else{
 		      this.$message.error(res.data.msg)
 		    }
-		  }).catch((e) => {this.$message.error(e.data.msg)})
+		  }).catch((e) => {this.$message.error(e.data.msg)}).finally(() => {
+					this.integral_loading = false;
+			});
 		},
 		open_integral_limit(item){
 		  this.integral_limit_show = true
@@ -555,7 +564,6 @@ export default {
 		sub_add_employee(form) {
 			  var that=this;
 			   this.$refs.Employee.confirm();//调用组件的confirm();
-			   			console.log(this.employee_arr)
 			   this.employee_arr.forEach(element => {
 					 this.$axios.put('/api/role/user',{role_id: this.item_info.id,employee_id: element}).then((res) => {
 					   if (res.data.code == 1) {
@@ -580,7 +588,8 @@ export default {
 	
 		//关闭弹窗
 		publicClose() {
-			this.add_employee_show = false;
+			this.$refs.Employee.close()
+			// this.add_employee_show = false;
 			this.management_scope_show = false;
 		},
 		handleSelectionChange() {},
@@ -651,7 +660,6 @@ export default {
 							}
 						});
 						this.table_list = list||[];
-						console.log(this.table_list)
 					} else {
 						this.$message.error(res.data.msg);
 					}

+ 50 - 29
src/views/rule.vue

@@ -69,13 +69,13 @@
 				<el-form-item style="text-align: right; margin-bottom:0;">
 					<el-button type="danger" @click="del_dept" v-show="class_type == 'edit'">删除分类</el-button>
 					<el-button @click="add_dept_close('dept_formdata')">取消</el-button>
-					<el-button type="primary" @click="submit_add_dept('dept_formdata')">确定</el-button>
+					<el-button type="primary" @click="submit_add_dept('dept_formdata')" :loading="dept_loading">确定</el-button>
 				</el-form-item>
 			</el-form>
 		</el-dialog>
 
 		<!-- 添加编辑规则 -->
-		<el-dialog :title="rule_type == 'add' ? '添加规则' : '编辑规则'" :visible.sync="rule_show" :close-on-click-modal="false" width="700px">
+		<el-dialog :title="rule_type == 'add' ? '添加规则' : '编辑规则'" :visible.sync="rule_show" :close-on-click-modal="false" width="550px">
 			<el-form :model="rules_detail_form" ref="rules_detail_form" :rules="rules" label-width="80px">
 				<el-form-item label="规则内容" prop="remark">
 					<el-input v-model="rules_detail_form.remark" placeholder="请输入规则内容" type="textarea" :rows="3"></el-input>
@@ -138,10 +138,10 @@
 					</el-row>
 				</el-form-item>
 				<el-form-item style="text-align: right; margin-bottom:0;">
-					<el-button type="danger" @click="del_rule" v-show="rule_type == 'edit'">删除规则</el-button>
+					<el-button type="danger" @click="del_rule" :loading="delRule_loading" v-show="rule_type == 'edit'">删除规则</el-button>
 					<el-button @click="rule_close('rules_detail_form')">取消</el-button>
-					<el-button type="primary" v-show="rule_type == 'add'" @click="add_submit_rule('rules_detail_form')">确定</el-button>
-					<el-button type="primary" v-show="rule_type == 'edit'" @click="edit_submit_rule('rules_detail_form')">确定</el-button>
+					<el-button type="primary" v-show="rule_type == 'add'" :loading="rule_loading2" @click="add_submit_rule('rules_detail_form')">确定</el-button>
+					<el-button type="primary" v-show="rule_type == 'edit'" :loading="rule_loading2" @click="edit_submit_rule('rules_detail_form')">确定</el-button>
 				</el-form-item>
 			</el-form>
 		</el-dialog>
@@ -206,6 +206,7 @@ export default {
 			selectItem: { name: '积分分类' }, //选择的分类
 			//添加分类
 			class_show: false,
+			delRule_loading:false,
 			dept_formdata_rules: {
 				name: [
 					{
@@ -227,9 +228,11 @@ export default {
 				cycle_type: '1'
 			},
 			class_type: 'add',
+			dept_loading:false,
 
 			// 规则相关
 			del_item_id: [], //选择规则ID集合
+			rule_loading2: false,
 			rule_type: 'add',
 			rule_show: false,
 			rules_detail_form: {
@@ -329,6 +332,7 @@ export default {
 		// 导入相关
 		close_import() {
 			this.import_rules_show = false;
+			this.import_btn_show = false;
 			this.$refs.upload.clearFiles();
 		},
 		submitUpload() {
@@ -336,18 +340,15 @@ export default {
 			let params = {
 				file: this.file
 			};
-			this.$axios
-				.post('/api/rule/import', params)
-				.then(res => {
+			this.$axios.post('/api/rule/import', params).then(res => {
 					if (res.data.code == 1) {
-						this.import_rules_show = false;
+						this.close_import();
 						this.$message.success({ message: res.data.msg });
 						this.getData();
 					} else {
 						this.$message({ type: 'error', message: res.data.msg });
 					}
-				})
-				.finally(() => {
+				}).finally(() => {
 					this.save_loading = false;
 				});
 		},
@@ -386,6 +387,7 @@ export default {
 		},
 
 		edit_submit_rule(form) {
+			this.rule_loading2=true;
 			let self = this;
 			self.$refs[form].validate(valid => {
 				if (valid) {
@@ -424,11 +426,13 @@ export default {
 								data.item_id = self.rules_detail_form.id;
 								if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
 									self.$message.error('积分不能为零');
+									this.rule_loading2=false;
 									return false;
 								}
 								this.$axios
 									.post('/api/integral/rule/items/edit', data)
 									.then(res => {
+										this.rule_loading2=false;
 										if (res.data.code == 1) {
 											self.$message.success(res.data.msg);
 											self.getData();
@@ -448,11 +452,13 @@ export default {
 						data.item_id = self.rules_detail_form.id;
 						if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
 							self.$message.error('积分不能为零');
+							this.rule_loading2=false;
 							return false;
 						}
 						this.$axios
 							.post('/api/integral/rule/items/edit', data)
 							.then(res => {
+								this.rule_loading2=false;
 								if (res.data.code == 1) {
 									self.$message.success(res.data.msg);
 									self.getData();
@@ -460,18 +466,21 @@ export default {
 								} else {
 									self.$message.error(res.data.msg);
 								}
-							})
-							.catch(e => {
+							}).catch(e => {
 								self.$message.error(e.data.msg);
+							}).finally(() => {
+								this.rule_loading2 = false;
 							});
 					}
 				} else {
+					this.rule_loading2=false;
 					return false;
 				}
 			});
 		},
 		//添加规则
 		add_submit_rule(form) {
+			this.rule_loading2=true;
 			let self = this;
 			self.$refs[form].validate(valid => {
 				if (valid) {
@@ -507,6 +516,7 @@ export default {
 							self.rules_detail_form.max_point = min_point;
 							if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
 								self.$message.error('积分不能为零');
+								this.rule_loading2=false;
 								return false;
 							}
 							let data = {
@@ -522,15 +532,17 @@ export default {
 									} else {
 										self.$message.error(res.data.msg);
 									}
-								})
-								.catch(e => {
+								}).catch(e => {
 									self.$message.error(e.data.msg);
+								}).finally(() => {
+									this.rule_loading2 = false;
 								});
 						});
 					} else {
 						self.rules_detail_form.item_id = self.rules_detail_form.id;
 						if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
 							self.$message.error('积分不能为零');
+							this.rule_loading2=false;
 							return false;
 						}
 						let data = {
@@ -539,6 +551,7 @@ export default {
 						this.$axios
 							.post('/api/integral/rule/items', data)
 							.then(res => {
+								this.rule_loading2=false;
 								if (res.data.code == 1) {
 									self.$message.success(res.data.msg);
 									self.getData();
@@ -546,12 +559,14 @@ export default {
 								} else {
 									self.$message.error(res.data.msg);
 								}
-							})
-							.catch(e => {
+							}).catch(e => {
 								self.$message.error(e.data.msg);
+							}).finally(() => {
+								this.rule_loading2 = false;
 							});
 					}
 				} else {
+					this.rule_loading2=false;
 					return false;
 				}
 			});
@@ -562,11 +577,9 @@ export default {
 			let data = {
 				item_id: [this.rules_detail_form.id]
 			};
-			self.$confirm('此操作将永久删除该选项, 是否继续?', '提示')
-				.then(() => {
-					this.$axios
-						.post('/api/integral/rule/items/destroy', data)
-						.then(res => {
+			this.delRule_loading=true;
+			self.$confirm('此操作将永久删除该选项, 是否继续?', '提示').then(() => {
+					this.$axios.post('/api/integral/rule/items/destroy', data).then(res => {
 							if (res.data.code == 1) {
 								self.$message.success(res.data.msg);
 								self.rule_show = false;
@@ -577,9 +590,10 @@ export default {
 						})
 						.catch(e => {
 							self.$message.error(e.data.msg);
+						}).finally(() => {
+							this.delRule_loading = false;
 						});
-				})
-				.catch(() => {});
+			});
 		},
 		//关闭规则弹窗
 		rule_close(form) {
@@ -732,12 +746,13 @@ export default {
 				that.rule_tree = res.data.data.rule_tree || [];
 				that.item_list = list;
 				that.all_item_list = list;
-				that.rule_loading = false;
 				if (is) {
 					that.handleNodeClick(that.selectItem);
 				} else {
 					this.selectItem = { name: '积分分类' }; //选择的分类
 				}
+			}).finally(() => {
+				this.rule_loading = false;
 			});
 		},
 		//编辑分组
@@ -748,6 +763,7 @@ export default {
 		},
 		//添加分组
 		submit_add_dept(form) {
+			this.dept_loading=true;
 			let that = this;
 			that.$refs[form].validate(valid => {
 				if (valid) {
@@ -759,10 +775,12 @@ export default {
 							if (res.data.code == 1) {
 								that.$message.success('修改积分规则成功');
 								this.getData();
-								that.add_dept_close();
+								this.add_dept_close('dept_formdata');
 							} else {
 								that.$message.error(res.data.msg);
 							}
+						}).finally(() => {
+							this.dept_loading = false;
 						});
 					} else {
 						if (that.dept_formdata.pid !== null && that.dept_formdata.pid.length == 0) {
@@ -773,17 +791,20 @@ export default {
 						this.$axios.post('/api/integral/rule', that.dept_formdata).then(res => {
 							if (res.data.code == 1) {
 								this.getData();
-								that.add_dept_close();
+								this.add_dept_close('dept_formdata');
 							} else {
 								that.$message.error(res.data.msg);
 							}
+						}).finally(() => {
+							this.dept_loading = false;
 						});
 					}
-					that.class_show = false;
 				} else {
+					this.dept_loading=false;
 					return false;
 				}
 			});
+			
 		},
 		//删除分组
 		del_dept() {
@@ -796,7 +817,7 @@ export default {
 					if (res.data.code == 1) {
 						this.$message.success(res.data.msg);
 						this.getData();
-						this.add_dept_close();
+						this.add_dept_close('dept_formdata');
 					} else {
 						this.$message.error(res.data.msg);
 					}

+ 5 - 51
src/views/voluntarilyPoint.vue

@@ -69,8 +69,8 @@
             </el-col>
           </el-row>
           <div class="flex-box btns flex-v-ce">
-            <el-button size="medium" @click="del_item" type="danger" plain>批量移除</el-button>
-            <el-button type="primary" @click="add_employee_show= true">添加人员</el-button>
+            <el-button size="small" @click="del_item" type="danger" plain>批量移除</el-button>
+            <el-button size="small" type="primary" @click="add_employee_show= true">添加人员</el-button>
           </div>
           <el-table
             ref="multipleTable"
@@ -245,7 +245,7 @@
               @click="next('rules_detail_form') "
               style="float:right"
               :disabled="disabled"
-            >确 定 1</el-button>
+            >确 定</el-button>
             <el-button
               class="fr"
               @click="rules_detail_close('rules_detail_form')"
@@ -418,7 +418,7 @@ export default {
   },
   created() {},
   mounted() {
-    if (localStorage.getItem("framework")) {
+    if (localStorage.getItem("voluntarilyPoint")) {
       this.tips_show = false;
     } else {
       this.tips_show = true;
@@ -564,7 +564,7 @@ export default {
     import_rules_show() {},
     // 关闭提示语
     tips_close() {
-      localStorage.setItem("framework", "true");
+      localStorage.setItem("voluntarilyPoint", "true");
       this.tips_show = false;
     },
     //新增规则
@@ -702,44 +702,6 @@ export default {
       this.rules_detail_show = false;
       this.$refs[form].resetFields();
     },
-    //第一次添加
-    // err_open_right() {
-    //   let self = this;
-    //   self.table_loading = true;
-    //   self.item_id = self.jieguoId 
-    //   self.add_rulse_id = data.rule_id;
-    //   self.right_rules_detail = data;
-    //   // if (data || self.add_employee_id!="") {
-    //   //   self.add_employee_id = data.id;
-    //   //   self.add_rulse_id = data.rule_id;
-    //   //   self.right_rules_detail = data;
-    //   // }
-    //   // else{
-    //   //   self.add_employee_id = self.jieguoId 
-    //   // }
-    //   var params = {
-    //     params: {
-    //       item_id: self.item_id,
-    //       employee_id: self.employee_id || "",
-    //       page: self.page,
-    //       page_size:Number(this.pagesize)
-    //     },
-    //   };
-    //   self.$axios
-    //     .get("/api/integral/auto/list", params)
-    //     .then((res) => {
-    //       self.table_loading = false;
-    //       if (res.data.code == 1) {
-    //         self.table_list = res.data.data.list || [];
-    //         self.total = res.data.data.total;
-    //       } else {
-    //         self.$message.error(res.data.msg);
-    //       }
-    //     })
-    //     .finally(() => {
-    //       self.table_loading = false;
-    //     });
-    // },
     open_right(data) {
       let self = this;
       self.table_loading = true;
@@ -749,14 +711,6 @@ export default {
         self.add_rulse_id = data.rule_id;
         self.right_rules_detail = data;
       }
-      // if (data || self.add_employee_id!="") {
-      //   self.add_employee_id = data.id;
-      //   self.add_rulse_id = data.rule_id;
-      //   self.right_rules_detail = data;
-      // }
-      // else{
-      //   self.add_employee_id = self.jieguoId 
-      // }
       var params = {
         params: {
           item_id: self.add_employee_id || "",