|
|
@@ -2,136 +2,138 @@
|
|
|
<div>
|
|
|
<van-nav-bar title="新建随访" @click-left="$router.back()" left-arrow fixed placeholder safe-area-inset-top />
|
|
|
<div class="main">
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="4">姓名:</van-col>
|
|
|
- <van-col span="8" @click="searchshow=true">
|
|
|
- <van-field v-model="form.name" placeholder="请选择" disabled />
|
|
|
- </van-col>
|
|
|
- <van-popup position="bottom" v-model="searchshow" :style="{ height: '50%' }">
|
|
|
- <van-search placeholder="请输入姓名查询" @input="listChildInfoByName" v-model="positionSearch" />
|
|
|
- <van-picker value-key="name" show-toolbar :columns="childList" @confirm="onConfirmPicker" @cancel="showPicker = false">
|
|
|
- <template #option="item">
|
|
|
- <div>{{item.name}}</div>
|
|
|
- <div>({{item.idCard}})</div>
|
|
|
- </template>
|
|
|
- </van-picker>
|
|
|
- <!-- <van-picker v-show="streetList.length>0" show-toolbar :columns="childList" @confirm="onConfirm" @cancel="streetshowPopup" @change="onChange" value-key="name" /> -->
|
|
|
- </van-popup>
|
|
|
- <van-col span="6">儿童类型:</van-col>
|
|
|
- <van-col span="6">
|
|
|
- <van-field v-model="form.typeDesc" placeholder="请选择" disabled />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="4">年龄:</van-col>
|
|
|
- <van-col span="8" @click="searchshow=true">
|
|
|
- <van-field v-model="form.age" placeholder="请选择" disabled />
|
|
|
- </van-col>
|
|
|
- <van-col span="6">性别:</van-col>
|
|
|
- <van-col span="6">
|
|
|
- <van-field v-model="form.genderDesc" placeholder="请选择" disabled />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="6">教育情况:</van-col>
|
|
|
- <van-col span="18">
|
|
|
- <van-field v-model="form.school" placeholder="教育情况" disabled />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="6">健康情况:</van-col>
|
|
|
- <van-col span="18">
|
|
|
- <van-field v-model="['','健康','患病','残疾'][form.healthStatus]" placeholder="健康情况" disabled />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="6">监护人:</van-col>
|
|
|
- <van-col span="18">
|
|
|
- <van-field v-model="form.guardianName" placeholder="监护人" disabled />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="9">监护人联系方式:</van-col>
|
|
|
- <van-col span="15">
|
|
|
- <van-field v-model="form.guardianOutVO" placeholder="监护人联系方式" disabled />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="6">居住地址:</van-col>
|
|
|
- <van-col span="18">
|
|
|
- <van-field v-model="form.address" placeholder="居住地址" disabled />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="7">帮扶责任人:</van-col>
|
|
|
- <van-col span="17">
|
|
|
- <van-field v-model="form.tutelageName" placeholder="帮扶责任人" disabled />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="6">随访时间:</van-col>
|
|
|
- <van-col span="18">
|
|
|
- <van-field v-model="form.followDate" @click="showPopup" placeholder="请选择" disabled />
|
|
|
- </van-col>
|
|
|
- <!-- <van-col span="18" @click="showPopup">{{form.followDate?form.followDate:'请选择'}}</van-col> -->
|
|
|
- <van-popup v-model="show" position="bottom" :style="{ height: '30%' }">
|
|
|
- <van-datetime-picker @confirm="dateConfirm" @cancel="showPopup" v-model="followDate" type="date" :min-date="minDate" :max-date="maxDate" :columns-order="[ 'year','month', 'day']"
|
|
|
- :formatter="formatter" />
|
|
|
- </van-popup>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="6">选择街道:</van-col>
|
|
|
- <van-col span="18">
|
|
|
- <van-field v-model="form.streetName" @click="streetshowPopup" placeholder="请选择" disabled />
|
|
|
- </van-col>
|
|
|
- <!-- <van-col span="18" @click="streetshowPopup">{{form.streetName?form.streetName:'请选择'}}</van-col> -->
|
|
|
- <van-popup v-model="streetShow" position="bottom" :style="{ height: '30%' }">
|
|
|
- <van-picker show-toolbar :columns="streetList" @confirm="onConfirm" @cancel="streetshowPopup" @change="onChange" value-key="name" />
|
|
|
- </van-popup>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="6">随访地点:</van-col>
|
|
|
- <van-col span="18">
|
|
|
- <van-field v-model="form.place" placeholder="请输入随访地点" />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="6">随访人员:</van-col>
|
|
|
- <van-col span="18">
|
|
|
- <van-field v-model="form.personnel" placeholder="请输入" />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="6">联系方式:</van-col>
|
|
|
- <van-col span="18">
|
|
|
- <van-field v-model="form.phone" type="tel" placeholder="请输入" />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="6">随访记录:</van-col>
|
|
|
- <van-col span="18">
|
|
|
- <van-field class="textarea" v-model="form.remark" rows="1" type="textarea" placeholder="请输入随访记录" />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell">
|
|
|
- <van-col span="6">图片视频:</van-col>
|
|
|
- <van-col span="18">
|
|
|
- <div class="box" ref="boxlist">
|
|
|
- <div class="boxlist">
|
|
|
- <div v-for="(item,index) in form.fileList" :key="index">
|
|
|
- <img v-if="item.type.indexOf('image') !== -1" :src="item.url" alt="">
|
|
|
- <video v-else style="object-fit:cover;" :src="item.url"></video>
|
|
|
+ <van-form @submit="saveFollowUp">
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="4">姓名:</van-col>
|
|
|
+ <van-col span="8" @click="searchshow=true">
|
|
|
+ <van-field v-model="form.name" placeholder="请选择" :rules="[{ required: true}]" disabled />
|
|
|
+ </van-col>
|
|
|
+ <van-popup position="bottom" v-model="searchshow" :style="{ height: '50%' }">
|
|
|
+ <van-search placeholder="请输入姓名查询" @input="listChildInfoByName" v-model="positionSearch" />
|
|
|
+ <van-picker value-key="name" show-toolbar :columns="childList" @confirm="onConfirmPicker" @cancel="showPicker = false">
|
|
|
+ <template #option="item">
|
|
|
+ <div>{{item.name}}</div>
|
|
|
+ <div>({{item.idCard}})</div>
|
|
|
+ </template>
|
|
|
+ </van-picker>
|
|
|
+ <!-- <van-picker v-show="streetList.length>0" show-toolbar :columns="childList" @confirm="onConfirm" @cancel="streetshowPopup" @change="onChange" value-key="name" /> -->
|
|
|
+ </van-popup>
|
|
|
+ <van-col span="6">儿童类型:</van-col>
|
|
|
+ <van-col span="6">
|
|
|
+ <van-field v-model="form.typeDesc" placeholder="请选择" disabled />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="4">年龄:</van-col>
|
|
|
+ <van-col span="8" @click="searchshow=true">
|
|
|
+ <van-field v-model="form.age" placeholder="请选择" disabled />
|
|
|
+ </van-col>
|
|
|
+ <van-col span="6">性别:</van-col>
|
|
|
+ <van-col span="6">
|
|
|
+ <van-field v-model="form.genderDesc" placeholder="请选择" disabled />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">教育情况:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field v-model="form.school" placeholder="教育情况" disabled />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">健康情况:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field v-model="['','健康','患病','残疾'][form.healthStatus]" placeholder="健康情况" disabled />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">监护人:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field v-model="form.guardianName" placeholder="监护人" disabled />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="9">监护人联系方式:</van-col>
|
|
|
+ <van-col span="15">
|
|
|
+ <van-field v-model="form.guardianOutVO" placeholder="监护人联系方式" disabled />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">居住地址:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field v-model="form.address" placeholder="居住地址" disabled />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="7">帮扶责任人:</van-col>
|
|
|
+ <van-col span="17">
|
|
|
+ <van-field v-model="form.tutelageName" placeholder="帮扶责任人" disabled />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">随访时间:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field v-model="form.followDate" @click="showPopup" placeholder="请选择" :rules="[{ required: true}]" disabled />
|
|
|
+ </van-col>
|
|
|
+ <!-- <van-col span="18" @click="showPopup">{{form.followDate?form.followDate:'请选择'}}</van-col> -->
|
|
|
+ <van-popup v-model="show" position="bottom" :style="{ height: '30%' }">
|
|
|
+ <van-datetime-picker @confirm="dateConfirm" @cancel="showPopup" v-model="followDate" type="date" :min-date="minDate" :max-date="maxDate" :columns-order="[ 'year','month', 'day']"
|
|
|
+ :formatter="formatter" />
|
|
|
+ </van-popup>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">选择街道:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field v-model="form.streetName" @click="streetshowPopup" placeholder="请选择" :rules="[{ required: true}]" disabled />
|
|
|
+ </van-col>
|
|
|
+ <!-- <van-col span="18" @click="streetshowPopup">{{form.streetName?form.streetName:'请选择'}}</van-col> -->
|
|
|
+ <van-popup v-model="streetShow" position="bottom" :style="{ height: '30%' }">
|
|
|
+ <van-picker show-toolbar :columns="streetList" @confirm="onConfirm" @cancel="streetshowPopup" @change="onChange" value-key="name" />
|
|
|
+ </van-popup>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">随访地点:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field v-model="form.place" placeholder="请输入随访地点" :rules="[{ required: true}]" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">随访人员:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field v-model="form.personnel" placeholder="请输入" :rules="[{ required: true}]" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">联系方式:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field v-model="form.phone" type="tel" placeholder="请输入手机号" :rules="[{validator,required: true, message:'手机号格式不正确'}]" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">随访记录:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field class="textarea" :rules="[{ required: true}]" v-model="form.remark" rows="1" type="textarea" placeholder="请输入随访记录" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">图片视频:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <div class="box" ref="boxlist">
|
|
|
+ <div class="boxlist">
|
|
|
+ <div v-for="(item,index) in form.fileList" :key="index">
|
|
|
+ <img v-if="item.type.indexOf('image') !== -1" :src="item.url" alt="">
|
|
|
+ <video v-else style="object-fit:cover;" :src="item.url"></video>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <van-uploader v-model="fileList" accept="*" :after-read="afterRead" @delete='deleteUploader'>
|
|
|
+ </van-uploader>
|
|
|
</div>
|
|
|
- <van-uploader v-model="fileList" accept="*" :after-read="afterRead" @delete='deleteUploader'>
|
|
|
- </van-uploader>
|
|
|
- </div>
|
|
|
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- </div>
|
|
|
- <div style="text-align:center;">
|
|
|
- <van-button @click="saveFollowUp">确 定</van-button>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <div style="text-align:center;">
|
|
|
+ <van-button native-type="submit">确 定</van-button>
|
|
|
+ </div>
|
|
|
+ </van-form>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
@@ -170,6 +172,10 @@ export default {
|
|
|
const res = await listChildInfoByName({ name: this.positionSearch })
|
|
|
this.childList = res.data
|
|
|
},
|
|
|
+
|
|
|
+ validator(val) {
|
|
|
+ return /^1(3|4|5|6|7|8|9)\d{9}$/.test(val)
|
|
|
+ },
|
|
|
formatter(type, val) {
|
|
|
if (type === 'year') {
|
|
|
return val + '年'
|
|
|
@@ -225,12 +231,12 @@ export default {
|
|
|
this.form.followDate = this.timeFormat(v)
|
|
|
this.show = false
|
|
|
},
|
|
|
- async saveFollowUp() {
|
|
|
+ async saveFollowUp(values) {
|
|
|
+ console.log('submit', values)
|
|
|
var appendFile = []
|
|
|
this.form.fileList.forEach((item) => {
|
|
|
appendFile.push(item.url)
|
|
|
})
|
|
|
-
|
|
|
this.form.appendFile = appendFile.join(',')
|
|
|
var data = JSON.parse(JSON.stringify(this.form))
|
|
|
data.followDate = data.followDate + ' 00:00:00'
|
|
|
@@ -246,7 +252,6 @@ export default {
|
|
|
},
|
|
|
getPositionList() {},
|
|
|
async afterRead(file) {
|
|
|
- console.log(file.file)
|
|
|
file.status = 'uploading'
|
|
|
file.message = '上传中...'
|
|
|
let formDate = new FormData()
|