slw 0.7.8 → 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 +110 -103
- 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,
|
|
@@ -39456,11 +39462,12 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
|
|
|
39456
39462
|
(X) => X.type !== "seq" && X.type !== "checkbox" && X.fixed !== "left"
|
|
39457
39463
|
);
|
|
39458
39464
|
for (let [X, G] of H.entries())
|
|
39459
|
-
if (G.
|
|
39465
|
+
if (G.displayForm && X > 0) {
|
|
39460
39466
|
G.fwidth = G.fwidth ? G.fwidth : 12;
|
|
39461
39467
|
let Z = H[X - 1];
|
|
39462
39468
|
Number(G.fwidth) > 24 ? (G.aLine = !0, G.residue = 0) : (G.aLine = !1, G.residue = 24 - Number(G.fwidth), Z && (Z.aLine || Z.residue - Number(G.fwidth) < 0) || X == 0 ? G.residue = 24 - Number(G.fwidth) : Z.residue - Number(G.fwidth) >= 0 && (G.residue = Z.residue - Number(G.fwidth))), (G.itemRender.props.newLine === !0 || G.itemRender.props.newLine === "Y") && (Z.fwidth = Number(Z.fwidth) + Number(Z.residue), Z.residue = 0, G.residue = 24 - Number(G.fwidth));
|
|
39463
|
-
}
|
|
39469
|
+
} else
|
|
39470
|
+
G.displayForm && X == 0 && (G.fwidth = G.fwidth ? Number(G.fwidth) : 12, G.residue = G.fwidth > 24 ? 0 : 24 - Number(G.fwidth));
|
|
39464
39471
|
}, getPictureList = async () => {
|
|
39465
39472
|
let Q = await axios.post(
|
|
39466
39473
|
`/dataFile/list/${uploadConfig.value.regionId}/${uploadConfig.value.dataId}`
|
|
@@ -39670,7 +39677,7 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
|
|
|
39670
39677
|
]);
|
|
39671
39678
|
};
|
|
39672
39679
|
}
|
|
39673
|
-
}, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
39680
|
+
}, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-28b1b88e"]]);
|
|
39674
39681
|
WindowForm.name = "slw-window-form";
|
|
39675
39682
|
WindowForm.install = (Q) => {
|
|
39676
39683
|
Q.component(WindowForm.name, WindowForm);
|
|
@@ -40303,7 +40310,7 @@ _sfc_main$2.name = "slw-preview-modal";
|
|
|
40303
40310
|
_sfc_main$2.install = (Q) => {
|
|
40304
40311
|
Q.component(_sfc_main$2.name, _sfc_main$2);
|
|
40305
40312
|
};
|
|
40306
|
-
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 = {
|
|
40307
40314
|
__name: "window-index",
|
|
40308
40315
|
props: {
|
|
40309
40316
|
windowId: {
|
|
@@ -40520,8 +40527,8 @@ const windowIndex_vue_vue_type_style_index_0_scoped_defaad7b_lang = "", _withSco
|
|
|
40520
40527
|
"Sizes",
|
|
40521
40528
|
"FullJump",
|
|
40522
40529
|
"Total"
|
|
40523
|
-
]
|
|
40524
|
-
perfect:
|
|
40530
|
+
]
|
|
40531
|
+
// perfect: true,
|
|
40525
40532
|
},
|
|
40526
40533
|
formConfig: {
|
|
40527
40534
|
titleOverflow: "tooltip",
|
|
@@ -40920,7 +40927,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_defaad7b_lang = "", _withSco
|
|
|
40920
40927
|
};
|
|
40921
40928
|
switch (oe[se].format && (fe.formatter = formatter, fe.type = "html"), fe.id = oe[se].id, oe[se].dataType) {
|
|
40922
40929
|
case "ID":
|
|
40923
|
-
G.rowId = ce;
|
|
40930
|
+
G.rowId = ce, ue.name = "ElInput", ue.props.readonly = !0;
|
|
40924
40931
|
break;
|
|
40925
40932
|
case "STRING":
|
|
40926
40933
|
ue.name = "ElInput";
|
|
@@ -41430,7 +41437,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_defaad7b_lang = "", _withSco
|
|
|
41430
41437
|
]);
|
|
41431
41438
|
};
|
|
41432
41439
|
}
|
|
41433
|
-
}, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
41440
|
+
}, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-7d5db040"]]);
|
|
41434
41441
|
WindowIndex.name = "slw-window-index";
|
|
41435
41442
|
WindowIndex.install = (Q) => {
|
|
41436
41443
|
Q.component(WindowIndex.name, WindowIndex);
|
|
@@ -124229,7 +124236,7 @@ function reConsole() {
|
|
|
124229
124236
|
}
|
|
124230
124237
|
}
|
|
124231
124238
|
console.info(
|
|
124232
|
-
"%cSLW %cVer 0.
|
|
124239
|
+
"%cSLW %cVer 0.8.0",
|
|
124233
124240
|
"color:#409EFF;font-size: 22px;font-weight:bolder",
|
|
124234
124241
|
"color:#999;font-size: 12px"
|
|
124235
124242
|
);
|