slw 1.0.0-alpha.3 → 1.0.0-alpha.4
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pushScopeId as P, popScopeId as V, createElementVNode as h, resolveComponent as g, openBlock as o, createElementBlock as p, createBlock as f, normalizeClass as T, normalizeStyle as A, withModifiers as R, withCtx as r, renderSlot as q, createCommentVNode as _, Fragment as B, createVNode as s, mergeProps as k, renderList as j, toDisplayString as E, normalizeProps as K, guardReactiveProps as Q, resolveDynamicComponent as Z, defineAsyncComponent as $, computed as F, unref as D, withDirectives as ee, vShow as te } from "vue";
|
|
2
|
-
import { _ as x, d as S, a as L, u as N } from "./index-
|
|
2
|
+
import { _ as x, d as S, a as L, u as N } from "./index-066ef62f.js";
|
|
3
3
|
import "vue-router";
|
|
4
4
|
const I = {
|
|
5
5
|
computed: {},
|
|
@@ -8525,7 +8525,7 @@ PictureUpload.name = "slw-picture-upload";
|
|
|
8525
8525
|
PictureUpload.install = (Q) => {
|
|
8526
8526
|
Q.component(PictureUpload.name, PictureUpload);
|
|
8527
8527
|
};
|
|
8528
|
-
const
|
|
8528
|
+
const windowGrid_vue_vue_type_style_index_0_scoped_52333277_lang = "", _withScopeId$9 = (Q) => (pushScopeId("data-v-52333277"), Q = Q(), popScopeId(), Q), _hoisted_1$l2 = {
|
|
8529
8529
|
class: "slw-window-grid-container",
|
|
8530
8530
|
style: { height: "100%" }
|
|
8531
8531
|
}, _hoisted_2$kY = /* @__PURE__ */ _withScopeId$9(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-main-area" }, null, -1)), _hoisted_3$hY = /* @__PURE__ */ _withScopeId$9(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-active-area" }, null, -1)), _hoisted_4$ay = /* @__PURE__ */ _withScopeId$9(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-copy-area" }, null, -1)), _hoisted_5$4Y = [
|
|
@@ -8661,61 +8661,50 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f42eb57c_lang = "", _withScop
|
|
|
8661
8661
|
total: "data.count"
|
|
8662
8662
|
},
|
|
8663
8663
|
ajax: {
|
|
8664
|
-
query: async ({ page: H, sorts: X, filters: G, form: K }
|
|
8665
|
-
var
|
|
8664
|
+
query: async ({ page: H, sorts: X, filters: G, form: K }) => {
|
|
8665
|
+
var le;
|
|
8666
8666
|
if (gridData.value.noSearchData) {
|
|
8667
8667
|
delete gridData.value.noSearchData;
|
|
8668
8668
|
return;
|
|
8669
8669
|
}
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
status: 200
|
|
8679
|
-
};
|
|
8680
|
-
}
|
|
8681
|
-
let ee = getParentRegion(), te = null;
|
|
8682
|
-
ee != null && ee.params && (te = ee.params.subtableSearchExParams);
|
|
8683
|
-
const ne = Object.assign({}, gridData.value.params.queryParams, queryFormData.value, Z, te);
|
|
8684
|
-
Object.entries(ne).forEach(([ce, ue]) => {
|
|
8685
|
-
var he;
|
|
8686
|
-
if (ue == null && (queryFormData.value[ce] = null), ne[ce] instanceof Array) {
|
|
8687
|
-
let de = gridData.value.formConfig.items.filter((ge) => ge.field == ce)[0], fe = (he = de == null ? void 0 : de.itemRender) == null ? void 0 : he.name, pe = XEUtils$4.clone(ne[ce], !0);
|
|
8688
|
-
fe == "ElTimePicker" ? (ne[ce] = pe[0], ne["end_" + ce] = pe[1]) : ["ElDateRangePicker", "ElDateTimeRangePicker"].includes(fe) && (ne[ce] = pe[0], ne["end_" + ce] = pe[1], queryFormData.value[ce] = pe[0], queryFormData.value["end_" + ce] = pe[1]);
|
|
8670
|
+
let Z = getParentRegion(), ee = null;
|
|
8671
|
+
Z != null && Z.params && (ee = Z.params.subtableSearchExParams);
|
|
8672
|
+
const te = Object.assign({}, gridData.value.params.queryParams, queryFormData.value, ee);
|
|
8673
|
+
Object.entries(te).forEach(([se, ce]) => {
|
|
8674
|
+
var ue;
|
|
8675
|
+
if (ce == null && (queryFormData.value[se] = null), te[se] instanceof Array) {
|
|
8676
|
+
let he = gridData.value.formConfig.items.filter((pe) => pe.field == se)[0], de = (ue = he == null ? void 0 : he.itemRender) == null ? void 0 : ue.name, fe = XEUtils$4.clone(te[se], !0);
|
|
8677
|
+
de == "ElTimePicker" ? (te[se] = fe[0], te["end_" + se] = fe[1]) : ["ElDateRangePicker", "ElDateTimeRangePicker"].includes(de) && (te[se] = fe[0], te["end_" + se] = fe[1], queryFormData.value[se] = fe[0], queryFormData.value["end_" + se] = fe[1]);
|
|
8689
8678
|
}
|
|
8690
8679
|
});
|
|
8691
|
-
const
|
|
8692
|
-
|
|
8693
|
-
for (let { property:
|
|
8694
|
-
let
|
|
8695
|
-
if ((
|
|
8696
|
-
let
|
|
8697
|
-
|
|
8698
|
-
} else if ((
|
|
8699
|
-
let
|
|
8700
|
-
|
|
8680
|
+
const ne = X[0];
|
|
8681
|
+
ne && (te.$_sort_column = ne.property, te.$_sort_type = ne.order);
|
|
8682
|
+
for (let { property: se, datas: ce } of G) {
|
|
8683
|
+
let ue = ce.join(","), he = gridData.value.columns.filter((de) => de.field == se)[0];
|
|
8684
|
+
if ((he == null ? void 0 : he.dataType) == "LIST" && ((le = he == null ? void 0 : he.itemRender.options) == null ? void 0 : le.length) > 0) {
|
|
8685
|
+
let de = he.itemRender.options.filter((fe) => fe.label.indexOf(ue) > -1)[0];
|
|
8686
|
+
de && (ue = de.value);
|
|
8687
|
+
} else if ((he == null ? void 0 : he.dataType) == "TABLE") {
|
|
8688
|
+
let fe = (await getSelectorData({ _region_id: gridData.value.params._region_id }, he.id, he.selectorId)).filter((pe) => pe.NAME.indexOf(ue) > -1)[0];
|
|
8689
|
+
fe && (ue = fe.VALUE);
|
|
8701
8690
|
}
|
|
8702
|
-
|
|
8691
|
+
te[se.toLowerCase()] = ue;
|
|
8703
8692
|
}
|
|
8704
|
-
if (
|
|
8705
|
-
|
|
8706
|
-
}), Q ? Object.keys(Q).forEach((
|
|
8707
|
-
const
|
|
8708
|
-
|
|
8709
|
-
}) : localStorage.setItem(gridData.value.params._region_id + preTag.value, JSON.stringify(queryFormData.value)), gridData.value.params.exportForm = XEUtils$4.clone(
|
|
8710
|
-
let
|
|
8711
|
-
if (queryBeforeList.forEach((
|
|
8712
|
-
if (
|
|
8693
|
+
if (te.page = H.currentPage, te.limit = H.pageSize, te._region_id = gridData.value.params._region_id, gridData.value.params.parentRowId && (te[gridData.value.params.parentRowId] = gridData.value.params.parentRowIdValue), Object.keys(te).forEach((se) => {
|
|
8694
|
+
te[se] instanceof Object && (te[se] = Object.values(te[se]).join());
|
|
8695
|
+
}), Q ? Object.keys(Q).forEach((se) => {
|
|
8696
|
+
const ce = se.toLowerCase();
|
|
8697
|
+
te.hasOwnProperty(ce) && (te[ce] = Q[se]);
|
|
8698
|
+
}) : localStorage.setItem(gridData.value.params._region_id + preTag.value, JSON.stringify(queryFormData.value)), gridData.value.params.exportForm = XEUtils$4.clone(te, !0), queryBeforeList && queryBeforeList.length > 0) {
|
|
8699
|
+
let se = {};
|
|
8700
|
+
if (queryBeforeList.forEach((ce) => {
|
|
8701
|
+
if (ce && typeof ce == "function")
|
|
8713
8702
|
try {
|
|
8714
|
-
|
|
8715
|
-
} catch (
|
|
8716
|
-
console.error(
|
|
8703
|
+
se = ce();
|
|
8704
|
+
} catch (ue) {
|
|
8705
|
+
console.error(ue);
|
|
8717
8706
|
}
|
|
8718
|
-
}),
|
|
8707
|
+
}), se === !1)
|
|
8719
8708
|
return {
|
|
8720
8709
|
data: {
|
|
8721
8710
|
data: [],
|
|
@@ -8724,69 +8713,69 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f42eb57c_lang = "", _withScop
|
|
|
8724
8713
|
status: 200
|
|
8725
8714
|
};
|
|
8726
8715
|
}
|
|
8727
|
-
const
|
|
8728
|
-
let
|
|
8729
|
-
return
|
|
8730
|
-
let
|
|
8731
|
-
if (
|
|
8732
|
-
let
|
|
8733
|
-
|
|
8734
|
-
let
|
|
8735
|
-
gridData.value.toolbarConfig.buttons.forEach((
|
|
8736
|
-
if (typeof
|
|
8737
|
-
|
|
8738
|
-
const
|
|
8739
|
-
...
|
|
8716
|
+
const oe = axios.post("/window/data/" + gridData.value.params.datasourceCode, te);
|
|
8717
|
+
let re = {};
|
|
8718
|
+
return oe.then((se) => {
|
|
8719
|
+
let ce = {};
|
|
8720
|
+
if (se && se.data && se.data.result && se.data.data && se.data.data.length > 0) {
|
|
8721
|
+
let fe = function(ve) {
|
|
8722
|
+
ve.forEach((me, _e) => {
|
|
8723
|
+
let we = 0;
|
|
8724
|
+
gridData.value.toolbarConfig.buttons.forEach((xe) => {
|
|
8725
|
+
if (typeof xe.type < "u") {
|
|
8726
|
+
xe.btnLoad[de] = !1;
|
|
8727
|
+
const $e = xe.displayLogic ? displayLogic(xe.displayLogic, {
|
|
8728
|
+
...me,
|
|
8740
8729
|
...assembleParentData(gridData.value.params.parentData)
|
|
8741
|
-
}) : !0,
|
|
8742
|
-
if (
|
|
8743
|
-
if (
|
|
8744
|
-
|
|
8730
|
+
}) : !0, ke = xe.showInGrid && $e, Se = !xe.showInGrid && $e;
|
|
8731
|
+
if (xe.btnShowInGrid[de] = ke, xe.btnShow[de] = Se, ue = ue || ke, ke)
|
|
8732
|
+
if (xe.iconComponent)
|
|
8733
|
+
we = we + 0.7;
|
|
8745
8734
|
else {
|
|
8746
|
-
let
|
|
8747
|
-
if (
|
|
8748
|
-
let
|
|
8749
|
-
|
|
8735
|
+
let Ee = xe.name.match(/[\u4e00-\u9fa5]/g);
|
|
8736
|
+
if (Ee) {
|
|
8737
|
+
let Pe = Math.ceil(Ee.length / 2);
|
|
8738
|
+
we += Pe;
|
|
8750
8739
|
} else {
|
|
8751
|
-
let
|
|
8752
|
-
|
|
8740
|
+
let Pe = Math.ceil(xe.name.length / 6);
|
|
8741
|
+
we += Pe;
|
|
8753
8742
|
}
|
|
8754
8743
|
}
|
|
8755
8744
|
}
|
|
8756
|
-
}),
|
|
8745
|
+
}), we > he && (he = we), me._INDEX = de, de++, me._CHILDS && me._CHILDS.length > 0 && fe(me._CHILDS);
|
|
8757
8746
|
});
|
|
8758
|
-
},
|
|
8759
|
-
|
|
8760
|
-
let
|
|
8761
|
-
gridData.value.columns.forEach((
|
|
8762
|
-
if (
|
|
8763
|
-
|
|
8747
|
+
}, ue = !1, he = 0, de = 0;
|
|
8748
|
+
fe(se.data.data);
|
|
8749
|
+
let pe = !1;
|
|
8750
|
+
gridData.value.columns.forEach((ve) => {
|
|
8751
|
+
if (ve.colId == "_operation_" && ve.title == "操作") {
|
|
8752
|
+
ve.width != he * 60 && he * 60 >= 60 && (pe = !0, ve.width = he.toFixed(1) * 60);
|
|
8764
8753
|
return;
|
|
8765
8754
|
}
|
|
8766
|
-
}),
|
|
8767
|
-
const
|
|
8768
|
-
if (
|
|
8769
|
-
const
|
|
8770
|
-
|
|
8755
|
+
}), pe && getCurRegion().loadColumn(gridData.value.columns), gridData.value.params.rowIndex != null && (rowIndex.value = gridData.value.params.rowIndex), se.data.data.length > rowIndex.value ? ce = se.data.data[rowIndex.value] : ce = se.data.data[0];
|
|
8756
|
+
const ge = getCurRegion();
|
|
8757
|
+
if (ge) {
|
|
8758
|
+
const ve = ge.getColumnById("_operation_");
|
|
8759
|
+
ve && ue && ge.showColumn(ve);
|
|
8771
8760
|
}
|
|
8772
|
-
!isEditGridInitData.value && gridData.value.type === "EDIT_GRID" && editGridInitData(
|
|
8761
|
+
!isEditGridInitData.value && gridData.value.type === "EDIT_GRID" && editGridInitData(ce);
|
|
8773
8762
|
}
|
|
8774
|
-
rowClickCommon(
|
|
8775
|
-
var
|
|
8776
|
-
if (
|
|
8763
|
+
rowClickCommon(ce, rowIndex.value), queryAfterList && queryAfterList.length > 0 && queryAfterList.forEach((ue) => {
|
|
8764
|
+
var he;
|
|
8765
|
+
if (ue && typeof ue == "function")
|
|
8777
8766
|
try {
|
|
8778
|
-
|
|
8779
|
-
} catch (
|
|
8780
|
-
console.error(
|
|
8767
|
+
re = ue(((he = se == null ? void 0 : se.data) == null ? void 0 : he.data) || []);
|
|
8768
|
+
} catch (de) {
|
|
8769
|
+
console.error(de);
|
|
8781
8770
|
}
|
|
8782
8771
|
});
|
|
8783
|
-
}), typeof await
|
|
8772
|
+
}), typeof await oe > "u" || re === !1 ? {
|
|
8784
8773
|
data: {
|
|
8785
8774
|
data: [],
|
|
8786
8775
|
count: 0
|
|
8787
8776
|
},
|
|
8788
8777
|
status: 200
|
|
8789
|
-
} :
|
|
8778
|
+
} : oe;
|
|
8790
8779
|
}
|
|
8791
8780
|
}
|
|
8792
8781
|
}, gridData.value.params.parentRegionId && (gridData.value.proxyConfig.autoLoad = !1);
|
|
@@ -9151,14 +9140,16 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f42eb57c_lang = "", _withScop
|
|
|
9151
9140
|
}, G.params.queryParams !== null && typeof G.params.queryParams < "u" && (G.params.queryParams.unQuery = !0), G.formData._button_id = gridData.value.params.edit_button_id, G._reload = () => reload(), rowDbClick(G);
|
|
9152
9141
|
}, reload = () => {
|
|
9153
9142
|
var Q;
|
|
9154
|
-
(Q = getCurRegion()) == null || Q.commitProxy("
|
|
9143
|
+
(Q = getCurRegion()) == null || Q.commitProxy("reload");
|
|
9155
9144
|
}, clearGrid = () => {
|
|
9156
|
-
|
|
9145
|
+
for (let Q in queryFormData.value)
|
|
9146
|
+
queryFormData.value[Q] = null;
|
|
9147
|
+
localStorage.setItem(gridData.value.params._region_id + preTag.value, JSON.stringify(queryFormData.value)), getCurRegion().reloadData();
|
|
9157
9148
|
}, resetGrid = () => {
|
|
9158
9149
|
var Q;
|
|
9159
9150
|
for (let H in queryFormData.value)
|
|
9160
9151
|
queryFormData.value[H] = null;
|
|
9161
|
-
(Q = getCurRegion()) == null || Q.commitProxy("
|
|
9152
|
+
(Q = getCurRegion()) == null || Q.commitProxy("reload");
|
|
9162
9153
|
}, getCheckedData = () => {
|
|
9163
9154
|
const Q = getCurRegion();
|
|
9164
9155
|
return Q ? Q.getCheckboxRecords().concat(Q.getCheckboxReserveRecords()) : null;
|
|
@@ -10150,7 +10141,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f42eb57c_lang = "", _withScop
|
|
|
10150
10141
|
]);
|
|
10151
10142
|
};
|
|
10152
10143
|
}
|
|
10153
|
-
}, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
10144
|
+
}, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-52333277"]]);
|
|
10154
10145
|
WindowGrid.name = "slw-window-grid";
|
|
10155
10146
|
WindowGrid.install = (Q) => {
|
|
10156
10147
|
Q.component(WindowGrid.name, WindowGrid);
|
|
@@ -59085,7 +59076,7 @@ const windowDesigner_vue_vue_type_style_index_0_scoped_a3ebe962_lang = "", _with
|
|
|
59085
59076
|
emits: ["update:type", "update:rootLayout", "update:viewData", "update:rowData"],
|
|
59086
59077
|
setup(Q, { emit: H }) {
|
|
59087
59078
|
const X = Q, G = defineAsyncComponent(
|
|
59088
|
-
() => import("./index-
|
|
59079
|
+
() => import("./index-0266a427.js")
|
|
59089
59080
|
);
|
|
59090
59081
|
let K = useVModel(X, "type", H), Z = useVModel(X, "rootLayout", H), ee = useVModel(X, "viewData", H), te = useVModel(X, "rowData", H), ne = ref(0), oe = ref(null);
|
|
59091
59082
|
oe.value = createDesigner();
|
|
@@ -165456,7 +165447,7 @@ function reConsole() {
|
|
|
165456
165447
|
}
|
|
165457
165448
|
}
|
|
165458
165449
|
console.info(
|
|
165459
|
-
`%cSLW %cVer 1.0.0-alpha.
|
|
165450
|
+
`%cSLW %cVer 1.0.0-alpha.4%c
|
|
165460
165451
|
%c指引文档:%chttp://slwdoc.js.sforcecon.com:5900/%c
|
|
165461
165452
|
%c启光文档:%chttp://docs.js.sforcecon.com:5900/notepad/view/592`,
|
|
165462
165453
|
"color:#409EFF;font-size: 22px;font-weight:bolder;text-shadow: 2px 2px 4px #84c1ff;",
|
package/lib/index.js
CHANGED