super-page-runtime 2.2.77 → 2.2.80
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/dist/es/components/runtime/utils/api/page-expose-util.js +56 -56
- package/dist/es/components/runtime/utils/barcode-util.js +5 -5
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +46 -45
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +16 -14
- package/dist/es/components/runtime/utils/charts/chart-util.js +4 -2
- package/dist/es/components/runtime/utils/events/event-util.js +113 -113
- package/dist/es/components/runtime/utils/events/print-label.js +38 -37
- package/dist/es/components/runtime/utils/events/standard-event.js +473 -461
- package/dist/es/components/runtime/utils/events/validator-util.js +30 -30
- package/dist/es/components/runtime/utils/form/scan-util.js +4 -3
- package/dist/es/components/runtime/utils/page-helper-util.js +210 -210
- package/dist/es/components/runtime/utils/page-init-util.js +45 -41
- package/dist/es/components/runtime/utils/page-store.js +1 -1
- package/dist/es/components/runtime/utils/table-utils.js +23 -23
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +16 -12
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +11 -9
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +13 -12
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +14 -13
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +15 -14
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +17 -16
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +12 -7
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +16 -15
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +26 -22
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +12 -10
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +94 -91
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +139 -136
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +34 -33
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +29 -29
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +40 -38
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +22 -22
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +44 -43
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +8 -6
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -9
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +13 -12
- package/dist/es/components/runtime/views/super-page.vue2.js +125 -123
- package/package.json +2 -2
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { defineComponent as e, ref as r, onMounted as
|
|
2
|
-
import { getCustomTheme as
|
|
1
|
+
import { defineComponent as e, ref as r, onMounted as o, watch as t, createElementBlock as n, openBlock as a, normalizeClass as s, normalizeStyle as c, unref as i, withDirectives as u, createVNode as p, vShow as l } from "vue";
|
|
2
|
+
import { getCustomTheme as f, initChartOption as m, exportCommonChart as h } from "../../../../utils/charts/chart-util.js";
|
|
3
3
|
import { getChartDatasFromPage as g, updateChartDatasources as d, monitorFieldChange as x } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { updateChartOption as C } from "../../../../utils/charts/chart-scatter-util.js";
|
|
5
5
|
import v from "../common/common-chart-header.vue.js";
|
|
6
6
|
import { use as R } from "echarts/core";
|
|
7
7
|
import { CanvasRenderer as y } from "echarts/renderers";
|
|
8
8
|
import { ScatterChart as V } from "echarts/charts";
|
|
9
|
-
import { GridComponent as _, LegendComponent as j, TitleComponent as w, TooltipComponent as I, ToolboxComponent as k, DataZoomComponent as
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
R([y, V, _, j, w, I, k,
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const e3 = g(
|
|
9
|
+
import { GridComponent as _, LegendComponent as j, TitleComponent as w, TooltipComponent as I, ToolboxComponent as k, DataZoomComponent as O } from "echarts/components";
|
|
10
|
+
import b from "vue-echarts";
|
|
11
|
+
const H = e({ __name: "scatter-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: H2 }) {
|
|
12
|
+
R([y, V, _, j, w, I, k, O]);
|
|
13
|
+
const z = e2, D = r(null), F = r(null), P = r(null), S = z.configure.runtime ? z.configure.runtime : {}, T = S.style, q = S.class, A = S.dataConfig, B = S.headerInfo ? S.headerInfo : {}, E = S.chartOption, G = z.configure.props ? z.configure.props : {}, J = f(G.customTheme);
|
|
14
|
+
m(z.configure, E), console.log("chartOption", E), o(() => {
|
|
15
|
+
const e3 = g(z.pageContext, z.configure);
|
|
16
16
|
e3 && N(e3);
|
|
17
17
|
});
|
|
18
18
|
let K = B.groupValue;
|
|
19
19
|
function L() {
|
|
20
|
-
A
|
|
20
|
+
A ? d(z.pageContext, [A], B.drillParams) : console.log("无数据源配置,不需要查询!");
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
t(B, () => {
|
|
23
23
|
K != B.groupValue && (K = B.groupValue, A && (A.services[0].groupValue = B.groupValue), L());
|
|
24
24
|
});
|
|
25
25
|
const M = B.monitorFields;
|
|
26
26
|
function N(e3) {
|
|
27
|
-
e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender
|
|
27
|
+
if (e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender) return e3.hasRender = true, void console.log("重复更新!", e3);
|
|
28
|
+
e3.hasRender = true, C(z.pageContext, z.configure, E, e3), console.log("chartOption scatter", E);
|
|
28
29
|
}
|
|
29
|
-
return x(
|
|
30
|
-
return
|
|
31
|
-
} }), (e3, r2) => (
|
|
30
|
+
return x(z.pageContext, M, L), H2({ updateChartDatas: N, exportChart: function() {
|
|
31
|
+
return h(F.value);
|
|
32
|
+
} }), (e3, r2) => (a(), n("div", { style: c(i(T)), class: s([i(q), "amb-widget-chart amb-widget-flex"]), ref_key: "thisRef", ref: D }, [u(p(v, { ref_key: "headerRef", ref: P, headerInfo: i(B), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[l, i(B).showHeader || e3.pageContext.showHomepageSearch]]), p(i(b), { ref_key: "chartRef", ref: F, theme: i(J), option: i(E), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
32
33
|
} });
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
H as default
|
|
35
36
|
};
|
|
@@ -61,7 +61,7 @@ class ExpressionEvaluator {
|
|
|
61
61
|
try {
|
|
62
62
|
return eval(expression);
|
|
63
63
|
} catch (e) {
|
|
64
|
-
return false;
|
|
64
|
+
return console.error("表达式错误:", expression, e), false;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -90,6 +90,7 @@ function summaryStatistics(e, t, o, r) {
|
|
|
90
90
|
const e2 = n2.apply(n2, [{ data: t, prop: o }]);
|
|
91
91
|
a = e2 ? ` ${e2}` : " N/A";
|
|
92
92
|
} catch (e2) {
|
|
93
|
+
console.error("自定义函数脚本错误:", t, e2);
|
|
93
94
|
}
|
|
94
95
|
else a = " N/A";
|
|
95
96
|
} else switch (n) {
|
|
@@ -122,7 +123,8 @@ function getHeaderCellStyleUtil(e, t, o) {
|
|
|
122
123
|
const a2 = getCustomFunc(o.pageContext, t2.scopeFunc);
|
|
123
124
|
if (a2) try {
|
|
124
125
|
false !== a2.apply(a2, [{ item: t2, data: e }]) && copyStyle(r, t2);
|
|
125
|
-
} catch (
|
|
126
|
+
} catch (o2) {
|
|
127
|
+
console.error("自定义函数脚本错误:", t2, e, o2);
|
|
126
128
|
}
|
|
127
129
|
} else copyStyle(r, t2);
|
|
128
130
|
}));
|
|
@@ -138,7 +140,8 @@ function getRowStyleUtil(e, t, o) {
|
|
|
138
140
|
if (t3) try {
|
|
139
141
|
const o2 = t3.apply(t3, [{ data: e }]);
|
|
140
142
|
null != o2 && false !== o2 && copyStyle(r, a);
|
|
141
|
-
} catch (
|
|
143
|
+
} catch (t4) {
|
|
144
|
+
console.error("自定义函数脚本错误:", e, t4);
|
|
142
145
|
}
|
|
143
146
|
} else if (a.matchingCondition) {
|
|
144
147
|
const t3 = ExpressionEvaluator.evaluate(o.pageContext, a.matchingCondition, e.row);
|
|
@@ -162,7 +165,8 @@ function getCellStyleUtil(e, t, o) {
|
|
|
162
165
|
const t2 = getCustomFunc(o.pageContext, n.scopeFunc);
|
|
163
166
|
if (t2) try {
|
|
164
167
|
false !== t2.apply(t2, [{ data: e }]) && copyStyle(r, n);
|
|
165
|
-
} catch (
|
|
168
|
+
} catch (t3) {
|
|
169
|
+
console.error("自定义函数脚本错误:", e, t3);
|
|
166
170
|
}
|
|
167
171
|
} else if (n.matchingCondition) {
|
|
168
172
|
const t2 = ExpressionEvaluator.evaluate(o.pageContext, n.matchingCondition, e.row);
|
|
@@ -286,7 +290,7 @@ function computeFormula(itemConfs, datas, entity) {
|
|
|
286
290
|
o += Number(e2[t]);
|
|
287
291
|
});
|
|
288
292
|
} catch (e2) {
|
|
289
|
-
o = 0;
|
|
293
|
+
console.error("计算错误:", e2), o = 0;
|
|
290
294
|
}
|
|
291
295
|
totalValueMap[e] = o;
|
|
292
296
|
} else (e.startsWith("${page.") || e.startsWith("${data.") || e.startsWith("${row.") || e.startsWith("${request.") || e.startsWith("${context.") || e.startsWith("${system.") || e.startsWith("${fixed.")) && (totalValueMap[e] = getValueFromVariable(entity, e, data));
|
|
@@ -298,7 +302,7 @@ function computeFormula(itemConfs, datas, entity) {
|
|
|
298
302
|
try {
|
|
299
303
|
data[key] = eval(expr);
|
|
300
304
|
} catch (e) {
|
|
301
|
-
data[key] = 0;
|
|
305
|
+
console.error(itemConfs[key] + " 计算错误, 替换后表达式为:" + expr, e), data[key] = 0;
|
|
302
306
|
}
|
|
303
307
|
});
|
|
304
308
|
});
|
|
@@ -338,7 +342,8 @@ function formatCustomFunc(e, t, o, r, a) {
|
|
|
338
342
|
if (n) {
|
|
339
343
|
try {
|
|
340
344
|
return n.apply(n, [{ pageContext: r, configureObj: a, row: e, prop: o.props.base.prop }]);
|
|
341
|
-
} catch (
|
|
345
|
+
} catch (t2) {
|
|
346
|
+
console.error("自定义函数脚本错误:", e, t2);
|
|
342
347
|
}
|
|
343
348
|
return "";
|
|
344
349
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as e, ref as o, onMounted as n, watch as r, resolveComponent as t, createElementBlock as i, openBlock as a, normalizeClass as u, normalizeStyle as
|
|
1
|
+
import { defineComponent as e, ref as o, onMounted as n, watch as r, resolveComponent as t, createElementBlock as i, openBlock as a, normalizeClass as u, normalizeStyle as l, unref as p, withDirectives as s, createVNode as c, createBlock as g, createCommentVNode as f, vShow as d, withCtx as m, Fragment as h, renderList as v, h as y } from "vue";
|
|
2
2
|
import C from "../common/common-chart-header.vue.js";
|
|
3
3
|
import { getSizeConfig as x, getChartDatasFromPage as b, getValueFromVariable as O, isPromise as w, setValueForVariableName as S, updateChartDatasourcesByComponent as j, caculateShowCondition as E } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { getCustomFunc as $ } from "../../../../utils/events/event-util.js";
|
|
5
5
|
import k from "./group-column.vue.js";
|
|
6
6
|
import F from "./normal-column.vue.js";
|
|
7
7
|
import I from "./table-pageination.vue.js";
|
|
8
|
-
import { getSummaryTitleColumn as R, getSummaryDataColumn as H, rowDataToColumn as T, getColumnToRowTableConfig as _, colDataToRow as z, computeFormula as D, getNewColumnConfig as P, summaryStatistics as U, replacePlaceholders as G, getIndexColumn as K, getHeaderCellStyleUtil as N, getRowStyleUtil as
|
|
8
|
+
import { getSummaryTitleColumn as R, getSummaryDataColumn as H, rowDataToColumn as T, getColumnToRowTableConfig as _, colDataToRow as z, computeFormula as D, getNewColumnConfig as P, summaryStatistics as U, replacePlaceholders as G, getIndexColumn as K, getHeaderCellStyleUtil as N, getRowStyleUtil as V, getCellStyleUtil as J, formatColContent as L } from "./chart-table-util.js";
|
|
9
9
|
import { deepCopy as A } from "../../../../utils/common-util.js";
|
|
10
10
|
const q = e({ __name: "table-runtime", props: { configure: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) } }, setup(e2, { expose: q2 }) {
|
|
11
11
|
var _a;
|
|
12
|
-
const B = e2, M = B.configure.runtime ? B.configure.runtime : {}, Q = M.style, W = M.class, X = M.dataConfig, Y = M.headerInfo ? M.headerInfo : {}, Z = o(null), ee = o(M.props.isEnableGroupHeader), oe = o([]), ne = o([]), re = o([]), te = o({}), ie = o(false), ae = o({}), ue = o({}),
|
|
12
|
+
const B = e2, M = B.configure.runtime ? B.configure.runtime : {}, Q = M.style, W = M.class, X = M.dataConfig, Y = M.headerInfo ? M.headerInfo : {}, Z = o(null), ee = o(M.props.isEnableGroupHeader), oe = o([]), ne = o([]), re = o([]), te = o({}), ie = o(false), ae = o({}), ue = o({}), le = o({}), pe = [], se = o({}), ce = o({}), ge = o(null), fe = o(0);
|
|
13
13
|
let de = [];
|
|
14
14
|
if (!B.configure.props.modelCustom) {
|
|
15
15
|
if (ee.value) {
|
|
@@ -28,19 +28,20 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
28
28
|
te.value[e3.uuid] = e3, Object.keys(e3.style).length > 0 && (se.value[e3.props.base.prop] = { cellStyle: e3.style, titleStyle: e3.titleStyle }), e3.formula && "" !== e3.formula.trim() && (ce.value[e3.props.base.prop] = e3.formula);
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
ie.value = B.configure.props.base.showSummary, (ie.value || B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0) && (ae.value = R(B.configure), ie.value && (ue.value = H(B.configure, "table")), B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0 && (
|
|
31
|
+
ie.value = B.configure.props.base.showSummary, (ie.value || B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0) && (ae.value = R(B.configure), ie.value && (ue.value = H(B.configure, "table")), B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0 && (le.value = H(B.configure, "group")));
|
|
32
32
|
let me = 300, he = x(B.pageContext, B.configure);
|
|
33
33
|
function ve() {
|
|
34
34
|
const e3 = B.configure.props.dataOrigin.variable.match(/\${(.*?)}/), o2 = e3 ? e3[1].split(".") : [];
|
|
35
35
|
r(() => o2.reduce((e4, o3) => e4[o3], B.pageContext.entity), (e4) => {
|
|
36
|
-
e4 ? ye(JSON.parse(JSON.stringify(e4))) : (oe.value = [], B.configure.props.modelCustom ? Re(null) : ee.value ? re.value = B.configure.props.groupHeaders : ne.value = B.configure.items);
|
|
36
|
+
console.log("统计表格监听数据变量的变化 newVal:", e4), e4 ? ye(JSON.parse(JSON.stringify(e4))) : (oe.value = [], console.log("重置统计表格列配置"), B.configure.props.modelCustom ? Re(null) : ee.value ? re.value = B.configure.props.groupHeaders : ne.value = B.configure.items);
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
function ye(e3) {
|
|
40
|
-
e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender
|
|
40
|
+
if (e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender) return e3.hasRender = true, void console.log("重复更新!", e3);
|
|
41
|
+
!function(e4) {
|
|
41
42
|
Re(e4), "service" === B.configure.props.dataOrigin.dataSource && e4.result ? de = e4.result[B.configure.props.dataOrigin.service.serviceDataField] : "variable" === B.configure.props.dataOrigin.dataSource && (ve(), de = O(B.pageContext.entity, B.configure.props.dataOrigin.variable));
|
|
42
43
|
de && Ce(de, e4);
|
|
43
|
-
}(e3), e3.hasRender = true, X && (X.autoRefresh = false)
|
|
44
|
+
}(e3), e3.hasRender = true, X && (X.autoRefresh = false);
|
|
44
45
|
}
|
|
45
46
|
function Ce(e3, o2) {
|
|
46
47
|
var _a2;
|
|
@@ -90,7 +91,7 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
90
91
|
const e4 = B.configure.props.highOrder.groupField;
|
|
91
92
|
oe.value = function(e5, o3) {
|
|
92
93
|
var _a3, _b;
|
|
93
|
-
if (0 ===
|
|
94
|
+
if (0 === le.value.length) return e5;
|
|
94
95
|
const n2 = [], r2 = (_a3 = B.configure.items) == null ? void 0 : _a3.filter((e6) => o3.includes(e6.props.base.prop)), t2 = (_b = B.configure.items) == null ? void 0 : _b.filter((e6) => true === e6.props.base.groupSummary), i2 = {};
|
|
95
96
|
e5.forEach((e6) => {
|
|
96
97
|
const n3 = o3.map((o4) => e6[o4]).join("|");
|
|
@@ -100,12 +101,12 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
100
101
|
for (let e6 = 0; e6 < a2.length; e6++) {
|
|
101
102
|
const o4 = a2[e6], i3 = {};
|
|
102
103
|
t2 == null ? void 0 : t2.forEach((e7) => {
|
|
103
|
-
const n3 = e7.props.base.prop, r3 = U(
|
|
104
|
+
const n3 = e7.props.base.prop, r3 = U(le.value[n3], o4, n3, B.pageContext);
|
|
104
105
|
i3[n3] = r3;
|
|
105
106
|
}), n2.push(...o4), r2 == null ? void 0 : r2.forEach((e7) => {
|
|
106
107
|
const n3 = e7.props.base.prop;
|
|
107
108
|
i3[n3] = G(e7.props.base.summaryTitle, o4[0]);
|
|
108
|
-
}), n2.push(i3),
|
|
109
|
+
}), n2.push(i3), pe.push(n2.length - 1);
|
|
109
110
|
}
|
|
110
111
|
return n2;
|
|
111
112
|
}(oe.value, e4);
|
|
@@ -125,11 +126,11 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
125
126
|
return N(e3, { cellTitleStyle: o2, titleStyle: n2 }, B);
|
|
126
127
|
}
|
|
127
128
|
function Oe(e3) {
|
|
128
|
-
return
|
|
129
|
+
return V(e3, pe, B);
|
|
129
130
|
}
|
|
130
131
|
function we(e3) {
|
|
131
132
|
const o2 = se.value[e3.column.property] ? se.value[e3.column.property].cellStyle : null;
|
|
132
|
-
return
|
|
133
|
+
return J(e3, o2, B);
|
|
133
134
|
}
|
|
134
135
|
he && he.fixHeight && (me = he.fixHeight), he && he.maxHeight && (me = he.maxHeight), me && (me = Number(me + "")), n(() => {
|
|
135
136
|
const e3 = b(B.pageContext, B.configure);
|
|
@@ -147,7 +148,7 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
147
148
|
const t2 = ae.value[e4.property].label;
|
|
148
149
|
r2[o3] = y("div", {}, [G(t2, n2)]);
|
|
149
150
|
} else if (ue.value[e4.property]) {
|
|
150
|
-
const t2 = n2.filter((e5, o4) => !
|
|
151
|
+
const t2 = n2.filter((e5, o4) => !pe.includes(o4));
|
|
151
152
|
r2[o3] = U(ue.value[e4.property], t2, e4.property, B.pageContext);
|
|
152
153
|
}
|
|
153
154
|
}), r2;
|
|
@@ -205,7 +206,7 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
205
206
|
let o3 = [];
|
|
206
207
|
oe.value && (o3 = A(oe.value), o3.forEach((o4) => {
|
|
207
208
|
e4.forEach((e5) => {
|
|
208
|
-
const n3 =
|
|
209
|
+
const n3 = L(o4, e5.props.format, e5, B.pageContext, B.configure);
|
|
209
210
|
o4[e5.props.base.prop] = n3;
|
|
210
211
|
});
|
|
211
212
|
}));
|
|
@@ -213,7 +214,7 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
213
214
|
}(n2), columns: e3 };
|
|
214
215
|
} }), (o2, n2) => {
|
|
215
216
|
const r2 = t("el-table");
|
|
216
|
-
return a(), i("div", { style:
|
|
217
|
+
return a(), i("div", { style: l([p(Q), { display: "flex", "flex-direction": "column" }]), class: u([p(W), "amb-widget-chart amb-widget-flex"]), ref: "thisRef" }, [s(c(C, { ref_key: "headerRef", ref: Z, headerInfo: p(Y), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[d, p(Y).showHeader || e2.pageContext.showHomepageSearch]]), c(r2, { ref_key: "gridRef", ref: ge, data: oe.value, style: { width: "100%" }, "max-height": p(me), "header-cell-style": be, "row-style": Oe, "cell-style": we, "show-summary": ie.value, stripe: e2.configure.props.base.stripe, "summary-method": Se, "span-method": je }, { default: m(() => [ee.value ? (a(true), i(h, { key: 0 }, v(re.value, (o3, n3) => (a(), i(h, { key: n3 }, [o3.isLeaf ? Ie(te.value[o3.columnUuid]) ? (a(), g(F, { key: 1, configure: e2.configure, pageContext: e2.pageContext, column: te.value[o3.columnUuid] }, null, 8, ["configure", "pageContext", "column"])) : f("", true) : (a(), g(k, { key: 0, configure: e2.configure, pageContext: e2.pageContext, groupColumn: o3, columnsConfigKeyValues: te.value }, null, 8, ["configure", "pageContext", "groupColumn", "columnsConfigKeyValues"]))], 64))), 128)) : (a(true), i(h, { key: 1 }, v(ne.value, (o3, n3) => (a(), i(h, { key: n3 }, [Ie(o3) ? (a(), g(F, { key: 0, column: o3, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["column", "configure", "pageContext"])) : f("", true)], 64))), 128))]), _: 1 }, 8, ["data", "max-height", "show-summary", "stripe"]), e2.configure.pageination && e2.configure.pageination.enable ? (a(), g(I, { key: 0, configure: e2.configure, "table-data": oe.value, total: fe.value, onPageChange: Ee, onPageSizeChange: $e }, null, 8, ["configure", "table-data", "total"])) : f("", true)], 6);
|
|
217
218
|
};
|
|
218
219
|
} });
|
|
219
220
|
export {
|
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as
|
|
2
|
-
import { packageTemplateFiles as
|
|
3
|
-
const m = "${",
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as l, resolveComponent as o, createBlock as a, openBlock as n, withCtx as s, createVNode as r, createTextVNode as u, toDisplayString as p } from "vue";
|
|
2
|
+
import { packageTemplateFiles as i } from "../../../utils/common-util.js";
|
|
3
|
+
const m = "${", c = "}", g = e({ __name: "export-form-report-dialog", props: { configure: { type: Object, required: true }, pageContext: { type: Object } }, emits: ["export", "close"], setup(e2, { emit: g2 }) {
|
|
4
|
+
const d = e2, f = g2, x = t([]), b = t([]), h = d.configure.props.base, v = d.pageContext.entity.data;
|
|
5
5
|
function w(e3) {
|
|
6
|
-
let t2,
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
let t2, l2;
|
|
7
|
+
console.log("templateShowName", e3);
|
|
8
|
+
let o2 = e3;
|
|
9
|
+
const a2 = o2.indexOf(m), n2 = o2.indexOf(c);
|
|
10
|
+
return console.log("prefixIndex", a2), console.log("suffixIndex", n2), -1 !== a2 && -1 !== n2 ? (a2 > n2 ? (o2 = o2.substring(0, n2) + o2.substring(n2 + 1), console.log("non replacement value === newValue", o2)) : (t2 = o2.substring(a2 + 2, n2), l2 = o2.substring(a2, n2 + 1), console.log("field", t2), console.log("formatStr", l2), b.value.push(t2), console.log("fields", b.value), o2 = o2.replace(l2, ""), console.log("newValue", o2)), w(o2)) : b.value;
|
|
9
11
|
}
|
|
10
|
-
function
|
|
12
|
+
function N() {
|
|
11
13
|
f("close");
|
|
12
14
|
}
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
return l(() => {
|
|
16
|
+
h.templateFiles && h.templateFiles.length > 0 ? x.value = i(h.templateFiles) : h.templateUuid && h.templateName && x.value.push({ templateUuid: h.templateUuid, templateName: h.templateName }), x.value.forEach((e3) => {
|
|
17
|
+
e3 && e3.templateName && (e3.templateName = function(e4) {
|
|
18
|
+
const t2 = w(e4);
|
|
19
|
+
return console.log("fields", t2), t2.forEach((t3) => {
|
|
20
|
+
const l2 = m + t3 + c;
|
|
21
|
+
let o2;
|
|
22
|
+
-1 !== e4.indexOf(l2) && v.hasOwnProperty(t3) && (o2 = v[t3] ? v[t3] : "", e4 = e4.replace(l2, o2));
|
|
23
|
+
}), e4;
|
|
24
|
+
}(e3.templateName));
|
|
21
25
|
});
|
|
22
26
|
}), (e3, t2) => {
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
return
|
|
26
|
-
var
|
|
27
|
-
} }, { default:
|
|
27
|
+
const l2 = o("el-table-column"), i2 = o("el-button"), m2 = o("el-table"), c2 = o("el-dialog");
|
|
28
|
+
return n(), a(c2, { "show-close": true, "append-to-body": true, title: e3.$t("superPageRuntimeMessage.selectTemplate"), "model-value": "", onClose: N }, { default: s(() => [r(m2, { data: x.value, style: { width: "100%" } }, { default: s(() => [r(l2, { label: e3.$t("superPageRuntimeMessage.temlpate"), prop: "templateShowPath" }, { default: s((e4) => [u(p(e4.row.templateName), 1)]), _: 1 }, 8, ["label"]), r(l2, { label: e3.$t("superPageRuntimeMessage.operating"), width: "200", fixed: "right" }, { default: s((t3) => [r(i2, { type: "text", size: "small", onClick: (e4) => {
|
|
29
|
+
return l3 = t3.row, void f("export", d.configure, l3);
|
|
30
|
+
var l3;
|
|
31
|
+
} }, { default: s(() => [u(p(e3.$t("superPageRuntimeMessage.export")), 1)]), _: 2 }, 1032, ["onClick"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["title"]);
|
|
28
32
|
};
|
|
29
33
|
} });
|
|
30
34
|
export {
|
|
31
|
-
|
|
35
|
+
g as default
|
|
32
36
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as e, ref as t, onMounted as o, nextTick as n, onUnmounted as i, watchEffect as l, computed as a, createElementBlock as r, openBlock as s, createCommentVNode as u, createElementVNode as f, normalizeStyle as c, normalizeClass as d, renderSlot as p } from "vue";
|
|
2
2
|
const v = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 }, position: { type: String, default: "top", validator: (e2) => ["top", "bottom"].includes(e2) }, target: { type: [String, HTMLElement], default: () => window }, autoDetectParentScroll: { type: Boolean, default: true }, stickyInScrollContainer: { type: Boolean, default: true }, zIndex: { type: Number, default: 100 }, enableIntervalUpdate: { type: Boolean, default: true }, enableIntervalTime: { type: Number, default: 2e3 } }, emits: ["change"], setup(e2, { emit: v2 }) {
|
|
3
|
-
const m = e2, w = v2, h = t(null),
|
|
3
|
+
const m = e2, w = v2, h = t(null), g = t(null), x = t(false), y = t({}), b = t([]), T = t(window), B = t(0), I = t(null), E = () => {
|
|
4
4
|
try {
|
|
5
|
-
if (!
|
|
6
|
-
const e3 =
|
|
5
|
+
if (!g.value) return;
|
|
6
|
+
const e3 = g.value.getBoundingClientRect(), t2 = T.value;
|
|
7
7
|
if (t2 === window) {
|
|
8
8
|
const t3 = "top" === m.position ? e3.top <= m.offset : e3.bottom >= window.innerHeight - m.offset;
|
|
9
9
|
B.value = 0, S(t3, e3);
|
|
@@ -17,16 +17,17 @@ const v = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
|
|
|
17
17
|
B.value = l2 ?? 0, S(n2 || i2 || false, e3);
|
|
18
18
|
}
|
|
19
19
|
} catch (e3) {
|
|
20
|
+
console.error(e3);
|
|
20
21
|
}
|
|
21
22
|
}, S = (e3, t2) => {
|
|
22
23
|
var _a;
|
|
23
|
-
e3 ===
|
|
24
|
+
e3 === x.value && ((_a = y.value) == null ? void 0 : _a.height) === `${t2.height}px` || (x.value = e3, w("change", e3), y.value = e3 ? { width: "100%", height: `${t2.height}px` } : {});
|
|
24
25
|
}, C = () => {
|
|
25
26
|
requestAnimationFrame(E);
|
|
26
27
|
};
|
|
27
28
|
let L;
|
|
28
29
|
const k = () => {
|
|
29
|
-
|
|
30
|
+
x.value = false, clearTimeout(L), L = window.setTimeout(() => {
|
|
30
31
|
E();
|
|
31
32
|
}, 100);
|
|
32
33
|
};
|
|
@@ -36,9 +37,9 @@ const v = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
|
|
|
36
37
|
try {
|
|
37
38
|
m.enableIntervalUpdate && (I.value = setInterval(C, m.enableIntervalTime));
|
|
38
39
|
const e3 = (() => {
|
|
39
|
-
if (m.autoDetectParentScroll &&
|
|
40
|
+
if (m.autoDetectParentScroll && g.value) {
|
|
40
41
|
const e4 = [];
|
|
41
|
-
let t2 =
|
|
42
|
+
let t2 = g.value.parentElement;
|
|
42
43
|
for (; t2 && t2 !== document.body; ) {
|
|
43
44
|
const { overflowY: o2 } = window.getComputedStyle(t2);
|
|
44
45
|
/(auto|scroll)/.test(o2) && e4.push(t2), t2 = t2.parentElement;
|
|
@@ -51,8 +52,9 @@ const v = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
|
|
|
51
52
|
}
|
|
52
53
|
return [window];
|
|
53
54
|
})();
|
|
54
|
-
b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", C)), window.addEventListener("resize", k), E();
|
|
55
|
+
console.log("检测父级滚动节点", e3), b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", C)), window.addEventListener("resize", k), E();
|
|
55
56
|
} catch (e3) {
|
|
57
|
+
console.error(e3);
|
|
56
58
|
}
|
|
57
59
|
});
|
|
58
60
|
}, 100);
|
|
@@ -65,9 +67,9 @@ const v = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
|
|
|
65
67
|
});
|
|
66
68
|
const z = a(() => {
|
|
67
69
|
var _a;
|
|
68
|
-
return
|
|
70
|
+
return x.value ? { position: "fixed", width: `${(_a = g.value) == null ? void 0 : _a.offsetWidth}px`, zIndex: m.zIndex, [m.position]: `${m.offset + B.value}px` } : { position: "relative" };
|
|
69
71
|
});
|
|
70
|
-
return (e3, t2) => (s(), r("div", { ref_key: "affixMainRef", ref: h, class: "yx-affix" }, [
|
|
72
|
+
return (e3, t2) => (s(), r("div", { ref_key: "affixMainRef", ref: h, class: "yx-affix" }, [x.value ? (s(), r("div", { key: 0, style: c(y.value), class: "yx-affix-placeholder" }, null, 4)) : u("", true), f("div", { ref_key: "affixRef", ref: g, style: c(z.value), class: d({ "yx-affix-content": true, "is-fixed": x.value, "is-top": "top" === m.position, "is-bottom": "bottom" === m.position }) }, [p(e3.$slots, "default", {}, void 0, true)], 6)], 512));
|
|
71
73
|
} });
|
|
72
74
|
export {
|
|
73
75
|
v as default
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, computed as t, ref as
|
|
1
|
+
import { defineComponent as e, computed as t, ref as r, onMounted as a, watch as o, resolveComponent as l, createBlock as n, openBlock as u, normalizeStyle as i, normalizeClass as s, unref as c, withCtx as p, createElementBlock as m, createCommentVNode as f, toDisplayString as g } from "vue";
|
|
2
2
|
import d from "qrcode";
|
|
3
3
|
import v from "jsbarcode";
|
|
4
4
|
import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
|
|
@@ -12,7 +12,7 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
|
|
|
12
12
|
let k = y(q.pageContext, q.configure);
|
|
13
13
|
const A = t({ get: () => x(N, k), set(e3) {
|
|
14
14
|
h(N, k, e3);
|
|
15
|
-
} }), E = q.configure.runtime ? q.configure.runtime : {}, _ =
|
|
15
|
+
} }), E = q.configure.runtime ? q.configure.runtime : {}, _ = r(E.props ? E.props : {}), O = E.style, P = E.class, S = E.headerStyle, $ = r(""), I = r(null), Q = r(_.value.brCodeFormat ?? "CODE128"), V = r([]);
|
|
16
16
|
function F(e3) {
|
|
17
17
|
return h(N, k, e3);
|
|
18
18
|
}
|
|
@@ -22,31 +22,32 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
|
|
|
22
22
|
function L(e3) {
|
|
23
23
|
var t2;
|
|
24
24
|
"QR-code" === _.value.type ? (t2 = e3, d.toDataURL(t2, (e4, t3) => {
|
|
25
|
-
e4
|
|
25
|
+
e4 ? console.error(e4) : $.value = t3;
|
|
26
26
|
})) : function(e4) {
|
|
27
27
|
try {
|
|
28
28
|
v(I.value, e4, { format: Q.value });
|
|
29
29
|
} catch (e5) {
|
|
30
|
+
console.error("生成条形码时发生错误:", e5);
|
|
30
31
|
}
|
|
31
32
|
}(e3);
|
|
32
33
|
}
|
|
33
|
-
return
|
|
34
|
+
return a(() => {
|
|
34
35
|
_.value.generateRule && ("fixed" === _.value.generateRuleType ? (V.value = Array.from(_.value.generateRule.matchAll(/\$\{(\w+)\}/g), (e3) => e3[1]), V.value.forEach((e3) => {
|
|
35
|
-
|
|
36
|
+
o(() => q.pageContext.entity.data[e3], (e4, t2) => {
|
|
36
37
|
null != e4 && function() {
|
|
37
38
|
let e5 = true;
|
|
38
39
|
V.value.forEach((t3) => {
|
|
39
40
|
q.pageContext.entity.data[t3] || (e5 = false);
|
|
40
41
|
}), e5 && J(function(e6, t3) {
|
|
41
|
-
const
|
|
42
|
-
return e6.replace(
|
|
42
|
+
const r2 = /\$\{(\w+)\}/g;
|
|
43
|
+
return e6.replace(r2, (e7, r3) => t3.hasOwnProperty(r3) ? t3[r3] : e7);
|
|
43
44
|
}(_.value.generateRule, q.pageContext.entity.data));
|
|
44
45
|
}();
|
|
45
46
|
});
|
|
46
47
|
})) : w.get(window.$vueApp.config.globalProperties.baseAPI + "/dc/setting-barcode-models/by-code/" + _.value.generateRule).then((e3) => {
|
|
47
48
|
const t2 = JSON.parse(e3.barcodeModelItems);
|
|
48
49
|
t2.forEach((e4) => {
|
|
49
|
-
"-1" !== e4.propDbName && -1 !== e4.propDbName && (V.value.push(e4.propDbName),
|
|
50
|
+
"-1" !== e4.propDbName && -1 !== e4.propDbName && (V.value.push(e4.propDbName), o(() => q.pageContext.entity.data[e4.propDbName], (e5, r2) => {
|
|
50
51
|
if (null != e5) {
|
|
51
52
|
const e6 = b(t2, q.pageContext.entity.data);
|
|
52
53
|
e6 && J(e6);
|
|
@@ -54,12 +55,13 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
|
|
|
54
55
|
}));
|
|
55
56
|
});
|
|
56
57
|
}).catch((e3) => {
|
|
58
|
+
console.error("获取条码规则失败:", e3);
|
|
57
59
|
})), A.value && L(A.value);
|
|
58
60
|
}), D2({ getValue: function() {
|
|
59
61
|
return x(N, k);
|
|
60
62
|
}, setValue: F }), (e3, t2) => {
|
|
61
|
-
const
|
|
62
|
-
return
|
|
63
|
+
const r2 = l("el-form-item");
|
|
64
|
+
return u(), n(r2, { required: !!_.value.required, class: s(c(P)), "label-width": _.value.labelWidth, style: i(c(O)) }, { label: p(() => [_.value.tittleShow ? (u(), m("div", { key: 0, style: i({ ...c(S) }) }, g(c(R)(_.value.title)), 5)) : f("", true)]), default: p(() => ["QR-code" === _.value.type ? (u(), m("img", { key: 0, src: $.value }, null, 8, j)) : (u(), m("canvas", { key: 1, ref_key: "barcode", ref: I }, null, 512))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
63
65
|
};
|
|
64
66
|
} });
|
|
65
67
|
export {
|