Commit 0fe69260 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 ce5e16a9 c6f86a59
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</div> </div>
<div class='img-btn mt-2' @click="toUpload('imgId')"> <div class='img-btn mt-2' @click="toUpload('imgId')">
<input type='file' id='imgId' multiple @change='choiceImg' style='display: none' <input type='file' id='imgId' multiple @change='choiceImg' style='display: none'
:key='new Date().getTime()' accept="image/*"> :key='new Date().getTime()' accept="image/*,.pdf">
<div class='flex items-center justify-center'> <div class='flex items-center justify-center'>
<div> <div>
<doc-icon type='doc-upload' class='doc-up' /> <doc-icon type='doc-upload' class='doc-up' />
...@@ -88,6 +88,8 @@ ...@@ -88,6 +88,8 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if='imgList.length > 6' class='warn mt-2'>最多允许上传6张!</div>
</div> </div>
<div v-if='showOne && firstForm.visitSituation == 1'> <div v-if='showOne && firstForm.visitSituation == 1'>
...@@ -97,7 +99,7 @@ ...@@ -97,7 +99,7 @@
</div> </div>
<div class='img-btn mt-2' @click="toUpload('imgId2')"> <div class='img-btn mt-2' @click="toUpload('imgId2')">
<input type='file' id='imgId2' multiple @change='choiceImg2' style='display: none' <input type='file' id='imgId2' multiple @change='choiceImg2' style='display: none'
:key='new Date().getTime()-10000' accept="image/*"> :key='new Date().getTime()-10000' accept="image/*,.pdf">
<div class='flex items-center justify-center'> <div class='flex items-center justify-center'>
<div> <div>
<doc-icon type='doc-upload' class='doc-up' /> <doc-icon type='doc-upload' class='doc-up' />
...@@ -137,6 +139,7 @@ ...@@ -137,6 +139,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if='imgList2.length > 8' class='warn mt-2'>最多允许上传8张!</div>
</div> </div>
<!-- 图片预览--> <!-- 图片预览-->
...@@ -342,11 +345,11 @@ export default { ...@@ -342,11 +345,11 @@ export default {
return form.visitHealthGuideList return form.visitHealthGuideList
}, },
toUpload(id) { toUpload(id) {
if (id === 'imgId' && this.imgList.length >= 6) { if (id === 'imgId' && this.imgList.length > 6) {
showToast('最多允许上传6张') showToast('最多允许上传6张')
return return
} }
if (id === 'imgId2' && this.imgList2.length >= 8) { if (id === 'imgId2' && this.imgList2.length > 8) {
showToast('最多允许上传8张') showToast('最多允许上传8张')
return return
} }
...@@ -422,6 +425,9 @@ export default { ...@@ -422,6 +425,9 @@ export default {
onSubmit() { onSubmit() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$refs.form.validate().then(() => { this.$refs.form.validate().then(() => {
if (this.imgList.length > 6 || this.imgList2.length > 8) {
return
}
let par = { let par = {
img1: this.imgList || [], img1: this.imgList || [],
img2: this.imgList2 || [], img2: this.imgList2 || [],
...@@ -567,6 +573,10 @@ export default { ...@@ -567,6 +573,10 @@ export default {
border-bottom: 0px; border-bottom: 0px;
} }
.warn {
color: #ee0a24;
text-align: left;
}
</style> </style>
......
...@@ -175,6 +175,7 @@ export default { ...@@ -175,6 +175,7 @@ export default {
...commonBottom, ...commonBottom,
uploadVisitRecord, uploadVisitRecord,
sceneVisitImage, sceneVisitImage,
source: 2
} }
if (this.info.id) { if (this.info.id) {
params.visitRecordId = this.info.visitRecordId params.visitRecordId = this.info.visitRecordId
......
...@@ -66,10 +66,10 @@ ...@@ -66,10 +66,10 @@
<van-divider class='mt-3' /> <van-divider class='mt-3' />
<div class="flex justify-end"> <div class="flex justify-end" >
<van-button round type="primary" class="card-bt" style="margin-right: .12rem" <van-button round type="primary" class="card-bt" style="margin-right: .12rem"
@click.stop="editBtn(item)">修改</van-button> @click.stop="editBtn(item)" v-show='item.allowUpdate ==1'>修改</van-button>
<van-button round type="primary" class="card-bt" @click.stop="delBtn(item)">删除</van-button> <van-button round type="primary" class="card-bt" @click.stop="delBtn(item)" v-show='item.allowUpdate ==1'>删除</van-button>
</div> </div>
<span class="px-3 float-bt"> <span class="px-3 float-bt">
......
...@@ -471,7 +471,8 @@ export default { ...@@ -471,7 +471,8 @@ export default {
residentsRecord: { residentsRecord: {
...this.recordForm.base, ...this.recordForm.base,
idCard: this.checkInfo.idCard idCard: this.checkInfo.idCard
} },
source: 3
} }
// 提交表单 // 提交表单
savefirstScreen(fetchDataHandle(query, { savefirstScreen(fetchDataHandle(query, {
......
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