浏览代码

Merge branch 'dev' of http://git.pro.g107.net/guojy/dd_pc into dev

哥哥玩剑魂呢 4 年之前
父节点
当前提交
1178e107ab

+ 0 - 2
src/api/axios.js

@@ -50,7 +50,6 @@ service.interceptors.response.use(
 			})
 			return Promise.reject(response.data.msg)
 		}else if(response.data.code === 2001){ //免登时用,2001为过期
-		console.log(url)
 			if(url=='/api/ding/login'){
 				return response;
 			}else{
@@ -69,7 +68,6 @@ service.interceptors.response.use(
 		}
 	},
 	error => {
-		// console.log(error)
 		if(error.message=='interrupt'){
 			// Message({
 			// 	message: '请勿频繁切换页面',

+ 0 - 1
src/components/upload.vue

@@ -231,7 +231,6 @@
               self._onSuccess({status: 1, url: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com/' + key, file_name: randomStr + photoName}, item, self.fileList)
             }
           }).catch(err => {
-            console.log('err == ', err)
             this.showProcess = false
           })
       },

+ 0 - 2
src/home.vue

@@ -509,8 +509,6 @@ export default {
 				{name:'领任务',image:require('./assets/image/task_hall.png'),push:'/get_task'},
 			)
 		}
-
-		console.log(encodeURIComponent(`pages/index/index?id=${encodeURIComponent('小米')}`))
 		this.function_All();
 		window.addEventListener('resize', this.selfAdaption);
 	},

+ 1 - 1
src/index.vue

@@ -21,7 +21,7 @@
 		</el-header>
 		<el-container class="main">
 			<el-aside>
-				<el-menu :default-active="defaultActive" class="el-menu-vertical-demo" :router="true" @select="activeRouter" >
+				<el-menu :default-active="defaultActive" class="el-menu-vertical-demo" :router="true" @select="activeRouter" :unique-opened="true" >
 					<template v-for="(item, index) in routers">
 						<div v-if="item.children.length!=0" :key="index">
 							<el-submenu :index="index.toString()"  :key="index" v-if="item.children.length>=1 && item.name!='首页'">

+ 0 - 4
src/views/common/below/rewardTask.vue

@@ -277,9 +277,6 @@
           this.formData.expire_time = moment().format('YYYY-MM-DD 18:00')
         }
       },
-      // dept_name(){
-      //   console.log(this.dept_name)
-      // }
     },
     mounted() {
       this.point_types = JSON.parse(localStorage.getItem('types'))
@@ -291,7 +288,6 @@
         let data = []
         for(let i in val){
           data.push(val[i][val[i].length -1])
-          // console.log(val[i][val[i].length -1])
         }
         this.formData.dept_ids = data
       },

+ 0 - 22
src/views/common/below/rewardTaskAmend.vue

