@indfnd/common-mobile 1.0.79 → 1.0.81
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 +9 -0
- package/dist/ind-common-mobile.es.js +295 -295
- 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.80";
|
|
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 d = Object.getOwnPropertyDescriptor(n, k);
|
|
291
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
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", d = "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: d, 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 d:
|
|
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[d] = 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(d, 1);
|
|
429
|
+
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, 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 d2, 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 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t2, d2)[$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
|
+
}, d2 = 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 d2(1);
|
|
501
501
|
case "hh":
|
|
502
|
-
return
|
|
502
|
+
return d2(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, d2, l2) {
|
|
526
|
+
var $2, y2 = this, M3 = b.p(d2), 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", d]].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(d, 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 = `${d[0]}${quarter.value}`;
|
|
725
725
|
} else if (this.type == "year-half") {
|
|
726
726
|
let half = this.halfList[index2[1]];
|
|
727
|
-
v = `${
|
|
727
|
+
v = `${d[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(d, index2) {
|
|
736
|
+
this.dateValue = d;
|
|
737
|
+
this.emitValue(d, 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((d) => {
|
|
789
|
+
let rlt = { ...d._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((d) => {
|
|
814
|
+
return d.frontHide != "true";
|
|
815
|
+
}).map((d) => {
|
|
816
816
|
return {
|
|
817
|
-
...
|
|
818
|
-
title:
|
|
817
|
+
...d,
|
|
818
|
+
title: d.name,
|
|
819
819
|
width: 200,
|
|
820
|
-
field:
|
|
820
|
+
field: d.id,
|
|
821
821
|
sortable: true,
|
|
822
|
-
align:
|
|
823
|
-
type:
|
|
822
|
+
align: d.type == "INTEGER" ? "right" : "left",
|
|
823
|
+
type: d.inputType || null
|
|
824
824
|
};
|
|
825
825
|
});
|
|
826
|
-
let searchFormFields = columnSrc.filter((
|
|
827
|
-
return
|
|
828
|
-
}).map((
|
|
826
|
+
let searchFormFields = columnSrc.filter((d) => {
|
|
827
|
+
return d.listSearch == "true";
|
|
828
|
+
}).map((d) => {
|
|
829
829
|
return {
|
|
830
|
-
...
|
|
831
|
-
formKey:
|
|
832
|
-
title:
|
|
833
|
-
type:
|
|
830
|
+
...d,
|
|
831
|
+
formKey: d.id,
|
|
832
|
+
title: d.name,
|
|
833
|
+
type: d.searchType || "input"
|
|
834
834
|
};
|
|
835
835
|
});
|
|
836
|
-
let formFieldList = columnSrc.filter((
|
|
837
|
-
return
|
|
838
|
-
}).map((
|
|
836
|
+
let formFieldList = columnSrc.filter((d) => {
|
|
837
|
+
return d.frontHide != "true";
|
|
838
|
+
}).map((d) => {
|
|
839
839
|
return {
|
|
840
|
-
...
|
|
841
|
-
formKey:
|
|
842
|
-
title:
|
|
843
|
-
isTitle:
|
|
844
|
-
type:
|
|
845
|
-
required:
|
|
840
|
+
...d,
|
|
841
|
+
formKey: d.id,
|
|
842
|
+
title: d.name,
|
|
843
|
+
isTitle: d.isTitle === "true",
|
|
844
|
+
type: d.inputType || null,
|
|
845
|
+
required: d.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((d) => renderTable(d));
|
|
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, (d) => {
|
|
1292
1292
|
var _a, _b;
|
|
1293
|
-
const required =
|
|
1293
|
+
const required = d.required instanceof Function ? d.required(this.form) : d.required;
|
|
1294
1294
|
if (required) {
|
|
1295
1295
|
let validateTmp = {
|
|
1296
1296
|
required: true,
|
|
1297
|
-
message:
|
|
1297
|
+
message: d.title + "\u4E0D\u80FD\u4E3A\u7A7A",
|
|
1298
1298
|
trigger: "blur"
|
|
1299
1299
|
};
|
|
1300
|
-
if (
|
|
1301
|
-
validateTmp.validator =
|
|
1300
|
+
if (d.validate) {
|
|
1301
|
+
validateTmp.validator = d.validate;
|
|
1302
1302
|
}
|
|
1303
|
-
if (["number"].includes(
|
|
1303
|
+
if (["number"].includes(d.type)) {
|
|
1304
1304
|
validateTmp.type = "number";
|
|
1305
|
-
} else if (["checkbox", "treeselect", "fileUpload", "imgUpload"].includes(
|
|
1305
|
+
} else if (["checkbox", "treeselect", "fileUpload", "imgUpload"].includes(d.type) || "select" === d.type && ((_a = d.props) == null ? void 0 : _a.multiple)) {
|
|
1306
1306
|
validateTmp.type = "array";
|
|
1307
|
-
} else if (["datepicker"].includes(
|
|
1308
|
-
const props =
|
|
1307
|
+
} else if (["datepicker"].includes(d.type)) {
|
|
1308
|
+
const props = d.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: d.title + "\u7684\u5F00\u59CB\u65E5\u671F\u4E0D\u80FD\u4E3A\u7A7A" },
|
|
1315
|
+
1: { type: "string", required: true, message: d.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(d.type)) {
|
|
1322
1322
|
validateTmp.trigger = "custom";
|
|
1323
1323
|
}
|
|
1324
|
-
validateList[
|
|
1324
|
+
validateList[d.formKey] = [validateTmp];
|
|
1325
1325
|
}
|
|
1326
|
-
if (
|
|
1327
|
-
validateList[
|
|
1328
|
-
validateList[
|
|
1326
|
+
if (d.type == "idcard") {
|
|
1327
|
+
validateList[d.formKey] = validateList[d.formKey] || [];
|
|
1328
|
+
validateList[d.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 (d.type == "vehicleNo") {
|
|
1340
|
+
validateList[d.formKey] = validateList[d.formKey] || [];
|
|
1341
|
+
validateList[d.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 (d.type == "phone") {
|
|
1352
|
+
validateList[d.formKey] = validateList[d.formKey] || [];
|
|
1353
|
+
validateList[d.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 (d.type == "email") {
|
|
1364
|
+
validateList[d.formKey] = validateList[d.formKey] || [];
|
|
1365
|
+
validateList[d.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((d) => {
|
|
1407
|
+
if (d.enumKey) {
|
|
1408
|
+
enumListRlt.push(d.enumKey);
|
|
1409
1409
|
}
|
|
1410
1410
|
});
|
|
1411
1411
|
this.enumList = enumListRlt;
|
|
@@ -1442,13 +1442,13 @@ 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, (d, idx) => {
|
|
1446
|
+
if (d.span) {
|
|
1447
|
+
spanList[idx] = parseInt(d.span);
|
|
1448
|
+
} else if (["textarea", "fileUpload", "imgUpload"].includes(d.type)) {
|
|
1449
1449
|
spanList[idx] = 24;
|
|
1450
1450
|
}
|
|
1451
|
-
let conditionFlag =
|
|
1451
|
+
let conditionFlag = d.condition instanceof Function ? d.condition(this.form) : d.condition !== false;
|
|
1452
1452
|
if (!conditionFlag) {
|
|
1453
1453
|
spanList[idx] = 0;
|
|
1454
1454
|
}
|
|
@@ -1461,14 +1461,14 @@ var FormImpl = {
|
|
|
1461
1461
|
}
|
|
1462
1462
|
});
|
|
1463
1463
|
if (this.formType == "card") {
|
|
1464
|
-
let titleField = _.remove(renderFieldList, (
|
|
1465
|
-
return
|
|
1464
|
+
let titleField = _.remove(renderFieldList, (d) => {
|
|
1465
|
+
return d.isTitle === "true" || d.isTitle === true;
|
|
1466
1466
|
})[0];
|
|
1467
|
-
let subTitleField = _.remove(renderFieldList, (
|
|
1468
|
-
return
|
|
1467
|
+
let subTitleField = _.remove(renderFieldList, (d) => {
|
|
1468
|
+
return d.isSubTitle === "true" || d.isSubTitle === true;
|
|
1469
1469
|
})[0];
|
|
1470
|
-
let statusField = _.remove(renderFieldList, (
|
|
1471
|
-
return
|
|
1470
|
+
let statusField = _.remove(renderFieldList, (d) => {
|
|
1471
|
+
return d.isStatus === "true" || d.isStatus === true;
|
|
1472
1472
|
})[0];
|
|
1473
1473
|
let statusText = this.form[statusField == null ? void 0 : statusField.formKey];
|
|
1474
1474
|
if (statusField.enumKey) {
|
|
@@ -1527,14 +1527,14 @@ var FormImpl = {
|
|
|
1527
1527
|
h(
|
|
1528
1528
|
"div",
|
|
1529
1529
|
{
|
|
1530
|
-
class: "ind-page-title" + (
|
|
1530
|
+
class: "ind-page-title" + ((titleField == null ? void 0 : titleField.class) || "")
|
|
1531
1531
|
},
|
|
1532
1532
|
[this.form[titleField == null ? void 0 : titleField.formKey]]
|
|
1533
1533
|
),
|
|
1534
1534
|
h(
|
|
1535
1535
|
"div",
|
|
1536
1536
|
{
|
|
1537
|
-
class: "ind-page-sub-title" + (
|
|
1537
|
+
class: "ind-page-sub-title" + ((subTitleField == null ? void 0 : subTitleField.class) || "")
|
|
1538
1538
|
},
|
|
1539
1539
|
[
|
|
1540
1540
|
(subTitleField == null ? void 0 : subTitleField.dateFormat) ? formatDate(this.form[subTitleField == null ? void 0 : subTitleField.formKey]) : this.form[subTitleField == null ? void 0 : subTitleField.formKey]
|
|
@@ -1557,11 +1557,11 @@ var FormImpl = {
|
|
|
1557
1557
|
)
|
|
1558
1558
|
);
|
|
1559
1559
|
} else if (this.formType == "card2") {
|
|
1560
|
-
let titleField = _.remove(renderFieldList, (
|
|
1561
|
-
return
|
|
1560
|
+
let titleField = _.remove(renderFieldList, (d) => {
|
|
1561
|
+
return d.isTitle === "true" || d.isTitle === true;
|
|
1562
1562
|
})[0];
|
|
1563
|
-
let subTitleField = _.remove(renderFieldList, (
|
|
1564
|
-
return
|
|
1563
|
+
let subTitleField = _.remove(renderFieldList, (d) => {
|
|
1564
|
+
return d.isSubTitle === "true" || d.isSubTitle === true;
|
|
1565
1565
|
})[0];
|
|
1566
1566
|
formItems.push(
|
|
1567
1567
|
h(
|
|
@@ -1599,14 +1599,14 @@ var FormImpl = {
|
|
|
1599
1599
|
h(
|
|
1600
1600
|
"div",
|
|
1601
1601
|
{
|
|
1602
|
-
class: "ind-page-title" + (
|
|
1602
|
+
class: "ind-page-title" + ((titleField == null ? void 0 : titleField.class) || "")
|
|
1603
1603
|
},
|
|
1604
1604
|
[this.form[titleField == null ? void 0 : titleField.formKey]]
|
|
1605
1605
|
),
|
|
1606
1606
|
h(
|
|
1607
1607
|
"div",
|
|
1608
1608
|
{
|
|
1609
|
-
class: "ind-page-sub-title" + (
|
|
1609
|
+
class: "ind-page-sub-title" + ((subTitleField == null ? void 0 : subTitleField.class) || "")
|
|
1610
1610
|
},
|
|
1611
1611
|
[
|
|
1612
1612
|
(subTitleField == null ? void 0 : subTitleField.formatDate) ? formatDate(this.form[subTitleField == null ? void 0 : subTitleField.formKey]) : this.form[subTitleField == null ? void 0 : subTitleField.formKey]
|
|
@@ -1623,33 +1623,33 @@ var FormImpl = {
|
|
|
1623
1623
|
);
|
|
1624
1624
|
}
|
|
1625
1625
|
let diff = this.fieldList.length - renderFieldList.length;
|
|
1626
|
-
_.forEach(renderFieldList, (
|
|
1626
|
+
_.forEach(renderFieldList, (d, idx) => {
|
|
1627
1627
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j, _k, _l, _m, _n;
|
|
1628
1628
|
let itemInner;
|
|
1629
|
-
if (
|
|
1630
|
-
itemInner =
|
|
1629
|
+
if (d.render) {
|
|
1630
|
+
itemInner = d.render(h, d, this.form);
|
|
1631
1631
|
} else {
|
|
1632
|
-
const disabled =
|
|
1633
|
-
switch (
|
|
1632
|
+
const disabled = d.disabled instanceof Function ? d.disabled(this.form) : d.disabled;
|
|
1633
|
+
switch (d.type) {
|
|
1634
1634
|
case "input":
|
|
1635
1635
|
case "email":
|
|
1636
1636
|
case "phone":
|
|
1637
1637
|
case "vehicleNo":
|
|
1638
1638
|
case "idcard": {
|
|
1639
1639
|
itemInner = h("Input", {
|
|
1640
|
-
ref:
|
|
1640
|
+
ref: d.formKey,
|
|
1641
1641
|
props: {
|
|
1642
|
-
placeholder: `\u8BF7\u8F93\u5165${
|
|
1643
|
-
...
|
|
1644
|
-
value: this.form[
|
|
1642
|
+
placeholder: `\u8BF7\u8F93\u5165${d.title}`,
|
|
1643
|
+
...d.props,
|
|
1644
|
+
value: this.form[d.formKey],
|
|
1645
1645
|
disabled
|
|
1646
1646
|
},
|
|
1647
1647
|
on: {
|
|
1648
1648
|
input: (val) => {
|
|
1649
|
-
this.form[
|
|
1649
|
+
this.form[d.formKey] = val;
|
|
1650
1650
|
this.$emit("input", this.form);
|
|
1651
1651
|
this.$nextTick().then(() => {
|
|
1652
|
-
this.$emit("fieldChange", { formKey:
|
|
1652
|
+
this.$emit("fieldChange", { formKey: d.formKey, row: this.form });
|
|
1653
1653
|
});
|
|
1654
1654
|
},
|
|
1655
1655
|
"on-focus": (e) => {
|
|
@@ -1660,18 +1660,18 @@ var FormImpl = {
|
|
|
1660
1660
|
break;
|
|
1661
1661
|
}
|
|
1662
1662
|
case "number": {
|
|
1663
|
-
let text = this.form[
|
|
1664
|
-
if (
|
|
1665
|
-
text = isNaN(text) || text === null ? text : parseFloat(parseFloat(text).toFixed(
|
|
1663
|
+
let text = this.form[d.formKey];
|
|
1664
|
+
if (d.scale !== void 0) {
|
|
1665
|
+
text = isNaN(text) || text === null ? text : parseFloat(parseFloat(text).toFixed(d.scale));
|
|
1666
1666
|
}
|
|
1667
1667
|
itemInner = h("Input", {
|
|
1668
|
-
ref:
|
|
1668
|
+
ref: d.formKey,
|
|
1669
1669
|
attrs: {
|
|
1670
1670
|
title: ""
|
|
1671
1671
|
},
|
|
1672
1672
|
props: {
|
|
1673
1673
|
placeholder: `\u8BF7\u8F93\u5165\u6570\u5B57`,
|
|
1674
|
-
...
|
|
1674
|
+
...d.props,
|
|
1675
1675
|
value: text,
|
|
1676
1676
|
disabled,
|
|
1677
1677
|
type: "number"
|
|
@@ -1682,13 +1682,13 @@ var FormImpl = {
|
|
|
1682
1682
|
let v = event.target.value;
|
|
1683
1683
|
let formatRlt = /(-?)(\d{1,10})(\d{0,999})(\.\d{1,6})?/.exec(v);
|
|
1684
1684
|
if (formatRlt && formatRlt.length) {
|
|
1685
|
-
v = (((_a3 =
|
|
1685
|
+
v = (((_a3 = d == null ? void 0 : d.props) == null ? void 0 : _a3.enableNegative) ? formatRlt[1] : "") + formatRlt[2] + (formatRlt[4] || "");
|
|
1686
1686
|
}
|
|
1687
|
-
this.form[
|
|
1688
|
-
this.$refs[
|
|
1687
|
+
this.form[d.formKey] = parseFloat(v);
|
|
1688
|
+
this.$refs[d.formKey] && this.$refs[d.formKey].setCurrentValue(v);
|
|
1689
1689
|
this.$emit("input", this.form);
|
|
1690
1690
|
this.$nextTick().then(() => {
|
|
1691
|
-
this.$emit("fieldChange", { formKey:
|
|
1691
|
+
this.$emit("fieldChange", { formKey: d.formKey, row: this.form });
|
|
1692
1692
|
});
|
|
1693
1693
|
},
|
|
1694
1694
|
"on-focus": (e) => {
|
|
@@ -1701,23 +1701,23 @@ var FormImpl = {
|
|
|
1701
1701
|
}
|
|
1702
1702
|
case "textarea": {
|
|
1703
1703
|
itemInner = h("Input", {
|
|
1704
|
-
ref:
|
|
1704
|
+
ref: d.formKey,
|
|
1705
1705
|
props: {
|
|
1706
|
-
placeholder: `\u8BF7\u8F93\u5165${
|
|
1707
|
-
...
|
|
1708
|
-
value: this.form[
|
|
1706
|
+
placeholder: `\u8BF7\u8F93\u5165${d.title}`,
|
|
1707
|
+
...d.props,
|
|
1708
|
+
value: this.form[d.formKey],
|
|
1709
1709
|
disabled,
|
|
1710
1710
|
type: "textarea",
|
|
1711
|
-
rows: ((_a2 =
|
|
1712
|
-
maxlength: ((_b2 =
|
|
1713
|
-
showWordLimit: ((_c2 =
|
|
1711
|
+
rows: ((_a2 = d.props) == null ? void 0 : _a2.rows) || 3,
|
|
1712
|
+
maxlength: ((_b2 = d.props) == null ? void 0 : _b2.maxlength) || 1024,
|
|
1713
|
+
showWordLimit: ((_c2 = d.props) == null ? void 0 : _c2.showWordLimit) || true
|
|
1714
1714
|
},
|
|
1715
1715
|
on: {
|
|
1716
1716
|
input: (val) => {
|
|
1717
|
-
this.form[
|
|
1717
|
+
this.form[d.formKey] = val;
|
|
1718
1718
|
this.$emit("input", this.form);
|
|
1719
1719
|
this.$nextTick().then(() => {
|
|
1720
|
-
this.$emit("fieldChange", { formKey:
|
|
1720
|
+
this.$emit("fieldChange", { formKey: d.formKey, row: this.form });
|
|
1721
1721
|
});
|
|
1722
1722
|
},
|
|
1723
1723
|
"on-focus": (e) => {
|
|
@@ -1729,28 +1729,28 @@ var FormImpl = {
|
|
|
1729
1729
|
}
|
|
1730
1730
|
case "select": {
|
|
1731
1731
|
itemInner = h("IndMInputSelect", {
|
|
1732
|
-
ref:
|
|
1732
|
+
ref: d.formKey,
|
|
1733
1733
|
props: {
|
|
1734
|
-
title:
|
|
1735
|
-
options:
|
|
1736
|
-
...
|
|
1737
|
-
value: this.form[
|
|
1734
|
+
title: d.title,
|
|
1735
|
+
options: d.enumListFn ? d.enumListFn(this.form) : d.enumList || ((_d2 = this.enumData[d.enumKey]) == null ? void 0 : _d2.enumList) || [],
|
|
1736
|
+
...d.props || {},
|
|
1737
|
+
value: this.form[d.formKey],
|
|
1738
1738
|
disabled
|
|
1739
1739
|
},
|
|
1740
1740
|
attrs: {
|
|
1741
|
-
...
|
|
1741
|
+
...d.props,
|
|
1742
1742
|
noTriggerInDefault: true
|
|
1743
1743
|
},
|
|
1744
1744
|
on: {
|
|
1745
1745
|
input: (val) => {
|
|
1746
|
-
this.form[
|
|
1746
|
+
this.form[d.formKey] = val;
|
|
1747
1747
|
this.$emit("input", this.form);
|
|
1748
1748
|
this.$nextTick().then(() => {
|
|
1749
|
-
this.$emit("fieldChange", { formKey:
|
|
1749
|
+
this.$emit("fieldChange", { formKey: d.formKey, row: this.form });
|
|
1750
1750
|
});
|
|
1751
|
-
const required =
|
|
1751
|
+
const required = d.required instanceof Function ? d.required(this.form) : d.required;
|
|
1752
1752
|
if (required) {
|
|
1753
|
-
this.$refs.form.validateField(
|
|
1753
|
+
this.$refs.form.validateField(d.formKey);
|
|
1754
1754
|
}
|
|
1755
1755
|
}
|
|
1756
1756
|
}
|
|
@@ -1761,37 +1761,37 @@ var FormImpl = {
|
|
|
1761
1761
|
itemInner = h(
|
|
1762
1762
|
"CheckboxGroup",
|
|
1763
1763
|
{
|
|
1764
|
-
ref:
|
|
1764
|
+
ref: d.formKey,
|
|
1765
1765
|
props: {
|
|
1766
|
-
...
|
|
1767
|
-
value: this.form[
|
|
1766
|
+
...d.props,
|
|
1767
|
+
value: this.form[d.formKey]
|
|
1768
1768
|
},
|
|
1769
1769
|
on: {
|
|
1770
1770
|
input: (val) => {
|
|
1771
|
-
this.form[
|
|
1771
|
+
this.form[d.formKey] = val;
|
|
1772
1772
|
this.$emit("input", this.form);
|
|
1773
1773
|
this.$nextTick().then(() => {
|
|
1774
|
-
this.$emit("fieldChange", { formKey:
|
|
1774
|
+
this.$emit("fieldChange", { formKey: d.formKey, row: this.form });
|
|
1775
1775
|
});
|
|
1776
|
-
const required =
|
|
1776
|
+
const required = d.required instanceof Function ? d.required(this.form) : d.required;
|
|
1777
1777
|
if (required) {
|
|
1778
1778
|
this.$nextTick(() => {
|
|
1779
|
-
this.$refs.form.validateField(
|
|
1779
|
+
this.$refs.form.validateField(d.formKey);
|
|
1780
1780
|
});
|
|
1781
1781
|
}
|
|
1782
1782
|
}
|
|
1783
1783
|
}
|
|
1784
1784
|
},
|
|
1785
|
-
(
|
|
1785
|
+
(d.enumList || ((_e2 = this.enumData[d.enumKey]) == null ? void 0 : _e2.enumList) || []).map((d2) => {
|
|
1786
1786
|
return h(
|
|
1787
1787
|
"Checkbox",
|
|
1788
1788
|
{
|
|
1789
1789
|
props: {
|
|
1790
|
-
label:
|
|
1790
|
+
label: d2.K,
|
|
1791
1791
|
disabled
|
|
1792
1792
|
}
|
|
1793
1793
|
},
|
|
1794
|
-
[
|
|
1794
|
+
[d2.V]
|
|
1795
1795
|
);
|
|
1796
1796
|
})
|
|
1797
1797
|
);
|
|
@@ -1799,23 +1799,23 @@ var FormImpl = {
|
|
|
1799
1799
|
}
|
|
1800
1800
|
case "selectbtn": {
|
|
1801
1801
|
itemInner = h("IndMSelectBtn", {
|
|
1802
|
-
ref:
|
|
1802
|
+
ref: d.formKey,
|
|
1803
1803
|
props: {
|
|
1804
|
-
...
|
|
1805
|
-
options:
|
|
1806
|
-
value: this.form[
|
|
1804
|
+
...d.props,
|
|
1805
|
+
options: d.enumList || ((_f2 = this.enumData[d.enumKey]) == null ? void 0 : _f2.enumList) || [],
|
|
1806
|
+
value: this.form[d.formKey]
|
|
1807
1807
|
},
|
|
1808
1808
|
on: {
|
|
1809
1809
|
input: (val) => {
|
|
1810
|
-
this.form[
|
|
1810
|
+
this.form[d.formKey] = val;
|
|
1811
1811
|
this.$emit("input", this.form);
|
|
1812
1812
|
this.$nextTick().then(() => {
|
|
1813
|
-
this.$emit("fieldChange", { formKey:
|
|
1813
|
+
this.$emit("fieldChange", { formKey: d.formKey, row: this.form });
|
|
1814
1814
|
});
|
|
1815
|
-
const required =
|
|
1815
|
+
const required = d.required instanceof Function ? d.required(this.form) : d.required;
|
|
1816
1816
|
if (required) {
|
|
1817
1817
|
this.$nextTick(() => {
|
|
1818
|
-
this.$refs.form.validateField(
|
|
1818
|
+
this.$refs.form.validateField(d.formKey);
|
|
1819
1819
|
});
|
|
1820
1820
|
}
|
|
1821
1821
|
}
|
|
@@ -1827,37 +1827,37 @@ var FormImpl = {
|
|
|
1827
1827
|
itemInner = h(
|
|
1828
1828
|
"RadioGroup",
|
|
1829
1829
|
{
|
|
1830
|
-
ref:
|
|
1830
|
+
ref: d.formKey,
|
|
1831
1831
|
props: {
|
|
1832
|
-
...
|
|
1833
|
-
value: this.form[
|
|
1832
|
+
...d.props,
|
|
1833
|
+
value: this.form[d.formKey]
|
|
1834
1834
|
},
|
|
1835
1835
|
on: {
|
|
1836
1836
|
input: (val) => {
|
|
1837
|
-
this.form[
|
|
1837
|
+
this.form[d.formKey] = val;
|
|
1838
1838
|
this.$emit("input", this.form);
|
|
1839
1839
|
this.$nextTick().then(() => {
|
|
1840
|
-
this.$emit("fieldChange", { formKey:
|
|
1840
|
+
this.$emit("fieldChange", { formKey: d.formKey, row: this.form });
|
|
1841
1841
|
});
|
|
1842
|
-
const required =
|
|
1842
|
+
const required = d.required instanceof Function ? d.required(this.form) : d.required;
|
|
1843
1843
|
if (required) {
|
|
1844
1844
|
this.$nextTick(() => {
|
|
1845
|
-
this.$refs.form.validateField(
|
|
1845
|
+
this.$refs.form.validateField(d.formKey);
|
|
1846
1846
|
});
|
|
1847
1847
|
}
|
|
1848
1848
|
}
|
|
1849
1849
|
}
|
|
1850
1850
|
},
|
|
1851
|
-
(
|
|
1851
|
+
(d.enumList || ((_g2 = this.enumData[d.enumKey]) == null ? void 0 : _g2.enumList) || []).map((d2) => {
|
|
1852
1852
|
return h(
|
|
1853
1853
|
"Radio",
|
|
1854
1854
|
{
|
|
1855
1855
|
props: {
|
|
1856
|
-
label:
|
|
1856
|
+
label: d2.K,
|
|
1857
1857
|
disabled
|
|
1858
1858
|
}
|
|
1859
1859
|
},
|
|
1860
|
-
[
|
|
1860
|
+
[d2.V]
|
|
1861
1861
|
);
|
|
1862
1862
|
})
|
|
1863
1863
|
);
|
|
@@ -1865,29 +1865,29 @@ var FormImpl = {
|
|
|
1865
1865
|
}
|
|
1866
1866
|
case "datepicker": {
|
|
1867
1867
|
itemInner = h("IndMDatePicker", {
|
|
1868
|
-
ref:
|
|
1868
|
+
ref: d.formKey,
|
|
1869
1869
|
props: {
|
|
1870
|
-
value: this.form[
|
|
1871
|
-
type: ((_h =
|
|
1870
|
+
value: this.form[d.formKey],
|
|
1871
|
+
type: ((_h = d.props) == null ? void 0 : _h.type) || "date"
|
|
1872
1872
|
},
|
|
1873
1873
|
attrs: {
|
|
1874
|
-
...
|
|
1875
|
-
placeholder: "\u8BF7\u9009\u62E9" +
|
|
1876
|
-
minDate:
|
|
1877
|
-
maxDate:
|
|
1874
|
+
...d.props,
|
|
1875
|
+
placeholder: "\u8BF7\u9009\u62E9" + d.title,
|
|
1876
|
+
minDate: d.minDate,
|
|
1877
|
+
maxDate: d.maxDate,
|
|
1878
1878
|
disabled
|
|
1879
1879
|
},
|
|
1880
1880
|
on: {
|
|
1881
1881
|
input: (val) => {
|
|
1882
|
-
this.form[
|
|
1882
|
+
this.form[d.formKey] = val;
|
|
1883
1883
|
this.$emit("input", this.form);
|
|
1884
1884
|
this.$nextTick().then(() => {
|
|
1885
|
-
this.$emit("fieldChange", { formKey:
|
|
1885
|
+
this.$emit("fieldChange", { formKey: d.formKey, row: this.form });
|
|
1886
1886
|
});
|
|
1887
|
-
const required =
|
|
1887
|
+
const required = d.required instanceof Function ? d.required(this.form) : d.required;
|
|
1888
1888
|
if (required) {
|
|
1889
1889
|
this.$nextTick(() => {
|
|
1890
|
-
this.$refs.form.validateField(
|
|
1890
|
+
this.$refs.form.validateField(d.formKey);
|
|
1891
1891
|
});
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
@@ -1897,36 +1897,36 @@ var FormImpl = {
|
|
|
1897
1897
|
}
|
|
1898
1898
|
case "timepicker": {
|
|
1899
1899
|
itemInner = h("TimePicker", {
|
|
1900
|
-
ref:
|
|
1900
|
+
ref: d.formKey,
|
|
1901
1901
|
props: {
|
|
1902
|
-
...
|
|
1903
|
-
type: ((_i =
|
|
1904
|
-
value: this.form[
|
|
1902
|
+
...d.props || {},
|
|
1903
|
+
type: ((_i = d.props) == null ? void 0 : _i.type) || "time",
|
|
1904
|
+
value: this.form[d.formKey]
|
|
1905
1905
|
},
|
|
1906
1906
|
attrs: {
|
|
1907
1907
|
confirm: true,
|
|
1908
|
-
...
|
|
1908
|
+
...d.props || {}
|
|
1909
1909
|
},
|
|
1910
1910
|
on: {
|
|
1911
1911
|
"on-change": (val) => {
|
|
1912
1912
|
var _a3, _b3, _c3;
|
|
1913
1913
|
this.val = val;
|
|
1914
|
-
if (((_a3 =
|
|
1915
|
-
this.form[
|
|
1914
|
+
if (((_a3 = d.props) == null ? void 0 : _a3.confirm) === false) {
|
|
1915
|
+
this.form[d.formKey] = this.val instanceof Date ? dayjs(this.val).format(((_b3 = d.props) == null ? void 0 : _b3.format) ? (_c3 = d.props) == null ? void 0 : _c3.format : "HH:mm:ss") : this.val;
|
|
1916
1916
|
this.$emit("input", this.form);
|
|
1917
|
-
const required =
|
|
1917
|
+
const required = d.required instanceof Function ? d.required(this.form) : d.required;
|
|
1918
1918
|
if (required) {
|
|
1919
|
-
this.$refs.form.validateField(
|
|
1919
|
+
this.$refs.form.validateField(d.formKey);
|
|
1920
1920
|
}
|
|
1921
1921
|
}
|
|
1922
1922
|
},
|
|
1923
1923
|
"on-ok": () => {
|
|
1924
1924
|
var _a3, _b3;
|
|
1925
|
-
this.form[
|
|
1925
|
+
this.form[d.formKey] = this.val instanceof Date ? dayjs(this.val).format(((_a3 = d.props) == null ? void 0 : _a3.format) ? (_b3 = d.props) == null ? void 0 : _b3.format : "HH:mm:ss") : this.val;
|
|
1926
1926
|
this.$emit("input", this.form);
|
|
1927
|
-
const required =
|
|
1927
|
+
const required = d.required instanceof Function ? d.required(this.form) : d.required;
|
|
1928
1928
|
if (required) {
|
|
1929
|
-
this.$refs.form.validateField(
|
|
1929
|
+
this.$refs.form.validateField(d.formKey);
|
|
1930
1930
|
}
|
|
1931
1931
|
}
|
|
1932
1932
|
}
|
|
@@ -1935,27 +1935,27 @@ var FormImpl = {
|
|
|
1935
1935
|
}
|
|
1936
1936
|
case "treeselect": {
|
|
1937
1937
|
itemInner = h("IndMInputSelect", {
|
|
1938
|
-
ref:
|
|
1938
|
+
ref: d.formKey,
|
|
1939
1939
|
props: {
|
|
1940
|
-
title:
|
|
1941
|
-
...
|
|
1942
|
-
value: this.form[
|
|
1940
|
+
title: d.title,
|
|
1941
|
+
...d.props || {},
|
|
1942
|
+
value: this.form[d.formKey],
|
|
1943
1943
|
disabled
|
|
1944
1944
|
},
|
|
1945
1945
|
attrs: {
|
|
1946
|
-
...
|
|
1946
|
+
...d.props,
|
|
1947
1947
|
noTriggerInDefault: true
|
|
1948
1948
|
},
|
|
1949
1949
|
on: {
|
|
1950
1950
|
input: (val) => {
|
|
1951
|
-
this.form[
|
|
1951
|
+
this.form[d.formKey] = val;
|
|
1952
1952
|
this.$emit("input", this.form);
|
|
1953
1953
|
this.$nextTick().then(() => {
|
|
1954
|
-
this.$emit("fieldChange", { formKey:
|
|
1954
|
+
this.$emit("fieldChange", { formKey: d.formKey, row: this.form });
|
|
1955
1955
|
});
|
|
1956
|
-
const required =
|
|
1956
|
+
const required = d.required instanceof Function ? d.required(this.form) : d.required;
|
|
1957
1957
|
if (required) {
|
|
1958
|
-
this.$refs.form.validateField(
|
|
1958
|
+
this.$refs.form.validateField(d.formKey);
|
|
1959
1959
|
}
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
@@ -1964,21 +1964,21 @@ var FormImpl = {
|
|
|
1964
1964
|
}
|
|
1965
1965
|
case "fileUpload": {
|
|
1966
1966
|
itemInner = h("IndMUploadFile", {
|
|
1967
|
-
ref:
|
|
1967
|
+
ref: d.formKey,
|
|
1968
1968
|
props: {
|
|
1969
|
-
...
|
|
1970
|
-
defaultList: this.form[
|
|
1969
|
+
...d.props || {},
|
|
1970
|
+
defaultList: this.form[d.formKey],
|
|
1971
1971
|
disabled
|
|
1972
1972
|
},
|
|
1973
1973
|
attrs: {
|
|
1974
|
-
...
|
|
1974
|
+
...d.props
|
|
1975
1975
|
},
|
|
1976
1976
|
on: {
|
|
1977
1977
|
onChangeData: (val) => {
|
|
1978
|
-
this.form[
|
|
1978
|
+
this.form[d.formKey] = val;
|
|
1979
1979
|
this.$emit("input", this.form);
|
|
1980
1980
|
this.$nextTick().then(() => {
|
|
1981
|
-
this.$emit("fieldChange", { formKey:
|
|
1981
|
+
this.$emit("fieldChange", { formKey: d.formKey, row: this.form });
|
|
1982
1982
|
});
|
|
1983
1983
|
}
|
|
1984
1984
|
}
|
|
@@ -1987,21 +1987,21 @@ var FormImpl = {
|
|
|
1987
1987
|
}
|
|
1988
1988
|
case "imgUpload": {
|
|
1989
1989
|
itemInner = h("IndUploadImg", {
|
|
1990
|
-
ref:
|
|
1990
|
+
ref: d.formKey,
|
|
1991
1991
|
props: {
|
|
1992
|
-
...
|
|
1993
|
-
defaultList: this.form[
|
|
1992
|
+
...d.props || {},
|
|
1993
|
+
defaultList: this.form[d.formKey],
|
|
1994
1994
|
disabled
|
|
1995
1995
|
},
|
|
1996
1996
|
attrs: {
|
|
1997
|
-
...
|
|
1997
|
+
...d.props
|
|
1998
1998
|
},
|
|
1999
1999
|
on: {
|
|
2000
2000
|
onChangeData: (val) => {
|
|
2001
|
-
this.form[
|
|
2001
|
+
this.form[d.formKey] = val;
|
|
2002
2002
|
this.$emit("input", this.form);
|
|
2003
2003
|
this.$nextTick().then(() => {
|
|
2004
|
-
this.$emit("fieldChange", { formKey:
|
|
2004
|
+
this.$emit("fieldChange", { formKey: d.formKey, row: this.form });
|
|
2005
2005
|
});
|
|
2006
2006
|
}
|
|
2007
2007
|
}
|
|
@@ -2009,42 +2009,42 @@ var FormImpl = {
|
|
|
2009
2009
|
break;
|
|
2010
2010
|
}
|
|
2011
2011
|
default: {
|
|
2012
|
-
let text = this.form[
|
|
2013
|
-
if (
|
|
2014
|
-
text = (_k = (_j = this.enumData[
|
|
2015
|
-
} else if (
|
|
2016
|
-
text = (_m = (_l =
|
|
2017
|
-
} else if (
|
|
2018
|
-
text = (_n =
|
|
2012
|
+
let text = this.form[d.formKey];
|
|
2013
|
+
if (d.enumKey) {
|
|
2014
|
+
text = (_k = (_j = this.enumData[d.enumKey]) == null ? void 0 : _j.enumData) == null ? void 0 : _k[text];
|
|
2015
|
+
} else if (d.enumList && d.enumList.length) {
|
|
2016
|
+
text = (_m = (_l = d.enumList) == null ? void 0 : _l.find(({ K }) => K === text)) == null ? void 0 : _m.V;
|
|
2017
|
+
} else if (d.enumData) {
|
|
2018
|
+
text = (_n = d.enumData) == null ? void 0 : _n[text];
|
|
2019
2019
|
}
|
|
2020
|
-
if (
|
|
2020
|
+
if (d.dateFormat) {
|
|
2021
2021
|
text = formatDate(text);
|
|
2022
2022
|
}
|
|
2023
|
-
if (
|
|
2024
|
-
text = isNaN(text) || text === null ? text : parseFloat(parseFloat(text).toFixed(
|
|
2023
|
+
if (d.scale !== void 0) {
|
|
2024
|
+
text = isNaN(text) || text === null ? text : parseFloat(parseFloat(text).toFixed(d.scale));
|
|
2025
2025
|
}
|
|
2026
2026
|
itemInner = h("span", {}, [
|
|
2027
2027
|
h(
|
|
2028
2028
|
"span",
|
|
2029
2029
|
{
|
|
2030
|
-
class:
|
|
2030
|
+
class: d.class || ""
|
|
2031
2031
|
},
|
|
2032
2032
|
[text !== 0 ? text || "" : text]
|
|
2033
2033
|
),
|
|
2034
2034
|
h("span", {
|
|
2035
2035
|
domProps: {
|
|
2036
|
-
innerHTML:
|
|
2036
|
+
innerHTML: d.unit ? " " : ""
|
|
2037
2037
|
}
|
|
2038
2038
|
}),
|
|
2039
|
-
h("span", {}, [
|
|
2039
|
+
h("span", {}, [d.unit || ""])
|
|
2040
2040
|
]);
|
|
2041
2041
|
}
|
|
2042
2042
|
}
|
|
2043
2043
|
}
|
|
2044
|
-
let conditionFlag =
|
|
2044
|
+
let conditionFlag = d.condition instanceof Function ? d.condition(this.form) : d.condition !== false;
|
|
2045
2045
|
let showMoreFlag = this.formType == "search" ? this.showMore ? true : idx < showMorePosition : true;
|
|
2046
2046
|
if (conditionFlag && showMoreFlag) {
|
|
2047
|
-
if (
|
|
2047
|
+
if (d.split === "true") {
|
|
2048
2048
|
formItems.push(
|
|
2049
2049
|
h(
|
|
2050
2050
|
"Col",
|
|
@@ -2066,7 +2066,7 @@ var FormImpl = {
|
|
|
2066
2066
|
)
|
|
2067
2067
|
);
|
|
2068
2068
|
}
|
|
2069
|
-
if (["selectbtn", "radio", "checkbox"].includes(
|
|
2069
|
+
if (["selectbtn", "radio", "checkbox"].includes(d.type)) {
|
|
2070
2070
|
formItems.push(
|
|
2071
2071
|
h(
|
|
2072
2072
|
"Col",
|
|
@@ -2076,7 +2076,7 @@ var FormImpl = {
|
|
|
2076
2076
|
},
|
|
2077
2077
|
nativeOn: {
|
|
2078
2078
|
click: () => {
|
|
2079
|
-
if (
|
|
2079
|
+
if (d.isTitle) {
|
|
2080
2080
|
this.$emit("itemClick", this.form);
|
|
2081
2081
|
}
|
|
2082
2082
|
}
|
|
@@ -2087,8 +2087,8 @@ var FormImpl = {
|
|
|
2087
2087
|
"FormItem",
|
|
2088
2088
|
{
|
|
2089
2089
|
props: {
|
|
2090
|
-
label:
|
|
2091
|
-
prop:
|
|
2090
|
+
label: d.title,
|
|
2091
|
+
prop: d.formKey
|
|
2092
2092
|
}
|
|
2093
2093
|
},
|
|
2094
2094
|
[]
|
|
@@ -2107,7 +2107,7 @@ var FormImpl = {
|
|
|
2107
2107
|
},
|
|
2108
2108
|
nativeOn: {
|
|
2109
2109
|
click: () => {
|
|
2110
|
-
if (
|
|
2110
|
+
if (d.isTitle) {
|
|
2111
2111
|
this.$emit("itemClick", this.form);
|
|
2112
2112
|
}
|
|
2113
2113
|
}
|
|
@@ -2118,16 +2118,16 @@ var FormImpl = {
|
|
|
2118
2118
|
"FormItem",
|
|
2119
2119
|
{
|
|
2120
2120
|
props: {
|
|
2121
|
-
labelWidth: this.formType != "searchMobile" && (
|
|
2122
|
-
label: this.formType != "searchMobile" && (
|
|
2123
|
-
prop:
|
|
2121
|
+
labelWidth: this.formType != "searchMobile" && (d.isTitle || spanList[idx + diff] != 24) ? 0 : void 0,
|
|
2122
|
+
label: this.formType != "searchMobile" && (d.isTitle || spanList[idx + diff] != 24) ? void 0 : d.title,
|
|
2123
|
+
prop: d.formKey
|
|
2124
2124
|
},
|
|
2125
|
-
class:
|
|
2125
|
+
class: d.isTitle ? "ind-list-title" : ""
|
|
2126
2126
|
},
|
|
2127
2127
|
[
|
|
2128
|
-
spanList[idx + diff] != 24 ?
|
|
2128
|
+
spanList[idx + diff] != 24 ? d.title + " \uFF1A" : "",
|
|
2129
2129
|
itemInner,
|
|
2130
|
-
this.formType != "searchMobile" &&
|
|
2130
|
+
this.formType != "searchMobile" && d.isTitle ? h("van-icon", { props: { name: "arrow" } }) : ""
|
|
2131
2131
|
]
|
|
2132
2132
|
)
|
|
2133
2133
|
]
|
|
@@ -2176,23 +2176,23 @@ var FormImpl = {
|
|
|
2176
2176
|
right: true
|
|
2177
2177
|
}
|
|
2178
2178
|
},
|
|
2179
|
-
renderBtns.map((
|
|
2179
|
+
renderBtns.map((d) => {
|
|
2180
2180
|
return h(
|
|
2181
2181
|
"IndButton",
|
|
2182
2182
|
{
|
|
2183
2183
|
props: {
|
|
2184
2184
|
size: "default",
|
|
2185
|
-
bizType:
|
|
2185
|
+
bizType: d.bizType
|
|
2186
2186
|
},
|
|
2187
2187
|
on: {
|
|
2188
2188
|
click: () => {
|
|
2189
|
-
if (
|
|
2190
|
-
|
|
2189
|
+
if (d.btnClick && d.btnClick instanceof Function) {
|
|
2190
|
+
d.btnClick(this.form);
|
|
2191
2191
|
}
|
|
2192
2192
|
}
|
|
2193
2193
|
}
|
|
2194
2194
|
},
|
|
2195
|
-
[
|
|
2195
|
+
[d.btnName]
|
|
2196
2196
|
);
|
|
2197
2197
|
})
|
|
2198
2198
|
)
|
|
@@ -2302,7 +2302,7 @@ const __vue2_script$H = {
|
|
|
2302
2302
|
methods: {
|
|
2303
2303
|
setDefaultItem(item2) {
|
|
2304
2304
|
let oldDefault = item2.isDefault;
|
|
2305
|
-
_.forEach(this.datas, (
|
|
2305
|
+
_.forEach(this.datas, (d) => d.isDefault = "0");
|
|
2306
2306
|
item2.isDefault = oldDefault == "1" ? "0" : "1";
|
|
2307
2307
|
let datasTmp = _.cloneDeep(this.datas);
|
|
2308
2308
|
this.datas = datasTmp;
|
|
@@ -2329,7 +2329,7 @@ const __vue2_script$H = {
|
|
|
2329
2329
|
if (["input", "number", "textarea", "datepicker"].includes(field.type)) {
|
|
2330
2330
|
return v;
|
|
2331
2331
|
} else if (["treeselect"].includes(field.type)) {
|
|
2332
|
-
return v == null ? void 0 : v.map((
|
|
2332
|
+
return v == null ? void 0 : v.map((d) => d.title).join("\u3001");
|
|
2333
2333
|
} else if (["select", "checkbox", "radio"].includes(field.type)) {
|
|
2334
2334
|
let enumTmp = _.reduce(
|
|
2335
2335
|
field.enumList || ((_a = this.formEnumData[field.enumKey]) == null ? void 0 : _a.enumList) || [],
|
|
@@ -2340,7 +2340,7 @@ const __vue2_script$H = {
|
|
|
2340
2340
|
{}
|
|
2341
2341
|
);
|
|
2342
2342
|
if (v instanceof Array) {
|
|
2343
|
-
return v.map((
|
|
2343
|
+
return v.map((d) => enumTmp[d]).join("\u3001");
|
|
2344
2344
|
} else {
|
|
2345
2345
|
return enumTmp[v] || "\u5168\u90E8";
|
|
2346
2346
|
}
|
|
@@ -3613,8 +3613,8 @@ const __vue2_script$A = {
|
|
|
3613
3613
|
return _.filter(this.subTable, { panel: "true" });
|
|
3614
3614
|
},
|
|
3615
3615
|
normalTables: function() {
|
|
3616
|
-
return _.filter(this.subTable, (
|
|
3617
|
-
return
|
|
3616
|
+
return _.filter(this.subTable, (d) => {
|
|
3617
|
+
return d.panel != "true";
|
|
3618
3618
|
});
|
|
3619
3619
|
},
|
|
3620
3620
|
hasList: function() {
|
|
@@ -3691,12 +3691,12 @@ const __vue2_script$A = {
|
|
|
3691
3691
|
this.form = dataSrc;
|
|
3692
3692
|
return;
|
|
3693
3693
|
}
|
|
3694
|
-
this.subTable.forEach((
|
|
3695
|
-
let unitFields = _.filter(
|
|
3694
|
+
this.subTable.forEach((d) => {
|
|
3695
|
+
let unitFields = _.filter(d.formFieldList, (dd) => dd.isSwitchUnit === "true").map(
|
|
3696
3696
|
(m) => m.id
|
|
3697
3697
|
);
|
|
3698
|
-
if (
|
|
3699
|
-
let tmpData = dataSrc[
|
|
3698
|
+
if (d.dataField) {
|
|
3699
|
+
let tmpData = dataSrc[d.dataField];
|
|
3700
3700
|
if (unitFields == null ? void 0 : unitFields.length) {
|
|
3701
3701
|
if (tmpData instanceof Array) {
|
|
3702
3702
|
_.forEach(tmpData, (dd) => {
|
|
@@ -3744,12 +3744,12 @@ const __vue2_script$A = {
|
|
|
3744
3744
|
this.$emit("update:formValue", dataSrc);
|
|
3745
3745
|
return;
|
|
3746
3746
|
}
|
|
3747
|
-
this.subTable.forEach((
|
|
3748
|
-
let unitFields = _.filter(
|
|
3747
|
+
this.subTable.forEach((d) => {
|
|
3748
|
+
let unitFields = _.filter(d.formFieldList, (dd) => dd.isSwitchUnit === "true").map(
|
|
3749
3749
|
(m) => m.id
|
|
3750
3750
|
);
|
|
3751
|
-
if (
|
|
3752
|
-
let tmpData = dataSrc[
|
|
3751
|
+
if (d.dataField) {
|
|
3752
|
+
let tmpData = dataSrc[d.dataField];
|
|
3753
3753
|
if (unitFields == null ? void 0 : unitFields.length) {
|
|
3754
3754
|
if (tmpData instanceof Array) {
|
|
3755
3755
|
_.forEach(tmpData, (dd) => {
|
|
@@ -3820,9 +3820,9 @@ const __vue2_script$A = {
|
|
|
3820
3820
|
_.forEach(this.formFieldsExt, (v, k) => {
|
|
3821
3821
|
let tableTmp = _.find(subTable, { id: k }) || {};
|
|
3822
3822
|
let formFieldListTmp = (tableTmp == null ? void 0 : tableTmp.formFieldList) || [];
|
|
3823
|
-
_.forEach(v, (
|
|
3824
|
-
let srcInfo = _.find(formFieldListTmp, { formKey:
|
|
3825
|
-
_.merge(srcInfo,
|
|
3823
|
+
_.forEach(v, (d) => {
|
|
3824
|
+
let srcInfo = _.find(formFieldListTmp, { formKey: d.formKey }) || {};
|
|
3825
|
+
_.merge(srcInfo, d);
|
|
3826
3826
|
});
|
|
3827
3827
|
});
|
|
3828
3828
|
}
|
|
@@ -3860,8 +3860,8 @@ const __vue2_script$A = {
|
|
|
3860
3860
|
} else if (table.type == "list") {
|
|
3861
3861
|
let rowKey = table.rowKey || "id";
|
|
3862
3862
|
let listTmp = _.cloneDeep(this.form[field]);
|
|
3863
|
-
let tmpRow = _.find(listTmp, (
|
|
3864
|
-
return
|
|
3863
|
+
let tmpRow = _.find(listTmp, (d) => {
|
|
3864
|
+
return d[rowKey] == data49[rowKey];
|
|
3865
3865
|
});
|
|
3866
3866
|
_.merge(tmpRow, data49);
|
|
3867
3867
|
this.form[field] = listTmp;
|
|
@@ -4074,17 +4074,17 @@ const __vue2_script$z = {
|
|
|
4074
4074
|
let datas;
|
|
4075
4075
|
if (this.searchVal) {
|
|
4076
4076
|
if (this.disablePage) {
|
|
4077
|
-
datas = _.filter(currentRows, (
|
|
4077
|
+
datas = _.filter(currentRows, (d) => {
|
|
4078
4078
|
var _a;
|
|
4079
|
-
let titleKey = (_a = _.find(this.formFieldList, (
|
|
4080
|
-
return !!
|
|
4079
|
+
let titleKey = (_a = _.find(this.formFieldList, (d2) => {
|
|
4080
|
+
return !!d2.isTitle;
|
|
4081
4081
|
})) == null ? void 0 : _a.formKey;
|
|
4082
4082
|
console.log("\u641C\u7D22\u8FC7\u6EE4:", {
|
|
4083
4083
|
titleKey,
|
|
4084
4084
|
searchVal: this.searchVal,
|
|
4085
|
-
rowData:
|
|
4085
|
+
rowData: d[titleKey]
|
|
4086
4086
|
});
|
|
4087
|
-
return titleKey ? _.includes(
|
|
4087
|
+
return titleKey ? _.includes(d[titleKey], this.searchVal) : false;
|
|
4088
4088
|
}) || [];
|
|
4089
4089
|
this.total = datas.length;
|
|
4090
4090
|
} else {
|
|
@@ -4219,16 +4219,16 @@ const __vue2_script$z = {
|
|
|
4219
4219
|
this.dataUrl = dataUrl;
|
|
4220
4220
|
this.methodsType = methods;
|
|
4221
4221
|
if ((_a = this.searchFormFieldsExt) == null ? void 0 : _a.length) {
|
|
4222
|
-
_.forEach(this.searchFormFieldsExt, (
|
|
4223
|
-
let srcInfo = _.find(searchFormFields, { formKey:
|
|
4224
|
-
_.merge(srcInfo,
|
|
4222
|
+
_.forEach(this.searchFormFieldsExt, (d) => {
|
|
4223
|
+
let srcInfo = _.find(searchFormFields, { formKey: d.formKey });
|
|
4224
|
+
_.merge(srcInfo, d);
|
|
4225
4225
|
});
|
|
4226
4226
|
}
|
|
4227
4227
|
this.searchFormFields = searchFormFields;
|
|
4228
4228
|
if ((_b = this.cardFieldsExt) == null ? void 0 : _b.length) {
|
|
4229
|
-
_.forEach(this.cardFieldsExt, (
|
|
4230
|
-
let srcInfo = _.find(formFieldList, { formKey:
|
|
4231
|
-
_.merge(srcInfo,
|
|
4229
|
+
_.forEach(this.cardFieldsExt, (d) => {
|
|
4230
|
+
let srcInfo = _.find(formFieldList, { formKey: d.formKey });
|
|
4231
|
+
_.merge(srcInfo, d);
|
|
4232
4232
|
});
|
|
4233
4233
|
}
|
|
4234
4234
|
this.formFieldList = formFieldList;
|
|
@@ -4525,16 +4525,16 @@ const __vue2_script$x = {
|
|
|
4525
4525
|
this.pageBtnText = pageBtnText;
|
|
4526
4526
|
this.dataUrl = dataUrl;
|
|
4527
4527
|
if ((_a = this.searchFormFieldsExt) == null ? void 0 : _a.length) {
|
|
4528
|
-
_.forEach(this.searchFormFieldsExt, (
|
|
4529
|
-
let srcInfo = _.find(searchFormFields, { formKey:
|
|
4530
|
-
_.merge(srcInfo,
|
|
4528
|
+
_.forEach(this.searchFormFieldsExt, (d) => {
|
|
4529
|
+
let srcInfo = _.find(searchFormFields, { formKey: d.formKey });
|
|
4530
|
+
_.merge(srcInfo, d);
|
|
4531
4531
|
});
|
|
4532
4532
|
}
|
|
4533
4533
|
this.searchFormFields = searchFormFields;
|
|
4534
4534
|
if ((_b = this.cardFieldsExt) == null ? void 0 : _b.length) {
|
|
4535
|
-
_.forEach(this.cardFieldsExt, (
|
|
4536
|
-
let srcInfo = _.find(formFieldList, { formKey:
|
|
4537
|
-
_.merge(srcInfo,
|
|
4535
|
+
_.forEach(this.cardFieldsExt, (d) => {
|
|
4536
|
+
let srcInfo = _.find(formFieldList, { formKey: d.formKey });
|
|
4537
|
+
_.merge(srcInfo, d);
|
|
4538
4538
|
});
|
|
4539
4539
|
}
|
|
4540
4540
|
this.formFieldList = formFieldList;
|
|
@@ -4738,8 +4738,8 @@ function _extends$2() {
|
|
|
4738
4738
|
function _extends$1() {
|
|
4739
4739
|
return _extends$1 = Object.assign ? Object.assign.bind() : function(a) {
|
|
4740
4740
|
for (var b, c = 1; c < arguments.length; c++)
|
|
4741
|
-
for (var
|
|
4742
|
-
Object.prototype.hasOwnProperty.call(b,
|
|
4741
|
+
for (var d in b = arguments[c], b)
|
|
4742
|
+
Object.prototype.hasOwnProperty.call(b, d) && (a[d] = b[d]);
|
|
4743
4743
|
return a;
|
|
4744
4744
|
}, _extends$1.apply(this, arguments);
|
|
4745
4745
|
}
|
|
@@ -4751,8 +4751,8 @@ var normalMerge = ["attrs", "props", "domProps"], toArrayMerge = ["class", "styl
|
|
|
4751
4751
|
else if (-1 !== normalMerge.indexOf(b))
|
|
4752
4752
|
c[b] = _extends$1({}, c[b], a2[b]);
|
|
4753
4753
|
else if (-1 !== toArrayMerge.indexOf(b)) {
|
|
4754
|
-
var
|
|
4755
|
-
c[b] = [].concat(
|
|
4754
|
+
var d = c[b] instanceof Array ? c[b] : [c[b]], e = a2[b] instanceof Array ? a2[b] : [a2[b]];
|
|
4755
|
+
c[b] = [].concat(d, e);
|
|
4756
4756
|
} else if (-1 !== functionalMerge.indexOf(b)) {
|
|
4757
4757
|
for (var f in a2[b])
|
|
4758
4758
|
if (c[b][f]) {
|
|
@@ -23041,8 +23041,8 @@ const __vue2_script$r = {
|
|
|
23041
23041
|
},
|
|
23042
23042
|
computed: {
|
|
23043
23043
|
isTree() {
|
|
23044
|
-
return _.some(this.columnsData, (
|
|
23045
|
-
return
|
|
23044
|
+
return _.some(this.columnsData, (d) => {
|
|
23045
|
+
return d.tree == true;
|
|
23046
23046
|
});
|
|
23047
23047
|
}
|
|
23048
23048
|
},
|
|
@@ -23052,10 +23052,10 @@ const __vue2_script$r = {
|
|
|
23052
23052
|
if (this.isTree) {
|
|
23053
23053
|
let dataTmp = (data49 == null ? void 0 : data49.data) || data49;
|
|
23054
23054
|
let leafNodes = [];
|
|
23055
|
-
deepEach({}, dataTmp, (
|
|
23055
|
+
deepEach({}, dataTmp, (d, p, idx) => {
|
|
23056
23056
|
var _a2;
|
|
23057
|
-
if (!((_a2 =
|
|
23058
|
-
leafNodes.push(
|
|
23057
|
+
if (!((_a2 = d == null ? void 0 : d.children) == null ? void 0 : _a2.length)) {
|
|
23058
|
+
leafNodes.push(d);
|
|
23059
23059
|
}
|
|
23060
23060
|
});
|
|
23061
23061
|
this.dataLen = (leafNodes == null ? void 0 : leafNodes.length) || 0;
|
|
@@ -23189,9 +23189,9 @@ const __vue2_script$r = {
|
|
|
23189
23189
|
return;
|
|
23190
23190
|
} else if (preLen === 1 && curLen === 2) {
|
|
23191
23191
|
let selectedRowsClone = _.cloneDeep(selectedRows);
|
|
23192
|
-
_.remove(selectedRowsClone, (
|
|
23192
|
+
_.remove(selectedRowsClone, (d) => {
|
|
23193
23193
|
return _.some(this.selectedRows, (dd) => {
|
|
23194
|
-
return dd[this.rowKey || "id"] ==
|
|
23194
|
+
return dd[this.rowKey || "id"] == d[this.rowKey || "id"];
|
|
23195
23195
|
});
|
|
23196
23196
|
});
|
|
23197
23197
|
(_d = (_c = this.$refs) == null ? void 0 : _c.table) == null ? void 0 : _d.setSelection(selectedRowsClone, true);
|
|
@@ -23199,9 +23199,9 @@ const __vue2_script$r = {
|
|
|
23199
23199
|
}
|
|
23200
23200
|
}
|
|
23201
23201
|
if (this.isTree && !this.enableSelectAll) {
|
|
23202
|
-
this.selectedRows = _.filter(selectedRows, (
|
|
23202
|
+
this.selectedRows = _.filter(selectedRows, (d) => {
|
|
23203
23203
|
var _a2;
|
|
23204
|
-
return !((_a2 =
|
|
23204
|
+
return !((_a2 = d == null ? void 0 : d.children) == null ? void 0 : _a2.length);
|
|
23205
23205
|
});
|
|
23206
23206
|
} else {
|
|
23207
23207
|
this.selectedRows = selectedRows;
|
|
@@ -23373,8 +23373,8 @@ const __vue2_script$q = {
|
|
|
23373
23373
|
if (this.enableSelectAll) {
|
|
23374
23374
|
tempNodes = this.value;
|
|
23375
23375
|
} else {
|
|
23376
|
-
tempNodes = _.filter(this.value, (
|
|
23377
|
-
return !
|
|
23376
|
+
tempNodes = _.filter(this.value, (d) => {
|
|
23377
|
+
return !d.children || d.children.length == 0;
|
|
23378
23378
|
});
|
|
23379
23379
|
}
|
|
23380
23380
|
let textField = "title";
|
|
@@ -23384,8 +23384,8 @@ const __vue2_script$q = {
|
|
|
23384
23384
|
textField = "V";
|
|
23385
23385
|
}
|
|
23386
23386
|
console.log("textField is", textField);
|
|
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((
|
|
23388
|
-
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((d) => {
|
|
23388
|
+
return d.K == tempNodes[0].K;
|
|
23389
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 : "";
|
|
23390
23390
|
},
|
|
23391
23391
|
setSelectedTitles(title4) {
|
|
@@ -23446,8 +23446,8 @@ const __vue2_script$p = {
|
|
|
23446
23446
|
if (this.multiple) {
|
|
23447
23447
|
let valueClone = _.cloneDeep(this.value);
|
|
23448
23448
|
if (valueClone.includes(item2.K)) {
|
|
23449
|
-
_.remove(valueClone, (
|
|
23450
|
-
return
|
|
23449
|
+
_.remove(valueClone, (d) => {
|
|
23450
|
+
return d == item2.K;
|
|
23451
23451
|
});
|
|
23452
23452
|
} else {
|
|
23453
23453
|
valueClone.push(item2.K);
|
|
@@ -23463,7 +23463,7 @@ const __vue2_script$p = {
|
|
|
23463
23463
|
} else {
|
|
23464
23464
|
this.$emit(
|
|
23465
23465
|
"input",
|
|
23466
|
-
this.options.map((
|
|
23466
|
+
this.options.map((d) => d.K)
|
|
23467
23467
|
);
|
|
23468
23468
|
}
|
|
23469
23469
|
}
|
|
@@ -30409,7 +30409,7 @@ const __vue2_script$8 = {
|
|
|
30409
30409
|
function findLeavesDeep(node, childrenTmp) {
|
|
30410
30410
|
var _a2, _b;
|
|
30411
30411
|
if (((_a2 = node == null ? void 0 : node.children) == null ? void 0 : _a2.length) > 0) {
|
|
30412
|
-
(_b = node.children) == null ? void 0 : _b.forEach((
|
|
30412
|
+
(_b = node.children) == null ? void 0 : _b.forEach((d) => findLeavesDeep(d, childrenTmp));
|
|
30413
30413
|
} else if (node.path || node.uri) {
|
|
30414
30414
|
childrenTmp.push(node);
|
|
30415
30415
|
}
|