Commit 6b921bb1 authored by lrw's avatar lrw

Merge branch 'master' of http://139.9.163.126/gitlab/jinfeng/epidemic

# Conflicts:
#	pages/fillIn/fillIn.vue
parents fbfe310d a10f9225
......@@ -3,7 +3,7 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "疫情登记",
"navigationBarTitleText": "",
"app-plus": {
"bounce": "none"
}
......
......@@ -61,6 +61,7 @@
<view class="cu-form-group margin-top padding-rl" v-show="!item.hidden" :key="item.value">
<view :class="item.titleClass"><span style="color:red;display: inline-block; vertical-align:inherit;margin-right:4upx"
:style="{opacity: item.required ? 1 : 0}">*</span>{{item.label}}</view>
<picker mode="date" :value="form[item.value]" start="2015-09-01" end="2020-09-01" @change="updatePickerVal($event,item)">
<view class="picker">
{{form[item.value]?form[item.value]:'请选择'}}
......@@ -98,13 +99,16 @@
</view>
</template>
<view class="cu-form-group margin-top-sm" v-show="!isRead">
<view class="uni-padding-wrap uni-common-mt">
<view class="padding-top padding-bottom">
<checkbox-group @click="openModal">
<label>
<checkbox value="A" :checked="form.agree == 1" class="fl" style="margin-top:4upx" />
<view style="padding-left:60upx;padding-top:6upx">
我已阅读并认可<span style="color:#0081FF" @click.stop="modalName = true">《知情同意书》</span>,承诺如实填报。
</view>
</label>
......@@ -142,6 +146,24 @@
</div> -->
<div class="text-left">
<p class="content">根据中华人民共和国国家卫生健康委员会2020年第1号公告要求以及《国际卫生条例(2005)》、《中华人民共和国传染病防治法》等有关法律规定,并按照国务院常务会议提出的“分类有序复工复产”和上海疫情防控办及市政府《关于进一步落实各项疫情防控措施的通告》的相关要求,为做好新型冠状病毒感染的肺炎疫情防控工作,保障广大人民群众生命健康,现面向使用本系统的所有用户,特告知如下:</p>
</view>
</label>
</checkbox-group>
</view>
</view>
</checkbox-group>
</view>
<view class="cu-modal" :class="modalName?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end text-bold">
<view class="content">知情同意书</view>
<view class="action" @tap="modalName = ''">
<text class="cuIcon-close text-black"></text>
</view>
</view>
<view class="padding-xl green-word">
<div class="text-left">
<p>&nbsp;</p>
<p class="content">本系统将对所有注册使用的用户信息进行记录,必要时将与执法部门进行信息对接,请积极配合并确保所填信息真实、有效。如若有任何瞒报情况被查出,将被有关部门依法追究法律责任并被列为失信人员,敬请配合。</p>
<p>&nbsp;</p>
......@@ -151,6 +173,7 @@
</view>
</view>
</view>
<view class="padding" v-show="!isRead">
<button form-type="submit" class="cu-btn block bg-blue margin-tb-sm lg">提 交</button>
</view>
......@@ -170,6 +193,7 @@
data() {
return {
modalName: false,
isRead:false,
list: [{
label: '单位名称',
......@@ -180,6 +204,7 @@
opts: []
},
{
label: '所在部门(选填)',
value: 'department',
titleClass: 'title',
......@@ -187,6 +212,7 @@
type: 'input',
},
{
label: '职务(选填)',
value: 'position',
titleClass: 'title',
......@@ -206,6 +232,7 @@
required: true,
value: 'phone',
titleClass: 'title',
placeholder: '请输入11位数字手机号',
type: 'input',
validator:validate.isPhone
......@@ -1043,6 +1070,7 @@
required: true,
value: 'householdAddress',
titleClass: 'title',
placeholder: '例:**路**号**小区**号楼**室',
type: 'input',
num: 8,
......@@ -1053,6 +1081,7 @@
required: true,
value: 'residenceAddress',
titleClass: 'title',
placeholder: '例:**路**号**小区**号楼**室',
type: 'input',
},
......@@ -1587,6 +1616,7 @@
hidden: true
},
{
label: '当日症状',
required: true,
value: 'symptom',
......@@ -1652,6 +1682,7 @@
methods: {
openModal() {
if (!this.form.agree) {
this.form.agree = 1
} else {
this.form.agree = 0
......@@ -1755,6 +1786,7 @@
const prop = item.value
const type = item.type
if (type === 'radio') {
const val = evt.value || evt.target.value
this.$set(this.form, prop, val)
for (let i = 0; i < this.list.length; i++) {
......@@ -1773,6 +1805,7 @@
}
// 复选框展示和隐藏
if (type === 'pickerMore') {
let val = evt.value || evt.detail.value;
const showList = item.showList
if (showList && showList.length > 0) {
......@@ -1790,6 +1823,7 @@
}
if (type === 'picker') {
let val = evt.value || item.opts[evt.detail.value].value;
for (let i = 0; i < this.list.length; i++) {
const current = this.list[i]
......
......@@ -2,9 +2,9 @@
<view class="index">
<view class="temp">
<view class="btnList">
<button class="btnStaff" type="primary" @click="staff" v-show="flag">员工填报</button>
<button class="btnSecurity" type="primary" @click="fillInDay" v-show="!flag">每日填报</button>
<button class="btnSecurity" type="primary" @click="security">安保测温</button>
<button class="btnStaff" type="primary" @click="staff">首次填报</button>
<button class="btnSecurity" type="primary" @click="fillInDay">每日签到</button>
<button class="btnSecurity" type="primary" @click="getScancode" v-show="securityFlag">安保测温</button>
<!-- <image class="img" src="../../static/22.jpg" mode="" @click="fillInDay"></image> -->
<image class="img" :src="imgSrc" mode="widthFix" @click="modalName = 'Image'">
<view class="tips">入园请向门卫出示健康码</view>
......@@ -37,15 +37,12 @@
imgSrc:'',
modalName:'',
flag:true,
option:{
userId:''
}
securityFlag:false,
userId:''
};
},
onLoad: function(option) {
const scene = decodeURIComponent(option.scene)
console.log(scene)
this.option = option
this.userId = option.u
let that = this
// #ifdef MP-WEIXIN
wx.login({
......@@ -84,16 +81,36 @@
},
// 安保跳转
security() {
uni.navigateTo({
url: `/pages/security/security`
// security() {
// uni.navigateTo({
// url: `/pages/security/security?userId=${this.userId}`
// })
// },
getScancode(){
var _this = this;
// 允许从相机和相册扫码
wx.scanCode({
success: (res) => {
var result = res.result;
_this.setData({
result: result,
})
}
})
},
fillInDay() {
console.log(232)
uni.navigateTo({
url:`/pages/fillInDay/fillInDay`
})
if(!this.$store.state.user.userInfo.idCard){
uni.showToast({
icon: 'none',
title: '请先上报个人资料!'
})
}else{
uni.navigateTo({
url:`/pages/fillInDay/fillInDay`
})
}
},
// 获取用户信息
getUserInfo(code) {
......@@ -101,8 +118,8 @@
const d = res.data
if (d.code == 1) {
let userInfo = d.object
if(userInfo.idCard){
this.flag=false
if(userInfo.roleId == '1003'){
this.securityFlag=true
}
let obj = Object.assign({}, this.$store.getters.userInfo)
if (obj.avatarUrl) {
......@@ -111,6 +128,9 @@
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)
......
......@@ -34,19 +34,21 @@
};
},
onLoad: function(option) {
console.log(option)
this.form.userId = option.userId
},
onShow() {},
methods: {
// 体温正常
normal() {
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)
uni.showToast({
icon: 'success',
title: d.object
})
}
}).catch(err => {
console.log(err)
......@@ -64,15 +66,13 @@
submit(){
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)
uni.showToast({
icon: 'none',
title: d.object
})
}
}).catch(err => {
console.log(err)
......
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