From 283866cc40a7379e00cd48ba77238194ac06ff08 Mon Sep 17 00:00:00 2001
From: fangyuan <527392886@qq.com>
Date: 星期三, 28 十二月 2022 18:05:25 +0800
Subject: [PATCH] 增加校验
---
src/views/common/Audit.vue | 52 +++++++++++++++++++++++++++++-----------------------
1 files changed, 29 insertions(+), 23 deletions(-)
diff --git a/src/views/common/Audit.vue b/src/views/common/Audit.vue
index b5a00f1..3eed36e 100644
--- a/src/views/common/Audit.vue
+++ b/src/views/common/Audit.vue
@@ -88,7 +88,7 @@
<el-col :span="12">
<el-form-item label="澶村儚" prop="pic" required>
<el-upload ref="pic" action="/api/minio/upload" :show-file-list="false" :on-success="handleAvatarSuccess"
- list-type="picture-card" accept="image/*">
+ list-type="picture-card" accept="image/*">
<img v-if="picShow" :src="picShow" style="width: 145px;height: 145px">
<i v-else class="el-icon-plus"></i>
</el-upload>
@@ -220,7 +220,7 @@
<el-col :span="24">
<el-form-item label="鏉愭枡">
<div class="metalL">
- <el-image v-for="(img,index) in reportData" :src="img" style="height: 200px;width: 200px;"></el-image>
+ <el-image v-for="(img, index) in reportData" :src="img" style="height: 200px;width: 200px;"></el-image>
</div>
</el-form-item>
</el-col>
@@ -298,7 +298,7 @@
<el-col :span="24">
<el-form-item label="鏉愭枡">
<div class="metalL">
- <el-image v-for="(img,index) in reportData" :src="img" style="height: 200px;width: 200px;"></el-image>
+ <el-image v-for="(img, index) in reportData" :src="img" style="height: 200px;width: 200px;"></el-image>
</div>
</el-form-item>
</el-col>
@@ -487,30 +487,33 @@
this.picShow = res
})
}
- var addressList = res.reportMaterials.split(",")
- for (let item of addressList) {
- if (item === '' || item === null) {
- // this.reportData.push('./logo.jpg');
- } else {
- getImgUrl(item).then(res => {
- this.reportData.push(res);
- })
+ if (res.reportMaterials) {
+ var addressList = res.reportMaterials.split(",")
+ for (let item of addressList) {
+ if (item === '' || item === null) {
+ // this.reportData.push('./logo.jpg');
+ } else {
+ getImgUrl(item).then(res => {
+ this.reportData.push(res);
+ })
+ }
}
}
+
this.checkVisible = true
})
},
infoAduitClose() {
this.checkVisible = false
this.$refs.infoAduitForm.resetFields()
- this.reportData=[]
- this.picShow=""
+ this.reportData = []
+ this.picShow = ""
},
detailsClose() {
this.infoAduitDialogVisible = false
this.$refs.infoAduitForm.resetFields()
- this.reportData=[]
- this.picShow=""
+ this.reportData = []
+ this.picShow = ""
},
addAduit() {
this.$refs.addAduitForm.validate(async (vaild) => {
@@ -594,16 +597,19 @@
this.picShow = res
})
}
- var addressList = res.reportMaterials.split(",")
- for (let item of addressList) {
- if (item === '' || item === null) {
- // this.reportData.push('./logo.jpg');
- } else {
- getImgUrl(item).then(res => {
- this.reportData.push(res);
- })
+ if (res.reportMaterials) {
+ var addressList = res.reportMaterials.split(",")
+ for (let item of addressList) {
+ if (item === '' || item === null) {
+ // this.reportData.push('./logo.jpg');
+ } else {
+ getImgUrl(item).then(res => {
+ this.reportData.push(res);
+ })
+ }
}
}
+
this.infoAduitDialogVisible = true
})
},
--
Gitblit v1.8.0