Ver Fonte

Merge branch 'dev'

347617796@qq.com há 3 anos atrás
pai
commit
74d591868b

+ 13 - 12
src/assets/css/reset.css

@@ -52,6 +52,17 @@ table { border-collapse:collapse; border-spacing:0; }
   -webkit-flex-flow: column;
   flex-flow: column !important;
 }
+/*flex-box与 flex-v-ce结合*/
+.flex-box-ce {
+  display: -webkit-box;
+  display: -moz-box;
+  display: -ms-flexbox;
+  display: -webkit-flex;
+  display: flex;
+  align-items: center;
+  -webkit-align-items: center;
+  -webkit-box-align: center;
+}
 
 /* 水平等列排版(容器左右没缝隙,子元素左右两边自适应) */
 .flex-d-center {
@@ -66,7 +77,7 @@ table { border-collapse:collapse; border-spacing:0; }
 }
 
 
-/*通过一起使用 box-align 和 box-pack 属性,对 view 框的子元素进行居中,目前没有浏览器支持box-align 和 box-pack 属性,所以需要加上浏览器内核-webkit,-moz等的简写  */
+/*水平,垂直居中  */
 .flex-center-center {
   justify-content: center;
   -webkit-justify-content: center;
@@ -104,17 +115,6 @@ table { border-collapse:collapse; border-spacing:0; }
   -ms-flex: 1;
   flex: 1;
 }
-/*flex-box与 flex-v-ce结合*/
-.flex-box-ce {
-  display: -webkit-box;
-  display: -moz-box;
-  display: -ms-flexbox;
-  display: -webkit-flex;
-  display: flex;
-  align-items: center;
-  -webkit-align-items: center;
-  -webkit-box-align: center;
-}
 
 .flex-2 {
   -webkit-box-flex: 2;
@@ -153,6 +153,7 @@ table { border-collapse:collapse; border-spacing:0; }
   flex: 5;
 }
 
