2f4b56b8 by xiaomiao

Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev

2 parents 83213799 72d18867
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-07-31 15:43:30 4 * @LastEditTime: 2023-08-07 14:43:46
5 --> 5 -->
6 <template> 6 <template>
7 <div class="rlPopup"> 7 <div class="rlPopup">
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
25 <el-button type="primary" @click="clickImage" v-if="previewImg.imgList.length>0">(放大) 显示(缩小)</el-button> 25 <el-button type="primary" @click="clickImage" v-if="previewImg.imgList.length>0">(放大) 显示(缩小)</el-button>
26 <el-upload class="fileUpdate" ref="upload" :key="key" action="" :show-file-list="false" :multiple="true" :auto-upload="false" 26 <el-upload class="fileUpdate" ref="upload" :key="key" action="" :show-file-list="false" :multiple="true" :auto-upload="false"
27 :on-change="handleChange" 27 :on-change="handleChange"
28 accept=".JPG, .PNG, .JPEG,.jpg, .png, .jpeg" :before-upload="beforeUpload"> 28 accept=".JPG, .PNG, .JPEG,.jpg, .png, .jpeg">
29 <el-button icon="el-icon-upload" type="primary" v-if="ableOperation">上传</el-button> 29 <el-button icon="el-icon-upload" type="primary" v-if="ableOperation">上传</el-button>
30 </el-upload> 30 </el-upload>
31 <el-button type="primary" icon="el-icon-delete-solid" @click="handleDelete" 31 <el-button type="primary" icon="el-icon-delete-solid" @click="handleDelete"
...@@ -225,28 +225,12 @@ ...@@ -225,28 +225,12 @@
225 this.showViewer = true 225 this.showViewer = true
226 }, 226 },
227 /** 227 /**
228 * @description: 上传
229 * @param {*} file
230 * @author: renchao
231 */
232 beforeUpload (file) {
233 const isLt5M = file.size / 1024 / 1024 < 5;
234 if (!isLt5M) {
235 this.$message.error('上传图片大小不能超过 5MB!');
236 return false;
237 }
238
239 // 所有条件满足时返回 true
240 return true;
241 },
242 /**
243 * @description: handleChange 228 * @description: handleChange
244 * @param {*} file 229 * @param {*} file
245 * @param {*} files 230 * @param {*} files
246 * @author: renchao 231 * @author: renchao
247 */ 232 */
248 async handleChange (file, fileList) { 233 async handleChange (file, fileList) {
249 if (!this.beforeUpload(file)) return
250 let length = fileList.length; 234 let length = fileList.length;
251 this.maxFileLength = Math.max(length, this.maxFileLength) 235 this.maxFileLength = Math.max(length, this.maxFileLength)
252 var formData = new FormData(); 236 var formData = new FormData();
...@@ -254,8 +238,12 @@ ...@@ -254,8 +238,12 @@
254 if (this.maxFileLength !== length) { 238 if (this.maxFileLength !== length) {
255 return 239 return
256 } 240 }
257 let num = 0 241 let num = 0, max = 0;
242 const isLt5M = file.size / 1024 / 1024 < 5;
258 fileList.forEach(item => { 243 fileList.forEach(item => {
244 if (!isLt5M) {
245 max++
246 }
259 if (!['image/jpeg', 'image/png', 'image/jpg', 'image/gif'].includes(item.raw.type)) { 247 if (!['image/jpeg', 'image/png', 'image/jpg', 'image/gif'].includes(item.raw.type)) {
260 num++ 248 num++
261 } else { 249 } else {
...@@ -268,6 +256,11 @@ ...@@ -268,6 +256,11 @@
268 this.key++ 256 this.key++
269 return; 257 return;
270 } 258 }
259 if (max >= 1) {
260 this.$message.error('上传图片大小不能超过 5MB!');
261 this.key++
262 return;
263 }
271 formData.append("bsmSj", this.previewImg.bsmSj); 264 formData.append("bsmSj", this.previewImg.bsmSj);
272 formData.append("bsmSlsq", this.previewImg.bsmSlsq); 265 formData.append("bsmSlsq", this.previewImg.bsmSlsq);
273 uploadBatch(formData).then((res) => { 266 uploadBatch(formData).then((res) => {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
9 <i class="el-icon-question invalid-icon"></i> 9 <i class="el-icon-question invalid-icon"></i>
10 <div class="invalid-body">您是否确定终止该业务办理?</div> 10 <div class="invalid-body">您是否确定终止该业务办理?</div>
11 </div> 11 </div>
12 <div class="invalid-reson">终止原因:</div> 12 <div class="invalid-reson">退件原因:</div>
13 <el-input 13 <el-input
14 v-model="stopMessage" 14 v-model="stopMessage"
15 placeholder="请输入终止原因" 15 placeholder="请输入终止原因"
......