@newview/file-ui 1.1.36 → 1.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.1.38
2
+ 1. UploadFile 上传方式变更
3
+ 2. UploadFile 增加文件名称显示
4
+
1
5
  ## 1.1.36
2
6
  1. UploadFile 修改图片预览bug
3
7
 
package/dist/file-ui.js CHANGED
@@ -260,6 +260,11 @@ const propDefine$6 = {
260
260
  uploadQuantity: {
261
261
  type: Number,
262
262
  default: 0
263
+ },
264
+ isShowFileName: {
265
+ // 是否显示文件名称
266
+ type: Boolean,
267
+ default: true
263
268
  }
264
269
  };
265
270
  const _sfc_main$6 = defineComponent({
@@ -288,7 +293,8 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
288
293
  // 当前Token
289
294
  // 响应属性 | ref、reactive、computed
290
295
  __publicField(this, "fileList", ref([]));
291
- __publicField(this, "uploading", ref(false));
296
+ __publicField(this, "uploading", ref(true));
297
+ __publicField(this, "uploadingPercent", ref(0));
292
298
  __publicField(this, "uploadFilePos", reactive({}));
293
299
  // 文件上传参数
294
300
  __publicField(this, "action", ref("/FileServiceApi/Upload/file"));
@@ -309,8 +315,10 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
309
315
  this.uploading.value = false;
310
316
  if (result.Code != "0") {
311
317
  this.message.error(result.Msg);
318
+ this.uploadingPercent.value = 100;
312
319
  return;
313
320
  }
321
+ this.uploadingPercent.value = 100;
314
322
  this.message.success("上传成功");
315
323
  this.ctx.emit("success", { token: result.Token, fileId: result.FileId });
316
324
  this.loadFileList(true);
@@ -337,10 +345,12 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
337
345
  }
338
346
  this.uploading.value = false;
339
347
  });
348
+ /** 当前选择上传的分组 */
349
+ __publicField(this, "activeGroupName", ref(""));
340
350
  /**
341
351
  * 上传之前
342
352
  */
