slw 0.7.9 → 0.8.0
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 +107 -101
- package/lib/index.umd.cjs +4 -4
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -38865,7 +38865,7 @@ var js = js$1.exports;
|
|
|
38865
38865
|
})(Q);
|
|
38866
38866
|
})(js$1);
|
|
38867
38867
|
var jsExports = js$1.exports;
|
|
38868
|
-
const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports),
|
|
38868
|
+
const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_vue_vue_type_style_index_0_scoped_28b1b88e_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-28b1b88e"), Q = Q(), popScopeId(), Q), _hoisted_1$kV = { class: "slw-window-form" }, _hoisted_2$kR = {
|
|
38869
38869
|
key: 0,
|
|
38870
38870
|
style: { "text-align": "left", "font-size": "18px", "line-height": "30px", "font-weight": "bold", padding: "5px 30px 0 15px" }
|
|
38871
38871
|
}, _hoisted_3$hS = ["onClick"], _sfc_main$5 = {
|
|
@@ -38984,7 +38984,7 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
|
|
|
38984
38984
|
return formConfig.value.columns.forEach((H) => {
|
|
38985
38985
|
H.editRender && H.editRender.props.readonlyLogic && (Q[H.field] = H);
|
|
38986
38986
|
}), Q;
|
|
38987
|
-
}), 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(() => {
|
|
38987
|
+
}), subQueryFields = computed(() => formConfig.value.columns.filter((Q) => Q.dataType === "SQL" && Q.displayForm)), computeSpan = computed(() => (Q) => Q.dataType === "EDITOR" || Q.dataType === "TEXT" ? 24 : Q.fwidth ? Number(Q.fwidth) > 24 ? 24 : Number(Q.fwidth) : 12), formRemoteSearchMap = computed(() => {
|
|
38988
38988
|
let Q = {};
|
|
38989
38989
|
return formConfig.value.columns.forEach((H) => {
|
|
38990
38990
|
H.remoteSearch && H.selectorId && (Q[H.id] = H);
|
|
@@ -39165,129 +39165,135 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
|
|
|
39165
39165
|
return H || regionMap.value[Q];
|
|
39166
39166
|
}, formInitData = async (Q, H, X) => {
|
|
39167
39167
|
if (X) {
|
|
39168
|
-
let
|
|
39169
|
-
formConfig.value.params.queryParams && Object.keys(formConfig.value.params.queryParams).forEach((
|
|
39170
|
-
|
|
39171
|
-
}), formConfig.value.params.parentData && Object.keys(formConfig.value.params.parentData).forEach((
|
|
39172
|
-
|
|
39173
|
-
}), await axios.post("window/defaultValue", $qs.stringify({ _region_id: H })).then((
|
|
39174
|
-
if (
|
|
39175
|
-
for (let
|
|
39176
|
-
let
|
|
39177
|
-
if (Q[
|
|
39168
|
+
let K = {}, ee = {};
|
|
39169
|
+
formConfig.value.params.queryParams && Object.keys(formConfig.value.params.queryParams).forEach((te) => {
|
|
39170
|
+
K["PARAMS." + te] = formConfig.value.params.queryParams[te];
|
|
39171
|
+
}), formConfig.value.params.parentData && Object.keys(formConfig.value.params.parentData).forEach((te) => {
|
|
39172
|
+
ee["PARENT." + te] = formConfig.value.params.parentData[te];
|
|
39173
|
+
}), await axios.post("window/defaultValue", $qs.stringify({ _region_id: H })).then((te) => {
|
|
39174
|
+
if (te.data.result && te.data.data)
|
|
39175
|
+
for (let ne in te.data.data) {
|
|
39176
|
+
let re = te.data.data[ne];
|
|
39177
|
+
if (Q[ne] = evalDefaultValue(re, {
|
|
39178
39178
|
...Q,
|
|
39179
|
-
...
|
|
39180
|
-
...
|
|
39181
|
-
}), Q[
|
|
39182
|
-
let
|
|
39179
|
+
...K,
|
|
39180
|
+
...ee
|
|
39181
|
+
}), Q[ne]) {
|
|
39182
|
+
let oe = {
|
|
39183
39183
|
data: Q,
|
|
39184
|
-
item: formConfig.value.columns.filter((
|
|
39185
|
-
property:
|
|
39184
|
+
item: formConfig.value.columns.filter((ae) => ae.field == ne)[0],
|
|
39185
|
+
property: ne
|
|
39186
39186
|
};
|
|
39187
|
-
onFieldChange(
|
|
39187
|
+
onFieldChange(oe);
|
|
39188
39188
|
}
|
|
39189
39189
|
}
|
|
39190
39190
|
});
|
|
39191
39191
|
}
|
|
39192
|
-
|
|
39193
|
-
|
|
39194
|
-
|
|
39195
|
-
|
|
39192
|
+
const G = [], Z = [];
|
|
39193
|
+
for (const K of Object.keys(formSelectMap.value)) {
|
|
39194
|
+
let ee = formSelectMap.value[K];
|
|
39195
|
+
if (ee.displayForm) {
|
|
39196
|
+
if (ee.dataType === "TREE")
|
|
39196
39197
|
await axios.post(
|
|
39197
39198
|
"/window/selector",
|
|
39198
39199
|
$qs.stringify({
|
|
39199
39200
|
...Q,
|
|
39200
|
-
_field_id:
|
|
39201
|
-
_select_id:
|
|
39201
|
+
_field_id: ee.id,
|
|
39202
|
+
_select_id: ee.selectorId
|
|
39202
39203
|
})
|
|
39203
|
-
).then((
|
|
39204
|
-
|
|
39204
|
+
).then((te) => {
|
|
39205
|
+
te.data.result && te.data.data && (ee.itemRender.props.treeData = te.data.data);
|
|
39205
39206
|
});
|
|
39206
|
-
else if (
|
|
39207
|
-
|
|
39208
|
-
|
|
39209
|
-
|
|
39210
|
-
|
|
39211
|
-
|
|
39212
|
-
),
|
|
39207
|
+
else if (ee.remoteSearch) {
|
|
39208
|
+
ee.itemRender.options = [], ee.itemRender.props.remoteMethod = debounce(async (ne) => {
|
|
39209
|
+
ne && (ee.itemRender.props.loading = !0, ee.itemRender.options = await remoteMethod(
|
|
39210
|
+
ne,
|
|
39211
|
+
ee.id,
|
|
39212
|
+
ee.selectorId
|
|
39213
|
+
), ee.itemRender.props.loading = !1);
|
|
39213
39214
|
}, 1500);
|
|
39214
|
-
let
|
|
39215
|
-
if (Q[
|
|
39216
|
-
|
|
39217
|
-
|
|
39218
|
-
|
|
39219
|
-
|
|
39215
|
+
let te = Q["_" + ee.field + "_NAME"];
|
|
39216
|
+
if (Q[ee.field] && te) {
|
|
39217
|
+
ee.itemRender.options = await remoteMethod(
|
|
39218
|
+
te,
|
|
39219
|
+
ee.id,
|
|
39220
|
+
ee.selectorId
|
|
39220
39221
|
);
|
|
39221
|
-
let
|
|
39222
|
-
formConfig.value.openType === "new" &&
|
|
39222
|
+
let ne = ee.itemRender.options;
|
|
39223
|
+
formConfig.value.openType === "new" && ee.visible && !Q[ee.field] && ne.length > 0 && (Q[ee.field] = ne[0].VALUE);
|
|
39223
39224
|
} else
|
|
39224
|
-
Q[
|
|
39225
|
+
Q[ee.field] && !te && await axios.post(
|
|
39225
39226
|
"/window/selector",
|
|
39226
39227
|
$qs.stringify({
|
|
39227
|
-
$_value: Q[
|
|
39228
|
+
$_value: Q[ee.field],
|
|
39228
39229
|
_region_id: formConfig.value.params._region_id,
|
|
39229
|
-
_field_id:
|
|
39230
|
-
_select_id:
|
|
39230
|
+
_field_id: ee.id,
|
|
39231
|
+
_select_id: ee.selectorId
|
|
39231
39232
|
})
|
|
39232
|
-
).then((
|
|
39233
|
-
|
|
39234
|
-
(
|
|
39233
|
+
).then((ne) => {
|
|
39234
|
+
ne.data.result && ne.data.data && (ee.itemRender.options = ne.data.data.map(
|
|
39235
|
+
(re) => Object.assign(
|
|
39235
39236
|
{
|
|
39236
|
-
value:
|
|
39237
|
-
label:
|
|
39237
|
+
value: re.VALUE,
|
|
39238
|
+
label: re.NAME
|
|
39238
39239
|
},
|
|
39239
|
-
|
|
39240
|
+
re
|
|
39240
39241
|
)
|
|
39241
39242
|
));
|
|
39242
39243
|
});
|
|
39243
|
-
} else if (typeof
|
|
39244
|
-
|
|
39245
|
-
|
|
39246
|
-
|
|
39247
|
-
|
|
39248
|
-
|
|
39249
|
-
|
|
39250
|
-
|
|
39251
|
-
|
|
39252
|
-
|
|
39253
|
-
|
|
39254
|
-
|
|
39255
|
-
|
|
39256
|
-
|
|
39257
|
-
|
|
39258
|
-
|
|
39259
|
-
|
|
39260
|
-
if (Q[Z.field] === "null")
|
|
39261
|
-
Q[Z.field] = "";
|
|
39262
|
-
else if (!Q[Z.field]) {
|
|
39263
|
-
Q[Z.field] = K.data.data[0].VALUE;
|
|
39264
|
-
let ee = {
|
|
39265
|
-
data: Q,
|
|
39266
|
-
item: Z,
|
|
39267
|
-
property: Z.field
|
|
39268
|
-
};
|
|
39269
|
-
onFieldChange(ee);
|
|
39270
|
-
}
|
|
39271
|
-
}
|
|
39272
|
-
Z.itemRender.props.loading = !1;
|
|
39273
|
-
}
|
|
39274
|
-
});
|
|
39275
|
-
else if (formConfig.value.openType === "new" && Z.visible && Z.editRender.options && Z.editRender.options.length > 0) {
|
|
39276
|
-
if (Q[Z.field] === "null")
|
|
39277
|
-
Q[Z.field] = "";
|
|
39278
|
-
else if (!Q[Z.field]) {
|
|
39279
|
-
Q[Z.field] = Z.editRender.options[0].VALUE;
|
|
39280
|
-
let K = {
|
|
39244
|
+
} else if (typeof ee.selectorId < "u")
|
|
39245
|
+
ee.itemRender.props.loading = !0, G.push(
|
|
39246
|
+
axios.post(
|
|
39247
|
+
"window/selector",
|
|
39248
|
+
$qs.stringify({
|
|
39249
|
+
...Q,
|
|
39250
|
+
_field_id: ee.id,
|
|
39251
|
+
_select_id: ee.selectorId
|
|
39252
|
+
})
|
|
39253
|
+
)
|
|
39254
|
+
), Z.push(ee);
|
|
39255
|
+
else if (formConfig.value.openType === "new" && ee.visible && ee.editRender.options && ee.editRender.options.length > 0) {
|
|
39256
|
+
if (Q[ee.field] === "null")
|
|
39257
|
+
Q[ee.field] = "";
|
|
39258
|
+
else if (!Q[ee.field]) {
|
|
39259
|
+
Q[ee.field] = ee.editRender.options[0].VALUE;
|
|
39260
|
+
let te = {
|
|
39281
39261
|
data: Q,
|
|
39282
|
-
item:
|
|
39283
|
-
property:
|
|
39262
|
+
item: ee,
|
|
39263
|
+
property: ee.field
|
|
39284
39264
|
};
|
|
39285
|
-
onFieldChange(
|
|
39265
|
+
onFieldChange(te);
|
|
39286
39266
|
}
|
|
39287
39267
|
}
|
|
39288
39268
|
}
|
|
39289
39269
|
}
|
|
39290
|
-
|
|
39270
|
+
Promise.all(G).then((K) => {
|
|
39271
|
+
K.forEach((ee, te) => {
|
|
39272
|
+
let ne = Z[te];
|
|
39273
|
+
if (ee.data.result && ee.data.data) {
|
|
39274
|
+
if (ne.itemRender.options = ee.data.data.map((re) => Object.assign(
|
|
39275
|
+
{
|
|
39276
|
+
value: re.VALUE,
|
|
39277
|
+
label: re.NAME
|
|
39278
|
+
},
|
|
39279
|
+
re
|
|
39280
|
+
)), formConfig.value.openType === "new" && ne.visible && ee.data.data.length > 0) {
|
|
39281
|
+
if (Q[ne.field] === "null")
|
|
39282
|
+
Q[ne.field] = "";
|
|
39283
|
+
else if (!Q[ne.field]) {
|
|
39284
|
+
Q[ne.field] = ee.data.data[0].VALUE;
|
|
39285
|
+
let re = {
|
|
39286
|
+
data: Q,
|
|
39287
|
+
item: ne,
|
|
39288
|
+
property: ne.field
|
|
39289
|
+
};
|
|
39290
|
+
onFieldChange(re);
|
|
39291
|
+
}
|
|
39292
|
+
}
|
|
39293
|
+
ne.itemRender.props.loading = !1;
|
|
39294
|
+
}
|
|
39295
|
+
});
|
|
39296
|
+
}), readonlyLogic();
|
|
39291
39297
|
}, remoteMethod = async (Q, H, X, G = "$_f_value") => {
|
|
39292
39298
|
let Z = [], K = {
|
|
39293
39299
|
_region_id: formConfig.value.params._region_id,
|
|
@@ -39671,7 +39677,7 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
|
|
|
39671
39677
|
]);
|
|
39672
39678
|
};
|
|
39673
39679
|
}
|
|
39674
|
-
}, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
39680
|
+
}, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-28b1b88e"]]);
|
|
39675
39681
|
WindowForm.name = "slw-window-form";
|
|
39676
39682
|
WindowForm.install = (Q) => {
|
|
39677
39683
|
Q.component(WindowForm.name, WindowForm);
|
|
@@ -40304,7 +40310,7 @@ _sfc_main$2.name = "slw-preview-modal";
|
|
|
40304
40310
|
_sfc_main$2.install = (Q) => {
|
|
40305
40311
|
Q.component(_sfc_main$2.name, _sfc_main$2);
|
|
40306
40312
|
};
|
|
40307
|
-
const
|
|
40313
|
+
const windowIndex_vue_vue_type_style_index_0_scoped_7d5db040_lang = "", _withScopeId = (Q) => (pushScopeId("data-v-7d5db040"), Q = Q(), popScopeId(), Q), _hoisted_1$kR = { class: "slw-config-window-container" }, _hoisted_2$kQ = { class: "child-table-p" }, _sfc_main$1 = {
|
|
40308
40314
|
__name: "window-index",
|
|
40309
40315
|
props: {
|
|
40310
40316
|
windowId: {
|
|
@@ -40521,8 +40527,8 @@ const windowIndex_vue_vue_type_style_index_0_scoped_defaad7b_lang = "", _withSco
|
|
|
40521
40527
|
"Sizes",
|
|
40522
40528
|
"FullJump",
|
|
40523
40529
|
"Total"
|
|
40524
|
-
]
|
|
40525
|
-
perfect:
|
|
40530
|
+
]
|
|
40531
|
+
// perfect: true,
|
|
40526
40532
|
},
|
|
40527
40533
|
formConfig: {
|
|
40528
40534
|
titleOverflow: "tooltip",
|
|
@@ -40921,7 +40927,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_defaad7b_lang = "", _withSco
|
|
|
40921
40927
|
};
|
|
40922
40928
|
switch (oe[se].format && (fe.formatter = formatter, fe.type = "html"), fe.id = oe[se].id, oe[se].dataType) {
|
|
40923
40929
|
case "ID":
|
|
40924
|
-
G.rowId = ce;
|
|
40930
|
+
G.rowId = ce, ue.name = "ElInput", ue.props.readonly = !0;
|
|
40925
40931
|
break;
|
|
40926
40932
|
case "STRING":
|
|
40927
40933
|
ue.name = "ElInput";
|
|
@@ -41431,7 +41437,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_defaad7b_lang = "", _withSco
|
|
|
41431
41437
|
]);
|
|
41432
41438
|
};
|
|
41433
41439
|
}
|
|
41434
|
-
}, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
41440
|
+
}, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-7d5db040"]]);
|
|
41435
41441
|
WindowIndex.name = "slw-window-index";
|
|
41436
41442
|
WindowIndex.install = (Q) => {
|
|
41437
41443
|
Q.component(WindowIndex.name, WindowIndex);
|
|
@@ -124230,7 +124236,7 @@ function reConsole() {
|
|
|
124230
124236
|
}
|
|
124231
124237
|
}
|
|
124232
124238
|
console.info(
|
|
124233
|
-
"%cSLW %cVer 0.
|
|
124239
|
+
"%cSLW %cVer 0.8.0",
|
|
124234
124240
|
"color:#409EFF;font-size: 22px;font-weight:bolder",
|
|
124235
124241
|
"color:#999;font-size: 12px"
|
|
124236
124242
|
);
|