Commit e8161ade authored by lrw's avatar lrw

添加每日填报

parent 01df31be
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
"path" : "pages/security/security", "path" : "pages/security/security",
"style" : {} "style" : {}
} }
,{
"path" : "pages/fillInDay/fillInDay",
"style" : {}
}
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
......
...@@ -100,8 +100,8 @@ ...@@ -100,8 +100,8 @@
<view class="cu-form-group margin-top-sm"> <view class="cu-form-group margin-top-sm">
<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">
...@@ -1611,12 +1611,12 @@ ...@@ -1611,12 +1611,12 @@
}], }],
showList: [{ showList: [{
value: '亲密接触者', value: '亲密接触者',
show: '32,48' show: [32, 35, 38, 40, 43, 45, 47]
}, },
{ {
value: '居家观察/正在接受集中医学观察', value: '居家观察/正在接受集中医学观察',
show: '49,50', show: [49, 50]
}, },
] ]
}, },
...@@ -1921,13 +1921,13 @@ ...@@ -1921,13 +1921,13 @@
methods: { methods: {
openModal() { openModal() {
if(!this.form.agree) { if (!this.form.agree) {
this.form.agree = '1' this.form.agree = '1'
this.modalName = true this.modalName = true
}else { } else {
this.form.agree = 0 this.form.agree = 0
} }
}, },
getOrg() { getOrg() {
const data = { const data = {
...@@ -1977,7 +1977,7 @@ ...@@ -1977,7 +1977,7 @@
this.$set(checkList[checkList.length - 1], 'checked', false) this.$set(checkList[checkList.length - 1], 'checked', false)
const values = [] const values = []
for (var i = 0, lenI = checkList.length; i < lenI; ++i) { for (var i = 0, lenI = checkList.length; i < lenI; ++i) {
if(checkList[i].checked) { if (checkList[i].checked) {
values.push(checkList[i].label) values.push(checkList[i].label)
} }
} }
...@@ -2012,23 +2012,17 @@ ...@@ -2012,23 +2012,17 @@
// 复选框展示和隐藏 // 复选框展示和隐藏
if (type === 'pickerMore') { if (type === 'pickerMore') {
console.log(evt) console.log(evt)
const nullList = ['无上述情况','以上均无']
const checkList = item.opts
let val = evt.detail.value; let val = evt.detail.value;
const showList = item.showList const showList = item.showList
if (showList && showList.length > 0) { if (showList && showList.length > 0) {
showList.forEach(item => { showList.forEach(item => {
const start = +item.show.split(',')[0] item.show.forEach(child => {
const end = +item.show.split(',')[1]
for (let i = start, lenI = end; i <= end; i++) {
this.list.forEach(row => { this.list.forEach(row => {
if (i == row.num) { if (child == row.num) {
this.$set(row, 'hidden', !val.includes(item.value)) this.$set(row, 'hidden', !val.includes(item.value))
} }
}) })
} })
}) })
} }
...@@ -2078,7 +2072,7 @@ ...@@ -2078,7 +2072,7 @@
for (let i = 0; i < this.list.length; i++) { for (let i = 0; i < this.list.length; i++) {
if (this.list[i].required) { if (this.list[i].required) {
const val = this.form[this.list[i].value] const val = this.form[this.list[i].value]
if ((!val || val == -1) && !this.list[i].hidden) { if (!val&& !this.list[i].hidden && this.list[i].required) {
flag = false flag = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
...@@ -2095,10 +2089,10 @@ ...@@ -2095,10 +2089,10 @@
if (!flag) { if (!flag) {
return false return false
} else { } else {
this.$http.post(`/sict-ncov/record`, this.form).then(res => { this.$http.post(`/sict-ncov/report`, this.form).then(res => {
const d = res.data const d = res.data
if (d.code == 1) { if (d.code == 1) {
uni.navigateBack()
} else { } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
......
This diff is collapsed.
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<view class="btnList"> <view class="btnList">
<button class="btnStaff" type="primary" @click="staff">员工填报</button> <button class="btnStaff" type="primary" @click="staff">员工填报</button>
<button class="btnSecurity" type="primary" @click="security">安保测温</button> <button class="btnSecurity" type="primary" @click="security">安保测温</button>
<button class="btnSecurity" type="primary" @click="fillInDay">每日填报</button>
<image class="img" src="../../static/22.jpg" mode="" ></image> <image class="img" src="../../static/22.jpg" mode="" ></image>
<view class="tips"> <view class="tips">
入园请向门卫出示健康码 入园请向门卫出示健康码
...@@ -50,6 +51,12 @@ ...@@ -50,6 +51,12 @@
url: `/pages/security/security` url: `/pages/security/security`
}) })
}, },
fillInDay() {
console.log(232)
uni.navigateTo({
url:`/pages/fillInDay/fillInDay`
})
},
// 获取用户信息 // 获取用户信息
getUserInfo(code) { getUserInfo(code) {
this.$http.post(`/sict-ncov/user/auth?code=${code}`).then(res => { this.$http.post(`/sict-ncov/user/auth?code=${code}`).then(res => {
...@@ -81,7 +88,7 @@ ...@@ -81,7 +88,7 @@
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/background.jpg');
.btnList{ .btnList{
padding-top: 435upx; padding-top: 355upx;
.btnStaff,.btnSecurity{ .btnStaff,.btnSecurity{
background-color: #92d0f1; background-color: #92d0f1;
color: #FFFFFF; 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