agilebuilder-ui 1.1.2-tmp8 → 1.1.2-tmp9
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/lib/super-ui.js
CHANGED
|
@@ -18927,10 +18927,6 @@ const customFormatter$1 = {
|
|
|
18927
18927
|
return this.dataSourceType === "mysql" ? !0 : 1;
|
|
18928
18928
|
if (e === "inactiveValue")
|
|
18929
18929
|
return this.dataSourceType === "mysql" ? !1 : 0;
|
|
18930
|
-
if (e === "offColor")
|
|
18931
|
-
return "#ff4949";
|
|
18932
|
-
if (e === "onColor")
|
|
18933
|
-
return "#13ce66";
|
|
18934
18930
|
}
|
|
18935
18931
|
},
|
|
18936
18932
|
scanClick() {
|
|
@@ -19346,11 +19342,9 @@ function _sfc_render$_(e, t, n, o, l, u) {
|
|
|
19346
19342
|
disabled: n.disabled,
|
|
19347
19343
|
"inactive-text": u.getSwitchConfig("inactiveText"),
|
|
19348
19344
|
"inactive-value": u.getSwitchConfig("inactiveValue"),
|
|
19349
|
-
"active-color": u.getSwitchConfig("onColor"),
|
|
19350
|
-
"inactive-color": u.getSwitchConfig("offColor"),
|
|
19351
19345
|
onChange: t[82] || (t[82] = (ne) => u.cellEvent("change", ne)),
|
|
19352
19346
|
onInput: t[83] || (t[83] = (ne) => u.cellEvent("input", ne, !0))
|
|
19353
|
-
}, null, 8, ["modelValue", "active-text", "active-value", "disabled", "inactive-text", "inactive-value"
|
|
19347
|
+
}, null, 8, ["modelValue", "active-text", "active-value", "disabled", "inactive-text", "inactive-value"])) : n.type === "slider" ? (openBlock(), createBlock(X, {
|
|
19354
19348
|
key: 16,
|
|
19355
19349
|
ref: "item",
|
|
19356
19350
|
modelValue: l.innerValue,
|
|
@@ -36482,6 +36476,11 @@ const _sfc_main$s = {
|
|
|
36482
36476
|
openTree: {
|
|
36483
36477
|
type: Boolean,
|
|
36484
36478
|
default: !0
|
|
36479
|
+
},
|
|
36480
|
+
// 当前表单变量数据信息
|
|
36481
|
+
pageModels: {
|
|
36482
|
+
type: Object,
|
|
36483
|
+
default: null
|
|
36485
36484
|
}
|
|
36486
36485
|
},
|
|
36487
36486
|
data() {
|
|
@@ -36515,14 +36514,18 @@ const _sfc_main$s = {
|
|
|
36515
36514
|
}
|
|
36516
36515
|
},
|
|
36517
36516
|
getPropName(e, t, n) {
|
|
36518
|
-
return getPropNameWhenJoinTable(e, t, n);
|
|
36517
|
+
return e && e.startsWith("${") && (e = e.substring(e.indexOf(".") + 1, e.length - 1)), getPropNameWhenJoinTable(e, t, n);
|
|
36518
|
+
},
|
|
36519
|
+
getPropType(e) {
|
|
36520
|
+
let t = "data";
|
|
36521
|
+
return e && e.startsWith("${") && (t = e.substring(2, e.indexOf("."))), t;
|
|
36519
36522
|
},
|
|
36520
36523
|
// 清空已选的结果
|
|
36521
36524
|
emptyOrganizationResult() {
|
|
36522
36525
|
const e = this.fields;
|
|
36523
36526
|
e && e.length > 0 && (e.forEach((t) => {
|
|
36524
|
-
const n = this.getPropName(t.model);
|
|
36525
|
-
this.setValue(n, null);
|
|
36527
|
+
const n = this.getPropName(t.model), o = this.getPropType(t.model);
|
|
36528
|
+
this.setValue(n, null, o);
|
|
36526
36529
|
}), this.selectOrganizationAllInfo = {}, this.selectOrganizationInfo = null, this.searchField = null);
|
|
36527
36530
|
},
|
|
36528
36531
|
// 关闭组织树
|
|
@@ -36534,23 +36537,31 @@ const _sfc_main$s = {
|
|
|
36534
36537
|
typeof o > "u" && (o = !1);
|
|
36535
36538
|
const l = this.treeType, u = this.fields;
|
|
36536
36539
|
u && u.length > 0 && u.forEach((d) => {
|
|
36537
|
-
const v = d.type, _ = this.getOrgSelectData(v, e, this.isUserTree(l), o), E = this.getPropName(d.model);
|
|
36538
|
-
this.getOrgDataModel(E, _, o, v, t, n);
|
|
36540
|
+
const v = d.type, _ = this.getOrgSelectData(v, e, this.isUserTree(l), o), E = this.getPropName(d.model), S = this.getPropType(d.model);
|
|
36541
|
+
this.getOrgDataModel(E, _, o, v, t, n, S);
|
|
36539
36542
|
});
|
|
36540
36543
|
},
|
|
36541
36544
|
/**
|
|
36542
36545
|
* @param orgDataType 字段属性:id、name、loginName、code、email、telephone
|
|
36543
36546
|
*/
|
|
36544
|
-
getOrgDataModel(e, t, n, o, l, u) {
|
|
36547
|
+
getOrgDataModel(e, t, n, o, l, u, d) {
|
|
36545
36548
|
if (n) {
|
|
36546
|
-
const
|
|
36547
|
-
this.selectOrganizationAllInfo[o] = t, this.setValue(e, t), this.$emit("replace", e,
|
|
36549
|
+
const v = this.getModelValue(e, d);
|
|
36550
|
+
this.selectOrganizationAllInfo[o] = t, this.setValue(e, t, d), this.$emit("replace", e, v, t);
|
|
36548
36551
|
} else
|
|
36549
|
-
this.setValue(e, t);
|
|
36550
|
-
},
|
|
36551
|
-
getModelValue(e) {
|
|
36552
|
-
let
|
|
36553
|
-
|
|
36552
|
+
this.setValue(e, t, d);
|
|
36553
|
+
},
|
|
36554
|
+
getModelValue(e, t) {
|
|
36555
|
+
let n = this.models;
|
|
36556
|
+
t && t === "page" && (n = this.pageModels);
|
|
36557
|
+
let o = "";
|
|
36558
|
+
if (this.isJoinTable === !1 && e && e.indexOf(".") > 0)
|
|
36559
|
+
o = this.getParentObject(e, n)[e.substring(e.lastIndexOf(".") + 1)];
|
|
36560
|
+
else {
|
|
36561
|
+
const l = this.getPropName(e);
|
|
36562
|
+
t && t === "page" ? o = n ? n[l] : null : o = n[l];
|
|
36563
|
+
}
|
|
36564
|
+
return o;
|
|
36554
36565
|
},
|
|
36555
36566
|
// 是否是人员树
|
|
36556
36567
|
isUserTree(e) {
|
|
@@ -36674,9 +36685,9 @@ const _sfc_main$s = {
|
|
|
36674
36685
|
if (l && l.length > 0) {
|
|
36675
36686
|
const u = l[0];
|
|
36676
36687
|
if (u) {
|
|
36677
|
-
const d = this.getPropName(u.model), v = this.getModelValue(d);
|
|
36678
|
-
if (
|
|
36679
|
-
this.selectOrganizationInfo =
|
|
36688
|
+
const d = this.getPropName(u.model), v = this.getPropType(u.model), _ = this.getModelValue(d, v);
|
|
36689
|
+
if (_ && _ !== null && _ !== "") {
|
|
36690
|
+
this.selectOrganizationInfo = _, this.searchField = o;
|
|
36680
36691
|
break;
|
|
36681
36692
|
}
|
|
36682
36693
|
}
|
|
@@ -36691,14 +36702,21 @@ const _sfc_main$s = {
|
|
|
36691
36702
|
}
|
|
36692
36703
|
}
|
|
36693
36704
|
},
|
|
36694
|
-
setValue(e, t) {
|
|
36695
|
-
|
|
36705
|
+
setValue(e, t, n) {
|
|
36706
|
+
n || (n = this.getPropType(e));
|
|
36707
|
+
let o = this.models;
|
|
36708
|
+
n && n === "page" && (o = this.pageModels), this.setEntityValue(e, t, o);
|
|
36709
|
+
},
|
|
36710
|
+
setEntityValue(e, t, n) {
|
|
36711
|
+
if (n) {
|
|
36696
36712
|
if (this.isJoinTable === !1 && e && e.indexOf(".") > 0) {
|
|
36697
|
-
const
|
|
36698
|
-
|
|
36699
|
-
} else
|
|
36700
|
-
|
|
36701
|
-
|
|
36713
|
+
const o = this.getParentObject(e, n);
|
|
36714
|
+
o && setEntityFieldValue(o, e.substring(e.lastIndexOf(".") + 1), t);
|
|
36715
|
+
} else {
|
|
36716
|
+
const o = this.getPropName(e);
|
|
36717
|
+
setEntityFieldValue(n, o, t);
|
|
36718
|
+
}
|
|
36719
|
+
console.log("this.value===models=", n), this.$emit("setValue", e, t), (t == null || t === "") && this.$emit("clear", e);
|
|
36702
36720
|
}
|
|
36703
36721
|
},
|
|
36704
36722
|
getParentObject(e, t) {
|