فهرست منبع

个人主页相关功能

wgl 4 سال پیش
والد
کامیت
ca7d7ba7fc

+ 1 - 0
package.json

@@ -14,6 +14,7 @@
 		"axios": "^0.20.0",
 		"compression-webpack-plugin": "^6.0.2",
 		"core-js": "^3.6.4",
+		"echarts": "^4.9.0",
 		"vconsole": "^3.3.4",
 		"vue": "^2.6.11",
 		"vue-router": "^3.2.0",

+ 38 - 0
src/projects/business/apis/Common/health.js

@@ -0,0 +1,38 @@
+import request from '@/utils/request'
+import Qs from 'qs';
+
+//获取测温记录
+export function getRecordList(params) {
+	return request({
+		url: '/mobile/PersonDeviceFilterLog/pageList',
+		data: Qs.stringify(params),
+		method: 'post',
+	})
+}
+
+//获取信息记录
+export function getTemperatureInfo(params) {
+	return request({
+		url: '/mobile/PersonDeviceFilterLog/detail',
+		data: Qs.stringify(params),
+		method: 'post',
+	})
+}
+
+//获取健康证详情
+export function getCertDetail(params) {
+	return request({
+		url: '/mobile/IndividualLogApi/temperaturePersonDetail',
+		data: Qs.stringify(params),
+		method: 'post',
+	})
+}
+
+//获取健康证记录
+export function getCertList(params) {
+	return request({
+		url: '/mobile/IndividualLogApi/temperaturePersonCurve',
+		data: Qs.stringify(params),
+		method: 'post',
+	})
+}

+ 0 - 29
src/projects/business/apis/Common/temperature.js

@@ -1,29 +0,0 @@
-import request from '@/utils/request'
-import Qs from 'qs';
-
-/**
- * 测温记录
- * @param params
- */
-
-//
-export function pageList(params) {
-    return request({
-        url:  '/mobile/PersonDeviceFilterLog/pageList',
-        data: Qs.stringify(params),
-        method: 'post',
-    })
-}
-
-//获取信息记录
-export function detail(params) {
-    return request({
-        url: '/mobile/PersonDeviceFilterLog/detail',
-        data: Qs.stringify(params),
-        method: 'post',
-    })
-}
-
-
-
-

+ 12 - 0
src/projects/business/apis/Master/health.js

@@ -0,0 +1,12 @@
+import request from '@/utils/request'
+import Qs from 'qs';
+
+
+//疫情上报
+export function report(params) {
+	return request({
+		url: '/mobile/messageReportApi/add',
+		data: Qs.stringify(params),
+		method: 'post',
+	})
+}

+ 18 - 0
src/projects/business/main.js

