@epxing/business 5.3.0-beta.2 → 5.3.0-beta.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.
- package/API.md +115 -111
- package/README.md +44 -44
- package/dist/src/base/AiSkillEditor.js +1 -1
- package/dist/src/base/AiSkillEditor.vue.js +2 -0
- package/dist/src/base/AppConfigFormItem.js +1 -3
- package/dist/src/base/AppConfigFormItem.vue.js +210 -85
- package/dist/src/base/CommonFieldList.js +1 -1
- package/dist/src/base/CommonFieldList.vue.js +2 -1
- package/dist/src/base/ConfigModuleIndex.js +38 -1
- package/dist/src/base/ManageAppNav.js +1 -1
- package/dist/src/base/ManageMenu.js +1 -1
- package/dist/src/base/RoleBindTrace.js +253 -0
- package/dist/src/base/RoleGroupManage.js +1037 -0
- package/dist/src/base/ServiceMenu.js +7 -6
- package/dist/src/components/AiList.js +1278 -3
- package/dist/src/components/EntityCheckboxFind.vue.js +14 -10
- package/dist/src/components/EntityRightFormItem.js +1 -5
- package/dist/src/components/EntityRightFormItem.vue.js +3 -1
- package/dist/src/components/EntitySystemEr.js +492 -0
- package/dist/src/components/HallNav.vue.js +7 -36
- package/dist/src/components/IconFontLibrary.js +22 -1
- package/dist/src/components/IconFontList.js +21 -1
- package/dist/src/components/PrintFormList.js +2 -1
- package/dist/src/components/PrintFormList.vue.js +3 -1
- package/dist/src/components/WikiWorkbench.js +153 -129
- package/dist/src/components/authorization/AuthorizationInterface.js +3 -1
- package/dist/src/components/custom-bpmn/PropertiesView.js +1991 -1942
- package/dist/src/components/icon-gallery/IconGallery.js +193 -0
- package/dist/src/components/icon-gallery/mixin.js +150 -0
- package/dist/src/components/wiki-workbench/WikiIntake.js +86 -93
- package/dist/src/components/wiki-workbench/WikiIntake.vue.js +153 -73
- package/dist/src/index.js +26 -20
- package/dist/src/public-components.js +16 -14
- package/dist/src/route-components.js +5 -5
- package/dist/src/system.component.index.js +1 -1
- package/dist/src/system.component.js +8 -3
- package/dist/src/system.component.lazy.js +1 -1
- package/dist/src/views/Add.js +1 -1
- package/dist/src/views/Add.vue.js +8 -3
- package/dist/src/views/AiToolManager.js +792 -317
- package/dist/src/views/App.js +3 -45
- package/dist/src/views/AppRoleSelect.js +3 -230
- package/dist/src/views/Error.js +3 -207
- package/dist/src/views/ExcelDesign.js +326 -316
- package/dist/src/views/JvmMemoryMonitor.js +463 -0
- package/dist/src/views/Module.js +3 -170
- package/dist/src/views/WikiBinding.js +88 -25
- package/dist/style.css +2867 -1487
- package/package.json +12 -6
- package/src/base/AiSkillEditor.vue +2 -0
- package/src/base/AppConfigFormItem.vue +211 -145
- package/src/base/CommonFieldList.vue +9 -6
- package/src/base/ConfigModuleIndex.vue +37 -1
- package/src/base/ManageAppNav.vue +1188 -1188
- package/src/base/ManageMenu.vue +933 -933
- package/src/base/RoleBindTrace.vue +364 -0
- package/src/base/RoleGroupManage.vue +1160 -0
- package/src/base/ServiceMenu.vue +6 -5
- package/src/components/AiList.vue +439 -113
- package/src/components/EntityCheckboxFind.vue +12 -8
- package/src/components/EntityRightFormItem.vue +9 -10
- package/src/components/EntitySystemEr.vue +517 -0
- package/src/components/HallNav.vue +6 -33
- package/src/components/IconFontLibrary.vue +27 -60
- package/src/components/IconFontList.vue +13 -64
- package/src/components/PrintFormList.vue +33 -27
- package/src/components/WikiWorkbench.vue +90 -60
- package/src/components/authorization/AuthorizationInterface.vue +2 -0
- package/src/components/custom-bpmn/CustomPalette.js +1 -1
- package/src/components/custom-bpmn/CustomRenderer.js +1 -1
- package/src/components/custom-bpmn/PropertiesView.vue +35 -4
- package/src/components/custom-bpmn/index.js +1 -1
- package/src/components/icon-gallery/IconGallery.vue +130 -0
- package/src/components/icon-gallery/mixin.jsx +109 -0
- package/src/components/wiki-workbench/WikiIntake.vue +178 -104
- package/src/index.js +24 -20
- package/src/public-components.js +1 -0
- package/src/route-components.js +4 -4
- package/src/system.component.index.js +1 -1
- package/src/views/Add.vue +8 -5
- package/src/views/AiToolManager.vue +326 -4
- package/src/views/App.vue +4 -53
- package/src/views/AppRoleSelect.vue +4 -334
- package/src/views/Error.vue +4 -63
- package/src/views/ExcelDesign.vue +24 -7
- package/src/views/JvmMemoryMonitor.vue +284 -0
- package/src/views/Module.vue +4 -210
- package/src/views/WikiBinding.vue +42 -0
- package/types/app.d.ts +1 -0
- package/types/dept-find.d.ts +1 -1
- package/types/index.d.ts +15 -14
- package/types/popup.d.ts +2 -2
- package/types/route-components.d.ts +1 -1
- package/types/user-find.d.ts +1 -1
- package/dist/assets/role_select-DTqRlFNz.webp +0 -0
- package/dist/src/components/AiList.vue.js +0 -93
- package/dist/src/components/IconFontLibrary.vue.js +0 -67
- package/dist/src/components/IconFontList.vue.js +0 -79
|
@@ -38,17 +38,21 @@ const _sfc_main = {
|
|
|
38
38
|
};
|
|
39
39
|
},
|
|
40
40
|
watch: {
|
|
41
|
-
checked
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (
|
|
49
|
-
this.change(
|
|
41
|
+
checked: {
|
|
42
|
+
// 兼容选中数组的原地变更,确保角色选择结果同步回表单。
|
|
43
|
+
deep: true,
|
|
44
|
+
handler(v) {
|
|
45
|
+
const result = v.map((item) => ({
|
|
46
|
+
id: item
|
|
47
|
+
}));
|
|
48
|
+
if (result.length === 0) {
|
|
49
|
+
this.change({});
|
|
50
50
|
} else {
|
|
51
|
-
this.
|
|
51
|
+
if (this.multiple) {
|
|
52
|
+
this.change(result, v);
|
|
53
|
+
} else {
|
|
54
|
+
this.change(result[0], v[0]);
|
|
55
|
+
}
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
},
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import '../../style.css';
|
|
2
2
|
import _sfc_main from "./EntityRightFormItem.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
/* empty css */
|
|
5
|
-
/* empty css */
|
|
6
|
-
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
-
const EntityRightFormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7734a51f"]]);
|
|
8
4
|
export {
|
|
9
|
-
|
|
5
|
+
_sfc_main as default
|
|
10
6
|
};
|
|
@@ -251,7 +251,9 @@ const _sfc_main = {
|
|
|
251
251
|
},
|
|
252
252
|
renderForm() {
|
|
253
253
|
if (this.fieldsConfigs.length > 0) {
|
|
254
|
-
return createVNode("div",
|
|
254
|
+
return createVNode("div", {
|
|
255
|
+
"class": "epx-entity-right-form-item"
|
|
256
|
+
}, [createVNode(resolveComponent("epx-table-form"), {
|
|
255
257
|
"class": "form-content",
|
|
256
258
|
"ref": "form",
|
|
257
259
|
"metaId": this.$metaId,
|
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
import '../../style.css';
|
|
2
|
+
import component from "@epxing/core/src/mixins/component";
|
|
3
|
+
import { Graph } from "@antv/x6";
|
|
4
|
+
import { Export } from "@antv/x6-plugin-export";
|
|
5
|
+
import Er from "./entity-relation-diagram/Er.js";
|
|
6
|
+
import { resolveComponent, resolveDirective, openBlock, createBlock, withCtx, createVNode, createElementVNode, withKeys, createTextVNode, toDisplayString, withDirectives, createElementBlock, Fragment, renderList } from "vue";
|
|
7
|
+
/* empty css */
|
|
8
|
+
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
9
|
+
const RelationDiagram = {
|
|
10
|
+
extends: Er,
|
|
11
|
+
props: ["currentQuery"]
|
|
12
|
+
};
|
|
13
|
+
const RELATION_ONE_MOST = "1";
|
|
14
|
+
Graph.registerNode(
|
|
15
|
+
"er-system-node",
|
|
16
|
+
{
|
|
17
|
+
inherit: "rect",
|
|
18
|
+
width: 180,
|
|
19
|
+
height: 56,
|
|
20
|
+
markup: [
|
|
21
|
+
{
|
|
22
|
+
tagName: "rect",
|
|
23
|
+
selector: "body"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
tagName: "text",
|
|
27
|
+
selector: "name"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
tagName: "text",
|
|
31
|
+
selector: "code"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
attrs: {
|
|
35
|
+
body: {
|
|
36
|
+
width: 180,
|
|
37
|
+
height: 56,
|
|
38
|
+
rx: 6,
|
|
39
|
+
ry: 6,
|
|
40
|
+
fill: "#1461E4",
|
|
41
|
+
stroke: "#76A8FF",
|
|
42
|
+
strokeWidth: 1,
|
|
43
|
+
cursor: "pointer"
|
|
44
|
+
},
|
|
45
|
+
name: {
|
|
46
|
+
fontSize: 14,
|
|
47
|
+
fill: "#fff",
|
|
48
|
+
ref: "body",
|
|
49
|
+
refX: "50%",
|
|
50
|
+
refY: 20,
|
|
51
|
+
textAnchor: "middle",
|
|
52
|
+
textVerticalAnchor: "middle",
|
|
53
|
+
textWrap: {
|
|
54
|
+
width: 160,
|
|
55
|
+
ellipsis: true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
code: {
|
|
59
|
+
fontSize: 11,
|
|
60
|
+
fill: "rgba(255, 255, 255, 0.75)",
|
|
61
|
+
ref: "body",
|
|
62
|
+
refX: "50%",
|
|
63
|
+
refY: 40,
|
|
64
|
+
textAnchor: "middle",
|
|
65
|
+
textVerticalAnchor: "middle",
|
|
66
|
+
textWrap: {
|
|
67
|
+
width: 160,
|
|
68
|
+
ellipsis: true
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
true
|
|
74
|
+
);
|
|
75
|
+
const _sfc_main = {
|
|
76
|
+
name: "epx-entity-system-er",
|
|
77
|
+
mixins: [component],
|
|
78
|
+
components: { RelationDiagram },
|
|
79
|
+
data() {
|
|
80
|
+
return {
|
|
81
|
+
relation: {},
|
|
82
|
+
keyword: "",
|
|
83
|
+
// 关系类型过滤:勾选后仅显示对应类型的关系,全不勾选显示全部
|
|
84
|
+
relationTypes: [],
|
|
85
|
+
loading: false,
|
|
86
|
+
// 当前标签;panorama 为固定全景图,其余为页内打开的对象关系图
|
|
87
|
+
activeTab: "panorama",
|
|
88
|
+
relationTabs: []
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
computed: {
|
|
92
|
+
nodes() {
|
|
93
|
+
return this.relation.NODES || [];
|
|
94
|
+
},
|
|
95
|
+
edges() {
|
|
96
|
+
return this.relation.EDGES || [];
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
methods: {
|
|
100
|
+
getMetaRelation() {
|
|
101
|
+
this.loading = true;
|
|
102
|
+
this.$http.get({
|
|
103
|
+
action: "metaSystemER",
|
|
104
|
+
entityId: "FM_ENTITY"
|
|
105
|
+
}).then((data) => {
|
|
106
|
+
this.loading = false;
|
|
107
|
+
this.relation = data || {};
|
|
108
|
+
this.renderGraph();
|
|
109
|
+
}).catch(() => {
|
|
110
|
+
this.loading = false;
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
getVisibleEdges() {
|
|
114
|
+
if (this.relationTypes.length === 0 || this.relationTypes.length === 2) {
|
|
115
|
+
return this.edges;
|
|
116
|
+
}
|
|
117
|
+
const types = this.relationTypes;
|
|
118
|
+
return this.edges.filter((edge) => (edge.SORTS || []).some((sort) => types.includes(sort)));
|
|
119
|
+
},
|
|
120
|
+
// 轻量力导布局:环形初始布点,库仑斥力 + 弹簧引力 + 向心力迭代收敛,结果确定性可复现
|
|
121
|
+
forceLayout(nodes, edges) {
|
|
122
|
+
const pos = {};
|
|
123
|
+
const count = nodes.length;
|
|
124
|
+
if (count === 0) return pos;
|
|
125
|
+
const radius = Math.max(300, count * 8);
|
|
126
|
+
nodes.forEach((node, i) => {
|
|
127
|
+
const angle = 2 * Math.PI * i / count;
|
|
128
|
+
pos[node.META_ID] = {
|
|
129
|
+
x: radius * Math.cos(angle),
|
|
130
|
+
y: radius * Math.sin(angle),
|
|
131
|
+
vx: 0,
|
|
132
|
+
vy: 0
|
|
133
|
+
};
|
|
134
|
+
});
|
|
135
|
+
const ids = nodes.map((node) => node.META_ID);
|
|
136
|
+
const pairs = edges.map((edge) => [edge.SOURCE, edge.TARGET]);
|
|
137
|
+
const REPULSION = 6e4;
|
|
138
|
+
const SPRING_LEN = 240;
|
|
139
|
+
const SPRING = 0.03;
|
|
140
|
+
const CENTER_PULL = 0.03;
|
|
141
|
+
const MAX_STEP = 30;
|
|
142
|
+
const ITERATIONS = 200;
|
|
143
|
+
for (let iter = 0; iter < ITERATIONS; iter++) {
|
|
144
|
+
for (let i = 0; i < ids.length; i++) {
|
|
145
|
+
for (let j = i + 1; j < ids.length; j++) {
|
|
146
|
+
const a = pos[ids[i]];
|
|
147
|
+
const b = pos[ids[j]];
|
|
148
|
+
let dx = a.x - b.x;
|
|
149
|
+
let dy = a.y - b.y;
|
|
150
|
+
let dist2 = dx * dx + dy * dy;
|
|
151
|
+
if (dist2 < 1) {
|
|
152
|
+
dx = i % 7 - 3.5;
|
|
153
|
+
dy = j % 7 - 3.5;
|
|
154
|
+
dist2 = dx * dx + dy * dy;
|
|
155
|
+
}
|
|
156
|
+
const dist = Math.sqrt(dist2);
|
|
157
|
+
const force = REPULSION / dist2;
|
|
158
|
+
const fx = dx / dist * force;
|
|
159
|
+
const fy = dy / dist * force;
|
|
160
|
+
a.vx += fx;
|
|
161
|
+
a.vy += fy;
|
|
162
|
+
b.vx -= fx;
|
|
163
|
+
b.vy -= fy;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
pairs.forEach((pair) => {
|
|
167
|
+
if (pair[0] === pair[1]) return;
|
|
168
|
+
const a = pos[pair[0]];
|
|
169
|
+
const b = pos[pair[1]];
|
|
170
|
+
if (!a || !b) return;
|
|
171
|
+
const dx = a.x - b.x;
|
|
172
|
+
const dy = a.y - b.y;
|
|
173
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
174
|
+
const force = SPRING * (dist - SPRING_LEN);
|
|
175
|
+
const fx = dx / dist * force;
|
|
176
|
+
const fy = dy / dist * force;
|
|
177
|
+
a.vx -= fx;
|
|
178
|
+
a.vy -= fy;
|
|
179
|
+
b.vx += fx;
|
|
180
|
+
b.vy += fy;
|
|
181
|
+
});
|
|
182
|
+
ids.forEach((id) => {
|
|
183
|
+
const p = pos[id];
|
|
184
|
+
p.vx += -p.x * CENTER_PULL;
|
|
185
|
+
p.vy += -p.y * CENTER_PULL;
|
|
186
|
+
let stepX = p.vx * 0.5;
|
|
187
|
+
let stepY = p.vy * 0.5;
|
|
188
|
+
const step = Math.sqrt(stepX * stepX + stepY * stepY);
|
|
189
|
+
if (step > MAX_STEP) {
|
|
190
|
+
stepX = stepX / step * MAX_STEP;
|
|
191
|
+
stepY = stepY / step * MAX_STEP;
|
|
192
|
+
}
|
|
193
|
+
p.x += stepX;
|
|
194
|
+
p.y += stepY;
|
|
195
|
+
p.vx = 0;
|
|
196
|
+
p.vy = 0;
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return pos;
|
|
200
|
+
},
|
|
201
|
+
renderGraph() {
|
|
202
|
+
if (this.graph) this.graph.dispose();
|
|
203
|
+
const graph = new Graph({
|
|
204
|
+
container: this.$refs.er,
|
|
205
|
+
background: {
|
|
206
|
+
color: "#fff"
|
|
207
|
+
},
|
|
208
|
+
panning: true,
|
|
209
|
+
mousewheel: {
|
|
210
|
+
enabled: true
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
graph.use(new Export());
|
|
214
|
+
this.graph = graph;
|
|
215
|
+
const edges = this.getVisibleEdges();
|
|
216
|
+
const pos = this.forceLayout(this.nodes, edges);
|
|
217
|
+
this.nodes.forEach((node) => {
|
|
218
|
+
const p = pos[node.META_ID];
|
|
219
|
+
const external = node.EXTERNAL === "1";
|
|
220
|
+
graph.addNode({
|
|
221
|
+
id: node.META_ID,
|
|
222
|
+
shape: "er-system-node",
|
|
223
|
+
x: p.x - 90,
|
|
224
|
+
y: p.y - 28,
|
|
225
|
+
data: node,
|
|
226
|
+
attrs: {
|
|
227
|
+
body: external ? { fill: "#95A2B3", stroke: "#B8C0CC", cursor: "default" } : { fill: "#1461E4", stroke: "#76A8FF", cursor: "pointer" },
|
|
228
|
+
name: { text: node.META_NAME },
|
|
229
|
+
code: { text: node.META_CODE }
|
|
230
|
+
},
|
|
231
|
+
zIndex: 2
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
edges.forEach((edge) => {
|
|
235
|
+
const selfLoop = edge.SOURCE === edge.TARGET;
|
|
236
|
+
graph.addEdge({
|
|
237
|
+
source: edge.SOURCE,
|
|
238
|
+
target: edge.TARGET,
|
|
239
|
+
vertices: selfLoop ? [{ x: pos[edge.SOURCE].x, y: pos[edge.SOURCE].y - 100 }] : void 0,
|
|
240
|
+
attrs: {
|
|
241
|
+
line: {
|
|
242
|
+
stroke: "#5795FF",
|
|
243
|
+
strokeWidth: 1.5,
|
|
244
|
+
strokeDasharray: (edge.SORTS || []).includes(RELATION_ONE_MOST) ? "5, 5" : "0"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
labels: edge.COUNT > 1 ? [{
|
|
248
|
+
attrs: {
|
|
249
|
+
text: { text: "×" + edge.COUNT, fill: "#5A6473", fontSize: 11 },
|
|
250
|
+
rect: { fill: "#E8F2FF", stroke: "#91B9FF", rx: 3, strokeWidth: 1 }
|
|
251
|
+
}
|
|
252
|
+
}] : void 0,
|
|
253
|
+
connector: {
|
|
254
|
+
name: "smooth"
|
|
255
|
+
},
|
|
256
|
+
zIndex: 1
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
graph.on("node:click", ({ node }) => {
|
|
260
|
+
const data = node.getData();
|
|
261
|
+
if (!data || data.EXTERNAL === "1") return;
|
|
262
|
+
this.openRelationTab(data);
|
|
263
|
+
});
|
|
264
|
+
graph.centerContent();
|
|
265
|
+
graph.zoomToFit({ padding: 40, maxScale: 1.5, minScale: 0.05 });
|
|
266
|
+
},
|
|
267
|
+
locateNode() {
|
|
268
|
+
if (!this.graph) return;
|
|
269
|
+
const keyword = (this.keyword || "").trim().toLowerCase();
|
|
270
|
+
if (!keyword) {
|
|
271
|
+
this.clearHighlight();
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
const matched = [];
|
|
275
|
+
this.nodes.forEach((node) => {
|
|
276
|
+
if ((node.META_NAME || "").toLowerCase().includes(keyword) || (node.META_CODE || "").toLowerCase().includes(keyword)) {
|
|
277
|
+
matched.push(node);
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
this.clearHighlight();
|
|
281
|
+
if (matched.length === 0) {
|
|
282
|
+
this.$message.info("未找到匹配的对象");
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
matched.forEach((node) => {
|
|
286
|
+
const cell = this.graph.getCellById(node.META_ID);
|
|
287
|
+
if (cell) {
|
|
288
|
+
cell.attr("body/stroke", "#F59A23");
|
|
289
|
+
cell.attr("body/strokeWidth", 2.5);
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
this.highlighted = matched.map((node) => node.META_ID);
|
|
293
|
+
const first = this.graph.getCellById(matched[0].META_ID);
|
|
294
|
+
if (first) this.graph.centerCell(first);
|
|
295
|
+
},
|
|
296
|
+
clearHighlight() {
|
|
297
|
+
if (!this.graph || !this.highlighted) return;
|
|
298
|
+
this.highlighted.forEach((id) => {
|
|
299
|
+
const cell = this.graph.getCellById(id);
|
|
300
|
+
if (!cell) return;
|
|
301
|
+
const external = cell.getData().EXTERNAL === "1";
|
|
302
|
+
cell.attr("body/stroke", external ? "#B8C0CC" : "#76A8FF");
|
|
303
|
+
cell.attr("body/strokeWidth", 1);
|
|
304
|
+
});
|
|
305
|
+
this.highlighted = [];
|
|
306
|
+
},
|
|
307
|
+
resetView() {
|
|
308
|
+
if (!this.graph) return;
|
|
309
|
+
this.graph.centerContent();
|
|
310
|
+
this.graph.zoomToFit({ padding: 40, maxScale: 1.5, minScale: 0.05 });
|
|
311
|
+
},
|
|
312
|
+
exportEr() {
|
|
313
|
+
this.graph.exportPNG("对象全景图", {
|
|
314
|
+
padding: 20
|
|
315
|
+
});
|
|
316
|
+
},
|
|
317
|
+
// 页内新开对象关系图标签;同对象已打开则只聚焦
|
|
318
|
+
openRelationTab(node) {
|
|
319
|
+
if (this.relationTabs.some((tab) => tab.metaId === node.META_ID)) {
|
|
320
|
+
this.activeTab = node.META_ID;
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
this.relationTabs.push({
|
|
324
|
+
metaId: node.META_ID,
|
|
325
|
+
label: node.META_NAME || node.META_CODE
|
|
326
|
+
});
|
|
327
|
+
this.activeTab = node.META_ID;
|
|
328
|
+
},
|
|
329
|
+
removeTab(name) {
|
|
330
|
+
if (name === "panorama") return;
|
|
331
|
+
const index = this.relationTabs.findIndex((tab) => tab.metaId === name);
|
|
332
|
+
if (index === -1) return;
|
|
333
|
+
this.relationTabs.splice(index, 1);
|
|
334
|
+
if (this.activeTab === name) {
|
|
335
|
+
const next = this.relationTabs[index] || this.relationTabs[index - 1];
|
|
336
|
+
this.activeTab = next ? next.metaId : "panorama";
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
mounted() {
|
|
341
|
+
this.getMetaRelation();
|
|
342
|
+
},
|
|
343
|
+
beforeUnmount() {
|
|
344
|
+
if (this.graph) this.graph.dispose();
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
const _hoisted_1 = { class: "epx-entity-system-er" };
|
|
348
|
+
const _hoisted_2 = { class: "er-header" };
|
|
349
|
+
const _hoisted_3 = { class: "er-tools" };
|
|
350
|
+
const _hoisted_4 = { class: "er-legend" };
|
|
351
|
+
const _hoisted_5 = { class: "er-count" };
|
|
352
|
+
const _hoisted_6 = {
|
|
353
|
+
ref: "er",
|
|
354
|
+
class: "er-container"
|
|
355
|
+
};
|
|
356
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
357
|
+
const _component_el_button = resolveComponent("el-button");
|
|
358
|
+
const _component_el_input = resolveComponent("el-input");
|
|
359
|
+
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
360
|
+
const _component_el_checkbox_group = resolveComponent("el-checkbox-group");
|
|
361
|
+
const _component_el_tab_pane = resolveComponent("el-tab-pane");
|
|
362
|
+
const _component_relation_diagram = resolveComponent("relation-diagram");
|
|
363
|
+
const _component_el_tabs = resolveComponent("el-tabs");
|
|
364
|
+
const _directive_loading = resolveDirective("loading");
|
|
365
|
+
return openBlock(), createBlock(_component_el_tabs, {
|
|
366
|
+
modelValue: $data.activeTab,
|
|
367
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.activeTab = $event),
|
|
368
|
+
class: "er-tabs",
|
|
369
|
+
onTabRemove: $options.removeTab
|
|
370
|
+
}, {
|
|
371
|
+
default: withCtx(() => [
|
|
372
|
+
createVNode(_component_el_tab_pane, {
|
|
373
|
+
name: "panorama",
|
|
374
|
+
label: "对象全景图",
|
|
375
|
+
closable: false
|
|
376
|
+
}, {
|
|
377
|
+
default: withCtx(() => [
|
|
378
|
+
createElementVNode("div", _hoisted_1, [
|
|
379
|
+
createElementVNode("div", _hoisted_2, [
|
|
380
|
+
createElementVNode("div", _hoisted_3, [
|
|
381
|
+
createVNode(_component_el_input, {
|
|
382
|
+
modelValue: $data.keyword,
|
|
383
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
|
|
384
|
+
size: "default",
|
|
385
|
+
clearable: "",
|
|
386
|
+
placeholder: "搜索对象名称 / 编号",
|
|
387
|
+
class: "er-search",
|
|
388
|
+
onKeyup: withKeys($options.locateNode, ["enter"]),
|
|
389
|
+
onClear: $options.clearHighlight
|
|
390
|
+
}, {
|
|
391
|
+
append: withCtx(() => [
|
|
392
|
+
createVNode(_component_el_button, {
|
|
393
|
+
icon: "el-icon-search",
|
|
394
|
+
onClick: $options.locateNode
|
|
395
|
+
}, null, 8, ["onClick"])
|
|
396
|
+
]),
|
|
397
|
+
_: 1
|
|
398
|
+
}, 8, ["modelValue", "onKeyup", "onClear"]),
|
|
399
|
+
createVNode(_component_el_checkbox_group, {
|
|
400
|
+
modelValue: $data.relationTypes,
|
|
401
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.relationTypes = $event),
|
|
402
|
+
class: "er-filter",
|
|
403
|
+
onChange: $options.renderGraph
|
|
404
|
+
}, {
|
|
405
|
+
default: withCtx(() => [
|
|
406
|
+
createVNode(_component_el_checkbox, { label: "1" }, {
|
|
407
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
408
|
+
createTextVNode("一对多", -1)
|
|
409
|
+
])]),
|
|
410
|
+
_: 1
|
|
411
|
+
}),
|
|
412
|
+
createVNode(_component_el_checkbox, { label: "2" }, {
|
|
413
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
414
|
+
createTextVNode("单条", -1)
|
|
415
|
+
])]),
|
|
416
|
+
_: 1
|
|
417
|
+
})
|
|
418
|
+
]),
|
|
419
|
+
_: 1
|
|
420
|
+
}, 8, ["modelValue", "onChange"]),
|
|
421
|
+
createVNode(_component_el_button, {
|
|
422
|
+
size: "default",
|
|
423
|
+
onClick: $options.resetView
|
|
424
|
+
}, {
|
|
425
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
426
|
+
createTextVNode("重置视图", -1)
|
|
427
|
+
])]),
|
|
428
|
+
_: 1
|
|
429
|
+
}, 8, ["onClick"]),
|
|
430
|
+
createVNode(_component_el_button, {
|
|
431
|
+
size: "default",
|
|
432
|
+
type: "primary",
|
|
433
|
+
onClick: $options.exportEr
|
|
434
|
+
}, {
|
|
435
|
+
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
436
|
+
createTextVNode("导出", -1)
|
|
437
|
+
])]),
|
|
438
|
+
_: 1
|
|
439
|
+
}, 8, ["onClick"])
|
|
440
|
+
]),
|
|
441
|
+
createElementVNode("div", _hoisted_4, [
|
|
442
|
+
createElementVNode("span", _hoisted_5, "对象 " + toDisplayString($options.nodes.length) + " 个 · 关系 " + toDisplayString($options.edges.length) + " 条", 1),
|
|
443
|
+
_cache[7] || (_cache[7] = createElementVNode("div", { class: "legend-item" }, [
|
|
444
|
+
createElementVNode("span", { class: "legend-icon" }, [
|
|
445
|
+
createElementVNode("i", { class: "el-icon-caret-left" })
|
|
446
|
+
]),
|
|
447
|
+
createElementVNode("span", null, "单条")
|
|
448
|
+
], -1)),
|
|
449
|
+
_cache[8] || (_cache[8] = createElementVNode("div", { class: "legend-item" }, [
|
|
450
|
+
createElementVNode("span", { class: "legend-icon legend-icon--sub" }, [
|
|
451
|
+
createElementVNode("i", { class: "el-icon-caret-left" })
|
|
452
|
+
]),
|
|
453
|
+
createElementVNode("span", null, "一对多")
|
|
454
|
+
], -1)),
|
|
455
|
+
_cache[9] || (_cache[9] = createElementVNode("div", { class: "legend-item" }, [
|
|
456
|
+
createElementVNode("span", { class: "legend-node legend-node--external" }),
|
|
457
|
+
createElementVNode("span", null, "外部对象")
|
|
458
|
+
], -1))
|
|
459
|
+
])
|
|
460
|
+
]),
|
|
461
|
+
withDirectives(createElementVNode("div", _hoisted_6, null, 512), [
|
|
462
|
+
[_directive_loading, $data.loading]
|
|
463
|
+
])
|
|
464
|
+
])
|
|
465
|
+
]),
|
|
466
|
+
_: 1
|
|
467
|
+
}),
|
|
468
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($data.relationTabs, (tab) => {
|
|
469
|
+
return openBlock(), createBlock(_component_el_tab_pane, {
|
|
470
|
+
key: tab.metaId,
|
|
471
|
+
name: tab.metaId,
|
|
472
|
+
label: tab.label,
|
|
473
|
+
closable: "",
|
|
474
|
+
lazy: ""
|
|
475
|
+
}, {
|
|
476
|
+
default: withCtx(() => [
|
|
477
|
+
createVNode(_component_relation_diagram, {
|
|
478
|
+
"current-query": { id: tab.metaId },
|
|
479
|
+
class: "er-tab-diagram"
|
|
480
|
+
}, null, 8, ["current-query"])
|
|
481
|
+
]),
|
|
482
|
+
_: 2
|
|
483
|
+
}, 1032, ["name", "label"]);
|
|
484
|
+
}), 128))
|
|
485
|
+
]),
|
|
486
|
+
_: 1
|
|
487
|
+
}, 8, ["modelValue", "onTabRemove"]);
|
|
488
|
+
}
|
|
489
|
+
const EntitySystemEr = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-729999a3"]]);
|
|
490
|
+
export {
|
|
491
|
+
EntitySystemEr as default
|
|
492
|
+
};
|
|
@@ -71,42 +71,13 @@ const _sfc_main = {
|
|
|
71
71
|
"onClick": this.openService.bind(this, "role")
|
|
72
72
|
}, _isSlot(_slot2 = this.$t("navigation.role_assignment_management")) ? _slot2 : {
|
|
73
73
|
default: () => [_slot2]
|
|
74
|
-
}),
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
}), !this.$isMobile && this.terminal !== "mobile" && createVNode(resolveComponent("el-dropdown-item"), {
|
|
75
|
+
"command": "interface-settings",
|
|
76
|
+
"onClick": () => {
|
|
77
|
+
this.showInterfaceSettings = true;
|
|
78
|
+
}
|
|
79
79
|
}, {
|
|
80
|
-
default: () => [
|
|
81
|
-
"class": "epx-app-nav__theme"
|
|
82
|
-
}, [this.themeList.map((theme) => createVNode("li", {
|
|
83
|
-
"class": {
|
|
84
|
-
"is-active": theme.key === this.selectTheme
|
|
85
|
-
},
|
|
86
|
-
"style": !theme.icon && theme.color ? {
|
|
87
|
-
background: theme.color
|
|
88
|
-
} : {},
|
|
89
|
-
"key": theme.key,
|
|
90
|
-
"onClick": this.changeTheme.bind(this, theme)
|
|
91
|
-
}, [theme.icon && createVNode("img", {
|
|
92
|
-
"src": theme.icon,
|
|
93
|
-
"alt": ""
|
|
94
|
-
}, null), !theme.icon && createVNode("span", {
|
|
95
|
-
"class": "epx-app-nav__theme-custom-label"
|
|
96
|
-
}, [theme.name]), theme.key === this.selectTheme && createVNode("i", {
|
|
97
|
-
"class": "epx-app-nav__theme-select el-icon-success"
|
|
98
|
-
}, null)]))])],
|
|
99
|
-
// reference 必须是「根节点为真实元素」的东西:EP 的 ElOnlyChild 会用
|
|
100
|
-
// withDirectives(cloneVNode(node), [[forwardRef]]) 挂指令来拿 reference 的真实
|
|
101
|
-
// DOM,而 Vue 的运行时指令只能落在元素上。el-dropdown-item 的根节点是
|
|
102
|
-
// ElRovingFocusItem 组件 ⇒ 指令挂不上,Vue 只发一条 "Runtime directive used on
|
|
103
|
-
// component with non-element root node" 的 warning 就静默失效 ⇒ tooltip 拿不到
|
|
104
|
-
// reference ⇒ hover 完全没反应。
|
|
105
|
-
// 用原生 li + EP 的 item 类名:根是元素、在 ul.el-dropdown-menu 里也合法、样式不变。
|
|
106
|
-
// 原来的 command 属性没人消费(所在 el-dropdown 无 onCommand),去掉无影响。
|
|
107
|
-
reference: () => createVNode("li", {
|
|
108
|
-
"class": "el-dropdown-menu__item"
|
|
109
|
-
}, [this.$t("skin")])
|
|
80
|
+
default: () => [createTextVNode("界面设置")]
|
|
110
81
|
}), this.languageFlag && createVNode(resolveComponent("el-popover"), {
|
|
111
82
|
"placement": "left-start",
|
|
112
83
|
"trigger": "hover"
|
|
@@ -119,7 +90,7 @@ const _sfc_main = {
|
|
|
119
90
|
}],
|
|
120
91
|
"onClick": this.switchLanguage.bind(this, language)
|
|
121
92
|
}, [createVNode("span", null, [language.name])]))])],
|
|
122
|
-
//
|
|
93
|
+
// reference 使用原生元素,供 ElOnlyChild 正确获取 DOM。
|
|
123
94
|
reference: () => createVNode("li", {
|
|
124
95
|
"class": "el-dropdown-menu__item"
|
|
125
96
|
}, [this.$t("language")])
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import '../../style.css';
|
|
2
|
-
import
|
|
2
|
+
import ListFind from "@epxing/components/src/entity-list-find";
|
|
3
|
+
import gallery from "./icon-gallery/mixin.js";
|
|
4
|
+
const _sfc_main = {
|
|
5
|
+
name: "epx-icon-font-library",
|
|
6
|
+
extends: ListFind,
|
|
7
|
+
mixins: [gallery],
|
|
8
|
+
created() {
|
|
9
|
+
if (this.$isMobile) this.openWatchSelection();
|
|
10
|
+
},
|
|
11
|
+
methods: {
|
|
12
|
+
chooseIcon(icon) {
|
|
13
|
+
if (this.multiple) {
|
|
14
|
+
this.selectionIds = this.selectionIds.includes(icon.CODE) ? this.selectionIds.filter((code) => code !== icon.CODE) : [...this.selectionIds, icon.CODE];
|
|
15
|
+
} else {
|
|
16
|
+
this.selectEntity(null, icon);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
render() {
|
|
21
|
+
return this.renderGallery(true);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
3
24
|
export {
|
|
4
25
|
_sfc_main as default
|
|
5
26
|
};
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
import '../../style.css';
|
|
2
|
-
import
|
|
2
|
+
import EntityList from "@epxing/components/src/entity-list";
|
|
3
|
+
import gallery from "./icon-gallery/mixin.js";
|
|
4
|
+
const _sfc_main = {
|
|
5
|
+
name: "epx-icon-font-list",
|
|
6
|
+
extends: EntityList,
|
|
7
|
+
mixins: [gallery],
|
|
8
|
+
methods: {
|
|
9
|
+
async chooseIcon(icon) {
|
|
10
|
+
try {
|
|
11
|
+
if (navigator.clipboard && window.isSecureContext) await navigator.clipboard.writeText(icon.CODE);
|
|
12
|
+
else this.$util.copyToClipboard(icon.CODE);
|
|
13
|
+
this.$message.success("已复制图标编号");
|
|
14
|
+
} catch (err) {
|
|
15
|
+
this.$message.error(err && err.message || "复制失败,请手动复制图标编号");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
render() {
|
|
20
|
+
return this.renderGallery();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
3
23
|
export {
|
|
4
24
|
_sfc_main as default
|
|
5
25
|
};
|
|
@@ -2,8 +2,9 @@ import '../../style.css';
|
|
|
2
2
|
import _sfc_main from "./PrintFormList.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
|
+
/* empty css */
|
|
5
6
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
-
const PrintFormList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
7
|
+
const PrintFormList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c4674e6a"]]);
|
|
7
8
|
export {
|
|
8
9
|
PrintFormList as default
|
|
9
10
|
};
|
|
@@ -69,7 +69,9 @@ const _sfc_main = {
|
|
|
69
69
|
"onUpdate:modelValue": (v) => this.showFormTypeDialog = v,
|
|
70
70
|
"width": "800px"
|
|
71
71
|
}, {
|
|
72
|
-
default: () => [createVNode("div",
|
|
72
|
+
default: () => [createVNode("div", {
|
|
73
|
+
"class": "epx-print-form-types"
|
|
74
|
+
}, [createVNode("ul", {
|
|
73
75
|
"class": "create-form__list"
|
|
74
76
|
}, [createVNode("li", {
|
|
75
77
|
"class": "create-form__item",
|