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