Commit fbfe310d authored by lrw's avatar lrw

文案修改

parent 89c51f10
...@@ -61,7 +61,7 @@ ...@@ -61,7 +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="date" 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]:'请选择'}}
</view> </view>
...@@ -98,14 +98,14 @@ ...@@ -98,14 +98,14 @@
</view> </view>
</template> </template>
<view class="cu-form-group margin-top-sm"> <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>,承诺如实填报。
</view> </view>
</label> </label>
</checkbox-group> </checkbox-group>
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="padding"> <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>
</form> </form>
...@@ -170,294 +170,7 @@ ...@@ -170,294 +170,7 @@
data() { data() {
return { return {
modalName: false, modalName: false,
id: '', isRead:false,
radio: [],
shanghaiList: [{
label: '是否离沪',
required: true,
value: 'left',
titleClass: 'title',
type: 'picker',
opts: [{
value: 'a',
label: ''
}, {
value: 'b',
label: ''
}]
},
{
label: '离沪原因',
required: true,
value: 'leftReason',
titleClass: 'title',
type: 'picker',
opts: [{
value: 'a',
label: '探亲'
}, {
value: 'b',
label: '出差'
}, {
value: 'b',
label: '旅游'
}, {
value: 'b',
label: '其他'
}]
},
{
label: '离沪出发日期',
required: true,
value: 'leftDate',
titleClass: 'title',
type: 'date',
},
{
label: '离沪方式',
required: true,
value: 'leftVehicle',
titleClass: 'title',
type: 'date',
opts: [{
value: 'a',
label: '火车 '
}, {
value: '飞机',
label: ''
}, {
value: '客车',
label: ''
}, {
value: '自驾',
label: ''
}]
},
{
label: '离沪车次/航班',
required: true,
value: 'leftVehicleNum',
titleClass: 'title',
placeholder: '请输入地址',
type: 'input',
},
{
label: '离沪到达日期',
required: true,
value: 'leftReachDate',
titleClass: 'title',
type: 'date',
},
{
label: '离沪目的地',
required: true,
value: 'leftTarget',
titleClass: 'title',
placeholder: '请输入地址',
type: 'input',
},
{
label: '离沪具体地址',
required: true,
value: 'leftAddress',
titleClass: 'title',
placeholder: '请输入地址',
type: 'input',
},
{
label: '离沪同行者姓名(没有填无)',
required: true,
value: 'leftDependentNames',
titleClass: 'title',
placeholder: '请输入',
type: 'input',
},
{
label: '离沪同行者联系方式(没有填无)',
required: true,
value: 'leftDependentPhones',
titleClass: 'title',
placeholder: '请输入',
type: 'input',
},
{
label: '是否返沪',
required: true,
value: 'backed',
titleClass: 'title',
type: 'picker',
opts: [{
value: 'a',
label: ''
}, {
value: 'b',
label: ''
}]
},
{
label: '返沪出发地',
required: true,
value: 'backFrom',
titleClass: 'title',
placeholder: '请输入',
type: 'input',
},
{
label: '返沪出发日期',
required: true,
value: 'backDate',
titleClass: 'title',
type: 'date',
},
{
label: '返沪方式',
required: true,
value: 'backVehicle',
titleClass: 'title',
type: 'picker',
opts: [{
value: 'a',
label: '火车 '
}, {
value: '飞机',
label: ''
}, {
value: '客车',
label: ''
}, {
value: '自驾',
label: ''
}]
},
{
label: '返沪车次/航班',
required: true,
value: 'backVehicleNum',
titleClass: 'title',
placeholder: '请输入地址',
type: 'input',
},
{
label: '返沪到达日期',
required: true,
value: 'backReachedDate',
titleClass: 'title',
type: 'date',
},
{
label: '返沪同行者姓名(没有填无)',
required: true,
value: 'backDependentNames',
titleClass: 'title',
placeholder: '请输入',
type: 'input',
},
{
label: '返沪同行者联系方式(没有填无)',
required: true,
value: 'backDependentPhones',
titleClass: 'title',
placeholder: '请输入',
type: 'input',
},
{
label: '当前状况',
required: true,
value: 'currentStatus',
titleClass: 'title',
type: 'picker',
opts: [{
value: 'a',
label: '已经确诊'
}, {
value: 'b',
label: '疑似诊断'
}, {
value: 'b',
label: '亲密接触者'
}, {
value: 'b',
label: '正在接受集中医学观察'
}, {
value: 'b',
label: '居家观察'
}, {
value: 'b',
label: '已解除集中医学观察'
}, {
value: 'b',
label: '无上述情况'
}]
},
{
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: '无上述症状'
}]
},
{
label: '湖北接触史',
required: true,
value: 'relativesGastricCount',
titleClass: 'title',
type: 'picker',
opts: [{
value: 'a',
label: '已经确诊'
}, {
value: 'b',
label: '疑似诊断'
}, {
value: 'b',
label: '亲密接触者'
}, {
value: 'b',
label: '正在接受集中医学观察'
}, {
value: 'b',
label: '居家观察'
}, {
value: 'b',
label: '已解除集中医学观察'
}, {
value: 'b',
label: '无上述情况'
}]
}
],
list: [{ list: [{
label: '单位名称', label: '单位名称',
required: true, required: true,
...@@ -467,14 +180,14 @@ ...@@ -467,14 +180,14 @@
opts: [] opts: []
}, },
{ {
label: '所在部门', label: '所在部门(选填)',
value: 'department', value: 'department',
titleClass: 'title', titleClass: 'title',
placeholder: '请输入所在部门', placeholder: '请输入所在部门',
type: 'input', type: 'input',
}, },
{ {
label: '职务', label: '职务(选填)',
value: 'position', value: 'position',
titleClass: 'title', titleClass: 'title',
placeholder: '请输入职务', placeholder: '请输入职务',
...@@ -493,7 +206,7 @@ ...@@ -493,7 +206,7 @@
required: true, required: true,
value: 'phone', value: 'phone',
titleClass: 'title', titleClass: 'title',
placeholder: '请输入联系方式', placeholder: '请输入11位数字手机号',
type: 'input', type: 'input',
validator:validate.isPhone validator:validate.isPhone
}, },
...@@ -1330,7 +1043,7 @@ ...@@ -1330,7 +1043,7 @@
required: true, required: true,
value: 'householdAddress', value: 'householdAddress',
titleClass: 'title', titleClass: 'title',
placeholder: '请输入户籍地址', placeholder: '例:**路**号**小区**号楼**室',
type: 'input', type: 'input',
num: 8, num: 8,
hidden: true, hidden: true,
...@@ -1340,7 +1053,7 @@ ...@@ -1340,7 +1053,7 @@
required: true, required: true,
value: 'residenceAddress', value: 'residenceAddress',
titleClass: 'title', titleClass: 'title',
placeholder: '请输入地址', placeholder: '例:**路**号**小区**号楼**室',
type: 'input', type: 'input',
}, },
{ {
...@@ -1874,7 +1587,7 @@ ...@@ -1874,7 +1587,7 @@
hidden: true hidden: true
}, },
{ {
label: '症状', label: '当日症状',
required: true, required: true,
value: 'symptom', value: 'symptom',
titleClass: 'title', titleClass: 'title',
...@@ -1932,14 +1645,14 @@ ...@@ -1932,14 +1645,14 @@
onLoad(option) { onLoad(option) {
this.getOrg() this.getOrg()
this.getInfo()
}, },
methods: { methods: {
openModal() { openModal() {
if (!this.form.agree) { if (!this.form.agree) {
this.form.agree = '1' this.form.agree = 1
this.modalName = true
} else { } else {
this.form.agree = 0 this.form.agree = 0
} }
...@@ -1969,8 +1682,40 @@ ...@@ -1969,8 +1682,40 @@
}) })
}, },
// 获取信息 // 获取信息
getInfo(id) { getInfo() {
this.$http.get(`/sict-ncov/report`, this.form).then(res => {
const d = res.data
if(d.code == 1) {
this.isRead = true
const data = d.object.reportContent || {}
this.form = data
// 赋值
for (let k in data) {
const val = data[k]
if (val) {
const item = this.list.find(child => child.value == k)
if (item) {
this.showChange({
value: val
}, item)
if (item.type == "pickerMore") {
console.log(1,22)
item.opts.forEach(opt => {
val.split(',').forEach(v => {
if (v === opt.label) {
console.log(opt)
this.$set(opt, 'checked', true)
}
})
})
}
}
}
}
}
})
}, },
// 更新复选框绑定的表单内容 // 更新复选框绑定的表单内容
checkboxChange(index, obj, item) { checkboxChange(index, obj, item) {
...@@ -2010,7 +1755,7 @@ ...@@ -2010,7 +1755,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.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++) {
const current = this.list[i] const current = this.list[i]
...@@ -2028,7 +1773,7 @@ ...@@ -2028,7 +1773,7 @@
} }
// 复选框展示和隐藏 // 复选框展示和隐藏
if (type === 'pickerMore') { if (type === 'pickerMore') {
let val = 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) {
showList.forEach(item => { showList.forEach(item => {
...@@ -2045,7 +1790,7 @@ ...@@ -2045,7 +1790,7 @@
} }
if (type === 'picker') { if (type === 'picker') {
let val = 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]
if (current.value == prop && current.show) { if (current.value == prop && current.show) {
......
<template> <template>
<view class="questionnaire"> <view class="questionnaire">
<form @submit="formSubmit"> <form @submit="formSubmit">
...@@ -7,7 +6,7 @@ ...@@ -7,7 +6,7 @@
<view class="margin-top padding sict-label" :key="item.value" v-show="!item.hidden"> <view class="margin-top padding sict-label" :key="item.value" v-show="!item.hidden">
<view v-show="!item.hidden"> <view v-show="!item.hidden">
<span style="color:red;display: inline-block; vertical-align:inherit;margin-right:4upx" :style="{opacity: item.required ? 1 : 0}">*</span> <span style="color:red;display: inline-block; vertical-align:inherit;margin-right:4upx" :style="{opacity: item.required ? 1 : 0}">*</span>
{{item.label}} {{item.label}}
</view> </view>
<view class="text-right sict-value" v-show="!item.hidden"> <view class="text-right sict-value" v-show="!item.hidden">
<radio-group @change="showChange($event,item)"> <radio-group @change="showChange($event,item)">
...@@ -395,7 +394,7 @@ ...@@ -395,7 +394,7 @@
hidden: true hidden: true
}, },
{ {
label: '症状', label: '当日症状',
required: true, required: true,
value: 'symptom', value: 'symptom',
titleClass: 'title', titleClass: 'title',
...@@ -432,7 +431,7 @@ ...@@ -432,7 +431,7 @@
label: '以上均无' label: '以上均无'
}] }]
}, },
{ {
label: '是否离沪', label: '是否离沪',
required: true, required: true,
...@@ -668,7 +667,38 @@ ...@@ -668,7 +667,38 @@
} }
}, },
onLoad(option) {}, onLoad(option) {
// 获取信息
this.$http.post(`/sict-ncov/report`, this.form).then(res => {
console.log(res)
})
const data = {
currentStatus: '亲密接触者'
}
for (let k in data) {
const val = data[k]
if (val) {
const item = this.list.find(child => child.value == k)
if (item) {
this.showChange({
value: val
}, item)
if (item.type == "pickerMore") {
console.log(1,22)
item.opts.forEach(opt => {
val.split(',').forEach(v => {
if (v === opt.label) {
console.log(opt)
this.$set(opt, 'checked', true)
}
})
})
}
}
}
}
},
methods: { methods: {
...@@ -710,7 +740,7 @@ ...@@ -710,7 +740,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.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++) {
const current = this.list[i] const current = this.list[i]
...@@ -727,7 +757,7 @@ ...@@ -727,7 +757,7 @@
} }
// 复选框展示和隐藏 // 复选框展示和隐藏
if (type === 'pickerMore') { if (type === 'pickerMore') {
let val = 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) {
showList.forEach(item => { showList.forEach(item => {
...@@ -795,11 +825,11 @@ ...@@ -795,11 +825,11 @@
this.$http.post(`/sict-ncov/report/daily`, this.form).then(res => { this.$http.post(`/sict-ncov/report/daily`, this.form).then(res => {
const d = res.data const d = res.data
if (d.code == 1) { if (d.code == 1) {
uni.navigateBack() uni.navigateBack()
uni.showToast({ uni.showToast({
icon: 'success', icon: 'success',
title:'提交成功' title: '提交成功'
}) })
} else { } else {
uni.showToast({ uni.showToast({
......
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