Commit 8b0700ef authored by sjf1256754123's avatar sjf1256754123

d

parent f5638e64
...@@ -49,13 +49,13 @@ ...@@ -49,13 +49,13 @@
name: "home", name: "home",
data() { data() {
return { return {
park:'', park: '',
hiddenRegisterFlag:true, hiddenRegisterFlag: true,
imgSrc:'', imgSrc: '',
modalName:'', modalName: '',
flag:true, flag: true,
securityFlag:false, securityFlag: false,
userId:'' userId: ''
}; };
}, },
onLoad: function(option) { onLoad: function(option) {
...@@ -79,19 +79,19 @@ ...@@ -79,19 +79,19 @@
// #endif // #endif
}, },
methods: { methods: {
leader(){ leader() {
uni.navigateTo({ uni.navigateTo({
url: `/pages/leader/leader` url: `/pages/leader/leader`
}) })
}, },
temperature(){ temperature() {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '即将上线!' title: '即将上线!'
}) })
}, },
getImg(){ getImg() {
this.$http.get(`/sict-ncov/user/qrcode`).then(res => { this.$http.get(`/sict-ncov/user/qrcode`).then(res => {
const d = res.data const d = res.data
if (d.code == 1) { if (d.code == 1) {
...@@ -114,37 +114,53 @@ ...@@ -114,37 +114,53 @@
// url: `/pages/security/security?userId=${this.userId}` // url: `/pages/security/security?userId=${this.userId}`
// }) // })
// }, // },
getScancode(){ getScancode() {
if(this.$store.state.user.userInfo.roleId&&this.$store.state.user.userInfo.roleId == '1003'){ if (this.$store.state.user.userInfo.roleId && this.$store.state.user.userInfo.roleId == '1003') {
var _this = this; var _this = this;
// 允许从相机和相册扫码 // 允许从相机和相册扫码
wx.scanCode({ wx.scanCode({
success: (res) => { success: (res) => {
if(res.result.indexOf('userId')>-1&&res.result.indexOf('date')>-1){ if (res.result.indexOf('userId') > -1 && res.result.indexOf('date') > -1) {
_this.userId = res.result;
let arr = res.result.split("&") let arr = res.result.split("&")
if (arr.length == 3) {
_this.userId = arr[0].split("=")[1] _this.userId = arr[0].split("=")[1]
if(getSampleId() == arr[1].split("=")[1]){ if (arr[2].split("=")[1] == _this.$store.state.user.userInfo.userOrg.parkId) {
if(_this.securityFlag&&_this.userId){ if (getSampleId() == arr[1].split("=")[1]) {
if (_this.securityFlag && _this.userId) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/security/security?userId=${_this.userId}` url: `/pages/security/security?userId=${_this.userId}`
}) })
} }
}else{ } else {
uni.showToast({
icon: 'none',
title: '二维码已失效!'
})
}
} else {
uni.showToast({
icon: 'none',
title: '不是该园区二维码!'
})
}
} else {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '二维码已失效!' title: '二维码已失效!'
}) })
} }
}else{ } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '请扫描小程序首页内的二维码!' title: '请扫描小程序首页内的二维码!'
}) })
} }
} }
}) })
}else{
} else {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '暂无权限,仅安保人员有此权限!' title: '暂无权限,仅安保人员有此权限!'
...@@ -152,14 +168,14 @@ ...@@ -152,14 +168,14 @@
} }
}, },
fillInDay() { fillInDay() {
if(!this.$store.state.user.userInfo.idCard){ if (!this.$store.state.user.userInfo.idCard) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '请先上报个人资料!' title: '请先上报个人资料!'
}) })
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url:`/pages/fillInDay/fillInDay` url: `/pages/fillInDay/fillInDay`
}) })
} }
}, },
...@@ -169,12 +185,12 @@ ...@@ -169,12 +185,12 @@
const d = res.data const d = res.data
if (d.code == 1) { if (d.code == 1) {
let userInfo = d.object let userInfo = d.object
this.park = userInfo.userOrg?userInfo.userOrg.park:'' this.park = userInfo.userOrg ? userInfo.userOrg.park : ''
if(userInfo.roleId == '1003'){ if (userInfo.roleId == '1003') {
this.securityFlag=true this.securityFlag = true
} }
if(userInfo.isVip == '1'){ if (userInfo.isVip == '1') {
this.hiddenRegisterFlag = false this.hiddenRegisterFlag = false
} }
...@@ -185,9 +201,6 @@ ...@@ -185,9 +201,6 @@
this.$store.dispatch('user/setInfo', Object.assign(obj, userInfo)) this.$store.dispatch('user/setInfo', Object.assign(obj, userInfo))
this.$store.dispatch('user/setToken', d.result) this.$store.dispatch('user/setToken', d.result)
this.getImg() this.getImg()
if(this.userId){
this.security()
}
} }
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
...@@ -205,25 +218,30 @@ ...@@ -205,25 +218,30 @@
width: 100vw; width: 100vw;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
background-image: url('http://139.9.163.126/gastric/static/background.jpg'); background-image: url('http://139.9.163.126/gastric/static/backgroundSict.jpg');
.btnList{
.btnList {
padding-top: 225upx; padding-top: 225upx;
text-align: center; text-align: center;
.btnSecurity{
.btnSecurity {
background-color: #92d0f1; background-color: #92d0f1;
color: #FFFFFF; color: #FFFFFF;
border-radius: 60upx; border-radius: 60upx;
width: 52%; width: 52%;
text-align: center; text-align: center;
} }
.btnSecurity{
margin-top:45upx; .btnSecurity {
margin-top: 45upx;
} }
.btnStaff{
.btnStaff {
color: #FFFFFF; color: #FFFFFF;
border-radius: 60upx; border-radius: 60upx;
} }
.btnStaff2{
.btnStaff2 {
text-align: left; text-align: left;
display: inline-block; display: inline-block;
width: 140upx; width: 140upx;
...@@ -231,20 +249,24 @@ ...@@ -231,20 +249,24 @@
background-color: #92d0f1; background-color: #92d0f1;
color: #FFFFFF; color: #FFFFFF;
} }
.img{
.img {
width: 350upx; width: 350upx;
height: 350upx; height: 350upx;
} }
.tips,.park{
margin-top:25upx; .tips,
margin-bottom:45upx; .park {
margin-top: 25upx;
margin-bottom: 45upx;
font-weight: bold; font-weight: bold;
font-size: 32upx; font-size: 32upx;
color:#FFFFFF; color: #FFFFFF;
} }
.park{
margin-top:0; .park {
margin-bottom:45upx; margin-top: 0;
margin-bottom: 45upx;
} }
} }
} }
......
...@@ -3,23 +3,21 @@ ...@@ -3,23 +3,21 @@
<view class="tips"> <view class="tips">
提示:请输入您申报复工时同样的信息(名字,手机号,身份证)! 提示:请输入您申报复工时同样的信息(名字,手机号,身份证)!
</view> </view>
<form @submit="formSubmit" @reset="formReset">
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title"><span style="color:red;display: inline-block; vertical-align:inherit;margin-right:4upx">*</span>姓名</view> <view class="title"><span style="color:red;display: inline-block; vertical-align:inherit;margin-right:4upx">*</span>姓名:</view>
<input class="text-right" placeholder="注意简繁体,与复工申请时一致" :value="form.name" name="input" @input="updateInputVal($event,'name')"></input> <input placeholder="注意简繁体,与复工申请时一致" :value="form.name" @input="updateInputVal($event,'name')"></input>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title"><span style="color:red;display: inline-block; vertical-align:inherit;margin-right:4upx">*</span>手机号码</view> <view class="title"><span style="color:red;display: inline-block; vertical-align:inherit;margin-right:4upx">*</span>手机号码</view>
<input class="text-right" placeholder="请输入手机号码" type="number" :value="form.phone" name="input" @input="updateInputVal($event,'phone')"></input> <input placeholder="请输入手机号码" type="number" :value="form.phone" name="input" @input="updateInputVal($event,'phone')"></input>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title"><span style="color:red;display: inline-block; vertical-align:inherit;margin-right:4upx">*</span>身份证/护照号</view> <view class="title"><span style="color:red;display: inline-block; vertical-align:inherit;margin-right:4upx">*</span>身份证/护照号:</view>
<input class="text-right" placeholder="请输入身份证号码/护照号" :value="form.idCard" name="input" @input="updateInputVal($event,'idCard')"></input> <input placeholder="请输入身份证号码/护照号" :value="form.idCard" name="input" @input="updateInputVal($event,'idCard')"></input>
</view> </view>
<view class="padding"> <view class="padding">
<button form-type="submit" class="cu-btn block bg-blue margin-tb-sm lg">提交</button> <button @click="formSubmit" class="cu-btn block bg-blue margin-tb-sm lg">提交</button>
</view> </view>
</form>
</view> </view>
</template> </template>
......
...@@ -3,17 +3,18 @@ ...@@ -3,17 +3,18 @@
<view class="temp"> <view class="temp">
<view v-show="!hiddenFlag"> <view v-show="!hiddenFlag">
<view class="btnList"> <view class="btnList">
<span style="font-weight: bold;color:#fff;font-size: 58upx;">{{obj.userName?obj.userName:''}}</span> <view style="font-weight: bold;color:#fff;font-size: 52upx;">{{obj.orgName?obj.orgName:''}}</view>
<button class="btnNormal" type="primary" @click="normal">体温正常</button> <view style="font-weight: bold;margin-top:35upx;color:#fff;font-size: 52upx;">{{obj.userName?obj.userName:''}}</view>
<button class="btnNormal" type="primary" :disabled="disabled" @click="normal">体温正常</button>
<button class="btnAbnormal" type="primary" @click="abnormal">体温异常</button> <button class="btnAbnormal" type="primary" @click="abnormal">体温异常</button>
</view> </view>
<view v-show="abnormalFlag"> <view v-show="abnormalFlag">
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title">体温值:</view> <view class="title">体温值:</view>
<input class="text-left" type="number" :value="form['heat']" name="input" @input="updateInputVal($event,'heat')"></input> <input class="text-left" type="digit" :value="form['heat']" name="input" @input="updateInputVal($event,'heat')"></input>
</view> </view>
<view class="btnList" style="padding-top:5upx;"> <view class="btnList" style="padding-top:5upx;">
<button class="btnSubmit" type="primary" @click="submit">提交</button> <button class="btnSubmit" type="primary" :disabled="disabled" @click="submit">提交</button>
</view> </view>
</view> </view>
</view> </view>
...@@ -42,6 +43,7 @@ ...@@ -42,6 +43,7 @@
name: "home", name: "home",
data() { data() {
return { return {
disabled:false,
form:{ form:{
heat:'', heat:'',
heatNomal:-1, heatNomal:-1,
...@@ -75,6 +77,7 @@ ...@@ -75,6 +77,7 @@
}, },
// 体温正常 // 体温正常
normal() { normal() {
this.disabled = true
this.form.heatNomal = 0 this.form.heatNomal = 0
this.form.heat = '' this.form.heat = ''
this.$http.post(`/sict-ncov/report/daily/heat`,this.form).then(res => { this.$http.post(`/sict-ncov/report/daily/heat`,this.form).then(res => {
...@@ -82,6 +85,7 @@ ...@@ -82,6 +85,7 @@
if (d.code == 1) { if (d.code == 1) {
this.getData() this.getData()
} }
this.disabled = false
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
...@@ -96,12 +100,14 @@ ...@@ -96,12 +100,14 @@
}, },
// 提交异常体温 // 提交异常体温
submit(){ submit(){
this.disabled = true
this.form.heatNomal = this.form.heat<37.2?0:1 this.form.heatNomal = this.form.heat<37.2?0:1
this.$http.post(`/sict-ncov/report/daily/heat`,this.form).then(res => { this.$http.post(`/sict-ncov/report/daily/heat`,this.form).then(res => {
const d = res.data const d = res.data
if (d.code == 1) { if (d.code == 1) {
this.getData() this.getData()
} }
this.disabled = false
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
...@@ -124,11 +130,11 @@ ...@@ -124,11 +130,11 @@
color: #FFFFFF; color: #FFFFFF;
border-radius: 60upx; border-radius: 60upx;
width: 52%; width: 52%;
margin-top:75upx; margin-top:45upx;
text-align: center; text-align: center;
} }
.btnAbnormal{ .btnAbnormal{
margin-top:95upx; margin-top:65upx;
} }
} }
.cu-form-group{ .cu-form-group{
......
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