Commit a5d770ba authored by godwithdh's avatar godwithdh

health

parent dd76d81f
module.exports = {
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){
* 健康打卡统计
*/
health:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/1225621052093239296`
// health:`http://xuxiaoming.vaiwan.com`
}
return url[name]
}
......
......@@ -59,7 +59,7 @@ module.exports = [
}
},
{
path:"/healthCard/punchClockDetail/:id/:openId",
path:"/healthCard/punchClockDetail/:id/:openId/:address",
name:"punchClockDetail",
component:()=>import("@/view/healthCard/punchClockDetail.vue"),
meta:{
......
import Vue from "vue"
export default new Vue({
})
\ No newline at end of file
......@@ -123,7 +123,7 @@
<script>
import util from "@/libs/util.js"
import config from "./config"
export default {
name: 'punchClock',
data () {
......
......@@ -58,7 +58,7 @@
<div id="punchClockDetail">
<img src="./image/health.jpg" />
<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">
<div><v-radio value="健康" label="健康"/></div>
<div><v-radio value="有发烧、咳嗽等症状" label="有发烧、咳嗽等症状"/></div>
......@@ -66,7 +66,7 @@
</v-radio-group>
</div>
<div class="list">
<div class="tip">2. 目前所在城市</div>
<div class="tip"><span style="color:red;">*</span>2. 目前所在城市</div>
<x-address
@on-hide="logHide"
@on-show="logShow"
......@@ -75,17 +75,22 @@
:list="addressData"
@on-shadow-change="onShadowChange"
placeholder="请选择地址"
:raw-value="true"
value-text-align="left"
:show.sync="showAddress"/>
</div>
<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">
<div><v-radio :value="0" label="否"/></div>
<div><v-radio :value="1" label="是"/></div>
</v-radio-group>
</div>
<div class="list">
<div class="list" v-if="value.bTouch">
<div class="tip">4. 接触日期</div>
<datetime
title=""
......@@ -93,11 +98,10 @@
placeholder="请选择"
value-text-align="left"
:show.sync="isShowDate"
v-model="value.dTouchDate"
/>
v-model="value.dTouchDate"/>
</div>
<div class="list">
<div class="tip">5. 体温</div>
<div class="tip"><span style="color:red;">*</span>5. 体温</div>
<xInput
title=""
placeholder="输入体温"
......@@ -119,7 +123,7 @@
</v-radio-group>
</div>
<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">
<div><v-radio :value="0" label="否"/></div>
<div><v-radio :value="1" label="是"/></div>
......@@ -140,7 +144,7 @@
<script>
import util from "@/libs/util.js"
import { XAddress,ChinaAddressV4Data,Datetime,XInput } from 'vux'
import config from "./config"
export default {
name: 'punchClockDetail',
components:{XAddress,Datetime,XInput},
......@@ -157,30 +161,66 @@ export default {
nTemperature:'', //体温
sAddress:"", //地址
sAddressFull:"", //详细地址
bTouch:"", //是否接触过
dTouchDate:"", //接触日期
bQuarantine:"", //是否自我隔离
bHospital:"", //是否自我就医
bHaveBeen:"", //是否去过疫区
bTouch:0, //是否接触过
dTouchDate:null, //接触日期
bQuarantine:0, //是否自我隔离
bHospital:0, //是否自我就医
bHaveBeen:0, //是否去过疫区
sHaveBeenDetail:"", //出行明细
sRemark:"", //其他情况
tCreateTime:"", //创建日期
sCreateAppid:"", //openID
iStatus:1,
}
}
},
created(){
this.value.iEmploeeId=this.$route.params.id
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")
},
methods:{
logHide(){},
logShow(){},
onShadowChange(){},
upData(){//保存数据
console.log(this.value)
logHide(e){
console.log(e)
},
logShow(e){
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>
\ 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