@indfnd/common-mobile 1.0.77 → 1.0.79
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/CHANGELOG.md +10 -0
- package/dist/ind-common-mobile.es.js +300 -296
- package/dist/ind-common-mobile.umd.cjs +8 -8
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { getQuarterNum, getHalfYearNum, formatDate, useConfig, getLocalStorage,
|
|
|
3
3
|
import Vue$1 from "vue";
|
|
4
4
|
import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
|
|
5
5
|
const name$1 = "@indfnd/common-mobile";
|
|
6
|
-
const version$2 = "1.0.
|
|
6
|
+
const version$2 = "1.0.78";
|
|
7
7
|
const author$1 = "huxuetong";
|
|
8
8
|
const publishConfig = {
|
|
9
9
|
registry: "https://registry.npmjs.org/"
|
|
@@ -287,8 +287,8 @@ function getAugmentedNamespace(n) {
|
|
|
287
287
|
return n;
|
|
288
288
|
var a = Object.defineProperty({}, "__esModule", { value: true });
|
|
289
289
|
Object.keys(n).forEach(function(k) {
|
|
290
|
-
var
|
|
291
|
-
Object.defineProperty(a, k,
|
|
290
|
+
var d2 = Object.getOwnPropertyDescriptor(n, k);
|
|
291
|
+
Object.defineProperty(a, k, d2.get ? d2 : {
|
|
292
292
|
enumerable: true,
|
|
293
293
|
get: function() {
|
|
294
294
|
return n[k];
|
|
@@ -302,7 +302,7 @@ var dayjs_min = { exports: {} };
|
|
|
302
302
|
!function(t2, e) {
|
|
303
303
|
module2.exports = e();
|
|
304
304
|
}(commonjsGlobal, function() {
|
|
305
|
-
var t2 = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year",
|
|
305
|
+
var t2 = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d2 = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
|
|
306
306
|
var e2 = ["th", "st", "nd", "rd"], n2 = t3 % 100;
|
|
307
307
|
return "[" + t3 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
|
|
308
308
|
} }, m = function(t3, e2, n2) {
|
|
@@ -319,7 +319,7 @@ var dayjs_min = { exports: {} };
|
|
|
319
319
|
}, a: function(t3) {
|
|
320
320
|
return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
|
|
321
321
|
}, p: function(t3) {
|
|
322
|
-
return { M: c, y: h, w: o, d: a, D:
|
|
322
|
+
return { M: c, y: h, w: o, d: a, D: d2, h: u, m: s, s: i, ms: r, Q: f }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
|
|
323
323
|
}, u: function(t3) {
|
|
324
324
|
return void 0 === t3;
|
|
325
325
|
} }, g = "en", D = {};
|
|
@@ -409,7 +409,7 @@ var dayjs_min = { exports: {} };
|
|
|
409
409
|
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
410
410
|
return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
|
|
411
411
|
case a:
|
|
412
|
-
case
|
|
412
|
+
case d2:
|
|
413
413
|
return $2(v2 + "Hours", 0);
|
|
414
414
|
case u:
|
|
415
415
|
return $2(v2 + "Minutes", 1);
|
|
@@ -423,10 +423,10 @@ var dayjs_min = { exports: {} };
|
|
|
423
423
|
}, m2.endOf = function(t3) {
|
|
424
424
|
return this.startOf(t3, false);
|
|
425
425
|
}, m2.$set = function(t3, e2) {
|
|
426
|
-
var n2, o2 = b.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[
|
|
426
|
+
var n2, o2 = b.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d2] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
|
|
427
427
|
if (o2 === c || o2 === h) {
|
|
428
|
-
var y2 = this.clone().set(
|
|
429
|
-
y2.$d[l2]($2), y2.init(), this.$d = y2.set(
|
|
428
|
+
var y2 = this.clone().set(d2, 1);
|
|
429
|
+
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d2, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
430
430
|
} else
|
|
431
431
|
l2 && this.$d[l2]($2);
|
|
432
432
|
return this.init(), this;
|
|
@@ -435,7 +435,7 @@ var dayjs_min = { exports: {} };
|
|
|
435
435
|
}, m2.get = function(t3) {
|
|
436
436
|
return this[b.p(t3)]();
|
|
437
437
|
}, m2.add = function(r2, f2) {
|
|
438
|
-
var
|
|
438
|
+
var d3, l2 = this;
|
|
439
439
|
r2 = Number(r2);
|
|
440
440
|
var $2 = b.p(f2), y2 = function(t3) {
|
|
441
441
|
var e2 = O(l2);
|
|
@@ -449,7 +449,7 @@ var dayjs_min = { exports: {} };
|
|
|
449
449
|
return y2(1);
|
|
450
450
|
if ($2 === o)
|
|
451
451
|
return y2(7);
|
|
452
|
-
var M3 = (
|
|
452
|
+
var M3 = (d3 = {}, d3[s] = e, d3[u] = n, d3[i] = t2, d3)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
|
|
453
453
|
return b.w(m3, this);
|
|
454
454
|
}, m2.subtract = function(t3, e2) {
|
|
455
455
|
return this.add(-1 * t3, e2);
|
|
@@ -459,7 +459,7 @@ var dayjs_min = { exports: {} };
|
|
|
459
459
|
return n2.invalidDate || l;
|
|
460
460
|
var r2 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t4, n3, i3, s3) {
|
|
461
461
|
return t4 && (t4[n3] || t4(e2, r2)) || i3[n3].slice(0, s3);
|
|
462
|
-
},
|
|
462
|
+
}, d3 = function(t4) {
|
|
463
463
|
return b.s(s2 % 12 || 12, t4, "0");
|
|
464
464
|
}, $2 = f2 || function(t4, e3, n3) {
|
|
465
465
|
var r3 = t4 < 12 ? "AM" : "PM";
|
|
@@ -497,9 +497,9 @@ var dayjs_min = { exports: {} };
|
|
|
497
497
|
case "HH":
|
|
498
498
|
return b.s(s2, 2, "0");
|
|
499
499
|
case "h":
|
|
500
|
-
return
|
|
500
|
+
return d3(1);
|
|
501
501
|
case "hh":
|
|
502
|
-
return
|
|
502
|
+
return d3(2);
|
|
503
503
|
case "a":
|
|
504
504
|
return $2(s2, u2, true);
|
|
505
505
|
case "A":
|
|
@@ -522,8 +522,8 @@ var dayjs_min = { exports: {} };
|
|
|
522
522
|
});
|
|
523
523
|
}, m2.utcOffset = function() {
|
|
524
524
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
525
|
-
}, m2.diff = function(r2,
|
|
526
|
-
var $2, y2 = this, M3 = b.p(
|
|
525
|
+
}, m2.diff = function(r2, d3, l2) {
|
|
526
|
+
var $2, y2 = this, M3 = b.p(d3), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
|
|
527
527
|
return b.m(y2, m3);
|
|
528
528
|
};
|
|
529
529
|
switch (M3) {
|
|
@@ -576,7 +576,7 @@ var dayjs_min = { exports: {} };
|
|
|
576
576
|
return this.$d.toUTCString();
|
|
577
577
|
}, M2;
|
|
578
578
|
}(), k = _2.prototype;
|
|
579
|
-
return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D",
|
|
579
|
+
return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d2]].forEach(function(t3) {
|
|
580
580
|
k[t3[1]] = function(e2) {
|
|
581
581
|
return this.$g(e2, t3[0], t3[1]);
|
|
582
582
|
};
|
|
@@ -713,7 +713,7 @@ const __vue2_script$I = {
|
|
|
713
713
|
}
|
|
714
714
|
},
|
|
715
715
|
methods: {
|
|
716
|
-
emitValue(
|
|
716
|
+
emitValue(d2, index2) {
|
|
717
717
|
let v;
|
|
718
718
|
if (this.type == "year-month") {
|
|
719
719
|
v = dayjs(this.dateValue).format("YYYYMM");
|
|
@@ -721,10 +721,10 @@ const __vue2_script$I = {
|
|
|
721
721
|
v = dayjs(this.dateValue).format("YYYYMMDD");
|
|
722
722
|
} else if (this.type == "year-quarter") {
|
|
723
723
|
let quarter = this.quarterList[index2[1]];
|
|
724
|
-
v = `${
|
|
724
|
+
v = `${d2[0]}${quarter.value}`;
|
|
725
725
|
} else if (this.type == "year-half") {
|
|
726
726
|
let half = this.halfList[index2[1]];
|
|
727
|
-
v = `${
|
|
727
|
+
v = `${d2[0]}${half.value}`;
|
|
728
728
|
}
|
|
729
729
|
this.$emit("input", v);
|
|
730
730
|
},
|
|
@@ -732,9 +732,9 @@ const __vue2_script$I = {
|
|
|
732
732
|
this.dateValue = new Date();
|
|
733
733
|
this.$emit("input", "");
|
|
734
734
|
},
|
|
735
|
-
confirm(
|
|
736
|
-
this.dateValue =
|
|
737
|
-
this.emitValue(
|
|
735
|
+
confirm(d2, index2) {
|
|
736
|
+
this.dateValue = d2;
|
|
737
|
+
this.emitValue(d2, index2);
|
|
738
738
|
this.visible = false;
|
|
739
739
|
},
|
|
740
740
|
cancel() {
|
|
@@ -785,8 +785,8 @@ function renderTable(table, isTransfer) {
|
|
|
785
785
|
if (!(columnSrc instanceof Array)) {
|
|
786
786
|
columnSrc = [columnSrc];
|
|
787
787
|
}
|
|
788
|
-
columnSrc = columnSrc.map((
|
|
789
|
-
let rlt = { ...
|
|
788
|
+
columnSrc = columnSrc.map((d2) => {
|
|
789
|
+
let rlt = { ...d2._attributes };
|
|
790
790
|
rlt.id = isTransfer ? dealFieldFormat(rlt.id) : rlt.id;
|
|
791
791
|
let props = rlt.props;
|
|
792
792
|
if (props) {
|
|
@@ -810,46 +810,46 @@ function renderTable(table, isTransfer) {
|
|
|
810
810
|
rlt.enumList = enumList;
|
|
811
811
|
return rlt;
|
|
812
812
|
});
|
|
813
|
-
let columns2 = columnSrc.filter((
|
|
814
|
-
return
|
|
815
|
-
}).map((
|
|
813
|
+
let columns2 = columnSrc.filter((d2) => {
|
|
814
|
+
return d2.frontHide != "true";
|
|
815
|
+
}).map((d2) => {
|
|
816
816
|
return {
|
|
817
|
-
...
|
|
818
|
-
title:
|
|
817
|
+
...d2,
|
|
818
|
+
title: d2.name,
|
|
819
819
|
width: 200,
|
|
820
|
-
field:
|
|
820
|
+
field: d2.id,
|
|
821
821
|
sortable: true,
|
|
822
|
-
align:
|
|
823
|
-
type:
|
|
822
|
+
align: d2.type == "INTEGER" ? "right" : "left",
|
|
823
|
+
type: d2.inputType || null
|
|
824
824
|
};
|
|
825
825
|
});
|
|
826
|
-
let searchFormFields = columnSrc.filter((
|
|
827
|
-
return
|
|
828
|
-
}).map((
|
|
826
|
+
let searchFormFields = columnSrc.filter((d2) => {
|
|
827
|
+
return d2.listSearch == "true";
|
|
828
|
+
}).map((d2) => {
|
|
829
829
|
return {
|
|
830
|
-
...
|
|
831
|
-
formKey:
|
|
832
|
-
title:
|
|
833
|
-
type:
|
|
830
|
+
...d2,
|
|
831
|
+
formKey: d2.id,
|
|
832
|
+
title: d2.name,
|
|
833
|
+
type: d2.searchType || "input"
|
|
834
834
|
};
|
|
835
835
|
});
|
|
836
|
-
let formFieldList = columnSrc.filter((
|
|
837
|
-
return
|
|
838
|
-
}).map((
|
|
836
|
+
let formFieldList = columnSrc.filter((d2) => {
|
|
837
|
+
return d2.frontHide != "true";
|
|
838
|
+
}).map((d2) => {
|
|
839
839
|
return {
|
|
840
|
-
...
|
|
841
|
-
formKey:
|
|
842
|
-
title:
|
|
843
|
-
isTitle:
|
|
844
|
-
type:
|
|
845
|
-
required:
|
|
840
|
+
...d2,
|
|
841
|
+
formKey: d2.id,
|
|
842
|
+
title: d2.name,
|
|
843
|
+
isTitle: d2.isTitle === "true",
|
|
844
|
+
type: d2.inputType || null,
|
|
845
|
+
required: d2.required === "true"
|
|
846
846
|
};
|
|
847
847
|
});
|
|
848
848
|
let subTableSrc = table.table;
|
|
849
849
|
let subTable = null;
|
|
850
850
|
if (subTableSrc) {
|
|
851
851
|
if (subTableSrc instanceof Array) {
|
|
852
|
-
subTable = subTableSrc.map((
|
|
852
|
+
subTable = subTableSrc.map((d2) => renderTable(d2));
|
|
853
853
|
} else {
|
|
854
854
|
subTable = [renderTable(subTableSrc)];
|
|
855
855
|
}
|
|
@@ -1288,44 +1288,44 @@ var FormImpl = {
|
|
|
1288
1288
|
computed: {
|
|
1289
1289
|
ruleValidate() {
|
|
1290
1290
|
let validateList = {};
|
|
1291
|
-
_.forEach(this.fieldList, (
|
|
1291
|
+
_.forEach(this.fieldList, (d2) => {
|
|
1292
1292
|
var _a, _b;
|
|
1293
|
-
const required =
|
|
1293
|
+
const required = d2.required instanceof Function ? d2.required(this.form) : d2.required;
|
|
1294
1294
|
if (required) {
|
|
1295
1295
|
let validateTmp = {
|
|
1296
1296
|
required: true,
|
|
1297
|
-
message:
|
|
1297
|
+
message: d2.title + "\u4E0D\u80FD\u4E3A\u7A7A",
|
|
1298
1298
|
trigger: "blur"
|
|
1299
1299
|
};
|
|
1300
|
-
if (
|
|
1301
|
-
validateTmp.validator =
|
|
1300
|
+
if (d2.validate) {
|
|
1301
|
+
validateTmp.validator = d2.validate;
|
|
1302
1302
|
}
|
|
1303
|
-
if (["number"].includes(
|
|
1303
|
+
if (["number"].includes(d2.type)) {
|
|
1304
1304
|
validateTmp.type = "number";
|
|
1305
|
-
} else if (["checkbox", "treeselect", "fileUpload", "imgUpload"].includes(
|
|
1305
|
+
} else if (["checkbox", "treeselect", "fileUpload", "imgUpload"].includes(d2.type) || "select" === d2.type && ((_a = d2.props) == null ? void 0 : _a.multiple)) {
|
|
1306
1306
|
validateTmp.type = "array";
|
|
1307
|
-
} else if (["datepicker"].includes(
|
|
1308
|
-
const props =
|
|
1307
|
+
} else if (["datepicker"].includes(d2.type)) {
|
|
1308
|
+
const props = d2.props;
|
|
1309
1309
|
const isRange = (_b = props == null ? void 0 : props.type) == null ? void 0 : _b.includes("range");
|
|
1310
1310
|
if (isRange) {
|
|
1311
1311
|
validateTmp.type = "array";
|
|
1312
1312
|
validateTmp.len = "2";
|
|
1313
1313
|
validateTmp.fields = {
|
|
1314
|
-
0: { type: "string", required: true, message:
|
|
1315
|
-
1: { type: "string", required: true, message:
|
|
1314
|
+
0: { type: "string", required: true, message: d2.title + "\u7684\u5F00\u59CB\u65E5\u671F\u4E0D\u80FD\u4E3A\u7A7A" },
|
|
1315
|
+
1: { type: "string", required: true, message: d2.title + "\u7684\u7ED3\u675F\u65E5\u671F\u4E0D\u80FD\u4E3A\u7A7A" }
|
|
1316
1316
|
};
|
|
1317
1317
|
} else {
|
|
1318
1318
|
validateTmp.type = "string";
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
|
-
if ("treeselect".includes(
|
|
1321
|
+
if ("treeselect".includes(d2.type)) {
|
|
1322
1322
|
validateTmp.trigger = "custom";
|
|
1323
1323
|
}
|
|
1324
|
-
validateList[
|
|
1324
|
+
validateList[d2.formKey] = [validateTmp];
|
|
1325
1325
|
}
|
|
1326
|
-
if (
|
|
1327
|
-
validateList[
|
|
1328
|
-
validateList[
|
|
1326
|
+
if (d2.type == "idcard") {
|
|
1327
|
+
validateList[d2.formKey] = validateList[d2.formKey] || [];
|
|
1328
|
+
validateList[d2.formKey].push({
|
|
1329
1329
|
validator: (rule, value17, callback2) => {
|
|
1330
1330
|
let checkRlt = checkIdCard(value17);
|
|
1331
1331
|
if (!value17 || checkRlt == "\u9A8C\u8BC1\u901A\u8FC7!") {
|
|
@@ -1336,9 +1336,9 @@ var FormImpl = {
|
|
|
1336
1336
|
},
|
|
1337
1337
|
trigger: "blur"
|
|
1338
1338
|
});
|
|
1339
|
-
} else if (
|
|
1340
|
-
validateList[
|
|
1341
|
-
validateList[
|
|
1339
|
+
} else if (d2.type == "vehicleNo") {
|
|
1340
|
+
validateList[d2.formKey] = validateList[d2.formKey] || [];
|
|
1341
|
+
validateList[d2.formKey].push({
|
|
1342
1342
|
validator: (rule, value17, callback2) => {
|
|
1343
1343
|
if (!value17 || checkVehicleNo(value17)) {
|
|
1344
1344
|
callback2();
|
|
@@ -1348,9 +1348,9 @@ var FormImpl = {
|
|
|
1348
1348
|
},
|
|
1349
1349
|
trigger: "blur"
|
|
1350
1350
|
});
|
|
1351
|
-
} else if (
|
|
1352
|
-
validateList[
|
|
1353
|
-
validateList[
|
|
1351
|
+
} else if (d2.type == "phone") {
|
|
1352
|
+
validateList[d2.formKey] = validateList[d2.formKey] || [];
|
|
1353
|
+
validateList[d2.formKey].push({
|
|
1354
1354
|
validator: (rule, value17, callback2) => {
|
|
1355
1355
|
if (!value17 || checkPhone(value17)) {
|
|
1356
1356
|
callback2();
|
|
@@ -1360,9 +1360,9 @@ var FormImpl = {
|
|
|
1360
1360
|
},
|
|
1361
1361
|
trigger: "blur"
|
|
1362
1362
|
});
|
|
1363
|
-
} else if (
|
|
1364
|
-
validateList[
|
|
1365
|
-
validateList[
|
|
1363
|
+
} else if (d2.type == "email") {
|
|
1364
|
+
validateList[d2.formKey] = validateList[d2.formKey] || [];
|
|
1365
|
+
validateList[d2.formKey].push({
|
|
1366
1366
|
type: "email",
|
|
1367
1367
|
message: "\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u683C\u5F0F",
|
|
1368
1368
|
trigger: "blur"
|
|
@@ -1403,9 +1403,9 @@ var FormImpl = {
|
|
|
1403
1403
|
methods: {
|
|
1404
1404
|
initDictData() {
|
|
1405
1405
|
let enumListRlt = [];
|
|
1406
|
-
this.fieldList.forEach((
|
|
1407
|
-
if (
|
|
1408
|
-
enumListRlt.push(
|
|
1406
|
+
this.fieldList.forEach((d2) => {
|
|
1407
|
+
if (d2.enumKey) {
|
|
1408
|
+
enumListRlt.push(d2.enumKey);
|
|
1409
1409
|
}
|
|
1410
1410
|
});
|
|
1411
1411
|
this.enumList = enumListRlt;
|
|
@@ -1442,28 +1442,33 @@ var FormImpl = {
|
|
|
1442
1442
|
spanList = _.fill(_.range(Math.max(4, this.fieldList.length)), 6);
|
|
1443
1443
|
} else {
|
|
1444
1444
|
spanList = _.fill(_.range(this.fieldList.length), this.defaultSpan);
|
|
1445
|
-
_.forEach(this.fieldList, (
|
|
1446
|
-
if (
|
|
1447
|
-
spanList[idx] = parseInt(
|
|
1448
|
-
} else if (["textarea", "fileUpload", "imgUpload"].includes(
|
|
1445
|
+
_.forEach(this.fieldList, (d2, idx) => {
|
|
1446
|
+
if (d2.span) {
|
|
1447
|
+
spanList[idx] = parseInt(d2.span);
|
|
1448
|
+
} else if (["textarea", "fileUpload", "imgUpload"].includes(d2.type)) {
|
|
1449
1449
|
spanList[idx] = 24;
|
|
1450
1450
|
}
|
|
1451
|
-
let conditionFlag =
|
|
1451
|
+
let conditionFlag = d2.condition instanceof Function ? d2.condition(this.form) : d2.condition !== false;
|
|
1452
1452
|
if (!conditionFlag) {
|
|
1453
1453
|
spanList[idx] = 0;
|
|
1454
1454
|
}
|
|
1455
1455
|
});
|
|
1456
1456
|
}
|
|
1457
1457
|
let renderFieldList = _.cloneDeep(this.fieldList);
|
|
1458
|
+
_.forEach(renderFieldList, (field) => {
|
|
1459
|
+
if (field.class && typeof (field == null ? void 0 : field.class) == "function") {
|
|
1460
|
+
field.class = field.class(this.form);
|
|
1461
|
+
}
|
|
1462
|
+
});
|
|
1458
1463
|
if (this.formType == "card") {
|
|
1459
|
-
let titleField = _.remove(renderFieldList, (
|
|
1460
|
-
return
|
|
1464
|
+
let titleField = _.remove(renderFieldList, (d2) => {
|
|
1465
|
+
return d2.isTitle === "true" || d2.isTitle === true;
|
|
1461
1466
|
})[0];
|
|
1462
|
-
let subTitleField = _.remove(renderFieldList, (
|
|
1463
|
-
return
|
|
1467
|
+
let subTitleField = _.remove(renderFieldList, (d2) => {
|
|
1468
|
+
return d2.isSubTitle === "true" || d2.isSubTitle === true;
|
|
1464
1469
|
})[0];
|
|
1465
|
-
let statusField = _.remove(renderFieldList, (
|
|
1466
|
-
return
|
|
1470
|
+
let statusField = _.remove(renderFieldList, (d2) => {
|
|
1471
|
+
return d2.isStatus === "true" || d2.isStatus === true;
|
|
1467
1472
|
})[0];
|
|
1468
1473
|
let statusText = this.form[statusField == null ? void 0 : statusField.formKey];
|
|
1469
1474
|
if (statusField.enumKey) {
|
|
@@ -1522,14 +1527,14 @@ var FormImpl = {
|
|
|
1522
1527
|
h(
|
|
1523
1528
|
"div",
|
|
1524
1529
|
{
|
|
1525
|
-
class: "ind-page-title"
|
|
1530
|
+
class: "ind-page-title" + (d.class || "")
|
|
1526
1531
|
},
|
|
1527
1532
|
[this.form[titleField == null ? void 0 : titleField.formKey]]
|
|
1528
1533
|
),
|
|
1529
1534
|
h(
|
|
1530
1535
|
"div",
|
|
1531
1536
|
{
|
|
1532
|
-
class: "ind-page-sub-title"
|
|
1537
|
+
class: "ind-page-sub-title" + (d.class || "")
|
|
1533
1538
|
},
|
|
1534
1539
|
[
|
|
1535
1540
|
(subTitleField == null ? void 0 : subTitleField.dateFormat) ? formatDate(this.form[subTitleField == null ? void 0 : subTitleField.formKey]) : this.form[subTitleField == null ? void 0 : subTitleField.formKey]
|
|
@@ -1552,11 +1557,11 @@ var FormImpl = {
|
|
|
1552
1557
|
)
|
|
1553
1558
|
);
|
|
1554
1559
|
} else if (this.formType == "card2") {
|
|
1555
|
-
let titleField = _.remove(renderFieldList, (
|
|
1556
|
-
return
|
|
1560
|
+
let titleField = _.remove(renderFieldList, (d2) => {
|
|
1561
|
+
return d2.isTitle === "true" || d2.isTitle === true;
|
|
1557
1562
|
})[0];
|
|
1558
|
-
let subTitleField = _.remove(renderFieldList, (
|
|
1559
|
-
return
|
|
1563
|
+
let subTitleField = _.remove(renderFieldList, (d2) => {
|
|
1564
|
+
return d2.isSubTitle === "true" || d2.isSubTitle === true;
|
|
1560
1565
|
})[0];
|
|
1561
1566
|
formItems.push(
|
|
1562
1567
|
h(
|
|
@@ -1594,14 +1599,14 @@ var FormImpl = {
|
|
|
1594
1599
|
h(
|
|
1595
1600
|
"div",
|
|
1596
1601
|
{
|
|
1597
|
-
class: "ind-page-title"
|
|
1602
|
+
class: "ind-page-title" + (d.class || "")
|
|
1598
1603
|
},
|
|
1599
1604
|
[this.form[titleField == null ? void 0 : titleField.formKey]]
|
|
1600
1605
|
),
|
|
1601
1606
|
h(
|
|
1602
1607
|
"div",
|
|
1603
1608
|
{
|
|
1604
|
-
class: "ind-page-sub-title"
|
|
1609
|
+
class: "ind-page-sub-title" + (d.class || "")
|
|
1605
1610
|
},
|
|
1606
1611
|
[
|
|
1607
1612
|
(subTitleField == null ? void 0 : subTitleField.formatDate) ? formatDate(this.form[subTitleField == null ? void 0 : subTitleField.formKey]) : this.form[subTitleField == null ? void 0 : subTitleField.formKey]
|
|
@@ -1618,33 +1623,33 @@ var FormImpl = {
|
|
|
1618
1623
|
);
|
|
1619
1624
|
}
|
|
1620
1625
|
let diff = this.fieldList.length - renderFieldList.length;
|
|
1621
|
-
_.forEach(renderFieldList, (
|
|
1626
|
+
_.forEach(renderFieldList, (d2, idx) => {
|
|
1622
1627
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n;
|
|
1623
1628
|
let itemInner;
|
|
1624
|
-
if (
|
|
1625
|
-
itemInner =
|
|
1629
|
+
if (d2.render) {
|
|
1630
|
+
itemInner = d2.render(h, d2, this.form);
|
|
1626
1631
|
} else {
|
|
1627
|
-
const disabled =
|
|
1628
|
-
switch (
|
|
1632
|
+
const disabled = d2.disabled instanceof Function ? d2.disabled(this.form) : d2.disabled;
|
|
1633
|
+
switch (d2.type) {
|
|
1629
1634
|
case "input":
|
|
1630
1635
|
case "email":
|
|
1631
1636
|
case "phone":
|
|
1632
1637
|
case "vehicleNo":
|
|
1633
1638
|
case "idcard": {
|
|
1634
1639
|
itemInner = h("Input", {
|
|
1635
|
-
ref:
|
|
1640
|
+
ref: d2.formKey,
|
|
1636
1641
|
props: {
|
|
1637
|
-
placeholder: `\u8BF7\u8F93\u5165${
|
|
1638
|
-
...
|
|
1639
|
-
value: this.form[
|
|
1642
|
+
placeholder: `\u8BF7\u8F93\u5165${d2.title}`,
|
|
1643
|
+
...d2.props,
|
|
1644
|
+
value: this.form[d2.formKey],
|
|
1640
1645
|
disabled
|
|
1641
1646
|
},
|
|
1642
1647
|
on: {
|
|
1643
1648
|
input: (val) => {
|
|
1644
|
-
this.form[
|
|
1649
|
+
this.form[d2.formKey] = val;
|
|
1645
1650
|
this.$emit("input", this.form);
|
|
1646
1651
|
this.$nextTick().then(() => {
|
|
1647
|
-
this.$emit("fieldChange", { formKey:
|
|
1652
|
+
this.$emit("fieldChange", { formKey: d2.formKey, row: this.form });
|
|
1648
1653
|
});
|
|
1649
1654
|
},
|
|
1650
1655
|
"on-focus": (e) => {
|
|
@@ -1655,18 +1660,18 @@ var FormImpl = {
|
|
|
1655
1660
|
break;
|
|
1656
1661
|
}
|
|
1657
1662
|
case "number": {
|
|
1658
|
-
let text = this.form[
|
|
1659
|
-
if (
|
|
1660
|
-
text = isNaN(text) || text === null ? text : parseFloat(parseFloat(text).toFixed(
|
|
1663
|
+
let text = this.form[d2.formKey];
|
|
1664
|
+
if (d2.scale !== void 0) {
|
|
1665
|
+
text = isNaN(text) || text === null ? text : parseFloat(parseFloat(text).toFixed(d2.scale));
|
|
1661
1666
|
}
|
|
1662
1667
|
itemInner = h("Input", {
|
|
1663
|
-
ref:
|
|
1668
|
+
ref: d2.formKey,
|
|
1664
1669
|
attrs: {
|
|
1665
1670
|
title: ""
|
|
1666
1671
|
},
|
|
1667
1672
|
props: {
|
|
1668
1673
|
placeholder: `\u8BF7\u8F93\u5165\u6570\u5B57`,
|
|
1669
|
-
...
|
|
1674
|
+
...d2.props,
|
|
1670
1675
|
value: text,
|
|
1671
1676
|
disabled,
|
|
1672
1677
|
type: "number"
|
|
@@ -1677,13 +1682,13 @@ var FormImpl = {
|
|
|
1677
1682
|
let v = event.target.value;
|
|
1678
1683
|
let formatRlt = /(-?)(\d{1,10})(\d{0,999})(\.\d{1,6})?/.exec(v);
|
|
1679
1684
|
if (formatRlt && formatRlt.length) {
|
|
1680
|
-
v = (((_a3 =
|
|
1685
|
+
v = (((_a3 = d2 == null ? void 0 : d2.props) == null ? void 0 : _a3.enableNegative) ? formatRlt[1] : "") + formatRlt[2] + (formatRlt[4] || "");
|
|
1681
1686
|
}
|
|
1682
|
-
this.form[
|
|
1683
|
-
this.$refs[
|
|
1687
|
+
this.form[d2.formKey] = parseFloat(v);
|
|
1688
|
+
this.$refs[d2.formKey] && this.$refs[d2.formKey].setCurrentValue(v);
|
|
1684
1689
|
this.$emit("input", this.form);
|
|
1685
1690
|
this.$nextTick().then(() => {
|
|
1686
|
-
this.$emit("fieldChange", { formKey:
|
|
1691
|
+
this.$emit("fieldChange", { formKey: d2.formKey, row: this.form });
|
|
1687
1692
|
});
|
|
1688
1693
|
},
|
|
1689
1694
|
"on-focus": (e) => {
|
|
@@ -1696,23 +1701,23 @@ var FormImpl = {
|
|
|
1696
1701
|
}
|
|
1697
1702
|
case "textarea": {
|
|
1698
1703
|
itemInner = h("Input", {
|
|
1699
|
-
ref:
|
|
1704
|
+
ref: d2.formKey,
|
|
1700
1705
|
props: {
|
|
1701
|
-
placeholder: `\u8BF7\u8F93\u5165${
|
|
1702
|
-
...
|
|
1703
|
-
value: this.form[
|
|
1706
|
+
placeholder: `\u8BF7\u8F93\u5165${d2.title}`,
|
|
1707
|
+
...d2.props,
|
|
1708
|
+
value: this.form[d2.formKey],
|
|
1704
1709
|
disabled,
|
|
1705
1710
|
type: "textarea",
|
|
1706
|
-
rows: ((_a2 =
|
|
1707
|
-
maxlength: ((_b2 =
|
|
1708
|
-
showWordLimit: ((_c2 =
|
|
1711
|
+
rows: ((_a2 = d2.props) == null ? void 0 : _a2.rows) || 3,
|
|
1712
|
+
maxlength: ((_b2 = d2.props) == null ? void 0 : _b2.maxlength) || 1024,
|
|
1713
|
+
showWordLimit: ((_c2 = d2.props) == null ? void 0 : _c2.showWordLimit) || true
|
|
1709
1714
|
},
|
|
1710
1715
|
on: {
|
|
1711
1716
|
input: (val) => {
|
|
1712
|
-
this.form[
|
|
1717
|
+
this.form[d2.formKey] = val;
|
|
1713
1718
|
this.$emit("input", this.form);
|
|
1714
1719
|
this.$nextTick().then(() => {
|
|
1715
|
-
this.$emit("fieldChange", { formKey:
|
|
1720
|
+
this.$emit("fieldChange", { formKey: d2.formKey, row: this.form });
|
|
1716
1721
|
});
|
|
1717
1722
|
},
|
|
1718
1723
|
"on-focus": (e) => {
|
|
@@ -1724,28 +1729,28 @@ var FormImpl = {
|
|
|
1724
1729
|
}
|
|
1725
1730
|
case "select": {
|
|
1726
1731
|
itemInner = h("IndMInputSelect", {
|
|
1727
|
-
ref:
|
|
1732
|
+
ref: d2.formKey,
|
|
1728
1733
|
props: {
|
|
1729
|
-
title:
|
|
1730
|
-
options:
|
|
1731
|
-
...
|
|
1732
|
-
value: this.form[
|
|
1734
|
+
title: d2.title,
|
|
1735
|
+
options: d2.enumListFn ? d2.enumListFn(this.form) : d2.enumList || ((_d2 = this.enumData[d2.enumKey]) == null ? void 0 : _d2.enumList) || [],
|
|
1736
|
+
...d2.props || {},
|
|
1737
|
+
value: this.form[d2.formKey],
|
|
1733
1738
|
disabled
|
|
1734
1739
|
},
|
|
1735
1740
|
attrs: {
|
|
1736
|
-
...
|
|
1741
|
+
...d2.props,
|
|
1737
1742
|
noTriggerInDefault: true
|
|
1738
1743
|
},
|
|
1739
1744
|
on: {
|
|
1740
1745
|
input: (val) => {
|
|
1741
|
-
this.form[
|
|
1746
|
+
this.form[d2.formKey] = val;
|
|
1742
1747
|
this.$emit("input", this.form);
|
|
1743
1748
|
this.$nextTick().then(() => {
|
|
1744
|
-
this.$emit("fieldChange", { formKey:
|
|
1749
|
+
this.$emit("fieldChange", { formKey: d2.formKey, row: this.form });
|
|
1745
1750
|
});
|
|
1746
|
-
const required =
|
|
1751
|
+
const required = d2.required instanceof Function ? d2.required(this.form) : d2.required;
|
|
1747
1752
|
if (required) {
|
|
1748
|
-
this.$refs.form.validateField(
|
|
1753
|
+
this.$refs.form.validateField(d2.formKey);
|
|
1749
1754
|
}
|
|
1750
1755
|
}
|
|
1751
1756
|
}
|
|
@@ -1756,37 +1761,37 @@ var FormImpl = {
|
|
|
1756
1761
|
itemInner = h(
|
|
1757
1762
|
"CheckboxGroup",
|
|
1758
1763
|
{
|
|
1759
|
-
ref:
|
|
1764
|
+
ref: d2.formKey,
|
|
1760
1765
|
props: {
|
|
1761
|
-
...
|
|
1762
|
-
value: this.form[
|
|
1766
|
+
...d2.props,
|
|
1767
|
+
value: this.form[d2.formKey]
|
|
1763
1768
|
},
|
|
1764
1769
|
on: {
|
|
1765
1770
|
input: (val) => {
|
|
1766
|
-
this.form[
|
|
1771
|
+
this.form[d2.formKey] = val;
|
|
1767
1772
|
this.$emit("input", this.form);
|
|
1768
1773
|
this.$nextTick().then(() => {
|
|
1769
|
-
this.$emit("fieldChange", { formKey:
|
|
1774
|
+
this.$emit("fieldChange", { formKey: d2.formKey, row: this.form });
|
|
1770
1775
|
});
|
|
1771
|
-
const required =
|
|
1776
|
+
const required = d2.required instanceof Function ? d2.required(this.form) : d2.required;
|
|
1772
1777
|
if (required) {
|
|
1773
1778
|
this.$nextTick(() => {
|
|
1774
|
-
this.$refs.form.validateField(
|
|
1779
|
+
this.$refs.form.validateField(d2.formKey);
|
|
1775
1780
|
});
|
|
1776
1781
|
}
|
|
1777
1782
|
}
|
|
1778
1783
|
}
|
|
1779
1784
|
},
|
|
1780
|
-
(
|
|
1785
|
+
(d2.enumList || ((_e2 = this.enumData[d2.enumKey]) == null ? void 0 : _e2.enumList) || []).map((d3) => {
|
|
1781
1786
|
return h(
|
|
1782
1787
|
"Checkbox",
|
|
1783
1788
|
{
|
|
1784
1789
|
props: {
|
|
1785
|
-
label:
|
|
1790
|
+
label: d3.K,
|
|
1786
1791
|
disabled
|
|
1787
1792
|
}
|
|
1788
1793
|
},
|
|
1789
|
-
[
|
|
1794
|
+
[d3.V]
|
|
1790
1795
|
);
|
|
1791
1796
|
})
|
|
1792
1797
|
);
|
|
@@ -1794,23 +1799,23 @@ var FormImpl = {
|
|
|
1794
1799
|
}
|
|
1795
1800
|
case "selectbtn": {
|
|
1796
1801
|
itemInner = h("IndMSelectBtn", {
|
|
1797
|
-
ref:
|
|
1802
|
+
ref: d2.formKey,
|
|
1798
1803
|
props: {
|
|
1799
|
-
...
|
|
1800
|
-
options:
|
|
1801
|
-
value: this.form[
|
|
1804
|
+
...d2.props,
|
|
1805
|
+
options: d2.enumList || ((_f2 = this.enumData[d2.enumKey]) == null ? void 0 : _f2.enumList) || [],
|
|
1806
|
+
value: this.form[d2.formKey]
|
|
1802
1807
|
},
|
|
1803
1808
|
on: {
|
|
1804
1809
|
input: (val) => {
|
|
1805
|
-
this.form[
|
|
1810
|
+
this.form[d2.formKey] = val;
|
|
1806
1811
|
this.$emit("input", this.form);
|
|
1807
1812
|
this.$nextTick().then(() => {
|
|
1808
|
-
this.$emit("fieldChange", { formKey:
|
|
1813
|
+
this.$emit("fieldChange", { formKey: d2.formKey, row: this.form });
|
|
1809
1814
|
});
|
|
1810
|
-
const required =
|
|
1815
|
+
const required = d2.required instanceof Function ? d2.required(this.form) : d2.required;
|
|
1811
1816
|
if (required) {
|
|
1812
1817
|
this.$nextTick(() => {
|
|
1813
|
-
this.$refs.form.validateField(
|
|
1818
|
+
this.$refs.form.validateField(d2.formKey);
|
|
1814
1819
|
});
|
|
1815
1820
|
}
|
|
1816
1821
|
}
|
|
@@ -1822,37 +1827,37 @@ var FormImpl = {
|
|
|
1822
1827
|
itemInner = h(
|
|
1823
1828
|
"RadioGroup",
|
|
1824
1829
|
{
|
|
1825
|
-
ref:
|
|
1830
|
+
ref: d2.formKey,
|
|
1826
1831
|
props: {
|
|
1827
|
-
...
|
|
1828
|
-
value: this.form[
|
|
1832
|
+
...d2.props,
|
|
1833
|
+
value: this.form[d2.formKey]
|
|
1829
1834
|
},
|
|
1830
1835
|
on: {
|
|
1831
1836
|
input: (val) => {
|
|
1832
|
-
this.form[
|
|
1837
|
+
this.form[d2.formKey] = val;
|
|
1833
1838
|
this.$emit("input", this.form);
|
|
1834
1839
|
this.$nextTick().then(() => {
|
|
1835
|
-
this.$emit("fieldChange", { formKey:
|
|
1840
|
+
this.$emit("fieldChange", { formKey: d2.formKey, row: this.form });
|
|
1836
1841
|
});
|
|
1837
|
-
const required =
|
|
1842
|
+
const required = d2.required instanceof Function ? d2.required(this.form) : d2.required;
|
|
1838
1843
|
if (required) {
|
|
1839
1844
|
this.$nextTick(() => {
|
|
1840
|
-
this.$refs.form.validateField(
|
|
1845
|
+
this.$refs.form.validateField(d2.formKey);
|
|
1841
1846
|
});
|
|
1842
1847
|
}
|
|
1843
1848
|
}
|
|
1844
1849
|
}
|
|
1845
1850
|
},
|
|
1846
|
-
(
|
|
1851
|
+
(d2.enumList || ((_g2 = this.enumData[d2.enumKey]) == null ? void 0 : _g2.enumList) || []).map((d3) => {
|
|
1847
1852
|
return h(
|
|
1848
1853
|
"Radio",
|
|
1849
1854
|
{
|
|
1850
1855
|
props: {
|
|
1851
|
-
label:
|
|
1856
|
+
label: d3.K,
|
|
1852
1857
|
disabled
|
|
1853
1858
|
}
|
|
1854
1859
|
},
|
|
1855
|
-
[
|
|
1860
|
+
[d3.V]
|
|
1856
1861
|
);
|
|
1857
1862
|
})
|
|
1858
1863
|
);
|
|
@@ -1860,29 +1865,29 @@ var FormImpl = {
|
|
|
1860
1865
|
}
|
|
1861
1866
|
case "datepicker": {
|
|
1862
1867
|
itemInner = h("IndMDatePicker", {
|
|
1863
|
-
ref:
|
|
1868
|
+
ref: d2.formKey,
|
|
1864
1869
|
props: {
|
|
1865
|
-
value: this.form[
|
|
1866
|
-
type: ((_h =
|
|
1870
|
+
value: this.form[d2.formKey],
|
|
1871
|
+
type: ((_h = d2.props) == null ? void 0 : _h.type) || "date"
|
|
1867
1872
|
},
|
|
1868
1873
|
attrs: {
|
|
1869
|
-
...
|
|
1870
|
-
placeholder: "\u8BF7\u9009\u62E9" +
|
|
1871
|
-
minDate:
|
|
1872
|
-
maxDate:
|
|
1874
|
+
...d2.props,
|
|
1875
|
+
placeholder: "\u8BF7\u9009\u62E9" + d2.title,
|
|
1876
|
+
minDate: d2.minDate,
|
|
1877
|
+
maxDate: d2.maxDate,
|
|
1873
1878
|
disabled
|
|
1874
1879
|
},
|
|
1875
1880
|
on: {
|
|
1876
1881
|
input: (val) => {
|
|
1877
|
-
this.form[
|
|
1882
|
+
this.form[d2.formKey] = val;
|
|
1878
1883
|
this.$emit("input", this.form);
|
|
1879
1884
|
this.$nextTick().then(() => {
|
|
1880
|
-
this.$emit("fieldChange", { formKey:
|
|
1885
|
+
this.$emit("fieldChange", { formKey: d2.formKey, row: this.form });
|
|
1881
1886
|
});
|
|
1882
|
-
const required =
|
|
1887
|
+
const required = d2.required instanceof Function ? d2.required(this.form) : d2.required;
|
|
1883
1888
|
if (required) {
|
|
1884
1889
|
this.$nextTick(() => {
|
|
1885
|
-
this.$refs.form.validateField(
|
|
1890
|
+
this.$refs.form.validateField(d2.formKey);
|
|
1886
1891
|
});
|
|
1887
1892
|
}
|
|
1888
1893
|
}
|
|
@@ -1892,36 +1897,36 @@ var FormImpl = {
|
|
|
1892
1897
|
}
|
|
1893
1898
|
case "timepicker": {
|
|
1894
1899
|
itemInner = h("TimePicker", {
|
|
1895
|
-
ref:
|
|
1900
|
+
ref: d2.formKey,
|
|
1896
1901
|
props: {
|
|
1897
|
-
...
|
|
1898
|
-
type: ((_i =
|
|
1899
|
-
value: this.form[
|
|
1902
|
+
...d2.props || {},
|
|
1903
|
+
type: ((_i = d2.props) == null ? void 0 : _i.type) || "time",
|
|
1904
|
+
value: this.form[d2.formKey]
|
|
1900
1905
|
},
|
|
1901
1906
|
attrs: {
|
|
1902
1907
|
confirm: true,
|
|
1903
|
-
...
|
|
1908
|
+
...d2.props || {}
|
|
1904
1909
|
},
|
|
1905
1910
|
on: {
|
|
1906
1911
|
"on-change": (val) => {
|
|
1907
1912
|
var _a3, _b3, _c3;
|
|
1908
1913
|
this.val = val;
|
|
1909
|
-
if (((_a3 =
|
|
1910
|
-
this.form[
|
|
1914
|
+
if (((_a3 = d2.props) == null ? void 0 : _a3.confirm) === false) {
|
|
1915
|
+
this.form[d2.formKey] = this.val instanceof Date ? dayjs(this.val).format(((_b3 = d2.props) == null ? void 0 : _b3.format) ? (_c3 = d2.props) == null ? void 0 : _c3.format : "HH:mm:ss") : this.val;
|
|
1911
1916
|
this.$emit("input", this.form);
|
|
1912
|
-
const required =
|
|
1917
|
+
const required = d2.required instanceof Function ? d2.required(this.form) : d2.required;
|
|
1913
1918
|
if (required) {
|
|
1914
|
-
this.$refs.form.validateField(
|
|
1919
|
+
this.$refs.form.validateField(d2.formKey);
|
|
1915
1920
|
}
|
|
1916
1921
|
}
|
|
1917
1922
|
},
|
|
1918
1923
|
"on-ok": () => {
|
|
1919
1924
|
var _a3, _b3;
|
|
1920
|
-
this.form[
|
|
1925
|
+
this.form[d2.formKey] = this.val instanceof Date ? dayjs(this.val).format(((_a3 = d2.props) == null ? void 0 : _a3.format) ? (_b3 = d2.props) == null ? void 0 : _b3.format : "HH:mm:ss") : this.val;
|
|
1921
1926
|
this.$emit("input", this.form);
|
|
1922
|
-
const required =
|
|
1927
|
+
const required = d2.required instanceof Function ? d2.required(this.form) : d2.required;
|
|
1923
1928
|
if (required) {
|
|
1924
|
-
this.$refs.form.validateField(
|
|
1929
|
+
this.$refs.form.validateField(d2.formKey);
|
|
1925
1930
|
}
|
|
1926
1931
|
}
|
|
1927
1932
|
}
|
|
@@ -1930,27 +1935,27 @@ var FormImpl = {
|
|
|
1930
1935
|
}
|
|
1931
1936
|
case "treeselect": {
|
|
1932
1937
|
itemInner = h("IndMInputSelect", {
|
|
1933
|
-
ref:
|
|
1938
|
+
ref: d2.formKey,
|
|
1934
1939
|
props: {
|
|
1935
|
-
title:
|
|
1936
|
-
...
|
|
1937
|
-
value: this.form[
|
|
1940
|
+
title: d2.title,
|
|
1941
|
+
...d2.props || {},
|
|
1942
|
+
value: this.form[d2.formKey],
|
|
1938
1943
|
disabled
|
|
1939
1944
|
},
|
|
1940
1945
|
attrs: {
|
|
1941
|
-
...
|
|
1946
|
+
...d2.props,
|
|
1942
1947
|
noTriggerInDefault: true
|
|
1943
1948
|
},
|
|
1944
1949
|
on: {
|
|
1945
1950
|
input: (val) => {
|
|
1946
|
-
this.form[
|
|
1951
|
+
this.form[d2.formKey] = val;
|
|
1947
1952
|
this.$emit("input", this.form);
|
|
1948
1953
|
this.$nextTick().then(() => {
|
|
1949
|
-
this.$emit("fieldChange", { formKey:
|
|
1954
|
+
this.$emit("fieldChange", { formKey: d2.formKey, row: this.form });
|
|
1950
1955
|
});
|
|
1951
|
-
const required =
|
|
1956
|
+
const required = d2.required instanceof Function ? d2.required(this.form) : d2.required;
|
|
1952
1957
|
if (required) {
|
|
1953
|
-
this.$refs.form.validateField(
|
|
1958
|
+
this.$refs.form.validateField(d2.formKey);
|
|
1954
1959
|
}
|
|
1955
1960
|
}
|
|
1956
1961
|
}
|
|
@@ -1959,21 +1964,21 @@ var FormImpl = {
|
|
|
1959
1964
|
}
|
|
1960
1965
|
case "fileUpload": {
|
|
1961
1966
|
itemInner = h("IndMUploadFile", {
|
|
1962
|
-
ref:
|
|
1967
|
+
ref: d2.formKey,
|
|
1963
1968
|
props: {
|
|
1964
|
-
...
|
|
1965
|
-
defaultList: this.form[
|
|
1969
|
+
...d2.props || {},
|
|
1970
|
+
defaultList: this.form[d2.formKey],
|
|
1966
1971
|
disabled
|
|
1967
1972
|
},
|
|
1968
1973
|
attrs: {
|
|
1969
|
-
...
|
|
1974
|
+
...d2.props
|
|
1970
1975
|
},
|
|
1971
1976
|
on: {
|
|
1972
1977
|
onChangeData: (val) => {
|
|
1973
|
-
this.form[
|
|
1978
|
+
this.form[d2.formKey] = val;
|
|
1974
1979
|
this.$emit("input", this.form);
|
|
1975
1980
|
this.$nextTick().then(() => {
|
|
1976
|
-
this.$emit("fieldChange", { formKey:
|
|
1981
|
+
this.$emit("fieldChange", { formKey: d2.formKey, row: this.form });
|
|
1977
1982
|
});
|
|
1978
1983
|
}
|
|
1979
1984
|
}
|
|
@@ -1982,21 +1987,21 @@ var FormImpl = {
|
|
|
1982
1987
|
}
|
|
1983
1988
|
case "imgUpload": {
|
|
1984
1989
|
itemInner = h("IndUploadImg", {
|
|
1985
|
-
ref:
|
|
1990
|
+
ref: d2.formKey,
|
|
1986
1991
|
props: {
|
|
1987
|
-
...
|
|
1988
|
-
defaultList: this.form[
|
|
1992
|
+
...d2.props || {},
|
|
1993
|
+
defaultList: this.form[d2.formKey],
|
|
1989
1994
|
disabled
|
|
1990
1995
|
},
|
|
1991
1996
|
attrs: {
|
|
1992
|
-
...
|
|
1997
|
+
...d2.props
|
|
1993
1998
|
},
|
|
1994
1999
|
on: {
|
|
1995
2000
|
onChangeData: (val) => {
|
|
1996
|
-
this.form[
|
|
2001
|
+
this.form[d2.formKey] = val;
|
|
1997
2002
|
this.$emit("input", this.form);
|
|
1998
2003
|
this.$nextTick().then(() => {
|
|
1999
|
-
this.$emit("fieldChange", { formKey:
|
|
2004
|
+
this.$emit("fieldChange", { formKey: d2.formKey, row: this.form });
|
|
2000
2005
|
});
|
|
2001
2006
|
}
|
|
2002
2007
|
}
|
|
@@ -2004,42 +2009,42 @@ var FormImpl = {
|
|
|
2004
2009
|
break;
|
|
2005
2010
|
}
|
|
2006
2011
|
default: {
|
|
2007
|
-
let text = this.form[
|
|
2008
|
-
if (
|
|
2009
|
-
text = (_k = (_j = this.enumData[
|
|
2010
|
-
} else if (
|
|
2011
|
-
text = (_m = (_l =
|
|
2012
|
-
} else if (
|
|
2013
|
-
text = (_n =
|
|
2012
|
+
let text = this.form[d2.formKey];
|
|
2013
|
+
if (d2.enumKey) {
|
|
2014
|
+
text = (_k = (_j = this.enumData[d2.enumKey]) == null ? void 0 : _j.enumData) == null ? void 0 : _k[text];
|
|
2015
|
+
} else if (d2.enumList && d2.enumList.length) {
|
|
2016
|
+
text = (_m = (_l = d2.enumList) == null ? void 0 : _l.find(({ K }) => K === text)) == null ? void 0 : _m.V;
|
|
2017
|
+
} else if (d2.enumData) {
|
|
2018
|
+
text = (_n = d2.enumData) == null ? void 0 : _n[text];
|
|
2014
2019
|
}
|
|
2015
|
-
if (
|
|
2020
|
+
if (d2.dateFormat) {
|
|
2016
2021
|
text = formatDate(text);
|
|
2017
2022
|
}
|
|
2018
|
-
if (
|
|
2019
|
-
text = isNaN(text) || text === null ? text : parseFloat(parseFloat(text).toFixed(
|
|
2023
|
+
if (d2.scale !== void 0) {
|
|
2024
|
+
text = isNaN(text) || text === null ? text : parseFloat(parseFloat(text).toFixed(d2.scale));
|
|
2020
2025
|
}
|
|
2021
2026
|
itemInner = h("span", {}, [
|
|
2022
2027
|
h(
|
|
2023
2028
|
"span",
|
|
2024
2029
|
{
|
|
2025
|
-
class:
|
|
2030
|
+
class: d2.class || ""
|
|
2026
2031
|
},
|
|
2027
2032
|
[text !== 0 ? text || "" : text]
|
|
2028
2033
|
),
|
|
2029
2034
|
h("span", {
|
|
2030
2035
|
domProps: {
|
|
2031
|
-
innerHTML:
|
|
2036
|
+
innerHTML: d2.unit ? " " : ""
|
|
2032
2037
|
}
|
|
2033
2038
|
}),
|
|
2034
|
-
h("span", {}, [
|
|
2039
|
+
h("span", {}, [d2.unit || ""])
|
|
2035
2040
|
]);
|
|
2036
2041
|
}
|
|
2037
2042
|
}
|
|
2038
2043
|
}
|
|
2039
|
-
let conditionFlag =
|
|
2044
|
+
let conditionFlag = d2.condition instanceof Function ? d2.condition(this.form) : d2.condition !== false;
|
|
2040
2045
|
let showMoreFlag = this.formType == "search" ? this.showMore ? true : idx < showMorePosition : true;
|
|
2041
2046
|
if (conditionFlag && showMoreFlag) {
|
|
2042
|
-
if (
|
|
2047
|
+
if (d2.split === "true") {
|
|
2043
2048
|
formItems.push(
|
|
2044
2049
|
h(
|
|
2045
2050
|
"Col",
|
|
@@ -2061,7 +2066,7 @@ var FormImpl = {
|
|
|
2061
2066
|
)
|
|
2062
2067
|
);
|
|
2063
2068
|
}
|
|
2064
|
-
if (["selectbtn", "radio", "checkbox"].includes(
|
|
2069
|
+
if (["selectbtn", "radio", "checkbox"].includes(d2.type)) {
|
|
2065
2070
|
formItems.push(
|
|
2066
2071
|
h(
|
|
2067
2072
|
"Col",
|
|
@@ -2071,7 +2076,7 @@ var FormImpl = {
|
|
|
2071
2076
|
},
|
|
2072
2077
|
nativeOn: {
|
|
2073
2078
|
click: () => {
|
|
2074
|
-
if (
|
|
2079
|
+
if (d2.isTitle) {
|
|
2075
2080
|
this.$emit("itemClick", this.form);
|
|
2076
2081
|
}
|
|
2077
2082
|
}
|
|
@@ -2082,8 +2087,8 @@ var FormImpl = {
|
|
|
2082
2087
|
"FormItem",
|
|
2083
2088
|
{
|
|
2084
2089
|
props: {
|
|
2085
|
-
label:
|
|
2086
|
-
prop:
|
|
2090
|
+
label: d2.title,
|
|
2091
|
+
prop: d2.formKey
|
|
2087
2092
|
}
|
|
2088
2093
|
},
|
|
2089
2094
|
[]
|
|
@@ -2102,7 +2107,7 @@ var FormImpl = {
|
|
|
2102
2107
|
},
|
|
2103
2108
|
nativeOn: {
|
|
2104
2109
|
click: () => {
|
|
2105
|
-
if (
|
|
2110
|
+
if (d2.isTitle) {
|
|
2106
2111
|
this.$emit("itemClick", this.form);
|
|
2107
2112
|
}
|
|
2108
2113
|
}
|
|
@@ -2113,16 +2118,16 @@ var FormImpl = {
|
|
|
2113
2118
|
"FormItem",
|
|
2114
2119
|
{
|
|
2115
2120
|
props: {
|
|
2116
|
-
labelWidth: this.formType != "searchMobile" && (
|
|
2117
|
-
label: this.formType != "searchMobile" && (
|
|
2118
|
-
prop:
|
|
2121
|
+
labelWidth: this.formType != "searchMobile" && (d2.isTitle || spanList[idx + diff] != 24) ? 0 : void 0,
|
|
2122
|
+
label: this.formType != "searchMobile" && (d2.isTitle || spanList[idx + diff] != 24) ? void 0 : d2.title,
|
|
2123
|
+
prop: d2.formKey
|
|
2119
2124
|
},
|
|
2120
|
-
class:
|
|
2125
|
+
class: d2.isTitle ? "ind-list-title" : ""
|
|
2121
2126
|
},
|
|
2122
2127
|
[
|
|
2123
|
-
spanList[idx + diff] != 24 ?
|
|
2128
|
+
spanList[idx + diff] != 24 ? d2.title + " \uFF1A" : "",
|
|
2124
2129
|
itemInner,
|
|
2125
|
-
this.formType != "searchMobile" &&
|
|
2130
|
+
this.formType != "searchMobile" && d2.isTitle ? h("van-icon", { props: { name: "arrow" } }) : ""
|
|
2126
2131
|
]
|
|
2127
2132
|
)
|
|
2128
2133
|
]
|
|
@@ -2171,23 +2176,23 @@ var FormImpl = {
|
|
|
2171
2176
|
right: true
|
|
2172
2177
|
}
|
|
2173
2178
|
},
|
|
2174
|
-
renderBtns.map((
|
|
2179
|
+
renderBtns.map((d2) => {
|
|
2175
2180
|
return h(
|
|
2176
2181
|
"IndButton",
|
|
2177
2182
|
{
|
|
2178
2183
|
props: {
|
|
2179
2184
|
size: "default",
|
|
2180
|
-
bizType:
|
|
2185
|
+
bizType: d2.bizType
|
|
2181
2186
|
},
|
|
2182
2187
|
on: {
|
|
2183
2188
|
click: () => {
|
|
2184
|
-
if (
|
|
2185
|
-
|
|
2189
|
+
if (d2.btnClick && d2.btnClick instanceof Function) {
|
|
2190
|
+
d2.btnClick(this.form);
|
|
2186
2191
|
}
|
|
2187
2192
|
}
|
|
2188
2193
|
}
|
|
2189
2194
|
},
|
|
2190
|
-
[
|
|
2195
|
+
[d2.btnName]
|
|
2191
2196
|
);
|
|
2192
2197
|
})
|
|
2193
2198
|
)
|
|
@@ -2297,7 +2302,7 @@ const __vue2_script$H = {
|
|
|
2297
2302
|
methods: {
|
|
2298
2303
|
setDefaultItem(item2) {
|
|
2299
2304
|
let oldDefault = item2.isDefault;
|
|
2300
|
-
_.forEach(this.datas, (
|
|
2305
|
+
_.forEach(this.datas, (d2) => d2.isDefault = "0");
|
|
2301
2306
|
item2.isDefault = oldDefault == "1" ? "0" : "1";
|
|
2302
2307
|
let datasTmp = _.cloneDeep(this.datas);
|
|
2303
2308
|
this.datas = datasTmp;
|
|
@@ -2324,7 +2329,7 @@ const __vue2_script$H = {
|
|
|
2324
2329
|
if (["input", "number", "textarea", "datepicker"].includes(field.type)) {
|
|
2325
2330
|
return v;
|
|
2326
2331
|
} else if (["treeselect"].includes(field.type)) {
|
|
2327
|
-
return v == null ? void 0 : v.map((
|
|
2332
|
+
return v == null ? void 0 : v.map((d2) => d2.title).join("\u3001");
|
|
2328
2333
|
} else if (["select", "checkbox", "radio"].includes(field.type)) {
|
|
2329
2334
|
let enumTmp = _.reduce(
|
|
2330
2335
|
field.enumList || ((_a = this.formEnumData[field.enumKey]) == null ? void 0 : _a.enumList) || [],
|
|
@@ -2335,7 +2340,7 @@ const __vue2_script$H = {
|
|
|
2335
2340
|
{}
|
|
2336
2341
|
);
|
|
2337
2342
|
if (v instanceof Array) {
|
|
2338
|
-
return v.map((
|
|
2343
|
+
return v.map((d2) => enumTmp[d2]).join("\u3001");
|
|
2339
2344
|
} else {
|
|
2340
2345
|
return enumTmp[v] || "\u5168\u90E8";
|
|
2341
2346
|
}
|
|
@@ -3608,8 +3613,8 @@ const __vue2_script$A = {
|
|
|
3608
3613
|
return _.filter(this.subTable, { panel: "true" });
|
|
3609
3614
|
},
|
|
3610
3615
|
normalTables: function() {
|
|
3611
|
-
return _.filter(this.subTable, (
|
|
3612
|
-
return
|
|
3616
|
+
return _.filter(this.subTable, (d2) => {
|
|
3617
|
+
return d2.panel != "true";
|
|
3613
3618
|
});
|
|
3614
3619
|
},
|
|
3615
3620
|
hasList: function() {
|
|
@@ -3686,12 +3691,12 @@ const __vue2_script$A = {
|
|
|
3686
3691
|
this.form = dataSrc;
|
|
3687
3692
|
return;
|
|
3688
3693
|
}
|
|
3689
|
-
this.subTable.forEach((
|
|
3690
|
-
let unitFields = _.filter(
|
|
3694
|
+
this.subTable.forEach((d2) => {
|
|
3695
|
+
let unitFields = _.filter(d2.formFieldList, (dd) => dd.isSwitchUnit === "true").map(
|
|
3691
3696
|
(m) => m.id
|
|
3692
3697
|
);
|
|
3693
|
-
if (
|
|
3694
|
-
let tmpData = dataSrc[
|
|
3698
|
+
if (d2.dataField) {
|
|
3699
|
+
let tmpData = dataSrc[d2.dataField];
|
|
3695
3700
|
if (unitFields == null ? void 0 : unitFields.length) {
|
|
3696
3701
|
if (tmpData instanceof Array) {
|
|
3697
3702
|
_.forEach(tmpData, (dd) => {
|
|
@@ -3739,12 +3744,12 @@ const __vue2_script$A = {
|
|
|
3739
3744
|
this.$emit("update:formValue", dataSrc);
|
|
3740
3745
|
return;
|
|
3741
3746
|
}
|
|
3742
|
-
this.subTable.forEach((
|
|
3743
|
-
let unitFields = _.filter(
|
|
3747
|
+
this.subTable.forEach((d2) => {
|
|
3748
|
+
let unitFields = _.filter(d2.formFieldList, (dd) => dd.isSwitchUnit === "true").map(
|
|
3744
3749
|
(m) => m.id
|
|
3745
3750
|
);
|
|
3746
|
-
if (
|
|
3747
|
-
let tmpData = dataSrc[
|
|
3751
|
+
if (d2.dataField) {
|
|
3752
|
+
let tmpData = dataSrc[d2.dataField];
|
|
3748
3753
|
if (unitFields == null ? void 0 : unitFields.length) {
|
|
3749
3754
|
if (tmpData instanceof Array) {
|
|
3750
3755
|
_.forEach(tmpData, (dd) => {
|
|
@@ -3815,9 +3820,9 @@ const __vue2_script$A = {
|
|
|
3815
3820
|
_.forEach(this.formFieldsExt, (v, k) => {
|
|
3816
3821
|
let tableTmp = _.find(subTable, { id: k }) || {};
|
|
3817
3822
|
let formFieldListTmp = (tableTmp == null ? void 0 : tableTmp.formFieldList) || [];
|
|
3818
|
-
_.forEach(v, (
|
|
3819
|
-
let srcInfo = _.find(formFieldListTmp, { formKey:
|
|
3820
|
-
_.merge(srcInfo,
|
|
3823
|
+
_.forEach(v, (d2) => {
|
|
3824
|
+
let srcInfo = _.find(formFieldListTmp, { formKey: d2.formKey }) || {};
|
|
3825
|
+
_.merge(srcInfo, d2);
|
|
3821
3826
|
});
|
|
3822
3827
|
});
|
|
3823
3828
|
}
|
|
@@ -3855,8 +3860,8 @@ const __vue2_script$A = {
|
|
|
3855
3860
|
} else if (table.type == "list") {
|
|
3856
3861
|
let rowKey = table.rowKey || "id";
|
|
3857
3862
|
let listTmp = _.cloneDeep(this.form[field]);
|
|
3858
|
-
let tmpRow = _.find(listTmp, (
|
|
3859
|
-
return
|
|
3863
|
+
let tmpRow = _.find(listTmp, (d2) => {
|
|
3864
|
+
return d2[rowKey] == data49[rowKey];
|
|
3860
3865
|
});
|
|
3861
3866
|
_.merge(tmpRow, data49);
|
|
3862
3867
|
this.form[field] = listTmp;
|
|
@@ -4069,17 +4074,17 @@ const __vue2_script$z = {
|
|
|
4069
4074
|
let datas;
|
|
4070
4075
|
if (this.searchVal) {
|
|
4071
4076
|
if (this.disablePage) {
|
|
4072
|
-
datas = _.filter(currentRows, (
|
|
4077
|
+
datas = _.filter(currentRows, (d2) => {
|
|
4073
4078
|
var _a;
|
|
4074
|
-
let titleKey = (_a = _.find(this.formFieldList, (
|
|
4075
|
-
return !!
|
|
4079
|
+
let titleKey = (_a = _.find(this.formFieldList, (d3) => {
|
|
4080
|
+
return !!d3.isTitle;
|
|
4076
4081
|
})) == null ? void 0 : _a.formKey;
|
|
4077
4082
|
console.log("\u641C\u7D22\u8FC7\u6EE4:", {
|
|
4078
4083
|
titleKey,
|
|
4079
4084
|
searchVal: this.searchVal,
|
|
4080
|
-
rowData:
|
|
4085
|
+
rowData: d2[titleKey]
|
|
4081
4086
|
});
|
|
4082
|
-
return titleKey ? _.includes(
|
|
4087
|
+
return titleKey ? _.includes(d2[titleKey], this.searchVal) : false;
|
|
4083
4088
|
}) || [];
|
|
4084
4089
|
this.total = datas.length;
|
|
4085
4090
|
} else {
|
|
@@ -4214,16 +4219,16 @@ const __vue2_script$z = {
|
|
|
4214
4219
|
this.dataUrl = dataUrl;
|
|
4215
4220
|
this.methodsType = methods;
|
|
4216
4221
|
if ((_a = this.searchFormFieldsExt) == null ? void 0 : _a.length) {
|
|
4217
|
-
_.forEach(this.searchFormFieldsExt, (
|
|
4218
|
-
let srcInfo = _.find(searchFormFields, { formKey:
|
|
4219
|
-
_.merge(srcInfo,
|
|
4222
|
+
_.forEach(this.searchFormFieldsExt, (d2) => {
|
|
4223
|
+
let srcInfo = _.find(searchFormFields, { formKey: d2.formKey });
|
|
4224
|
+
_.merge(srcInfo, d2);
|
|
4220
4225
|
});
|
|
4221
4226
|
}
|
|
4222
4227
|
this.searchFormFields = searchFormFields;
|
|
4223
4228
|
if ((_b = this.cardFieldsExt) == null ? void 0 : _b.length) {
|
|
4224
|
-
_.forEach(this.cardFieldsExt, (
|
|
4225
|
-
let srcInfo = _.find(formFieldList, { formKey:
|
|
4226
|
-
_.merge(srcInfo,
|
|
4229
|
+
_.forEach(this.cardFieldsExt, (d2) => {
|
|
4230
|
+
let srcInfo = _.find(formFieldList, { formKey: d2.formKey });
|
|
4231
|
+
_.merge(srcInfo, d2);
|
|
4227
4232
|
});
|
|
4228
4233
|
}
|
|
4229
4234
|
this.formFieldList = formFieldList;
|
|
@@ -4520,16 +4525,16 @@ const __vue2_script$x = {
|
|
|
4520
4525
|
this.pageBtnText = pageBtnText;
|
|
4521
4526
|
this.dataUrl = dataUrl;
|
|
4522
4527
|
if ((_a = this.searchFormFieldsExt) == null ? void 0 : _a.length) {
|
|
4523
|
-
_.forEach(this.searchFormFieldsExt, (
|
|
4524
|
-
let srcInfo = _.find(searchFormFields, { formKey:
|
|
4525
|
-
_.merge(srcInfo,
|
|
4528
|
+
_.forEach(this.searchFormFieldsExt, (d2) => {
|
|
4529
|
+
let srcInfo = _.find(searchFormFields, { formKey: d2.formKey });
|
|
4530
|
+
_.merge(srcInfo, d2);
|
|
4526
4531
|
});
|
|
4527
4532
|
}
|
|
4528
4533
|
this.searchFormFields = searchFormFields;
|
|
4529
4534
|
if ((_b = this.cardFieldsExt) == null ? void 0 : _b.length) {
|
|
4530
|
-
_.forEach(this.cardFieldsExt, (
|
|
4531
|
-
let srcInfo = _.find(formFieldList, { formKey:
|
|
4532
|
-
_.merge(srcInfo,
|
|
4535
|
+
_.forEach(this.cardFieldsExt, (d2) => {
|
|
4536
|
+
let srcInfo = _.find(formFieldList, { formKey: d2.formKey });
|
|
4537
|
+
_.merge(srcInfo, d2);
|
|
4533
4538
|
});
|
|
4534
4539
|
}
|
|
4535
4540
|
this.formFieldList = formFieldList;
|
|
@@ -4733,8 +4738,8 @@ function _extends$2() {
|
|
|
4733
4738
|
function _extends$1() {
|
|
4734
4739
|
return _extends$1 = Object.assign ? Object.assign.bind() : function(a) {
|
|
4735
4740
|
for (var b, c = 1; c < arguments.length; c++)
|
|
4736
|
-
for (var
|
|
4737
|
-
Object.prototype.hasOwnProperty.call(b,
|
|
4741
|
+
for (var d2 in b = arguments[c], b)
|
|
4742
|
+
Object.prototype.hasOwnProperty.call(b, d2) && (a[d2] = b[d2]);
|
|
4738
4743
|
return a;
|
|
4739
4744
|
}, _extends$1.apply(this, arguments);
|
|
4740
4745
|
}
|
|
@@ -4746,8 +4751,8 @@ var normalMerge = ["attrs", "props", "domProps"], toArrayMerge = ["class", "styl
|
|
|
4746
4751
|
else if (-1 !== normalMerge.indexOf(b))
|
|
4747
4752
|
c[b] = _extends$1({}, c[b], a2[b]);
|
|
4748
4753
|
else if (-1 !== toArrayMerge.indexOf(b)) {
|
|
4749
|
-
var
|
|
4750
|
-
c[b] = [].concat(
|
|
4754
|
+
var d2 = c[b] instanceof Array ? c[b] : [c[b]], e = a2[b] instanceof Array ? a2[b] : [a2[b]];
|
|
4755
|
+
c[b] = [].concat(d2, e);
|
|
4751
4756
|
} else if (-1 !== functionalMerge.indexOf(b)) {
|
|
4752
4757
|
for (var f in a2[b])
|
|
4753
4758
|
if (c[b][f]) {
|
|
@@ -23036,8 +23041,8 @@ const __vue2_script$r = {
|
|
|
23036
23041
|
},
|
|
23037
23042
|
computed: {
|
|
23038
23043
|
isTree() {
|
|
23039
|
-
return _.some(this.columnsData, (
|
|
23040
|
-
return
|
|
23044
|
+
return _.some(this.columnsData, (d2) => {
|
|
23045
|
+
return d2.tree == true;
|
|
23041
23046
|
});
|
|
23042
23047
|
}
|
|
23043
23048
|
},
|
|
@@ -23047,10 +23052,10 @@ const __vue2_script$r = {
|
|
|
23047
23052
|
if (this.isTree) {
|
|
23048
23053
|
let dataTmp = (data49 == null ? void 0 : data49.data) || data49;
|
|
23049
23054
|
let leafNodes = [];
|
|
23050
|
-
deepEach({}, dataTmp, (
|
|
23055
|
+
deepEach({}, dataTmp, (d2, p, idx) => {
|
|
23051
23056
|
var _a2;
|
|
23052
|
-
if (!((_a2 =
|
|
23053
|
-
leafNodes.push(
|
|
23057
|
+
if (!((_a2 = d2 == null ? void 0 : d2.children) == null ? void 0 : _a2.length)) {
|
|
23058
|
+
leafNodes.push(d2);
|
|
23054
23059
|
}
|
|
23055
23060
|
});
|
|
23056
23061
|
this.dataLen = (leafNodes == null ? void 0 : leafNodes.length) || 0;
|
|
@@ -23184,9 +23189,9 @@ const __vue2_script$r = {
|
|
|
23184
23189
|
return;
|
|
23185
23190
|
} else if (preLen === 1 && curLen === 2) {
|
|
23186
23191
|
let selectedRowsClone = _.cloneDeep(selectedRows);
|
|
23187
|
-
_.remove(selectedRowsClone, (
|
|
23192
|
+
_.remove(selectedRowsClone, (d2) => {
|
|
23188
23193
|
return _.some(this.selectedRows, (dd) => {
|
|
23189
|
-
return dd[this.rowKey || "id"] ==
|
|
23194
|
+
return dd[this.rowKey || "id"] == d2[this.rowKey || "id"];
|
|
23190
23195
|
});
|
|
23191
23196
|
});
|
|
23192
23197
|
(_d = (_c = this.$refs) == null ? void 0 : _c.table) == null ? void 0 : _d.setSelection(selectedRowsClone, true);
|
|
@@ -23194,9 +23199,9 @@ const __vue2_script$r = {
|
|
|
23194
23199
|
}
|
|
23195
23200
|
}
|
|
23196
23201
|
if (this.isTree && !this.enableSelectAll) {
|
|
23197
|
-
this.selectedRows = _.filter(selectedRows, (
|
|
23202
|
+
this.selectedRows = _.filter(selectedRows, (d2) => {
|
|
23198
23203
|
var _a2;
|
|
23199
|
-
return !((_a2 =
|
|
23204
|
+
return !((_a2 = d2 == null ? void 0 : d2.children) == null ? void 0 : _a2.length);
|
|
23200
23205
|
});
|
|
23201
23206
|
} else {
|
|
23202
23207
|
this.selectedRows = selectedRows;
|
|
@@ -23368,8 +23373,8 @@ const __vue2_script$q = {
|
|
|
23368
23373
|
if (this.enableSelectAll) {
|
|
23369
23374
|
tempNodes = this.value;
|
|
23370
23375
|
} else {
|
|
23371
|
-
tempNodes = _.filter(this.value, (
|
|
23372
|
-
return !
|
|
23376
|
+
tempNodes = _.filter(this.value, (d2) => {
|
|
23377
|
+
return !d2.children || d2.children.length == 0;
|
|
23373
23378
|
});
|
|
23374
23379
|
}
|
|
23375
23380
|
let textField = "title";
|
|
@@ -23379,8 +23384,8 @@ const __vue2_script$q = {
|
|
|
23379
23384
|
textField = "V";
|
|
23380
23385
|
}
|
|
23381
23386
|
console.log("textField is", textField);
|
|
23382
|
-
this.selectedTitles = (tempNodes == null ? void 0 : tempNodes.length) ? (tempNodes == null ? void 0 : tempNodes.length) == 1 ? ((_c = this.options) == null ? void 0 : _c.length) ? ((_d = this.options.find((
|
|
23383
|
-
return
|
|
23387
|
+
this.selectedTitles = (tempNodes == null ? void 0 : tempNodes.length) ? (tempNodes == null ? void 0 : tempNodes.length) == 1 ? ((_c = this.options) == null ? void 0 : _c.length) ? ((_d = this.options.find((d2) => {
|
|
23388
|
+
return d2.K == tempNodes[0].K;
|
|
23384
23389
|
})) == null ? void 0 : _d.V) || ((_e = tempNodes[0]) == null ? void 0 : _e.V) || ((_f = tempNodes[0]) == null ? void 0 : _f.title) : tempNodes[0][textField] || ((_g = tempNodes[0]) == null ? void 0 : _g.V) || ((_h = tempNodes[0]) == null ? void 0 : _h.title) : "\u5171\u9009\u62E9" + ((tempNodes == null ? void 0 : tempNodes.length) || 0) + "\u4E2A" + this.title : "";
|
|
23385
23390
|
},
|
|
23386
23391
|
setSelectedTitles(title4) {
|
|
@@ -23441,8 +23446,8 @@ const __vue2_script$p = {
|
|
|
23441
23446
|
if (this.multiple) {
|
|
23442
23447
|
let valueClone = _.cloneDeep(this.value);
|
|
23443
23448
|
if (valueClone.includes(item2.K)) {
|
|
23444
|
-
_.remove(valueClone, (
|
|
23445
|
-
return
|
|
23449
|
+
_.remove(valueClone, (d2) => {
|
|
23450
|
+
return d2 == item2.K;
|
|
23446
23451
|
});
|
|
23447
23452
|
} else {
|
|
23448
23453
|
valueClone.push(item2.K);
|
|
@@ -23458,7 +23463,7 @@ const __vue2_script$p = {
|
|
|
23458
23463
|
} else {
|
|
23459
23464
|
this.$emit(
|
|
23460
23465
|
"input",
|
|
23461
|
-
this.options.map((
|
|
23466
|
+
this.options.map((d2) => d2.K)
|
|
23462
23467
|
);
|
|
23463
23468
|
}
|
|
23464
23469
|
}
|
|
@@ -30404,7 +30409,7 @@ const __vue2_script$8 = {
|
|
|
30404
30409
|
function findLeavesDeep(node, childrenTmp) {
|
|
30405
30410
|
var _a2, _b;
|
|
30406
30411
|
if (((_a2 = node == null ? void 0 : node.children) == null ? void 0 : _a2.length) > 0) {
|
|
30407
|
-
(_b = node.children) == null ? void 0 : _b.forEach((
|
|
30412
|
+
(_b = node.children) == null ? void 0 : _b.forEach((d2) => findLeavesDeep(d2, childrenTmp));
|
|
30408
30413
|
} else if (node.path || node.uri) {
|
|
30409
30414
|
childrenTmp.push(node);
|
|
30410
30415
|
}
|
|
@@ -31804,7 +31809,6 @@ function listToMenuTree({ list: list2, childrenMap, menuTree, pageNode, parentId
|
|
|
31804
31809
|
if (!childrenMap) {
|
|
31805
31810
|
childrenMap = buildChildrenMap(list2);
|
|
31806
31811
|
}
|
|
31807
|
-
console.log("childrenMap now is", childrenMap);
|
|
31808
31812
|
let appInfo = getSessionStorage("appInfo");
|
|
31809
31813
|
const siblings = childrenMap.get(parentId) || [];
|
|
31810
31814
|
siblings.forEach((item2) => {
|