Commit f735105f authored by songrui's avatar songrui

Merge branch 'chronic-master' of…

Merge branch 'chronic-master' of http://gitlab.yiboshi.com/nightkis1995/frontend-h5 into chronic-master
parents f9f8fd95 22d1a765
......@@ -572,7 +572,7 @@ export default {
residentName: [{ required: true, message: '请填写姓名' }],
genderName: [{ required: true, message: '请选择性别' }],
dataBirth: [{ required: true, message: '请选择出生日期' }],
nationalName: [{ required: true, message: '请选择族' }],
nationalName: [{ required: true, message: '请选择族' }],
currentAge: [{ required: true, message: '请填写年龄' }],
telephone: [{ required: true, message: '请填写本人电话' }],
contactName: [{ required: false, message: '请填写联系人姓名' }],
......
......@@ -3,7 +3,7 @@
<van-form ref='form'>
<div class='title'>随访信息</div>
<van-cell-group inset>
<div v-if="showOne && firstForm.visitSituation == 1">
<div v-if='showOne && firstForm.visitSituation == 1'>
<div class='no-req-label'>随访内容</div>
<van-field
v-model='form.visitContent'
......@@ -14,7 +14,7 @@
type='textarea'
/>
</div>
<div v-if="showOne && firstForm.visitSituation == 1">
<div v-if='showOne && firstForm.visitSituation == 1'>
<div class='no-req-label mt-5'>处置意见</div>
<van-field
v-model='form.idCard'
......@@ -42,13 +42,14 @@
</div>
</div>
<div v-if="showOne && firstForm.visitSituation == 1">
<div v-if='showOne && firstForm.visitSituation == 1'>
<div class='no-req-label mt-5'>上传随访记录</div>
<div class='tips'>
支持上传jpg、png、jpeg文件,大小请在10M以内
</div>
<div class='img-btn mt-2' @click="toUpload('imgId')">
<input type='file' id='imgId' multiple @change='choiceImg' style='display: none' :key='new Date().getTime()'>
<input type='file' id='imgId' multiple @change='choiceImg' style='display: none'
:key='new Date().getTime()'>
<div class='flex items-center justify-center'>
<div>
<doc-icon type='doc-upload' class='doc-up' />
......@@ -65,7 +66,7 @@
<doc-icon type='doc-remove' class='remove' @click='delImg(item.indexF)'></doc-icon>
</div>
<img :src='item.trueDownloadUrl' class='ml-2' style='width: 95px;height: 95px;'
@click='toPreview(index)'>
@click='toPreview(imgList,index)'>
</div>
</div>
</div>
......@@ -90,13 +91,14 @@
</div>
</div>
<div v-if="showOne && firstForm.visitSituation == 1">
<div v-if='showOne && firstForm.visitSituation == 1'>
<div class='no-req-label mt-5'>现场随访照片</div>
<div class='tips'>
支持上传jpg、png、jpeg文件,大小请在10M以内
</div>
<div class='img-btn mt-2' @click="toUpload('imgId2')">
<input type='file' id='imgId2' multiple @change='choiceImg2' style='display: none' :key='new Date().getTime()-10000'>
<input type='file' id='imgId2' multiple @change='choiceImg2' style='display: none'
:key='new Date().getTime()-10000'>
<div class='flex items-center justify-center'>
<div>
<doc-icon type='doc-upload' class='doc-up' />
......@@ -113,7 +115,7 @@
<doc-icon type='doc-remove' class='remove' @click='delImg2(item.indexF)'></doc-icon>
</div>
<img :src='item.trueDownloadUrl' class='ml-2' style='width: 95px;height: 95px;'
@click='toPreview(index)'>
@click='toPreview(imgList2 ,index)'>
</div>
</div>
</div>
......@@ -138,19 +140,30 @@
</div>
</div>
<div v-if="firstForm.visitSituation == 1">
<!-- 图片预览-->
<van-overlay :show='imgShow' @click='imgShow = false'>
<div class='wrapper'>
<van-swipe class='block' :initial-swipe='initSwipe'>
<van-swipe-item v-for='image in showImgList' :key='image'>
<img :src='image' style='width: 100%;height: 100%'/>
</van-swipe-item>
</van-swipe>
</div>
</van-overlay>
<div v-if='firstForm.visitSituation == 1'>
<div class='label-title mt-5'>下次随访日期</div>
<van-field
v-model='form.nextVisitDate'
is-link
disabled
readonly
name='nextVisitDate'
placeholder='下次随访日期'
class='input-back mt-2 form-input'
@click="showDate = true"
:rules='rules.nextVisitDate'
/>
<van-popup v-model:show="showDate" position="bottom">
<van-date-picker @confirm="dataConfirm" @cancel="showDate = false" />
@click='showDate = true' />
<van-popup v-model:show='showDate' position='bottom'>
<van-date-picker @confirm='dataConfirm' @cancel='showDate = false' />
</van-popup>
</div>
</van-cell-group>
......@@ -178,7 +191,7 @@ export default {
default: () => {
return {}
}
},
}
},
data() {
return {
......@@ -191,8 +204,11 @@ export default {
imgInputList1: [],
imgInputList2: [],
showDate: false,
imgShow: false,
showImgList: [],
initSwipe: 0,
rules: {
nextVisitDate: [{required: true,message: '请选择'}]
nextVisitDate: [{ required: true, message: '请选择' }]
}
}
},
......@@ -211,7 +227,7 @@ export default {
computed: {
//复检指导
showOne() {
const {visitWay} = this.firstForm
const { visitWay } = this.firstForm
let res = false
if (visitWay == 5 || visitWay == 6 || visitWay == 7 || visitWay == 8) {
res = true
......@@ -220,7 +236,7 @@ export default {
},
//微信、短信指导
showTwo() {
const {visitWay} = this.firstForm
const { visitWay } = this.firstForm
let res = false
if (visitWay == 9 || visitWay == 11) {
res = true
......@@ -229,7 +245,7 @@ export default {
},
//催检
showThree() {
const {visitWay} = this.firstForm
const { visitWay } = this.firstForm
let res = false
if (visitWay == 10 || visitWay == 12) {
res = true
......@@ -237,7 +253,7 @@ export default {
return res
},
imgListInfo1() {
const {uploadVisitRecordImageList = []} = this.info
const { uploadVisitRecordImageList = [] } = this.info
uploadVisitRecordImageList.forEach((item, index) => {
item['imgFlag'] = ''
item['indexF'] = index + 1
......@@ -251,7 +267,7 @@ export default {
return uploadVisitRecordImageList
},
imgListInfo2() {
const {sceneVisitImageList = []} = this.info
const { sceneVisitImageList = [] } = this.info
sceneVisitImageList.forEach((item, index) => {
item['imgFlag'] = ''
item['indexF'] = index + 1
......@@ -263,7 +279,7 @@ export default {
}
})
return sceneVisitImageList
},
}
},
methods: {
setForm(info = {}) {
......@@ -321,15 +337,15 @@ export default {
let input = document.getElementById('imgId')
let file = input.files
let newFile = Array.from(file)
let maxIndexF = Math.max(...this.imgList.map(item => item.indexF));
let maxIndexF = this.imgList.length ? Math.max(...this.imgList.map(item => item.indexF)) : 0
newFile.forEach((item, index) => {
item['indexF'] = maxIndexF+ index + 1
item['indexF'] = maxIndexF + index + 1
item['trueDownloadUrl'] = window.URL.createObjectURL(item)
item['imgFlag'] = ''
if (item.type == 'application/pdf') {
item['imgFlag'] = 'pdf'
}
if (item.type == 'image/jpeg' || item.type == 'image/png') {
if (item.type == 'image/jpeg' || item.type == 'image/png' || item.type == 'image/gif' || item.type == 'image/webp') {
item['imgFlag'] = 'img'
}
})
......@@ -340,15 +356,15 @@ export default {
let input = document.getElementById('imgId2')
let file = input.files
let newFile = Array.from(file)
let maxIndexF = Math.max(...this.imgList2.map(item => item.indexF));
let maxIndexF = this.imgList2.length ? Math.max(...this.imgList2.map(item => item.indexF)) : 0
newFile.forEach((item, index) => {
item['indexF'] = maxIndexF+ index + 1
item['indexF'] = maxIndexF + index + 1
item['trueDownloadUrl'] = window.URL.createObjectURL(item)
item['imgFlag'] = ''
if (item.type == 'application/pdf') {
item['imgFlag'] = 'pdf'
}
if (item.type == 'image/jpeg' || item.type == 'image/png') {
if (item.type == 'image/jpeg' || item.type == 'image/png' || item.type == 'image/gif' || item.type == 'image/webp') {
item['imgFlag'] = 'img'
}
})
......@@ -357,17 +373,15 @@ export default {
this.imgInputList2 = this.imgInputList2.concat(newFile)
},
//图片预览
toPreview(index) {
// let list = []
// this.imgList.forEach(item => {
// list.push(item.trueDownloadUrl)
// })
// showImagePreview({
// images: list,
// className: 'custom-image-preview',
// startPosition: index,
// loop: false
// })
toPreview(list = [], index) {
let res = []
this.showImgList = []
list.forEach(item => {
res.push(item.trueDownloadUrl)
})
this.showImgList = res
this.initSwipe = index
this.imgShow = true
},
//pdf预览
toPdf(item) {
......@@ -506,7 +520,16 @@ export default {
top: -9px;
z-index: 1;
}
.wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
.block {
width: 100%;
height: 300px;
}
}
:deep(.van-cell-group--inset) {
overflow: visible;
......@@ -537,9 +560,10 @@ export default {
}
.van-swipe__track {
width: 100%!important;
width: 100% !important;
}
.van-swipe-item {
width: 100%!important;
width: 100% !important;
}
</style>
\ No newline at end of file
import { createRouter, createWebHashHistory } from 'vue-router'
const routes = [
{
path: '/doctor',
name: 'Home',
redirect: '/doctor/followUp/list'
},
{
path: '/resident',
name: 'resident',
......@@ -65,7 +70,7 @@ const routes = [
path: 'visit',
name: 'doctor-resident-visit',
component: () => import(/* webpackChunkName: "page-doctor" */ '@/doctor/resident/Visit.vue')
},
}
]
},
//修改基本信息
......@@ -73,7 +78,7 @@ const routes = [
path: 'resident/base/update',
name: 'doctor-resident-base-update',
component: () => import(/* webpackChunkName: "page-doctor" */ '@/doctor/resident/form/BaseInfo.vue')
},
}
]
}
]
......
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