Commit ba765a3e authored by sjf1256754123's avatar sjf1256754123

demo

parent 79ea1e7e
This diff is collapsed.
......@@ -8,7 +8,7 @@
<view v-show="abnormalFlag">
<view class="cu-form-group">
<view class="title">体温值:</view>
<input class="text-left" placeholder="请输入体温" type="number" :value="temperature" name="input" @input="updateInputVal($event,'temperature')"></input>
<input class="text-left" type="number" :value="form['heat']" name="input" @input="updateInputVal($event,'heat')"></input>
</view>
<view class="btnList" style="padding-top: 55upx;">
<button class="btnSubmit" type="primary" @click="submit">提交</button>
......@@ -24,6 +24,11 @@
name: "home",
data() {
return {
form:{
heat:'',
heatNomal:-1,
userId:''
},
temperature:'',
abnormalFlag:false
};
......@@ -35,10 +40,18 @@
methods: {
// 体温正常
normal() {
uni.showToast({
icon: 'success',
title: "允许通行!"
this.form.heatNomal = 0
this.form.userId = this.$store.state.user.userInfo.id
this.form.heat = ''
this.$http.post(`/sict-ncov/report/daily/heat`,this.form).then(res => {
const d = res.data
if (d.code == 1) {
console.log(d)
}
}).catch(err => {
console.log(err)
})
},
// 体温异常
abnormal() {
......@@ -46,13 +59,24 @@
},
// 更新输入框绑定的表单内容
updateInputVal(event, props) {
this.temperature = event.target.value
this.form[props] = event.target.value
},
// 提交异常体温
submit(){
uni.showToast({
icon: 'none',
title: "提交异常体温!"
this.form.heatNomal = this.form.heat<37.2?0:1
this.form.userId = this.$store.state.user.userInfo.id
console.log(this.form)
// uni.showToast({
// icon: 'none',
// title: "提交异常体温!"
// })
this.$http.post(`/sict-ncov/report/daily/heat`,this.form).then(res => {
const d = res.data
if (d.code == 1) {
console.log(d)
}
}).catch(err => {
console.log(err)
})
}
}
......@@ -67,7 +91,7 @@
width: 100vw;
background-color: #24A1E3;
.btnList{
padding-top: 305upx;
padding-top: 235upx;
.btnNormal,.btnAbnormal,.btnSubmit{
background-color: #92d0f1;
color: #FFFFFF;
......
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