form-custom-test 3.0.134 → 3.0.136

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.
@@ -3947,6 +3947,15 @@ const customInputSchema = {
3947
3947
  placeholder: "",
3948
3948
  clearable: true,
3949
3949
  filterable: false,
3950
+ disabled: false,
3951
+ readonly: false,
3952
+ maxlength: 0,
3953
+ minlength: 0,
3954
+ pattern: "",
3955
+ title: "",
3956
+ titlePosition: "top",
3957
+ titleWidth: 0,
3958
+ titleAlign: "left",
3950
3959
  required: false,
3951
3960
  requiredHint: "",
3952
3961
  validation: "",
@@ -12386,15 +12395,6 @@ const _sfc_main$3e = {
12386
12395
  },
12387
12396
  beforeCreate() {
12388
12397
  },
12389
- watch: {
12390
- fieldModel: {
12391
- handler(newVal) {
12392
- this.fileList = deepClone(newVal);
12393
- },
12394
- deep: true,
12395
- immediate: true
12396
- }
12397
- },
12398
12398
  created() {
12399
12399
  this.initFieldModel();
12400
12400
  this.registerToRefList();
@@ -12409,6 +12409,36 @@ const _sfc_main$3e = {
12409
12409
  this.unregisterFromRefList();
12410
12410
  },
12411
12411
  methods: {
12412
+ initFileList() {
12413
+ if (this.designState === true) {
12414
+ return;
12415
+ }
12416
+ if (this.fieldModel == null) {
12417
+ this.fileList = [];
12418
+ this.uploadBtnHidden = false;
12419
+ return;
12420
+ }
12421
+ const raw = Array.isArray(this.fieldModel) ? deepClone(this.fieldModel) : [deepClone(this.fieldModel)];
12422
+ if (raw.length === 0) {
12423
+ this.fileList = [];
12424
+ this.uploadBtnHidden = false;
12425
+ return;
12426
+ }
12427
+ this.fileList = raw.map((item, i) => {
12428
+ var _a2, _b2, _c2, _d;
12429
+ const name = (_b2 = (_a2 = item.name) != null ? _a2 : item.fileName) != null ? _b2 : "";
12430
+ const url = (_d = (_c2 = item.url) != null ? _c2 : item.fileUrl) != null ? _d : "";
12431
+ const uid = item.uid != null ? item.uid : item.fileId != null ? item.fileId : Date.now() + i;
12432
+ return __spreadProps(__spreadValues({}, item), {
12433
+ name,
12434
+ url,
12435
+ status: item.status === "uploading" || item.status === "fail" ? item.status : "success",
12436
+ uid
12437
+ });
12438
+ });
12439
+ const lim = this.field.options.limit;
12440
+ this.uploadBtnHidden = typeof lim === "number" && lim > 0 && this.fileList.length >= lim;
12441
+ },
12412
12442
  getFileIcon(fileName) {
12413
12443
  const ext = fileName == null ? void 0 : fileName.substring((fileName == null ? void 0 : fileName.lastIndexOf(".")) + 1).toLowerCase();
12414
12444
  if (!ext) {
@@ -12468,28 +12498,34 @@ const _sfc_main$3e = {
12468
12498
  return true;
12469
12499
  }
12470
12500
  },
12501
+ isFileListItemCommitted(item) {
12502
+ if (item.status === "uploading" || item.status === "fail" || item.status === "ready") {
12503
+ return false;
12504
+ }
12505
+ return item.response != null || !!(item.url || item.fileUrl) || item.fileId != null && !!(item.fileName || item.name);
12506
+ },
12471
12507
  buildFieldModelFromFileList(fileList, currentFileCustomResult) {
12472
- const list = fileList.filter((item) => item.status === "success" && (item.response != null || item.url)).map((item) => {
12473
- var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
12508
+ const list = fileList.filter((item) => this.isFileListItemCommitted(item)).map((item) => {
12509
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
12474
12510
  const res = item.response;
12475
12511
  const d = (res == null ? void 0 : res.data) != null ? res.data : res;
12476
12512
  if (d && (d.fileName != null || d.fileUrl != null || d.url != null)) {
12477
12513
  return {
12478
- fileName: (_b2 = (_a2 = d.fileName) != null ? _a2 : d.name) != null ? _b2 : item.name,
12479
- fileId: d.fileId,
12480
- fileUrl: (_e = (_d = (_c2 = d.fileUrl) != null ? _c2 : d.url) != null ? _d : item.url) != null ? _e : "",
12481
- type: d.type,
12482
- name: (_g = (_f = d.fileName) != null ? _f : d.name) != null ? _g : item.name,
12483
- url: (_j = (_i = (_h = d.fileUrl) != null ? _h : d.url) != null ? _i : item.url) != null ? _j : ""
12514
+ fileName: (_c2 = (_b2 = (_a2 = d.fileName) != null ? _a2 : d.name) != null ? _b2 : item.name) != null ? _c2 : item.fileName,
12515
+ fileId: (_d = d.fileId) != null ? _d : item.fileId,
12516
+ fileUrl: (_h = (_g = (_f = (_e = d.fileUrl) != null ? _e : d.url) != null ? _f : item.url) != null ? _g : item.fileUrl) != null ? _h : "",
12517
+ type: (_i = d.type) != null ? _i : item.type,
12518
+ name: (_l = (_k = (_j = d.fileName) != null ? _j : d.name) != null ? _k : item.name) != null ? _l : item.fileName,
12519
+ url: (_p = (_o = (_n = (_m = d.fileUrl) != null ? _m : d.url) != null ? _n : item.url) != null ? _o : item.fileUrl) != null ? _p : ""
12484
12520
  };
12485
12521
  }
12486
12522
  return {
12487
- fileName: item.name,
12488
- fileId: item.uid,
12489
- fileUrl: item.url || "",
12490
- type: (_k = item.raw) == null ? void 0 : _k.type,
12491
- name: item.name,
12492
- url: item.url || ""
12523
+ fileName: (_q = item.name) != null ? _q : item.fileName,
12524
+ fileId: (_r = item.fileId) != null ? _r : item.uid,
12525
+ fileUrl: (_t = (_s = item.url) != null ? _s : item.fileUrl) != null ? _t : "",
12526
+ type: (_v = (_u = item.raw) == null ? void 0 : _u.type) != null ? _v : item.type,
12527
+ name: (_w = item.name) != null ? _w : item.fileName,
12528
+ url: (_y = (_x = item.url) != null ? _x : item.fileUrl) != null ? _y : ""
12493
12529
  };
12494
12530
  });
12495
12531
  if (currentFileCustomResult && currentFileCustomResult.name && currentFileCustomResult.url) {
@@ -12781,7 +12817,7 @@ function _sfc_render$3e(_ctx, _cache, $props, $setup, $data, $options) {
12781
12817
  _: 1
12782
12818
  }, 8, ["designer", "field", "rules", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]);
12783
12819
  }
12784
- var fileUploadWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$3e, [["render", _sfc_render$3e], ["__scopeId", "data-v-ef01868e"]]);
12820
+ var fileUploadWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$3e, [["render", _sfc_render$3e], ["__scopeId", "data-v-d1ab6ccc"]]);
12785
12821
  var __glob_0_7$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12786
12822
  __proto__: null,
12787
12823
  "default": fileUploadWidget
@@ -68513,13 +68549,13 @@ function registerIcon(app) {
68513
68549
  if (typeof window !== "undefined") {
68514
68550
  let loadSvg = function() {
68515
68551
  var body = document.body;
68516
- var svgDom = document.getElementById("__svg__icons__dom__1778657283213__");
68552
+ var svgDom = document.getElementById("__svg__icons__dom__1778663221899__");
68517
68553
  if (!svgDom) {
68518
68554
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
68519
68555
  svgDom.style.position = "absolute";
68520
68556
  svgDom.style.width = "0";
68521
68557
  svgDom.style.height = "0";
68522
- svgDom.id = "__svg__icons__dom__1778657283213__";
68558
+ svgDom.id = "__svg__icons__dom__1778663221899__";
68523
68559
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
68524
68560
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
68525
68561
  }
@@ -78663,6 +78699,7 @@ const _sfc_main$6 = {
78663
78699
  assetOwnerUnit: "",
78664
78700
  labelName: ""
78665
78701
  };
78702
+ this.searchValue = "";
78666
78703
  this.$emit("close");
78667
78704
  },
78668
78705
  handleConfirm() {
@@ -78702,7 +78739,7 @@ const _sfc_main$6 = {
78702
78739
  service$1({
78703
78740
  method: "post",
78704
78741
  url: "/asset-business/overview/pageList",
78705
- data: __spreadProps(__spreadValues({ size: this.pageSize, current: this.currentPage, reqType: "disposal" }, this.form), { assetType: this.form.assetType === "all" ? "" : this.form.assetType })
78742
+ data: __spreadProps(__spreadValues({ size: this.pageSize, current: this.currentPage, reqType: "disposal" }, this.form), { assetType: this.form.assetType === "all" ? "" : this.form.assetType, systemStatusList: ["2"] })
78706
78743
  }).then(({ data: data2 }) => {
78707
78744
  const { records, total, current } = data2;
78708
78745
  this.tableData = records.map((item) => {
@@ -79110,7 +79147,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
79110
79147
  _: 1
79111
79148
  }, 8, ["modelValue", "onClose"]);
79112
79149
  }
79113
- var AssetDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-f25f357a"]]);
79150
+ var AssetDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-d9c3eebc"]]);
79114
79151
  var index_vue_vue_type_style_index_0_lang$1 = "";
79115
79152
  const _sfc_main$5 = {
79116
79153
  name: "asset-select-widget",