@epxing/dashboard 0.0.0-stage → 5.3.0-beta.2
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 +80 -0
- package/README.md +41 -2
- package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/_virtual/preload-helper.js +88 -0
- package/dist/assets/technology_bg-oWIS2awO.jpg +0 -0
- package/dist/src/Dashboard.js +333 -0
- package/dist/src/DashboardGrid.js +183 -0
- package/dist/src/DesignGrid.js +712 -0
- package/dist/src/DesignItem.js +64 -0
- package/dist/src/Div.js +409 -0
- package/dist/src/Header.js +386 -0
- package/dist/src/Preview.js +28 -0
- package/dist/src/Tabs.js +469 -0
- package/dist/src/Title.js +102 -0
- package/dist/src/Widget.js +267 -0
- package/dist/src/chart-request-scope.js +33 -0
- package/dist/src/design-target.js +58 -0
- package/dist/src/grid/compact.js +69 -0
- package/dist/src/grid/compat/GridItem.js +36 -0
- package/dist/src/grid/compat/GridLayout.js +77 -0
- package/dist/src/grid/designState.js +22 -0
- package/dist/src/grid/engines.js +26 -0
- package/dist/src/grid/geometry.js +45 -0
- package/dist/src/grid/gridstackParams.js +70 -0
- package/dist/src/grid/mixins.js +109 -0
- package/dist/src/grid/model.js +224 -0
- package/dist/src/grid/useViewportGate.js +56 -0
- package/dist/src/index.js +27 -0
- package/dist/src/layout-util.js +109 -0
- package/dist/src/mobile-design.js +51 -0
- package/dist/src/theme-style.js +134 -0
- package/dist/style.css +1009 -0
- package/package.json +86 -3
- package/src/Dashboard.vue +459 -0
- package/src/DashboardGrid.vue +189 -0
- package/src/DesignGrid.vue +851 -0
- package/src/DesignItem.vue +124 -0
- package/src/Div.vue +419 -0
- package/src/Header.vue +501 -0
- package/src/Preview.vue +30 -0
- package/src/Tabs.vue +484 -0
- package/src/Title.vue +107 -0
- package/src/Widget.vue +354 -0
- package/src/chart-request-scope.js +22 -0
- package/src/design-target.js +55 -0
- package/src/grid/compact.js +81 -0
- package/src/grid/compat/GridItem.vue +30 -0
- package/src/grid/compat/GridLayout.vue +76 -0
- package/src/grid/designState.js +17 -0
- package/src/grid/engines.js +22 -0
- package/src/grid/geometry.js +55 -0
- package/src/grid/gridstackParams.js +72 -0
- package/src/grid/mixins.js +114 -0
- package/src/grid/model.js +259 -0
- package/src/grid/useViewportGate.js +57 -0
- package/src/index.js +28 -0
- package/src/layout-util.js +157 -0
- package/src/mobile-design.js +50 -0
- package/src/theme-style.js +185 -0
- package/types/div.d.ts +1 -0
- package/types/index.d.ts +7 -0
- package/types/tabs.d.ts +1 -0
- package/types/title.d.ts +1 -0
- package/types/widget.d.ts +1 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import '../style.css';
|
|
2
|
+
import { openBlock, createElementBlock, withModifiers, normalizeClass, createElementVNode, renderSlot, Fragment, renderList, createCommentVNode } from "vue";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const HANDLES = ["n", "s", "e", "w", "ne", "nw", "se", "sw"];
|
|
6
|
+
const _sfc_main = {
|
|
7
|
+
name: "epx-dashboard-design-item",
|
|
8
|
+
props: {
|
|
9
|
+
item: { type: Object, required: true },
|
|
10
|
+
active: Boolean,
|
|
11
|
+
// 是否显示悬浮切换图标:整页悬浮(grid.mode === 'float')与移动端布局不显示
|
|
12
|
+
floatable: { type: Boolean, default: true }
|
|
13
|
+
},
|
|
14
|
+
emits: ["select"],
|
|
15
|
+
data() {
|
|
16
|
+
return { handles: HANDLES };
|
|
17
|
+
},
|
|
18
|
+
methods: {
|
|
19
|
+
// 悬浮 ↔ 默认:字段直接落到 item 上(与 DesignGrid.setFloat / 属性面板 changeItemConfigs 'component' 同一路径),
|
|
20
|
+
// 画布按 item.float 把壳搬到悬浮层 / 碰撞层,外壳 deep watch 自动保存;关掉时层级 z 一并删掉、不留脏值。
|
|
21
|
+
// 点击会冒泡到根元素的 select,所以切换的同时该项也被选中
|
|
22
|
+
toggleFloat() {
|
|
23
|
+
const item = this.item;
|
|
24
|
+
if (item.float) {
|
|
25
|
+
delete item.float;
|
|
26
|
+
delete item.z;
|
|
27
|
+
} else {
|
|
28
|
+
item.float = true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const _hoisted_1 = { class: "epx-dashboard-design-item__body" };
|
|
34
|
+
const _hoisted_2 = { class: "epx-dashboard-design-item__operates" };
|
|
35
|
+
const _hoisted_3 = ["title"];
|
|
36
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
37
|
+
return openBlock(), createElementBlock("div", {
|
|
38
|
+
class: normalizeClass(["epx-dashboard-design-item", { "epx-dashboard-design-item--active": $props.active }]),
|
|
39
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.$emit("select", $props.item), ["stop"]))
|
|
40
|
+
}, [
|
|
41
|
+
createElementVNode("div", _hoisted_1, [
|
|
42
|
+
renderSlot(_ctx.$slots, "default")
|
|
43
|
+
]),
|
|
44
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($data.handles, (dir) => {
|
|
45
|
+
return openBlock(), createElementBlock("i", {
|
|
46
|
+
key: dir,
|
|
47
|
+
class: normalizeClass(["epx-dashboard-design-item__handle", "epx-dashboard-design-item__handle--" + dir])
|
|
48
|
+
}, null, 2);
|
|
49
|
+
}), 128)),
|
|
50
|
+
createElementVNode("div", _hoisted_2, [
|
|
51
|
+
$props.floatable ? (openBlock(), createElementBlock("i", {
|
|
52
|
+
key: 0,
|
|
53
|
+
class: normalizeClass(["epx-dashboard-design-item__float", "el-icon-top", { "is-on": !!$props.item.float }]),
|
|
54
|
+
title: $props.item.float ? "悬浮中,点击恢复默认" : "设为悬浮(可叠放、不推挤)",
|
|
55
|
+
onClick: _cache[0] || (_cache[0] = (...args) => $options.toggleFloat && $options.toggleFloat(...args))
|
|
56
|
+
}, null, 10, _hoisted_3)) : createCommentVNode("", true),
|
|
57
|
+
renderSlot(_ctx.$slots, "operates")
|
|
58
|
+
])
|
|
59
|
+
], 2);
|
|
60
|
+
}
|
|
61
|
+
const DesignItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
62
|
+
export {
|
|
63
|
+
DesignItem as default
|
|
64
|
+
};
|
package/dist/src/Div.js
ADDED
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import '../style.css';
|
|
2
|
+
import { __vitePreload as __epxPackagePreload } from "../_virtual/preload-helper.js";
|
|
3
|
+
import { defineAsyncComponent, resolveComponent, openBlock, createElementBlock, normalizeStyle, normalizeClass, createElementVNode, Fragment, createCommentVNode, toDisplayString, createBlock, withCtx, resolveDynamicComponent, createVNode, createTextVNode } from "vue";
|
|
4
|
+
import { normalizeGridItem } from "./layout-util.js";
|
|
5
|
+
import DashboardGrid from "./DashboardGrid.js";
|
|
6
|
+
import { containerGridMixin } from "./grid/mixins.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
|
|
10
|
+
const _sfc_main = {
|
|
11
|
+
name: "epx-dashboard-div",
|
|
12
|
+
// 运行态网格参数 / 门控策略 / 嵌套容器网格透传(compGrid prop、gridParams / loadWay / childGrid)来自 containerGridMixin
|
|
13
|
+
mixins: [containerGridMixin],
|
|
14
|
+
components: {
|
|
15
|
+
[DashboardGrid.name]: DashboardGrid,
|
|
16
|
+
// 设计态画布(gridstack 封装)与项 chrome 按需加载,运行态不拉 gridstack
|
|
17
|
+
"epx-dashboard-design-grid": defineAsyncComponent(() => __epxPackagePreload(() => import("./DesignGrid.js"), true ? [] : void 0, import.meta.url)),
|
|
18
|
+
"epx-dashboard-design-item": defineAsyncComponent(() => __epxPackagePreload(() => import("./DesignItem.js"), true ? [] : void 0, import.meta.url))
|
|
19
|
+
},
|
|
20
|
+
inject: {
|
|
21
|
+
// 父网格 api(页面级画布或上级容器的 DesignGrid 提供):本容器的子网格挂到它下面;独立挂载时为空,子网格退化为独立网格
|
|
22
|
+
epxDashboardDesignGrid: { default: null },
|
|
23
|
+
// 设计态共享选中态(页面级画布提供):容器内与页面级只有一个选中项
|
|
24
|
+
epxDashboardDesign: { default: null }
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
theme: String,
|
|
28
|
+
compId: String,
|
|
29
|
+
compStyle: {
|
|
30
|
+
type: Object,
|
|
31
|
+
default() {
|
|
32
|
+
return {};
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
compItem: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default() {
|
|
38
|
+
return {};
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
compConfigs: {
|
|
42
|
+
type: Object,
|
|
43
|
+
default() {
|
|
44
|
+
return {};
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
items: {
|
|
48
|
+
type: Array,
|
|
49
|
+
default() {
|
|
50
|
+
return [];
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
itemConfigs: {
|
|
54
|
+
type: Object,
|
|
55
|
+
default() {
|
|
56
|
+
return {};
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
mode: String,
|
|
60
|
+
allComponentList: Array,
|
|
61
|
+
chartCache: Boolean,
|
|
62
|
+
dashboardId: String
|
|
63
|
+
},
|
|
64
|
+
data() {
|
|
65
|
+
return {
|
|
66
|
+
reloadComponent: {},
|
|
67
|
+
isDragElement: false,
|
|
68
|
+
// 设计态内容区可视高度(壳内容盒高 − 标题栏高),传给子网格做 min-height
|
|
69
|
+
designMinHeight: 0
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
computed: {
|
|
73
|
+
compTheme() {
|
|
74
|
+
return this.$configs.theme || this.theme;
|
|
75
|
+
},
|
|
76
|
+
getCompConfigs() {
|
|
77
|
+
return (component) => {
|
|
78
|
+
const { configs = {}, id, title, contentType, ...otherConfigs } = component;
|
|
79
|
+
const compId = this.getDashboardLegacy() && this.dashboardId ? this.dashboardId + "-" + id : id;
|
|
80
|
+
const itemConfig = this.itemConfigs[compId] || {};
|
|
81
|
+
const _configs = { ...otherConfigs, ...configs, ...itemConfig };
|
|
82
|
+
if (title) {
|
|
83
|
+
_configs.componentName = title;
|
|
84
|
+
}
|
|
85
|
+
return _configs;
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
$configs() {
|
|
89
|
+
const itemConfig = this.itemConfigs[this.compId] || {};
|
|
90
|
+
const _configs = { ...this.compConfigs, ...itemConfig };
|
|
91
|
+
return _configs;
|
|
92
|
+
},
|
|
93
|
+
style() {
|
|
94
|
+
const style = { ...this.compStyle };
|
|
95
|
+
if (style.backgroundImage) {
|
|
96
|
+
style.backgroundImage = style.backgroundImage.replace(/url\s*\(([\w+-/.\s]+)\)/g, (str, $1) => {
|
|
97
|
+
return `url(${this.$util.getFileUrl($1)})`;
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return style;
|
|
101
|
+
},
|
|
102
|
+
showTitle() {
|
|
103
|
+
const { showTitle } = this.$configs;
|
|
104
|
+
return showTitle;
|
|
105
|
+
},
|
|
106
|
+
title() {
|
|
107
|
+
const { title = "" } = this.$configs;
|
|
108
|
+
return title;
|
|
109
|
+
},
|
|
110
|
+
titleStyle() {
|
|
111
|
+
const { align, backgroundStyle, backgroundColor, backgroundImage } = this.titleFontStyle || {};
|
|
112
|
+
const style = {};
|
|
113
|
+
if (align) {
|
|
114
|
+
style.justifyContent = align;
|
|
115
|
+
}
|
|
116
|
+
if (backgroundStyle === "image") {
|
|
117
|
+
style.backgroundImage = `url(${this.$util.getFileUrl(backgroundImage)})`;
|
|
118
|
+
} else if (backgroundColor) {
|
|
119
|
+
style.backgroundColor = backgroundColor;
|
|
120
|
+
}
|
|
121
|
+
return style;
|
|
122
|
+
},
|
|
123
|
+
titleText() {
|
|
124
|
+
return this.$configs.title;
|
|
125
|
+
},
|
|
126
|
+
design() {
|
|
127
|
+
return this.epxDashboardDesign;
|
|
128
|
+
},
|
|
129
|
+
activeComponent() {
|
|
130
|
+
return this.design ? this.design.state.activeItem : null;
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
watch: {
|
|
134
|
+
items: {
|
|
135
|
+
handler(v = []) {
|
|
136
|
+
for (const item of v) {
|
|
137
|
+
if (!item) continue;
|
|
138
|
+
normalizeGridItem(item);
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
deep: true,
|
|
142
|
+
immediate: true
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
methods: {
|
|
146
|
+
addGridItem(v) {
|
|
147
|
+
this.$emit("changeItems", [...this.items, v]);
|
|
148
|
+
},
|
|
149
|
+
// 库改了子项坐标(拖拽 / 缩放 / 推挤 / 首次对账):画布已就地写回,只需通知上层保存
|
|
150
|
+
onDesignChange() {
|
|
151
|
+
this.$emit("changeItems", [...this.items]);
|
|
152
|
+
},
|
|
153
|
+
// 跨网格搬出(子项被拖到页面或别的容器):源侧必须同步移出,否则子网格下一次同步会把壳重新加回来
|
|
154
|
+
onTransferOut(item) {
|
|
155
|
+
this.$emit("changeItems", this.items.filter((i) => i.id !== item.id));
|
|
156
|
+
},
|
|
157
|
+
// 跨网格搬入:画布已按本网格换算过 w/h
|
|
158
|
+
onTransferIn(item) {
|
|
159
|
+
this.$emit("changeItems", [...this.items, item]);
|
|
160
|
+
},
|
|
161
|
+
// 嵌套容器的子项变化:替换该容器项对象后上报(与页面级画布 changeSubItems 同手法)
|
|
162
|
+
changeSubItems(item, v) {
|
|
163
|
+
const index = this.items.findIndex((i) => i.id === item.id);
|
|
164
|
+
if (index === -1) return;
|
|
165
|
+
const items = [...this.items];
|
|
166
|
+
items.splice(index, 1, { ...items[index], items: v });
|
|
167
|
+
this.$emit("changeItems", items);
|
|
168
|
+
},
|
|
169
|
+
openConfigPanel(component) {
|
|
170
|
+
if (this.design) this.design.select(component, this.compId);
|
|
171
|
+
},
|
|
172
|
+
// 设计态内容区可视高度:壳内容盒高 − 标题栏高(内容区是 flex 撑满的一层,量它即可;无标题时等于壳内容盒高)
|
|
173
|
+
measureDesignHeight() {
|
|
174
|
+
if (this.$refs.designBody) this.designMinHeight = this.$refs.designBody.clientHeight;
|
|
175
|
+
},
|
|
176
|
+
designReport(component) {
|
|
177
|
+
const configs = this.getCompConfigs(component, component.id);
|
|
178
|
+
this.goPage({
|
|
179
|
+
component: "report-design",
|
|
180
|
+
params: {
|
|
181
|
+
id: configs.id,
|
|
182
|
+
callback: () => {
|
|
183
|
+
this.reloadComponent[component.id] = true;
|
|
184
|
+
this.$nextTick(() => {
|
|
185
|
+
this.reloadComponent[component.id] = false;
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
},
|
|
191
|
+
editComponent(activeComponent) {
|
|
192
|
+
const componentInfo = this.allComponentList.find((item) => item.CODE === activeComponent.contentType) || { CODE: activeComponent.contentType };
|
|
193
|
+
const configs = this.getCompConfigs(activeComponent, activeComponent.id);
|
|
194
|
+
this.$emit("open-config", activeComponent.id, componentInfo, configs);
|
|
195
|
+
},
|
|
196
|
+
deleteComponent(component, command) {
|
|
197
|
+
const activeComponent = component || this.activeComponent;
|
|
198
|
+
const index = this.items.findIndex((item) => item.id === activeComponent.id);
|
|
199
|
+
if (activeComponent.contentType === "report-chat" && command === "all") {
|
|
200
|
+
const configs = this.getCompConfigs(activeComponent, activeComponent.id);
|
|
201
|
+
this.$http.removeMulti({
|
|
202
|
+
entityId: "FM_REPORT_BASE",
|
|
203
|
+
ids: configs.id
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
if (index !== -1) {
|
|
207
|
+
const items = [...this.items];
|
|
208
|
+
items.splice(index, 1);
|
|
209
|
+
this.$emit("changeItems", items);
|
|
210
|
+
if (this.design && this.design.isActive(activeComponent)) this.design.clear();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
mounted() {
|
|
215
|
+
if (this.mode !== "design") return;
|
|
216
|
+
this.measureDesignHeight();
|
|
217
|
+
if (typeof ResizeObserver !== "undefined" && this.$refs.designBody) {
|
|
218
|
+
this.designResizeObserver = new ResizeObserver(() => this.measureDesignHeight());
|
|
219
|
+
this.designResizeObserver.observe(this.$refs.designBody);
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
beforeUnmount() {
|
|
223
|
+
if (this.designResizeObserver) this.designResizeObserver.disconnect();
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
const _hoisted_1 = {
|
|
227
|
+
key: 1,
|
|
228
|
+
class: "epx-chart__header-icon"
|
|
229
|
+
};
|
|
230
|
+
const _hoisted_2 = { class: "drag-component" };
|
|
231
|
+
const _hoisted_3 = {
|
|
232
|
+
key: 2,
|
|
233
|
+
ref: "designBody",
|
|
234
|
+
class: "epx-dashboard-div__design-body"
|
|
235
|
+
};
|
|
236
|
+
const _hoisted_4 = {
|
|
237
|
+
key: 0,
|
|
238
|
+
class: "drag-component"
|
|
239
|
+
};
|
|
240
|
+
const _hoisted_5 = { key: 1 };
|
|
241
|
+
const _hoisted_6 = ["onClick"];
|
|
242
|
+
const _hoisted_7 = ["onClick"];
|
|
243
|
+
const _hoisted_8 = ["onClick"];
|
|
244
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
245
|
+
const _component_epx_dashboard_grid = resolveComponent("epx-dashboard-grid");
|
|
246
|
+
const _component_epx_component = resolveComponent("epx-component");
|
|
247
|
+
const _component_el_dropdown_item = resolveComponent("el-dropdown-item");
|
|
248
|
+
const _component_el_dropdown_menu = resolveComponent("el-dropdown-menu");
|
|
249
|
+
const _component_el_dropdown = resolveComponent("el-dropdown");
|
|
250
|
+
const _component_epx_dashboard_design_item = resolveComponent("epx-dashboard-design-item");
|
|
251
|
+
const _component_epx_dashboard_design_grid = resolveComponent("epx-dashboard-design-grid");
|
|
252
|
+
return openBlock(), createElementBlock("div", {
|
|
253
|
+
ref: "container",
|
|
254
|
+
class: normalizeClass(["container", "epx-dashboard-div", `epx-dashboard-div--${$options.compTheme}`, { "drag-element": $data.isDragElement }, { "is-design": $props.mode === "design" }]),
|
|
255
|
+
style: normalizeStyle($options.style)
|
|
256
|
+
}, [
|
|
257
|
+
$options.showTitle && $options.titleText ? (openBlock(), createElementBlock("div", {
|
|
258
|
+
key: 0,
|
|
259
|
+
class: normalizeClass(["epx-chart__header", { "epx-chart__header--no-icon": $options.$configs.iconFlag === false }]),
|
|
260
|
+
style: normalizeStyle($options.titleStyle)
|
|
261
|
+
}, [
|
|
262
|
+
createElementVNode("div", {
|
|
263
|
+
class: "epx-chart__header-left",
|
|
264
|
+
style: normalizeStyle({ color: $options.$configs.iconColor })
|
|
265
|
+
}, [
|
|
266
|
+
$options.$configs.iconFlag !== false ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
267
|
+
$options.$configs.icon ? (openBlock(), createElementBlock("i", {
|
|
268
|
+
key: 0,
|
|
269
|
+
style: normalizeStyle($options.$configs.textStyle),
|
|
270
|
+
class: normalizeClass(["epx-chart__header-icon--icon", $options.$configs.icon || "epx-icon-kapianmorentubiao"])
|
|
271
|
+
}, null, 6)) : (openBlock(), createElementBlock("span", _hoisted_1))
|
|
272
|
+
], 64)) : createCommentVNode("", true),
|
|
273
|
+
createElementVNode("span", {
|
|
274
|
+
class: "epx-chart__title",
|
|
275
|
+
style: normalizeStyle($options.$configs.textStyle)
|
|
276
|
+
}, toDisplayString($options.titleText), 5)
|
|
277
|
+
], 4)
|
|
278
|
+
], 6)) : createCommentVNode("", true),
|
|
279
|
+
$props.mode !== "design" ? (openBlock(), createBlock(_component_epx_dashboard_grid, {
|
|
280
|
+
key: 1,
|
|
281
|
+
class: "epx-dashboard-div__grid",
|
|
282
|
+
items: _ctx.mobileItems($props.items),
|
|
283
|
+
grid: _ctx.gridParams,
|
|
284
|
+
"load-way": _ctx.loadWay,
|
|
285
|
+
"body-height": _ctx.bodyHeight,
|
|
286
|
+
"scroll-root-selector": ".epx-dashboard__container, .dashboard-container"
|
|
287
|
+
}, {
|
|
288
|
+
item: withCtx(({ item }) => [
|
|
289
|
+
createElementVNode("div", _hoisted_2, [
|
|
290
|
+
(openBlock(), createBlock(resolveDynamicComponent("epx-" + item.contentType), {
|
|
291
|
+
ref: `component_${item.i}`,
|
|
292
|
+
class: "epx-dashboard__component",
|
|
293
|
+
"is-dashboard": "",
|
|
294
|
+
key: item.id,
|
|
295
|
+
"comp-id": item.id,
|
|
296
|
+
"comp-title": item.title,
|
|
297
|
+
"comp-style": item.style,
|
|
298
|
+
"comp-configs": $options.getCompConfigs(item, item.id),
|
|
299
|
+
"comp-grid": _ctx.childGrid(item),
|
|
300
|
+
"chart-cache": $props.chartCache,
|
|
301
|
+
"mobile-appearance": _ctx.mobileStacked ? item.mobileAppearance : void 0,
|
|
302
|
+
items: item.items,
|
|
303
|
+
"item-configs": $props.itemConfigs,
|
|
304
|
+
theme: $props.theme
|
|
305
|
+
}, null, 8, ["comp-id", "comp-title", "comp-style", "comp-configs", "comp-grid", "chart-cache", "mobile-appearance", "items", "item-configs", "theme"]))
|
|
306
|
+
])
|
|
307
|
+
]),
|
|
308
|
+
_: 1
|
|
309
|
+
}, 8, ["items", "grid", "load-way", "body-height"])) : (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
310
|
+
createVNode(_component_epx_dashboard_design_grid, {
|
|
311
|
+
class: "epx-dashboard-div__design-grid",
|
|
312
|
+
"sub-grid-of": $options.epxDashboardDesignGrid,
|
|
313
|
+
items: $props.items,
|
|
314
|
+
grid: _ctx.gridParams,
|
|
315
|
+
"body-height": _ctx.bodyHeight,
|
|
316
|
+
"min-height": $data.designMinHeight,
|
|
317
|
+
onChange: $options.onDesignChange,
|
|
318
|
+
onTransferOut: $options.onTransferOut,
|
|
319
|
+
onTransferIn: $options.onTransferIn
|
|
320
|
+
}, {
|
|
321
|
+
item: withCtx(({ item }) => [
|
|
322
|
+
createVNode(_component_epx_dashboard_design_item, {
|
|
323
|
+
item,
|
|
324
|
+
active: !!$options.design && $options.design.isActive(item),
|
|
325
|
+
floatable: _ctx.gridParams.mode !== "float",
|
|
326
|
+
onSelect: $options.openConfigPanel
|
|
327
|
+
}, {
|
|
328
|
+
operates: withCtx(() => [
|
|
329
|
+
item.contentType === "report-chart" ? (openBlock(), createElementBlock("i", {
|
|
330
|
+
key: 0,
|
|
331
|
+
class: "component-operate__item el-icon-edit-outline",
|
|
332
|
+
onClick: ($event) => $options.designReport(item)
|
|
333
|
+
}, null, 8, _hoisted_6)) : createCommentVNode("", true),
|
|
334
|
+
createElementVNode("i", {
|
|
335
|
+
class: "component-operate__item el-icon-setting",
|
|
336
|
+
onClick: ($event) => $options.editComponent(item)
|
|
337
|
+
}, null, 8, _hoisted_7),
|
|
338
|
+
item.contentType === "report-chart" ? (openBlock(), createBlock(_component_el_dropdown, {
|
|
339
|
+
key: 1,
|
|
340
|
+
class: "componnet-dropdown",
|
|
341
|
+
onCommand: (v) => $options.deleteComponent(item, v)
|
|
342
|
+
}, {
|
|
343
|
+
dropdown: withCtx(() => [
|
|
344
|
+
createVNode(_component_el_dropdown_menu, null, {
|
|
345
|
+
default: withCtx(() => [
|
|
346
|
+
createVNode(_component_el_dropdown_item, { command: "only" }, {
|
|
347
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
348
|
+
createTextVNode("仅从仪表盘中删除", -1)
|
|
349
|
+
])]),
|
|
350
|
+
_: 1
|
|
351
|
+
}),
|
|
352
|
+
createVNode(_component_el_dropdown_item, { command: "all" }, {
|
|
353
|
+
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
354
|
+
createTextVNode("从仪表盘和报表库中删除", -1)
|
|
355
|
+
])]),
|
|
356
|
+
_: 1
|
|
357
|
+
})
|
|
358
|
+
]),
|
|
359
|
+
_: 1
|
|
360
|
+
})
|
|
361
|
+
]),
|
|
362
|
+
default: withCtx(() => [
|
|
363
|
+
_cache[3] || (_cache[3] = createElementVNode("i", { class: "component-operate__item el-icon-delete" }, null, -1))
|
|
364
|
+
]),
|
|
365
|
+
_: 1
|
|
366
|
+
}, 8, ["onCommand"])) : (openBlock(), createElementBlock("i", {
|
|
367
|
+
key: 2,
|
|
368
|
+
class: "component-operate__item el-icon-delete",
|
|
369
|
+
onClick: ($event) => $options.deleteComponent(item)
|
|
370
|
+
}, null, 8, _hoisted_8))
|
|
371
|
+
]),
|
|
372
|
+
default: withCtx(() => [
|
|
373
|
+
item.contentType && !$data.reloadComponent[item.id] ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
374
|
+
(openBlock(), createBlock(_component_epx_component, {
|
|
375
|
+
name: item.contentType,
|
|
376
|
+
ref: `component_${item.i}`,
|
|
377
|
+
class: "epx-dashboard__component",
|
|
378
|
+
"is-dashboard": "",
|
|
379
|
+
key: item.id,
|
|
380
|
+
"comp-id": item.id,
|
|
381
|
+
"comp-title": item.title,
|
|
382
|
+
"comp-style": item.style,
|
|
383
|
+
"comp-configs": $options.getCompConfigs(item, item.id),
|
|
384
|
+
"comp-grid": _ctx.childGrid(item),
|
|
385
|
+
"comp-item": item,
|
|
386
|
+
items: item.items,
|
|
387
|
+
"item-configs": $props.itemConfigs,
|
|
388
|
+
"dashboard-id": $props.dashboardId,
|
|
389
|
+
"all-component-list": $props.allComponentList,
|
|
390
|
+
theme: $options.compTheme,
|
|
391
|
+
mode: "design",
|
|
392
|
+
"mobile-appearance": _ctx.mobileStacked ? item.mobileAppearance : void 0,
|
|
393
|
+
onChangeItems: (v) => $options.changeSubItems(item, v),
|
|
394
|
+
onOpenConfig: _cache[0] || (_cache[0] = (...args) => _ctx.$emit("open-config", ...args))
|
|
395
|
+
}, null, 8, ["name", "comp-id", "comp-title", "comp-style", "comp-configs", "comp-grid", "comp-item", "items", "item-configs", "dashboard-id", "all-component-list", "theme", "mobile-appearance", "onChangeItems"]))
|
|
396
|
+
])) : (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(item.i), 1))
|
|
397
|
+
]),
|
|
398
|
+
_: 2
|
|
399
|
+
}, 1032, ["item", "active", "floatable", "onSelect"])
|
|
400
|
+
]),
|
|
401
|
+
_: 1
|
|
402
|
+
}, 8, ["sub-grid-of", "items", "grid", "body-height", "min-height", "onChange", "onTransferOut", "onTransferIn"])
|
|
403
|
+
], 512))
|
|
404
|
+
], 6);
|
|
405
|
+
}
|
|
406
|
+
const DashboardDiv = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-668cf4f9"]]);
|
|
407
|
+
export {
|
|
408
|
+
DashboardDiv as default
|
|
409
|
+
};
|