super-page-runtime 2.3.0-tmp2 → 2.3.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/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js
CHANGED
|
@@ -14,50 +14,50 @@ import "../../../../utils/page-store.js";
|
|
|
14
14
|
import "agilebuilder-ui/src/utils/i18n-util";
|
|
15
15
|
import "vue-i18n";
|
|
16
16
|
import "../../../../utils/events/print-label.js";
|
|
17
|
-
const
|
|
18
|
-
} } }, setup(e2, { expose:
|
|
19
|
-
const
|
|
17
|
+
const b = { style: { overflow: "auto", height: "calc(100vh - 140px)" }, ref: "dialogBody" }, O = { class: "dialog-footer" }, x = e({ __name: "common-homepage-search", props: { configure: { type: Object, required: true }, pageContext: { type: Object, default: () => {
|
|
18
|
+
} } }, setup(e2, { expose: x2 }) {
|
|
19
|
+
const N = e2, _ = t(false), J = t({}), j = t(0);
|
|
20
20
|
let I;
|
|
21
21
|
o(() => {
|
|
22
22
|
I = setTimeout(() => {
|
|
23
|
-
J.value = JSON.parse(JSON.stringify(
|
|
23
|
+
J.value = JSON.parse(JSON.stringify(N.pageContext.entity));
|
|
24
24
|
}, 200);
|
|
25
25
|
}), i(() => {
|
|
26
26
|
I && clearTimeout(I);
|
|
27
27
|
});
|
|
28
28
|
const k = t([]), w = () => {
|
|
29
|
-
|
|
29
|
+
_.value = false;
|
|
30
30
|
}, T = () => {
|
|
31
31
|
const e3 = y.service({ lock: true, text: "Loading", background: "rgba(0, 0, 0, 0.7)" });
|
|
32
|
-
v(
|
|
33
|
-
|
|
32
|
+
v(N.pageContext, N.pageContext.initChartServiceConfigs, null, false).then(() => {
|
|
33
|
+
_.value = false;
|
|
34
34
|
}).finally(() => {
|
|
35
|
-
|
|
35
|
+
_.value = false, e3.close();
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
function H() {
|
|
39
|
-
|
|
39
|
+
N.pageContext.entity = JSON.parse(JSON.stringify(J.value)), j.value++;
|
|
40
40
|
}
|
|
41
41
|
function A() {
|
|
42
42
|
const e3 = {};
|
|
43
|
-
|
|
43
|
+
N.pageContext.variables.forEach((t3) => {
|
|
44
44
|
const o3 = "${page." + t3.name + "}";
|
|
45
|
-
e3[o3] = h(
|
|
45
|
+
e3[o3] = h(N.pageContext.entity, o3, null);
|
|
46
46
|
});
|
|
47
47
|
let t2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS"), o2 = {};
|
|
48
|
-
t2 && (o2 = JSON.parse(t2)), o2[
|
|
48
|
+
t2 && (o2 = JSON.parse(t2)), o2[N.configure.homeChartSettingUserId] = e3;
|
|
49
49
|
const i2 = JSON.stringify(e3);
|
|
50
|
-
window.localStorage.setItem("HOME_MY_CHARTS_CONDITIONS", JSON.stringify(o2)), J.value = JSON.parse(JSON.stringify(
|
|
50
|
+
window.localStorage.setItem("HOME_MY_CHARTS_CONDITIONS", JSON.stringify(o2)), J.value = JSON.parse(JSON.stringify(N.pageContext.entity)), S.post(window.$vueApp.config.globalProperties.baseAPI + "/component/home-chart-settings/search-conditions", { id: N.configure.homeChartSettingUserId, searchConditionsJson: i2 }).then((e4) => {
|
|
51
51
|
C.success("保存成功"), T();
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
return
|
|
55
|
-
|
|
54
|
+
return x2({ openSearch: () => {
|
|
55
|
+
_.value = true, k.value = N.configure.pushHomepage.searchConditions;
|
|
56
56
|
} }), (t2, o2) => {
|
|
57
57
|
const i2 = l("el-empty"), v2 = l("el-form"), h2 = l("el-button"), y2 = l("el-dialog");
|
|
58
|
-
return r(), a(y2, { modelValue:
|
|
58
|
+
return r(), a(y2, { modelValue: _.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => _.value = e3), title: "筛选", close: w, "append-to-body": "", fullscreen: "", top: "40vh", append: "", width: "70%", draggable: "" }, { default: n(() => [u("div", b, [k.value && 0 !== k.value.length ? c("", true) : (r(), a(i2, { key: 0, description: "未设置筛选条件", "image-size": 50 })), (r(), a(v2, { key: j.value }, { default: n(() => [(r(true), g(m, null, d(k.value, (t3) => (r(), a(f, { key: t3.uuid, configure: t3, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"]))), 128))]), _: 1 }))], 512)]), footer: n(() => [u("div", O, [s(h2, { type: "primary", onClick: T }, { default: n(() => o2[1] || (o2[1] = [p(" 确定 ")])), _: 1 }), s(h2, { type: "default", onClick: H }, { default: n(() => o2[2] || (o2[2] = [p("重置")])), _: 1 }), s(h2, { type: "primary", onClick: A }, { default: n(() => o2[3] || (o2[3] = [p(" 保存为默认条件 ")])), _: 1 })])]), _: 1 }, 8, ["modelValue"]);
|
|
59
59
|
};
|
|
60
60
|
} });
|
|
61
61
|
export {
|
|
62
|
-
|
|
62
|
+
x as default
|
|
63
63
|
};
|
|
@@ -2,9 +2,9 @@ import { defineComponent as e, ref as t, computed as a, onMounted as n, nextTick
|
|
|
2
2
|
import T from "../../../../../../assets/folder.png.js";
|
|
3
3
|
import I from "../../../../../../assets/file.png.js";
|
|
4
4
|
import { getFormModelFields as V } from "../../../../utils/page-init-util.js";
|
|
5
|
-
import { setVariableValue as b, getVariableValue as
|
|
6
|
-
import { getMenuTreeData as
|
|
7
|
-
import { handleAfterInitEvent as
|
|
5
|
+
import { setVariableValue as b, getVariableValue as L } from "../../../../utils/page-helper-util.js";
|
|
6
|
+
import { getMenuTreeData as M, createTreeNode as w, updateTreeNode as E, deleteNode as K } from "../../../../utils/tree-utils.js";
|
|
7
|
+
import { handleAfterInitEvent as _, handleFormEvent as j } from "../../../../utils/events/event-util.js";
|
|
8
8
|
import { ElMessageBox as S, ElMessage as z } from "element-plus";
|
|
9
9
|
import { checkPermission as B } from "agilebuilder-ui/src/utils/permission";
|
|
10
10
|
const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, class: "item-row" }, D = { class: "item-side" }, H = { key: 1, class: "item-side", style: { display: "flex", "align-items": "center" } }, O = ["onClick"], U = e({ __name: "tree-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: U2 }) {
|
|
@@ -18,15 +18,15 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
|
|
|
18
18
|
else q.value.push(e3);
|
|
19
19
|
}) : q.value = X.configure.props.contextMenus);
|
|
20
20
|
let F = V(X.pageContext, X.configure);
|
|
21
|
-
const G = a({ get: () =>
|
|
21
|
+
const G = a({ get: () => L(Y, F), set(e3) {
|
|
22
22
|
b(Y, F, e3);
|
|
23
23
|
} }), J = t(!!((_c = (_b = X.configure.props) == null ? void 0 : _b.base) == null ? void 0 : _c.lazy)), Q = X.configure.runtime ? X.configure.runtime : {}, Z = Q.style, ee = Q.class, te = t(), ae = t(Q.props ? Q.props : {}), ne = t({ id: "nodeId", label: "name", children: "children", isLeaf: "leaf", disabled: "disabled", nodeType: "nodeType", iconType: "iconType", iconValue: "iconValue" }), le = t(false), oe = t([]), ue = t(null), de = t(""), ie = t(false), se = t(""), re = t(""), ce = t("");
|
|
24
24
|
n(() => {
|
|
25
25
|
l(() => {
|
|
26
26
|
const e3 = G.value;
|
|
27
|
-
|
|
27
|
+
_(e3, X.pageContext, X.configure, { componentRef: te.value, value: e3, entity: X.pageContext.entity.data, pageData: X.pageContext.entity.page });
|
|
28
28
|
});
|
|
29
|
-
}), J.value ? le.value = true :
|
|
29
|
+
}), J.value ? le.value = true : M(X.pageContext, X.configure).then((e3) => {
|
|
30
30
|
oe.value = e3, le.value = true;
|
|
31
31
|
}), o(de, (e3) => {
|
|
32
32
|
ie.value = true, te.value.filter(e3);
|
|
@@ -39,11 +39,11 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
|
|
|
39
39
|
let a2 = "0";
|
|
40
40
|
a2 = 0 === e3.level ? "0" : e3.data.nodeId, function(e4, t3, a3) {
|
|
41
41
|
const n2 = { parentNodeId: e4, data: t3.data, searchValue: de, isSearch: ie.value };
|
|
42
|
-
|
|
42
|
+
M(X.pageContext, X.configure, e4, t3, n2).then((n3) => {
|
|
43
43
|
if (ie.value = false, a3(n3), "0" === e4) {
|
|
44
44
|
!function(e5, t4) {
|
|
45
45
|
const a4 = { parentNodeId: e5, data: t4.data, searchValue: de, isSearch: ie.value };
|
|
46
|
-
|
|
46
|
+
M(X.pageContext, X.configure, e5, t4, a4).then((t5) => {
|
|
47
47
|
ie.value = false, te.value.updateKeyChildren(e5, t5), te.value.store.nodesMap[e5] && (te.value.store.nodesMap[e5].expanded = true);
|
|
48
48
|
});
|
|
49
49
|
}(n3[0].nodeId, t3);
|
|
@@ -75,12 +75,12 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
|
|
|
75
75
|
}, xe = () => ({ nodeId: "primary" + (/* @__PURE__ */ new Date()).getTime(), name: "新增节点", disabled: false, iconType: "custom", isLeaf: true });
|
|
76
76
|
function ke(e3) {
|
|
77
77
|
e3.tipMessage ? S.confirm(e3.tipMessage, { confirmButtonText: "确定", cancelButtonText: "取消", type: "error" }).then(() => {
|
|
78
|
-
|
|
78
|
+
K(ge.value, X.configure, X.pageContext).then(() => {
|
|
79
79
|
z.success("删除成功!"), Ne(), ge.value = null;
|
|
80
80
|
});
|
|
81
81
|
}).catch(() => {
|
|
82
82
|
ge.value = null;
|
|
83
|
-
}) :
|
|
83
|
+
}) : K(ge.value, X.configure, X.pageContext).then(() => {
|
|
84
84
|
z.success("删除成功!"), Ne(), ge.value = null;
|
|
85
85
|
});
|
|
86
86
|
}
|
|
@@ -93,7 +93,7 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
|
|
|
93
93
|
}, expandNode: function(e3) {
|
|
94
94
|
e3.loaded = false, e3.expand();
|
|
95
95
|
}, loadTreeNodes: function() {
|
|
96
|
-
|
|
96
|
+
M(X.pageContext, X.configure).then((e3) => {
|
|
97
97
|
ie.value = false, oe.value = e3;
|
|
98
98
|
});
|
|
99
99
|
}, getNode: function(e3) {
|
|
@@ -108,14 +108,14 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
|
|
|
108
108
|
var _a2;
|
|
109
109
|
const a2 = u("el-input"), n2 = u("el-button"), l2 = u("SuperIcon"), o2 = u("el-tree");
|
|
110
110
|
return i(), d("div", { class: s(["amb-tree-runtime-main", r(ee)]) }, [ae.value.filter ? (i(), c(a2, { key: 0, modelValue: de.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => de.value = e4), style: { width: "100%" }, placeholder: "请输入查询条件" }, null, 8, ["modelValue"])) : p("", true), le.value ? (i(), c(o2, { key: 1, ref_key: "menuTreeRef", ref: te, style: f(r(Z)), load: fe, data: oe.value, "node-key": "nodeId", props: ne.value, "default-expand-all": ae.value.defaultExpandAll, "expand-on-click-node": ae.value.expandOnClickNode, indent: ae.value.retractWidth ? ae.value.retractWidth : 18, accordion: ae.value.accordion, "show-checkbox": !!ae.value.showCheckbox, "highlight-current": "", lazy: J.value, "filter-node-method": pe, onNodeClick: ve, onNodeContextmenu: me }, { default: g(({ node: o3, data: u2 }) => [u2.nodeId === se.value ? (i(), d("div", P, [m(a2, { modelValue: ce.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => ce.value = e4), size: "small" }, null, 8, ["modelValue"]), h("div", null, [m(n2, { type: "primary", link: "", onClick: (e4) => ((e5) => {
|
|
111
|
-
"" !== ce.value ? (e5.data.name = ce.value, re.value && e5.data.nodeId === re.value ?
|
|
111
|
+
"" !== ce.value ? (e5.data.name = ce.value, re.value && e5.data.nodeId === re.value ? w(e5, X.configure, X.pageContext).then((t3) => {
|
|
112
112
|
ye(e5, t3.currentNode), Ce(), z.success("保存成功!");
|
|
113
|
-
}) :
|
|
113
|
+
}) : E(e5, X.configure, X.pageContext).then((t3) => {
|
|
114
114
|
ye(e5, t3.currentNode), Ce(), z.success("保存成功!");
|
|
115
115
|
})) : z.warning("请输入节点名称");
|
|
116
|
-
})(o3) }, { default: g(() => t2[2] || (t2[2] = [y(" 保存 ")])), _: 2
|
|
116
|
+
})(o3) }, { default: g(() => t2[2] || (t2[2] = [y(" 保存 ")])), _: 2 }, 1032, ["onClick"]), m(n2, { style: { "margin-left": "4px" }, type: "primary", link: "", onClick: (t3) => ((e4) => {
|
|
117
117
|
re.value && e4.data.nodeId === re.value && te.value.remove(e4), Ce();
|
|
118
|
-
})(o3, e3.configure, e3.pageContext) }, { default: g(() => t2[3] || (t2[3] = [y(" 撤销 ")])), _: 2
|
|
118
|
+
})(o3, e3.configure, e3.pageContext) }, { default: g(() => t2[3] || (t2[3] = [y(" 撤销 ")])), _: 2 }, 1032, ["onClick"])])])) : (i(), d("span", { key: 1, title: o3.label, class: "ellipsis" }, [u2.iconValue ? (i(), c(l2, { key: 0, iconType: u2.iconType, iconValue: u2.iconValue }, null, 8, ["iconType", "iconValue"])) : ae.value.iconValue ? (i(), c(l2, { key: 1, iconType: ae.value.iconType, iconValue: ae.value.iconValue }, null, 8, ["iconType", "iconValue"])) : (i(), d(C, { key: 2 }, [u2.isLeaf ? (i(), d("div", H, [t2[5] || (t2[5] = h("img", { src: I, class: "file" }, null, -1)), h("span", null, x(u2.name), 1)])) : (i(), d("div", R, [h("div", D, [t2[4] || (t2[4] = h("img", { src: T, class: "file" }, null, -1)), h("span", null, x(u2.name), 1)])]))], 64))], 8, W))]), _: 1 }, 8, ["style", "data", "props", "default-expand-all", "expand-on-click-node", "indent", "accordion", "show-checkbox", "lazy"])) : p("", true), v(h("div", null, [h("ul", { ref_key: "contxtMenuRef", ref: $, class: "context-menu" }, [(i(true), d(C, null, k(q.value, (e4, t3) => (i(), d("li", { key: t3, tabindex: "-1", class: "menu__item", onClick: (t4) => ((e5) => {
|
|
119
119
|
if (ge.value && "standard" === e5.type && e5.standardEvent) if ("edit" === e5.standardEvent) se.value = ge.value.data.nodeId, ce.value = ge.value.data.name;
|
|
120
120
|
else if ("delete" === e5.standardEvent) ge.value.childNodes && ge.value.childNodes.length > 0 && e5.deleteParentNodeTip ? (e5.deleteParentNodeTipMessage || (e5.deleteParentNodeTipMessage = "当前节点下有子节点,确认删除?"), S.confirm(e5.deleteParentNodeTipMessage, { confirmButtonText: "确定", cancelButtonText: "取消", type: "error" }).then(() => {
|
|
121
121
|
ke(e5);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.3.0
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "AgileBuilder super page runtime",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/es/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
49
49
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
50
50
|
"@vue/test-utils": "^2.4.4",
|
|
51
|
-
"agilebuilder-ui": "1.1.36
|
|
51
|
+
"agilebuilder-ui": "1.1.36",
|
|
52
52
|
"axios": "^1.6.8",
|
|
53
53
|
"cypress": "^13.6.6",
|
|
54
54
|
"element-plus": "^2.6.1",
|