super-page-designer 2.2.22 → 2.2.25
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/design/utils/page-explore-util.js +10 -10
- package/dist/es/components/design/utils/page-permission-util.js +35 -33
- package/dist/es/components/design/views/assemblys/chart/column-line/column-line-design.vue2.js +24 -22
- package/dist/es/components/design/views/assemblys/chart/common/common-attr-clickset.vue.js +39 -36
- package/dist/es/components/design/views/assemblys/chart/common/common-attr-data.vue.js +43 -40
- package/dist/es/components/design/views/assemblys/chart/common/common-attr-groupby.vue.js +43 -40
- package/dist/es/components/design/views/assemblys/chart/common/common-home-chart.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/chart/common/common-home-chart.vue2.js +14 -13
- package/dist/es/components/design/views/assemblys/chart/gauge/gauge-attr-data.vue.js +33 -30
- package/dist/es/components/design/views/assemblys/chart/gauge/gauge-design.vue2.js +25 -23
- package/dist/es/components/design/views/assemblys/chart/pie/pie-design.vue2.js +25 -23
- package/dist/es/components/design/views/assemblys/chart/radar/radar-attr-data.vue.js +33 -30
- package/dist/es/components/design/views/assemblys/chart/radar/radar-design.vue2.js +25 -23
- package/dist/es/components/design/views/assemblys/chart/scatter/scatter-attr-data.vue.js +38 -35
- package/dist/es/components/design/views/assemblys/chart/scatter/scatter-design.vue2.js +23 -21
- package/dist/es/components/design/views/assemblys/common/common-icon-bind.vue.js +60 -57
- package/dist/es/components/design/views/assemblys/common/common-select-page.vue.js +36 -33
- package/dist/es/components/design/views/assemblys/common/common-select-table.vue.js +44 -41
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.js +3 -3
- package/dist/es/components/design/views/assemblys/common/{common-variable-bind.vue2.js → common-variable-bind.vue3.js} +8 -8
- package/dist/es/components/design/views/assemblys/common/page-permission-select.vue.js +25 -25
- package/dist/es/components/design/views/assemblys/common-attr-events.vue.js +14 -12
- package/dist/es/components/design/views/assemblys/data/component/column-config.vue.js +78 -74
- package/dist/es/components/design/views/assemblys/data/component/composite-header.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/composite-header.vue2.js +111 -107
- package/dist/es/components/design/views/assemblys/data/component/table-children-column.vue.js +41 -39
- package/dist/es/components/design/views/assemblys/form/checkbox/checkbox-design.vue2.js +10 -8
- package/dist/es/components/design/views/assemblys/form/common/data-linkage.vue.js +26 -22
- package/dist/es/components/design/views/assemblys/form/common/data-origin-autoset.vue.js +41 -37
- package/dist/es/components/design/views/assemblys/form/common/data-origin-service-in.vue.js +30 -26
- package/dist/es/components/design/views/assemblys/form/common/linkpage-page-callback.vue.js +30 -26
- package/dist/es/components/design/views/assemblys/form/common/uploading.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-autoset.vue.js +30 -26
- package/dist/es/components/design/views/assemblys/form/radio/radio-design.vue2.js +12 -10
- package/dist/es/components/design/views/assemblys/form/rich-text/richtext-design.vue2.js +29 -26
- package/dist/es/components/design/views/assemblys/form/select/select-design.vue2.js +18 -15
- package/dist/es/components/design/views/assemblys/object-design.vue.js +28 -20
- package/dist/es/components/design/views/assemblys/page/page-attr-permissions.vue.js +38 -34
- package/dist/es/components/design/views/design/page-event/config.vue.js +1 -1
- package/dist/es/components/design/views/design/page-event/config.vue3.js +43 -40
- package/dist/es/components/design/views/design/page-event/page-event-container.vue.js +48 -45
- package/dist/es/components/design/views/design/page-event/page-event-content.vue.js +21 -21
- package/dist/es/components/design/views/design/view/components/quick-add-fields.vue.js +67 -63
- package/dist/es/components/design/views/design/view/view-design-display.vue.js +91 -88
- package/dist/es/stores/event-undo-redo-store.d.ts +4 -1
- package/dist/es/stores/event-undo-redo-store.js +5 -2
- package/dist/es/style.css +13 -13
- package/package.json +4 -4
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
function e(e2, t, l, o) {
|
|
2
2
|
const i = { uuid: "-1", label: "页面", name: "page", componentIndex: -1 };
|
|
3
3
|
if (!e2 || 0 == e2.length) return [i];
|
|
4
|
-
const
|
|
4
|
+
const p = [];
|
|
5
5
|
for (let o2 = 0; o2 < e2.length; o2++) {
|
|
6
6
|
const i2 = n(e2[o2], t, l);
|
|
7
|
-
i2 &&
|
|
7
|
+
i2 && p.push(i2);
|
|
8
8
|
}
|
|
9
|
-
return i.children =
|
|
9
|
+
return i.children = p, [i];
|
|
10
10
|
}
|
|
11
11
|
function n(e2, t, l, o) {
|
|
12
12
|
const i = [];
|
|
13
|
-
if (e2.
|
|
14
|
-
const
|
|
15
|
-
null !=
|
|
13
|
+
if (e2.items && e2.items.length > 0 && "table" != e2.name) for (let o2 = 0; o2 < e2.items.length; o2++) {
|
|
14
|
+
const p2 = n(e2.items[o2], t, l);
|
|
15
|
+
null != p2 && i.push(p2);
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
let
|
|
19
|
-
if (0 == i.length && t && (
|
|
20
|
-
const n2 = { componentIndex: e2.componentIndex, name: e2.name, label:
|
|
17
|
+
const p = e2.props && e2.props.base ? e2.props.base.title : void 0;
|
|
18
|
+
let s = true;
|
|
19
|
+
if (0 == i.length && t && (s = false, (e2.type && e2.type.indexOf(t) > -1 || e2.label && e2.label.indexOf(t) > -1 || e2.name && e2.name.indexOf(t) > -1 || p && p.indexOf(t) > -1) && (s = true)), s && e2.componentIndex) {
|
|
20
|
+
const n2 = { componentIndex: e2.componentIndex, name: e2.name, label: p ? p + "(" + e2.label + ")" : e2.label, uuid: e2.uuid, children: i };
|
|
21
21
|
return null != l && e2.componentIndex && (l.value[e2.componentIndex] = e2), n2;
|
|
22
22
|
}
|
|
23
23
|
return null;
|
|
@@ -3,82 +3,84 @@ import { getStandPermissionInfo as s, FuncType as n } from "super-page-runtime";
|
|
|
3
3
|
function o() {
|
|
4
4
|
return [{ value: n.AUTHORIZED, label: "专用" }, { value: n.AUTHENTICATED, label: "公用" }, { value: n.ANONYMOUS, label: "匿名" }];
|
|
5
5
|
}
|
|
6
|
-
function i(o2, i2,
|
|
6
|
+
function i(o2, i2, t2, u2) {
|
|
7
7
|
o2.pagePermissions || (o2.pagePermissions = []);
|
|
8
|
-
const
|
|
9
|
-
if (!
|
|
10
|
-
const
|
|
11
|
-
for (let s2 = 0; s2 <
|
|
12
|
-
let o3 =
|
|
13
|
-
const r = o3.code ? o3.code : i2, d =
|
|
8
|
+
const p2 = o2.code, c = s(i2);
|
|
9
|
+
if (!c || !c.functions) return;
|
|
10
|
+
const a = o2.pagePermissions, l = c.functions, f = [];
|
|
11
|
+
for (let s2 = 0; s2 < l.length; s2++) {
|
|
12
|
+
let o3 = l[s2];
|
|
13
|
+
const r = o3.code ? o3.code : i2, d = a.filter((e2) => {
|
|
14
14
|
if (e2.simpleCode == r) return true;
|
|
15
15
|
});
|
|
16
16
|
let m = null;
|
|
17
|
-
|
|
17
|
+
m = 0 == s2 && t2 || (o3.label ? o3.label : c.label);
|
|
18
|
+
const h = "/" + p2 + o3.path;
|
|
19
|
+
if (d.length > 0) {
|
|
18
20
|
const e2 = d[0];
|
|
19
|
-
e2.name = m, e2.uuids || (e2.uuids = []),
|
|
21
|
+
e2.name = m, e2.path && e2.path === h || (e2.path = h), e2.uuids || (e2.uuids = []), u2 && !e2.uuids.includes(u2) && e2.uuids.push(u2), f.push(e2);
|
|
20
22
|
} else {
|
|
21
|
-
const s3 = { source: "auto", type: "standard", simpleCode: r, name: m, uuids: [
|
|
22
|
-
|
|
23
|
+
const s3 = { source: "auto", type: "standard", simpleCode: r, name: m, uuids: [u2], funcType: o3.funcType ? o3.funcType : n.AUTHORIZED, code: p2 + "." + r, path: h, uuid: e() };
|
|
24
|
+
a.push(s3), f.push(s3);
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
return f;
|
|
26
28
|
}
|
|
27
|
-
function
|
|
28
|
-
const
|
|
29
|
-
for (let e3 of
|
|
29
|
+
function t(e2, o2) {
|
|
30
|
+
const t2 = o2.code, u2 = e2.events ? e2.events : [], c = e2.props && e2.props.base ? e2.props.base : {}, a = [], l = [];
|
|
31
|
+
for (let e3 of u2) if (e3.isStandard && e3.eventName) {
|
|
30
32
|
const o3 = { type: "standard", eventName: e3.eventName };
|
|
31
33
|
if ("click" == e3.name) {
|
|
32
|
-
o3.name =
|
|
34
|
+
o3.name = c.title;
|
|
33
35
|
const i2 = s(e3.eventName);
|
|
34
36
|
if (i2 && i2.functions) {
|
|
35
37
|
for (let s2 of i2.functions) if (s2.funcType == n.AUTHORIZED || !s2.funcType) {
|
|
36
38
|
const n2 = { simpleCode: s2.code ? s2.code : e3.eventName, funcType: s2.funcType };
|
|
37
|
-
n2.code =
|
|
39
|
+
n2.code = t2 + "." + n2.simpleCode, n2.path = "/" + t2 + s2.path, Object.assign(n2, o3), a.push(n2);
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
|
-
|
|
43
|
+
l.push(o3);
|
|
42
44
|
}
|
|
43
|
-
e2.autoPermissions =
|
|
45
|
+
e2.autoPermissions = a;
|
|
44
46
|
const f = e2.uuid;
|
|
45
47
|
o2.pagePermissions || (o2.pagePermissions = []);
|
|
46
48
|
const r = [];
|
|
47
49
|
for (let e3 of o2.pagePermissions) e3.uuids && e3.uuids.includes(f) && r.push(e3);
|
|
48
50
|
const d = {};
|
|
49
|
-
if (
|
|
51
|
+
if (l) for (let e3 of l) {
|
|
50
52
|
const s2 = i(o2, e3.eventName, e3.name, f);
|
|
51
53
|
if (s2) for (let e4 of s2) d[e4.uuid] = true;
|
|
52
54
|
}
|
|
53
|
-
for (let e3 of r) d[e3.uuid] || "auto" != e3.source ||
|
|
55
|
+
for (let e3 of r) d[e3.uuid] || "auto" != e3.source || p(o2, e3.simpleCode, f);
|
|
54
56
|
}
|
|
55
|
-
function
|
|
57
|
+
function u(e2, s2) {
|
|
56
58
|
e2.pagePermissions || (e2.pagePermissions = []);
|
|
57
59
|
const n2 = [];
|
|
58
60
|
for (let o2 of e2.pagePermissions) o2.uuids && o2.uuids.includes(s2) && n2.push(o2);
|
|
59
|
-
for (let o2 of n2)
|
|
61
|
+
for (let o2 of n2) p(e2, o2.simpleCode, s2);
|
|
60
62
|
}
|
|
61
|
-
function
|
|
63
|
+
function p(e2, s2, n2) {
|
|
62
64
|
e2.pagePermissions || (e2.pagePermissions = []);
|
|
63
65
|
const o2 = e2.pagePermissions;
|
|
64
66
|
let i2 = -1;
|
|
65
|
-
const
|
|
66
|
-
for (let e3 = 0; e3 <
|
|
67
|
+
const t2 = o2.length;
|
|
68
|
+
for (let e3 = 0; e3 < t2; e3++) if (o2[e3].simpleCode == s2) {
|
|
67
69
|
i2 = e3;
|
|
68
70
|
break;
|
|
69
71
|
}
|
|
70
72
|
if (-1 == i2) return;
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
const e3 =
|
|
74
|
-
e3 > -1 &&
|
|
73
|
+
const u2 = o2[i2];
|
|
74
|
+
if (u2.uuids && n2) {
|
|
75
|
+
const e3 = u2.uuids.indexOf(n2);
|
|
76
|
+
e3 > -1 && u2.uuids.splice(e3, 1);
|
|
75
77
|
}
|
|
76
|
-
|
|
78
|
+
u2.uuids && 0 != u2.uuids.length || o2.splice(i2, 1);
|
|
77
79
|
}
|
|
78
80
|
export {
|
|
79
81
|
i as addPermission,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
u as batchRemovePermissions,
|
|
83
|
+
t as batchUpdatePermissions,
|
|
84
|
+
p as delPermission,
|
|
83
85
|
o as getFunctionTypes
|
|
84
86
|
};
|
package/dist/es/components/design/views/assemblys/chart/column-line/column-line-design.vue2.js
CHANGED
|
@@ -6,15 +6,15 @@ import { getCustomTheme as I } from "super-page-runtime";
|
|
|
6
6
|
import k from "./series/column-line-series-attr.vue.js";
|
|
7
7
|
import D from "../common/common-chart-header.vue.js";
|
|
8
8
|
import { use as F } from "echarts/core";
|
|
9
|
-
import { CanvasRenderer as
|
|
10
|
-
import { LineChart as
|
|
11
|
-
import { GridComponent as
|
|
9
|
+
import { CanvasRenderer as T } from "echarts/renderers";
|
|
10
|
+
import { LineChart as w, BarChart as A } from "echarts/charts";
|
|
11
|
+
import { GridComponent as O, LegendComponent as R, TitleComponent as _, TooltipComponent as q, ToolboxComponent as z, DataZoomComponent as B } from "echarts/components";
|
|
12
12
|
import H from "vue-echarts";
|
|
13
13
|
import "element-plus";
|
|
14
14
|
import "agilebuilder-ui/src/utils/request";
|
|
15
15
|
import "../../../../utils/eventBus.js";
|
|
16
16
|
const S = { style: { position: "absolute", top: "0px", right: "60px", "text-align": "center" } }, E = ["onClick"], G = e({ __name: "column-line-design", props: { pageDesign: {}, configure: {}, indexObj: {}, selectWidget: {} }, emits: ["onSelectWidget", "onCustomAttrWidget"], setup(e2, { emit: G2 }) {
|
|
17
|
-
F([w,
|
|
17
|
+
F([T, w, O, R, _, q, A, z, B]);
|
|
18
18
|
const J = e2;
|
|
19
19
|
J.configure.props || (J.configure.props = {}), J.configure.items || (J.configure.items = []), 0 == J.configure.items.length && J.configure.items.push({ uuid: h(), index: 1, name: "", type: "bar", label: "柱状图", props: { title: "系列1" }, style: {} }), J.configure.runtime || (J.configure.runtime = {});
|
|
20
20
|
const K = t({}), L = t(""), M = t({}), N = t({}), P = t(null);
|
|
@@ -22,30 +22,32 @@ const S = { style: { position: "absolute", top: "0px", right: "60px", "text-alig
|
|
|
22
22
|
const e3 = C(J.configure, N.value);
|
|
23
23
|
J.configure.runtime.dataConfig = e3;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
i(J.configure.style, () => {
|
|
26
|
+
b(J.configure, K, L, null), J.configure.runtime.style = K.value, J.configure.runtime.class = L.value, N.value = x(J.configure), J.configure.runtime.headerInfo = N.value, V();
|
|
27
|
+
}, { immediate: true }), i(J.configure.props, () => {
|
|
28
|
+
V(), Q();
|
|
29
|
+
}), i(J.configure.items, () => {
|
|
30
|
+
V();
|
|
31
|
+
});
|
|
32
|
+
const U = setTimeout(() => {
|
|
33
|
+
Q();
|
|
34
|
+
}, 100);
|
|
35
|
+
function V() {
|
|
26
36
|
j(J.configure, M), N.value = x(J.configure), P.value = I(J.configure.props.customTheme), J.configure.runtime.chartOption = M.value, J.configure.runtime.headerInfo = N.value, y(J.configure, N.value);
|
|
27
37
|
}
|
|
28
|
-
function
|
|
38
|
+
function X() {
|
|
29
39
|
if (J.configure.items) for (let e3 of J.configure.items) e3.selected = false;
|
|
30
40
|
}
|
|
31
|
-
function
|
|
32
|
-
|
|
41
|
+
function Y(e3) {
|
|
42
|
+
X();
|
|
33
43
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}, { immediate: true }), i(J.configure.props, () => {
|
|
37
|
-
U(), Q();
|
|
38
|
-
}), i(J.configure.items, () => {
|
|
39
|
-
U();
|
|
40
|
-
}), setTimeout(() => {
|
|
41
|
-
Q();
|
|
42
|
-
}, 100), o(() => {
|
|
43
|
-
W(J.configure);
|
|
44
|
+
o(() => {
|
|
45
|
+
W(J.configure), U && clearTimeout(U);
|
|
44
46
|
}), J.selectWidget && i(J.selectWidget, () => {
|
|
45
|
-
null != J.selectWidget && J.selectWidget.value != J.configure.componentIndex &&
|
|
47
|
+
null != J.selectWidget && J.selectWidget.value != J.configure.componentIndex && X();
|
|
46
48
|
}), t(null);
|
|
47
|
-
const
|
|
48
|
-
return (e3, t2) => (n(), r("div", { style: c([K.value, { position: "relative" }]), class: u([L.value, "amb-widget-chart"]), onClick: s(
|
|
49
|
+
const Z = G2;
|
|
50
|
+
return (e3, t2) => (n(), r("div", { style: c([K.value, { position: "relative" }]), class: u([L.value, "amb-widget-chart"]), onClick: s(Y, ["stop"]), ref: "thisRef" }, [l(m(D, { headerInfo: N.value }, null, 8, ["headerInfo"]), [[f, N.value.showHeader]]), m(a(H), { ref: "chartRef", theme: P.value, option: M.value, autoresize: "" }, null, 8, ["theme", "option"]), l(g("div", S, [(n(true), r(p, null, d(e3.configure.items, (e4, t3) => (n(), r("label", { class: u([[e4.selected ? "amb-design-chart-series-selected" : ""], "amb-design-chart-series"]), onClick: s((e5) => function(e6, t4) {
|
|
49
51
|
e6 && e6.preventDefault();
|
|
50
52
|
const i2 = J.configure.items[t4];
|
|
51
53
|
if (!i2.selected) {
|
|
@@ -53,7 +55,7 @@ const S = { style: { position: "absolute", top: "0px", right: "60px", "text-alig
|
|
|
53
55
|
e7.selected = false;
|
|
54
56
|
break;
|
|
55
57
|
}
|
|
56
|
-
i2.serviceFields = J.configure.serviceFields, i2.serviceDataField = J.configure.serviceDataField, i2.selected = true,
|
|
58
|
+
i2.serviceFields = J.configure.serviceFields, i2.serviceDataField = J.configure.serviceDataField, i2.selected = true, Z("onCustomAttrWidget", i2, k);
|
|
57
59
|
}
|
|
58
60
|
}(e5, t3), ["stop"]) }, v(e4.props.title), 11, E))), 256))], 512), [[f, e3.configure.componentIndex == e3.selectWidget.value]])], 6));
|
|
59
61
|
} });
|
|
@@ -1,37 +1,40 @@
|
|
|
1
|
-
import { defineComponent as e, ref as l,
|
|
2
|
-
import { Plus as
|
|
3
|
-
import { getUuidv4 as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
function
|
|
1
|
+
import { defineComponent as e, ref as l, onUnmounted as a, watch as t, resolveComponent as o, createBlock as i, openBlock as u, withCtx as r, createElementVNode as n, createVNode as c, createElementBlock as s, Fragment as d, renderList as f, toDisplayString as m, unref as p } from "vue";
|
|
2
|
+
import { Plus as v, Delete as b } from "@element-plus/icons-vue";
|
|
3
|
+
import { getUuidv4 as g } from "../../../../utils/common-util.js";
|
|
4
|
+
import _ from "../../common/common-variable-bind.vue.js";
|
|
5
|
+
const V = { style: { padding: "8px 0px 0px 0px" } }, h = { style: { float: "left" } }, w = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } }, k = e({ __name: "common-attr-clickset", props: { configure: {} }, setup(e2) {
|
|
6
|
+
const k2 = e2;
|
|
7
|
+
k2.configure.clickSet || (k2.configure.clickSet = {});
|
|
8
|
+
const y = l(k2.configure.clickSet);
|
|
9
|
+
function x(e3) {
|
|
10
10
|
let l2 = -1;
|
|
11
|
-
const a2 =
|
|
12
|
-
for (let t2 = 0; t2 < a2; t2++) if (
|
|
11
|
+
const a2 = y.value.variables.length;
|
|
12
|
+
for (let t2 = 0; t2 < a2; t2++) if (y.value.variables[t2].uuid == e3.uuid) {
|
|
13
13
|
l2 = t2;
|
|
14
14
|
break;
|
|
15
15
|
}
|
|
16
16
|
return l2;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function U(e3) {
|
|
19
19
|
let l2 = -1;
|
|
20
|
-
e3 && (l2 =
|
|
21
|
-
const a2 = { uuid:
|
|
22
|
-
|
|
20
|
+
e3 && (l2 = x(e3));
|
|
21
|
+
const a2 = { uuid: g(), fieldName: "" };
|
|
22
|
+
y.value.variables.splice(l2 + 1, 0, a2);
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
let C;
|
|
25
|
+
y.value.variables || (y.value.variables = []), 0 == y.value.variables && U(null), a(() => {
|
|
26
|
+
C && clearTimeout(C);
|
|
27
|
+
});
|
|
28
|
+
const N = l([]);
|
|
29
|
+
let z = null, F = null;
|
|
30
|
+
return t(k2.configure, () => {
|
|
28
31
|
!function() {
|
|
29
|
-
if (
|
|
30
|
-
|
|
32
|
+
if (k2.configure.serviceFields == z && k2.configure.serviceDataField == F) return;
|
|
33
|
+
z = k2.configure.serviceFields, F = k2.configure.serviceDataField;
|
|
31
34
|
const e3 = [];
|
|
32
|
-
if (
|
|
33
|
-
const l2 =
|
|
34
|
-
for (let a2 of
|
|
35
|
+
if (z) {
|
|
36
|
+
const l2 = F || "";
|
|
37
|
+
for (let a2 of z) if (!l2 || a2.value.startsWith(l2 + ".")) {
|
|
35
38
|
const t2 = {};
|
|
36
39
|
if (Object.assign(t2, a2), l2) {
|
|
37
40
|
const e4 = a2.value.substring(l2.length + 1);
|
|
@@ -40,21 +43,21 @@ const _ = { style: { padding: "8px 0px 0px 0px" } }, V = { style: { float: "left
|
|
|
40
43
|
e3.push(t2);
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
|
-
|
|
46
|
+
N.value = e3;
|
|
44
47
|
}();
|
|
45
48
|
}, { immediate: true }), (e3, l2) => {
|
|
46
|
-
const a2 =
|
|
47
|
-
return
|
|
48
|
-
return a3 = l3, void ((
|
|
49
|
-
var a3,
|
|
50
|
-
} }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 1 }),
|
|
51
|
-
let l4 =
|
|
52
|
-
l4 > -1 && (
|
|
53
|
-
|
|
54
|
-
}, 0));
|
|
55
|
-
}(e4.row) }, { default:
|
|
49
|
+
const a2 = o("el-switch"), t2 = o("el-form-item"), g2 = o("el-col"), k3 = o("el-row"), z2 = o("el-option"), F2 = o("el-select"), T = o("el-table-column"), j = o("el-icon"), S = o("el-table"), D = o("el-collapse-item");
|
|
50
|
+
return u(), i(D, { title: "Click参数设置", name: "clickTrigger", class: "amb-design-attr-group-header" }, { default: r(() => [n("div", V, [c(k3, { style: { "margin-top": "4px" } }, { default: r(() => [c(g2, { span: 9 }, { default: r(() => [c(t2, { label: "选中效果" }, { default: r(() => [c(a2, { modelValue: y.value.selected, "onUpdate:modelValue": l2[0] || (l2[0] = (e4) => y.value.selected = e4) }, null, 8, ["modelValue"])]), _: 1 })]), _: 1 }), c(g2, { span: 12 }, { default: r(() => [c(t2, { label: "多选" }, { default: r(() => [c(a2, { modelValue: y.value.multiple, "onUpdate:modelValue": l2[1] || (l2[1] = (e4) => y.value.multiple = e4) }, null, 8, ["modelValue"])]), _: 1 })]), _: 1 })]), _: 1 }), c(S, { data: y.value.variables, style: { "margin-top": "-15px" } }, { default: r(() => [c(T, { prop: "fieldName", label: "字段", width: "90" }, { default: r((e4) => [c(F2, { size: "small", modelValue: e4.row.fieldName, "onUpdate:modelValue": (l3) => e4.row.fieldName = l3, title: e4.row.fieldName, filterable: "", "allow-create": "", clearable: "", placeholder: "请选择" }, { default: r(() => [(u(true), s(d, null, f(N.value, (e5) => (u(), i(z2, { key: e5.value, label: e5.label, value: e5.value }, { default: r(() => [n("span", h, m(e5.label), 1), n("span", w, m(e5.type), 1)]), _: 2 }, 1032, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue", "title"])]), _: 1 }), c(T, { prop: "variable", label: "设置到" }, { default: r((e4) => [c(_, { modelValue: e4.row.variable, paramTypes: "['data','page']", "onUpdate:modelValue": (l3) => {
|
|
51
|
+
return a3 = l3, void ((t3 = e4.row) && (t3.variable = a3));
|
|
52
|
+
var a3, t3;
|
|
53
|
+
} }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 1 }), c(T, { label: "操作", width: "60" }, { default: r((e4) => [c(j, { size: "14", style: { color: "#5893ef", cursor: "pointer", "font-weight": "bold", "margin-right": "8px" }, onClick: (l3) => U(e4.row) }, { default: r(() => [c(p(v))]), _: 2 }, 1032, ["onClick"]), c(j, { size: "14", style: { color: "#5893ef", cursor: "pointer" }, onClick: (l3) => function(e5) {
|
|
54
|
+
let l4 = x(e5);
|
|
55
|
+
l4 > -1 && (y.value.variables.splice(l4, 1), 0 == y.value.variables.length && (C = setTimeout(function() {
|
|
56
|
+
U(null);
|
|
57
|
+
}, 0)));
|
|
58
|
+
}(e4.row) }, { default: r(() => [c(p(b))]), _: 2 }, 1032, ["onClick"])]), _: 1 })]), _: 1 }, 8, ["data"])])]), _: 1 });
|
|
56
59
|
};
|
|
57
60
|
} });
|
|
58
61
|
export {
|
|
59
|
-
|
|
62
|
+
k as default
|
|
60
63
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as e, ref as l, computed as a,
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { usePageContextStore as
|
|
5
|
-
import { queryServiceReturnFields as
|
|
6
|
-
import
|
|
7
|
-
import { getUuidv4 as
|
|
8
|
-
import { ElMessageBox as
|
|
9
|
-
const
|
|
10
|
-
const
|
|
1
|
+
import { defineComponent as e, ref as l, computed as a, onUnmounted as t, resolveComponent as i, createBlock as r, openBlock as o, withCtx as n, createElementVNode as u, createVNode as s, createCommentVNode as c, unref as d, createElementBlock as p, Fragment as m, renderList as f, toDisplayString as g, createTextVNode as v, withDirectives as b, vShow as y } from "vue";
|
|
2
|
+
import x from "../../common/page-permission-select.vue.js";
|
|
3
|
+
import V from "../../form/common/data-origin-service-in.vue.js";
|
|
4
|
+
import { usePageContextStore as h } from "../../../../../../stores/page-store.js";
|
|
5
|
+
import { queryServiceReturnFields as _, queryServiceInfo as $ } from "../../../../utils/page-service-util.js";
|
|
6
|
+
import F from "../../common/common-variable-bind.vue.js";
|
|
7
|
+
import { getUuidv4 as O } from "../../../../utils/common-util.js";
|
|
8
|
+
import { ElMessageBox as S, ElMessage as j } from "element-plus";
|
|
9
|
+
const D = { style: { padding: "8px 0px 0px 0px" } }, T = { style: { float: "left" } }, w = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } }, U = { style: { float: "left" } }, k = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } }, z = { style: { width: "100%", "padding-left": "20px", "margin-bottom": "-15px" } }, C = e({ __name: "common-attr-data", props: { configure: { type: Object, required: true }, defaultType: { type: String, default: "" }, chartType: { type: String, default: "" } }, setup(e2) {
|
|
10
|
+
const C2 = e2, I = h().pageContext, L = l([]), Q = a(() => L.value.filter((e3) => "array" == e3.type || "any" == e3.type || !e3.type)), q = a(() => L.value.filter((e3) => {
|
|
11
11
|
if ("number" == e3.type || "any" == e3.type || !e3.type) {
|
|
12
|
-
const l2 =
|
|
12
|
+
const l2 = C2.configure.serviceDataField;
|
|
13
13
|
if (!l2 || e3.value.startsWith(l2 + ".")) {
|
|
14
14
|
let a2 = e3.value, t2 = e3.label;
|
|
15
15
|
return l2 && (a2 = a2.substring(l2.length + 1), t2 && (t2 = t2.replace(l2 + ".", ""))), e3.numValue = a2, e3.numLabel = t2, true;
|
|
@@ -17,54 +17,57 @@ const j = { style: { padding: "8px 0px 0px 0px" } }, D = { style: { float: "left
|
|
|
17
17
|
}
|
|
18
18
|
return false;
|
|
19
19
|
}));
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
let
|
|
24
|
-
function
|
|
25
|
-
const e3 =
|
|
26
|
-
if (
|
|
27
|
-
if (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (!
|
|
20
|
+
C2.configure.props.dataOrigin || (C2.configure.props.dataOrigin = {});
|
|
21
|
+
const B = C2.configure.props.dataOrigin;
|
|
22
|
+
B.service || (B.service = {});
|
|
23
|
+
let J = null;
|
|
24
|
+
function W() {
|
|
25
|
+
const e3 = B.service.id;
|
|
26
|
+
if (J != e3) {
|
|
27
|
+
if (J = e3, !e3) return C2.configure.serviceFields = [], L.value = [], void (C2.configure.serviceDataField = null);
|
|
28
|
+
_(B.service.simpleCode).then((e4) => {
|
|
29
|
+
C2.configure.serviceFields = e4, L.value = e4, function() {
|
|
30
|
+
if (!C2.configure.serviceDataField) return;
|
|
31
31
|
let e5 = false;
|
|
32
|
-
if (
|
|
33
|
-
for (let l2 of
|
|
32
|
+
if (L.value) {
|
|
33
|
+
for (let l2 of L.value) if (l2.value == C2.configure.serviceDataField) {
|
|
34
34
|
e5 = true;
|
|
35
35
|
break;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
e5 || (
|
|
38
|
+
e5 || (C2.configure.serviceDataField = null);
|
|
39
39
|
}();
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
43
|
+
function E(e3) {
|
|
44
|
+
C2.configure.props.dataOrigin.resultSet = e3, C2.configure.serviceDataField && e3.startsWith("${page.") && $(B.service.simpleCode).then((l2) => {
|
|
45
45
|
var _a;
|
|
46
|
-
const a2 = (l2.returnValues ? JSON.parse(l2.returnValues) : []).find((e4) => e4.name ==
|
|
47
|
-
a2 && "array" == a2.type && "object" == ((_a = a2.items[0]) == null ? void 0 : _a.type) &&
|
|
46
|
+
const a2 = (l2.returnValues ? JSON.parse(l2.returnValues) : []).find((e4) => e4.name == C2.configure.serviceDataField);
|
|
47
|
+
a2 && "array" == a2.type && "object" == ((_a = a2.items[0]) == null ? void 0 : _a.type) && S.confirm("是否需要将服务变量中的对象数组中的属性设值要页面变量中?", "提示", { confirmButtonText: "添加", cancelButtonText: "取消", type: "info" }).then(() => {
|
|
48
48
|
!function(e4, l3) {
|
|
49
49
|
var _a2;
|
|
50
|
-
const a3 = e4.replace("${page.", "").replace("}", ""), t2 =
|
|
50
|
+
const a3 = e4.replace("${page.", "").replace("}", ""), t2 = I.variables.findIndex((e5) => e5.name == a3), i2 = I.variables[t2];
|
|
51
51
|
i2 && "array" == i2.type && "object" == ((_a2 = i2.items[0]) == null ? void 0 : _a2.type) && (l3.items[0].items.forEach((e5) => {
|
|
52
|
-
-1 == i2.items[0].items.findIndex((l4) => l4.name == e5.name) && i2.items[0].items.push({ name: e5.name, type: e5.type, alias: e5.alias, code:
|
|
53
|
-
}),
|
|
52
|
+
-1 == i2.items[0].items.findIndex((l4) => l4.name == e5.name) && i2.items[0].items.push({ name: e5.name, type: e5.type, alias: e5.alias, code: O() });
|
|
53
|
+
}), j.success("添加成功"));
|
|
54
54
|
}(e3, a2);
|
|
55
55
|
}).catch(() => {
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, 10)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
const N = setTimeout(() => {
|
|
60
|
+
W(B.service.id);
|
|
61
|
+
}, 10);
|
|
62
|
+
return t(() => {
|
|
63
|
+
N && clearTimeout(N);
|
|
64
|
+
}), (l2, a2) => {
|
|
65
|
+
const t2 = i("el-form-item"), h2 = i("el-option"), _2 = i("el-select"), $2 = i("el-text"), O2 = i("el-switch"), S2 = i("el-radio"), j2 = i("QuestionFilled"), C3 = i("el-icon"), L2 = i("el-tooltip"), J2 = i("el-input"), N2 = i("el-radio-group"), R = i("el-collapse-item");
|
|
66
|
+
return o(), r(R, { title: "数据设置", name: "dataSet", class: "amb-design-attr-group-header" }, { default: n(() => [u("div", D, [s(t2, { label: "选择服务", class: "amb-design-attr-item" }, { default: n(() => [s(x, { pageDesign: d(I), rowObj: d(B).service, onlyService: "", "onUpdate:modelValue": a2[0] || (a2[0] = (e3, l3, a3, t3) => function(e4, l4, a4, t4) {
|
|
67
|
+
B.service.id, B.service.simpleCode = l4, B.service.id = t4, B.service.name = a4, W();
|
|
68
|
+
}(0, l3, a3, t3)) }, null, 8, ["pageDesign", "rowObj"])]), _: 1 }), s(t2, { label: "数据集", class: "amb-design-attr-item" }, { default: n(() => [s(_2, { modelValue: e2.configure.serviceDataField, "onUpdate:modelValue": a2[1] || (a2[1] = (l3) => e2.configure.serviceDataField = l3), filterable: "", clearable: "", placeholder: "请选择" }, { default: n(() => [(o(true), p(m, null, f(Q.value, (e3, l3) => (o(), r(h2, { key: l3, label: e3.label, value: e3.value }, { default: n(() => [u("span", T, g(e3.label), 1), u("span", w, g(e3.type), 1)]), _: 2 }, 1032, ["label", "value"]))), 128))]), _: 1 }, 8, ["modelValue"]), s($2, { type: "success", size: "small" }, { default: n(() => a2[7] || (a2[7] = [v("默认为根目录")])), _: 1 })]), _: 1 }), s(t2, { label: "结果设值到", class: "amb-design-attr-item" }, { default: n(() => [(o(), r(F, { key: e2.configure.uuid, modelValue: e2.configure.props.dataOrigin.resultSet, "onUpdate:modelValue": E }, null, 8, ["modelValue"]))]), _: 1 }), s(t2, { label: "立即查询", class: "amb-design-attr-item" }, { default: n(() => [s(O2, { modelValue: e2.configure.initializationQuery, "onUpdate:modelValue": a2[2] || (a2[2] = (l3) => e2.configure.initializationQuery = l3) }, null, 8, ["modelValue"])]), _: 1 }), s(t2, { label: "是否导出", class: "amb-design-attr-item" }, { default: n(() => [s(O2, { modelValue: e2.configure.exportable, "onUpdate:modelValue": a2[3] || (a2[3] = (l3) => e2.configure.exportable = l3) }, null, 8, ["modelValue"])]), _: 1 }), s(V, { ref: "dataOriginServiceInRef", dataOrigin: e2.configure.props.dataOrigin }, null, 8, ["dataOrigin"]), "pie" == e2.chartType ? (o(), r(N2, { key: 0, modelValue: e2.configure.props.yaxisSource, "onUpdate:modelValue": a2[6] || (a2[6] = (l3) => e2.configure.props.yaxisSource = l3) }, { default: n(() => [b(s(t2, { class: "amb-design-attr-item" }, { label: n(() => [s(S2, { value: "variable" }, { default: n(() => a2[8] || (a2[8] = [v("数据字段")])), _: 1 })]), default: n(() => [s(_2, { size: "small", modelValue: e2.configure.props.yaxisField, "onUpdate:modelValue": a2[4] || (a2[4] = (l3) => e2.configure.props.yaxisField = l3), disabled: "variable" != e2.configure.props.yaxisSource, title: e2.configure.props.yaxisField, style: { width: "160px" }, filterable: "", "allow-create": "", clearable: "", placeholder: "请选择" }, { default: n(() => [(o(true), p(m, null, f(q.value, (e3) => (o(), r(h2, { key: e3.numValue, label: e3.numLabel, value: e3.numValue }, { default: n(() => [u("span", U, g(e3.numLabel), 1), u("span", k, g(e3.type), 1)]), _: 2 }, 1032, ["label", "value"]))), 128))]), _: 1 }, 8, ["modelValue", "disabled", "title"])]), _: 1 }, 512), [[y, "pie" == e2.chartType]]), b(s(S2, { value: "formula", style: { "margin-top": "25px" } }, { default: n(() => [a2[10] || (a2[10] = v("计算公式 ")), s(L2, { class: "box-item", effect: "dark", placement: "top-start" }, { content: n(() => a2[9] || (a2[9] = [v("字段值: ${row.字段名}"), u("br", null, null, -1), v(" 最大值: ${max.字段名}"), u("br", null, null, -1), v(" 求和: ${sum.字段名}"), u("br", null, null, -1), v(" 均值: ${avg.字段名}"), u("br", null, null, -1), v(" 最小值: ${min.字段名}"), u("br", null, null, -1), v(" 最大值: ${max.字段名}"), u("br", null, null, -1), v(" 累计值: ${add.字段名}"), u("br", null, null, -1), v(" 其他可用变量如${page},${data},${task},${request},${context},${system}"), u("br", null, null, -1)])), default: n(() => [s(C3, { size: "16" }, { default: n(() => [s(j2)]), _: 1 })]), _: 1 })]), _: 1 }, 512), [[y, "pie" == e2.chartType]]), b(u("div", z, [s(J2, { modelValue: e2.configure.props.formula, "onUpdate:modelValue": a2[5] || (a2[5] = (l3) => e2.configure.props.formula = l3), disabled: "formula" != e2.configure.props.yaxisSource, rows: 4, type: "textarea", placeholder: "支持三元表达式,支持JS函数,如 return ${row.字段名}/${sum.字段名}*100" }, null, 8, ["modelValue", "disabled"])], 512), [[y, "pie" == e2.chartType]])]), _: 1 }, 8, ["modelValue"])) : c("", true)])]), _: 1 });
|
|
66
69
|
};
|
|
67
70
|
} });
|
|
68
71
|
export {
|
|
69
|
-
|
|
72
|
+
C as default
|
|
70
73
|
};
|