343
- __publicField(this, "doBeforeUpload", () => {
353
+ __publicField(this, "doBeforeUpload", (file) => {
344
354
  return new Promise(async (resolve, reject) => {
345
355
  let flag = true;
346
356
  if (this.props.uploadQuantity > 0) {
@@ -354,10 +364,8 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
354
364
  flag = true;
355
365
  }
356
366
  if (flag) {
357
- resolve(() => {
358
- });
359
367
  this.message.info("文件上传中,请稍等");
360
- this.uploading.value = true;
368
+ this.multipartUpload(file);
361
369
  } else {
362
370
  reject();
363
371
  }
@@ -552,11 +560,9 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
552
560
  * @param fileInfo
553
561
  */
554
562
  __publicField(this, "doView", async (fileInfo, index = 0) => {
555
- const apiResult = await this.fileInfoApi.getEntities(QueryWrapper.create().eq("Token", fileInfo.Token));
556
- const result = this.utilities.parseApiResult(apiResult);
563
+ const result = this.fileList.value;
557
564
  this.previewFileInfo = result[index];
558
565
  this.previewVisible.value = true;
559
- debugger;
560
566
  this.previewIndex.value = this.previewIndexData[fileInfo.Id];
561
567
  });
562
568
  this.props = props;
@@ -606,7 +612,7 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
606
612
  */
607
613
  async loadFileList(isChange = false) {
608
614
  this.uploading.value = true;
609
- const apiResult = await this.fileInfoApi.getEntities(QueryWrapper.create().eq("Token", this.currentToken));
615
+ const apiResult = await this.fileInfoApi.getEntities(QueryWrapper.create().eq("Token", this.currentToken).orderBy(["CreateTime"], true));
610
616
  this.fileList.value = this.utilities.parseApiResult(apiResult);
611
617
  this.uploading.value = false;
612
618
  if (isChange) {
@@ -614,6 +620,106 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
614
620
  }
615
621
  this.setPreviewList();
616
622
  }
623
+ /**
624
+ * 文件分片上传
625
+ * @param file
626
+ */
627
+ async multipartUpload(file) {
628
+ let _this = this;
629
+ let fileName = file.name;
630
+ let temp1 = fileName.split(".");
631
+ let ext = temp1[temp1.length - 1];
632
+ let ossContentType = this.getOssContentType(fileName);
633
+ let fileMark = this.utilities.getCurrentDate("YYYYMMDDHHmmss") + "." + ext;
634
+ let ossClient = await new OSSFileApi().getOSSClient();
635
+ const userInfo = this.storageInfo.getUser();
636
+ const module = this.storageInfo.getCurrentModule();
637
+ const platform = this.storageInfo.getCurrentPlatform();
638
+ let moduleName = module ? module == null ? void 0 : module.ModuleAlias : "无模块";
639
+ let newFileName = `${(platform == null ? void 0 : platform.OssRootPath) + "/" + moduleName + "/"}${this.props.catalog}/${this.currentToken}/${fileMark}`;
640
+ const result = await ossClient.multipartUpload(newFileName, file, {
641
+ async progress(p) {
642
+ _this.uploadingPercent.value = (p * 100).toFixed(0);
643
+ },
644
+ mime: ossContentType
645
+ });
646
+ if (result.res.statusCode === 200) {
647
+ let fileInfo = {
648
+ "FileCabinetId": (module == null ? void 0 : module.Id) ? module == null ? void 0 : module.Id : 0,
649
+ "FileCabinePath": (platform == null ? void 0 : platform.OssRootPath) + "/" + moduleName + "/",
650
+ "Catalog": this.props.catalog,
651
+ "Token": this.currentToken,
652
+ "GroupName": this.activeGroupName.value,
653
+ "FileMark": fileMark,
654
+ "FileName": fileName,
655
+ "FileExt": ext,
656
+ "FileSize": file.size,
657
+ "ExtraInfo": this.props.extraInfo,
658
+ "CreateUserId": userInfo == null ? void 0 : userInfo.Id,
659
+ "CreateUserName": userInfo == null ? void 0 : userInfo.UserName,
660
+ "CreateTime": this.utilities.getCurrentDate(),
661
+ "Id": 0
662
+ };
663
+ await this.fileInfoApi.save(fileInfo);
664
+ this.message.success("上传成功!");
665
+ this.uploadingPercent.value = 100;
666
+ this.loadFileList(true);
667
+ } else {
668
+ this.message.error("网络出现异常,再次上传");
669
+ this.uploadingPercent.value = 0;
670
+ }
671
+ }
672
+ getOssContentType(fileName) {
673
+ if (fileName.indexOf(".bmp") > -1) {
674
+ return "image/bmp";
675
+ }
676
+ if (fileName.indexOf(".gif") > -1) {
677
+ return "image/gif";
678
+ }
679
+ if (fileName.indexOf(".jpeg") > -1 || fileName.indexOf(".jpg") > -1 || fileName.indexOf(".png") > -1) {
680
+ return "image/jpg";
681
+ }
682
+ if (fileName.indexOf(".html") > -1) {
683
+ return "text/html";
684
+ }
685
+ if (fileName.indexOf(".txt") > -1) {
686
+ return "text/plain";
687
+ }
688
+ if (fileName.indexOf(".vsd") > -1) {
689
+ return "application/vnd.visio";
690
+ }
691
+ if (fileName.indexOf(".pptx") > -1 || fileName.indexOf(".ppt") > -1) {
692
+ return "application/vnd.ms-powerpoint";
693
+ }
694
+ if (fileName.indexOf(".docx") > -1 || fileName.indexOf(".doc") > -1) {
695
+ return "application/msword";
696
+ }
697
+ if (fileName.indexOf(".xls") > -1 || fileName.indexOf(".xlsx") > -1 || fileName.indexOf(".xla") > -1) {
698
+ return "application/vnd.ms-excel";
699
+ }
700
+ if (fileName.indexOf(".xml") > -1) {
701
+ return "text/xml";
702
+ }
703
+ if (fileName.indexOf(".pdf") > -1) {
704
+ return "application/pdf";
705
+ }
706
+ if (fileName.indexOf(".zip") > -1) {
707
+ return "application/zip";
708
+ }
709
+ if (fileName.indexOf(".tar") > -1) {
710
+ return "application/x-tar";
711
+ }
712
+ if (fileName.indexOf(".avi") > -1) {
713
+ return "video/avi";
714
+ }
715
+ if (fileName.indexOf(".mp4") > -1) {
716
+ return "video/mp4";
717
+ }
718
+ if (fileName.indexOf(".mp3") > -1) {
719
+ return "audio/mp3";
720
+ }
721
+ return "application/octet-stream";
722
+ }
617
723
  // 私有方法 | private 方法名() {}
618
724
  /**
619
725
  * 设置预览列表
@@ -632,22 +738,29 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
632
738
  }
633
739
  //#endregion 业务逻辑 文件预览 END
634
740
  };
635
- const UploadFile_vue_vue_type_style_index_0_scoped_fa1f4ac1_lang = "";
636
- const _withScopeId$1 = (n) => (pushScopeId("data-v-fa1f4ac1"), n = n(), popScopeId(), n);
741
+ const UploadFile_vue_vue_type_style_index_0_scoped_6ac1e6fe_lang = "";
742
+ const _withScopeId$1 = (n) => (pushScopeId("data-v-6ac1e6fe"), n = n(), popScopeId(), n);
637
743
  const _hoisted_1$3 = { class: "uploadFile uploadPage" };
638
- const _hoisted_2$3 = ["onClick", "title"];
639
- const _hoisted_3$3 = { class: "file-upload-list-cover" };
640
- const _hoisted_4$2 = { class: "file-upload-btn" };
744
+ const _hoisted_2$3 = ["title"];
745
+ const _hoisted_3$3 = ["onClick"];
746
+ const _hoisted_4$2 = { class: "file-upload-list-cover" };
641
747
  const _hoisted_5$2 = {
642
- key: 1,
748
+ key: 0,
749
+ class: "file-upload-list-name nv-text-nowrap"
750
+ };
751
+ const _hoisted_6$2 = { class: "file-upload-loading" };
752
+ const _hoisted_7$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", null, "上传进度", -1));
753
+ const _hoisted_8$2 = ["onClick"];
754
+ const _hoisted_9$2 = {
755
+ key: 2,
643
756
  class: "nv-flex",
644
757
  style: { "color": "#949494", "border": "1px dashed #dcdee2", "height": "60px", "padding": "0 20px", "font-size": "16px", "justify-content": "center" }
645
758
  };
646
- const _hoisted_6$2 = {
759
+ const _hoisted_10$2 = {
647
760
  class: "nv-flex",
648
761
  style: { "width": "40px", "margin-right": "6px" }
649
762
  };
650
- const _hoisted_7$2 = {
763
+ const _hoisted_11$2 = {
651
764
  t: "1706683071705",
652
765
  class: "icon",
653
766
  viewBox: "0 0 1566 1024",
@@ -656,19 +769,21 @@ const _hoisted_7$2 = {
656
769
  "p-id": "4559",
657
770
  style: { "fill": "currentColor" }
658
771
  };
659
- const _hoisted_8$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("path", {
772
+ const _hoisted_12$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("path", {
660
773
  d: "M156.661991 699.757959h21.096999a10.443999 10.443999 0 0 1 10.235999 10.443999c0 5.765-4.491 10.443999-10.235999 10.444h-21.096999v21.097999a10.443999 10.443999 0 0 1-10.444 10.234999 10.276999 10.276999 0 0 1-10.443999-10.234999v-21.097999h-21.096999a10.443999 10.443999 0 0 1-10.234999-10.444c0-5.765 4.49-10.443999 10.234999-10.443999h21.096999v-21.096999a10.443999 10.443999 0 0 1 10.443999-10.234999c5.765 0 10.443999 4.49 10.444 10.234999v21.096999z m1378.627919-83.552995v-21.096999a10.276999 10.276999 0 0 0-10.443999-10.234999 10.443999 10.443999 0 0 0-10.444 10.234999v21.096999h-21.096998a10.276999 10.276999 0 0 0-10.235 10.443999c0 5.598 4.595 10.443999 10.235 10.444h21.096998v21.096998c0 5.745 4.679 10.235999 10.444 10.236a10.443999 10.443999 0 0 0 10.443999-10.236v-21.096998h21.097999c5.744 0 10.234999-4.679 10.234999-10.444a10.443999 10.443999 0 0 0-10.234999-10.443999h-21.097999zM776.459955 960.861944H250.596985a20.804999 20.804999 0 0 1-20.825998-20.887999c0-11.529999 9.462999-20.888999 20.825998-20.888999h94.727995a83.009995 83.009995 0 0 1-11.112-41.671997v-605.969965a83.489995 83.489995 0 0 1 83.636996-83.447995h62.580996v-20.992999a83.489995 83.489995 0 0 1 83.636995-83.448995h501.151971a83.448995 83.448995 0 0 1 83.636995 83.448995v605.969965c0 15.184999-4.053 29.409998-11.134 41.671997h115.553994c11.551999 0 20.909999 9.273999 20.909998 20.887999 0 11.529999-9.295999 20.887999-20.888998 20.887999h-250.659986v20.992999c0 15.185999-4.052 29.409998-11.132999 41.671997h11.195999c11.488999 0 20.825999 9.274999 20.825999 20.888999 0 11.529999-9.462999 20.887999-20.825999 20.887999H892.807948a41.657998 41.657998 0 0 1-6.413 50.862997 41.671998 41.671998 0 0 1-59.071996 0l-50.862997-50.862997z m76.367995-41.776998h66.423996c22.977999 0 41.609998-18.589999 41.609998-41.879997V270.460984c0-22.559999-18.047999-40.689998-40.313998-40.689997H416.303976c-22.266999 0-40.314998 18.213999-40.314998 40.689997v606.741965c0 23.123999 18.799999 41.880998 41.589998 41.880997h317.083981l-10.736999-10.756999a41.692998 41.692998 0 0 1-10.862-40.376998l-19.718999-19.739999a146.259991 146.259991 0 0 1-190.980988-220.516987 146.217991 146.217991 0 0 1 220.517987 190.980989l19.738998 19.739999a41.629998 41.629998 0 0 1 40.376998 10.839999l69.829996 69.829996z m149.809991-104.440994h62.852997a41.796998 41.796998 0 0 0 41.589997-41.776997v-605.759965c0-23.144999-18.632999-41.776998-41.589997-41.776997H563.774967a41.796998 41.796998 0 0 0-41.566998 41.775997v20.888999h396.793977a83.448995 83.448995 0 0 1 83.636995 83.448995v543.199968zM266.326984 46.998997h31.122999c8.773999 0 15.875999 6.955 15.875999 15.665999 0 8.647999-7.102 15.665999-15.875999 15.665999h-31.122999v31.123999c0 8.772999-6.956 15.874999-15.665999 15.874999a15.769999 15.769999 0 0 1-15.666999-15.874999V78.329995H203.869988a15.728999 15.728999 0 0 1-15.874999-15.665999c0-8.647999 7.102-15.665999 15.874999-15.665999h31.122998V15.874999C234.992986 7.102 241.949986 0 250.659985 0c8.646999 0 15.665999 7.102 15.665999 15.874999V46.999997zM20.887999 939.973945c0-11.529999 9.462999-20.888999 20.825999-20.888999h125.454992c11.488999 0 20.825999 9.274999 20.825999 20.888999 0 11.529999-9.462999 20.887999-20.825999 20.887999H41.713998a20.804999 20.804999 0 0 1-20.825999-20.887999z m658.733961-135.021992A104.441994 104.441994 0 1 0 531.899969 657.229961a104.441994 104.441994 0 0 0 147.721991 147.721992z m-220.079987-491.626971a20.887999 20.887999 0 0 1 20.867999-20.888999h229.791986a20.887999 20.887999 0 1 1 0 41.776997H480.430972a20.825999 20.825999 0 0 1-20.887999-20.887998z m0 104.440994c0-11.529999 9.295999-20.887999 20.742999-20.887999H814.789952c11.446999 0 20.741999 9.273999 20.741999 20.887999 0 11.529999-9.294999 20.887999-20.741999 20.887998H480.284972a20.762999 20.762999 0 0 1-20.741999-20.887998z m0 104.441993c0-11.529999 9.316999-20.888999 20.846999-20.888998h146.301991c11.509999 0 20.845999 9.274999 20.845999 20.888998 0 11.529999-9.315999 20.887999-20.845999 20.887999H480.388972a20.804999 20.804999 0 0 1-20.845999-20.887999zM62.665996 396.877977a62.664996 62.664996 0 1 1 0-125.329993 62.664996 62.664996 0 0 1 0 125.329993z m0-31.332998a31.331998 31.331998 0 1 0 0-62.664997 31.331998 31.331998 0 0 0 0 62.664997z m1295.074924-93.996995a62.664996 62.664996 0 1 1 0-125.329993 62.664996 62.664996 0 0 1 0 125.329993z m0-31.332998a31.331998 31.331998 0 1 0 0-62.663996 31.331998 31.331998 0 0 0 0 62.663996z",
661
774
  "p-id": "4560"
662
775
  }, null, -1));
663
- const _hoisted_9$2 = [
664
- _hoisted_8$2
776
+ const _hoisted_13$1 = [
777
+ _hoisted_12$2
665
778
  ];
666
- const _hoisted_10$2 = { class: "file-upload-list-cover" };
667
- const _hoisted_11$2 = { class: "file-upload-btn" };
779
+ const _hoisted_14$1 = { class: "file-upload-list-cover" };
780
+ const _hoisted_15$1 = { class: "file-upload-loading" };
781
+ const _hoisted_16$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", null, "上传进度", -1));
668
782
  function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
669
783
  const _component_Image = resolveComponent("Image");
670
784
  const _component_Icon = resolveComponent("Icon");
671
785
  const _component_Space = resolveComponent("Space");
786
+ const _component_Circle = resolveComponent("Circle");
672
787
  const _component_Upload = resolveComponent("Upload");
673
788
  const _component_Card = resolveComponent("Card");
674
789
  const _component_Spin = resolveComponent("Spin");
@@ -682,14 +797,12 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
682
797
  default: withCtx(() => [
683
798
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.getGroupFiles(groupName), (item, index) => {
684
799
  return openBlock(), createElementBlock("div", {
685
- class: normalizeClass(
686
- _ctx.isImage(item) ? "file-upload-list file-upload-list-bs" : "file-upload-list"
687
- )
800
+ class: "file-upload-list",
801
+ title: item.FileName
688
802
  }, [
689
803
  createElementVNode("div", {
690
- class: "file-upload-list-content",
691
- onClick: ($event) => _ctx.doView(item, index),
692
- title: item.FileName
804
+ class: normalizeClass(["file-upload-list-content", { "file-upload-list-bs": _ctx.isImage(item) }]),
805
+ onClick: ($event) => _ctx.doView(item, index)
693
806
  }, [
694
807
  createVNode(_component_Image, {
695
808
  src: _ctx.getThumbnailUrl(item),
@@ -698,7 +811,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
698
811
  width: "100%",
699
812
  height: "100%"
700
813
  }, null, 8, ["src"]),
701
- createElementVNode("div", _hoisted_3$3, [
814
+ createElementVNode("div", _hoisted_4$2, [
702
815
  createVNode(_component_Space, null, {
703
816
  default: withCtx(() => [
704
817
  createVNode(_component_Icon, {
@@ -716,41 +829,59 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
716
829
  _: 2
717
830
  }, 1024)
718
831
  ])
719
- ], 8, _hoisted_2$3)
720
- ], 2);
832
+ ], 10, _hoisted_3$3),
833
+ _ctx.isShowFileName ? (openBlock(), createElementBlock("div", _hoisted_5$2, toDisplayString(item.FileName), 1)) : createCommentVNode("", true)
834
+ ], 8, _hoisted_2$3);
721
835
  }), 256)),
722
- !_ctx.readonly ? (openBlock(), createBlock(_component_Upload, {
836
+ _ctx.uploadingPercent > 0 && _ctx.uploadingPercent < 100 ? (openBlock(), createBlock(_component_Circle, {
723
837
  key: 0,
724
- ref_for: true,
725
- ref: "uploadRef",
726
- type: "drag",
727
- name: "FormFile",
728
- multiple: _ctx.multiple,
729
- "show-upload-list": false,
730
- format: _ctx.format,
731
- "max-size": _ctx.maxSize,
732
- action: _ctx.action,
733
- headers: _ctx.headers,
734
- data: _ctx.uploadFilePos[groupName],
735
- "on-success": _ctx.doSuccess,
736
- "on-format-error": _ctx.doFormatError,
737
- "on-exceeded-size": _ctx.doMaxSize,
738
- "before-upload": _ctx.doBeforeUpload,
739
- style: { "display": "inline-block", "width": "78px" }
838
+ size: "78",
839
+ percent: _ctx.uploadingPercent,
840
+ "stroke-color": ["#108ee9", "#87d068"]
740
841
  }, {
741
842
  default: withCtx(() => [
742
- createElementVNode("div", _hoisted_4$2, [
743
- createVNode(_component_Icon, {
744
- type: "ios-camera",
745
- size: "20"
746
- })
843
+ createElementVNode("div", _hoisted_6$2, [
844
+ createElementVNode("div", null, toDisplayString(_ctx.uploadingPercent) + "%", 1),
845
+ _hoisted_7$2
747
846
  ])
748
847
  ]),
749
- _: 2
750
- }, 1032, ["multiple", "format", "max-size", "action", "headers", "data", "on-success", "on-format-error", "on-exceeded-size", "before-upload"])) : createCommentVNode("", true),
751
- _ctx.readonly && _ctx.fileList.length == 0 ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
752
- createElementVNode("i", _hoisted_6$2, [
753
- (openBlock(), createElementBlock("svg", _hoisted_7$2, _hoisted_9$2))
848
+ _: 1
849
+ }, 8, ["percent"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
850
+ !_ctx.readonly ? (openBlock(), createBlock(_component_Upload, {
851
+ key: 0,
852
+ ref_for: true,
853
+ ref: "uploadRef",
854
+ type: "drag",
855
+ name: "FormFile",
856
+ multiple: _ctx.multiple,
857
+ "show-upload-list": false,
858
+ format: _ctx.format,
859
+ "max-size": _ctx.maxSize,
860
+ headers: _ctx.headers,
861
+ data: _ctx.uploadFilePos[groupName],
862
+ "on-success": _ctx.doSuccess,
863
+ "on-format-error": _ctx.doFormatError,
864
+ "on-exceeded-size": _ctx.doMaxSize,
865
+ "before-upload": _ctx.doBeforeUpload,
866
+ style: { "display": "inline-block", "width": "78px" }
867
+ }, {
868
+ default: withCtx(() => [
869
+ createElementVNode("div", {
870
+ class: "file-upload-btn",
871
+ onClick: ($event) => _ctx.activeGroupName = groupName
872
+ }, [
873
+ createVNode(_component_Icon, {
874
+ type: "ios-camera",
875
+ size: "20"
876
+ })
877
+ ], 8, _hoisted_8$2)
878
+ ]),
879
+ _: 2
880
+ }, 1032, ["multiple", "format", "max-size", "headers", "data", "on-success", "on-format-error", "on-exceeded-size", "before-upload"])) : createCommentVNode("", true)
881
+ ], 64)),
882
+ _ctx.readonly && _ctx.fileList.length == 0 ? (openBlock(), createElementBlock("div", _hoisted_9$2, [
883
+ createElementVNode("i", _hoisted_10$2, [
884
+ (openBlock(), createElementBlock("svg", _hoisted_11$2, _hoisted_13$1))
754
885
  ]),
755
886
  createElementVNode("div", null, toDisplayString(_ctx.nullMsg), 1)
756
887
  ])) : createCommentVNode("", true)
@@ -778,7 +909,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
778
909
  width: "100%",
779
910
  height: "100%"
780
911
  }, null, 8, ["src"]),
781
- createElementVNode("div", _hoisted_10$2, [
912
+ createElementVNode("div", _hoisted_14$1, [
782
913
  createVNode(_component_Space, null, {
783
914
  default: withCtx(() => [
784
915
  createVNode(_component_Icon, {
@@ -803,7 +934,21 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
803
934
  style: { "margin-bottom": "8px" }
804
935
  }, {
805
936
  default: withCtx(() => [
806
- createVNode(_component_Upload, {
937
+ _ctx.uploadingPercent > 0 && _ctx.uploadingPercent < 100 ? (openBlock(), createBlock(_component_Circle, {
938
+ key: 0,
939
+ size: "78",
940
+ percent: _ctx.uploadingPercent,
941
+ "stroke-color": ["#108ee9", "#87d068"]
942
+ }, {
943
+ default: withCtx(() => [
944
+ createElementVNode("div", _hoisted_15$1, [
945
+ createElementVNode("div", null, toDisplayString(_ctx.uploadingPercent) + "%", 1),
946
+ _hoisted_16$1
947
+ ])
948
+ ]),
949
+ _: 1
950
+ }, 8, ["percent"])) : (openBlock(), createBlock(_component_Upload, {
951
+ key: 1,
807
952
  ref: "uploadRef",
808
953
  type: "drag",
809
954
  name: "FormFile",
@@ -821,7 +966,10 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
821
966
  style: { "display": "inline-block", "width": "78px" }
822
967
  }, {
823
968
  default: withCtx(() => [
824
- createElementVNode("div", _hoisted_11$2, [
969
+ createElementVNode("div", {
970
+ class: "file-upload-btn",
971
+ onClick: _cache[3] || (_cache[3] = ($event) => _ctx.activeGroupName = _ctx.groups[0])
972
+ }, [
825
973
  createVNode(_component_Icon, {
826
974
  type: "ios-camera",
827
975
  size: "20"
@@ -829,7 +977,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
829
977
  ])
830
978
  ]),
831
979
  _: 1
832
- }, 8, ["multiple", "format", "max-size", "action", "headers", "data", "on-success", "on-format-error", "on-exceeded-size", "before-upload"])
980
+ }, 8, ["multiple", "format", "max-size", "action", "headers", "data", "on-success", "on-format-error", "on-exceeded-size", "before-upload"]))
833
981
  ]),
834
982
  _: 1
835
983
  })) : createCommentVNode("", true)
@@ -841,14 +989,14 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
841
989
  })) : createCommentVNode("", true),
842
990
  createVNode(_component_filePreview, {
843
991
  modelValue: _ctx.previewVisible,
844
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.previewVisible = $event),
992
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.previewVisible = $event),
845
993
  "preview-list": _ctx.previewList,
846
994
  "preview-index": _ctx.previewIndex,
847
995
  "file-info": _ctx.previewFileInfo
848
996
  }, null, 8, ["modelValue", "preview-list", "preview-index", "file-info"])
849
997
  ]);
850
998
  }
851
- const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-fa1f4ac1"]]);
999
+ const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-6ac1e6fe"]]);
852
1000
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
853
1001
  function getDefaultExportFromCjs(x) {
854
1002
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
@@ -19824,9 +19972,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
19824
19972
  readonly: _ctx.getPropValue(item.uploadFileProp, "readonly") || _ctx.onlyView,
19825
19973
  token: _ctx.formModel[item.model],
19826
19974
  multiple: _ctx.getPropValue(item.uploadFileProp, "multiple"),
19975
+ isShowFileName: _ctx.getPropValue(item.uploadFileProp, "isShowFileName"),
19827
19976
  uploadQuantity: _ctx.getPropValue(item.uploadFileProp, "uploadQuantity", 0),
19828
19977
  onReturnFileList: ($event) => _ctx.tokenList($event, item)
19829
- }, null, 8, ["readonly", "token", "multiple", "uploadQuantity", "onReturnFileList"])) : createCommentVNode("", true),
19978
+ }, null, 8, ["readonly", "token", "multiple", "isShowFileName", "uploadQuantity", "onReturnFileList"])) : createCommentVNode("", true),
19830
19979
  item.type === "TextEditor" ? (openBlock(), createBlock(_component_TextEditor, {
19831
19980
  key: 1,
19832
19981
  ref: "textEditorRef",