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