+/* 水平反方向 */
 .flex-direction-row-reverse {
   flex-direction: row-reverse;
   -webkit-flex-direction: row-reverse;

BIN
src/assets/image/zq.png


+ 71 - 3
src/home.vue

@@ -8,7 +8,7 @@
 		<el-row style="min-width:1160px;">
 			<el-col :span="18" style="min-width:780px;">
 				<el-row class="home-left-header">
-					<el-col :span="7" class="hlheader-user" v-loading="">
+					<el-col :span="7" class="hlheader-user">
 						<el-row :gutter="40">
 							<el-col :span="24" class="hlheader-user-info">
 								<div class="headimg" style=" margin-right: 0px;cursor:pointer;">
@@ -287,6 +287,13 @@
 				</el-row>
 			</el-col>
 			<el-col :span="6" style="min-width:280px;">
+				<el-row v-if="$supremeAuthority()!='employee'&&$supremeAuthority()!='creator'">
+					<div class="right-all-style flex-box-ce" style="background-color:#fff;padding:20px;;text-align:left;margin-bottom: 10px;cursor: pointer;" @click="ruleQRcode">
+						<img src="./assets/image/zq.png" style="width: 20px;height: 20px;margin-right: 10px;"/>
+						<div style="font-size: 15px;" class="zb flex-1">{{thisweek}} 积分周报</div>
+						<i class="el-icon-arrow-right" style="font-size: 18px;"></i>
+					</div>
+				</el-row>
 				<el-row v-if="!creatorJurisdiction">
 					<div class="right-all-style" style="background-color:#fff;padding:20px;;text-align:left;margin-bottom: 10px;">
 						<span class="title">常用</span>
@@ -439,12 +446,19 @@
 				<span slot="footer" class="dialog-footer"><el-button @click="$router.push({ path: '/update_notice' })" type="primary" round>查看详情</el-button></span>
 			</el-dialog>
 		</div>
+		<el-dialog @close="closeCode"  :visible.sync="innerVisible" width="444px">
+			<div style="border-radius: 15px;border: 1px solid #f1f1f1;padding: 10px; width: 346px;box-sizing: border-box;margin: 0 auto;">
+				<div id="qrcode" ref="qrcode"></div>
+			</div>
+			<div style="margin-top: 10px;text-align: center;color: #666;">请使用钉钉APP扫描二维码</div>
+		</el-dialog>
 		<examinePopup :title="'审核详情'" :id="detail_id" :show.sync="detailShow"></examinePopup>
 	</div>
 </template>
 
 <script>
 var bool = true; // 五秒执行一次变量
+import QRCode from 'qrcodejs2';
 import examinePopup from '@/components/examinePopup';
 import { contactAdminToUseApp } from 'dingtalk-design-libs';
 export default {
@@ -557,7 +571,9 @@ export default {
 			// 待我审批模块
 			auditList: [],
 			detail_id: 0,
-			detailShow: false
+			detailShow: false,
+			thisweek:'',
+			innerVisible:false
 		};
 	},
 	watch: {
@@ -566,6 +582,7 @@ export default {
 		}
 	},
 	mounted() {
+		console.log(this.$supremeAuthority())
 		if (this.employeeRout) {
 			this.inCommonUse = [];
 			this.inCommonUse.push(
@@ -582,7 +599,7 @@ export default {
 		}
 		var url = window.location.href;
 		var rUrl = this.GetRequest(url).url || '';
-		console.log('url=' + rUrl);
+		// console.log('url=' + rUrl);
 		this.$nextTick(function() {
 			if (rUrl) {
 				setTimeout(() => {
@@ -590,8 +607,56 @@ export default {
 				}, 200);
 			}
 		});
+		this.setDate()
 	},
 	methods: {
+		// 关闭弹框,清除已经生成的二维码
+		closeCode() {
+			setTimeout(() => {
+				this.$refs.qrcode.innerHTML = '';
+			}, 150);
+		},
+		ruleQRcode() {
+			this.innerVisible = true;
+			// 使用$nextTick确保数据渲染
+			this.$nextTick(() => {
+				this.payOrder();
+			});
+		},
+		payOrder () {// 展示二维码
+			let url = 'dingtalk://dingtalkclient/action/open_micro_app'
+			let appid = '?appId='+this.$appId
+			let corpId = '&corpId='+this.$getCache('corpId')
+			let page = '&page='+encodeURIComponent(`pages/reportBox/report/report?employee_id=${encodeURIComponent(this.$getUserData().id)}`)//encodeURIComponent('小米')
+			let urls = url+appid+corpId+page
+			var qrcode = new QRCode('qrcode', {
+				text: urls, // 二维码内容
+				width: 325,
+				height: 325,
+				render: 'table', // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
+				colorDark: '#34373e', // 二维码色
+				colorLight: '#ffffff', // 背景色
+				correctLevel: QRCode.CorrectLevel.H // 容错等级,H是heigh,最高,所以二维码看起来很密
+			})
+		},
+		  setDate() {
+			var thisweek = {};
+			var date = new Date();
+			// 本周一的日期
+			date.setDate(date.getDate() - date.getDay() + 1);
+			let month = (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
+			let getDate = date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()
+			thisweek.start_day = month + "-" + getDate;
+			// thisweek.start_day = date.getFullYear() + "-" + month + "-" + getDate;
+		
+			// 本周日的日期
+			date.setDate(date.getDate() + 6);
+			let month2 = (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
+			let getDate2 = date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()
+			thisweek.end_day =month2 + "-" + getDate2;
+			// thisweek.end_day = date.getFullYear() + "-" + month2 + "-" + getDate2;
+			this.thisweek=thisweek.start_day+'~'+thisweek.end_day
+		  },
 		GetRequest(urlStr) {
 			if (typeof urlStr == 'undefined') {
 				var url = decodeURI(location.search); //获取url中"?"符后的字符串
@@ -1342,6 +1407,9 @@ export default {
 </script>
 
 <style scoped="scoped" lang="scss">
+.zb:hover{
+	color: #089fff;
+}	
 .ts {
 	height: 64px;
 	padding: 8px 16px;

+ 10 - 9
src/views/common/taskDetailsPopup.vue

@@ -140,7 +140,7 @@
 													</div>
 													<div class="d_date fontColorF">{{ item.time }} <span class="delete_jfjl" v-if="item.recorder_id == userId && workDetailData.status < 3 " @click="deletejf_cli(index,0)"><i class="el-icon-delete"></i></span> </div>
 												</div>
-												<div class="fontColorB" style="margin-top: 5px;">{{ item.remark }}</div>
+												<div class="fontColorB" style="margin-top: 5px;word-break: break-all;">{{ item.remark }}</div>
 											</div>
 										</div>
 									</div>
@@ -167,7 +167,7 @@
 													</div>
 													<div class="d_date fontColorF">{{ item.time }} <span class="delete_jfjl" v-if="userId == item.recorder_id && workDetailData.status < 3" @click="deletejf_cli(index,1)"><i class="el-icon-delete"></i></span> </div>
 												</div>
-												<div class="fontColorB" style="margin-top: 5px;">{{ item.remark }}</div>
+												<div class="fontColorB" style="margin-top: 5px;word-break: break-all;">{{ item.remark }}</div>
 											</div>
 										</div>
 									</div>
@@ -467,26 +467,27 @@ export default {
 			this.loading = true;
 			let data = this.detailType == 2 ? { schedule_id: this.id } : { work_id: this.id };
 			this.$axios('get', this.getDataUrl, data).then(res => {
-				if (res.data.code == 1) {
 					this.workDetailData = res.data.data;
 					this.employee_me(res.data.data)
-					this.text_list = []
-					this.point_list = []
+					let text_list = []
+					let point_list = []
 					this.point_total = 0
 					if (this.workDetailData.process.list && this.workDetailData.process.list.length > 0) {
 					  for (let i in this.workDetailData.process.list) {
 					    this.point_total += this.workDetailData.process.list[i].point * 1
 					    if (this.workDetailData.process.list[i].point != 0) {
-					      this.point_list.push(this.workDetailData.process.list[i])
+					      point_list.push(this.workDetailData.process.list[i])
 					    } else {
 							if(this.workDetailData.process.list[i].recorder_id == this.workDetailData.employee_id) {
-					      		this.text_list.push(this.workDetailData.process.list[i])
+								text_list.push(this.workDetailData.process.list[i])
 							}
 					    }
 					  }
 					}
-					
-				}
+					setTimeout(()=>{
+					  this.text_list=text_list;
+					  this.point_list=point_list;
+					},500)
 			}).finally(() => {
 				this.loading = false;
 			});

+ 4 - 6
src/views/ranking/attendance_rating.vue

@@ -8,13 +8,11 @@
 							<el-option v-for="item in checkingInGroup" :key="item.id" :label="item.name" :value="item.id"></el-option>
 						</el-select>
 					</el-form-item>
-
 					<el-form-item label="排名类型">
 						<el-select v-model="formData.event_type" @change="selectgroupId" style="width:110px" placeholder="请选择">
 							<el-option v-for="(item, index) in event_type" :key="index" :label="item.name" :value="item.id"></el-option>
 						</el-select>
 					</el-form-item>
-
 					<el-form-item label="时间">
 						<el-date-picker
 							style="width:290px"
@@ -253,8 +251,8 @@ export default {
 			isUpdate:false,
 			update:{
 				type:'daily',
-				target_date:'',
-				target_month:''
+				target_date:this.$moment().subtract(1, "days").format("YYYY-MM-DD"),
+				target_month:this.$moment().format("YYYY-MM"),
 			}
 		};
 	},
@@ -264,8 +262,8 @@ export default {
 			if(!val){
 				this.update={
 					type:'daily',
-					target_date:'',
-					target_month:''
+					target_date:this.$moment().subtract(1, "days").format("YYYY-MM-DD"),
+					target_month:this.$moment().format("YYYY-MM"),
 				}
 			}
 		}

+ 3 - 17
src/views/set/rule.vue

@@ -539,7 +539,6 @@ export default {
 				this.toleadResult.id = 0
 				this.toleadResult.name = '文件格式上传错误,仅支持上传xlsx,xls)'
 				this.nowIndex = 3
-				// this.$message.warning('文件格式上传错误,仅支持上传xlsx,xls)');
 				return false;
 			}
 		},
@@ -689,7 +688,6 @@ export default {
 					} else {
 						this.rule_loading2 = true;
 						self.rules_detail_form.item_id = self.rules_detail_form.id;
-
 						if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
 							self.$message.error('积分不能为零');
 							this.rule_loading2 = false;
@@ -800,11 +798,6 @@ export default {
 				this.$message.error('请选择积分细则');
 				return false;
 			}
-			// this.$confirm('此操作将永久删除该选项, 是否继续?', '提示', {
-			// 	confirmButtonText: '确定',
-			// 	cancelButtonText: '取消',
-			// 	type: 'warning'
-			// })
         	const h = this.$createElement;
 			this.$msgbox({
 				title: '提示',
@@ -831,7 +824,6 @@ export default {
 					if (res.data.code == 1) {
 						this.$message.success(res.data.msg);
 						this.getData(true);
-						// this.handleNodeClick(this.selectItem);
 					}
 				});
 			});
@@ -839,33 +831,25 @@ export default {
 
 		editDetails(val) {
 			this.rules_detail_form = JSON.parse(JSON.stringify(val));
-
 			if (this.rules_detail_form.min_point == this.rules_detail_form.max_point) {
 				this.rules_detail_form.range_type = '1';
 			} else {
 				this.rules_detail_form.range_type = '2';
 			}
-
 			if (this.rules_detail_form.min_point < 0) {
 				this.integral_select_name1 = '2';
 				let str = this.rules_detail_form.min_point;
 				this.rules_detail_form.min_point = str.toString().substring(1);
-				// this.rules_detail_form.min_point2=str.toString().substring(1);
 			} else {
 				this.integral_select_name1 = '1';
 			}
-
 			if (this.rules_detail_form.max_point < 0) {
 				this.integral_select_name2 = '2';
 				let str = this.rules_detail_form.max_point;
 				this.rules_detail_form.max_point = str.toString().substring(1);
-				// this.rules_detail_form.max_point2=str.toString().substring(1);
 			} else {
 				this.integral_select_name2 = '1';
 			}
-			// this.rules_detail_form.min_point2=this.rules_detail_form.min_point;
-			// this.rules_detail_form.max_point2=this.rules_detail_form.max_point;
-
 			this.rule_show = true;
 			this.rule_type = 'edit';
 		},
@@ -879,7 +863,6 @@ export default {
 		handleNodeClick(e) {
 			if(e.id){
 				var items = this.getItemData(e);
-				console.log(items,e.id)
 				this.selectItem = {
 					child: e.child,
 					id: e.id,
@@ -973,6 +956,7 @@ export default {
 			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;
@@ -994,6 +978,7 @@ export default {
 								}
 							})
 							.finally(() => {
+								this.dept_formdata.pid=pidData
 								this.dept_loading = false;
 							});
 					} else {
@@ -1011,6 +996,7 @@ export default {
 								}
 							})
 							.finally(() => {
+								this.dept_formdata.pid=pidData
 								this.dept_loading = false;
 							});
 					}

+ 1 - 1
src/views/set/systemLayout.vue

@@ -164,7 +164,7 @@ export default {
 			approvalNotice: false, //审批通知
 			informText: [
 				{ title: '个人积分通知', switchs: 0, ram: '每天推送个人积分的排名和奖扣分情况(不参与积分排名的除外)', checkboxs: '积分日报展示A分数据' },
-				{ title: '管理者奖扣分执行情况通知', switchs: 1, ram: '每周给管理者推送当月的奖扣分执行情况' },
+				{ title: '向管理者推送积分周报', switchs: 1, ram: '每周一给管理者推送上周的管理周报' },
 				{ title: '任务通知', switchs: 2, ram: '每天定时推送收到任务的通知' },
 				{ title: '审批通知', switchs: 3, ram: '每天定时推送收到审批的通知' }
 			],