Browse Source

Merge remote-tracking branch 'origin/master'

wgl 4 years ago
parent
commit
b548512521
1 changed files with 71 additions and 59 deletions
  1. 71 59
      src/projects/business/views/Master/Health/WorkerReport.vue

+ 71 - 59
src/projects/business/views/Master/Health/WorkerReport.vue

@@ -1,7 +1,7 @@
 <template>
 	<div>
-		<common @asynCallBack="asynCallBack"></common>
-		<top-header :pageTitle="pageTitle"></top-header>
+		<common @asynCallBack="asynCallBack" :checkOpenId="checkOpenId"></common>
+		<top-header :pageTitle="pageTitle"  :leftShow="leftShow" ></top-header>
 
 		<div class="mui-content vongi-qingjiadt">
 			<div class="mui-content-padded">
@@ -203,70 +203,20 @@
 				curDateIsUpload: false,
 				send: false,
 				isLoading: false,
+                leftShow:true,
+                checkOpenId:true,
 				max: 37.3,
 				healthStatusList: [],
 			}
 		},
 		created() {
-			this.id = this.$route.query.id;
-			this.getStatus();
-			API_Health.curDateIsUpload().then(data => {
-				this.curDateIsUpload = data;
-				this.send = data;
-
-				if (data) {
-					API_Health.getDetail(this.id, '1').then(response => {
-						this.isLoading = false;
-						this.student = response;
-
-						if (response.personHealthLedger != null) {
-							this.report.healthStatusN = response.personHealthLedger.healthStatusN;
-							this.report.healthRemark = response.personHealthLedger.healthRemark;
-							this.report.familyStatusN = response.personHealthLedger.familyStatusN;
-							this.report.isGoto = response.personHealthLedger.isGoto;
-							this.report.isTouch = response.personHealthLedger.isTouch;
-							this.report.pictures = response.personHealthLedger.familyGreenCode.split(',');
-							this.report.temperature = response.personHealthLedger.temperature;
-                            this.address=response.personHealthLedger.address;
-
-						}
-
-					}).catch(error => {
-						this.isLoading = false;
-						mui.toast(error);
-					})
-
-				} else {
-					API_Health.getPersonInfo('1').then(response => {
-						this.student = response;
-						if (response.personHealthLedger != null) {
-							this.report.healthRemark = response.personHealthLedger.healthRemark;
-							//this.report.temperature=response.personHealthLedger.temperature;
-
-							this.report.healthStatusN = response.personHealthLedger.healthStatusN;
-							this.report.familyStatusN = response.personHealthLedger.familyStatusN;
-
-							this.report.healthStatus = response.personHealthLedger.healthStatus;
-							this.report.familyStatus = response.personHealthLedger.familyStatus;
-
-							this.report.isGoto = response.personHealthLedger.isGoto;
-							this.report.isTouch = response.personHealthLedger.isTouch;
-							//this.report.pictures=response.personHealthLedger.familyGreenCode.split(',');
-						}
-						this.id = response.id;
-
-
+            if(this.$route.query.token){
+                this.leftShow=false;
+                this.checkOpenId=false;
+            }
 
+			this.id = this.$route.query.id;
 
-					}).catch(error => {
-						this.isLoading = false;
-						mui.toast(error);
-					})
-				}
-			}).catch(error => {
-				this.isLoading = false;
-				mui.toast(error);
-			})
 
 		},
 		methods: {
@@ -506,6 +456,66 @@
 				//mui.alert("需要点击下方确认提交,确认后不能修改!");
 
 
+			},
+            getInfo() {
+
+                API_Health.curDateIsUpload().then(data => {
+                    this.curDateIsUpload = data;
+                    this.send = data;
+
+                    if (data) {
+                        API_Health.getDetail(this.id, '1').then(response => {
+                            this.isLoading = false;
+                            this.student = response;
+
+                            if (response.personHealthLedger != null) {
+                                this.report.healthStatusN = response.personHealthLedger.healthStatusN;
+                                this.report.healthRemark = response.personHealthLedger.healthRemark;
+                                this.report.familyStatusN = response.personHealthLedger.familyStatusN;
+                                this.report.isGoto = response.personHealthLedger.isGoto;
+                                this.report.isTouch = response.personHealthLedger.isTouch;
+                                this.report.pictures = response.personHealthLedger.familyGreenCode.split(',');
+                                this.report.temperature = response.personHealthLedger.temperature;
+                                this.address=response.personHealthLedger.address;
+
+                            }
+
+                        }).catch(error => {
+                            this.isLoading = false;
+                            mui.toast(error);
+                        })
+
+                    } else {
+                        API_Health.getPersonInfo('1').then(response => {
+                            this.student = response;
+                            if (response.personHealthLedger != null) {
+                                this.report.healthRemark = response.personHealthLedger.healthRemark;
+                                //this.report.temperature=response.personHealthLedger.temperature;
+
+                                this.report.healthStatusN = response.personHealthLedger.healthStatusN;
+                                this.report.familyStatusN = response.personHealthLedger.familyStatusN;
+
+                                this.report.healthStatus = response.personHealthLedger.healthStatus;
+                                this.report.familyStatus = response.personHealthLedger.familyStatus;
+
+                                this.report.isGoto = response.personHealthLedger.isGoto;
+                                this.report.isTouch = response.personHealthLedger.isTouch;
+                                //this.report.pictures=response.personHealthLedger.familyGreenCode.split(',');
+                            }
+                            this.id = response.id;
+
+
+
+
+                        }).catch(error => {
+                            this.isLoading = false;
+                            mui.toast(error);
+                        })
+                    }
+                }).catch(error => {
+                    this.isLoading = false;
+                    mui.toast(error);
+                })
 			},
 			getStatus() {
 
@@ -542,6 +552,8 @@
 		mounted() {
             WxJsApi.getWxConfig(['chooseImage', 'getLocalImgData', 'getLocation']);
             //获取经纬度
+            this.getStatus();
+            this.getInfo();
             this.getPoint();
 		},
 		destroyed() {