diff --git a/pages/fillIn/fillIn.vue b/pages/fillIn/fillIn.vue
index c61e8f75cffa3d87c5da3b5dbf27e56e0b39e951..b84390082336e30279c7a6208913637a84123df6 100644
--- a/pages/fillIn/fillIn.vue
+++ b/pages/fillIn/fillIn.vue
@@ -2,30 +2,32 @@
+
*{{index+1}}、{{item.label}}
-
+
- {{form[item.value]>-1?item.opts[form[item.value]].label:'请选择'}}
+ {{form[item.value]?form[item.value]:'请选择'}}
@@ -37,9 +39,9 @@
-
+
-
+
*
{{index+1}}、{{item.label}}
@@ -84,7 +86,7 @@
-
{{form[childItem.value]>-1?childItem.opts[form[childItem.value]].label:'请选择'}}
@@ -98,11 +100,11 @@
-
-
+
+
@@ -112,7 +114,7 @@
-
+
知情同意书
@@ -160,7 +162,7 @@
},
data() {
return {
- modalName: '',
+ modalName: false,
id: '',
radio: [],
shanghaiList: [{
@@ -452,7 +454,7 @@
list: [{
label: '单位名称',
required: true,
- value: 'orgId',
+ value: 'orgName',
titleClass: 'title',
type: 'picker',
opts: []
@@ -489,7 +491,7 @@
placeholder: '请输入联系方式',
type: 'input',
},
- {
+ {
label: '国籍',
required: true,
value: 'nationality',
@@ -1332,12 +1334,16 @@
titleClass: 'title',
type: 'radio',
opts: [{
- value: 'a',
- label: '是'
- }, {
- value: 'b',
- label: '否'
- }],
+ value: '0',
+ label: '否'
+ },
+ {
+ value: '1',
+ label: '是'
+ },
+ ],
+ show: [11],
+ showValue: ['1']
},
{
label: '计划复工日期',
@@ -1345,21 +1351,26 @@
required: true,
value: 'planReturnDate',
titleClass: 'title',
- type: 'date'
+ type: 'date',
+ num: 11
},
{
label: '是否离沪',
required: true,
value: 'left',
titleClass: 'title',
- type: 'picker',
+ type: 'radio',
opts: [{
- value: 'a',
- label: '是'
- }, {
- value: 'b',
- label: '否'
- }]
+ value: '0',
+ label: '否'
+ },
+ {
+ value: '1',
+ label: '是'
+ }
+ ],
+ show: [13, 14, 15, 16, 17, 18, 19, 20, 21],
+ showValue: ['1']
},
{
label: '离沪原因',
@@ -1379,7 +1390,9 @@
}, {
value: 'b',
label: '其他'
- }]
+ }],
+ num: 13,
+ hidden: true,
},
{
label: '离沪出发日期',
@@ -1387,26 +1400,32 @@
value: 'leftDate',
titleClass: 'title',
type: 'date',
+ num: 14,
+ hidden: true,
},
{
label: '离沪方式',
required: true,
value: 'leftVehicle',
titleClass: 'title',
- type: 'date',
+ type: 'radio',
opts: [{
- value: 'a',
+ value: '火车',
label: '火车 '
}, {
value: '飞机',
- label: '否'
+ label: '飞机'
}, {
value: '客车',
- label: '否'
+ label: '客车'
}, {
value: '自驾',
- label: '否'
- }]
+ label: '自驾'
+ }],
+ num: 15,
+ show: ['16'],
+ showValue: ['火车', '飞机'],
+ hidden: true,
},
{
label: '离沪车次/航班',
@@ -1415,6 +1434,8 @@
titleClass: 'title',
placeholder: '请输入地址',
type: 'input',
+ num: 16,
+ hidden: true,
},
{
label: '离沪到达日期',
@@ -1422,13 +1443,8 @@
value: 'leftReachDate',
titleClass: 'title',
type: 'date',
- opts: [{
- value: 'a',
- label: '是'
- }, {
- value: 'b',
- label: '否'
- }]
+ num: 17,
+ hidden: true,
},
{
label: '离沪目的地',
@@ -1437,6 +1453,8 @@
titleClass: 'title',
placeholder: '请输入地址',
type: 'input',
+ num: 18,
+ hidden: true,
},
{
label: '离沪具体地址',
@@ -1445,6 +1463,8 @@
titleClass: 'title',
placeholder: '请输入地址',
type: 'input',
+ num: 19,
+ hidden: true,
},
{
label: '离沪同行者姓名(没有填无)',
@@ -1453,6 +1473,8 @@
titleClass: 'title',
placeholder: '请输入',
type: 'input',
+ num: 20,
+ hidden: true,
},
{
label: '离沪同行者联系方式(没有填无)',
@@ -1461,19 +1483,23 @@
titleClass: 'title',
placeholder: '请输入',
type: 'input',
+ num: 21,
+ hidden: true,
},
{
label: '是否返沪',
required: true,
value: 'backed',
titleClass: 'title',
- type: 'picker',
+ type: 'radio',
+ show: [23, 24, 25, 26, 27, 28, 29],
+ showValue: ['1'],
opts: [{
- value: 'a',
- label: '是'
- }, {
- value: 'b',
+ value: '0',
label: '否'
+ }, {
+ value: '1',
+ label: '是'
}]
},
{
@@ -1483,6 +1509,8 @@
titleClass: 'title',
placeholder: '请输入',
type: 'input',
+ num: 23,
+ hidden: true,
},
{
label: '返沪出发日期',
@@ -1490,26 +1518,32 @@
value: 'backDate',
titleClass: 'title',
type: 'date',
+ num: 24,
+ hidden: true,
},
{
label: '返沪方式',
required: true,
value: 'backVehicle',
titleClass: 'title',
- type: 'picker',
+ type: 'radio',
opts: [{
- value: 'a',
+ value: '火车',
label: '火车 '
}, {
value: '飞机',
- label: '否'
+ label: '飞机'
}, {
value: '客车',
- label: '否'
+ label: '客车'
}, {
value: '自驾',
- label: '否'
- }]
+ label: '自驾'
+ }],
+ show: ['26'],
+ showValue: ['火车', '飞机'],
+ num: 25,
+ hidden: true,
},
{
label: '返沪车次/航班',
@@ -1518,6 +1552,8 @@
titleClass: 'title',
placeholder: '请输入地址',
type: 'input',
+ num: 26,
+ hidden: true,
},
{
label: '返沪到达日期',
@@ -1525,6 +1561,8 @@
value: 'backReachedDate',
titleClass: 'title',
type: 'date',
+ num: 27,
+ hidden: true,
},
{
label: '返沪同行者姓名(没有填无)',
@@ -1533,6 +1571,8 @@
titleClass: 'title',
placeholder: '请输入',
type: 'input',
+ num: 28,
+ hidden: true,
},
{
label: '返沪同行者联系方式(没有填无)',
@@ -1541,113 +1581,262 @@
titleClass: 'title',
placeholder: '请输入',
type: 'input',
+ num: 29,
+ hidden: true,
},
{
label: '当前状况',
required: true,
value: 'currentStatus',
titleClass: 'title',
- type: 'picker',
+ type: 'pickerMore',
opts: [{
- value: 'a',
+ value: '已经确诊',
label: '已经确诊'
}, {
- value: 'b',
+ value: '疑似诊断',
label: '疑似诊断'
}, {
- value: 'b',
+ value: '亲密接触者',
label: '亲密接触者'
}, {
- value: 'b',
- label: '正在接受集中医学观察'
- }, {
- value: 'b',
- label: '居家观察'
+ value: '居家观察/正在接受集中医学观察',
+ label: '居家观察/正在接受集中医学观察'
}, {
- value: 'b',
+ value: '已解除集中医学观察',
label: '已解除集中医学观察'
}, {
- value: 'b',
+ value: '无上述情况',
label: '无上述情况'
- }]
+ }],
+ showList: [{
+ value: '亲密接触者',
+ show: '32,48'
+ },
+
+ {
+ value: '居家观察/正在接受集中医学观察',
+ show: '49,50',
+ },
+ ]
},
+
{
- label: '症状',
+ label: '停留湖北',
required: true,
- value: 'symptom',
+ value: 'hubeiStopped',
titleClass: 'title',
- type: 'pickerMore',
+ type: 'radio',
+ num: 32,
+ hidden: true,
opts: [{
- value: '发热',
- label: '发热'
- }, {
- value: '咳嗽',
- label: '咳嗽'
- }, {
- value: '流涕',
- label: '流涕'
- }, {
- value: '咽痛',
- label: '咽痛'
- }, {
- value: '咳痰',
- label: '咳痰'
- }, {
- value: '胸痛',
- label: '胸痛'
- }, {
- value: '肌肉酸痛/关节痛',
- label: '肌肉酸痛/关节痛'
- }, {
- value: '气促',
- label: '气促'
- }, {
- value: '腹泻',
- label: '腹泻'
+ value: '0',
+ label: '否'
}, {
- value: '以上均无',
- label: '以上均无'
- }]
+ value: '1',
+ label: '是'
+ }],
+ show: [33, 34],
+ showValue: ['1']
},
{
- label: '湖北接触史',
+ label: '到达湖北日期',
required: true,
- value: 'relativesGastricCount',
+ value: 'hubeiStopStartDate',
+ titleClass: 'title',
+ type: 'date',
+ num: 33,
+ hidden: true
+ },
+ {
+ label: '离开湖北日期',
+ required: true,
+ value: 'hubeiStopEndDate',
+ titleClass: 'title',
+ type: 'date',
+ num: 34,
+ hidden: true
+ },
+
+ {
+ label: '途径湖北',
+ required: true,
+ value: 'hubeiPassed',
titleClass: 'title',
type: 'radio',
opts: [{
- value: '已经确诊',
- label: '已经确诊'
+ value: '0',
+ label: '否'
}, {
- value: '疑似诊断',
- label: '疑似诊断'
+ value: '1',
+ label: '是'
+ }],
+ show: [36, 37],
+ num: 35,
+ hidden: true,
+ showValue: ['1']
+ },
+ {
+ label: '途径湖北到达日期',
+ required: true,
+ value: 'hubeiPassStartDate',
+ titleClass: 'title',
+ type: 'date',
+ num: 36,
+ hidden: true
+ },
+ {
+ label: '途径湖北离开日期',
+ required: true,
+ value: 'hubeiPassEndDate',
+ titleClass: 'title',
+ type: 'date',
+ num: 37,
+ hidden: true
+ },
+ {
+ label: '接触湖北人员',
+ required: true,
+ value: 'hubeiContacted',
+ titleClass: 'title',
+ type: 'radio',
+ opts: [{
+ value: '0',
+ label: '否'
}, {
- value: '亲密接触者',
- label: '亲密接触者'
+ value: '1',
+ label: '是'
+ }],
+ show: [39],
+ num: 38,
+ hidden: true,
+ showValue: ['1']
+ },
+ {
+ label: '接触湖北人员接触时间',
+ required: true,
+ value: 'hubeiContactDate',
+ titleClass: 'title',
+ type: 'date',
+ num: 39,
+ hidden: true
+ },
+ {
+ label: '家属停留或途径湖北',
+ required: true,
+ value: 'hubeiFamilyStopped',
+ titleClass: 'title',
+ type: 'radio',
+ opts: [{
+ value: '0',
+ label: '否'
}, {
- value: '正在接受集中医学观察',
- label: '正在接受集中医学观察'
+ value: '1',
+ label: '是'
+ }],
+ show: [41, 42],
+ num: 40,
+ hidden: true,
+ showValue: ['1']
+ },
+ {
+ label: '家属停留或途径湖北到达日期',
+ required: true,
+ value: 'hubeiFamilyStopStartDate',
+ titleClass: 'title',
+ type: 'date',
+ num: 41,
+ hidden: true
+ },
+ {
+ label: '家属停留或途径湖北离开日期',
+ required: true,
+ value: 'hubeiFamilyStoppEndDate',
+ titleClass: 'title',
+ type: 'date',
+ num: 42,
+ hidden: true
+ },
+ {
+ label: '家属接触湖北人员',
+ required: true,
+ value: 'hubeiFamilyContacted',
+ titleClass: 'title',
+ type: 'radio',
+ opts: [{
+ value: '0',
+ label: '否'
}, {
- value: '居家观察',
- label: '居家观察'
+ value: '1',
+ label: '是'
+ }],
+ show: [44],
+ num: 43,
+ hidden: true,
+ showValue: ['1']
+ },
+ {
+ label: '家属接触湖北人员接触时间',
+ required: true,
+ value: 'hubeiFamilyContactDate',
+ titleClass: 'title',
+ type: 'date',
+ num: 44,
+ hidden: true
+ },
+ {
+ label: '接触过已确诊或疑似患者',
+ required: true,
+ value: 'patientContact',
+ titleClass: 'title',
+ type: 'radio',
+ opts: [{
+ value: '0',
+ label: '否'
}, {
- value: '已解除集中医学观察',
- label: '已解除集中医学观察'
- }]
+ value: '1',
+ label: '是'
+ }],
+ show: [46],
+ num: 45,
+ hidden: true,
+ showValue: ['1']
},
{
- label: '患者接触史',
+ label: '接触患者时间',
required: true,
- value: 'relativesGastricCount',
+ value: 'patientContactDate',
+ titleClass: 'title',
+ type: 'date',
+ num: 46,
+ hidden: true
+ },
+ {
+ label: '家属接触过已确诊或疑似患者',
+ required: true,
+ value: 'familyPatientContact',
titleClass: 'title',
type: 'radio',
opts: [{
- value: '接触过已确诊或疑似患者',
- label: '接触过已确诊或疑似患者'
+ value: '0',
+ label: '否'
}, {
- value: '家属接触过已确诊或疑似患者',
- label: '家属接触过已确诊或疑似患者'
- }]
+ value: '1',
+ label: '是'
+ }],
+ show: [48],
+ num: 47,
+ hidden: true,
+ showValue: ['1']
+ },
+ {
+ label: '家属接触患者时间',
+ required: true,
+ value: 'familyPatientContactDate',
+ titleClass: 'title',
+ type: 'date',
+ num: 48,
+ hidden: true
},
{
label: '隔离地址',
@@ -1656,6 +1845,8 @@
titleClass: 'title',
placeholder: '请输入',
type: 'input',
+ num: 49,
+ hidden: true
},
{
label: '隔离开始日期',
@@ -1663,18 +1854,59 @@
value: 'quarantineDate',
titleClass: 'title',
type: 'date',
+ num: 50,
+ hidden: true
+ },
+ {
+ label: '症状',
+ required: true,
+ value: 'symptom',
+ titleClass: 'title',
+ type: 'pickerMore',
+ opts: [{
+ value: '发热',
+ label: '发热'
+ }, {
+ value: '咳嗽',
+ label: '咳嗽'
+ }, {
+ value: '流涕',
+ label: '流涕'
+ }, {
+ value: '咽痛',
+ label: '咽痛'
+ }, {
+ value: '咳痰',
+ label: '咳痰'
+ }, {
+ value: '胸痛',
+ label: '胸痛'
+ }, {
+ value: '肌肉酸痛/关节痛',
+ label: '肌肉酸痛/关节痛'
+ }, {
+ value: '气促',
+ label: '气促'
+ }, {
+ value: '腹泻',
+ label: '腹泻'
+ }, {
+ value: '以上均无',
+ label: '以上均无'
+ }]
},
],
form: {
- agree: '',
- orgId: -1,
+ agree: 0,
+ orgId: '',
+ orgName: '',
department: '',
position: '',
name: '',
phone: '',
- nationality: -1,
+ nationality: '',
idCard: '',
- returnToWork: -1,
+ returnToWork: '',
householdAddress: '',
residenceAddress: '',
planReturnDate: ''
@@ -1688,6 +1920,15 @@
methods: {
+ openModal() {
+ if(!this.form.agree) {
+ this.form.agree = '1'
+ this.modalName = true
+ }else {
+ this.form.agree = 0
+ }
+
+ },
getOrg() {
const data = {
params: {
@@ -1716,27 +1957,86 @@
},
// 更新复选框绑定的表单内容
- checkboxChange(index, checkList, obj, prop) {
- for (var i = 0, lenI = checkList.length; i < lenI; ++i) {
+ checkboxChange(index, obj, item) {
+ const checkList = item.opts
+ const prop = item.value
+ for (let i = 0, lenI = checkList.length; i < lenI; ++i) {
if (index == i) {
this.$set(checkList[i], 'checked', !checkList[i].checked)
}
}
- // 处理以上均无情况
- if (obj.label == '以上均无') {
+ // 处理以上均无情况
+ const nullList = ['无上述情况', '以上均无']
+ if (nullList.includes(obj.label)) {
for (var i = 0, lenI = checkList.length; i < lenI; ++i) {
this.$set(checkList[i], 'checked', false)
}
this.$set(checkList[checkList.length - 1], 'checked', true)
+ this.form[prop] = obj.label
} else {
this.$set(checkList[checkList.length - 1], 'checked', false)
+ const values = []
+ for (var i = 0, lenI = checkList.length; i < lenI; ++i) {
+ if(checkList[i].checked) {
+ values.push(checkList[i].label)
+ }
+ }
+ this.form[prop] = values.join(',')
}
+
},
radioChange(val, prop) {
this.$set(this.form, prop, val)
this.isShowChild()
},
+ // 隐藏/显示
+ showChange(evt, item) {
+ const prop = item.value
+ const type = item.type
+ if (type === 'radio') {
+ const val = evt.target.value
+ this.$set(this.form, prop, val)
+ for (let i = 0; i < this.list.length; i++) {
+ const current = this.list[i]
+ if (current.value == prop && current.show) {
+ current.show.forEach(child => {
+ this.list.forEach(row => {
+ if (child == row.num) {
+ this.$set(row, 'hidden', !current.showValue.includes(val))
+ }
+ })
+ })
+ }
+ }
+ }
+ // 复选框展示和隐藏
+ if (type === 'pickerMore') {
+ console.log(evt)
+ const nullList = ['无上述情况','以上均无']
+ const checkList = item.opts
+ let val = evt.detail.value;
+ const showList = item.showList
+ if (showList && showList.length > 0) {
+ showList.forEach(item => {
+ const start = +item.show.split(',')[0]
+ const end = +item.show.split(',')[1]
+ for (let i = start, lenI = end; i <= end; i++) {
+ this.list.forEach(row => {
+ if (i == row.num) {
+ this.$set(row, 'hidden', !val.includes(item.value))
+ }
+ })
+ }
+
+ })
+
+ }
+ }
+
+
+
+ },
isShowChild() {
console.log(this.form['returnToWork'])
this.list[10].hidden = this.form['returnToWork'] == 'a'
@@ -1750,47 +2050,65 @@
this.form[props] = event.target.value
},
// 更新下拉框绑定的表单内容
- updatePickerVal(event, props) {
- this.$set(this.form, props, event.detail.value)
+ updatePickerVal(event, item) {
+ console.log(event)
+ const opts = item.opts
+ const prop = item.value
+ const val = event.detail.value
+ if (!opts) {
+ this.$set(this.form, prop, val)
+ return
+ }
+ for (let i = 0; i < opts.length; i++) {
+ if (i == val) {
+ if (prop == 'orgName') {
+ this.$set(this.form, 'orgId', opts[i].value)
+ this.$set(this.form, prop, opts[i].label)
+ } else {
+ this.$set(this.form, prop, opts[i].label)
+ }
+ }
+ }
},
// 提交信息
formSubmit() {
console.log(this.form)
- // let flag = true
- // let msg = ''
- // for (let i = 0; i < this.list.length; i++) {
- // if(this.list[i].required){
- // if(!this.form[this.list[i].value]){
- // flag = false
- // uni.showToast({
- // icon: 'none',
- // title: "第"+(i+1)+"项有必填数据未填写"
- // })
- // break
- // }
- // if(!flag){
- // break
- // }
- // }
- // }
+ let flag = true
+ let msg = ''
+ for (let i = 0; i < this.list.length; i++) {
+ if (this.list[i].required) {
+ const val = this.form[this.list[i].value]
+ if ((!val || val == -1) && !this.list[i].hidden) {
+ flag = false
+ uni.showToast({
+ icon: 'none',
+ title: `第${i+1}项${this.list[i].label }未填写`
+ })
+ break
+ }
+ if (!flag) {
+ break
+ }
+ }
+ }
- // if(!flag){
- // return false
- // }else{
- // this.$http.post(`/ewell-gastric-cancer-data/wechat/report`,obj).then(res => {
- // const d = res.data
- // if(d.code == 1){
+ if (!flag) {
+ return false
+ } else {
+ this.$http.post(`/sict-ncov/record`, this.form).then(res => {
+ const d = res.data
+ if (d.code == 1) {
- // }else{
- // uni.showToast({
- // icon: 'none',
- // title: d.message
- // })
- // }
- // }).catch(err => {
- // console.log(err)
- // })
- // }
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: d.message
+ })
+ }
+ }).catch(err => {
+ console.log(err)
+ })
+ }
}
}
}