定制化报表,基础核心

This commit is contained in:
helloDy
2023-12-14 14:01:19 +08:00
parent 8399081a6f
commit 79274aa8c8
23 changed files with 1264 additions and 63 deletions

View File

@@ -15,6 +15,7 @@
:headers="headers"
:file-list="fileList"
:on-preview="handlePictureCardPreview"
:disabled="disabled"
:class="{hide: this.fileList.length >= this.limit}"
>
<i class="el-icon-plus"></i>
@@ -44,6 +45,7 @@
<script>
import { getAccessToken } from "@/utils/auth";
import { flatten } from 'min-dash';
export default {
props: {
@@ -67,6 +69,10 @@ export default {
isShowTip: {
type: Boolean,
default: true
},
disabled: {
type: Boolean,
default: false
}
},
data() {
@@ -122,14 +128,16 @@ export default {
// 上传成功回调
handleUploadSuccess(res) {
// edit by 芋道源码
this.uploadList.push({ name: res.data, url: res.data });
if (this.uploadList.length === this.number) {
this.fileList = this.fileList.concat(this.uploadList);
this.uploadList = [];
this.number = 0;
this.$emit("input", this.listToString(this.fileList));
this.$modal.closeLoading();
if (res.code !== 500) {
this.uploadList.push({ name: res.data, url: res.data });
if (this.uploadList.length === this.number) {
this.fileList = this.fileList.concat(this.uploadList);
this.uploadList = [];
this.number = 0;
this.$emit("input", this.listToString(this.fileList));
}
}
this.$modal.closeLoading();
},
// 上传前loading加载
handleBeforeUpload(file) {