Commit a5d770ba authored by godwithdh's avatar godwithdh

health

parent dd76d81f
module.exports = { module.exports = {
getStatisticalDetails:{url:"/healthlog/",method:"post",host:"health"}, getStatisticalDetails:{url:"/healthlog/",method:"post",host:"health"},
saveHealth:{url:"/healthlog/save/",method:"post",host:"health"},
} }
\ No newline at end of file
...@@ -32,6 +32,7 @@ function urlFun(name){ ...@@ -32,6 +32,7 @@ function urlFun(name){
* 健康打卡统计 * 健康打卡统计
*/ */
health:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/1225621052093239296` health:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/1225621052093239296`
// health:`http://xuxiaoming.vaiwan.com`
} }
return url[name] return url[name]
} }
......
...@@ -59,7 +59,7 @@ module.exports = [ ...@@ -59,7 +59,7 @@ module.exports = [
} }
}, },
{ {
path:"/healthCard/punchClockDetail/:id/:openId", path:"/healthCard/punchClockDetail/:id/:openId/:address",
name:"punchClockDetail", name:"punchClockDetail",
component:()=>import("@/view/healthCard/punchClockDetail.vue"), component:()=>import("@/view/healthCard/punchClockDetail.vue"),
meta:{ meta:{
......
import Vue from "vue"
export default new Vue({
})
\ No newline at end of file
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
<script> <script>
import util from "@/libs/util.js" import util from "@/libs/util.js"
import config from "./config"
export default { export default {
name: 'punchClock', name: 'punchClock',
data () { data () {
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<div id="punchClockDetail"> <div id="punchClockDetail">
<img src="./image/health.jpg" /> <img src="./image/health.jpg" />
<div class="list"> <div class="list">
<div class="tip">1. 目前健康状况</div> <div class="tip"><span style="color:red;">*</span>1. 目前健康状况</div>
<v-radio-group v-model="value.sStatus"> <v-radio-group v-model="value.sStatus">
<div><v-radio value="健康" label="健康"/></div> <div><v-radio value="健康" label="健康"/></div>
<div><v-radio value="有发烧、咳嗽等症状" label="有发烧、咳嗽等症状"/></div> <div><v-radio value="有发烧、咳嗽等症状" label="有发烧、咳嗽等症状"/></div>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</v-radio-group> </v-radio-group>
</div> </div>
<div class="list"> <div class="list">
<div class="tip">2. 目前所在城市</div> <div class="tip"><span style="color:red;">*</span>2. 目前所在城市</div>
<x-address <x-address
@on-hide="logHide" @on-hide="logHide"
@on-show="logShow" @on-show="logShow"
...@@ -75,17 +75,22 @@ ...@@ -75,17 +75,22 @@
:list="addressData" :list="addressData"
@on-shadow-change="onShadowChange" @on-shadow-change="onShadowChange"
placeholder="请选择地址" placeholder="请选择地址"
:raw-value="true"
value-text-align="left" value-text-align="left"
:show.sync="showAddress"/> :show.sync="showAddress"/>
</div> </div>
<div class="list"> <div class="list">
<div class="tip">3. 是否接触过疑似或确诊的新型肺炎患者</div> <div class="tip"><span style="color:red;">*</span>2. 目前所在城市</div>
<span>{{value.sAddressFull}}</span>
</div>
<div class="list">
<div class="tip"><span style="color:red;">*</span>3. 是否接触过疑似或确诊的新型肺炎患者</div>
<v-radio-group v-model="value.bTouch"> <v-radio-group v-model="value.bTouch">
<div><v-radio :value="0" label="否"/></div> <div><v-radio :value="0" label="否"/></div>
<div><v-radio :value="1" label="是"/></div> <div><v-radio :value="1" label="是"/></div>
</v-radio-group> </v-radio-group>
</div> </div>
<div class="list"> <div class="list" v-if="value.bTouch">
<div class="tip">4. 接触日期</div> <div class="tip">4. 接触日期</div>
<datetime <datetime
title="" title=""
...@@ -93,11 +98,10 @@ ...@@ -93,11 +98,10 @@
placeholder="请选择" placeholder="请选择"
value-text-align="left" value-text-align="left"
:show.sync="isShowDate" :show.sync="isShowDate"
v-model="value.dTouchDate" v-model="value.dTouchDate"/>
/>
</div> </div>
<div class="list"> <div class="list">
<div class="tip">5. 体温</div> <div class="tip"><span style="color:red;">*</span>5. 体温</div>
<xInput <xInput
title="" title=""
placeholder="输入体温" placeholder="输入体温"
...@@ -119,7 +123,7 @@ ...@@ -119,7 +123,7 @@
</v-radio-group> </v-radio-group>
</div> </div>
<div class="list"> <div class="list">
<div class="tip">6. 是否去过疫区(湖北,武汉)</div> <div class="tip"><span style="color:red;">*</span>6. 是否去过疫区(湖北,武汉)</div>
<v-radio-group v-model="value.bHaveBeen"> <v-radio-group v-model="value.bHaveBeen">
<div><v-radio :value="0" label="否"/></div> <div><v-radio :value="0" label="否"/></div>
<div><v-radio :value="1" label="是"/></div> <div><v-radio :value="1" label="是"/></div>
...@@ -140,7 +144,7 @@ ...@@ -140,7 +144,7 @@
<script> <script>
import util from "@/libs/util.js" import util from "@/libs/util.js"
import { XAddress,ChinaAddressV4Data,Datetime,XInput } from 'vux' import { XAddress,ChinaAddressV4Data,Datetime,XInput } from 'vux'
import config from "./config"
export default { export default {
name: 'punchClockDetail', name: 'punchClockDetail',
components:{XAddress,Datetime,XInput}, components:{XAddress,Datetime,XInput},
...@@ -157,30 +161,66 @@ export default { ...@@ -157,30 +161,66 @@ export default {
nTemperature:'', //体温 nTemperature:'', //体温
sAddress:"", //地址 sAddress:"", //地址
sAddressFull:"", //详细地址 sAddressFull:"", //详细地址
bTouch:"", //是否接触过 bTouch:0, //是否接触过
dTouchDate:"", //接触日期 dTouchDate:null, //接触日期
bQuarantine:"", //是否自我隔离 bQuarantine:0, //是否自我隔离
bHospital:"", //是否自我就医 bHospital:0, //是否自我就医
bHaveBeen:"", //是否去过疫区 bHaveBeen:0, //是否去过疫区
sHaveBeenDetail:"", //出行明细 sHaveBeenDetail:"", //出行明细
sRemark:"", //其他情况 sRemark:"", //其他情况
tCreateTime:"", //创建日期 tCreateTime:"", //创建日期
sCreateAppid:"", //openID sCreateAppid:"", //openID
iStatus:1,
} }
} }
}, },
created(){ created(){
this.value.iEmploeeId=this.$route.params.id this.value.iEmploeeId=this.$route.params.id
this.value.sCreateAppid=this.$route.params.openId this.value.sCreateAppid=this.$route.params.openId
this.value.sAddressFull=this.$route.params.address
this.value.dCheckDate=this.value.tCreateTime=util.dateFormat(new Date(),"yyyy-MM-dd hh:mm:ss") this.value.dCheckDate=this.value.tCreateTime=util.dateFormat(new Date(),"yyyy-MM-dd hh:mm:ss")
}, },
methods:{ methods:{
logHide(){}, logHide(e){
logShow(){}, console.log(e)
onShadowChange(){}, },
upData(){//保存数据 logShow(e){
console.log(this.value) console.log(e)
}, },
onShadowChange(e){
console.log(e)
},
async upData(){//保存数据
if(this.checkData()){
var value=await this.request("saveHealth",{
data:this.value,
},"加载中",{})
if(/^\d+$/.test(typeof value)){
wx.miniProgram.navigateBack()
}else{
this.$vux.toast.text('保存失败!', 'middle');
}
}
},
checkData(){
this.value.nTemperature=parseFloat(this.value.nTemperature)||0
if(!this.value.sStatus){
this.$vux.toast.text('健康状态必填!', 'middle');
return false;
}else if(this.address.length==0){
this.$vux.toast.text('地址必填!', 'middle');
return false;
}else if(!this.value.nTemperature){
this.$vux.toast.text('体温必填!', 'middle');
return false;
}
this.value.sAddress=this.address.join(",")
if(!this.value.bTouch){
delete this.value.dTouchDate
}
return true;
}
}, },
} }
</script> </script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment