哥哥玩剑魂呢 3 年之前
父節點
當前提交
70aae2d4fd

+ 2 - 2
src/api/axios.js

@@ -8,7 +8,7 @@ import qs from 'qs'
 const service = axios.create({
 	baseURL: process.env.VUE_APP_BASE_API, 
 	// baseURL:'https://ding.insys.g107.com/',
-	timeout: 10000,
+	timeout: 20000,
 	headers: {
 		'Content-Type': 'application/x-www-form-urlencoded',
 	},
@@ -78,7 +78,7 @@ service.interceptors.response.use(
 				type: 'error',
 			})
 			return Promise.reject(error.message)
-		}else if(error.message=='timeout of 10000ms exceeded'){
+		}else if(error.message=='timeout of 20000ms exceeded'){
 			Message({
 				message: '请求超时,请稍后再试',
 				type: 'error',

+ 9 - 6
src/hint.vue

@@ -18,7 +18,7 @@ export default {
 		return {
 			corpId: '',
 			token: '',
-			type: 'PC',
+			type: 'APP',
 			width: ''
 		};
 	},
@@ -27,12 +27,16 @@ export default {
 	},
 	mounted() {
 		var url = window.location.href;
+		// let url='https://test-ding.g107.com/?purchaseToken=$PURCHASE_TOKEN$&corpId=$CORPID$&appEntityType=PC#/hint';
 		var data = this.GetRequest(url);
-		console.log(data);
 		this.corpId = data.corpId;
 		this.token = data.purchaseToken;
-		this.type = data.appEntityType;
-		// this.type = "APP";
+		if(data.appEntityType.indexOf('APP')>=0){
+			this.type ='APP';
+		}else{
+			this.type ='PC';
+		}
+		console.log(data,this.type)
 		if (this.corpId) {
 			this.$nextTick(()=>{
 				this.init();
@@ -50,7 +54,7 @@ export default {
 				appId: 55493,
 				// 从应用首页的url上获取到,url上参数名为 purchaseToken。
 				// purchaseToken如何配置参照下文”配置入口地址“章节。
-				token: this.token,
+				// token: this.token,
 				miniAppId: this.type == 'APP' ? 5000000000104741 : '' // 如果是三方小程序应用,需要设置一下自身的miniAppId。H5微应用可以不设置这个参数
 			}).then(res => {
 				const {
@@ -69,7 +73,6 @@ export default {
 						openLink({ url:'https://pc.dd.g107.com?corpId=' + corpId }).then(() => close({}));
 					}
 				}
-				// action不是ok的情况下,可以不采取任何动作
 			})
 			.catch((res) => {
 				console.log(res);

+ 209 - 207
src/views/common/repeatTaskDetailsPopup.vue

@@ -1,69 +1,74 @@
 <template>
-  <div>
-    <!-- 重复任务详情弹窗 -->
-    <el-drawer :visible.sync="Delay_to_open"  :with-header="false" :size="'500px'" :before-close="handleClose" :custom-class="'drawer_details'">
-      <div class="details_title">{{title}}</div>
-      <div class="details_content" v-if="workDetailData" v-loading="loading">
-        <ul>
-          <li class="flex-box">
-            <div class="label">任务内容</div>
-            <div class="content_text">{{workDetailData.name}}</div>
-          </li>
-          <li class="flex-box">
-            <div class="label">任务描述</div>
-            <div class="content_text">{{workDetailData.remark}}</div>
-          </li>
-          <li class="flex-box" v-if="workDetailData">
-            <div class="label">执行周期</div>
-            <div class="content_text">{{workDetailData.task_expire_day}}{{workDetailData.task_cycle == 1?'天':workDetailData.task_cycle == 2?'周':'月'}}</div>
-          </li>
-          <li class="flex-box" v-if="workDetailData.point_config">
-            <div class="label">任务积分</div>
-            <div class="content_text">{{workDetailData.point_config.base_point}} <span>{{workDetailData.pt_id == 2 ? 'A分' : workDetailData.pt_id == 3 ? 'B分' : ''}}</span> </div>
-          </li>
-          <li class="flex-box" v-if="workDetailData.file_list && workDetailData.file_list.length > 0">
-            <div class="label">附件</div>
-            <div class="content_text">
-              <el-image
-                v-for="(item, index) in workDetailData.file_list"
-                :key="index"
-                style="width: 100px; height: 100px;margin-right:8px"
-                :src="item"
-                :preview-src-list="workDetailData.file_list"
-              ></el-image>
-            </div>
-          </li>
-          <li class="flex-box">
-            <div class="label">发布人</div>
-            <div class="content_text">{{workDetailData.owner_name}}</div>
-          </li>
-          <li class="flex-box">
-            <div class="label">创建时间</div>
-            <div class="content_text">{{workDetailData.create_time}}</div>
-          </li>
-          <li class="flex-box">
-            <div class="label">截止时间</div>
-            <div class="content_text">
-              <span v-if="workDetailData.task_cycle == '1'">每天{{dayTime(workDetailData.task_cycle_value)}}截止</span>
-              <span v-if="workDetailData.task_cycle == '2'">
-                <span>每周{{weekList[workDetailData.task_cycle_value - 1]}}截止</span>
-              </span>
-              <span v-if="workDetailData.task_cycle == '3'">每月{{workDetailData.task_cycle_value}}号截止</span>
-            </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'">
-                <span>每周一自动发布,周{{weekList[scope.row.task_cycle_value - 1]}}截止</span>
-              </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>
+		<!-- 重复任务详情弹窗 -->
+		<el-drawer :visible.sync="Delay_to_open" :with-header="false" :size="'500px'" :before-close="handleClose" :custom-class="'drawer_details'">
+			<div class="details_title">{{ title }}</div>
+			<div class="details_content" v-if="workDetailData" v-loading="loading">
+				<ul>
+					<li class="flex-box">
+						<div class="label">任务内容</div>
+						<div class="content_text">{{ workDetailData.name }}</div>
+					</li>
+					<li class="flex-box">
+						<div class="label">任务描述</div>
+						<div class="content_text">{{ workDetailData.remark }}</div>
+					</li>
+					<li class="flex-box" v-if="workDetailData">
+						<div class="label">执行周期</div>
+						<div class="content_text">
+							{{ workDetailData.task_expire_day }}{{ workDetailData.task_cycle == 1 ? '天' : workDetailData.task_cycle == 2 ? '周' : '月' }}
+						</div>
+					</li>
+					<li class="flex-box" v-if="workDetailData.point_config">
+						<div class="label">任务积分</div>
+						<div class="content_text">
+							{{ workDetailData.point_config.base_point }}
+							<span>{{ workDetailData.pt_id == 2 ? 'A分' : workDetailData.pt_id == 3 ? 'B分' : '' }}</span>
+						</div>
+					</li>
+					<li class="flex-box" v-if="workDetailData.file_list && workDetailData.file_list.length > 0">
+						<div class="label">附件</div>
+						<div class="content_text">
+							<el-image
+								v-for="(item, index) in workDetailData.file_list"
+								:key="index"
+								style="width: 100px; height: 100px;margin-right:8px"
+								:src="item"
+								:preview-src-list="workDetailData.file_list"
+							></el-image>
+						</div>
+					</li>
+					<li class="flex-box">
+						<div class="label">发布人</div>
+						<div class="content_text">{{ workDetailData.owner_name }}</div>
+					</li>
+					<li class="flex-box">
+						<div class="label">创建时间</div>
+						<div class="content_text">{{ workDetailData.create_time }}</div>
+					</li>
+					<li class="flex-box">
+						<div class="label">截止时间</div>
+						<div class="content_text">
+							<span v-if="workDetailData.task_cycle == '1'">每天{{ dayTime(workDetailData.task_cycle_value) }}截止</span>
+							<span v-if="workDetailData.task_cycle == '2'">
+								<span>每周{{ weekList[workDetailData.task_cycle_value - 1] }}截止</span>
+							</span>
+							<span v-if="workDetailData.task_cycle == '3'">每月{{ workDetailData.task_cycle_value }}号截止</span>
+						</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'">
+							<span>每周一自动发布,周{{ weekList[scope.row.task_cycle_value - 1] }}截止</span>
+						</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>
 					</li>
-          <li class="flex-box" v-if="workDetailData.point_config && workDetailData.point_config.ahead_award_point_limit">
+					<li class="flex-box" v-if="workDetailData.point_config && workDetailData.point_config.ahead_award_point_limit">
 						<div class="label">奖分上限</div>
 						<div class="content_text">{{ workDetailData.point_config.ahead_award_point_limit }}</div>
 					</li>
@@ -96,155 +101,152 @@
 						</el-col>
 					</el-row>
 				</div>
-        <el-row style=" margin-bottom: 20px;">
-          <el-col :span="24" style="line-height: 30px;">审批人</el-col>
-          <el-col :span="24">
-            <div style="display:flex">
-              <userImage :user_name="workDetailData.reviewer_name" width="50px" height="50px" style=" margin-right: 15px;" fontSize="1"></userImage>
-              <p style="margin: 0; line-height: 50px;">{{workDetailData.reviewer_name}}</p>
-            </div>
-          </el-col>
-        </el-row>
-        <el-row v-if="workDetailData.target_info">
-          <el-col :span="24" style="line-height: 30px;">执行人</el-col>
-          <el-col :span="24">
-            <div v-for="(item,index) in workDetailData.target_info" :key="index" style="margin-bottom: 10px;display:flex;">
-              <userImage  :user_name="item.name" width="50px" height="50px" style=" margin-right: 15px;" fontSize="1"></userImage>
-              <p style="margin: 0; line-height: 50px;">{{item.name}}</p>
-            </div>
-          </el-col>
-        </el-row>
-      </div>
-    </el-drawer>
-
-  </div>
+				<el-row style=" margin-bottom: 20px;">
+					<el-col :span="24" style="line-height: 30px;">审批人</el-col>
+					<el-col :span="24">
+						<div style="display:flex">
+							<userImage :user_name="workDetailData.reviewer_name" width="50px" height="50px" style=" margin-right: 15px;" fontSize="1"></userImage>
+							<p style="margin: 0; line-height: 50px;">{{ workDetailData.reviewer_name }}</p>
+						</div>
+					</el-col>
+				</el-row>
+				<el-row v-if="workDetailData.target_info">
+					<el-col :span="24" style="line-height: 30px;">执行人</el-col>
+					<el-col :span="24">
+						<div v-for="(item, index) in workDetailData.target_info" :key="index" style="margin-bottom: 10px;display:flex;">
+							<userImage :user_name="item.name" width="50px" height="50px" style=" margin-right: 15px;" fontSize="1"></userImage>
+							<p style="margin: 0; line-height: 50px;">{{ item.name }}</p>
+						</div>
+					</el-col>
+				</el-row>
+			</div>
+		</el-drawer>
+	</div>
 </template>
 
 <script>
-  export default {
-    name: 'repeatTaskDetailsPopup',
-    props:{
-      title: {
-        type: String,
-        default: ''
-      },
-      visible: {
-        type: Boolean,
-        default: false
-      },
-      id: {
-        type: Number,
-        default: 0
-      },
-    },
-    data() {
-      return {
-        Delay_to_open:false,//打开抽屉
-        
-        loading: false,
-        workDetailData:{},
-        weekList: ['一', '二', '三', '四', '五', '六', '日'],
-      }
-    },
-    components: {},
-    watch:{},
-    mounted() {
-      this.getData()
-      this.Delay_to_open = this.visible//更换打开抽屉时机,避免打开两次
-    },
-    methods: {
-      dayTime(item){
-        return item > 9 ? item + ': 00' : '0' + item + ': 00'
-      },
-      // 关闭弹窗
-      handleClose(){
-        this.$emit('update:visible', false)
-      },
-      // 获取数据
-      getData(){
-        let self = this
-        self.loading = true
-        let data =  {schedule_id: this.id}
-        self.$axios('get','/api/integral/schedule',data
-        ).then(res => {
+export default {
+	name: 'repeatTaskDetailsPopup',
+	props: {
+		title: {
+			type: String,
+			default: ''
+		},
+		visible: {
+			type: Boolean,
+			default: false
+		},
+		id: {
+			type: Number,
+			default: 0
+		}
+	},
+	data() {
+		return {
+			Delay_to_open: false, //打开抽屉
+
+			loading: false,
+			workDetailData: {},
+			weekList: ['一', '二', '三', '四', '五', '六', '日']
+		};
+	},
+	mounted() {
+		this.getData();
+		this.Delay_to_open = this.visible; //更换打开抽屉时机,避免打开两次
+	},
+	methods: {
+		dayTime(item) {
+			return item > 9 ? item + ': 00' : '0' + item + ': 00';
+		},
+		// 关闭弹窗
+		handleClose() {
+			this.$emit('update:visible', false);
+		},
+		// 获取数据
+		getData() {
+			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
-          }
-          self.loading = false
-				}).finally(()=>{
-          self.loading = false
-        })
-      }
-    }
-  }
+						self.workDetailData = res.data.data;
+					}
+				})
+				.finally(() => {
+					self.loading = false;
+				});
+		}
+	}
+};
 </script>
 <style lang="scss" scoped="scoped">
-  .details_content{
-    & .d_userMessage{
-      margin-left: 10px;
-    }
-    & .d_userMessage div:nth-child(1){
-      font-size: 16px;
-      margin-bottom: 8px;
-    }
-    & .d_userMessage div:nth-child(2){
-      font-size: 12px;
-      color: #909399;
-    }
-    & .d_progress{
-      padding: 12px 0;
-      border-bottom: 1px solid #f1f1f1;
-      margin-bottom: 10px;
-    }
-    & ul{
-      padding: 12px 0;
-      border-bottom: 1px solid #f1f1f1;
-      & li{
-        padding: 6px 0;
-      }
-      & .label{
-        width: 80px;
-        text-align: left;
-        color: #909399;
-      }
-      & .content_text{
-        flex:1
-      }
-    }
-  }
-  .fontColorF{
-    color:#909399;
-  }
-  .details_content {
-    padding: 20px;
-    height: calc(100vh - 60px);
-    overflow: auto;
-    .row_title {
-      position: relative;
-      margin: 0 0 20px 0;
-      padding-top: 12px;
-      font-size: 16px;
-      color: #303133;
-      line-height: 22px;
-    }
-    .row_title:before {
-      position: absolute;
-      top: 0;
-      content: ' ';
-      width: 100%;
-      border-top: 1px #f8f8f8 solid;
-    }
-    .el-row {
-      margin-bottom: 10px;
-      font-size: 14px;
-      .el-col-4 {
-        color: #606266;
-      }
-    }
-  }
-  .details_title {
-    font-size: 18px;
-    padding: 20px;
-    border-bottom: 1px #efefef solid;
-  }
+.details_content {
+	& .d_userMessage {
+		margin-left: 10px;
+	}
+	& .d_userMessage div:nth-child(1) {
+		font-size: 16px;
+		margin-bottom: 8px;
+	}
+	& .d_userMessage div:nth-child(2) {
+		font-size: 12px;
+		color: #909399;
+	}
+	& .d_progress {
+		padding: 12px 0;
+		border-bottom: 1px solid #f1f1f1;
+		margin-bottom: 10px;
+	}
+	& ul {
+		padding: 12px 0;
+		border-bottom: 1px solid #f1f1f1;
+		& li {
+			padding: 6px 0;
+		}
+		& .label {
+			width: 80px;
+			text-align: left;
+			color: #909399;
+		}
+		& .content_text {
+			flex: 1;
+		}
+	}
+}
+.fontColorF {
+	color: #909399;
+}
+.details_content {
+	padding: 20px;
+	height: calc(100vh - 60px);
+	overflow: auto;
+	.row_title {
+		position: relative;
+		margin: 0 0 20px 0;
+		padding-top: 12px;
+		font-size: 16px;
+		color: #303133;
+		line-height: 22px;
+	}
+	.row_title:before {
+		position: absolute;
+		top: 0;
+		content: ' ';
+		width: 100%;
+		border-top: 1px #f8f8f8 solid;
+	}
+	.el-row {
+		margin-bottom: 10px;
+		font-size: 14px;
+		.el-col-4 {
+			color: #606266;
+		}
+	}
+}
+.details_title {
+	font-size: 18px;
+	padding: 20px;
+	border-bottom: 1px #efefef solid;
+}
 </style>

+ 65 - 70
src/views/common/rewardTask.vue

@@ -152,18 +152,37 @@
 						></el-cascader>
 						<span style="color:#b5b7bb;padding-left:10px;">选中的部门可查看或领取任务</span>
 					</el-form-item>
-					
+
 					<div style="margin-left: 80px; margin-bottom: 8px;">以天为单位,每 提前/逾期 一天 加分/扣分</div>
 					<el-form-item label="提前奖分" prop="ahead_award_point">
-						<el-input v-model="formData.ahead_award_point" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入每日奖分" style="width: 150px;"></el-input> B分/每天,
-						奖分上限 &nbsp;<el-input v-model="formData.ahead_award_point_limit" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入奖分上限" style="width: 150px;"></el-input> B分
+						<el-input v-model="formData.ahead_award_point" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入每日奖分" style="width: 150px;"></el-input>
+						B分/每天, 奖分上限 &nbsp;
+						<el-input
+							v-model="formData.ahead_award_point_limit"
+							oninput="value=value.replace(/[^\d]/g,'')"
+							placeholder="请输入奖分上限"
+							style="width: 150px;"
+						></el-input>
+						B分
 					</el-form-item>
-					<el-form-item label="逾期扣分"  prop="timeout_deduction_point" >
-						<el-input v-model="formData.timeout_deduction_point" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入每日扣分" style="width: 150px;"></el-input> B分/每天,
-						扣分上限 &nbsp;<el-input v-model="formData.timeout_deduction_point_limit" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入扣分上限" style="width: 150px;"></el-input> B分
+					<el-form-item label="逾期扣分" prop="timeout_deduction_point">
+						<el-input
+							v-model="formData.timeout_deduction_point"
+							oninput="value=value.replace(/[^\d]/g,'')"
+							placeholder="请输入每日扣分"
+							style="width: 150px;"
+						></el-input>
+						B分/每天, 扣分上限 &nbsp;
+						<el-input
+							v-model="formData.timeout_deduction_point_limit"
+							oninput="value=value.replace(/[^\d]/g,'')"
+							placeholder="请输入扣分上限"
+							style="width: 150px;"
+						></el-input>
+						B分
 					</el-form-item>
-					<el-form-item v-show="false" prop="ahead_award_point_limit" ></el-form-item>
-					<el-form-item v-show="false" prop="timeout_deduction_point_limit" ></el-form-item>
+					<el-form-item v-show="false" prop="ahead_award_point_limit"></el-form-item>
+					<el-form-item v-show="false" prop="timeout_deduction_point_limit"></el-form-item>
 					<el-form-item>
 						<div class="flex-box-end">
 							<el-button @click="resetForm('formData')">取消</el-button>
@@ -455,21 +474,21 @@ export default {
 			this.dept_selected = { dept: [], employee: [] };
 			console.log(this.formData)
 		},
-		ahead_timeout(item,arr,codes,code){
-			if(item){
-				if(arr){
-					if(Number(item) > Number(arr)){
-						this.$message.warning(code +'上限不能小于每日'+ code)
-						return true
+		ahead_timeout(item, arr, codes, code) {
+			if (item) {
+				if (arr) {
+					if (Number(item) > Number(arr)) {
+						this.$message.warning(code + '上限不能小于每日' + code);
+						return true;
 					}
-				}else{
-					this.$message.warning( codes + '不为0时,'+ code +'上限不能为空')
-					return true
+				} else {
+					this.$message.warning(codes + '不为0时,' + code + '上限不能为空');
+					return true;
 				}
 			}
 		},
-		deletedata(data,arr){
-			data[arr] && data[arr] != 0 ?  '' : delete data[arr]
+		deletedata(data, arr) {
+			data[arr] && data[arr] != 0 ? '' : delete data[arr];
 		},
 		// 提交
 		saveFun(formName) {
@@ -488,39 +507,39 @@ export default {
 				delete data.expire_time;
 				data.task_remark ? '' : delete data.task_remark;
 			}
-			if(!data.ahead_award_point && data.ahead_award_point_limit){
-				this.$message.warning('奖分上限不为0时每日奖分不能为空')
-				return
-			}else if(data.ahead_award_point && !data.ahead_award_point_limit){
-				this.$message.warning('每日奖分不为0时奖分上限不能为空')
-				return
+			if (!data.ahead_award_point && data.ahead_award_point_limit) {
+				this.$message.warning('奖分上限不为0时每日奖分不能为空');
+				return;
+			} else if (data.ahead_award_point && !data.ahead_award_point_limit) {
+				this.$message.warning('每日奖分不为0时奖分上限不能为空');
+				return;
 			}
-			if(!data.timeout_deduction_point && data.timeout_deduction_point_limit){
-				this.$message.warning('扣分上限不为0时每日扣分不能为空')
-				return
-			}else if(data.timeout_deduction_point && !data.timeout_deduction_point_limit){
-				this.$message.warning('每日扣分不为0时扣分上限不能为空')
-				return
+			if (!data.timeout_deduction_point && data.timeout_deduction_point_limit) {
+				this.$message.warning('扣分上限不为0时每日扣分不能为空');
+				return;
+			} else if (data.timeout_deduction_point && !data.timeout_deduction_point_limit) {
+				this.$message.warning('每日扣分不为0时扣分上限不能为空');
+				return;
 			}
-			if(this.ahead_timeout(data.ahead_award_point,data.ahead_award_point_limit,'提前奖分','奖分')) return
-			if(this.ahead_timeout(data.timeout_deduction_point,data.timeout_deduction_point_limit,'逾期扣分','扣分')) return
-			if(!this.$getIsCreator('creator')||this.$getUserData().point_config.point_limit.length!=0){
-				let entry_limit =  Number(this.$getUserData().point_config.point_limit[1].point)
-				if(entry_limit > 0){
-					if(data.ahead_award_point > entry_limit || data.timeout_deduction_point > entry_limit ){
-						this.$message.warning('每日奖扣分 不能超过您的奖扣分权限(您的奖扣分权限:' + entry_limit + '分)')
-						return
+			if (this.ahead_timeout(data.ahead_award_point, data.ahead_award_point_limit, '提前奖分', '奖分')) return;
+			if (this.ahead_timeout(data.timeout_deduction_point, data.timeout_deduction_point_limit, '逾期扣分', '扣分')) return;
+			if (!this.$getIsCreator('creator') || this.$getUserData().point_config.point_limit.length != 0) {
+				let entry_limit = Number(this.$getUserData().point_config.point_limit[1].point);
+				if (entry_limit > 0) {
+					if (data.ahead_award_point > entry_limit || data.timeout_deduction_point > entry_limit) {
+						this.$message.warning('每日奖扣分 不能超过您的奖扣分权限(您的奖扣分权限:' + entry_limit + '分)');
+						return;
 					}
-					if(data.ahead_award_point_limit > entry_limit*10 || data.timeout_deduction_point_limit > entry_limit*10 ){
-						this.$message.warning('奖扣分上限不能超过' + entry_limit*10 + '分(您的奖扣分权限' + entry_limit + '分*10)')
-						return
+					if (data.ahead_award_point_limit > entry_limit * 10 || data.timeout_deduction_point_limit > entry_limit * 10) {
+						this.$message.warning('奖扣分上限不能超过' + entry_limit * 10 + '分(您的奖扣分权限' + entry_limit + '分*10)');
+						return;
 					}
 				}
 			}
-			let add = ['ahead_award_point', 'ahead_award_point_limit', 'timeout_deduction_point', 'timeout_deduction_point_limit']
-			add.forEach(item =>{
-				this.deletedata(data,item)
-			})
+			let add = ['ahead_award_point', 'ahead_award_point_limit', 'timeout_deduction_point', 'timeout_deduction_point_limit'];
+			add.forEach(item => {
+				this.deletedata(data, item);
+			});
 
 			this.forTheTaskLoading = true;
 			self.$axios('post', self.formData.task_cycle == 0 ? '/api/integral/task/publish' : '/api/integral/schedule/publish/task', data)
@@ -529,15 +548,6 @@ export default {
 						this.$parent.get_list();
 						this.resetForm('formData');
 						self.$message.success(res.data.msg);
-						// self.$emit('update:dialogVisible', false);
-						// self.$refs[formName].resetFields();
-						// self.formData.dept_ids=[];
-						// self.executorName = '';
-						// self.reviewerName = '';
-						// this.dept_name = [];
-						// this.reviewer_selected = { dept: [], employee: [] };
-						// this.dept_selected = { dept: [], employee: [] };
-						// this.deptVisibleName = '';
 					} else {
 						self.$message.error(res.data.msg);
 					}
@@ -548,20 +558,6 @@ export default {
 					}, 300);
 				});
 		},
-		// // 执行者
-		// approval_confirm(data){
-		//   this.approval_selected = {dept: [],employee:[]}
-		//   this.formData.targets = []
-		//   this.executorName = ''
-		//   if (data.employee !== null && data.employee.length != 0) {
-		//     this.approval_selected = data
-		//     data.employee.forEach(element => {
-		// 			this.formData.targets.push(element.id)
-		// 			this.executorName += (element.name+',')
-		//     });
-		//   }
-		// },
-		// 执行者 end
 		// 审核人
 		reviewer_confirm(data) {
 			this.reviewer_selected = { dept: [], employee: [] };
@@ -592,7 +588,6 @@ export default {
 		// 部门可见 end
 		closeDialog() {
 			this.resetForm('formData');
-			// this.$emit('update:dialogVisible', false)
 		},
 
 		//获取部门

+ 197 - 186
src/views/common/rewardTaskDetailsPopup.vue

@@ -1,51 +1,61 @@
 <template>
-  <div>
-    <!-- 悬赏任务详情弹窗 -->
-    <el-drawer :visible.sync="Delay_to_open"  :with-header="false" :size="'500px'" :before-close="handleClose" :custom-class="'drawer_details'">
-      <div class="details_title">{{title}}</div>
-      <div class="details_content" v-if="workDetailData" v-loading="loading">
-        <el-row>
-          <el-col :span="24">
-            <div class="flex-box flex-v-ce">
-              <userImage style="margin-right: 15px;" width="50px" height="50px" :user_name="workDetailData.owner_name" :img_url="workDetailData.owner_img_url"></userImage>
-              <div>
-                <div style="line-height: 25px;">我悬赏的{{$getTypsName(workDetailData.pt_id)}}任务 
-				<span v-if="workDetailData.point_config.base_point>0" class="red">+{{workDetailData.point_config.base_point}}</span>
-				<span v-else class="green">{{workDetailData.point_config.base_point}}</span>   
-				{{$getTypsName(workDetailData.pt_id)}}</div>
-                <div style="color: #909399; line-height: 25px;"><b>{{workDetailData.receiver_name}}</b> {{workDetailData.status_mark}}</div>
-              </div>
-            </div>
-          </el-col>
-        </el-row>        
-
-        <ul>
-          <li class="flex-box">
-            <div class="label">任务内容</div>
-            <div class="content_text">{{workDetailData.task_name}}</div>
-          </li>
-          <li class="flex-box" v-if="workDetailData.status==2 && workDetailData.receiver_id != 0 ">
-            <div class="label">领取人</div>
-            <div class="content_text">{{workDetailData.receiver_name}}</div>
-          </li>
-          <li class="flex-box" v-if="workDetailData.status==3 && workDetailData.receiver_id != 0">
-            <div class="label">完成人</div>
-            <div class="content_text">{{workDetailData.receiver_name}}</div>
-          </li>
-          <li class="flex-box" v-if="workDetailData.task_remark">
-            <div class="label">任务备注</div>
-            <div class="content_text">{{workDetailData.task_remark}}</div>
-          </li>
+	<div>
+		<!-- 悬赏任务详情弹窗 -->
+		<el-drawer :visible.sync="Delay_to_open" :with-header="false" :size="'500px'" :before-close="handleClose" :custom-class="'drawer_details'">
+			<div class="details_title">{{ title }}</div>
+			<div class="details_content" v-if="workDetailData" v-loading="loading">
+				<el-row>
+					<el-col :span="24">
+						<div class="flex-box flex-v-ce">
+							<userImage
+								style="margin-right: 15px;"
+								width="50px"
+								height="50px"
+								:user_name="workDetailData.owner_name"
+								:img_url="workDetailData.owner_img_url"
+							></userImage>
+							<div>
+								<div style="line-height: 25px;">
+									我悬赏的{{ $getTypsName(workDetailData.pt_id) }}任务
+									<span v-if="workDetailData.point_config.base_point > 0" class="red">+{{ workDetailData.point_config.base_point }}</span>
+									<span v-else class="green">{{ workDetailData.point_config.base_point }}</span>
+									{{ $getTypsName(workDetailData.pt_id) }}
+								</div>
+								<div style="color: #909399; line-height: 25px;">
+									<b>{{ workDetailData.receiver_name }}</b>
+									{{ workDetailData.status_mark }}
+								</div>
+							</div>
+						</div>
+					</el-col>
+				</el-row>
+				<ul>
+					<li class="flex-box">
+						<div class="label">任务内容</div>
+						<div class="content_text">{{ workDetailData.task_name }}</div>
+					</li>
+					<li class="flex-box" v-if="workDetailData.status == 2 && workDetailData.receiver_id != 0">
+						<div class="label">领取人</div>
+						<div class="content_text">{{ workDetailData.receiver_name }}</div>
+					</li>
+					<li class="flex-box" v-if="workDetailData.status == 3 && workDetailData.receiver_id != 0">
+						<div class="label">完成人</div>
+						<div class="content_text">{{ workDetailData.receiver_name }}</div>
+					</li>
+					<li class="flex-box" v-if="workDetailData.task_remark">
+						<div class="label">任务备注</div>
+						<div class="content_text">{{ workDetailData.task_remark }}</div>
+					</li>
 					<li class="flex-box" v-if="workDetailData.task_file_list && workDetailData.task_file_list.length > 0">
 						<div class="label"></div>
 						<div class="content_text">
-						<el-image
-							v-for="(item, index) in workDetailData.task_file_list"
-							:key="index"
-							style="width: 100px; height: 100px;margin-right:8px"
-							:src="item"
-							:preview-src-list="workDetailData.task_file_list"
-						></el-image>
+							<el-image
+								v-for="(item, index) in workDetailData.task_file_list"
+								:key="index"
+								style="width: 100px; height: 100px;margin-right:8px"
+								:src="item"
+								:preview-src-list="workDetailData.task_file_list"
+							></el-image>
 						</div>
 					</li>
           <li class="flex-box">
@@ -60,23 +70,23 @@
 						<div class="label">审批人</div>
 						<div class="content_text">{{ workDetailData.reviewer_name }}</div>
 					</li>
-          <li class="flex-box" v-if="workDetailData.owner_name">
-            <div class="label">发布人</div>
-            <div class="content_text">{{workDetailData.owner_name}}</div>
-          </li>
-          <li class="flex-box" v-if="workDetailData.create_time">
-            <div class="label">发布时间</div>
-            <div class="content_text">{{workDetailData.create_time}}</div>
-          </li>
-          <li class="flex-box">
-            <div class="label">截止时间</div>
-            <div class="content_text">{{workDetailData.end_time}}</div>
-          </li>
-          <li class="flex-box" v-if="workDetailData.point_config">
-            <div class="label">逾期扣分</div>
-            <div class="content_text">{{workDetailData.point_config.timeout_deduction_point}}/天</div>
-          </li>
-          <li class="flex-box" v-if="workDetailData.point_config.ahead_award_point">
+					<li class="flex-box" v-if="workDetailData.owner_name">
+						<div class="label">发布人</div>
+						<div class="content_text">{{ workDetailData.owner_name }}</div>
+					</li>
+					<li class="flex-box" v-if="workDetailData.create_time">
+						<div class="label">发布时间</div>
+						<div class="content_text">{{ workDetailData.create_time }}</div>
+					</li>
+					<li class="flex-box">
+						<div class="label">截止时间</div>
+						<div class="content_text">{{ workDetailData.end_time }}</div>
+					</li>
+					<li class="flex-box" v-if="workDetailData.point_config">
+						<div class="label">逾期扣分</div>
+						<div class="content_text">{{ workDetailData.point_config.timeout_deduction_point }}/天</div>
+					</li>
+					<li class="flex-box" v-if="workDetailData.point_config.ahead_award_point">
 						<div class="label">提前奖分</div>
 						<div class="content_text">{{ workDetailData.point_config.ahead_award_point }}/天</div>
 					</li>
@@ -123,136 +133,137 @@
 						</el-col>
 					</el-row>
 				</div>
-      </div>
-    </el-drawer>
-
-  </div>
+			</div>
+		</el-drawer>
+	</div>
 </template>
 
 <script>
-  export default {
-    name: 'repeatTaskDetailsPopup',
-    props:{
-      title: {
-        type: String,
-        default: ''
-      },
-      visible: {
-        type: Boolean,
-        default: false
-      },
-      id: {
-        type: Number,
-        default: 0
-      },
-    },
-    data() {
-      return {
-        Delay_to_open:false,//打开抽屉
+export default {
+	name: 'repeatTaskDetailsPopup',
+	props: {
+		title: {
+			type: String,
+			default: ''
+		},
+		visible: {
+			type: Boolean,
+			default: false
+		},
+		id: {
+			type: Number,
+			default: 0
+		}
+	},
+	data() {
+		return {
+			Delay_to_open: false, //打开抽屉
 
-        loading: false,
-        workDetailData:{
-          point_config:{base_point:''}
-        },
-      }
-    },
-    components: {},
-    watch:{},
-    mounted() {
-      this.getData()
-      this.Delay_to_open = this.visible//更换打开抽屉时机,避免打开两次
-    },
-    methods: {
-      // 关闭弹窗
-      handleClose(){
-        this.$emit('update:visible', false)
-      },
-      // 获取数据
-      getData(){
-        let self = this
-        self.loading = true
-        let data =  {task_id: this.id}
-        self.$axios('get','/api/integral/task',data).then(res => {
+			loading: false,
+			workDetailData: {
+				point_config: { base_point: '' }
+			}
+		};
+	},
+	components: {},
+	watch: {},
+	mounted() {
+		this.getData();
+		this.Delay_to_open = this.visible; //更换打开抽屉时机,避免打开两次
+	},
+	methods: {
+		// 关闭弹窗
+		handleClose() {
+			this.$emit('update:visible', false);
+		},
+		// 获取数据
+		getData() {
+			let self = this;
+			self.loading = true;
+			let data = { task_id: this.id };
+			self.$axios('get', '/api/integral/task', data)
+				.then(res => {
 					if (res.data.code == 1) {
-            self.workDetailData = res.data.data
-          }
-				}).finally(()=>{
-          self.loading = false
-        })
-      },
-    }
-  }
+						self.workDetailData = res.data.data;
+					}
+				})
+				.finally(() => {
+					self.loading = false;
+				});
+		}
+	}
+};
 </script>
 <style lang="scss" scoped="scoped">
-  .details_content{
-    & .d_userMessage{
-      margin-left: 10px;
-    }
-    & .d_userMessage div:nth-child(1){
-      font-size: 16px;
-      margin-bottom: 8px;
-    }
-    & .d_userMessage div:nth-child(2){
-      font-size: 12px;
-      color: #909399;
-    }
-    & .d_progress{
-      padding: 12px 0;
-      border-bottom: 1px solid #f1f1f1;
-      margin-bottom: 10px;
-    }
-    & ul{
-      padding: 12px 0;
-      border-bottom: 1px solid #f1f1f1;
-      & li{
-        padding: 6px 0;
-      }
-      & .label{
-        width: 80px;
-        text-align: left;
-        color: #909399;
-      }
-      & .content_text{
-        flex:1
-      }
-    }
-  }
-  .fontColorF{
-    color:#909399;
-  }
-  .yellow{
-    color: #E6A23C;
-  }
-  .details_content {
-    padding: 20px;
-    height: calc(100vh - 60px);
-    overflow: auto;
-    .row_title {
-      position: relative;
-      margin: 0 0 20px 0;
-      padding-top: 12px;
-      font-size: 16px;
-      color: #303133;
-      line-height: 22px;
-    }
-    .row_title:before {
-      position: absolute;
-      top: 0;
-      content: ' ';
-      width: 100%;
-      border-top: 1px #f8f8f8 solid;
-    }
-    .el-row {
-      margin-bottom: 10px;
-      font-size: 14px;
-      .el-col-4 {
-        color: #606266;
-      }
-    }
-  }
-  .details_title {
-    font-size: 18px;
-    padding: 20px;
-    border-bottom: 1px #efefef solid;
-  }
+.details_content {
+	& .d_userMessage {
+		margin-left: 10px;
+	}
+	& .d_userMessage div:nth-child(1) {
+		font-size: 16px;
+		margin-bottom: 8px;
+	}
+	& .d_userMessage div:nth-child(2) {
+		font-size: 12px;
+		color: #909399;
+	}
+	& .d_progress {
+		padding: 12px 0;
+		border-bottom: 1px solid #f1f1f1;
+		margin-bottom: 10px;
+	}
+	& ul {
+		padding: 12px 0;
+		border-bottom: 1px solid #f1f1f1;
+		& li {
+			padding: 6px 0;
+		}
+		& .label {
+			width: 80px;
+			text-align: left;
+			color: #909399;
+		}
+		& .content_text {
+			flex: 1;
+		}
+	}
+}
+.fontColorF {
+	color: #909399;
+}
+.yellow {
+	color: #e6a23c;
+}
+.details_content {
+	padding: 20px;
+	height: calc(100vh - 60px);
+	overflow: auto;
+	.row_title {
+		position: relative;
+		margin: 0 0 20px 0;
+		padding-top: 12px;
+		font-size: 16px;
+		color: #303133;
+		line-height: 22px;
+	}
+	.row_title:before {
+		position: absolute;
+		top: 0;
+		content: ' ';
+		width: 100%;
+		border-top: 1px #f8f8f8 solid;
+	}
+	.el-row {
+		margin-bottom: 10px;
+		font-size: 14px;
+		.el-col-4 {
+			color: #606266;
+		}
+	}
+}
+.details_title {
+	font-size: 18px;
+	padding: 20px;
+	border-bottom: 1px #efefef solid;
+}
 </style>

+ 61 - 49
src/views/common/temporaryTask.vue

@@ -162,15 +162,34 @@
 
 					<div style="margin-left: 80px; margin-bottom: 8px;">以天为单位,每 提前/逾期 一天 加分/扣分</div>
 					<el-form-item label="提前奖分" prop="ahead_award_point">
-						<el-input v-model="formData.ahead_award_point" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入每日奖分" style="width: 150px;"></el-input> B分/每天,
-						奖分上限 &nbsp;<el-input v-model="formData.ahead_award_point_limit" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入奖分上限" style="width: 150px;"></el-input> B分
+						<el-input v-model="formData.ahead_award_point" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入每日奖分" style="width: 150px;"></el-input>
+						B分/每天, 奖分上限 &nbsp;
+						<el-input
+							v-model="formData.ahead_award_point_limit"
+							oninput="value=value.replace(/[^\d]/g,'')"
+							placeholder="请输入奖分上限"
+							style="width: 150px;"
+						></el-input>
+						B分
 					</el-form-item>
-					<el-form-item label="逾期扣分"  prop="timeout_deduction_point" >
-						<el-input v-model="formData.timeout_deduction_point" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入每日扣分" style="width: 150px;"></el-input> B分/每天,
-						扣分上限 &nbsp;<el-input v-model="formData.timeout_deduction_point_limit" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入扣分上限" style="width: 150px;"></el-input> B分
+					<el-form-item label="逾期扣分" prop="timeout_deduction_point">
+						<el-input
+							v-model="formData.timeout_deduction_point"
+							oninput="value=value.replace(/[^\d]/g,'')"
+							placeholder="请输入每日扣分"
+							style="width: 150px;"
+						></el-input>
+						B分/每天, 扣分上限 &nbsp;
+						<el-input
+							v-model="formData.timeout_deduction_point_limit"
+							oninput="value=value.replace(/[^\d]/g,'')"
+							placeholder="请输入扣分上限"
+							style="width: 150px;"
+						></el-input>
+						B分
 					</el-form-item>
-					<el-form-item v-show="false" prop="ahead_award_point_limit" ></el-form-item>
-					<el-form-item v-show="false" prop="timeout_deduction_point_limit" ></el-form-item>
+					<el-form-item v-show="false" prop="ahead_award_point_limit"></el-form-item>
+					<el-form-item v-show="false" prop="timeout_deduction_point_limit"></el-form-item>
 
 					<el-form-item>
 						<div class="flex-box-end">
@@ -243,7 +262,7 @@ export default {
 				timeout_deduction_point: null,
 				timeout_deduction_point_limit: null,
 				ahead_award_point: null,
-				ahead_award_point_limit: null,
+				ahead_award_point_limit: null
 			},
 			point_types: [],
 			// 执行者
@@ -461,21 +480,21 @@ export default {
 			this.approval_selected = { dept: [], employee: [] };
 			this.reviewer_selected = { dept: [], employee: [] };
 		},
-		ahead_timeout(item,arr,codes,code){
-			if(item){
-				if(arr){
-					if(Number(item) > Number(arr)){
-						this.$message.warning(code +'上限不能小于每日'+ code)
-						return true
+		ahead_timeout(item, arr, codes, code) {
+			if (item) {
+				if (arr) {
+					if (Number(item) > Number(arr)) {
+						this.$message.warning(code + '上限不能小于每日' + code);
+						return true;
 					}
-				}else{
-					this.$message.warning( codes + '不为0时,'+ code +'上限不能为空')
-					return true
+				} else {
+					this.$message.warning(codes + '不为0时,' + code + '上限不能为空');
+					return true;
 				}
 			}
 		},
-		deletedata(data,arr){
-			data[arr] && data[arr] != 0 ?  '' : delete data[arr]
+		deletedata(data, arr) {
+			data[arr] && data[arr] != 0 ? '' : delete data[arr];
 		},
 		// 提交
 		saveFun(formName) {
@@ -497,32 +516,32 @@ export default {
 			}
 			
 
-			if(!data.ahead_award_point && data.ahead_award_point_limit){
-				this.$message.warning('奖分上限不为0时每日奖分不能为空')
-				return
-			}else if(data.ahead_award_point && !data.ahead_award_point_limit){
-				this.$message.warning('每日奖分不为0时奖分上限不能为空')
-				return
+			if (!data.ahead_award_point && data.ahead_award_point_limit) {
+				this.$message.warning('奖分上限不为0时每日奖分不能为空');
+				return;
+			} else if (data.ahead_award_point && !data.ahead_award_point_limit) {
+				this.$message.warning('每日奖分不为0时奖分上限不能为空');
+				return;
 			}
-			if(!data.timeout_deduction_point && data.timeout_deduction_point_limit){
-				this.$message.warning('扣分上限不为0时每日扣分不能为空')
-				return
-			}else if(data.timeout_deduction_point && !data.timeout_deduction_point_limit){
-				this.$message.warning('每日扣分不为0时扣分上限不能为空')
-				return
+			if (!data.timeout_deduction_point && data.timeout_deduction_point_limit) {
+				this.$message.warning('扣分上限不为0时每日扣分不能为空');
+				return;
+			} else if (data.timeout_deduction_point && !data.timeout_deduction_point_limit) {
+				this.$message.warning('每日扣分不为0时扣分上限不能为空');
+				return;
 			}
-			if(this.ahead_timeout(data.ahead_award_point,data.ahead_award_point_limit,'提前奖分','奖分')) return
-			if(this.ahead_timeout(data.timeout_deduction_point,data.timeout_deduction_point_limit,'逾期扣分','扣分')) return
-			if(!this.$getIsCreator('creator')||this.$getUserData().point_config.point_limit.length!=0){
-				let entry_limit =  Number(this.$getUserData().point_config.point_limit[1].point)
-				if(entry_limit > 0){
-					if(data.ahead_award_point > entry_limit || data.timeout_deduction_point > entry_limit ){
-						this.$message.warning('每日奖扣分 不能超过您的奖扣分权限(您的奖扣分权限:' + entry_limit + '分)')
-						return
+			if (this.ahead_timeout(data.ahead_award_point, data.ahead_award_point_limit, '提前奖分', '奖分')) return;
+			if (this.ahead_timeout(data.timeout_deduction_point, data.timeout_deduction_point_limit, '逾期扣分', '扣分')) return;
+			if (!this.$getIsCreator('creator') || this.$getUserData().point_config.point_limit.length != 0) {
+				let entry_limit = Number(this.$getUserData().point_config.point_limit[1].point);
+				if (entry_limit > 0) {
+					if (data.ahead_award_point > entry_limit || data.timeout_deduction_point > entry_limit) {
+						this.$message.warning('每日奖扣分 不能超过您的奖扣分权限(您的奖扣分权限:' + entry_limit + '分)');
+						return;
 					}
-					if(data.ahead_award_point_limit > entry_limit*10 || data.timeout_deduction_point_limit > entry_limit*10 ){
-						this.$message.warning('奖扣分上限不能超过' + entry_limit*10 + '分(您的奖扣分权限' + entry_limit + '分*10)')
-						return
+					if (data.ahead_award_point_limit > entry_limit * 10 || data.timeout_deduction_point_limit > entry_limit * 10) {
+						this.$message.warning('奖扣分上限不能超过' + entry_limit * 10 + '分(您的奖扣分权限' + entry_limit + '分*10)');
+						return;
 					}
 				}
 			}
@@ -530,19 +549,12 @@ export default {
 			add.forEach(item =>{
 				this.deletedata(data,item)
 			})
-			console.log(data)
-			// return
 			this.taskload = true;
 			self.$axios('post', self.formData.task_cycle == 0 ? '/api/integral/work/publish' : '/api/integral/schedule/publish/work', data)
 				.then(res => {
 					if (res.data.code == 1) {
 						this.$parent.get_list();
 						this.resetForm('formData');
-						// self.$emit('update:dialogVisible', false);
-						// self.$refs[formName].resetFields();
-						// self.executorName = '';
-						// self.reviewerName = '';
-						// (this.approval_selected = { dept: [], employee: [] }), (this.reviewer_selected = { dept: [], employee: [] }), 
 						self.$message.success(res.data.msg);
 					} else {
 						self.$message.error(res.data.msg);