@@ -20,6 +20,24 @@ if (location.hostname === 'localhost') {
 
 Vue.config.productionTip = false
 
+
+router.beforeEach((to, from, next) => {
+	if (to.query.test) {
+		if (to.query.test == 'test') {
+			let vConsole = new Vconsole()
+		}
+	}
+
+	if (to.meta != null && to.meta.requireAuth) {
+		if (store.state.person_data) {
+			next();
+		} else {
+			window.location.href = '../home/#/login';
+		}
+	} else {
+		next();
+	}
+})
 new Vue({
 	router,
 	store,

+ 0 - 11
src/projects/business/router/master.js

@@ -469,17 +469,6 @@ const routesMaster = [
 				path: 'health',
 				component: () => import('../views/Layout.vue'),
 				children: [
-					//测温记录
-					{
-						path: 'temperatureRecord',
-						name: 'MasterHealthTemperatureRecord',
-						component: () => import('../views/Master/Health/TemperatureRecord.vue'),
-						meta: {
-							requireAuth: false,
-							role: [],
-							title: '测温记录',
-						}
-					},
 					//疫情上报
 					{
 						path: 'report',

+ 316 - 22
src/projects/business/views/Common/Health/Cert.vue

@@ -1,18 +1,16 @@
 <template>
-<div>
-    <header class="mui-bar mui-bar-nav">
-			<h1 class="mui-title">健康公示</h1>
-			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
-			<a class=" mui-pull-right" href=""><span class="mui-icon iconfont icon-shijian"></span>测温记录</a>
-		</header>
+	<div>
+		<common @asynCallBack="asynCallBack"></common>
+		<top-header :pageTitle="pageTitle" :rightLink="rightLink" :doRightLink="doRightLink" :headerStyle="'background-color:'+statusTitleColor"></top-header>
+
 		<div class="mui-content vongi-jkz-content">
 			<div class="vongi-jkz-content mui-content-padded mui-clearfix">
 				<div class="vongi-jkz-left mui-col-xs-5">
 					<div class="mui-content-padded faceaifyy-content">
 						<div class="faceaifyy-content-region">
-							<img src="~$project/assets/img/zhaop.jpg">
+							<img :src="detail.faceImageUrl">
 						</div>
-						<div class="mui-media-body">最近体温测量<span class="color55f868">36.5℃</span></div>
+						<div class="mui-media-body" style="width: 100%;">最近体温测量<span :style="'color:'+statusTitleColor" v-text="detail.lastTemperature+'℃'"></span></div>
 					</div>
 				</div>
 				<div class="vongi-jkz-right mui-col-xs-7">
@@ -20,8 +18,8 @@
 						<li class="mui-table-view-cell mui-media mui-col-xs-12">
 							<div class="vongi-jkz-list">
 								<div class="fyy-statistics-body">
-									<h2>冯银银<span class="color55f868">健康</span></h2>
-									<a href="" class="mui-navigate-right">
+									<h2>{{detail.name}}<span :style="'color:'+statusTitleColor">{{statusName}}</span></h2>
+									<a class="mui-navigate-right">
 										<span class="mui-icon iconfont icon-erweima1"></span>
 									</a>
 								</div>
@@ -32,7 +30,7 @@
 						<li class="mui-table-view-cell mui-media mui-col-xs-6">
 							<div class="vongi-jkz-list">
 								<div class="fyy-statistics-body">
-									<h3><span class="color55f868 mui-h1">3</span>天</h3>
+									<h3><span class="color55f868 mui-h1" v-text="detail.totalDays"></span>天</h3>
 								</div>
 								<div class="mui-media-body">已连续正常天数</div>
 							</div>
@@ -40,7 +38,7 @@
 						<li class="mui-table-view-cell mui-media mui-col-xs-6">
 							<div class="vongi-jkz-list">
 								<div class="fyy-statistics-body">
-									<h3><span class="colorfe616c mui-h1">0</span>次</h3>
+									<h3><span class="colorfe616c mui-h1" v-text="detail.undetectedCount"></span>次</h3>
 								</div>
 								<div class="mui-media-body">漏测记录</div>
 							</div>
@@ -49,11 +47,11 @@
 				</div>
 			</div>
 			<div class="mui-content-padded fyy-echarts">
-				<div class="fyy-echarts-inter ">
-					<h4 class="colorf6f448">2020-03-21</h4>
-					<div><img src="~$project/assets/img/echarts.png"> </div>
+				<div class="fyy-echarts-inter" v-for="(item,index) in chartsList">
+					<h4 class="colorf6f448">{{item.startDate}}~{{item.endDate}}</h4>
+					<div :id="'linePicture'+index" style="width:100%;"></div>
 				</div>
-				<div class="fyy-annotation">
+				<!-- <div class="fyy-annotation" @click="doChartTips">
 					<div class="fyy-annotation-color">
 						<span class="color09ae47"></span><span>14天连续测温正常</span>
 					</div>
@@ -63,17 +61,313 @@
 					<div class="fyy-annotation-color">
 						<span class="colord39d33"></span><span>14天内有一次以上异常</span>
 					</div>
-				</div>
+				</div> -->
 			</div>
 		</div>
-</div>
+
+		<loading :visible="isLoading"></loading>
+	</div>
 </template>
 
 <script>
+	import * as API_Health from '@/apis/Common/health'
+	import echarts from 'echarts/lib/echarts'
+	import 'echarts/lib/chart/line'
+	import 'echarts/lib/component/legend'
+	import 'echarts/lib/component/title'
+	import Common from '$project/components/Common.vue'
+	import Loading from '$project/components/Loading.vue'
+	import TopHeader from '$project/components/TopHeader.vue'
+	import {
+		mapGetters,
+		mapMutations
+	} from 'vuex'
+	export default {
+		name: 'CommonHealthTemperatureInfo',
+		components: {
+			Common,
+			Loading,
+			TopHeader
+		},
+		data() {
+			return {
+				pageTitle: '健康证',
+
+				isLoading: false,
+
+				rightLink: {
+					show: true,
+					icon: 'icon-shijian',
+					style: 'font-size:14px;color:#000;',
+					title: '测温记录'
+				},
+
+				detail: {},
+
+				subForm: {
+					personId: ''
+				},
+				chartsList: [],
+				maxTemparture: 37,
+				//和下面的对应默认值
+				lineColor: '#e5aa37',
+				statusColor: '#e5aa37',
+				statusTitleColor: '#d39d33',
+				statusName: '异常',
+			}
+		},
+		created() {
+			this.subForm.personId = this.person_data.id;
+		},
+		methods: {
+			//获取详情
+			getDetail() {
+				this.isLoading = true;
+				API_Health.getCertDetail(this.subForm).then(response => {
+					this.detail = response;
+					this.maxTemparture = response.temperatureMax;
+
+					this.isLoading = false;
+				}).catch(error => {
+					this.isLoading = false;
+					mui.toast(error);
+				})
+			},
+			//获取统计图表数据
+			getEcharts() {
+				this.isLoading = true;
+				API_Health.getCertList(this.subForm).then(response => {
+					this.chartsList = response;
+					if (response.length > 0) {
+						this.maxTemparture = response[0]['temperatureMax'];
+						this.detail.totalDays = response[0]['totalDays'];
+						this.detail.undetectedCount = response[0]['undetectedCount'];
+						this.getStatus()
+						this.echarts();
+					}
+
+					this.isLoading = false;
+				}).catch(error => {
+					this.isLoading = false;
+					mui.toast(error);
+				})
+			},
+			//计算显示颜色
+			getStatus() {
+				if (this.chartsList.length) {
+					var chartList = this.chartsList[0]['list'].slice();
+					chartList.reverse();
+					//console.log(chartList)
+					for (var index in chartList) {
+						if (chartList[index]['value'] >= this.maxTemparture && index < 7) {
+							this.statusColor = '#fe616c';
+							this.statusTitleColor = '#ed5b65';
+							this.statusName = '异常';
+							break;
+						} else if (chartList[index]['value'] >= this.maxTemparture && index < 14) {
+							this.statusColor = '#e5aa37';
+							this.statusTitleColor = '#d39d33';
+							this.statusName = '异常';
+							break;
+						} else {
+							this.statusColor = '#0bcf54';
+							this.statusTitleColor = '#09ae47';
+							this.statusName = '正常';
+						}
+					}
+
+					//如果全为0则显示默认值
+					var allzero = true;
+					for (var index in chartList) {
+						if (chartList[index]['value'] > 0) {
+							allzero = false;
+							break;
+						}
+					}
+					if (allzero) {
+						this.statusColor = '#e5aa37';
+						this.statusTitleColor = '#d39d33';
+						this.statusName = '异常';
+					}
+				}
+			},
+			echarts() {
+				this.$nextTick(() => {
+					var _titleData = [];
+					var _listData = [];
+					for (var index in this.chartsList) {
+						for (var k in this.chartsList[index]['list']) {
+							_titleData.push(this.chartsList[index]['list'][k]['name']);
+							_listData.push(this.chartsList[index]['list'][k]['value']);
+						}
+					}
+
+					console.log(_titleData);
+					console.log(_listData);
+					for (var index in this.chartsList) {
+						var _this = this;
+						//是否有异常数据
+						for (var k in this.chartsList[index]['list']) {
+							if (this.chartsList[index]['list'][k]['value'] >= this.maxTemparture) {
+								this.lineColor = 'yellow';
+								break;
+							}
+						}
+
+						var wheight = window.screen.height;
+						if (wheight < 480) {
+							var rHeight = '180';
+							var gHeight = '130';
+						} else if (wheight >= 480 && wheight <= 568) {
+							var rHeight = '190';
+							var gHeight = '130';
+						} else if (wheight > 568 && wheight <= 736) {
+							var rHeight = '200';
+							var gHeight = '130';
+						} else {
+							var rHeight = '230';
+							var gHeight = '180';
+						}
+
+						// 基于准备好的dom,初始化echarts实例
+						var myChart = echarts.init(document.getElementById('linePicture' + index));
+						// 指定图表的配置项和数据
+						var option = {
+							xAxis: {
+								type: 'category',
+								boundaryGap: false,
+								data: _titleData,
+								axisLabel: {
+									textStyle: {
+										color: '#fff',
+										fontSize: '12'
+									},
+									showMinLabel: true,
+									showMaxLabel: true,
+								},
+								axisLine: {
+									lineStyle: {
+										type: 'solid',
+										color: '#fff',
+										//width: '2'
+									}
+								},
+							},
+							yAxis: {
+								type: 'value',
+								axisLabel: {
+									textStyle: {
+										color: '#fff',
+										//fontSize: '12'
+									},
+								},
+								min: 30,
+								max: 40,
+								splitNumber: 6,
+								axisLine: {
+									lineStyle: {
+										type: 'solid',
+										color: '#fff',
+										//width: '2'
+									}
+								},
+								splitLine: {
+									lineStyle: {
+										type: 'dashed',
+										color: '#404978',
+									}
+								}
+							},
+							series: [{
+								data: _listData,
+								type: 'line',
+								//smooth: true,
+								markLine: { //添加警戒线
+									symbol: "none", //去掉警戒线最后面的箭头
+									name: "",
+									silent: true,
+									precision: 2,
+									data: [{
+										silent: true, //鼠标悬停事件  true没有,false有
+										lineStyle: { //警戒线的样式  ,虚实  颜色
+											type: "solid",
+											color: "red"
+										},
+										label: {
+											position: 'start'
+										},
+										yAxis: _this.maxTemparture
+									}]
+								},
+								lineStyle: {
+									normal: {
+										color: _this.statusColor //改变区域颜色
+									}
+								},
+								areaStyle: {
+									color: _this.statusColor,
+								}
+							}],
+							visualMap: {
+								show: false,
+								//dimension: 0,
+								seriesIndex: 0,
+								pieces: [{
+									gt: _this.maxTemparture,
+									lt: 40,
+									color: 'red'
+								}, {
+									gt: 0,
+									lt: _this.maxTemparture,
+									color: 'green'
+								}],
+							},
+							grid: {
+								show: true,
+								x: 40,
+								x2: 30,
+								y: 20,
+								height: gHeight
+							},
+						};
+
+						// 使用刚指定的配置项和数据显示图表。
+						myChart.setOption(option);
+						myChart.resize({
+							height: rHeight + 'px'
+						})
+					}
+				});
+			},
+			//右上角点击事件
+			doRightLink() {
+				this.$router.push({
+					name: 'CommonHealthTemperatureRecord',
+					query: {}
+				})
+			},
+			asynCallBack() {},
+		},
+		mounted() {
+			//获取详情
+			this.getDetail();
+			//获取统计图表
+			this.getEcharts();
+		},
+		destroyed() {},
+		computed: {
+			...mapGetters({
+				openId: 'wx_openid',
+				token: 'token',
+				person_data: 'person_data',
+				company_data: 'company_data',
+			})
+		}
+	}
 </script>
 
-<style src="$project/assets/css/xpwyfyy.css"></style>
-<style src="$project/assets/css/sczpfyy.css"></style>
-<style src="$project/assets/css/iconfont.css"></style>
-<style>
+<style scoped src="$project/assets/css/xpwyfyy.css"></style>
+<style scoped src="$project/assets/css/sczpfyy.css"></style>
+<style scoped src="$project/assets/css/iconfont.css"></style>
+<style scoped>
 </style>

+ 91 - 18
src/projects/business/views/Common/Health/TemperatureInfo.vue

@@ -1,42 +1,115 @@
 <template>
-<div>
-    <header class="mui-bar mui-bar-nav">
-			<h1 class="mui-title">详情</h1>
-			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
-			<a class="mui-pull-right" href=""><span class="mui-icon iconfont icon-tongji"></span>健康统计</a>
-		</header>
+	<div>
+		<common @asynCallBack="asynCallBack"></common>
+		<top-header :pageTitle="pageTitle" :rightLink="rightLink" :doRightLink="doRightLink"></top-header>
+
 		<div class="mui-content fyy-detail-content mui-fullscreen">
 			<div class="mui-content-padded fyynew-detail">
 				<div class="fyynew-detail-photo">
 					<div class="fyynew-detail-region">
-						<img src="~$project/assets/img/zhaop1.jpg">
+						<img :src="detail.faceImage">
 					</div>
 				</div>
-				<div class="fyynew-detail-title">检测正常</div>
-				<div class="fyynew-detail-wendu">36.5</div>
+				<div class="fyynew-detail-title" :style="detail.fever?'background: rgba(254,97,108,0.6);':'background: rgba(5,200,175,0.6);'"
+				 v-text="detail.fever?'检测异常':'检测正常'"></div>
+				<div class="fyynew-detail-wendu" :style="'background-color:'+detail.fever?'#fe616c':'#05c8af'" v-text="detail.temperature"></div>
 				<div class="fyynew-detail-text">
-					<h4>冯银银</h4>
+					<h4 v-text="detail.personName"></h4>
 					<ul class="mui-table-view fyy-view">
 						<li class="mui-table-view-cell">
 							<label>检测时间</label>
-							<span>2020-03-14  15:28</span>
+							<span v-text="detail.recordTime"></span>
 						</li>
 						<li class="mui-table-view-cell">
 							<label>设备名称</label>
-							<span>荆鹏侧门</span>
+							<span v-text="detail.deviceName"></span>
 						</li>
 					</ul>
 				</div>
-			</div>								
+			</div>
 		</div>
-</div>
+
+		<loading :visible="isLoading"></loading>
+	</div>
 </template>
 
 <script>
+	import * as API_Health from '@/apis/Common/health'
+	import Common from '$project/components/Common.vue'
+	import Loading from '$project/components/Loading.vue'
+	import TopHeader from '$project/components/TopHeader.vue'
+	import {
+		mapGetters,
+		mapMutations
+	} from 'vuex'
+	export default {
+		name: 'CommonHealthTemperatureInfo',
+		components: {
+			Common,
+			Loading,
+			TopHeader
+		},
+		data() {
+			return {
+				pageTitle: '详情',
+
+				isLoading: false,
+
+				rightLink: {
+					show: true,
+					icon: 'icon-tongji',
+					style: 'font-size:14px',
+					title: '健康统计'
+				},
+
+				detail: {},
+
+				subForm: {
+					id: this.$route.query.id
+				},
+			}
+		},
+		created() {
+
+		},
+		methods: {
+			//获取详情
+			getInfo() {
+				this.isLoading = true;
+				API_Health.getTemperatureInfo(this.subForm).then(response => {
+					this.detail = response;
+					this.isLoading = false;
+				}).catch(error => {
+					this.isLoading = false;
+					mui.toast(error);
+				})
+			},
+			//右上角点击事件
+			doRightLink() {
+				this.$router.push({
+					name: 'CommonHealthCert',
+					query: {}
+				})
+			},
+			asynCallBack() {},
+		},
+		mounted() {
+			this.getInfo();
+		},
+		destroyed() {},
+		computed: {
+			...mapGetters({
+				openId: 'wx_openid',
+				token: 'token',
+				person_data: 'person_data',
+				company_data: 'company_data',
+			})
+		}
+	}
 </script>
 
-<style src="$project/assets/css/xpwyfyy.css"></style>
-<style src="$project/assets/css/sczpfyy.css"></style>
-<style src="$project/assets/css/iconfont.css"></style>
-<style>
+<style scoped src="$project/assets/css/xpwyfyy.css"></style>
+<style scoped src="$project/assets/css/sczpfyy.css"></style>
+<style scoped src="$project/assets/css/iconfont.css"></style>
+<style scoped>
 </style>

+ 136 - 21
src/projects/business/views/Common/Health/TemperatureRecord.vue

@@ -1,35 +1,150 @@
 <template>
-<div>
-    <header class="mui-bar mui-bar-nav">
-			<h1 class="mui-title">测温记录</h1>
-			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
-			<a class=" mui-pull-right" href=""><span class="mui-icon iconfont icon-baojing"></span>异常记录</a>
-		</header>
+	<div>
+		<common @asynCallBack="asynCallBack"></common>
+		<top-header :pageTitle="pageTitle" :rightLink="rightLink" :doRightLink="doRightLink"></top-header>
+
 		<div class="mui-content">
 			<div class="mui-content-padded">
 				<ul class="mui-table-view openfyy-list">
-					<li class="mui-table-view-cell mui-media flew-sp">
-						<div class="mui-h4"><span>2020-04-18 08:47</span><button>设备测温</button></div>
-						<a href="javascript:;" class="mui-navigate-right">
-							<p class="color05c8af">正常<span>36.5</span></p>
-						</a>
-					</li>
-					<li class="mui-table-view-cell mui-media flew-sp">
-						<div class="mui-h4"><span>2020-04-18 08:47</span><button>体温上报</button></div>
-						<a href="javascript:;" class="mui-navigate-right">
-							<p class="colorfe616c">异常<span>39.3</span></p>
-						</a>
+					<li v-for="(item,index) in recordList" class="mui-table-view-cell mui-media flew-sp">
+						<div class="mui-h4">
+							<span v-text="item.recordTime"></span>
+							<!-- <button>设备测温</button> -->
+						</div>
+						<router-link :to="{name:'CommonHealthTemperatureInfo',query:{id:item.id}}" class="mui-navigate-right">
+							<p class="color05c8af">
+								{{item.fever?'异常':'正常'}}
+								<!-- <span v-text="item.temperature"></span> -->
+							</p>
+						</router-link>
 					</li>
 				</ul>
 			</div>
 		</div>
-</div>
+		
+		<loading :visible="isLoading"></loading>
+	</div>
 </template>
 
 <script>
+	import * as API_Health from '@/apis/Common/health'
+	import Common from '$project/components/Common.vue'
+	import Loading from '$project/components/Loading.vue'
+	import TopHeader from '$project/components/TopHeader.vue'
+	import isReachBottom from '$project/utils/isReachBottom'
+	import {
+		mapGetters,
+		mapMutations
+	} from 'vuex'
+	export default {
+		name: 'CommonHealthTemperatureRecord',
+		components: {
+			Common,
+			Loading,
+			TopHeader
+		},
+		data() {
+			return {
+				pageTitle: '测温记录',
+
+				isLoading: false,
+
+				rightLink: {
+					show: true,
+					icon: 'icon-baojing',
+					style: 'font-size:14px',
+					title: '异常记录'
+				},
+
+				recordList: [],
+
+				listForm: {
+					pageIndex: 1,
+					pageSize: 20,
+					token: '',
+					fever: '',
+					totalPage: 1
+				},
+			}
+		},
+		created() {
+
+		},
+		methods: {
+			//获取列表
+			getList() {
+				this.isLoading = true;
+				API_Health.getRecordList(this.listForm).then(response => {
+					if (response) {
+						if (this.listForm.pageIndex == 1) {
+							this.recordList = response.data;
+							this.listForm.pageIndex = response.pageNumber;
+							this.listForm.totalPage = response.totalPage;
+						} else {
+							this.recordList = [
+								...this.recordList,
+								...response.data
+							];
+						}
+					}
+					this.listForm.pageIndex++;
+					this.isLoading = false;
+				}).catch(error => {
+					this.isLoading = false;
+					mui.toast(error);
+				})
+			},
+			//下拉事件
+			handleScrool() {
+				if (isReachBottom()) {
+					console.log('到达底部')
+					if (this.listForm.pageIndex <= this.listForm.totalPage && this.isLoading == false) {
+						this.getList();
+					} else {
+						return;
+					}
+				}
+			},
+			//右上角点击事件
+			doRightLink() {
+				this.listForm.pageIndex = 1;
+				this.listForm.fever = this.listForm.fever == 1 ? '' : 1;
+				this.getList();
+			},
+			asynCallBack() {},
+		},
+		mounted() {
+			this.getList();
+			//监控下拉加载事件
+			var _this = this;
+			window.addEventListener('scroll', _this.handleScrool);
+		},
+		destroyed() {
+			//销毁监听事件
+			var _this = this;
+			window.removeEventListener('scroll', _this.handleScrool);
+		},
+		computed: {
+			...mapGetters({
+				openId: 'wx_openid',
+				token: 'token',
+				person_data: 'person_data',
+				company_data: 'company_data',
+			})
+		},
+		watch: {
+			'listForm.fever': function(newValue, oldValue) {
+				if (newValue == 1) {
+					this.rightLink.title = '全部记录';
+				} else {
+					this.rightLink.title = '异常记录';
+				}
+			}
+		}
+	}
 </script>
 
-<style src="$project/assets/css/xpwyfyy.css"></style>
-<style src="$project/assets/css/iconfont.css"></style>
-<style>
+<style scoped src="$project/assets/css/xpwyfyy.css"></style>
+<style scoped src="$project/assets/css/iconfont.css"></style>
+<style scoped>
 </style>

+ 1 - 9
src/projects/business/views/Master/Center.vue

@@ -103,15 +103,7 @@
 					query: {}
 				})
 			},
-			asynCallBack() {
-				//如果用户信息不存在则跳转到注册信息
-				if (!this.person_data) {
-					this.$router.push({
-						name: 'MasterRegister',
-						query: {}
-					})
-				}
-			},
+			asynCallBack() {},
 		},
 		mounted() {
 

+ 85 - 12
src/projects/business/views/Master/Health/Report.vue

@@ -1,29 +1,102 @@
 <template>
-<div>
-    <header class="mui-bar mui-bar-nav">
-			<h1 class="mui-title">疫情上报</h1>
-			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
-		</header>
+	<div>
+		<common @asynCallBack="asynCallBack"></common>
+		<top-header :pageTitle="pageTitle"></top-header>
 
 		<div class="mui-content">
 			<div class="mui-content-padded">
 				<h5>如发现疫情,请及时上报</h5>
 				<div class="mui-input-row">
-					<textarea id="textarea" rows="5" placeholder="请输入">下午6:40发现园区电梯未按规定消毒。</textarea>
+					<textarea id="textarea" rows="5" placeholder="请输入" v-model="subForm.content"></textarea>
 				</div>
 			</div>
 		</div>
 		<div class="fyy-footer">
-			<div class="bindfyy-btn"><button type="submit" class="mui-btn mui-btn-primary ">保  存</button></div>
+			<div class="bindfyy-btn"><button type="submit" class="mui-btn mui-btn-primary" @click="save">保 存</button></div>
 		</div>
-</div>
+
+		<loading :visible="isLoading"></loading>
+	</div>
 </template>
 
 <script>
+	import * as API_Health from '@/apis/Master/health'
+	import Common from '$project/components/Common.vue'
+	import Loading from '$project/components/Loading.vue'
+	import TopHeader from '$project/components/TopHeader.vue'
+	import {
+		mapGetters,
+		mapMutations
+	} from 'vuex'
+	export default {
+		name: 'MasterHealthReport',
+		components: {
+			Common,
+			Loading,
+			TopHeader
+		},
+		data() {
+			return {
+				pageTitle: '疫情上报',
+
+				isLoading: false,
+
+				subForm: {
+					content: '',
+				}
+			}
+		},
+		created() {
+
+		},
+		methods: {
+			//检测表单
+			checkForm() {
+				if (!this.subForm.content) {
+					mui.toast('请填写详情内容');
+					return false;
+				} else {
+					return true;
+				}
+			},
+			//保存
+			save() {
+				if (this.checkForm()) {
+					this.isLoading = true;
+					API_Health.report(this.subForm).then(response => {
+
+						mui.toast('提交成功');
+						this.$router.push({
+							name: 'Master',
+							query: {}
+						})
+
+						this.isLoading = false;
+					}).catch(error => {
+						this.isLoading = false;
+						mui.toast(error);
+					})
+				}
+			},
+			asynCallBack() {},
+		},
+		mounted() {},
+		destroyed() {
+
+		},
+		computed: {
+			...mapGetters({
+				openId: 'wx_openid',
+				token: 'token',
+				person_data: 'person_data',
+				company_data: 'company_data',
+			})
+		}
+	}
 </script>
 
-<style src="$project/assets/css/xpwyfyy.css"></style>
-<style src="$project/assets/css/sczpfyy.css"></style>
-<style src="$project/assets/css/iconfont.css"></style>
-<style>
+<style scoped src="$project/assets/css/xpwyfyy.css"></style>
+<style scoped src="$project/assets/css/sczpfyy.css"></style>
+<style scoped src="$project/assets/css/iconfont.css"></style>
+<style scoped>
 </style>

+ 0 - 8
src/projects/business/views/Master/Health/TemperatureRecord.vue

@@ -1,8 +0,0 @@
-<template>
-</template>
-
-<script>
-</script>
-
-<style>
-</style>

+ 6 - 6
src/projects/business/views/Master/Home.vue

@@ -7,16 +7,16 @@
 			<div class="vongi-icons">
 				<ul class="mui-table-view mui-grid-view mui-grid-9 vongi-grid-head">
 					<li class="mui-table-view-cell mui-media mui-col-xs-3">
-						<a href="javascript:void(0)">
+						<router-link :to="{name:'CommonHealthCert'}">
 							<img src="~$project/assets/img/icon54.png" />
 							<div class="mui-media-body">健康证</div>
-						</a>
+						</router-link>
 					</li>
 					<li class="mui-table-view-cell mui-media mui-col-xs-3">
-						<a href="javascript:void(0)">
+						<router-link :to="{name:'CommonHealthTemperatureRecord'}">
 							<img src="~$project/assets/img/icon41.png" />
 							<div class="mui-media-body">测温记录</div>
-						</a>
+						</router-link>
 					</li>
 					<li class="mui-table-view-cell mui-media mui-col-xs-3">
 						<a href="javascript:void(0)">
@@ -33,10 +33,10 @@
 				</ul>
 				<ul class="mui-table-view mui-grid-view mui-grid-9">
 					<li class="mui-table-view-cell mui-media mui-col-xs-3">
-						<a href="javascript:void(0)">
+						<router-link :to="{name:'MasterHealthReport'}">
 							<img src="~$project/assets/img/cicon19.png" />
 							<div class="mui-media-body">疫情上报</div>
-						</a>
+						</router-link>
 					</li>
 					<li class="mui-table-view-cell mui-media mui-col-xs-3 kfz">
 						<a href="javascript:void(0)">

+ 1 - 9
src/projects/business/views/Master/Message.vue

@@ -101,15 +101,7 @@
 					mui.toast(error);
 				})
 			},
