slw 0.5.982 → 0.5.984
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/index.js +55 -36
- package/lib/index.umd.cjs +2 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -37068,7 +37068,12 @@ const windowForm_vue_vue_type_style_index_0_lang = "", _hoisted_1$kV = { class:
|
|
|
37068
37068
|
return formConfig.value.columns.forEach((H) => {
|
|
37069
37069
|
H.editRender && H.editRender.props.readonlyLogic && (Q[H.field] = H);
|
|
37070
37070
|
}), Q;
|
|
37071
|
-
}), subQueryFields = computed(() => formConfig.value.columns.filter((Q) => Q.dataType === "SQL")), computeSpan = computed(() => (Q) => Q.dataType === "EDITOR" || Q.dataType === "TEXT" ? 24 : Q.fwidth ? Number(Q.fwidth) > 24 ? 24 : Number(Q.fwidth) : 12)
|
|
37071
|
+
}), subQueryFields = computed(() => formConfig.value.columns.filter((Q) => Q.dataType === "SQL")), computeSpan = computed(() => (Q) => Q.dataType === "EDITOR" || Q.dataType === "TEXT" ? 24 : Q.fwidth ? Number(Q.fwidth) > 24 ? 24 : Number(Q.fwidth) : 12), formRemoteSearchMap = computed(() => {
|
|
37072
|
+
let Q = {};
|
|
37073
|
+
return formConfig.value.columns.forEach((H) => {
|
|
37074
|
+
H.remoteSearch && H.selectorId && (Q[H.id] = H);
|
|
37075
|
+
}), Q;
|
|
37076
|
+
});
|
|
37072
37077
|
onMounted(async () => {
|
|
37073
37078
|
if (formConfig.value.params.linkUrl)
|
|
37074
37079
|
return;
|
|
@@ -37102,12 +37107,21 @@ const windowForm_vue_vue_type_style_index_0_lang = "", _hoisted_1$kV = { class:
|
|
|
37102
37107
|
} : formConfig.value.params.queryParams && Object.keys(formConfig.value.params.queryParams).forEach((G) => {
|
|
37103
37108
|
let X = G.toLowerCase();
|
|
37104
37109
|
H.hasOwnProperty(X) && (H[X] = formConfig.value.params.queryParams[G]);
|
|
37105
|
-
}), axios.post("/window/data/" + formConfig.value.params.datasourceCode, H).then((G) => {
|
|
37110
|
+
}), axios.post("/window/data/" + formConfig.value.params.datasourceCode, H).then(async (G) => {
|
|
37106
37111
|
if (G && G.data && G.data.result && G.data.data) {
|
|
37107
|
-
G.data.data[0] && (formData.value = {
|
|
37112
|
+
if (G.data.data[0] && (formData.value = {
|
|
37108
37113
|
...formData.value,
|
|
37109
37114
|
...G.data.data[0]
|
|
37110
|
-
})
|
|
37115
|
+
}, Object.keys(formRemoteSearchMap.value).length > 0))
|
|
37116
|
+
for (const K of Object.keys(formRemoteSearchMap.value)) {
|
|
37117
|
+
let ee = formRemoteSearchMap.value[K];
|
|
37118
|
+
ee.itemRender.options = await remoteMethod(
|
|
37119
|
+
formData.value[ee.field],
|
|
37120
|
+
ee.id,
|
|
37121
|
+
ee.selectorId,
|
|
37122
|
+
"$_value"
|
|
37123
|
+
), ee.itemRender.options.length > 0 && (formData.value[ee.field] = ee.itemRender.options[0].VALUE);
|
|
37124
|
+
}
|
|
37111
37125
|
let X = formData.value, Z = {
|
|
37112
37126
|
rowId: formConfig.value.rowId,
|
|
37113
37127
|
// eslint-disable-next-line no-prototype-builtins
|
|
@@ -37325,24 +37339,25 @@ const windowForm_vue_vue_type_style_index_0_lang = "", _hoisted_1$kV = { class:
|
|
|
37325
37339
|
}
|
|
37326
37340
|
}
|
|
37327
37341
|
readonlyLogic();
|
|
37328
|
-
}, remoteMethod = async (Q, H, G) => {
|
|
37329
|
-
let
|
|
37342
|
+
}, remoteMethod = async (Q, H, G, X = "$_f_value") => {
|
|
37343
|
+
let Z = [], K = {
|
|
37344
|
+
_region_id: formConfig.value.params._region_id,
|
|
37345
|
+
_field_id: H,
|
|
37346
|
+
_select_id: G
|
|
37347
|
+
};
|
|
37348
|
+
K[X] = Q;
|
|
37349
|
+
let ee = await axios.post(
|
|
37330
37350
|
"/window/selector",
|
|
37331
|
-
$qs.stringify(
|
|
37332
|
-
$_f_value: Q,
|
|
37333
|
-
_region_id: formConfig.value.params._region_id,
|
|
37334
|
-
_field_id: H,
|
|
37335
|
-
_select_id: G
|
|
37336
|
-
})
|
|
37351
|
+
$qs.stringify(K)
|
|
37337
37352
|
);
|
|
37338
|
-
if (
|
|
37339
|
-
return
|
|
37353
|
+
if (ee.data.result && ee.data.data)
|
|
37354
|
+
return Z = ee.data.data.map((te) => Object.assign(
|
|
37340
37355
|
{
|
|
37341
|
-
value:
|
|
37342
|
-
label:
|
|
37356
|
+
value: te.VALUE,
|
|
37357
|
+
label: te.NAME
|
|
37343
37358
|
},
|
|
37344
|
-
|
|
37345
|
-
)),
|
|
37359
|
+
te
|
|
37360
|
+
)), Z;
|
|
37346
37361
|
}, readonlyLogic = () => {
|
|
37347
37362
|
if (Object.keys(readOnlyColumnMap.value).length > 0) {
|
|
37348
37363
|
let Q = Object.keys(readOnlyColumnMap.value);
|
|
@@ -38183,14 +38198,14 @@ const _hoisted_1$kT = ["src"], _sfc_main$3 = {
|
|
|
38183
38198
|
emits: ["close"],
|
|
38184
38199
|
setup(Q, { emit: H }) {
|
|
38185
38200
|
const G = Q, X = inject("$componentMapping"), Z = inject("$base64Encode"), K = inject("$base64Decode"), ee = inject("$t");
|
|
38186
|
-
let te = ref(!1), ne = shallowRef(), re = ref(!1), oe = ref(1e3), ae = ref({}), le = ref(
|
|
38201
|
+
let te = ref(!1), ne = shallowRef(), re = ref(!1), oe = ref(1e3), ae = ref({}), le = ref("88%"), se = ref(75), ce = ref();
|
|
38187
38202
|
const de = inject("$components"), he = inject("$componentsPath"), ue = () => {
|
|
38188
38203
|
te.value = !1;
|
|
38189
38204
|
};
|
|
38190
38205
|
watch(
|
|
38191
38206
|
() => G.actionData,
|
|
38192
38207
|
async (fe) => {
|
|
38193
|
-
fe.type === "show" ? (te.value = !0, fe.params && typeof fe.params.width < "u" && (le.value = fe.params.width), fe.params && typeof fe.params.height < "u" && (se.value = fe.params.height), fe.params && typeof fe.params.fullscreen < "u" && (re.value = fe.params.fullscreen), fe.params && typeof fe.params.zIndex < "u" && (oe.value = fe.params.zIndex), ae.value = XEUtils$1.clone(toRaw(fe.params), !0), fe.showComponent && (ne.value = (await de[`${he}/${fe.showComponent}`]()).default)) : te.value = !1;
|
|
38208
|
+
fe.type === "show" ? (te.value = !0, fe.params && typeof fe.params.width < "u" && (le.value = fe.params.width), fe.params && typeof fe.params.height < "u" && (typeof fe.params.height == "number" || fe.params.height.indexOf("px") > 0 ? (se.value = parseInt(fe.params.height) / document.documentElement.clientHeight * 100, se.value = Math.floor(se.value)) : fe.params.height.indexOf("%") > 0 || fe.params.height.indexOf("vh") > 0 ? se.value = parseInt(fe.params.height) : se.value = 75), fe.params && typeof fe.params.fullscreen < "u" && (re.value = fe.params.fullscreen), fe.params && typeof fe.params.zIndex < "u" && (oe.value = fe.params.zIndex), ae.value = XEUtils$1.clone(toRaw(fe.params), !0), fe.showComponent && (ne.value = (await de[`${he}/${fe.showComponent}`]()).default)) : te.value = !1;
|
|
38194
38209
|
},
|
|
38195
38210
|
{ deep: !0 }
|
|
38196
38211
|
);
|
|
@@ -38203,7 +38218,6 @@ const _hoisted_1$kT = ["src"], _sfc_main$3 = {
|
|
|
38203
38218
|
ref_key: "selfModal",
|
|
38204
38219
|
ref: ce,
|
|
38205
38220
|
width: unref(le),
|
|
38206
|
-
height: unref(se),
|
|
38207
38221
|
modelValue: unref(te),
|
|
38208
38222
|
"onUpdate:modelValue": me[0] || (me[0] = (ve) => isRef(te) ? te.value = ve : te = ve),
|
|
38209
38223
|
visible: unref(te),
|
|
@@ -38215,6 +38229,7 @@ const _hoisted_1$kT = ["src"], _sfc_main$3 = {
|
|
|
38215
38229
|
"append-to-body": "",
|
|
38216
38230
|
transfer: "",
|
|
38217
38231
|
resize: "",
|
|
38232
|
+
"align-center": "",
|
|
38218
38233
|
"close-on-press-escape": "",
|
|
38219
38234
|
"destroy-on-close": "",
|
|
38220
38235
|
onShow: me[2] || (me[2] = (ve) => unref(re) ? unref(ce).maximize() : null),
|
|
@@ -38222,22 +38237,26 @@ const _hoisted_1$kT = ["src"], _sfc_main$3 = {
|
|
|
38222
38237
|
onClosed: pe
|
|
38223
38238
|
}, {
|
|
38224
38239
|
default: withCtx(() => [
|
|
38225
|
-
|
|
38226
|
-
|
|
38227
|
-
|
|
38228
|
-
|
|
38229
|
-
|
|
38230
|
-
|
|
38231
|
-
|
|
38232
|
-
|
|
38233
|
-
|
|
38234
|
-
|
|
38235
|
-
|
|
38236
|
-
|
|
38237
|
-
|
|
38240
|
+
createElementVNode("div", {
|
|
38241
|
+
style: normalizeStyle({ height: unref(se) ? unref(se) + "vh" : "75vh" })
|
|
38242
|
+
}, [
|
|
38243
|
+
Q.actionData.showComponent && Q.actionData.showComponent.indexOf("http") !== -1 ? (openBlock(), createElementBlock("iframe", {
|
|
38244
|
+
key: 0,
|
|
38245
|
+
src: Q.actionData.showComponent,
|
|
38246
|
+
frameborder: "0",
|
|
38247
|
+
width: "100%",
|
|
38248
|
+
height: "100%",
|
|
38249
|
+
scrolling: "auto",
|
|
38250
|
+
style: { "background-color": "#fff" }
|
|
38251
|
+
}, null, 8, _hoisted_1$kT)) : (openBlock(), createBlock(resolveDynamicComponent(unref(ne)), {
|
|
38252
|
+
key: 1,
|
|
38253
|
+
componentData: unref(ae),
|
|
38254
|
+
onClose: ue
|
|
38255
|
+
}, null, 40, ["componentData"]))
|
|
38256
|
+
], 4)
|
|
38238
38257
|
]),
|
|
38239
38258
|
_: 1
|
|
38240
|
-
}, 8, ["width", "
|
|
38259
|
+
}, 8, ["width", "modelValue", "visible", "fullscreen", "z-index", "title"]);
|
|
38241
38260
|
};
|
|
38242
38261
|
}
|
|
38243
38262
|
};
|
|
@@ -122179,7 +122198,7 @@ function reConsole() {
|
|
|
122179
122198
|
}
|
|
122180
122199
|
}
|
|
122181
122200
|
console.info(
|
|
122182
|
-
"%cSLW %cVer 0.5.
|
|
122201
|
+
"%cSLW %cVer 0.5.983",
|
|
122183
122202
|
"color:#409EFF;font-size: 22px;font-weight:bolder",
|
|
122184
122203
|
"color:#999;font-size: 12px"
|
|
122185
122204
|
);
|