From 752ad6211b54bbf38bf7dfc5c3a572ae3e15b0d4 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期五, 03 三月 2023 18:06:47 +0800
Subject: [PATCH] 修改群组交流
---
src/views/common/Audit.vue | 79 +++++++++++++++++++++++++--------------
1 files changed, 50 insertions(+), 29 deletions(-)
diff --git a/src/views/common/Audit.vue b/src/views/common/Audit.vue
index 6af7e8a..290c99f 100644
--- a/src/views/common/Audit.vue
+++ b/src/views/common/Audit.vue
@@ -28,7 +28,7 @@
<el-button type="primary" @click="addAduitDialogOpen">娣诲姞</el-button>
</el-form-item>
<el-form-item>
- <el-upload name="multipartFile" class="upload-demo" action="/api/cause/reporterUpload"
+ <el-upload name="multipartFile" class="upload-demo" action="/api/report/reporterUpload"
:show-file-list="false" :before-upload="beforeAvatarUpload" :on-success="reporterRespond" :limit="1">
<el-button type="primary">瀵煎叆</el-button>
</el-upload>
@@ -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>
@@ -165,7 +165,7 @@
<!--瀹℃牳寮圭獥-->
<el-dialog title="瀹℃牳" :visible.sync="checkVisible" width="50%" :before-close="infoAduitClose">
<el-row :gutter="15">
- <el-form ref="infoAduitForm" :model="auditInfo" size="medium" label-width="100px">
+ <el-form ref="infoAduitForm" :rules="rules2" :model="auditInfo" size="medium" label-width="100px">
<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"
@@ -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>
@@ -347,6 +347,7 @@
tmpTime: '',
},
auditInfo: {},
+
picShow: "",
reportData: [],
optionsGroup: [
@@ -433,6 +434,11 @@
trigger: 'change'
}],
},
+ rules2:{
+ causeId: [
+ { required: true, message: '璇烽�夋嫨娲诲姩鍖哄煙', trigger: 'change' }
+ ]
+ }
}
},
created() {
@@ -470,11 +476,19 @@
checkAdd() {
let form = null;
form = this.auditInfo;
- checkPass(form).then(res => {
- this.$message.success('鎻愪氦鎴愬姛')
- this.getList()
- this.checkVisible = false;
+ this.$refs.infoAduitForm.validate((valid)=>{
+ if(valid){
+ checkPass(form).then(res => {
+ this.$message.success('鎻愪氦鎴愬姛')
+ this.getList()
+ this.checkVisible = false;
+ })
+ }else{
+ return false;
+ }
+
})
+
},
//瀹℃牳
check(val) {
@@ -487,30 +501,34 @@
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 {
+ this.reportData=[];
+ 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 +612,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