@@ -319,31 +319,10 @@
 		  this.getDepartment();
     },
     methods: {
-      // getCascaderObj(val,opt) {
-      //   var thisVue=this
-      //   return val.map(function (value) {
-      //     for (var itm of opt) {
-      //       if (itm.id == value) {
-      //         // console.log("成功匹配")
-      //         thisVue.chapterArr.unshift(itm.id)
-      //         // console.log("第二步找父级。。。")
-      //         // console.log("parentId:"+itm.parentId)
-      //         // thisVue.getCascaderObj([itm.parentId],thisVue.$store.state.selectorMod.contentChas)
-      //         return
-      //       }else{
-      //         if(thisVue.isHasChid(itm)){
-      //           thisVue.getCascaderObj(val,itm.childs)
-      //         }
-      //       }
-      //     }
-      //     return null;
-      //   });
-      // },
       handleChange(val){
         let data = []
         for(let i in val){
           data.push(val[i][val[i].length -1])
-          // console.log(val[i][val[i].length -1])
         }
         this.formData.dept_ids = data
       },
@@ -501,7 +480,6 @@
       },
       
       getTreeDatas(data,item) {
-        // debugger
         for (let i in data) {
           if(data[i].id == item){
             if(data[i].parentid == 1){

+ 0 - 2
src/views/set/jurisdiction.vue

@@ -605,7 +605,6 @@ export default {
 		  self.$axios('get','/api/role/range',{role_id: self.item_info.id}).then((res) => {
 		    if (res.data.code == 1) {
 			  const resData = res.data.data
-			  console.log(this.item_info)
 		      if(this.item_info.code != 'employee'){
 		        self.dataAccessList.forEach(element => {
 		          element.name == 'event_range'?element.code = resData.event_range:''
@@ -618,7 +617,6 @@ export default {
 		          element.name == 'event_range'?element.code = resData.event_range:''
 		        //   element.name == 'performance_range'?element.code = resData.performance_range:''
 				});
-				console.log(self.dataAccessListEmployee)
 		      }
 		    } else {
 		      self.$message.error(res.data.msg)

+ 244 - 222
src/views/set/rule.vue

@@ -9,14 +9,7 @@
 				<div class="terr-left">
 					<el-button size="medium" @click="add_class" type="primary">+ 添加规则分类</el-button>
 					<div class="rule_class_box">
-						<el-tree
-							accordion
-							:data="rule_tree"
-							 class="cate-tree"
-							:props="defaultProps"
-							:highlight-current="true"
-							@node-click="handleNodeClick"
-						></el-tree>
+						<el-tree accordion :data="rule_tree" class="cate-tree" :props="defaultProps" :highlight-current="true" @node-click="handleNodeClick"></el-tree>
 					</div>
 				</div>
 				<div class="terr-right border-right flex-1">
@@ -64,7 +57,6 @@
 				</div>
 			</div>
 		</div>
-
 		<!-- <el-dialog
 			width="280px"
 			@close="closeCode"
@@ -75,7 +67,6 @@
 				<div @click.stop="downloadE">下载保存此二维码</div>
 			</div>
 		</el-dialog> -->
-		
 		<el-dialog @close="closeCode" :visible.sync="innerVisible" width="444px" append-to-body>
 			<div style="border-radius: 15px;border: 1px solid #f1f1f1;padding: 10px; width: 346px;box-sizing: border-box;margin: 0 auto;">
 				<div id="qrcode" ref="qrcode"></div>
@@ -84,7 +75,13 @@
 		</el-dialog>
 
 		<!-- 编辑添加分类 -->
-		<el-dialog :title="class_type == 'add' ? '添加规则分类' : '编辑规则分类'" :visible.sync="class_show" @close="add_dept_close('dept_formdata')" :close-on-click-modal="false" width="500px">
+		<el-dialog
+			:title="class_type == 'add' ? '添加规则分类' : '编辑规则分类'"
+			:visible.sync="class_show"
+			@close="add_dept_close('dept_formdata')"
+			:close-on-click-modal="false"
+			width="500px"
+		>
 			<el-form :model="dept_formdata" ref="dept_formdata" :rules="dept_formdata_rules" label-width="80px">
 				<el-form-item label="规则分类" prop="name"><el-input v-model="dept_formdata.name"></el-input></el-form-item>
 				<el-form-item label="上级分类">
@@ -148,9 +145,9 @@
 							</el-select>
 						</el-input>
 					</el-form-item>
-					
+
 					<div v-if="rules_detail_form.range_type == 2" style="position: relative;bottom: 10px;padding: 0 10px;">至</div>
-					<el-form-item  v-if="rules_detail_form.range_type == 2" class="form-right select_width">
+					<el-form-item v-if="rules_detail_form.range_type == 2" class="form-right select_width">
 						<el-input placeholder="请输入分值" v-model.number="rules_detail_form.max_point" type="age" class="input-with-select">
 							<el-select v-model="integral_select_name2" slot="prepend" placeholder="请选择类型">
 								<el-option v-for="(item, index) in integral_select" :key="index" :label="item.name" :value="item.value"></el-option>
@@ -158,8 +155,8 @@
 						</el-input>
 					</el-form-item>
 				</div>
-				
-<!-- 			<el-form-item prop="min_point">
+
+				<!-- 			<el-form-item prop="min_point">
 					<el-row :gutter="20" class="select_width">
 						<el-col :span="11">
 							<el-input
@@ -186,13 +183,17 @@
 						</el-col>
 					</el-row>
 				</el-form-item> -->
-				
+
 				<div class="flex-box flex-v-ce">
 					<el-button type="danger" @click="del_rule" :loading="delRule_loading" :disabled="delRule_loading" v-show="rule_type == 'edit'">删除规则</el-button>
 					<div class="flex-1"></div>
 					<el-button @click="rule_close('rules_detail_form')">取消</el-button>
-					<el-button type="primary" v-show="rule_type == 'add'" :loading="rule_loading2" :disabled="rule_loading2"  @click="add_submit_rule('rules_detail_form')">确定</el-button>
-					<el-button type="primary" v-show="rule_type == 'edit'" :loading="rule_loading2" :disabled="rule_loading2"  @click="edit_submit_rule('rules_detail_form')">确定</el-button>
+					<el-button type="primary" v-show="rule_type == 'add'" :loading="rule_loading2" :disabled="rule_loading2" @click="add_submit_rule('rules_detail_form')">
+						确定
+					</el-button>
+					<el-button type="primary" v-show="rule_type == 'edit'" :loading="rule_loading2" :disabled="rule_loading2" @click="edit_submit_rule('rules_detail_form')">
+						确定
+					</el-button>
 				</div>
 			</el-form>
 		</el-dialog>
@@ -221,7 +222,6 @@
 							ref="upload"
 							:limit="1"
 							:action="action"
-							:on-preview="handlePreview"
 							:on-remove="handleRemove"
 							:on-success="handleSuccess"
 							:before-upload="beforeFilesUpload"
@@ -243,12 +243,12 @@ import QRCode from 'qrcodejs2';
 export default {
 	data() {
 		return {
-			ruleDetails:{},
-			innerVisible:false,
-      		bodyLoad: false,
-			action:process.env.VUE_APP_BASE_API+'api/rule/import',
-			downloadUrl:process.env.VUE_APP_BASE_API+'api/download/rule_item',
-			ATOKEN: { 'A-TOKEN': this.$getToken(),'Accept':'application/vnd.test.v2+json' },
+			ruleDetails: {},
+			innerVisible: false,
+			bodyLoad: false,
+			action: process.env.VUE_APP_BASE_API + 'api/rule/import',
+			downloadUrl: process.env.VUE_APP_BASE_API + 'api/download/rule_item',
+			ATOKEN: { 'A-TOKEN': this.$getToken(), Accept: 'application/vnd.test.v2+json' },
 			tips_show: true,
 			rule_loading: false,
 			rule_tree: [],
@@ -262,7 +262,7 @@ export default {
 			selectItem: { name: '积分规则' }, //选择的分类
 			//添加分类
 			class_show: false,
-			delRule_loading:false,
+			delRule_loading: false,
 			dept_formdata_rules: {
 				name: [
 					{
@@ -284,7 +284,7 @@ export default {
 				cycle_type: '1'
 			},
 			class_type: 'add',
-			dept_loading:false,
+			dept_loading: false,
 
 			// 规则相关
 			del_item_id: [], //选择规则ID集合
@@ -318,7 +318,7 @@ export default {
 						message: '请选择分类',
 						trigger: 'change'
 					}
-				],
+				]
 				// min_point2:[{ required: true, message: '分值不能为空'},{ pattern: /^[1-9]\d*$/, message: '分值必须为数字值'}],
 				// max_point2:[{ required: true, message: '分值不能为空'},{ pattern: /^[1-9]\d*$/, message: '分值必须为数字值'}],
 			},
@@ -351,26 +351,26 @@ export default {
 			import_btn_show: false,
 			fileList: [],
 			file: null,
-			flName:'',
+			flName: ''
 		};
 	},
 	components: {
 		noData
 	},
-	watch:{
+	watch: {
 		'dept_formdata.pid'(val, old_val) {
-			this.$nextTick(()=>{
+			this.$nextTick(() => {
 				this.$refs.dept.dropDownVisible = false;
-			})
-		},		
+			});
+		},
 		'rules_detail_form.rule_id'(val, old_val) {
-			this.$nextTick(()=>{
+			this.$nextTick(() => {
 				this.$refs.dept2.dropDownVisible = false;
-			})
+			});
 		}
 	},
 	created() {
-		this.point_types = this.$getTyps().reverse()
+		this.point_types = this.$getTyps().reverse();
 	},
 	mounted() {
 		this.$nextTick(function() {
@@ -380,19 +380,19 @@ export default {
 				this.tips_show = true;
 			}
 		});
-		var that=this;
+		var that = this;
 		// setTimeout(function(){
-			that.getData();
+		that.getData();
 		// },1000);
 	},
 	methods: {
 		downloadE() {
-			let rule_remark = ''
-			if(this.ruleDetails.remark.length > 10){
-				rule_remark = this.ruleDetails.remark
+			let rule_remark = '';
+			if (this.ruleDetails.remark.length > 10) {
+				rule_remark = this.ruleDetails.remark;
 				rule_remark = rule_remark.slice(0, 10);
-			}else{
-				rule_remark = this.ruleDetails.remark
+			} else {
+				rule_remark = this.ruleDetails.remark;
 			}
 			var canvasData = this.$refs.qrcode.getElementsByTagName('canvas')
 			var a = document.createElement("a");
@@ -406,7 +406,7 @@ export default {
 			let appid = '?appId='+this.$appId
 			let corpId = '&corpId='+localStorage.getItem('corpId')
 			// let corpId = '&corpId=ding011f57ab048cf202ffe93478753d9884'
-			let page = '&page='+encodeURIComponent(`pages/workbench/apply/apply?item=${encodeURIComponent(row)}`)//encodeURIComponent('小米')
+			let page = '&page='+encodeURIComponent(`pages/workbench/apply/apply?id=${encodeURIComponent(row)}`)//encodeURIComponent('小米')
 			let urls = url+appid+corpId+page
 			var qrcode = new QRCode('qrcode', {
 				text: urls, // 二维码内容
@@ -418,21 +418,20 @@ export default {
 				correctLevel: QRCode.CorrectLevel.H // 容错等级,H是heigh,最高,所以二维码看起来很密
 			})
 		},
-		ruleQRcode(row){
-			this.ruleDetails = row
-			console.log(row)
+		ruleQRcode(row) {
+			this.ruleDetails = row;
 			// 生成二维码
-			this.innerVisible = true
+			this.innerVisible = true;
 			// 使用$nextTick确保数据渲染
 			this.$nextTick(() => {
-				this.payOrder(row)
-			})
+				this.payOrder(row.id);
+			});
 		},
 		// 关闭弹框,清除已经生成的二维码
-		closeCode () {
-			setTimeout(()=>{
-				this.$refs.qrcode.innerHTML = ''
-			},150)
+		closeCode() {
+			setTimeout(() => {
+				this.$refs.qrcode.innerHTML = '';
+			}, 150);
 		},
 
 		// 导入相关
@@ -446,7 +445,8 @@ 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.close_import();
 						this.$message.success({ message: res.data.msg });
@@ -454,32 +454,33 @@ export default {
 					} else {
 						this.$message({ type: 'error', message: res.data.msg });
 					}
-				}).finally(() => {
+				})
+				.finally(() => {
 					this.save_loading = false;
 				});
 		},
 		handleSuccess(response) {
 			if (response.code == 1) {
-				if(response.data.length>0){
-					var htmls=response.data;
-					var str="<div class='red'></div>";
-					htmls.forEach(item=>{
-						str+=`<div>${item.errors}</div>`;
-					})
+				if (response.data.length > 0) {
+					var htmls = response.data;
+					var str = "<div class='red'></div>";
+					htmls.forEach(item => {
+						str += `<div>${item.errors}</div>`;
+					});
 					this.close_import();
 					this.$notify.error({
-					          title: '导入错误',
-					          dangerouslyUseHTMLString: true,
-					          message: str,
-							  duration:0,
-							  offset:50,
-							  customClass:'notifyBox',
+						title: '导入错误',
+						dangerouslyUseHTMLString: true,
+						message: str,
+						duration: 0,
+						offset: 50,
+						customClass: 'notifyBox'
 					});
-				}else{
-						this.file = response.data;
-						this.$message.success({ message: response.msg });
-						this.getData();
-						this.close_import();
+				} else {
+					this.file = response.data;
+					this.$message.success({ message: response.msg });
+					this.getData();
+					this.close_import();
 				}
 			}
 		},
@@ -490,9 +491,6 @@ export default {
 				this.import_btn_show = false;
 			}
 		},
-		handlePreview(file) {
-			console.log(file);
-		},
 		imgChange(file, fileList) {
 			if (fileList !== null && fileList.length != 0) {
 				this.import_btn_show = true;
@@ -516,9 +514,9 @@ export default {
 			let self = this;
 			self.$refs[form].validate(valid => {
 				if (valid) {
-					if(self.rules_detail_form.min_point==0||!self.rules_detail_form.min_point){
+					if (self.rules_detail_form.min_point == 0 || !self.rules_detail_form.min_point) {
 						this.$message.error('请输入积分分值');
-						return
+						return;
 					}
 					// self.rules_detail_form.min_point=self.rules_detail_form.min_point2;
 					// self.rules_detail_form.max_point=self.rules_detail_form.max_point2;
@@ -531,8 +529,8 @@ export default {
 					if (self.rules_detail_form.range_type == 1) {
 						self.rules_detail_form.max_point = self.rules_detail_form.min_point;
 					}
-					if(Array.isArray(self.rules_detail_form.rule_id)){
-						self.rules_detail_form.rule_id=self.rules_detail_form.rule_id[self.rules_detail_form.rule_id.length-1];
+					if (Array.isArray(self.rules_detail_form.rule_id)) {
+						self.rules_detail_form.rule_id = self.rules_detail_form.rule_id[self.rules_detail_form.rule_id.length - 1];
 					}
 					if (parseFloat(self.rules_detail_form.min_point) > parseFloat(self.rules_detail_form.max_point)) {
 						this.$confirm(
@@ -551,52 +549,54 @@ export default {
 								cancelButtonText: '取消',
 								type: 'warning'
 							}
-						)
-							.then(() => {
-								this.rule_loading2=true;
-								let min_point = self.rules_detail_form.min_point;
-								self.rules_detail_form.min_point = self.rules_detail_form.max_point;
-								self.rules_detail_form.max_point = min_point;
-								let data = self.rules_detail_form;
-								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 => {
-										if (res.data.code == 1) {
-											self.$message.success(res.data.msg);
-											self.getData();
-											self.rule_close(form);
-										}
-								}).finally(err=>{
-									this.rule_loading2=false;
+						).then(() => {
+							this.rule_loading2 = true;
+							let min_point = self.rules_detail_form.min_point;
+							self.rules_detail_form.min_point = self.rules_detail_form.max_point;
+							self.rules_detail_form.max_point = min_point;
+							let data = self.rules_detail_form;
+							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 => {
+									if (res.data.code == 1) {
+										self.$message.success(res.data.msg);
+										self.getData();
+										self.rule_close(form);
+									}
+								})
+								.finally(err => {
+									this.rule_loading2 = false;
 								});
-							
-							})
+						});
 					} else {
-						this.rule_loading2=true;
+						this.rule_loading2 = true;
 						self.rules_detail_form.item_id = self.rules_detail_form.id;
 						let data = self.rules_detail_form;
 						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;
+							this.rule_loading2 = false;
 							return false;
 						}
-						this.$axios('post','/api/integral/rule/items/edit', data).then(res => {
+						this.$axios('post', '/api/integral/rule/items/edit', data)
+							.then(res => {
 								if (res.data.code == 1) {
 									self.$message.success(res.data.msg);
 									self.getData();
 									self.rule_close(form);
 								}
-							}).finally(() => {
+							})
+							.finally(() => {
 								this.rule_loading2 = false;
 							});
 					}
 				} else {
-					this.rule_loading2=false;
+					this.rule_loading2 = false;
 					return false;
 				}
 			});
@@ -617,69 +617,81 @@ export default {
 					if (self.rules_detail_form.range_type == 1) {
 						self.rules_detail_form.max_point = self.rules_detail_form.min_point;
 					}
-					if(self.rules_detail_form.min_point==0||!self.rules_detail_form.min_point||self.rules_detail_form.max_point==0||!self.rules_detail_form.max_point){
+					if (self.rules_detail_form.min_point == 0 || !self.rules_detail_form.min_point || self.rules_detail_form.max_point == 0 || !self.rules_detail_form.max_point) {
 						this.$message.error('请输入积分分值');
-						return
+						return;
 					}
-					if(Array.isArray(self.rules_detail_form.rule_id)){
-						self.rules_detail_form.rule_id=self.rules_detail_form.rule_id[self.rules_detail_form.rule_id.length-1];
+					if (Array.isArray(self.rules_detail_form.rule_id)) {
+						self.rules_detail_form.rule_id = self.rules_detail_form.rule_id[self.rules_detail_form.rule_id.length - 1];
 					}
 					if (parseFloat(self.rules_detail_form.min_point) > parseFloat(self.rules_detail_form.max_point)) {
 						this.$confirm(
-							'填写的规则积分是' +self.rules_detail_form.min_point +' ~ ' +self.rules_detail_form.max_point +',应该是 ' +self.rules_detail_form.max_point +
-								' ~ ' +self.rules_detail_form.min_point +'吧?','提示',
+							'填写的规则积分是' +
+								self.rules_detail_form.min_point +
+								' ~ ' +
+								self.rules_detail_form.max_point +
+								',应该是 ' +
+								self.rules_detail_form.max_point +
+								' ~ ' +
+								self.rules_detail_form.min_point +
+								'吧?',
+							'提示',
 							{
 								confirmButtonText: '确定',
 								cancelButtonText: '取消',
 								type: 'warning'
 							}
 						).then(() => {
-							this.rule_loading2=true;
+							this.rule_loading2 = true;
 							let min_point = self.rules_detail_form.min_point;
 							self.rules_detail_form.min_point = self.rules_detail_form.max_point;
 							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;
+								this.rule_loading2 = false;
 								return false;
 							}
 							let data = {
 								items: [self.rules_detail_form]
 							};
-							this.$axios('post','/api/integral/rule/items', data).then(res => {
+							this.$axios('post', '/api/integral/rule/items', data)
+								.then(res => {
 									if (res.data.code == 1) {
 										self.$message.success(res.data.msg);
 										self.getData();
 										self.rule_close(form);
 									}
-								}).finally(() => {
+								})
+								.finally(() => {
 									this.rule_loading2 = false;
 								});
 						});
 					} else {
-						this.rule_loading2=true;
+						this.rule_loading2 = true;
 						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;
+							this.rule_loading2 = false;
 							return false;
 						}
 						let data = {
 							items: [self.rules_detail_form]
 						};
-						this.$axios('post','/api/integral/rule/items', data).then(res => {
+						this.$axios('post', '/api/integral/rule/items', data)
+							.then(res => {
 								if (res.data.code == 1) {
 									self.$message.success(res.data.msg);
 									self.getData();
 									self.rule_close(form);
 								}
-							}).finally(() => {
+							})
+							.finally(() => {
 								this.rule_loading2 = false;
 							});
 					}
 				} else {
-					this.rule_loading2=false;
+					this.rule_loading2 = false;
 					return false;
 				}
 			});
@@ -690,20 +702,25 @@ export default {
 			let data = {
 				item_id: [this.rules_detail_form.id]
 			};
-			this.delRule_loading=true;
-			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;
 								self.getData(true);
 							}
-						}).finally(() => {
+						})
+						.finally(() => {
 							this.delRule_loading = false;
-					});
-			},(err)=>{
-				this.delRule_loading = false;
-			});
+						});
+				},
+				err => {
+					this.delRule_loading = false;
+				}
+			);
 		},
 		//关闭规则弹窗
 		rule_close(form) {
@@ -716,9 +733,9 @@ export default {
 				cancelButtonText: '取消',
 				type: 'warning'
 			}).then(() => {
-					this.rule_show = false;
-					this.class_show = true;
-			})
+				this.rule_show = false;
+				this.class_show = true;
+			});
 		},
 		add_rule() {
 			this.rule_show = true;
@@ -753,45 +770,45 @@ export default {
 				let data = {
 					item_id: this.del_item_id
 				};
-				this.$axios('post','/api/integral/rule/items/destroy', data).then(res => {
-						if (res.data.code == 1) {
-							this.$message.success(res.data.msg);
-							this.getData();
-							this.handleNodeClick(this.selectItem);
-						}
-					})
+				this.$axios('post', '/api/integral/rule/items/destroy', data).then(res => {
+					if (res.data.code == 1) {
+						this.$message.success(res.data.msg);
+						this.getData();
+						this.handleNodeClick(this.selectItem);
+					}
+				});
 			});
 		},
 
 		editDetails(val) {
 			this.rules_detail_form = JSON.parse(JSON.stringify(val));
-			
+
 			if (this.rules_detail_form.min_point == this.rules_detail_form.max_point) {
 				this.rules_detail_form.range_type = '1';
 			} else {
 				this.rules_detail_form.range_type = '2';
 			}
-			
+
 			if (this.rules_detail_form.min_point < 0) {
 				this.integral_select_name1 = '2';
-				let str=this.rules_detail_form.min_point;
-				this.rules_detail_form.min_point=str.toString().substring(1);
+				let str = this.rules_detail_form.min_point;
+				this.rules_detail_form.min_point = str.toString().substring(1);
 				// this.rules_detail_form.min_point2=str.toString().substring(1);
 			} else {
 				this.integral_select_name1 = '1';
 			}
-			
+
 			if (this.rules_detail_form.max_point < 0) {
 				this.integral_select_name2 = '2';
-				let str=this.rules_detail_form.max_point;
-				this.rules_detail_form.max_point=str.toString().substring(1);
+				let str = this.rules_detail_form.max_point;
+				this.rules_detail_form.max_point = str.toString().substring(1);
 				// this.rules_detail_form.max_point2=str.toString().substring(1);
 			} else {
 				this.integral_select_name2 = '1';
 			}
 			// this.rules_detail_form.min_point2=this.rules_detail_form.min_point;
 			// this.rules_detail_form.max_point2=this.rules_detail_form.max_point;
-			
+
 			this.rule_show = true;
 			this.rule_type = 'edit';
 		},
@@ -807,10 +824,10 @@ export default {
 			this.selectItem = {
 				child: e.child,
 				id: e.id,
-				name:e.name,
-				pid: e.pid,
+				name: e.name,
+				pid: e.pid
 			};
-			this.flName=e.name;
+			this.flName = e.name;
 			this.item_list = items;
 		},
 		getItemData(e) {
@@ -851,86 +868,91 @@ export default {
 		getData(is) {
 			this.rule_loading = true;
 			var that = this;
-			this.$axios('get','/api/integral/rule/trees', {cycle_type: 1}).then(res => {
-				var item_list = res.data.data.item_list || [];
-				var list = [];
-				for (let i in item_list) {
-					for (let k in item_list[i]) {
-						item_list[i][k].pt_Obj = that.$getTyps(item_list[i][k].pt_id);
-						list.push(item_list[i][k]);
+			this.$axios('get', '/api/integral/rule/trees', { cycle_type: 1 })
+				.then(res => {
+					var item_list = res.data.data.item_list || [];
+					var list = [];
+					for (let i in item_list) {
+						for (let k in item_list[i]) {
+							item_list[i][k].pt_Obj = that.$getTyps(item_list[i][k].pt_id);
+							list.push(item_list[i][k]);
+						}
 					}
-				}
-				that.rule_tree = res.data.data.rule_tree || [];
-				that.item_list = list;
-				that.all_item_list = list;
-				if (is) {
-					that.handleNodeClick(that.selectItem);
-				} else {
-					this.selectItem = { name: '积分规则' }; //选择的分类
-				}
-			}).finally(() => {
-				this.rule_loading = false;
-			});
+					that.rule_tree = res.data.data.rule_tree || [];
+					that.item_list = list;
+					that.all_item_list = list;
+					if (is) {
+						that.handleNodeClick(that.selectItem);
+					} else {
+						this.selectItem = { name: '积分规则' }; //选择的分类
+					}
+				})
+				.finally(() => {
+					this.rule_loading = false;
+				});
 		},
 		//编辑分组
 		edit_class() {
 			this.class_show = true;
 			this.class_type = 'edit';
-			this.dept_formdata={
+			this.dept_formdata = {
 				child: this.selectItem.child,
 				id: this.selectItem.id,
 				name: this.selectItem.name,
-				pid: this.selectItem.pid,
-			}
+				pid: this.selectItem.pid
+			};
 		},
 		//添加分组
 		submit_add_dept(form) {
-			this.dept_loading=true;
+			this.dept_loading = true;
 			let that = this;
 			that.$refs[form].validate(valid => {
 				if (valid) {
 					if (that.class_type == 'edit') {
 						delete that.dept_formdata.child;
 						that.dept_formdata.rule_id = that.dept_formdata.id;
-						if(typeof(that.dept_formdata.pid)=='number'){
-						}else{
-							if(that.dept_formdata.pid.length>0){
-								that.dept_formdata.pid =that.dept_formdata.pid[that.dept_formdata.pid.length - 1];
-							}else{
-								that.dept_formdata.pid=0;
+						if (typeof that.dept_formdata.pid == 'number') {
+						} else {
+							if (that.dept_formdata.pid.length > 0) {
+								that.dept_formdata.pid = that.dept_formdata.pid[that.dept_formdata.pid.length - 1];
+							} else {
+								that.dept_formdata.pid = 0;
 							}
 						}
-						this.$axios('post','/api/integral/rule/edit', that.dept_formdata).then(res => {
-							if (res.data.code == 1) {
-								that.selectItem.name=that.dept_formdata.name;
-								that.$message.success('修改积分分类成功');
-								this.getData(true);
-								this.add_dept_close('dept_formdata');
-							}
-						}).finally(() => {
-							this.dept_loading = false;
-						});
+						this.$axios('post', '/api/integral/rule/edit', that.dept_formdata)
+							.then(res => {
+								if (res.data.code == 1) {
+									that.selectItem.name = that.dept_formdata.name;
+									that.$message.success('修改积分分类成功');
+									this.getData(true);
+									this.add_dept_close('dept_formdata');
+								}
+							})
+							.finally(() => {
+								this.dept_loading = false;
+							});
 					} else {
 						if (that.dept_formdata.pid !== null && that.dept_formdata.pid.length == 0) {
 							that.dept_formdata.pid = 0;
 						} else {
 							that.dept_formdata.pid = that.dept_formdata.pid[that.dept_formdata.pid.length - 1];
 						}
-						this.$axios('post','/api/integral/rule', that.dept_formdata).then(res => {
-							if (res.data.code == 1) {
-								that.$message.success('添加积分分类成功');
-								this.getData(true);
-								this.add_dept_close('dept_formdata');
-							}
-						}).finally(() => {
-							this.dept_loading = false;
-						});
+						this.$axios('post', '/api/integral/rule', that.dept_formdata)
+							.then(res => {
+								if (res.data.code == 1) {
+									that.$message.success('添加积分分类成功');
+									this.getData(true);
+									this.add_dept_close('dept_formdata');
+								}
+							})
+							.finally(() => {
+								this.dept_loading = false;
+							});
 					}
 				} else {
-					this.dept_loading=false;
+					this.dept_loading = false;
 				}
 			});
-			
 		},
 		//删除分组
 		del_dept() {
@@ -939,7 +961,7 @@ export default {
 				cancelButtonText: '取消',
 				type: 'warning'
 			}).then(() => {
-				this.$axios('post','/api/integral/rule/destroy', { rule_id: this.selectItem.id }).then(res => {
+				this.$axios('post', '/api/integral/rule/destroy', { rule_id: this.selectItem.id }).then(res => {
 					if (res.data.code == 1) {
 						this.$message.success(res.data.msg);
 						this.getData();
@@ -1028,7 +1050,7 @@ $red: #f56c6c;
 		white-space: nowrap;
 	}
 }
-.form-right ::v-deep .el-form-item__content{
+.form-right ::v-deep .el-form-item__content {
 	margin-left: 0px !important;
 }
 .terr-left button {
@@ -1038,36 +1060,36 @@ $red: #f56c6c;
 }
 
 .el-dropdown-links {
-    font-size: 20px;
-    cursor: pointer;
-    color: #686a6d;
+	font-size: 20px;
+	cursor: pointer;
+	color: #686a6d;
 }
-.color-red{
-  color: $red;
-  &:hover{
-    color: #f14141;
-  }
+.color-red {
+	color: $red;
+	&:hover {
+		color: #f14141;
+	}
 }
-.qrcodesave{
+.qrcodesave {
 	text-align: center;
 	margin-top: 15px;
 	font-size: 18px;
-	span{
+	span {
 		color: #606266;
-		cursor:pointer;
-    	transition: all .3s;
+		cursor: pointer;
+		transition: all 0.3s;
 	}
 }
 
-.qrcodesave span:hover{
+.qrcodesave span:hover {
 	color: #2490fd;
 }
-.lookQrcode{
+.lookQrcode {
 	color: #606266;
-	cursor:pointer;
-	transition: all .3s;
+	cursor: pointer;
+	transition: all 0.3s;
 }
-.lookQrcode:hover{
+.lookQrcode:hover {
 	color: #2490fd;
 }
 </style>

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

@@ -604,7 +604,6 @@ export default {
 							this.disabled = false;
 						});
 				} else {
-					console.log('error submit!!');
 					return false;
 				}
 			});

+ 0 - 13
src/views/task/my_issue.vue

@@ -378,23 +378,11 @@
       deletes(item,s){
         let self = this
         this.$message.closeAll()
-        //去掉,所有的都可删除
-        // if(s==0 || s==1){
-        //   if(item.status != 1){
-        //     this.$message({
-        //       showClose: true,
-        //       message: '此工作不能删除',
-        //       type: 'error'
-        //     });
-        //     return false
-        //   }
-        // }
         self.$confirm('删除此任务将会删除其相关记录和积分数据,确认删除吗?', '删除任务', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          // self.bodyLoad = true
           self.$axios(s==0?'get':s==1?'get':'get',s==0?'/api/integral/work/delete':s==1?'/api/integral/task/delete':'/api/integral/schedule/delete',s==0?{work_id: item.id}:s==1?{task_id: item.id}:{schedule_id: item.id}
             ).then(res => {
             if (res.data.code == 1) {
@@ -405,7 +393,6 @@
               }
               this.get_list()
               self.$message.success(res.data.msg);
-              console.log(s==0?'我发布的':s==1?'我悬赏的':'重复任务')
             } else {
               self.$message.error(res.data.msg);
             }