Commit 8b0700ef authored by sjf1256754123's avatar sjf1256754123

d

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