|
@@ -53,7 +53,31 @@
|
|
ref="uUpload"
|
|
ref="uUpload"
|
|
:action="uploadAction"
|
|
:action="uploadAction"
|
|
:show-progress="false"
|
|
:show-progress="false"
|
|
- max-count="4"
|
|
|
|
|
|
+ max-count="1"
|
|
|
|
+ @on-oversize
|
|
|
|
+ :source-type="sourceType"
|
|
|
|
+ upload-text="拍照取证" ></u-upload>
|
|
|
|
+ <u-upload
|
|
|
|
+ ref="uUpload1"
|
|
|
|
+ :action="uploadAction"
|
|
|
|
+ :show-progress="false"
|
|
|
|
+ max-count="1"
|
|
|
|
+ @on-oversize
|
|
|
|
+ :source-type="sourceType"
|
|
|
|
+ upload-text="拍照取证" ></u-upload>
|
|
|
|
+ <u-upload
|
|
|
|
+ ref="uUpload2"
|
|
|
|
+ :action="uploadAction"
|
|
|
|
+ :show-progress="false"
|
|
|
|
+ max-count="1"
|
|
|
|
+ @on-oversize
|
|
|
|
+ :source-type="sourceType"
|
|
|
|
+ upload-text="拍照取证" ></u-upload>
|
|
|
|
+ <u-upload
|
|
|
|
+ ref="uUpload3"
|
|
|
|
+ :action="uploadAction"
|
|
|
|
+ :show-progress="false"
|
|
|
|
+ max-count="1"
|
|
@on-oversize
|
|
@on-oversize
|
|
:source-type="sourceType"
|
|
:source-type="sourceType"
|
|
upload-text="拍照取证" ></u-upload>
|
|
upload-text="拍照取证" ></u-upload>
|
|
@@ -223,13 +247,24 @@
|
|
let files = [];
|
|
let files = [];
|
|
let that = this;
|
|
let that = this;
|
|
// 通过filter,筛选出上传进度为100的文件(因为某些上传失败的文件,进度值不为100,这个是可选的操作)
|
|
// 通过filter,筛选出上传进度为100的文件(因为某些上传失败的文件,进度值不为100,这个是可选的操作)
|
|
- files = this.$refs.uUpload.lists.filter(val => {
|
|
|
|
|
|
+ files[0] = this.$refs.uUpload.lists.filter(val => {
|
|
|
|
+ return val.progress == 100;
|
|
|
|
+ });
|
|
|
|
+ files[1] = this.$refs.uUpload1.lists.filter(val => {
|
|
return val.progress == 100;
|
|
return val.progress == 100;
|
|
});
|
|
});
|
|
|
|
+ files[2] = this.$refs.uUpload2.lists.filter(val => {
|
|
|
|
+ return val.progress == 100;
|
|
|
|
+ });
|
|
|
|
+ files[3] = this.$refs.uUpload3.lists.filter(val => {
|
|
|
|
+ return val.progress == 100;
|
|
|
|
+ });
|
|
|
|
+
|
|
// 如果不需要进行太多的处理,直接如下即可
|
|
// 如果不需要进行太多的处理,直接如下即可
|
|
// files = this.$refs.uUpload.lists;
|
|
// files = this.$refs.uUpload.lists;
|
|
files.forEach(function(element) {
|
|
files.forEach(function(element) {
|
|
- that.images.push(element.response.data.url);
|
|
|
|
|
|
+ console.log('files',element)
|
|
|
|
+ that.images.push(element[0].response.data.url);
|
|
});
|
|
});
|
|
if(that.images=='' || that.images==null){
|
|
if(that.images=='' || that.images==null){
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|