-			asynCallBack() {
-				//如果用户信息不存在则跳转到注册信息
-				if (!this.person_data) {
-					this.$router.push({
-						name: 'MasterRegister',
-						query: {}
-					})
-				}
-			},
+			asynCallBack() {},
 		},
 		mounted() {
 			//获取最新一条通知消息

+ 12 - 0
yarn.lock

@@ -3285,6 +3285,13 @@ ecc-jsbn@~0.1.1:
     jsbn "~0.1.0"
     safer-buffer "^2.1.0"
 
+echarts@^4.9.0:
+  version "4.9.0"
+  resolved "https://registry.npm.taobao.org/echarts/download/echarts-4.9.0.tgz#a9b9baa03f03a2a731e6340c55befb57a9e1347d"
+  integrity sha1-qbm6oD8Doqcx5jQMVb77V6nhNH0=
+  dependencies:
+    zrender "4.3.2"
+
 ee-first@1.1.1:
   version "1.1.1"
   resolved "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
@@ -8526,3 +8533,8 @@ yargs@^15.0.0:
     which-module "^2.0.0"
     y18n "^4.0.0"
     yargs-parser "^18.1.2"
+
+zrender@4.3.2:
+  version "4.3.2"
+  resolved "https://registry.npm.taobao.org/zrender/download/zrender-4.3.2.tgz#ec7432f9415c82c73584b6b7b8c47e1b016209c6"
+  integrity sha1-7HQy+UFcgsc1hLa3uMR+GwFiCcY=