347617796@qq.com 2 years ago
parent
commit
85310c0277

+ 5 - 5
src/api/websocket.js

@@ -24,11 +24,11 @@ let websocketonopen = () => {
 
 // 连接失败时重新连接
 let websocketonerror = () => {
-	Message({
-		message: '服务器繁忙,请稍后再试',
-		type: 'error',
-	})
-	weboscket_callback({type:'error',msg:'服务器繁忙,请稍后再试'})
+	// Message({
+	// 	message: '网络连接失败,请检查网络',
+	// 	type: 'error',
+	// })
+	weboscket_callback({type:'error',msg:'网络连接失败,请检查网络'})
 	// initWebSocket()
 }
 

BIN
src/assets/image/add_ticket.png


BIN
src/assets/image/att_review.png


BIN
src/assets/image/attendance_application.png


BIN
src/assets/image/base_point.png


BIN
src/assets/image/bj.jpg


BIN
src/assets/image/bj.png


BIN
src/assets/image/data_team.png


BIN
src/assets/image/guild_dept_pic.png


BIN
src/assets/image/indexPTTask.png


BIN
src/assets/image/index_apoint.png


BIN
src/assets/image/length_point.png


BIN
src/assets/image/logoJx.png


BIN
src/assets/image/performance1.png


BIN
src/assets/image/role_manage.png


BIN
src/assets/image/rule.png


+ 95 - 2
src/home.vue

@@ -1,5 +1,11 @@
 <template>
 	<div class="">
+		<div v-if="$supremeAuthority()!='dept_manager'&&$supremeAuthority()!='employee'&&user_info.is_only_try_order"  @click="dialogVisible = true" :style="{ backgroundImage: 'url(' + loginBg + ')' }"  style="position: relative;margin-bottom: 10px;height: 77px;" class="headerImg">
+			<div style="position: absolute;width: 440px;font-size: 26px;color: #fff;font-weight: 600;top: 20px;text-align: center;left: 50%;margin-left: -220px;">
+				免费预约演示 获取行业管理方案
+			</div>
+		</div>
+		
 		<div class="flex-box ts flex-center-center" v-if="isSubject">
 			<img mode="scaleToFill" src="./assets/image/tz.png" />
 			<div class="flex-1">你正在使用个人体验版,如需正式使用,请联系管理员</div>
@@ -439,7 +445,7 @@
 				</el-row>
 			</el-col>
 		</el-row>
-		<div class="updateNotice">
+		<div class="updateNotice" >
 			<el-dialog title="系统通知" :visible.sync="updateVisible" width="500px" top="20vh" :before-close="updateClose">
 				<b style="font-size:16px;margin:0 0 10px 0;display: inline-block;">{{ announcement.title }}</b>
 				<div class="announDetails" style="padding:0 0 0 0" v-html="announcement.focus"></div>
@@ -453,6 +459,31 @@
 			<div style="margin-top: 10px;text-align: center;color: #666;">请使用钉钉APP扫描二维码</div>
 		</el-dialog>
 		<examinePopup :title="'审核详情'" :id="detail_id" :show.sync="detailShow"></examinePopup>
+		<el-dialog class="dialog" :show-close="false" :visible.sync="dialogVisible" width="400px" >
+			<div style="height: 80px;background-image: linear-gradient(180deg, #01A2FE 0%, #0067FF 100%);
+			border-top-left-radius: 25px;border-top-right-radius: 25px;padding-top: 20px;">
+				<div style="font-weight: 600;font-size: 24px;color: #fff;text-align: center;">预约演示功道云积分制</div>
+				<div style="font-weight: 600;font-size: 24px;color: #fff;text-align: center;">积分制专家一对一服务</div>
+			</div>
+			<div style="position: absolute;right: 16px;top: 16px;cursor: pointer;" @click="dialogVisible = false"><i class="el-icon-close" style="font-size:20px;color: #fff;"></i></div>
+			<div>
+				<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="60px" style="width: 260px;margin: 20px auto;position: relative;right: 20px;">
+				  <el-form-item label="公司">
+					  <el-input v-model="user_info.company_info.name" disabled></el-input>
+				  </el-form-item>
+				  <el-form-item label="姓名" prop="name">
+					<el-input v-model="ruleForm.name"></el-input>
+				  </el-form-item>
+				  <el-form-item label="手机" prop="mobile">
+					<el-input v-model="ruleForm.mobile" @input="ruleForm.mobile=ruleForm.mobile.replace(/[^\d]/g,'')" ></el-input>
+				  </el-form-item>
+				</el-form>
+			</div>
+			<div class="fa">预约赠送积分制考核方案</div>
+			<div  style="text-align: center;padding: 20px 0;">
+				<el-button style="border-radius: 25px;font-size: 16px;padding:7px 20px;" size="mini" type="primary" @click="submitForm('ruleForm')">立即申请</el-button>
+			</div>
+		</el-dialog>
 	</div>
 </template>
 
@@ -465,6 +496,17 @@ export default {
 	components: { examinePopup },
 	data() {
 		return {
+			loginBg: require('@/assets/image/bj.jpg'),
+			dialogVisible:false,
+			ruleForm: {
+			  name: '',
+			  mobile: '',
+			},
+			rules: {
+			  name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
+			  mobile: [{ required: true, trigger: 'blur', message: '请输入手机号' }],
+			},  
+			
 			isSubject: false, //判断是否是个人版进入
 			mainCorpId: '', //如果是个人版,这个企业ID是登录者所在的企业ID,不是钉钉那边提供的隐藏企业ID
 
@@ -577,6 +619,14 @@ export default {
 		};
 	},
 	watch: {
+		dialogVisible(val){
+			if(!val){
+				this.ruleForm= {
+				  name: '',
+				  mobile: '',
+				};
+			}
+		},
 		exclusiveMonthChecked() {
 			this.monthlyIntegral();
 		}
@@ -599,7 +649,7 @@ export default {
 		}
 		var url = window.location.href;
 		var rUrl = this.GetRequest(url).url || '';
-		console.log(url)
+		console.log(this.$supremeAuthority())
 		this.$nextTick(function() {
 			if (rUrl) {
 				setTimeout(() => {
@@ -609,6 +659,24 @@ export default {
 		});
 	},
 	methods: {
+		submitForm(formName) {
+			this.$refs[formName].validate((valid) => {
+			  if (valid) {
+				  if (!/^1[0123456789]\d{9}$/.test( this.ruleForm.mobile)) {
+				    this.$message.error('手机格式有误');
+					return false;
+				  }
+				this.$axios('post', '/api/employee/appointment', this.ruleForm).then(res => {
+					this.$message.success('提交成功,我们的积分制老师将在24小时内与您联系');
+				}).finally(() => {
+					this.dialogVisible = false;
+				});
+			  } else {
+				console.log('error submit!!');
+				return false;
+			  }
+			});
+		},
 		// 关闭弹框,清除已经生成的二维码
 		closeCode() {
 			setTimeout(() => {
@@ -1420,6 +1488,31 @@ export default {
 </script>
 
 <style scoped="scoped" lang="scss">
+	.fa{
+	  background-color: #f0a020;
+	  color: #fff;
+	  width: 200px;
+	  font-size: 14px;
+	  margin-left: auto;
+	  padding: 0.1rem 0.32rem;
+	  border-bottom-left-radius: 25px;
+	  border-top-left-radius:25px;
+	  padding-left: 1.4rem;
+	  box-sizing: border-box;
+	}	
+	.headerImg {
+		background-position: center;
+		background-repeat: no-repeat;
+		background-size: cover;
+		cursor: pointer;
+	}
+	.dialog ::v-deep .el-dialog {
+		border-radius: 25px;
+	}
+	.dialog ::v-deep .el-dialog__header,.dialog ::v-deep .el-dialog__body {
+		padding: 0;
+		border-radius: 25px;
+	}
 .zb:hover{
 	color: #089fff;
 }	

+ 254 - 59
src/index.vue

@@ -6,7 +6,6 @@
 					<img src="./assets/image/logo.png" class="logo" />
 					<div>功道云积分制</div>
 				</div>
-				
 				<div class="flex-1 hea-right flex-box flex-v-ce" >
 					<div class="name" style="min-width: 200px;">{{ info.name }}</div>
 					<div class="flex-1 flex-box-ce font-flex-word" style="cursor: pointer;padding: 0 20px;">
@@ -25,16 +24,37 @@
 						</div>
 					</div>
 					<div class="flex-box flex-v-ce">
-						<div>
-							您当前为
-							<span class="blue">"{{ corpMessage.package_name }}"</span>
-							,有效期至
-							<span style="color:#FF9600">{{ corpMessage.expire_time }}</span>
-						</div>
-						<el-button size="small" @click="isTz = true" class="upgrade" type="primary" icon="el-icon-upload">续费升级</el-button>
-						<el-tooltip class="item" effect="dark" content="设置向导" placement="bottom" v-if="!this.$authoritys('employee') && !this.$authoritys('dept_manager')">
+						  <el-popover placement="bottom" width="240" trigger="hover">
+							 <div class="popoverText">
+								 <div class="flex-box-ce"><span>当前使用版本:</span><i>{{ corpMessage.package_name|| '测试环境版本' }}</i></div>
+								 <div class="flex-box-ce"><span>到期时间:</span><i class="yellow">{{ corpMessage.expire_time}}</i></div>
+								 <div class="flex-box-ce"><span>企业使用人数:</span><i class="blue">{{ corpMessage.user_count_max }}人</i></div>
+								 <div class="flex-box-end">
+									<el-button size="small" @click="isTz = true" class="upgrade" type="primary" icon="el-icon-upload">续费升级</el-button>
+								 </div>
+							 </div> 
+							<div slot="reference" class="flex-box-ce megData" style="cursor: pointer;margin: 0 10px;">
+								<div>{{ corpMessage.package_name|| '测试环境版本' }}</div>
+								<div>{{ corpMessage.user_count_max }}人</div>
+							</div>
+						  </el-popover>
+						 <el-popover
+							v-if="!this.$authoritys('employee') && !this.$authoritys('dept_manager')"
+						    placement="bottom"
+							class="popoverBox"
+						    width="60"
+							v-model="visible"
+						    trigger="manual">
+							<div style="text-align: center;">这里再次打开</div>
+							<div slot="reference" @click="showWn" class="flex-box-ce btnWn">
+								<i class="el-icon-tickets" style="font-size: 18px;margin-right: 5px;"></i>
+								<!-- <img slot="reference" src="./assets/image/wn.png" class="wn"/> -->
+								<span>新手引导</span>
+							</div>
+						  </el-popover>
+<!-- 						<el-tooltip v-model="wn_show" class="item" effect="dark" content="设置向导" placement="bottom" v-if="!this.$authoritys('employee') && !this.$authoritys('dept_manager')">
 							<img src="./assets/image/wn.png" class="wn" @click="showWn" />
-						</el-tooltip>
+						</el-tooltip> -->
 						<userImage :user_name="userData.name" :img_url="userData.img_url" width="44px" height="44px"></userImage>
 					</div>
 				</div>
@@ -91,41 +111,103 @@
 			</div>
 			<div class="fontColorF" style="text-align: center;margin-top: 15px;font-size: 18px;">手机钉钉扫码,付费升级</div>
 		</el-dialog>
-		<el-dialog title="设置向导" :visible.sync="wn_show" width="600px">
-			<div v-if="routers_one[0]">
-				<div class="wn-title fontColorF">三步轻松搭建积分管理体系:定人员、分责权、建制度</div>
-				<div class="flex-box flex-v-ce wn-box">
-					<div class="flex-1 flex-box-v flex-v-ce" @click="openView(0)">
-						<div><span class="iconfont " :class="routers_one[0].meta.icon"></span></div>
-						<div>1、确定{{ routers_one[0].name }}</div>
-					</div>
-					<div class="flex-1 flex-box-v flex-v-ce" @click="openView(1)">
-						<div><span class="iconfont " :class="routers_one[1].meta.icon"></span></div>
-						<div>2、分配{{ routers_one[1].name }}</div>
-					</div>
-					<div class="flex-1 flex-box-v flex-v-ce" @click="openView(2)">
-						<div><span class="iconfont " :class="routers_one[2].meta.icon"></span></div>
-						<div>3、建立{{ routers_one[2].name }}</div>
-					</div>
-				</div>
-			</div>
-			<div v-if="routers_one[0]">
-				<div class="wn-title fontColorF">更有效地做好积分激励和认可,你还可以设置以下3项</div>
-				<div class="flex-box flex-v-ce wn-box">
-					<div class="flex-1 flex-box-v flex-v-ce" @click="openView(3)">
-						<div><span class="iconfont " :class="routers_one[3].meta.icon"></span></div>
-						<div>{{ routers_one[3].name }}</div>
-					</div>
-					<div class="flex-1 flex-box-v flex-v-ce" @click="openView(4)">
-						<div><span class="iconfont " :class="routers_one[4].meta.icon"></span></div>
-						<div>{{ routers_one[4].name }}</div>
-					</div>
-					<div class="flex-1 flex-box-v flex-v-ce" @click="openView(5)">
-						<div><span class="iconfont " :class="routers_one[5].meta.icon"></span></div>
-						<div>{{ routers_one[5].name }}</div>
-					</div>
-				</div>
-			</div>
+		<el-dialog :close-on-click-modal="false" title="轻松四步落地积分制" :visible.sync="wn_show" width="680px">
+		  <el-row :gutter="0" class="set_role_div" style="border-top:1px solid rgb(234 234 234);">
+		    <el-col :span="8" style="padding:20px 0 20px 0;">
+		      <el-menu default-active="0" style="border: none">
+		        <el-menu-item
+		          :index="index.toString()"
+		          v-for="(item, index) in activeName"
+		          :key="index"
+		          @click="open_right(item)"
+		          style="margin-bottom:20px;position: relative;height:40px;line-height:40px;"
+		        >
+		          <b style="display: inline-block;font-size:16px;text-align:center;">{{ index + 1 }}&nbsp;&nbsp;</b>
+		          <span slot="title" style="padding-left: 10px;">{{ item.name }}</span>
+		          <span v-if="index < activeName.length - 1" style="width:1px;height:15px;border:1px solid rgb(224 224 224);position: absolute;bottom:-17px;left:23px;"></span>
+		        </el-menu-item>
+		      </el-menu>
+		    </el-col>
+		    <el-col :span="1" style="height:370px;border-right:1px solid rgb(234 234 234);"></el-col>
+		    <el-col :span="15" style="padding:20px 0 20px 0;">
+		      <div>
+		        <el-row>
+		          <div style="text-align:center;margin-top:25px;color: #35353a;font-size:16px;">{{ activeNameRig.name }}</div>
+		          <div
+		            v-if="activeNameRig.code == '0' || activeNameRig.code == '1'"
+		            :style="'display:flex;justify-content: space-around;margin:75px auto 0;width:' + usingwidth + 'px;flex-wrap:wrap;'"
+		          >
+		            <div v-for="(item, index) in activeNameRig.item" :key="index">
+		              <div style="text-align:center;display:flex;">
+		                <div @click="strategyClick(item.push)" style="cursor: pointer;">
+		                  <img :src="item.image" alt="" style="width:50px;" />
+		                  <p style="margin:0;padding:0;padding-top:10px;">{{ item.name }}</p>
+		                  <p style="margin:0;padding:0;font-size:13px;color:#2ba5ec;padding-top:8px;cursor: pointer;">{{ item.conf }}</p>
+		                </div>
+		                <i class="el-icon-right" :style="'font-size:30px;margin-top:57px;margin-left:' + usingmarginL + 'px;'" 
+						v-if="index < activeNameRig.item.length - 1" />
+		              </div>
+		            </div>
+		          </div>
+		
+		          <div v-if="activeNameRig.code == '2'" :style="'display:flex;justify-content: space-around;margin:20px auto 0;width:' + usingwidth + 'px;flex-wrap:wrap;'">
+		            <el-col :span="14"
+		              style="display:flex;flex-wrap:wrap;justify-content: space-around;text-align:center;margin-left:20px;position: relative;"
+		            >
+		              <i class="el-icon-plus" style="font-size:30px;position: absolute;top:45%;" />
+		              <div v-for="(item, index) in activeNameRig.item" :key="index" style="width:49%;margin-top:60px;">
+		                <div style="cursor: pointer;" v-if="index != 2" @click="strategyClick(item.push)">
+		                  <img :src="item.image" alt="" style="width:50px;" />
+		                  <p style="margin:0;padding:0;padding-top:10px;">{{ item.name }}</p>
+		                  <p style="margin:0;padding:0;font-size:13px;color:#2ba5ec;padding-top:8px;cursor: pointer;">{{ item.conf }}</p>
+		                </div>
+		              </div>
+		            </el-col>
+		            <el-col :span="8" v-if="activeNameRig.code == '2'">
+		              <div v-for="(item, index) in activeNameRig.item" :key="index">
+		                <div style="text-align:center;display:flex;margin-top:60px;" v-if="index == 2">
+		                  <i class="el-icon-right" style="font-size:30px;margin-top:57px;" />
+		                  <div style="margin-left:25px;cursor: pointer;" @click="strategyClick(item.push)">
+		                    <img :src="item.image" alt="" style="width:50px;" />
+		                    <p style="margin:0;padding:0;padding-top:10px;">{{ item.name }}</p>
+		                    <p style="margin:0;padding:0;font-size:13px;color:#2ba5ec;padding-top:8px;cursor: pointer;">{{ item.conf }}</p>
+		                  </div>
+		                </div>
+		              </div>
+		            </el-col>
+		          </div>
+				  
+				  
+				  <div v-if="activeNameRig.code == '3'" :style="'display:flex;justify-content: space-around;margin:20px auto 0;width:' + usingwidth + 'px;flex-wrap:wrap;'">
+				    <el-col :span="24"
+				      style="display:flex;flex-wrap:wrap;justify-content: space-around;text-align:center;margin-left:20px;position: relative;"
+				    >
+				      <i class="el-icon-plus" style="font-size:30px;position: absolute;top:45%;" />
+				      <div v-for="(item, index) in activeNameRig.item" :key="index" style="width:49%;margin-top:20px;">
+				        <div style="cursor: pointer;" v-if="index != 4" @click="strategyClick(item.push)">
+				          <img :src="item.image" alt="" style="width:50px;" />
+				          <p style="margin:0;padding:0;padding-top:10px;">{{ item.name }}</p>
+				          <p style="margin:0;padding:0;font-size:13px;color:#2ba5ec;padding-top:8px;cursor: pointer;">{{ item.conf }}</p>
+				        </div>
+				      </div>
+				    </el-col>
+				    <el-col :span="8" v-if="activeNameRig.code == '2'">
+				      <div v-for="(item, index) in activeNameRig.item" :key="index">
+				        <div style="text-align:center;display:flex;margin-top:60px;" v-if="index == 4">
+				          <i class="el-icon-right" style="font-size:30px;margin-top:57px;" />
+				          <div style="margin-left:25px;cursor: pointer;" @click="strategyClick(item.push)">
+				            <img :src="item.image" alt="" style="width:50px;" />
+				            <p style="margin:0;padding:0;padding-top:10px;">{{ item.name }}</p>
+				            <p style="margin:0;padding:0;font-size:13px;color:#2ba5ec;padding-top:8px;cursor: pointer;">{{ item.conf }}</p>
+				          </div>
+				        </div>
+				      </div>
+				    </el-col>
+				  </div>
+		        </el-row>
+		      </div>
+		    </el-col>
+		  </el-row>
 		</el-dialog>
 	</el-container>
 </template>
@@ -139,18 +221,43 @@ export default {
 			loading: false,
 			userData: {},
 			routers: [],
-			routers_one: [],
 			info: {},
 			wn_show: false,
 			defaultActive: '0-0',
-			isShowWn: true,
 			isTz: false,
 			direction: 'rtl',
 			corpMessage: {} ,//企业套餐信息
 			information:{name:''},
+			
+			
+			usingmarginL: '26',
+			usingwidth: '220',
+			activeNameRig: {
+			  name: '员工积极参与,管理者权责分明',
+			  code: '0',
+			  item: [
+			    { image: require('./assets/image/guild_dept_pic.png'), name: '组织架构', conf: '去配置', push: '/framework' },
+			    { image: require('./assets/image/role_manage.png'), name: '角色权限', conf: '去配置', push: '/jurisdiction' }
+			  ]
+			},
+			activeName: [
+			  { name: '完善部门人员信息及授权', code: '0' },
+			  { name: '建立积分奖扣制度', code: '1' },
+			  { name: '积分执行与实施', code: '2' },
+			  { name: '积分排名统计与分析', code: '3' }
+			],
+			visible:false,
 		};
 	},
 	watch: {
+		wn_show(val){
+			if(!val){
+				this.visible=true;
+				setTimeout(()=>{
+					this.visible=false;
+				},3000)
+			}
+		},
 		$route(to, from) {
 			var str = to.path;
 			this.routers.map((item, index) => {
@@ -183,7 +290,7 @@ export default {
 	mounted() {
 		this.getInfo();
 		var url = window.location.href;
-		var str = this.GetRequest(url).corpId || '123';
+		var str = this.GetRequest(url).corpId || 'ding49b5c3bf0b205896bc961a6cb783455b';
 		var corpId = str.split('#')[0];
 		if (corpId) {
 			this.getCorp(corpId);
@@ -192,7 +299,6 @@ export default {
 			if (!this.$authoritys('employee') && !this.$authoritys('dept_manager')) {
 				if (this.$getCache('wn_show')) {
 					this.wn_show = false;
-					this.isShowWn = false;
 				} else {
 					this.wn_show = true;
 					this.$setCache('wn_show', 'true');
@@ -201,6 +307,60 @@ export default {
 		});
 	},
 	methods: {
+		strategyClick(item) {
+		    this.wn_show = false;
+		    this.$router.push({ path: item });
+		},
+		open_right(item) {
+		  if (item.code == '0') {
+		    this.usingmarginL = '26';
+		    this.usingwidth = '220';
+		    this.activeNameRig = {
+		      name: '员工积极参与,管理者权责分明',
+		      code: '0',
+		      item: [
+		        { image: require('./assets/image/guild_dept_pic.png'), name: '组织架构', conf: '去配置', push: '/framework' },
+		        { image: require('./assets/image/role_manage.png'), name: '角色权限', conf: '去配置', push: '/jurisdiction' }
+		      ]
+		    };
+		  } else if (item.code == '1') {
+		    this.usingmarginL = '14';
+		    this.usingwidth = '300';
+		    this.activeNameRig = {
+		      name: '健全企业规章制度,建立公平的奖扣分体系',
+		      code: '1',
+		      item: [
+		        { image: require('./assets/image/rule.png'), name: '积分规则', conf: '去配置', push: '/rule' },
+		        { image: require('./assets/image/length_point.png'), name: '系统配置', conf: '去配置', push: '/systemLayout' },
+		        { image: require('./assets/image/base_point.png'), name: '自动积分', conf: '去配置', push: '/voluntarilyPoint' }
+		      ]
+		    };
+		  } else if (item.code == '2') {
+		    this.usingwidth = '380';
+		    this.activeNameRig = {
+		      name: '员工积极挣分,管理者奖罚分明',
+		      code: '2',
+		      item: [
+		        { image: require('./assets/image/entry_list.png'), name: '奖分/扣分', conf: '去奖扣', push: '/award_punish' },
+		        { image: require('./assets/image/my_publish.png'), name: '任务', conf: '去发布', push: '/my_issue' },
+		        { image: require('./assets/image/att_review.png'), name: '审批打分', conf: '去审批', push: '/approval_list' }
+		      ]
+		    };
+		  } else if (item.code == '3') {
+		    this.usingwidth = '380';
+		    this.activeNameRig = {
+		      name: '提高管理执行力,让优秀员工不吃亏',
+		      code: '3',
+		      item: [
+		        { image: require('./assets/image/add_ticket.png'), name: '积分排名', conf: '去查看', push: '/dept_rank' },
+		        { image: require('./assets/image/role_manage.png'), name: '管理者执行力', conf: '去查看', push: '/manager_statistics' },
+		        { image: require('./assets/image/data_team.png'), name: '部门分析', conf: '去查看', push: '/department_statistics' },
+		        { image: require('./assets/image/length_point.png'), name: '个人分析', conf: '去查看', push: '/individual_statistics' }
+		      ]
+		    };
+		  }
+		},
+		
 		openWebSocket(){
 			// 接收消息
 			const getsocketData = e => {  // 创建接收消息函数
@@ -250,7 +410,6 @@ export default {
 				this.routers.push({ name: '设置', children: this.returnRoutersArr('set'), icon: 'icon-dingdingPC_shezhi1' });
 			}
 			//this.returnRoutersArr('set',true) 加true表示不限制路由
-			this.routers_one = this.returnRoutersArr('set', true);
 			this.userData = this.$getUserData();
 			if (this.$route.path != '/home') {
 				//当刷新页面是控制左边导航栏的选中
@@ -321,11 +480,6 @@ export default {
 		returnIndex(str, str2) {
 			return str + '-' + str2;
 		},
-		openView(e) {
-			this.wn_show = false;
-			this.isShowWn = false;
-			this.$router.push({ path: this.routers_one[e].path });
-		},
 		showWn() {
 			this.wn_show = true;
 		},
@@ -349,7 +503,35 @@ export default {
 };
 </script>
 
-<style scoped="scoped" lang="scss">	
+<style scoped="scoped" lang="scss">
+.popoverText span{
+	width: 100px;
+	display: block;
+}
+.popoverText{
+	line-height: 30px;
+	font-size: 14px;
+}	
+.megData div:nth-child(1) {
+	background-image: linear-gradient(to bottom, #5e6e9b 0%, #232d48 100%);
+	text-align: center;
+	color: #e1bf66;
+	border-top-left-radius: 25px;
+	border-bottom-left-radius: 25px;
+	line-height: 35px;
+	height: 35px;
+	padding: 0 10px;
+}
+.megData div:nth-child(2) {
+	background-image: linear-gradient(to bottom, #ffeab2 0%, #e1bf66 100%);
+	text-align: center;
+	color: #232d48;
+	border-top-right-radius: 25px;
+	border-bottom-right-radius: 25px;
+	line-height: 35px;
+	height: 35px;
+	padding: 0 10px;
+}
 .wn-box {
 	padding: 20px 0;
 }
@@ -451,15 +633,25 @@ export default {
 .wn {
 	height: 26px;
 	width: 26px;
-	margin-right: 12px;
+	margin-right: 5px;
 	cursor: pointer;
 }
 .hea-right {
 	padding: 0 20px;
 }
-.upgrade {
-	margin-left: 10px;
+.btnWn{
+	cursor: pointer;
+	border: 1px solid #ccc;
+	border-radius: 4px;
+	padding: 7px 10px;
 	margin-right: 10px;
+	background-color: #409EFF;
+	border-color: #409EFF;
+	color: #fff;
+}
+.upgrade {
+	// margin-left: 10px;
+	// margin-right: 10px;
 }
 ::v-deep .el-menu-item {
 	padding-right: 10px !important;
@@ -468,4 +660,7 @@ export default {
 	color: #26a2ff;
 	background-color: #ecf5ff;
 }
+.popoverBox {
+	// background-color: #232d48;
+}
 </style>

+ 0 - 1
src/init.vue

@@ -94,7 +94,6 @@ export default {
 				corpId: corpId, // 企业id
 				onSuccess: function(info) {
 					that.$axios('post', '/api/ding/login', { authCode: info.code, corpId: corpId }).then(res => {
-						var is = false;
 						if (res.data.code == 1) {
 							var { token, user } = res.data.data;
 							if (user.is_official==1) {

+ 31 - 27
src/screen.vue

@@ -13,7 +13,6 @@
 						<div class="flex-1 flex-box-end flex-box-ce">
 							<div>{{ nowTime }}</div>
 							<el-tooltip class="item" effect="dark" content="全屏" placement="bottom">
-								<!-- <i class="el-icon-help" style="cursor: pointer;" @click="fullScreen"></i> -->
 								<img src="./assets/image/qp.png" class="logo" style="width: 24px;height: 24px;margin-left: 10px;cursor: pointer;" @click="fullScreen"/>
 							</el-tooltip>
 							<el-tooltip class="item" effect="dark" content="退出" placement="bottom">
@@ -253,6 +252,7 @@
 				<i class="el-icon-loading" style="margin-top: 15%;width: 150px;margin-bottom: 10px;color: #fff;font-size: 64px;"></i>
 				<div style="color: #fff;">管理执行难,就用功道云</div>
 			</div>
+			
 			<el-dialog title="输入密码" :visible.sync="isShowCode" width="450px" :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false">
 				<div style="margin: 10px 0;">
 					<el-input style="width: 300px;" v-model="code" placeholder="请输入随机密码"></el-input>
@@ -294,6 +294,8 @@ export default {
 			h5:'',
 			h6:'',
 			preview:false,
+			
+			isSetInterval:'',
 		};
 	},
 	computed: {
@@ -325,7 +327,7 @@ export default {
 				this.isShowCode = true;
 			}
 		}
-		this.nowTimes();
+		this.timeFormate();
 		window.addEventListener('resize', this.selfAdaption);
 	},
 	methods: {
@@ -362,7 +364,6 @@ export default {
 		},
 		onmessageWS(e) {
 			this.isShowlog=false;
-			console.log(e);
 			if (e.type == 'screen') {
 				if (e.code != 1) {
 					this.result={};
@@ -382,27 +383,28 @@ export default {
 						this.$message.error('窗口链接数量超过限制');
 						this.quit();
 					}
-					
 				} else {
 					if(!this.preview){
 						this.$setCache('code', this.code);
 					}
 					this.isShowCode = false;
 					this.result = e.result.result;
+					this.isShowError=false;
 					this.$nextTick(()=>{
 						this.isPCa? this.ManagerSAwardCharts2():this.ManagerSAwardCharts()
 						this.selfAdaption();
 					})
-					
 				}
 			}
 			// 中途断开
-			if (e.type == 'break'||e.type == 'error') {
+			if (e.type == 'break') {
 				this.isShowError=true;
-				this.errorMsg=e.msg;
-				setTimeout(()=>{
-					this.isShowError=false;
-				},3000)
+				this.errorMsg='网络连接失败,正在尝试重连...';
+				let setT=setTimeout(()=>{
+					this.opneWebSocket()
+					// this.isShowError=false;
+					clearTimeout(setT)
+				},60000)
 			}
 		},
 		//管理者奖扣统计
@@ -725,19 +727,22 @@ export default {
 		},
 		//echarts自适应
 		selfAdaption() {
-			let height=document.getElementById('left').offsetHeight;
-			this.h1=height-344;
-			this.h2=height-358;
-			this.h3=height-108;
-			this.h4=height-234;
-			this.h5=height-168;
-			this.h6=height-72;
-			this.$nextTick(()=>{
-				var myChart1 = this.$echarts.init(this.$refs.ManagerSAwardChart);
-				myChart1.resize();
-			})
+			if(document.getElementById('left')){
+				let height=document.getElementById('left').offsetHeight;
+				this.h1=height-344;
+				this.h2=height-358;
+				this.h3=height-108;
+				this.h4=height-234;
+				this.h5=height-168;
+				this.h6=height-72;
+				this.$nextTick(()=>{
+					var myChart1 = this.$echarts.init(this.$refs.ManagerSAwardChart);
+					myChart1.resize();
+				})
+			}
 		},
-		timeFormate(timeStamp) {
+		timeFormate() {
+			let timeStamp=new Date();
 			let year = new Date(timeStamp).getFullYear();
 			let month = new Date(timeStamp).getMonth() + 1 < 10 ? '0' + (new Date(timeStamp).getMonth() + 1) : new Date(timeStamp).getMonth() + 1;
 			let date = new Date(timeStamp).getDate() < 10 ? '0' + new Date(timeStamp).getDate() : new Date(timeStamp).getDate();
@@ -747,15 +752,14 @@ export default {
 			let week = new Date(timeStamp).getDay();
 			let weeks = ['日', '一', '二', '三', '四', '五', '六'];
 			let getWeek = '星期' + weeks[week];
-			this.nowTime = year + '年' + month + '月' + date + '日' + ' ' + hh + ':' + mm + ':' + ss + ' ' + getWeek;
+			this.nowTime = year + '年' + month + '月' + date + '日'+' '+getWeek;
+			// this.nowTime = year + '年' + month + '月' + date + '日' + ' ' + hh + ':' + mm + ':' + ss + ' ' + getWeek;
 		}, // 实时刷新当前时间,格式化
 		nowTimes() {
-			this.timeFormate(new Date());
-			setInterval(this.nowTimes, 1000);
-			this.clear();
+			this.isSetInterval=setInterval(this.timeFormate, 1000);
 		},
 		clear() {
-			clearInterval(this.nowTimes);
+			clearInterval(this.isSetInterval);
 			this.nowTimes = null;
 		},
 		fullScreen(){

+ 4 - 4
src/views/abPoint/apply_list.vue

@@ -1,10 +1,10 @@
 <template>
 	<div class="all padding-20">
 		<el-tabs v-model="tabs">
-			<el-tab-pane label="待审批" name="waiting"></el-tab-pane>
-			<el-tab-pane label="申请通过" name="complete"></el-tab-pane>
-			<el-tab-pane label="被驳回" name="refuse"></el-tab-pane>
-			<el-tab-pane label="已复核" name="review"></el-tab-pane>
+			<el-tab-pane :disabled="table_loading" label="待审批" name="waiting"></el-tab-pane>
+			<el-tab-pane :disabled="table_loading" label="申请通过" name="complete"></el-tab-pane>
+			<el-tab-pane :disabled="table_loading" label="被驳回" name="refuse"></el-tab-pane>
+			<el-tab-pane :disabled="table_loading" label="已复核" name="review"></el-tab-pane>
 		</el-tabs>
 
 		<div class="flex-box-ce" style="margin-bottom: 15px;">

+ 3 - 3
src/views/abPoint/award_punish.vue

@@ -1,9 +1,9 @@
 <template>
 	<div class="all padding-20">
 		<el-tabs v-model="tabs">
-			<el-tab-pane label="奖扣成功" name="success"></el-tab-pane>
-			<el-tab-pane label="待审批" name="waiting"></el-tab-pane>
-			<el-tab-pane label="被驳回" name="refuse"></el-tab-pane>
+			<el-tab-pane :disabled="table_loading" label="奖扣成功" name="success"></el-tab-pane>
+			<el-tab-pane :disabled="table_loading"  label="待审批" name="waiting"></el-tab-pane>
+			<el-tab-pane :disabled="table_loading"  label="被驳回" name="refuse"></el-tab-pane>
 		</el-tabs>
 		<div class="flex-box-ce" style="margin-bottom: 15px;">
 			<div class="flex-1">

+ 21 - 11
src/views/common/repeatTaskDetailsPopup.vue

@@ -56,7 +56,16 @@
 							<span v-if="workDetailData.task_cycle == '3'">每月{{ workDetailData.task_cycle_value }}号截止</span>
 						</div>
 					</li>
-
+					<li class="flex-box" v-if="workDetailData.department_info">
+						<div class="label">可见范围</div>
+						<div class="content_text" v-if="workDetailData.department_info.length>0">
+						<span v-for="(item,index) in workDetailData.department_info" :key="index">
+							{{item.name}}
+							<span v-if="(workDetailData.department_info.length - 1) > index"> ,</span>
+						</span>
+						</div>
+							<div class="content_text" v-else>全公司</div>
+					</li>
 					<template slot-scope="scope">
 						<span v-if="scope.row.task_cycle == '1'">每天0点自动发布,{{ dayTime(scope.row.task_cycle_value) }}截止</span>
 						<span v-if="scope.row.task_cycle == '2'">
@@ -64,6 +73,8 @@
 						</span>
 						<span v-if="scope.row.task_cycle == '3'">每月1号自动发布,{{ scope.row.task_cycle_value }}号截止</span>
 					</template>
+					
+					
 					<li class="flex-box" v-if="workDetailData.point_config && workDetailData.point_config.ahead_award_point">
 						<div class="label">提前奖分</div>
 						<div class="content_text">{{ workDetailData.point_config.ahead_award_point }}/天</div>
@@ -82,7 +93,7 @@
 						<div class="content_text">{{ workDetailData.point_config.timeout_deduction_point_limit }}</div>
 					</li>
 				</ul>
-				<div v-show="workDetailData.point_config && workDetailData.point_config.item_info">
+				<div v-show="workDetailData.point_config && (workDetailData.point_config.item_info||workDetailData.point_config.rule_info)">
 					<p class="row_title">规则依据</p>
 					<el-row :gutter="10" v-if="workDetailData.point_config.rule_info">
 						<el-col :span="4">规则分类</el-col>
@@ -148,6 +159,7 @@ export default {
 
 			loading: false,
 			workDetailData: {
+				department_info:[],
 				point_config:{
 					rule_info:''
 				}
@@ -172,15 +184,13 @@ export default {
 			let self = this;
 			self.loading = true;
 			let data = { schedule_id: this.id };
-			self.$axios('get', '/api/integral/schedule', data)
-				.then(res => {
-					if (res.data.code == 1) {
-						self.workDetailData = res.data.data;
-					}
-				})
-				.finally(() => {
-					self.loading = false;
-				});
+			self.$axios('get', '/api/integral/schedule', data).then(res => {
+				if (res.data.code == 1) {
+					self.workDetailData = res.data.data;
+				}
+			}).finally(() => {
+				self.loading = false;
+			});
 		}
 	}
 };

+ 162 - 29
src/views/common/rewardTask.vue

@@ -62,28 +62,6 @@
 							:props="{ children: 'child', label: 'name', value: 'id' }"
 						></el-cascader>
 					</el-form-item>
-					
-					
-<!-- 					<el-form-item
-						:label="trees_PtId(formData.pt_id) +'规则'"
-						prop="tree_echo"
-					>
-						<el-cascader
-							v-model="formData.tree_echo"
-							ref="ruleItem"
-							:popper-class="'itemClass'"
-							filterable
-							clearable
-							:options="formData.pt_id == 2 ? trees_ab.A : trees_ab.B"
-							@change="ruleItemChange"
-							:show-all-levels="false"
-							:props="{ children: 'child', label: 'name', value: 'id' }"
-						></el-cascader>
-					</el-form-item> -->
-					
-					
-					
-					
 					<el-form-item prop="range_type" v-if="formData.range_type != 0">
 						<div style="line-height: 24px;" v-show="formData.range_type == 1">
 							{{ min }}
@@ -266,6 +244,13 @@ export default {
 				return {};
 			}
 		},
+		modifyData: { //重复任务 复用时的数据
+			type: Object
+		},
+		isFy:{ //是否为复用操作
+			type: Boolean,
+			default: false
+		}
 	},
 	data() {
 		return {
@@ -388,10 +373,19 @@ export default {
 			dept_selected: { dept: [], employee: [] },
 			show_employee_selector: false,
 			config:{},
+			
+			
+			oneruleId: [],
+			echoGather: [],
 		};
 	},
 	components: { EmployeeSelector, upload },
 	watch: {
+		dialogVisible() {
+			if (this.dialogVisible&&this.isFy) {
+				this.Datas();
+			}
+		},
 		isSelectType(val) {
 			let item = this.formData;
 			this.max = 0;
@@ -432,6 +426,124 @@ export default {
 		this.getDepartment();
 	},
 	methods: {
+		//复原数据
+		Datas() {
+			// this.formData.id = this.modifyData.id;
+			this.formData.task_name = this.modifyData.name;
+			this.formData.range_type = 0;
+			this.formData.pt_id = this.modifyData.pt_id;
+			this.formData.expire_time = this.modifyData.expire_time;
+			this.formData.task_cycle = this.modifyData.task_cycle;
+			
+			
+			this.reviewerName = this.modifyData.reviewer_name;	
+			this.formData.reviewer_id = this.modifyData.reviewer_id; //审批者
+			this.reviewer_selected.employee = [{ id: this.modifyData.reviewer_id, img_url: this.modifyData.img_url, name: this.modifyData.reviewer_name }];
+			
+			let filtList = []
+			this.modifyData.task_file_list.forEach((item, index) =>{
+				filtList.push({name: item ,url:item, response: { url:item }})
+			})
+			this.fileList = filtList
+			this.fileFun('', filtList)
+			
+			let department_infoName = '';
+			let deptIDs = [];
+			this.dept_selected = { dept: [], employee: [] };
+			for (let i in this.modifyData.department_info) {
+				deptIDs.push(this.modifyData.department_info[i].id);
+				let department_infoDept = {};
+				department_infoDept.dept_id = this.modifyData.department_info[i].id;
+				department_infoDept.dept_name = this.modifyData.department_info[i].name;
+				department_infoDept.avatar = 'static/images/e66f.jpg';
+				this.dept_selected.dept.push(department_infoDept);
+				department_infoName += this.modifyData.department_info[i].name + ',';
+			}
+			this.deptVisibleName = department_infoName;
+			this.formData.dept_ids = deptIDs; //可见范围
+			
+			let deptIDdata = deptIDs;
+			for (let i in deptIDdata) {
+				this.getTreeDatas(this.dept_tree, deptIDdata[i]);
+			}
+			this.dept_name = this.echoGather;
+
+			// 指定了规则
+			if(this.modifyData.point_config.item_info){
+				let itemInfo = this.modifyData.point_config.item_info
+				this.arr=[itemInfo.id];
+				// 获取规则的上级分类
+				this.getruleChange(itemInfo.rule_id)
+				this.isSelectType=true;
+				this.$nextTick(_=>{
+					this.formData.tree_echo = JSON.parse(JSON.stringify(this.arr))
+					this.$nextTick(_=>{
+						this.ruleItemChange(this.formData.tree_echo,true);
+						// this.formData.task_expire_day = this.modifyData.task_cycle_value;
+					})
+				})
+			}else if(this.modifyData.point_config.rule_info){//指定了分类
+				this.isSelectType=false;
+				this.formData.rule_id = this.modifyData.point_config.rule_info.id;
+				this.formData.rule_value = this.returnRuleVal(this.modifyData.point_config.rule_info.id,[]);
+			}
+			this.$nextTick(_=>{
+				this.$nextTick(_=>{
+						this.formData.task_remark = this.modifyData.remark;
+						this.formData.base_point = this.modifyData.point_config.base_point;
+						this.formData.task_expire_day = this.modifyData.task_cycle_value;
+				})
+			})
+			
+			let add = ['ahead_award_point', 'ahead_award_point_limit', 'timeout_deduction_point', 'timeout_deduction_point_limit']
+			add.forEach(item =>{
+				this.deductionPoint(item)
+			})
+		},
+		deductionPoint(item){
+			if (this.modifyData.point_config[item] != '0') {
+				this.formData[item] = this.modifyData.point_config[item];
+			} else {
+				this.formData[item] = '';
+			}
+		},
+		returnRuleVal(rule_id,arr){
+			arr.unshift(rule_id)
+			let list = this.trees_ab.rule_tree.filter(x => x.id == rule_id)
+			if(list[0]&&list[0].pid != 0){
+				this.returnRuleVal(list[0].pid,arr)
+			}
+			return arr;
+		},
+		getruleChange(aid){
+			this.arr.unshift(aid);
+			let list = this.trees_ab.rule_tree.filter(x => x.id == aid)
+			if(list[0]&&list[0].pid == 0){
+				return false
+			}else{
+				this.getruleChange(list[0].pid)
+			}
+		},
+		getTreeDatas(data, item) {
+			for (let i in data) {
+				if (data[i].id == item) {
+					if (data[i].parentid == 1) {
+						this.oneruleId.unshift(data[i].id);
+						this.echoGather.push(this.oneruleId);
+						this.oneruleId = [];
+						break;
+					} else {
+						this.oneruleId.unshift(data[i].id);
+						this.getTreeDatas(this.dept_tree, data[i].parentid);
+					}
+				} else {
+					if (data[i]._child) {
+						this.getTreeDatas(data[i]._child, item);
+					}
+				}
+			}
+			return;
+		},
 		// 规则分类变化关闭dewn
 		ruleChange(value) {
 			const item = this.formData;
@@ -447,15 +559,19 @@ export default {
 		trees_PtId(id) {
 			return id == 2 ? 'A分' : 'B分'
 		},
-		ruleItemChange(val){
+		ruleItemChange(val,is){
 			let item = this.formData
+			console.log(item)
 			if(val.length>0){
 				let data = this.$refs.ruleItem.getCheckedNodes()[0].data;//当前选中的节点数据
+				
 				item.task_remark = data.name;
 				this.max = data.max_point * 1;
 				this.min = data.min_point * 1;
 				this.treeName = data.name;
-				item.base_point = data.min_point;
+				if(!is){
+					item.base_point = data.min_point;
+				}
 				item.range_type = data.range_type;
 				item.rule_id = data.pid;
 				item.item_id = data.id;
@@ -501,11 +617,28 @@ export default {
 			this.treeName = '';
 			this.fileList = [];
 			this.dept_name = [];
-			this.formData.dept_ids=[];
-			this.formData.range_type=0;
-			this.formData.rule_id=0;
-			this.formData.item_id=0;
-			this.formData.tree_echo = [],
+			this.formData={
+				task_type: '1',
+				pt_id: 3,
+				task_name: '',
+				task_remark: '',
+				base_point: '0',
+				range_type: 0,
+				rule_id: 0,
+				rule_value:[],
+				file_list: [],
+				tree_echo: [],//用于编辑任务时的规则回显
+				expire_time: moment().format('YYYY-MM-DD 18:00'),
+				task_expire_day: '',
+				targets: [],
+				reviewer_id: '',
+				task_cycle: 0,
+				timeout_deduction_point: null,
+				timeout_deduction_point_limit: null,
+				ahead_award_point: null,
+				ahead_award_point_limit: null,
+				dept_ids: []
+			}
 			this.reviewer_selected = { dept: [], employee: [] };
 			this.dept_selected = { dept: [], employee: [] };
 		},

+ 7 - 2
src/views/common/rewardTaskAmend.vue

@@ -400,6 +400,11 @@ export default {
 			this.rewardTaskAmendData.task_file_list.forEach((item, index) =>{
 				filtList.push({name: item ,url:item, response: { url:item }})
 			})
+			this.$nextTick(()=>{
+				this.$nextTick(()=>{
+					this.formData.task_remark = this.rewardTaskAmendData.task_remark; //任务详细描述
+				})
+			})
 			this.fileList = filtList
 			this.fileFun('', filtList)
 			if(this.rewardTaskAmendData.point_config.item_info){
@@ -453,7 +458,7 @@ export default {
 		returnRuleVal(rule_id,arr){
 			arr.unshift(rule_id)
 			let list = this.trees_ab.rule_tree.filter(x => x.id == rule_id)
-			if(list[0].pid != 0){
+			if(list[0]&&list[0].pid != 0){
 				this.returnRuleVal(list[0].pid,arr)
 			}
 			return arr;
@@ -461,7 +466,7 @@ export default {
 		ruleChange(aid){
 			this.arr.unshift(aid);
 			let list = this.trees_ab.rule_tree.filter(x => x.id == aid)
-			if(list[0].pid == 0){
+			if(list[0]&&list[0].pid == 0){
 				return false
 			}else{
 				this.ruleChange(list[0].pid)

+ 126 - 8
src/views/common/temporaryTask.vue

@@ -248,7 +248,15 @@ export default {
 			default: ()=>{
 				return {};
 			}
+		},
+		modifyData: { //重复任务 复用时的数据
+			type: Object
+		},
+		isFy:{ //是否为复用操作
+			type: Boolean,
+			default: false
 		}
+		
 	},
 	data() {
 		return {
@@ -372,10 +380,16 @@ export default {
 				{ name: '31号', value: 31 }
 			],
 			config:{},
+			arr:[],
 		};
 	},
 	components: { EmployeeSelector, upload },
 	watch: {
+		dialogVisible() {
+			if (this.dialogVisible&&this.isFy) {
+				this.Datas();
+			}
+		},
 		'formData.task_cycle'(val) {
 			if (val) {
 				this.formData.task_expire_day = 1;
@@ -388,7 +402,6 @@ export default {
 			this.max = 0;
 			this.min = 0;
 			this.treeName = '';
-			item.tree_echo = [];
 			item.task_remark = '';
 			item.base_point = '0';
 			item.range_type = 0;
@@ -414,6 +427,89 @@ export default {
 		this.point_types = this.$getCache('types');
 	},
 	methods: {
+		//复原数据
+		Datas() {
+			// this.formData.id = this.modifyData.id;
+			this.formData.task_name = this.modifyData.name;
+			this.formData.range_type = 0;
+			this.formData.base_point = this.modifyData.point_config.base_point;
+			this.formData.pt_id = this.modifyData.pt_id;
+			this.formData.expire_time = this.modifyData.expire_time;
+			this.formData.task_cycle = this.modifyData.task_cycle;
+			this.reviewerName = this.modifyData.reviewer_name;
+			
+			this.executorName='';
+			this.modifyData.target_info.forEach(element => {//执行人信息
+				this.formData.targets.push(element.id);
+				this.executorName += element.name + ',';
+			});
+			this.approval_selected.employee = this.modifyData.target_info;
+					
+					
+					
+			this.formData.reviewer_id = this.modifyData.reviewer_id; //审批者
+			this.reviewer_selected.employee = [{ id: this.modifyData.reviewer_id, img_url: this.modifyData.img_url, name: this.modifyData.reviewer_name }];
+			
+			let filtList = []
+			this.modifyData.task_file_list.forEach((item, index) =>{
+				filtList.push({name: item ,url:item, response: { url:item }})
+			})
+			this.fileList = filtList
+			this.fileFun('', filtList)
+			// 指定了规则
+			if(this.modifyData.point_config.item_info){
+				let itemInfo = this.modifyData.point_config.item_info
+				this.arr=[itemInfo.id];
+				// 获取规则的上级分类
+				this.getruleChange(itemInfo.rule_id)
+				this.isSelectType=true;
+				this.$nextTick(_=>{
+					this.formData.tree_echo = JSON.parse(JSON.stringify(this.arr))
+					this.$nextTick(_=>{
+						this.ruleItemChange(this.formData.tree_echo);
+					})
+				})
+			}else if(this.modifyData.point_config.rule_info){//指定了分类
+				this.isSelectType=false;
+				this.formData.rule_id = this.modifyData.point_config.rule_info.id;
+				this.formData.rule_value = this.returnRuleVal(this.modifyData.point_config.rule_info.id,[]);
+			}
+			this.$nextTick(_=>{
+				this.$nextTick(_=>{
+					this.formData.task_remark = this.modifyData.remark;
+				})
+			})
+			
+			let add = ['ahead_award_point', 'ahead_award_point_limit', 'timeout_deduction_point', 'timeout_deduction_point_limit']
+			add.forEach(item =>{
+				this.deductionPoint(item)
+			})
+		},
+		deductionPoint(item){
+			if (this.modifyData.point_config[item] != '0') {
+				this.formData[item] = this.modifyData.point_config[item];
+			} else {
+				this.formData[item] = '';
+			}
+		},
+		getruleChange(aid){
+			this.arr.unshift(aid);
+			let list = this.trees_ab.rule_tree.filter(x => x.id == aid)
+			if(list[0]&&list[0].pid == 0){
+				return false
+			}else{
+				this.getruleChange(list[0].pid)
+			}
+		},
+		returnRuleVal(rule_id,arr){
+			arr.unshift(rule_id)
+			let list = this.trees_ab.rule_tree.filter(x => x.id == rule_id)
+			if(list[0]&&list[0].pid != 0){
+				this.returnRuleVal(list[0].pid,arr)
+			}
+			return arr;
+		},
+		
 		trees_PtId(id) {
 			return id == 2 ? 'A分' : 'B分';
 		},
@@ -502,13 +598,35 @@ export default {
 		resetForm(formName) {
 			this.$emit('update:dialogVisible', false);
 			this.$refs[formName].resetFields();
-			this.formData.file_list = [];
-			this.formData.range_type = 0;
-			this.formData.rule_id = 0;
-			this.formData.item_id = 0;
-
+			this.formData={
+				task_name: '',
+				
+				base_point: '0',
+				task_remark: '',
+				pt_id: 3,
+				
+				tree_echo: [], //用于编辑任务时的规则回显
+				range_type: 0,
+				rule_id: '',
+				rule_value:[],
+				file_list: [],
+				
+				task_expire_day: 1,
+				expire_time: moment().format('YYYY-MM-DD 18:00'),
+				weight: 0,
+				package_id: 0,
+				targets: [],
+				reviewer_id: '',
+				task_cycle: 0,
+				timeout_deduction_point: null,
+				timeout_deduction_point_limit: null,
+				ahead_award_point: null,
+				ahead_award_point_limit: null
+			}
 			this.fileList = [];
-			(this.formData.tree_echo = []), (this.max = 0), (this.min = 0), (this.treeName = '');
+			this.max = 0; 
+			this.min = 0;
+			this.treeName = '';
 			this.executorName = '';
 			this.reviewerName = '';
 			this.approval_selected = { dept: [], employee: [] };
@@ -590,7 +708,7 @@ export default {
 						this.resetForm('formData');
 						let msg=res.data.msg;
 						if(this.config.event_review_status&&this.config.event_task_review){
-							msg+='复核开启后,积分需管理员复核后才计入排名和统计'
+							msg+='复核开启后,积分需管理员复核后才计入排名和统计'
 						}
 						self.$message.success(msg);
 					} else {

+ 9 - 5
src/views/common/temporaryTaskAmend.vue

@@ -424,7 +424,7 @@ export default {
 			this.formData.task_name = this.modifyData.task_name;
 			this.formData.range_type = 0;
 			this.formData.base_point = this.modifyData.point_config.base_point;
-			this.formData.task_remark = this.modifyData.task_remark;
+			// this.formData.task_remark = this.modifyData.task_remark;
 			this.formData.pt_id = this.modifyData.pt_id;
 			this.formData.expire_time = this.modifyData.expire_time;
 			this.executorName = this.modifyData.employee_name;
@@ -459,7 +459,11 @@ export default {
 				this.formData.rule_id = this.modifyData.rule_id;
 				this.formData.rule_value = this.returnRuleVal(this.modifyData.rule_id,[]);
 			}
-			
+			this.$nextTick(()=>{
+				this.$nextTick(()=>{
+					this.formData.task_remark = this.modifyData.task_remark;
+				})
+			})
 			let add = ['ahead_award_point', 'ahead_award_point_limit', 'timeout_deduction_point', 'timeout_deduction_point_limit']
 			add.forEach(item =>{
 				this.deductionPoint(item)
@@ -469,7 +473,7 @@ export default {
 		ruleChange(aid){
 			this.arr.unshift(aid);
 			let list = this.trees_ab.rule_tree.filter(x => x.id == aid)
-			if(list[0].pid == 0){
+			if(list[0]&&list[0].pid == 0){
 				return false
 			}else{
 				this.ruleChange(list[0].pid)
@@ -478,7 +482,7 @@ export default {
 		returnRuleVal(rule_id,arr){
 			arr.unshift(rule_id)
 			let list = this.trees_ab.rule_tree.filter(x => x.id == rule_id)
-			if(list[0].pid != 0){
+			if(list[0]&&list[0].pid != 0){
 				this.returnRuleVal(list[0].pid,arr)
 			}
 			return arr;
@@ -583,7 +587,7 @@ export default {
 						this.resetForm('formData')
 						let msg=res.data.msg;
 						if(this.config.event_review_status&&this.config.event_task_review){
-							msg+='复核开启后,积分需管理员复核后才计入排名和统计'
+							msg+='复核开启后,积分需管理员复核后才计入排名和统计'
 						}
 						self.$message.success(msg);
 					} else {

+ 275 - 272
src/views/ranking/balanceA.vue

@@ -1,299 +1,302 @@
 <template>
-  <div>
-    <el-alert class="diy-tip" @close="tips_close" v-show="tips_show" type="success" description>
-      <p>A分余额在线下兑换/使用过后,由管理员手动结算清零;</p>
-      <p>清零操作为全员批量清除,请谨慎操作!</p>
-      <p>每次清零将清空指定月份之前的余额(不含指定月份),不可清空未结束月份的余额:</p>
-      <p>例如当前是2020年7月8号,指定选择2020年7月份,可清空2020年7月1号之前所有余额,不清除7月1-8号的余额。</p>
-    </el-alert>
-    <div class="box boxMinHeight">
-      <el-tabs v-model="active">
-        <el-tab-pane label="A分余额" name="balanceA"></el-tab-pane>
-        <el-tab-pane label="清空记录" name="clearLog"></el-tab-pane>
-      </el-tabs>
+	<div>
+		<el-alert class="diy-tip" @close="tips_close" v-show="tips_show" type="success" description>
+			<p>A分余额在线下兑换/使用过后,由管理员手动结算清零;</p>
+			<p>清零操作为全员批量清除,请谨慎操作!</p>
+			<p>每次清零将清空指定月份之前的余额(不含指定月份),不可清空未结束月份的余额:</p>
+			<p>例如当前是2020年7月8号,指定选择2020年7月份,可清空2020年7月1号之前所有余额,不清除7月1-8号的余额。</p>
+		</el-alert>
+		<div class="box boxMinHeight">
+			<el-tabs v-model="active">
+				<el-tab-pane :disabled="loading" label="A分余额" name="balanceA"></el-tab-pane>
+				<el-tab-pane :disabled="loading" label="清空记录" name="clearLog"></el-tab-pane>
+			</el-tabs>
 
-      <el-form :inline="true" v-if="active == 'balanceA'">
-        <el-form-item label="部门">
-          <el-cascader size="medium" class="date-picker-width" 
-		  v-model="dept_name" 
-		  :options="dept_tree" 
-		  ref="dept" 
-		  :props="{ checkStrictly: true,value:'id',label:'name',children:'_child'}"
-		  clearable
-		  filterable
-		 placeholder="全公司">
-		  </el-cascader>
-        </el-form-item>
+			<el-form :inline="true" v-if="active == 'balanceA'">
+				<el-form-item label="部门">
+					<el-cascader
+						size="medium"
+						class="date-picker-width"
+						v-model="dept_name"
+						:options="dept_tree"
+						ref="dept"
+						:props="{ checkStrictly: true, value: 'id', label: 'name', children: '_child' }"
+						clearable
+						filterable
+						placeholder="全公司"
+					></el-cascader>
+				</el-form-item>
 
-        <el-form-item>
-          <el-input size="medium" v-model="formData.keyword" placeholder="输入同事姓名" max="200" @keyup.enter.native="getList()" class="persons_name">
-            <el-button size="medium" slot="append" icon="el-icon-search" @click="getList()"></el-button>
-          </el-input>
-        </el-form-item>
+				<el-form-item>
+					<el-input size="medium" v-model="formData.keyword" placeholder="输入同事姓名" max="200" @keyup.enter.native="getList()" class="persons_name">
+						<el-button size="medium" slot="append" icon="el-icon-search" @click="getList()"></el-button>
+					</el-input>
+				</el-form-item>
 
-        <el-form-item style="float: right;"><el-button size="medium" type="primary" @click="clearAPointShow = true">清空A分余额</el-button></el-form-item>
-      </el-form>
+				<el-form-item style="float: right;"><el-button size="medium" type="primary" @click="clearAPointShow = true">清空A分余额</el-button></el-form-item>
+			</el-form>
 
-      <el-table :data="list" style="width: 100%" v-if="active == 'balanceA'" v-loading="loading">
-        <el-table-column label="姓名" prop="name" width="250">
-          <template slot-scope="scope">
-			<div class="flex-box-ce">
-				<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="line-height: 50px; padding-left: 10px;">{{ scope.row.name }}</span>
-			</div>
-          </template>
-        </el-table-column>
-<el-table-column show-overflow-tooltip label="部门" align="left" min-width="120px" prop="deptName"></el-table-column>
-        <el-table-column label="A分余额" prop="balance_a"></el-table-column>
-        <template slot="empty">
-			<noData></noData>
-        </template>
-      </el-table>
+			<el-table :data="list" style="width: 100%" v-if="active == 'balanceA'" v-loading="loading">
+				<el-table-column label="姓名" prop="name" width="250">
+					<template slot-scope="scope">
+						<div class="flex-box-ce">
+							<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="line-height: 50px; padding-left: 10px;">{{ scope.row.name }}</span>
+						</div>
+					</template>
+				</el-table-column>
+				<el-table-column show-overflow-tooltip label="部门" align="left" min-width="120px" prop="deptName"></el-table-column>
+				<el-table-column label="A分余额" prop="balance_a"></el-table-column>
+				<template slot="empty">
+					<noData></noData>
+				</template>
+			</el-table>
 
-      <el-table :data="list" style="width: 100%" v-else v-loading="loading">
-        <el-table-column label="操作人" prop="name" width="250">
-          <template slot-scope="scope">
-			<div class="flex-box-ce">
-				<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="line-height: 50px; padding-left: 10px;">{{ scope.row.name }}</span>
-			</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="内容" prop="remark"></el-table-column>
-        <el-table-column prop="create_time" label="时间"></el-table-column>
-        <template slot="empty">
-			<noData></noData>
-        </template>
-      </el-table>
+			<el-table :data="list" style="width: 100%" v-else v-loading="loading">
+				<el-table-column label="操作人" prop="name" width="250">
+					<template slot-scope="scope">
+						<div class="flex-box-ce">
+							<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="line-height: 50px; padding-left: 10px;">{{ scope.row.name }}</span>
+						</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="内容" prop="remark"></el-table-column>
+				<el-table-column prop="create_time" label="时间"></el-table-column>
+				<template slot="empty">
+					<noData></noData>
+				</template>
+			</el-table>
 
-      <center style="padding: 20px 0;">
-        <el-pagination
-          background
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :page-sizes="[10, 20, 50, 100]"
-          layout="total, sizes, prev, pager, next"
-          :page-size="formData.page_size"
-          :current-page="formData.page"
-          :total="total"
-        ></el-pagination>
-      </center>
+			<center style="padding: 20px 0;">
+				<el-pagination
+					background
+					@size-change="handleSizeChange"
+					@current-change="handleCurrentChange"
+					:page-sizes="[10, 20, 50, 100]"
+					layout="total, sizes, prev, pager, next"
+					:page-size="formData.page_size"
+					:current-page="formData.page"
+					:total="total"
+				></el-pagination>
+			</center>
 
-      <el-dialog title="清空A分余额" :visible.sync="clearAPointShow" width="500px" @close="clearAPointClose('popupForm')">
-        <el-form :model="popupForm" ref="popupForm">
-          <el-form-item prop="month" :rules="[{ required: true, message: '请选择月份', trigger: 'blur' }]">
-            <el-col :span="3">清空</el-col>
-            <el-col :span="8"><el-date-picker style="width: 100%" v-model="popupForm.month" value-format="yyyy-MM" type="month" placeholder="请选择月份"></el-date-picker></el-col>
-            <el-col :span="6">之前的A分</el-col>
-          </el-form-item>
-        </el-form>
-        <span slot="footer">
-          <el-button @click="resetForm('popupForm')">取 消</el-button>
-          <el-button type="primary" @click="onSubmit('popupForm')">确 定</el-button>
-        </span>
-      </el-dialog>
-    </div>
-  </div>
+			<el-dialog title="清空A分余额" :visible.sync="clearAPointShow" width="500px" @close="clearAPointClose('popupForm')">
+				<el-form :model="popupForm" ref="popupForm">
+					<el-form-item prop="month" :rules="[{ required: true, message: '请选择月份', trigger: 'blur' }]">
+						<el-col :span="3">清空</el-col>
+						<el-col :span="8">
+							<el-date-picker style="width: 100%" v-model="popupForm.month" value-format="yyyy-MM" type="month" placeholder="请选择月份"></el-date-picker>
+						</el-col>
+						<el-col :span="6">之前的A分</el-col>
+					</el-form-item>
+				</el-form>
+				<span slot="footer">
+					<el-button @click="resetForm('popupForm')">取 消</el-button>
+					<el-button type="primary" @click="onSubmit('popupForm')">确 定</el-button>
+				</span>
+			</el-dialog>
+		</div>
+	</div>
 </template>
 <script>
-
 export default {
-  data() {
-    return {
-      active: 'balanceA',
-      loading: false,
-      tips_show: false,
-      clearAPointShow: false,
-      list: null,
-      total: null,
-      dept_name: '',
-      formData: {
-        keyword: '',
-        dept_id: '0',
-        page: 1,
-        page_size: 10
-      },
-      dept_tree: null,
-      popupForm: {
-        month: ''
-      }
-    };
-  },
-  watch: {
-    dept_name(val) {
-      this.formData.dept_id = val[val.length - 1];
-      this.$refs.dept.dropDownVisible = false;
-      this.getList();
-    },
-    active(val) {
-      this.list = [];
-      this.formData = {
-        keyword: '',
-        dept_id: '0',
-        page: 1,
-        page_size: 10
-      };
-      val == 'balanceA' ? this.getList() : this.getLog();
-    }
-  },
-  methods: {
-    resetForm(formName) {
-      this.clearAPointShow = false;
-      this.$refs[formName].resetFields();
-    },
-    // 清空数据
-    onSubmit(formName) {
-      this.$refs[formName].validate(valid => {
-        if (valid) {
-          this.$axios('post', '/api/integral/site/a/clear', this.popupForm)
-            .then(res => {
-              if (res.data.code == 1) {
-                this.$message.success('清除成功');
-                this.resetForm(formName);
-                this.getList();
-                this.clearAPointShow = false;
-              } else {
-                this.$message.error(res.data.data.msg);
-              }
-            })
-            .finally(() => {
-              this.loading = false;
-            });
-        }
-      });
-    },
-    // 关闭弹窗
-    clearAPointClose(formName) {
-      this.$refs[formName].resetFields();
-    },
-    // 提示信息
-    tips_close() {
-      this.$setCache('balanceA_tips', 'true');
-      this.tips_show = false;
-    },
-    // 页码变更
-    handleCurrentChange(val) {
-      this.formData.page = val;
-      this.active == 'balanceA' ? this.getList() : this.getLog();
-    },
-    handleSizeChange(val) {
-      this.formData.page_size = val;
-      this.active == 'balanceA' ? this.getList() : this.getLog();
-    },
-    // 获取列表
-    getList() {
-      this.loading = true;
-      this.$axios('get', '/api/integral/site/a/balance', this.formData)
-        .then(res => {
-          if (res.data.code == 1) {
-            this.list =this.$returnDeptName(res.data.data.list);
-            this.total = res.data.data.total;
-          } else {
-            this.$message.error(res.data.data.msg);
-          }
-        }).finally(() => {
-          this.loading = false;
-        });
-    },
-    // 获取日志列表
-    getLog() {
-      let self = this;
-      self.loading = true;
-      let data = {
-        page: this.formData.page,
-        page_size: this.formData.page_size
-      };
-      self
-        .$axios('get', '/api/integral/site/a/logs', data)
-        .then(res => {
-          if (res.data.code == 1) {
-            self.list = res.data.data.list;
-            self.total = res.data.data.total;
-          } else {
-            self.$message.error(res.data.data.msg);
-          }
-        })
-        .finally(() => {
-          self.loading = false;
-        });
-    },
-    // 递归判断列表,把最后的children设为undefined
-	getTreeData(data) {
-		for (var i = 0; i < data.length; i++) {
-			if (data[i]._child.length < 1) {
-				// children若为空数组,则将children设为undefined
-				data[i]._child = undefined;
-			} else {
-				// children若不为空数组,则继续 递归调用 本方法
-				this.getTreeData(data[i]._child);
+	data() {
+		return {
+			active: 'balanceA',
+			loading: false,
+			tips_show: false,
+			clearAPointShow: false,
+			list: null,
+			total: null,
+			dept_name: '',
+			formData: {
+				keyword: '',
+				dept_id: '0',
+				page: 1,
+				page_size: 10
+			},
+			dept_tree: null,
+			popupForm: {
+				month: ''
+			}
+		};
+	},
+	watch: {
+		dept_name(val) {
+			this.formData.dept_id = val[val.length - 1];
+			this.$refs.dept.dropDownVisible = false;
+			this.getList();
+		},
+		active(val) {
+			this.list = [];
+			this.formData = {
+				keyword: '',
+				dept_id: '0',
+				page: 1,
+				page_size: 10
+			};
+			val == 'balanceA' ? this.getList() : this.getLog();
+		}
+	},
+	methods: {
+		resetForm(formName) {
+			this.clearAPointShow = false;
+			this.$refs[formName].resetFields();
+		},
+		// 清空数据
+		onSubmit(formName) {
+			this.$refs[formName].validate(valid => {
+				if (valid) {
+					this.$axios('post', '/api/integral/site/a/clear', this.popupForm)
+						.then(res => {
+							if (res.data.code == 1) {
+								this.$message.success('清除成功');
+								this.resetForm(formName);
+								this.getList();
+								this.clearAPointShow = false;
+							} else {
+								this.$message.error(res.data.data.msg);
+							}
+						})
+						.finally(() => {
+							this.loading = false;
+						});
+				}
+			});
+		},
+		// 关闭弹窗
+		clearAPointClose(formName) {
+			this.$refs[formName].resetFields();
+		},
+		// 提示信息
+		tips_close() {
+			this.$setCache('balanceA_tips', 'true');
+			this.tips_show = false;
+		},
+		// 页码变更
+		handleCurrentChange(val) {
+			this.formData.page = val;
+			this.active == 'balanceA' ? this.getList() : this.getLog();
+		},
+		handleSizeChange(val) {
+			this.formData.page_size = val;
+			this.active == 'balanceA' ? this.getList() : this.getLog();
+		},
+		// 获取列表
+		getList() {
+			this.loading = true;
+			this.$axios('get', '/api/integral/site/a/balance', this.formData)
+				.then(res => {
+					if (res.data.code == 1) {
+						this.list = this.$returnDeptName(res.data.data.list);
+						this.total = res.data.data.total;
+					} else {
+						this.$message.error(res.data.data.msg);
+					}
+				})
+				.finally(() => {
+					this.loading = false;
+				});
+		},
+		// 获取日志列表
+		getLog() {
+			let self = this;
+			self.loading = true;
+			let data = {
+				page: this.formData.page,
+				page_size: this.formData.page_size
+			};
+			self.$axios('get', '/api/integral/site/a/logs', data)
+				.then(res => {
+					if (res.data.code == 1) {
+						self.list = res.data.data.list;
+						self.total = res.data.data.total;
+					} else {
+						self.$message.error(res.data.data.msg);
+					}
+				})
+				.finally(() => {
+					self.loading = false;
+				});
+		},
+		// 递归判断列表,把最后的children设为undefined
+		getTreeData(data) {
+			for (var i = 0; i < data.length; i++) {
+				if (data[i]._child.length < 1) {
+					// children若为空数组,则将children设为undefined
+					data[i]._child = undefined;
+				} else {
+					// children若不为空数组,则继续 递归调用 本方法
+					this.getTreeData(data[i]._child);
+				}
 			}
+			return data;
+		},
+		//获取部门
+		getDepartment() {
+			this.$axios('get', '/api/department/tree').then(res => {
+				this.dept_tree = this.getTreeData(res.data.data.list);
+			});
 		}
-		return data;
 	},
-	//获取部门
-	getDepartment() {
-		this.$axios('get','/api/department/tree').then(res => {
-			this.dept_tree =this.getTreeData(res.data.data.list);
-		});
+	created() {
+		this.getDepartment();
 	},
-  },
- created() {
- 	this.getDepartment();
- },
-  mounted() {
-    if (this.$getCache('balanceA_tips')) {
-      this.tips_show = false;
-    } else {
-      this.tips_show = true;
-    }
-    this.getList();
-  }
+	mounted() {
+		if (this.$getCache('balanceA_tips')) {
+			this.tips_show = false;
+		} else {
+			this.tips_show = true;
+		}
+		this.getList();
+	}
 };
 </script>
 <style scoped lang="scss">
 .box {
-  background-color: #ffffff;
-  padding: 20px;
+	background-color: #ffffff;
+	padding: 20px;
 }
 .listData {
-  position: relative;
-  display: table-cell;
-  margin: 0 !important;
-  padding: 20px;
-  min-height: 600px;
-  &::after {
-    content: ' ';
-    position: absolute;
-    top: 0;
-    left: 0;
-    bottom: 0;
-    width: 1px;
-    background: #ebeef5;
-  }
-  & .groups_name {
-    display: block;
-    font-size: 20px;
-    color: rgb(48, 49, 51);
-    vertical-align: middle;
-  }
+	position: relative;
+	display: table-cell;
+	margin: 0 !important;
+	padding: 20px;
+	min-height: 600px;
+	&::after {
+		content: ' ';
+		position: absolute;
+		top: 0;
+		left: 0;
+		bottom: 0;
+		width: 1px;
+		background: #ebeef5;
+	}
+	& .groups_name {
+		display: block;
+		font-size: 20px;
+		color: rgb(48, 49, 51);
+		vertical-align: middle;
+	}
 }
 ::v-deep .el-menu-item {
-  overflow: hidden;
-  white-space: nowrap;
-  text-overflow: ellipsis;
-  &.is-active {
-    background-color: #ecf5ff;
-  }
+	overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+	&.is-active {
+		background-color: #ecf5ff;
+	}
 }
 .diy-tip {
-  margin-bottom: 15px;
-  border: 1px solid #67c23a;
-  padding: 20px 16px;
-  p {
-    color: #67c23a !important;
-    font-size: 14px;
-    margin: 0 !important;
-    padding: 4px 0;
-  }
+	margin-bottom: 15px;
+	border: 1px solid #67c23a;
+	padding: 20px 16px;
+	p {
+		color: #67c23a !important;
+		font-size: 14px;
+		margin: 0 !important;
+		padding: 4px 0;
+	}
 }
 </style>

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

@@ -683,7 +683,6 @@ export default {
 					this.labelName = this.formData.pt_id == 2 ? 'A分' : 'B分';
 					if (res.data.code == 1) {
 						this.list =this.$returnDeptName(res.data.data.list);
-						console.log(this.list)
 						this.total = res.data.data.total;
 					} else {
 						this.$message.error(res.data.data.msg);

+ 211 - 128
src/views/set/rule.vue

@@ -13,18 +13,21 @@
 					</div>
 				</div>
 				<div class="terr-right border-right flex-1">
-					<div class="flex-box flex-v-ce">
+					<div class="flex-box flex-v-ce" style="margin-bottom: 12px;">
 						<div class="name">{{ selectItem.name }}</div>
 						<el-button size="medium" plain v-if="selectItem.id" @click="edit_class">编辑</el-button>
 					</div>
-					<div class="flex-box ruleSearch">
+					<div class="flex-box-ce fontColorB"  v-if="selectItem.dept_info.length>0">
+						可见范围:<span v-for="(item,index) in selectItem.dept_info" :key="index">{{item.name}} 、</span>
+					</div>
+					<div class="flex-box ruleSearch" style="padding-top: 8px;">
 						<div class="flex-box btns flex-v-ce">
 							<el-button size="small" @click="del_item" type="danger" plain>批量删除</el-button>
 							<el-button size="small" @click="add_rule" type="primary">添加规则</el-button>
 							<el-button size="small" type="success" @click="toleadShw = true" plain>导入规则</el-button>
 							<el-button size="small" type="success" @click="derivedRule" plain>导出规则</el-button>
 						</div>
-						<div class="" style="display:inline-block; width:180px;margin:20px 0 0 10px;">
+						<div class="" style="display:inline-block; width:180px;margin:0px 0 0 10px;">
 							<el-input
 								placeholder="搜索规则内容"
 								ref="search-bar"
@@ -79,12 +82,13 @@
 			:visible.sync="class_show"
 			@close="add_dept_close('dept_formdata')"
 			:close-on-click-modal="false"
-			width="500px"
+			width="600px"
 		>
 			<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" maxlength="10" show-word-limit></el-input></el-form-item>
+				<el-form-item label="规则分类" prop="name"><el-input style="width: 400px;" placeholder="分类名称" v-model="dept_formdata.name" maxlength="10" show-word-limit></el-input></el-form-item>
 				<el-form-item label="上级分类">
 					<el-cascader
+						style="width: 400px;"
 						ref="dept"
 						v-model="dept_formdata.pid"
 						:options="rule_tree"
@@ -93,6 +97,21 @@
 						filterable
 					></el-cascader>
 				</el-form-item>
+				<el-form-item label="可见范围" prop="dept_ids">
+					<el-cascader
+						size="medium"
+						style="width: 400px;"
+						v-model="dept_name"
+						@change="handleChange"
+						:options="dept_tree"
+						collapse-tags
+						:props="{ checkStrictly: true, value: 'id', label: 'name', multiple: true, children: '_child' }"
+						ref="dept"
+						clearable
+						placeholder="全公司"
+					></el-cascader>
+					<div style="color:#b5b7bb;padding-left:10px;">不选时,默认所有人可见</div>
+				</el-form-item>
 				<div class="flex-box">
 					<el-button type="danger" @click="del_dept" v-show="class_type == 'edit'">删除分类</el-button>
 					<div class="flex-1"></div>
@@ -101,6 +120,7 @@
 				</div>
 			</el-form>
 		</el-dialog>
+		
 
 		<!-- 添加编辑规则 -->
 		<el-dialog :title="rule_type == 'add' ? '添加规则' : '编辑规则'" :visible.sync="rule_show" :close-on-click-modal="false" width="600px">
@@ -169,43 +189,6 @@
 			</el-form>
 		</el-dialog>
 
-		<!-- 导入规则 -->
-		<!-- <el-dialog title="导入规则" :visible.sync="import_rules_show" width="500px" @before-close="close_import">
-			<el-row>
-				<el-col :span="12">
-					<div class="text-center">
-						<p>1、下载规则模版,填写好规则</p>
-						<p><img src="@/assets/image/rules_mould.png" alt="" /></p>
-						<p>规则表</p>
-						<p>
-							<a target="_blank" :href="downloadUrl"><el-button type="primary">下载模板</el-button></a>
-						</p>
-					</div>
-				</el-col>
-				<el-col :span="12">
-					<div class="text-center">
-						<p>2、上传填好的规则表</p>
-						<p><img src="@/assets/image/rules_mould1.png" alt="" /></p>
-						<p>仅支持xls、xlsx格式文件</p>
-						<el-upload
-							class="upload-demo"
-							:headers="ATOKEN"
-							ref="upload"
-							:limit="1"
-							:action="action"
-							:on-remove="handleRemove"
-							:on-success="handleSuccess"
-							:before-upload="beforeFilesUpload"
-							:file-list="fileList"
-						>
-							<el-button slot="trigger" type="primary">选取文件</el-button>
-						</el-upload>
-					</div>
-				</el-col>
-			</el-row>
-		</el-dialog> -->
-
-		
 		<toLead :visible.sync="toleadShw" :nowIndex.sync="nowIndex" :tolead="toleadResult" @confirm="tealConfirm" :export_type="'rule_items'" :dstyle="'height:180px;padding: 40px 80px;'">
 			<template slot="1">
 				<el-row v-if="nowIndex == 1">
@@ -271,7 +254,7 @@ export default {
 				children: 'child',
 				label: 'name'
 			},
-			selectItem: { name: '积分规则' }, //选择的分类
+			selectItem: { name: '积分规则',dept_info:[] }, //选择的分类
 			//添加分类
 			class_show: false,
 			delRule_loading: false,
@@ -293,7 +276,8 @@ export default {
 			dept_formdata: {
 				name: '',
 				pid: '0',
-				cycle_type: '1'
+				cycle_type: '1',
+				dept_ids:[],
 			},
 			class_type: 'add',
 			dept_loading: false,
@@ -361,17 +345,20 @@ export default {
 			import_btn_show: false,
 			fileList: [],
 			file: null,
-			flName: '',
 			// item_lists:[],
 			//导入相关
 			toleadShw: false,
 			nowIndex: 1,
-			toleadResult: {}
+			toleadResult: {},
+			
+			dept_tree:[],
+			dept_name:[],
+			employee_selected: { dept: [], employee: [] },
+			oneruleId: [],
+			echoGather: [],
 		};
 	},
-	components: {
-		toLead
-	},
+	components: {toLead},
 	watch: {
 		toleadShw(val){
 			if(val) this.nowIndex = 1
@@ -398,10 +385,111 @@ export default {
 				this.tips_show = true;
 			}
 		});
-		var that = this;
-		that.getData();
+		this.getData();
+		this.getDepartment();
 	},
 	methods: {
+		//编辑分组
+		edit_class() {
+			this.class_show = true;
+			this.class_type = 'edit';
+			this.echoGather=[];
+			this.dept_formdata = {
+				child: this.selectItem.child,
+				id: this.selectItem.id,
+				name: this.selectItem.name,
+				pid: this.selectItem.pid,
+				dept_ids:this.selectItem.dept_ids,
+			};
+			for (let i in this.selectItem.dept_ids) {
+				this.getTreeDatas(this.dept_tree, this.selectItem.dept_ids[i]);
+			}
+			this.dept_name = this.echoGather;
+		},
+		//添加分组
+		submit_add_dept(form) {
+			this.dept_loading = true;
+			let that = this;
+			that.$refs[form].validate(valid => {
+				if (valid) {
+					let pidData=JSON.parse(JSON.stringify(that.dept_formdata.pid))//备份选择的规则,因为提交时间PID会被重新赋值
+					that.dept_formdata.dept_ids=JSON.stringify(that.dept_formdata.dept_ids)
+					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;
+							}
+						}
+						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_formdata.pid=pidData
+								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_formdata.pid=pidData
+								this.dept_loading = false;
+							});
+					}
+				} else {
+					this.dept_loading = false;
+				}
+			});
+		},
+		getTreeDatas(data, item) {
+			for (let i in data) {
+				if (data[i].id == item) {
+					if (data[i].parentid == 1) {
+						this.oneruleId.unshift(data[i].id);
+						this.echoGather.push(this.oneruleId);
+						this.oneruleId = [];
+						break;
+					} else {
+						this.oneruleId.unshift(data[i].id);
+						this.getTreeDatas(this.dept_tree, data[i].parentid);
+					}
+				} else {
+					if (data[i]._child) {
+						this.getTreeDatas(data[i]._child, item);
+					}
+				}
+			}
+			return;
+		},
+		handleChange(val) {
+			let data = [];
+			for (let i in val) {
+				data.push(val[i][val[i].length - 1]);
+			}
+			this.dept_formdata.dept_ids = data;
+		},
 		handleOnthecross(event, file, fileList){
 			this.nowIndex = 2
 		},
@@ -410,6 +498,25 @@ export default {
 		  let userData=this.$getUserData();
 		  window.open(process.env.VUE_APP_BASE_API+'/api/download/rule_item/item?employee_id='+userData.id)
 		},
+		//获取部门
+		getDepartment() {
+			this.$axios('get', '/api/department/tree').then(res => {
+				this.dept_tree = this.getTreeData(res.data.data.list);
+			});
+		},
+		// 递归判断列表,把最后的children设为undefined
+		getTreeData(data) {
+			for (var i = 0; i < data.length; i++) {
+				if (data[i]._child.length < 1) {
+					// children若为空数组,则将children设为undefined
+					data[i]._child = undefined;
+				} else {
+					// children若不为空数组,则继续 递归调用 本方法
+					this.getTreeData(data[i]._child);
+				}
+			}
+			return data;
+		},
 		downloadE() {
 			let rule_remark = '';
 			if (this.ruleDetails.remark.length > 10) {
@@ -862,17 +969,24 @@ export default {
 
 		handleNodeClick(e) {
 			if(e.id){
+				this.$axios('get', '/api/integral/rule/info', { rule_id: e.id }).then(res => {
+					let dept_info=res.data.data.dept_info;
+					let dept_ids=dept_info.map(item=>{
+						return item.id
+					})
+					this.selectItem = {
+						child: e.child,
+						id: e.id,
+						name: e.name,
+						pid: e.pid,
+						dept_info:dept_info,
+						dept_ids:dept_ids
+					};
+				});
 				var items = this.getItemData(e);
-				this.selectItem = {
-					child: e.child,
-					id: e.id,
-					name: e.name,
-					pid: e.pid
-				};
-				this.flName = e.name;
 				this.item_list = items;
 			}else{
-				this.selectItem = { name: '积分规则' };
+				this.selectItem = { name: '积分规则',dept_info:[] };
 			}
 		},
 		getItemData(e) {
@@ -888,6 +1002,17 @@ export default {
 							if (item1.child && item1.child.length > 0) {
 								item1.child.map(item2 => {
 									ids.push(item2.id);
+									if (item2.child && item2.child.length > 0) {
+										item2.child.map(item3 => {
+											ids.push(item3.id);
+											if (item3.child && item3.child.length > 0) {
+												item3.child.map(item4 => {
+													ids.push(item4.id);	
+												});
+											}
+										});
+									}
+									
 								});
 							}
 						});
@@ -932,79 +1057,13 @@ export default {
 					if (is) {
 						this.handleNodeClick(this.selectItem);
 					} else {
-						this.selectItem = { name: '积分规则' }; //选择的分类
+						this.selectItem = { name: '积分规则',dept_info:[] }; //选择的分类
 					}
 				})
 				.finally(() => {
 					this.rule_loading = false;
 				});
 		},
-		//编辑分组
-		edit_class() {
-			this.class_show = true;
-			this.class_type = 'edit';
-			this.dept_formdata = {
-				child: this.selectItem.child,
-				id: this.selectItem.id,
-				name: this.selectItem.name,
-				pid: this.selectItem.pid
-			};
-		},
-		//添加分组
-		submit_add_dept(form) {
-			this.dept_loading = true;
-			let that = this;
-			that.$refs[form].validate(valid => {
-				if (valid) {
-					let pidData=JSON.parse(JSON.stringify(that.dept_formdata.pid))//备份选择的规则,因为提交时间PID会被重新赋值
-					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;
-							}
-						}
-						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_formdata.pid=pidData
-								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_formdata.pid=pidData
-								this.dept_loading = false;
-							});
-					}
-				} else {
-					this.dept_loading = false;
-				}
-			});
-		},
 		//删除分组
 		del_dept() {
 			this.$confirm('此操作将永久删除该分组, 是否继续?', '提示', {
@@ -1035,10 +1094,12 @@ export default {
 		add_class() {
 			this.class_show = true;
 			this.class_type = 'add';
+			this.dept_name=[];
 			this.dept_formdata = {
 				name: '',
 				pid: '0',
-				cycle_type: '1'
+				cycle_type: '1',
+				dept_ids:[],
 			};
 		}
 	}
@@ -1046,6 +1107,29 @@ export default {
 </script>
 
 <style scoped lang="scss">
+.border {
+  -webkit-appearance: none;
+  background-color: #fff;
+  background-image: none;
+  border-radius: 4px;
+  border: 1px solid #dcdfe6;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  color: #c0c4cf;
+  font-size: inherit;
+  height: auto;
+  outline: 0;
+  padding: 0 15px;
+  width: 400px;
+  position: relative;
+  cursor: pointer;
+}
+.border .font-flex-word {
+  color: #606266;
+}	
+	
+	
+	
 $red: #f56c6c;
 ::v-deep .el-table__row{
 	cursor: pointer;
@@ -1073,7 +1157,6 @@ $red: #f56c6c;
 		font-size: 14px;
 		height: 38px;
 		width: 90px;
-		margin-top: 20px;
 		margin-right: 5px;
 	}
 }

+ 1 - 1
src/views/task/allTask.vue

@@ -2,7 +2,7 @@
 	<div>
 		<div class="box">
 			<el-tabs v-model="formData.status">
-				<el-tab-pane v-for="(item, index) in tabsOption" :key="index" :label="item.label" :name="item.name"></el-tab-pane>
+				<el-tab-pane :disabled="loading" v-for="(item, index) in tabsOption" :key="index" :label="item.label" :name="item.name"></el-tab-pane>
 			</el-tabs>
 
 			<el-form ref="formData" :inline="true" :model="formData" label-width="80px">

+ 2 - 2
src/views/task/get_task.vue

@@ -2,8 +2,8 @@
 	<div>
 		<div class="box">
 			<el-tabs v-model="active">
-				<el-tab-pane label="待领取" name="unclaimed"></el-tab-pane>
-				<el-tab-pane label="已领取" name="received"></el-tab-pane>
+				<el-tab-pane :disabled="loading" label="待领取" name="unclaimed"></el-tab-pane>
+				<el-tab-pane :disabled="loading" label="已领取" name="received"></el-tab-pane>
 			</el-tabs>
 			<div v-show="active === 'unclaimed'">
 				<el-table :data="list" style="width: 100%" v-loading="loading" @row-click="openDetail">

+ 1 - 1
src/views/task/myExamine.vue

@@ -2,7 +2,7 @@
 	<div>
 		<div class="box">
 			<el-tabs v-model="formData.status">
-				<el-tab-pane v-for="(item, index) in tabsOption" :key="index" :label="item.label" :name="item.name"></el-tab-pane>
+				<el-tab-pane  :disabled="loading" v-for="(item, index) in tabsOption" :key="index" :label="item.label" :name="item.name"></el-tab-pane>
 			</el-tabs>
 
 			<el-form ref="formData" :inline="true" :model="formData" label-width="80px">

+ 41 - 11
src/views/task/my_issue.vue

@@ -1,7 +1,7 @@
 <template>
 	<div>
 		<div class="box">
-			<el-tabs v-model="status"><el-tab-pane v-for="(item, index) in tabsOption" :key="index" :label="item.label" :name="item.name"></el-tab-pane></el-tabs>
+			<el-tabs v-model="status"><el-tab-pane :disabled="loading" v-for="(item, index) in tabsOption" :key="index" :label="item.label" :name="item.name"></el-tab-pane></el-tabs>
 			<el-form ref="formData" :inline="true" :model="formData" label-width="70px">
 				<el-form-item>
 					<el-dropdown @command="downClick">
@@ -113,7 +113,7 @@
 								<span class="el-dropdown-links">···</span>
 								<el-dropdown-menu slot="dropdown">
 									<el-dropdown-item :disabled="false" v-if="scope.row.status == 1">
-										<el-button type="text" class="color-red" v-loading.fullscreen.lock="bodyLoad" @click.stop="issueAmend1(scope.row)">修改</el-button>
+										<el-button type="text" class="color-blue" v-loading.fullscreen.lock="bodyLoad" @click.stop="issueAmend1(scope.row)">修改</el-button>
 									</el-dropdown-item>
 									<el-dropdown-item :disabled="false">
 										<el-button type="text" class="color-red" v-loading.fullscreen.lock="bodyLoad" @click.stop="deletes(scope.row, 0)">删除</el-button>
@@ -176,7 +176,7 @@
 								<span class="el-dropdown-links">···</span>
 								<el-dropdown-menu slot="dropdown">
 									<el-dropdown-item :disabled="false" v-if="scope.row.status == 1">
-										<el-button type="text" class="color-red" v-loading.fullscreen.lock="bodyLoad" @click.stop="offerARewardAmend2(scope.row)">修改</el-button>
+										<el-button type="text" class="color-blue" v-loading.fullscreen.lock="bodyLoad" @click.stop="offerARewardAmend2(scope.row)">修改</el-button>
 									</el-dropdown-item>
 									<el-dropdown-item :disabled="false">
 										<el-button type="text" class="color-red" v-loading.fullscreen.lock="bodyLoad" @click.stop="deletes(scope.row, 1)">删除</el-button>
@@ -204,7 +204,7 @@
 					</el-table-column>
 					<el-table-column label="任务内容" prop="remark">
 						<template slot-scope="scope">		
-					<span class="font-flex-word" style="max-width: 200px;">{{ scope.row.name || scope.row.remark }}</span>
+							<span class="font-flex-word" style="max-width: 200px;">{{ scope.row.name || scope.row.remark }}</span>
 						</template>
 					</el-table-column>
 					<el-table-column label="任务积分" prop="point_config.base_point" width="130px">
@@ -222,7 +222,6 @@
 							<span v-if="scope.row.task_cycle == '3'">每月1号自动发布,{{ scope.row.task_cycle_value }}号截止</span>
 						</template>
 					</el-table-column>
-
 					<el-table-column label="可见范围" prop="department_info">
 						<template slot-scope="scope">
 							<span v-for="(item, index) in scope.row.department_info" :key="index">
@@ -238,9 +237,8 @@
 							<el-dropdown placement="bottom" :show-timeout="150" :hide-timeout="150">
 								<span class="el-dropdown-links">···</span>
 								<el-dropdown-menu slot="dropdown">
-									<el-dropdown-item :disabled="false">
-										<el-button type="text" class="color-red" v-loading.fullscreen.lock="bodyLoad" @click.stop="deletes(scope.row, 2)">删除</el-button>
-									</el-dropdown-item>
+									<el-dropdown-item :disabled="false"><el-button type="text" class="color-blue" v-loading.fullscreen.lock="bodyLoad" @click.stop="copyTask(scope.row)">复制</el-button></el-dropdown-item>
+									<el-dropdown-item :disabled="false"><el-button type="text" class="color-red" v-loading.fullscreen.lock="bodyLoad" @click.stop="deletes(scope.row, 2)">删除</el-button></el-dropdown-item>
 								</el-dropdown-menu>
 							</el-dropdown>
 						</template>
@@ -265,11 +263,11 @@
 			</center>
 		</div>
 		<!-- 临时任务 -->
-		<temporaryTask :dialogVisible.sync="dialogVisible" :trees_ab="trees_v2_ab_module" :showTitle="'临时任务'"></temporaryTask>
+		<temporaryTask :dialogVisible.sync="dialogVisible" :trees_ab="trees_v2_ab_module" :isFy="isFy" :modifyData="fyData" :showTitle="'临时任务'"></temporaryTask>
 		<!-- 临时任务-修改 -->
 		<temporaryTaskAmend :dialogVisible.sync="dialogVisibleAmend" :trees_ab="trees_v2_ab_module" :showTitle="'任务编辑'" :modifyData="modifyData"></temporaryTaskAmend>
 		<!-- 悬赏任务 -->
-		<rewardTask :dialogVisible.sync="rewardTaskShow" :trees_ab="trees_v2_ab_module" :showTitle="'悬赏任务'"></rewardTask>
+		<rewardTask :dialogVisible.sync="rewardTaskShow" :isFy="isFy" :modifyData="fyData" :trees_ab="trees_v2_ab_module" :showTitle="'悬赏任务'"></rewardTask>
 		<!-- 悬赏任务-修改 -->
 		<rewardTaskAmend
 			:dialogVisible.sync="rewardTaskAmendShow"
@@ -354,11 +352,25 @@ export default {
 				B: [],
 				rule_tree: []
 			},
-			employee_map: [] //人员列表
+			employee_map: [], //人员列表
+			
+			//重复任务复用
+			isFy:false,
+			fyData:{},
 		};
 	},
 	components: {temporaryTask, rewardTask, rewardTaskAmend, temporaryTaskAmend, taskDetailsPopup, repeatTaskDetailsPopup, rewardTaskDetailsPopup },
 	watch: {
+		dialogVisible(val){
+			if(!val){
+				this.isFy=false;
+			}
+		},
+		rewardTaskShow(val){
+			if(!val){
+				this.isFy=false;
+			}
+		},
 		status(val) {
 			this.formData.executor_id = '';
 			this.formData.reviewer_id = '';
@@ -463,6 +475,17 @@ export default {
 					this.$refs.rewardTasks.forTheTaskLoading = false;
 				});
 		},
+		//重复任务复用
+		copyTask(item){
+			this.$axios('get', '/api/integral/schedule', { schedule_id: item.id }).then(res => {
+				let data=res.data.data
+				data.task_file_list=data.file_list;
+				data.id="";
+				this.isFy=true;
+				this.fyData=data;
+				this.downClick(item.type)
+			});
+		},
 		//任务修改
 		issueAmend1(item) {
 			this.modifyData = item;
@@ -537,6 +560,7 @@ export default {
 		},
 		get_list() {
 			let self = this;
+			this.list=[];
 			self.loading = true;
 			let params = JSON.parse(JSON.stringify(this.formData));
 			params.pt_id == 0 ? delete params.pt_id : '';
@@ -641,6 +665,12 @@ $red: #f56c6c;
 		color: #f14141;
 	}
 }
+.color-blue {
+	color: #26A2FF;
+	&:hover {
+		color: #26A2FF;
+	}
+}
 .delicon {
 	font-size: 20px;
 	float: right;

+ 3 - 13
src/views/task/my_task.vue

@@ -2,7 +2,7 @@
 	<div>
 		<div class="box">
 			<el-tabs v-model="formData.status">
-				<el-tab-pane v-for="(item, index) in tabsOption" :key="index" :label="item.label" :name="item.name"></el-tab-pane>
+				<el-tab-pane :disabled="loading" v-for="(item, index) in tabsOption" :key="index" :label="item.label" :name="item.name"></el-tab-pane>
 			</el-tabs>
 
 			<el-form ref="formData" :inline="true" :model="formData" label-width="80px">
@@ -39,12 +39,7 @@
 							<span class="green" v-else>
 								{{ scope.row.point_config.base_point }} {{ scope.row.pt_name }}
 							</span>
-<!-- 							<span class="red" v-if="scope.row.point_config.review_point!=0">
-								+{{ scope.row.point_config.review_point }} {{ scope.row.pt_name }}
-							</span>
-							<span class="red" v-else>
-								+{{ scope.row.point_config.base_point }} {{ scope.row.pt_name }}
-							</span> -->
+
 						</template>
 					</el-table-column>
 					<el-table-column label="截止时间" prop="expire_time"></el-table-column>
@@ -75,12 +70,7 @@
 							<span class="green" v-else>
 								{{ scope.row.point_config.base_point }} {{ scope.row.pt_name }}
 							</span>
-<!-- 							<span class="red" v-if="scope.row.point_config.review_point!=0">
-								+{{ scope.row.point_config.review_point }} {{ scope.row.pt_name }}
-							</span>
-							<span class="red" v-else>
-								+{{ scope.row.point_config.base_point }} {{ scope.row.pt_name }}
-							</span> -->
+
 						</template>
 					</el-table-column>
 					<el-table-column label="截止时间" prop="expire_time"></el-table-column>

+ 1 - 3
src/views/workbench/approval_batch.vue

@@ -279,8 +279,6 @@ export default {
 			let wsData=this.resultList;
 			if(wsData[this.resultIndex]){
 				this.$socketApi.sendData(wsData[this.resultIndex],this.onmessageWS)
-			}else{
-				// console.log(this.results)
 			}
 		},
 		onmessageWS(e){
@@ -290,7 +288,7 @@ export default {
 				result.name=item.employee_name
 				result.remark=item.remark
 				result.point=item.point
-				result.pt_id=e.pt_id
+				result.pt_id=item.pt_id
 				this.results.push(e.result);
 				
 				this.resultIndex++;

+ 2 - 2
src/views/workbench/review.vue

@@ -2,8 +2,8 @@
 	<div>
 		<div class="all padding-20">
 			<el-tabs v-model="active">
-				<el-tab-pane label="待复核" name="review"></el-tab-pane>
-				<el-tab-pane label="已复核" name="noreview"></el-tab-pane>
+				<el-tab-pane :disabled="loading" label="待复核" name="review"></el-tab-pane>
+				<el-tab-pane :disabled="loading" label="已复核" name="noreview"></el-tab-pane>
 			</el-tabs>
 			<el-form ref="form" :inline="true" label-width="80px">
 				<el-form-item label="规则分类">