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.
- package/dist/designer.es.js +65 -28
- package/dist/designer.style.css +2 -2
- package/dist/designer.umd.js +15 -15
- package/dist/render.es.js +56 -28
- package/dist/render.style.css +2 -2
- package/dist/render.umd.js +61 -61
- package/package.json +1 -1
package/dist/render.es.js
CHANGED
|
@@ -10624,15 +10624,6 @@ const _sfc_main$T = {
|
|
|
10624
10624
|
},
|
|
10625
10625
|
beforeCreate() {
|
|
10626
10626
|
},
|
|
10627
|
-
watch: {
|
|
10628
|
-
fieldModel: {
|
|
10629
|
-
handler(newVal) {
|
|
10630
|
-
this.fileList = deepClone(newVal);
|
|
10631
|
-
},
|
|
10632
|
-
deep: true,
|
|
10633
|
-
immediate: true
|
|
10634
|
-
}
|
|
10635
|
-
},
|
|
10636
10627
|
created() {
|
|
10637
10628
|
this.initFieldModel();
|
|
10638
10629
|
this.registerToRefList();
|
|
@@ -10647,6 +10638,36 @@ const _sfc_main$T = {
|
|
|
10647
10638
|
this.unregisterFromRefList();
|
|
10648
10639
|
},
|
|
10649
10640
|
methods: {
|
|
10641
|
+
initFileList() {
|
|
10642
|
+
if (this.designState === true) {
|
|
10643
|
+
return;
|
|
10644
|
+
}
|
|
10645
|
+
if (this.fieldModel == null) {
|
|
10646
|
+
this.fileList = [];
|
|
10647
|
+
this.uploadBtnHidden = false;
|
|
10648
|
+
return;
|
|
10649
|
+
}
|
|
10650
|
+
const raw = Array.isArray(this.fieldModel) ? deepClone(this.fieldModel) : [deepClone(this.fieldModel)];
|
|
10651
|
+
if (raw.length === 0) {
|
|
10652
|
+
this.fileList = [];
|
|
10653
|
+
this.uploadBtnHidden = false;
|
|
10654
|
+
return;
|
|
10655
|
+
}
|
|
10656
|
+
this.fileList = raw.map((item, i) => {
|
|
10657
|
+
var _a, _b, _c, _d;
|
|
10658
|
+
const name = (_b = (_a = item.name) != null ? _a : item.fileName) != null ? _b : "";
|
|
10659
|
+
const url = (_d = (_c = item.url) != null ? _c : item.fileUrl) != null ? _d : "";
|
|
10660
|
+
const uid = item.uid != null ? item.uid : item.fileId != null ? item.fileId : Date.now() + i;
|
|
10661
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
10662
|
+
name,
|
|
10663
|
+
url,
|
|
10664
|
+
status: item.status === "uploading" || item.status === "fail" ? item.status : "success",
|
|
10665
|
+
uid
|
|
10666
|
+
});
|
|
10667
|
+
});
|
|
10668
|
+
const lim = this.field.options.limit;
|
|
10669
|
+
this.uploadBtnHidden = typeof lim === "number" && lim > 0 && this.fileList.length >= lim;
|
|
10670
|
+
},
|
|
10650
10671
|
getFileIcon(fileName) {
|
|
10651
10672
|
const ext = fileName == null ? void 0 : fileName.substring((fileName == null ? void 0 : fileName.lastIndexOf(".")) + 1).toLowerCase();
|
|
10652
10673
|
if (!ext) {
|
|
@@ -10706,28 +10727,34 @@ const _sfc_main$T = {
|
|
|
10706
10727
|
return true;
|
|
10707
10728
|
}
|
|
10708
10729
|
},
|
|
10730
|
+
isFileListItemCommitted(item) {
|
|
10731
|
+
if (item.status === "uploading" || item.status === "fail" || item.status === "ready") {
|
|
10732
|
+
return false;
|
|
10733
|
+
}
|
|
10734
|
+
return item.response != null || !!(item.url || item.fileUrl) || item.fileId != null && !!(item.fileName || item.name);
|
|
10735
|
+
},
|
|
10709
10736
|
buildFieldModelFromFileList(fileList, currentFileCustomResult) {
|
|
10710
|
-
const list = fileList.filter((item) =>
|
|
10711
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
10737
|
+
const list = fileList.filter((item) => this.isFileListItemCommitted(item)).map((item) => {
|
|
10738
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
10712
10739
|
const res = item.response;
|
|
10713
10740
|
const d = (res == null ? void 0 : res.data) != null ? res.data : res;
|
|
10714
10741
|
if (d && (d.fileName != null || d.fileUrl != null || d.url != null)) {
|
|
10715
10742
|
return {
|
|
10716
|
-
fileName: (_b = (_a = d.fileName) != null ? _a : d.name) != null ? _b : item.name,
|
|
10717
|
-
fileId: d.fileId,
|
|
10718
|
-
fileUrl: (
|
|
10719
|
-
type: d.type,
|
|
10720
|
-
name: (
|
|
10721
|
-
url: (
|
|
10743
|
+
fileName: (_c = (_b = (_a = d.fileName) != null ? _a : d.name) != null ? _b : item.name) != null ? _c : item.fileName,
|
|
10744
|
+
fileId: (_d = d.fileId) != null ? _d : item.fileId,
|
|
10745
|
+
fileUrl: (_h = (_g = (_f = (_e = d.fileUrl) != null ? _e : d.url) != null ? _f : item.url) != null ? _g : item.fileUrl) != null ? _h : "",
|
|
10746
|
+
type: (_i = d.type) != null ? _i : item.type,
|
|
10747
|
+
name: (_l = (_k = (_j = d.fileName) != null ? _j : d.name) != null ? _k : item.name) != null ? _l : item.fileName,
|
|
10748
|
+
url: (_p = (_o = (_n = (_m = d.fileUrl) != null ? _m : d.url) != null ? _n : item.url) != null ? _o : item.fileUrl) != null ? _p : ""
|
|
10722
10749
|
};
|
|
10723
10750
|
}
|
|
10724
10751
|
return {
|
|
10725
|
-
fileName: item.name,
|
|
10726
|
-
fileId: item.uid,
|
|
10727
|
-
fileUrl: item.url
|
|
10728
|
-
type: (
|
|
10729
|
-
name: item.name,
|
|
10730
|
-
url: item.url
|
|
10752
|
+
fileName: (_q = item.name) != null ? _q : item.fileName,
|
|
10753
|
+
fileId: (_r = item.fileId) != null ? _r : item.uid,
|
|
10754
|
+
fileUrl: (_t = (_s = item.url) != null ? _s : item.fileUrl) != null ? _t : "",
|
|
10755
|
+
type: (_v = (_u = item.raw) == null ? void 0 : _u.type) != null ? _v : item.type,
|
|
10756
|
+
name: (_w = item.name) != null ? _w : item.fileName,
|
|
10757
|
+
url: (_y = (_x = item.url) != null ? _x : item.fileUrl) != null ? _y : ""
|
|
10731
10758
|
};
|
|
10732
10759
|
});
|
|
10733
10760
|
if (currentFileCustomResult && currentFileCustomResult.name && currentFileCustomResult.url) {
|
|
@@ -11019,7 +11046,7 @@ function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11019
11046
|
_: 1
|
|
11020
11047
|
}, 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"]);
|
|
11021
11048
|
}
|
|
11022
|
-
var fileUploadWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$T, [["render", _sfc_render$T], ["__scopeId", "data-v-
|
|
11049
|
+
var fileUploadWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$T, [["render", _sfc_render$T], ["__scopeId", "data-v-d1ab6ccc"]]);
|
|
11023
11050
|
var __glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11024
11051
|
__proto__: null,
|
|
11025
11052
|
"default": fileUploadWidget
|
|
@@ -26200,13 +26227,13 @@ function registerIcon(app) {
|
|
|
26200
26227
|
if (typeof window !== "undefined") {
|
|
26201
26228
|
let loadSvg = function() {
|
|
26202
26229
|
var body = document.body;
|
|
26203
|
-
var svgDom = document.getElementById("
|
|
26230
|
+
var svgDom = document.getElementById("__svg__icons__dom__1778663230306__");
|
|
26204
26231
|
if (!svgDom) {
|
|
26205
26232
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
26206
26233
|
svgDom.style.position = "absolute";
|
|
26207
26234
|
svgDom.style.width = "0";
|
|
26208
26235
|
svgDom.style.height = "0";
|
|
26209
|
-
svgDom.id = "
|
|
26236
|
+
svgDom.id = "__svg__icons__dom__1778663230306__";
|
|
26210
26237
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
26211
26238
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
26212
26239
|
}
|
|
@@ -61897,6 +61924,7 @@ const _sfc_main$6 = {
|
|
|
61897
61924
|
assetOwnerUnit: "",
|
|
61898
61925
|
labelName: ""
|
|
61899
61926
|
};
|
|
61927
|
+
this.searchValue = "";
|
|
61900
61928
|
this.$emit("close");
|
|
61901
61929
|
},
|
|
61902
61930
|
handleConfirm() {
|
|
@@ -61936,7 +61964,7 @@ const _sfc_main$6 = {
|
|
|
61936
61964
|
service$1({
|
|
61937
61965
|
method: "post",
|
|
61938
61966
|
url: "/asset-business/overview/pageList",
|
|
61939
|
-
data: __spreadProps(__spreadValues({ size: this.pageSize, current: this.currentPage, reqType: "disposal" }, this.form), { assetType: this.form.assetType === "all" ? "" : this.form.assetType })
|
|
61967
|
+
data: __spreadProps(__spreadValues({ size: this.pageSize, current: this.currentPage, reqType: "disposal" }, this.form), { assetType: this.form.assetType === "all" ? "" : this.form.assetType, systemStatusList: ["2"] })
|
|
61940
61968
|
}).then(({ data: data2 }) => {
|
|
61941
61969
|
const { records, total, current } = data2;
|
|
61942
61970
|
this.tableData = records.map((item) => {
|
|
@@ -62344,7 +62372,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
62344
62372
|
_: 1
|
|
62345
62373
|
}, 8, ["modelValue", "onClose"]);
|
|
62346
62374
|
}
|
|
62347
|
-
var AssetDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-
|
|
62375
|
+
var AssetDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-d9c3eebc"]]);
|
|
62348
62376
|
var index_vue_vue_type_style_index_0_lang$1 = "";
|
|
62349
62377
|
const _sfc_main$5 = {
|
|
62350
62378
|
name: "asset-select-widget",
|