@ibiz-template/vue3-components 0.7.41-alpha.17 → 0.7.41-alpha.18
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/chart-q7pMKjYo.js +1 -0
- package/dist/ibiz-markdown-editor-e33m6ees.js +1 -0
- package/dist/index-dXwgWAM8.js +11 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/map-chart-user-NYROZ-6g.js +1 -0
- package/dist/wang-editor-4OlaBV3P.js +1 -0
- package/dist/{xlsx-util-jYyM8alm.js → xlsx-util-Rg-AbK_G.js} +1 -1
- package/es/common/control-navigation/provider/calendar-navigation.provider.mjs +3 -1
- package/es/common/control-navigation/provider/index.mjs +1 -1
- package/es/common/control-navigation/provider/map-navigation.provider.d.ts +8 -2
- package/es/common/control-navigation/provider/map-navigation.provider.mjs +20 -1
- package/es/common/map-chart-user/map-chart-user.css +1 -1
- package/es/common/map-chart-user/map-chart-user.d.ts +11 -1
- package/es/common/map-chart-user/map-chart-user.mjs +82 -6
- package/es/common/map-chart-user/map-chart-user.util.d.ts +2 -0
- package/es/common/map-chart-user/map-chart-user.util.mjs +54 -3
- package/es/common/map-chart-user/map-user-manager.d.ts +2 -0
- package/es/common/map-chart-user/map-user-manager.mjs +46 -10
- package/es/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
- package/es/control/calendar/components/calendar-daily/calendar-daily.mjs +30 -43
- package/es/control/calendar/components/calendar-daily/use-calendar-daily.d.ts +6 -2
- package/es/control/calendar/components/calendar-daily/use-calendar-daily.mjs +37 -4
- package/es/control/calendar/components/calendar-user/calendar-user.css +1 -1
- package/es/control/calendar/components/calendar-user/calendar-user.mjs +1 -0
- package/es/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/es/control/calendar/components/calendar-week/calendar-week.mjs +30 -45
- package/es/control/calendar/components/calendar-week/use-calendar-week.d.ts +6 -2
- package/es/control/calendar/components/calendar-week/use-calendar-week.mjs +37 -4
- package/es/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
- package/es/control/calendar/components/util/index.mjs +1 -1
- package/es/control/calendar/components/util/util.d.ts +30 -2
- package/es/control/calendar/components/util/util.mjs +32 -2
- package/es/control/chart/chart.mjs +1 -0
- package/es/control/data-view/data-view.d.ts +1 -1
- package/es/control/data-view/index.d.ts +1 -1
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/drtab/drtab.controller.d.ts +5 -0
- package/es/control/drtab/drtab.controller.mjs +19 -0
- package/es/control/drtab/flow-drtab.css +1 -1
- package/es/control/drtab/flow-drtab.mjs +6 -1
- package/es/control/exp-bar/render-util.mjs +1 -12
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +8 -4
- package/es/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
- package/es/control/form/form-detail/form-tab-panel/form-tab-panel.mjs +2 -1
- package/es/control/gantt/gantt.css +1 -1
- package/es/control/gantt/gantt.d.ts +4 -2
- package/es/control/gantt/gantt.mjs +130 -5
- package/es/control/gantt/index.d.ts +4 -2
- package/es/control/grid/grid/grid.d.ts +1 -1
- package/es/control/grid/grid/index.d.ts +1 -1
- package/es/control/grid/grid-column/grid-field-column/attachment-column/attachment-column.mjs +11 -2
- package/es/control/grid/grid-column/grid-field-column/attachment-column/file-util.d.ts +1 -1
- package/es/control/grid/grid-column/grid-field-column/attachment-column/file-util.mjs +39 -24
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
- package/es/control/grid/virtualized-table/index.d.ts +1 -1
- package/es/control/grid/virtualized-table/virtualized-table.d.ts +1 -1
- package/es/control/kanban/index.d.ts +1 -1
- package/es/control/kanban/kanban.d.ts +1 -1
- package/es/control/list/index.d.ts +1 -1
- package/es/control/list/list.d.ts +1 -1
- package/es/control/list/list.mjs +1 -1
- package/es/control/map/map.mjs +1 -1
- package/es/control/tree/index.d.ts +1 -1
- package/es/control/tree/tree.d.ts +5 -5
- package/es/control/tree/tree.mjs +5 -13
- package/es/control/tree-grid/index.d.ts +7 -1
- package/es/control/tree-grid/tree-grid.d.ts +7 -1
- package/es/control/tree-grid/tree-grid.mjs +62 -55
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/all-edit.mjs +3 -1
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.css +1 -1
- package/es/control/tree-grid-ex/tree-grid-ex.css +1 -1
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +32 -28
- package/es/editor/carousel/ibiz-carousel/ibiz-carousel.d.ts +2 -75
- package/es/editor/carousel/ibiz-carousel/ibiz-carousel.mjs +24 -12
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +17 -1
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +4 -2
- package/es/editor/html/wang-editor/wang-editor.mjs +29 -7
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +36 -5
- package/es/editor/upload/use/use-iview-upload.d.ts +0 -1
- package/es/editor/upload/use/use-iview-upload.mjs +50 -25
- package/es/locale/en/index.d.ts +5 -0
- package/es/locale/zh-CN/index.d.ts +5 -0
- package/es/panel-component/app-extend-menu/bottom-side-menu/bottom-side-menu.d.ts +1 -1
- package/es/panel-component/app-extend-menu/left-side-menu/left-side-menu.d.ts +1 -1
- package/es/panel-component/app-extend-menu/right-side-menu/right-side-menu.d.ts +1 -1
- package/es/panel-component/app-extend-menu/top-side-menu/top-side-menu.d.ts +1 -1
- package/es/panel-component/nav-breadcrumb/index.d.ts +1 -0
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.controller.d.ts +8 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.controller.mjs +64 -18
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.css +1 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.d.ts +3 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.mjs +14 -3
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.service.d.ts +1 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.service.mjs +5 -6
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.state.d.ts +8 -0
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.state.mjs +6 -0
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.util.d.ts +26 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.util.mjs +50 -6
- package/es/panel-component/user-message/async-action/async-data-export/async-data-export.d.ts +1 -0
- package/es/panel-component/user-message/async-action/async-data-export/async-data-export.mjs +3 -1
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/view-engine/calendar-exp-view.engine.d.ts +6 -7
- package/es/view-engine/calendar-exp-view.engine.mjs +6 -24
- package/es/view-engine/edit-view.engine.d.ts +11 -0
- package/es/view-engine/edit-view.engine.mjs +12 -0
- package/es/view-engine/login-view.engine.d.ts +11 -1
- package/es/view-engine/login-view.engine.mjs +9 -5
- package/es/view-engine/mpickup-view-engine.d.ts +8 -1
- package/es/view-engine/mpickup-view-engine.mjs +14 -8
- package/es/view-engine/pickup-view.engine.d.ts +8 -1
- package/es/view-engine/pickup-view.engine.mjs +15 -0
- package/lib/common/control-navigation/provider/calendar-navigation.provider.cjs +3 -1
- package/lib/common/control-navigation/provider/index.cjs +1 -1
- package/lib/common/control-navigation/provider/map-navigation.provider.cjs +20 -1
- package/lib/common/map-chart-user/map-chart-user.cjs +81 -5
- package/lib/common/map-chart-user/map-chart-user.css +1 -1
- package/lib/common/map-chart-user/map-chart-user.util.cjs +54 -3
- package/lib/common/map-chart-user/map-user-manager.cjs +46 -10
- package/lib/control/calendar/components/calendar-daily/calendar-daily.cjs +29 -42
- package/lib/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
- package/lib/control/calendar/components/calendar-daily/use-calendar-daily.cjs +35 -2
- package/lib/control/calendar/components/calendar-user/calendar-user.cjs +1 -0
- package/lib/control/calendar/components/calendar-user/calendar-user.css +1 -1
- package/lib/control/calendar/components/calendar-week/calendar-week.cjs +29 -44
- package/lib/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/lib/control/calendar/components/calendar-week/use-calendar-week.cjs +35 -2
- package/lib/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
- package/lib/control/calendar/components/util/index.cjs +4 -0
- package/lib/control/calendar/components/util/util.cjs +34 -0
- package/lib/control/chart/chart.cjs +1 -0
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/drtab/drtab.controller.cjs +19 -0
- package/lib/control/drtab/flow-drtab.cjs +5 -0
- package/lib/control/drtab/flow-drtab.css +1 -1
- package/lib/control/exp-bar/render-util.cjs +1 -12
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +7 -3
- package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.cjs +2 -1
- package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
- package/lib/control/gantt/gantt.cjs +129 -4
- package/lib/control/gantt/gantt.css +1 -1
- package/lib/control/grid/grid-column/grid-field-column/attachment-column/attachment-column.cjs +11 -2
- package/lib/control/grid/grid-column/grid-field-column/attachment-column/file-util.cjs +39 -24
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
- package/lib/control/list/list.cjs +1 -1
- package/lib/control/map/map.cjs +1 -1
- package/lib/control/tree/tree.cjs +5 -13
- package/lib/control/tree-grid/tree-grid.cjs +62 -55
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/all-edit.cjs +3 -1
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.css +1 -1
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +32 -28
- package/lib/control/tree-grid-ex/tree-grid-ex.css +1 -1
- package/lib/editor/carousel/ibiz-carousel/ibiz-carousel.cjs +24 -12
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +17 -1
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +4 -2
- package/lib/editor/html/wang-editor/wang-editor.cjs +29 -7
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +36 -5
- package/lib/editor/upload/use/use-iview-upload.cjs +50 -25
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.cjs +14 -3
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.controller.cjs +63 -17
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.css +1 -1
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.service.cjs +4 -5
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.state.cjs +6 -0
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.util.cjs +52 -5
- package/lib/panel-component/user-message/async-action/async-data-export/async-data-export.cjs +3 -1
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/view-engine/calendar-exp-view.engine.cjs +6 -24
- package/lib/view-engine/edit-view.engine.cjs +12 -0
- package/lib/view-engine/login-view.engine.cjs +9 -5
- package/lib/view-engine/mpickup-view-engine.cjs +14 -8
- package/lib/view-engine/pickup-view.engine.cjs +15 -0
- package/package.json +6 -6
- package/dist/chart-8QfxarWf.js +0 -1
- package/dist/ibiz-markdown-editor-0VHzFa2l.js +0 -1
- package/dist/index-t1aZ8OJE.js +0 -11
- package/dist/map-chart-user-xOSZGbF2.js +0 -1
- package/dist/wang-editor-Y8puaTx2.js +0 -1
- package/es/editor/upload/use/use-ibiz-upload.d.ts +0 -95
- package/es/editor/upload/use/use-ibiz-upload.mjs +0 -170
- package/lib/editor/upload/use/use-ibiz-upload.cjs +0 -175
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.17_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.18_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
- /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.17_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.18_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
1
2
|
import { NavgationBaseProvider } from './navigation-base.provider.mjs';
|
|
2
3
|
|
|
3
4
|
"use strict";
|
|
@@ -17,7 +18,8 @@ class CalendarNavigationProvider extends NavgationBaseProvider {
|
|
|
17
18
|
const navData = this.navStack.map((key) => items.find((item) => item.navId === key)).find((item) => item !== void 0) || items[0];
|
|
18
19
|
if (navData) {
|
|
19
20
|
const date = new Date(navData.beginTime);
|
|
20
|
-
|
|
21
|
+
if (dayjs(date).isValid())
|
|
22
|
+
this.controller.setSelectDate(date);
|
|
21
23
|
this.controller.setNavData(navData);
|
|
22
24
|
} else {
|
|
23
25
|
this.navStack = [];
|
|
@@ -8,7 +8,7 @@ function getNavigationProvider(controller) {
|
|
|
8
8
|
const { controlType } = controller.model;
|
|
9
9
|
if (controlType === "CALENDAR")
|
|
10
10
|
return new CalendarNavigationProvider(controller);
|
|
11
|
-
if (controlType === "TREEVIEW")
|
|
11
|
+
if (controlType === "TREEVIEW" || controlType === "TREEGRIDEX")
|
|
12
12
|
return new TreeNavigationProvider(controller);
|
|
13
13
|
if (controlType === "MAP")
|
|
14
14
|
return new MapNavigationProvider(controller);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IMapEvent, INavViewMsg, MapController } from '@ibiz-template/runtime';
|
|
2
2
|
import { ISysMap } from '@ibiz/model-core';
|
|
3
3
|
import { NavgationBaseProvider } from './navigation-base.provider';
|
|
4
4
|
/**
|
|
@@ -12,6 +12,12 @@ export declare class MapNavigationProvider extends NavgationBaseProvider {
|
|
|
12
12
|
keyName: string;
|
|
13
13
|
controller: MapController;
|
|
14
14
|
model: ISysMap;
|
|
15
|
+
/**
|
|
16
|
+
* @description 导航数据变化
|
|
17
|
+
* @param {IMapEvent['onNavDataChange']['event']} event
|
|
18
|
+
* @memberof MapNavigationProvider
|
|
19
|
+
*/
|
|
20
|
+
onNavDataChange(event: IMapEvent['onNavDataChange']['event']): void;
|
|
15
21
|
onNavDataByStack(): void;
|
|
16
|
-
getNavViewMsg(item:
|
|
22
|
+
getNavViewMsg(item: IData): INavViewMsg;
|
|
17
23
|
}
|
|
@@ -12,6 +12,19 @@ class MapNavigationProvider extends NavgationBaseProvider {
|
|
|
12
12
|
super(...arguments);
|
|
13
13
|
__publicField(this, "keyName", "id");
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* @description 导航数据变化
|
|
17
|
+
* @param {IMapEvent['onNavDataChange']['event']} event
|
|
18
|
+
* @memberof MapNavigationProvider
|
|
19
|
+
*/
|
|
20
|
+
onNavDataChange(event) {
|
|
21
|
+
var _a;
|
|
22
|
+
const { navData } = event;
|
|
23
|
+
if (((_a = this.navViewMsg.value) == null ? void 0 : _a.key) !== navData._id) {
|
|
24
|
+
this.navStack.unshift(navData[this.keyName]);
|
|
25
|
+
this.navViewMsg.value = this.getNavViewMsg(navData);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
15
28
|
onNavDataByStack() {
|
|
16
29
|
const { items } = this.controller.state;
|
|
17
30
|
const navData = this.navStack.map((key) => items.find((item) => item._id === key)).find((item) => item !== void 0) || items[0];
|
|
@@ -23,15 +36,21 @@ class MapNavigationProvider extends NavgationBaseProvider {
|
|
|
23
36
|
}
|
|
24
37
|
}
|
|
25
38
|
getNavViewMsg(item) {
|
|
39
|
+
var _a;
|
|
26
40
|
const { sysMapItems } = this.model;
|
|
41
|
+
const { areaCode, areaLevel } = item;
|
|
27
42
|
const itemModel = sysMapItems == null ? void 0 : sysMapItems.find((_item) => _item.id === item._mapItemId);
|
|
28
43
|
if (itemModel) {
|
|
29
44
|
const { context, params } = this.prepareParams(
|
|
30
45
|
itemModel,
|
|
31
|
-
item._deData,
|
|
46
|
+
{ ...item._deData, areaCode, areaLevel },
|
|
32
47
|
this.controller.context,
|
|
33
48
|
this.controller.params
|
|
34
49
|
);
|
|
50
|
+
if ((_a = itemModel.itemStyle) == null ? void 0 : _a.startsWith("REGION")) {
|
|
51
|
+
params.srfareacode = areaCode;
|
|
52
|
+
params.srfarealevel = areaLevel;
|
|
53
|
+
}
|
|
35
54
|
return {
|
|
36
55
|
params,
|
|
37
56
|
context,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-map-chart-user{position:relative;min-width:300px;min-height:300px}.ibiz-map-chart-user__chart{width:100%;height:100%}.ibiz-map-chart-user__goback{position:absolute;top:60px;right:0;width:100px;height:100px;font-size:var(--ibiz-font-size-header-4);color:var(--ibiz-color-link);text-decoration:underline;letter-spacing:6px;cursor:pointer}.ibiz-map-chart-user__popper{padding:var(--ibiz-spacing-
|
|
1
|
+
.ibiz-map-chart-user{position:relative;min-width:300px;min-height:300px}.ibiz-map-chart-user__chart{width:100%;height:100%}.ibiz-map-chart-user__goback{position:absolute;top:60px;right:0;width:100px;height:100px;font-size:var(--ibiz-font-size-header-4);color:var(--ibiz-color-link);text-decoration:underline;letter-spacing:6px;cursor:pointer}.ibiz-map-chart-user__fullscreen{position:absolute;top:var(--ibiz-spacing-tight);right:var(--ibiz-spacing-tight);z-index:9}.ibiz-map-chart-user__popper{padding:var(--ibiz-spacing-tight)}
|
|
@@ -49,6 +49,8 @@ export declare const IBizMapChartUser: import("vue").DefineComponent<{
|
|
|
49
49
|
pointSymbol: string;
|
|
50
50
|
jsonBaseUrl: string;
|
|
51
51
|
defaultAreaCode: string | number;
|
|
52
|
+
bottom: number;
|
|
53
|
+
top: number;
|
|
52
54
|
}>>;
|
|
53
55
|
default: () => {};
|
|
54
56
|
};
|
|
@@ -58,9 +60,13 @@ export declare const IBizMapChartUser: import("vue").DefineComponent<{
|
|
|
58
60
|
};
|
|
59
61
|
}, {
|
|
60
62
|
ns: import("@ibiz-template/core").Namespace;
|
|
63
|
+
c: MapController;
|
|
64
|
+
mapRef: import("vue").Ref<any>;
|
|
61
65
|
chartRef: import("vue").Ref<any>;
|
|
62
66
|
historyNames: import("vue").Ref<string[]>;
|
|
63
|
-
|
|
67
|
+
isFull: import("vue").Ref<boolean>;
|
|
68
|
+
onBack: () => Promise<void>;
|
|
69
|
+
toggleFullScreen: () => void;
|
|
64
70
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
65
71
|
areaData: {
|
|
66
72
|
type: {
|
|
@@ -109,6 +115,8 @@ export declare const IBizMapChartUser: import("vue").DefineComponent<{
|
|
|
109
115
|
pointSymbol: string;
|
|
110
116
|
jsonBaseUrl: string;
|
|
111
117
|
defaultAreaCode: string | number;
|
|
118
|
+
bottom: number;
|
|
119
|
+
top: number;
|
|
112
120
|
}>>;
|
|
113
121
|
default: () => {};
|
|
114
122
|
};
|
|
@@ -131,6 +139,8 @@ export declare const IBizMapChartUser: import("vue").DefineComponent<{
|
|
|
131
139
|
pointSymbol: string;
|
|
132
140
|
jsonBaseUrl: string;
|
|
133
141
|
defaultAreaCode: string | number;
|
|
142
|
+
bottom: number;
|
|
143
|
+
top: number;
|
|
134
144
|
}>;
|
|
135
145
|
}, {}>;
|
|
136
146
|
export default IBizMapChartUser;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { computed, onMounted, createVNode, defineComponent } from 'vue';
|
|
1
|
+
import { ref, computed, onMounted, onBeforeUnmount, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { mergeDeepLeft, isNil, mergeDeepWithKey } from 'ramda';
|
|
3
3
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
4
4
|
import { MapController } from '@ibiz-template/runtime';
|
|
5
|
+
import { NOOP, listenJSEvent } from '@ibiz-template/core';
|
|
6
|
+
import { toNumber } from 'lodash-es';
|
|
5
7
|
import { defaultOpts, getTooltip, getVisualMap, getPointStaticOption, getPointOption, getAreaStaticOption, getAreaOption } from './map-chart-user.util.mjs';
|
|
6
8
|
import { useMapManager } from './map-user-manager.mjs';
|
|
7
9
|
import './map-chart-user.css';
|
|
@@ -29,6 +31,8 @@ const IBizMapChartUser = /* @__PURE__ */ defineComponent({
|
|
|
29
31
|
const ns = useNamespace("map-chart-user");
|
|
30
32
|
const c = props.controller;
|
|
31
33
|
let option = defaultOpts;
|
|
34
|
+
const mapRef = ref();
|
|
35
|
+
const isFull = ref(false);
|
|
32
36
|
if (c.controlParams.defaultopts) {
|
|
33
37
|
const data = JSON.parse(c.controlParams.defaultopts);
|
|
34
38
|
option = mergeDeepLeft(data, option);
|
|
@@ -38,9 +42,12 @@ const IBizMapChartUser = /* @__PURE__ */ defineComponent({
|
|
|
38
42
|
return isNil(z) ? x : z;
|
|
39
43
|
}, option, props.options);
|
|
40
44
|
});
|
|
45
|
+
let cleanup = NOOP;
|
|
41
46
|
const {
|
|
42
47
|
chartRef,
|
|
43
48
|
historyNames,
|
|
49
|
+
processing,
|
|
50
|
+
areaLevelMap,
|
|
44
51
|
changeMap,
|
|
45
52
|
getCityInfo,
|
|
46
53
|
goBack
|
|
@@ -54,13 +61,21 @@ const IBizMapChartUser = /* @__PURE__ */ defineComponent({
|
|
|
54
61
|
...getPointStaticOption(options.value),
|
|
55
62
|
...getPointOption(pointData, areaData)
|
|
56
63
|
};
|
|
64
|
+
const {
|
|
65
|
+
top,
|
|
66
|
+
bottom
|
|
67
|
+
} = options.value;
|
|
57
68
|
const areaOption = {
|
|
69
|
+
top,
|
|
70
|
+
bottom,
|
|
58
71
|
...getAreaStaticOption(options.value),
|
|
59
72
|
...getAreaOption(mapName, pointData, areaData, cityInfo)
|
|
60
73
|
};
|
|
61
74
|
const result = {
|
|
62
75
|
geo: {
|
|
63
|
-
map: mapName
|
|
76
|
+
map: mapName,
|
|
77
|
+
top,
|
|
78
|
+
bottom
|
|
64
79
|
},
|
|
65
80
|
tooltip,
|
|
66
81
|
visualMap,
|
|
@@ -78,24 +93,85 @@ const IBizMapChartUser = /* @__PURE__ */ defineComponent({
|
|
|
78
93
|
const areaCode = c.state.strAreaCode ? "".concat(name) : Number(name);
|
|
79
94
|
c.state.areaCode = areaCode;
|
|
80
95
|
changeMap(name, areaCode, true);
|
|
96
|
+
c.evt.on("onDrillDown", async (args) => {
|
|
97
|
+
if (!processing.value) {
|
|
98
|
+
const {
|
|
99
|
+
data
|
|
100
|
+
} = args;
|
|
101
|
+
const code = data.areaCode;
|
|
102
|
+
const curAreaCode = c.state.strAreaCode ? "".concat(code) : Number(code);
|
|
103
|
+
const areaLevel = areaLevelMap.get(toNumber(curAreaCode)) || "";
|
|
104
|
+
c.state.areaCode = curAreaCode;
|
|
105
|
+
c.state.areaLevel = areaLevel;
|
|
106
|
+
await changeMap(code, code);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
c.evt.on("onBackClick", () => {
|
|
110
|
+
if (!processing.value) {
|
|
111
|
+
goBack();
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
cleanup = listenJSEvent(window, "resize", () => {
|
|
115
|
+
if (isFull.value) {
|
|
116
|
+
isFull.value = ibiz.fullscreenUtil.isFullScreen;
|
|
117
|
+
}
|
|
118
|
+
});
|
|
81
119
|
});
|
|
120
|
+
onBeforeUnmount(() => {
|
|
121
|
+
if (cleanup !== NOOP) {
|
|
122
|
+
cleanup();
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
const onBack = async () => {
|
|
126
|
+
processing.value = true;
|
|
127
|
+
await c.evt.emit("onBackClick", void 0);
|
|
128
|
+
goBack();
|
|
129
|
+
processing.value = false;
|
|
130
|
+
};
|
|
131
|
+
const toggleFullScreen = () => {
|
|
132
|
+
if (mapRef.value) {
|
|
133
|
+
if (isFull.value) {
|
|
134
|
+
ibiz.fullscreenUtil.closeElementFullscreen();
|
|
135
|
+
} else {
|
|
136
|
+
ibiz.fullscreenUtil.openElementFullscreen(mapRef.value);
|
|
137
|
+
}
|
|
138
|
+
isFull.value = !isFull.value;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
82
141
|
return {
|
|
83
142
|
ns,
|
|
143
|
+
c,
|
|
144
|
+
mapRef,
|
|
84
145
|
chartRef,
|
|
85
146
|
historyNames,
|
|
86
|
-
|
|
147
|
+
isFull,
|
|
148
|
+
onBack,
|
|
149
|
+
toggleFullScreen
|
|
87
150
|
};
|
|
88
151
|
},
|
|
89
152
|
render() {
|
|
153
|
+
const {
|
|
154
|
+
enabledFullScreen
|
|
155
|
+
} = this.c.state;
|
|
90
156
|
return createVNode("div", {
|
|
91
|
-
"class": this.ns.b()
|
|
92
|
-
|
|
157
|
+
"class": this.ns.b(),
|
|
158
|
+
"ref": "mapRef"
|
|
159
|
+
}, [enabledFullScreen ? createVNode(resolveComponent("el-button"), {
|
|
160
|
+
"type": "info",
|
|
161
|
+
"class": this.ns.e("fullscreen"),
|
|
162
|
+
"onClick": this.toggleFullScreen,
|
|
163
|
+
"title": this.isFull ? ibiz.i18n.t("app.cancelFullscreen") : ibiz.i18n.t("app.fullscreen")
|
|
164
|
+
}, {
|
|
165
|
+
default: () => [createVNode("ion-icon", {
|
|
166
|
+
"name": this.isFull ? "contract-outline" : "expand-outline"
|
|
167
|
+
}, null)]
|
|
168
|
+
}) : null, createVNode("div", {
|
|
93
169
|
"class": this.ns.e("chart"),
|
|
94
170
|
"ref": "chartRef"
|
|
95
171
|
}, null), this.historyNames.length > 1 && createVNode("div", {
|
|
96
172
|
"class": this.ns.e("goback"),
|
|
97
173
|
"onClick": () => {
|
|
98
|
-
this.
|
|
174
|
+
this.onBack();
|
|
99
175
|
}
|
|
100
176
|
}, [ibiz.i18n.t("app.return")])]);
|
|
101
177
|
}
|
|
@@ -27,6 +27,8 @@ export declare const defaultOpts: {
|
|
|
27
27
|
jsonBaseUrl: string;
|
|
28
28
|
/** 默认打开的区域编码 */
|
|
29
29
|
defaultAreaCode: string | number;
|
|
30
|
+
bottom: number;
|
|
31
|
+
top: number;
|
|
30
32
|
};
|
|
31
33
|
export type MapOptions = typeof defaultOpts;
|
|
32
34
|
export declare const findData: (id: string, type: 'area' | 'point', pointData?: IData[], areaData?: IData[]) => IData | undefined;
|
|
@@ -36,7 +36,30 @@ const defaultOpts = {
|
|
|
36
36
|
/** 地图json数据基础路径 */
|
|
37
37
|
jsonBaseUrl: "".concat(ibiz.env.assetsUrl, "/json/map"),
|
|
38
38
|
/** 默认打开的区域编码 */
|
|
39
|
-
defaultAreaCode: 1e5
|
|
39
|
+
defaultAreaCode: 1e5,
|
|
40
|
+
// 距离底部距离
|
|
41
|
+
bottom: 20,
|
|
42
|
+
// 距离顶部距离
|
|
43
|
+
top: 20
|
|
44
|
+
};
|
|
45
|
+
const getItemStyle = (item) => {
|
|
46
|
+
const itemStyle = [];
|
|
47
|
+
if (item._color) {
|
|
48
|
+
itemStyle.push("color:".concat(item._color));
|
|
49
|
+
}
|
|
50
|
+
if (item._bgcolor) {
|
|
51
|
+
itemStyle.push("background:".concat(item._bgcolor));
|
|
52
|
+
}
|
|
53
|
+
if (item._borderColor) {
|
|
54
|
+
itemStyle.push("border-color:".concat(item._borderColor));
|
|
55
|
+
}
|
|
56
|
+
if (item._borderWidth) {
|
|
57
|
+
itemStyle.push("border-width:".concat(item._borderWidth, "px"));
|
|
58
|
+
}
|
|
59
|
+
if (item._borderWidth && item._borderColor) {
|
|
60
|
+
itemStyle.push("border-style:solid");
|
|
61
|
+
}
|
|
62
|
+
return itemStyle.join(";");
|
|
40
63
|
};
|
|
41
64
|
const findData = (id, type, pointData = [], areaData = []) => {
|
|
42
65
|
if (type === "area") {
|
|
@@ -98,7 +121,21 @@ const getPointOption = (pointData, areaData) => {
|
|
|
98
121
|
return;
|
|
99
122
|
}
|
|
100
123
|
const find = findData(params.data._id, "point", pointData, areaData);
|
|
101
|
-
|
|
124
|
+
if (!find) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
const { _deData: data } = find;
|
|
128
|
+
let text = data.srfmajortext;
|
|
129
|
+
if (find._value) {
|
|
130
|
+
text = "".concat(data.srfmajortext, ": ").concat(find._value);
|
|
131
|
+
}
|
|
132
|
+
if (find._tooltip) {
|
|
133
|
+
text = find._tooltip;
|
|
134
|
+
}
|
|
135
|
+
const style = getItemStyle(find);
|
|
136
|
+
return '<div style="'.concat(style, '" class="').concat(find._className, " ").concat(ns.e(
|
|
137
|
+
"popper"
|
|
138
|
+
), '">').concat(text, "</div>");
|
|
102
139
|
},
|
|
103
140
|
padding: 0
|
|
104
141
|
};
|
|
@@ -157,7 +194,21 @@ const getAreaOption = (mapName, pointData, areaData, cityInfo = []) => {
|
|
|
157
194
|
return;
|
|
158
195
|
}
|
|
159
196
|
const find = findData(params.data._id, "area", pointData, areaData);
|
|
160
|
-
|
|
197
|
+
if (!find || !find._tooltip && !find._value) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
const { _deData: data } = find;
|
|
201
|
+
let text = data.srfmajortext;
|
|
202
|
+
if (find._value) {
|
|
203
|
+
text = "".concat(data.srfmajortext, ": ").concat(find._value);
|
|
204
|
+
}
|
|
205
|
+
if (find._tooltip) {
|
|
206
|
+
text = find._tooltip;
|
|
207
|
+
}
|
|
208
|
+
const style = getItemStyle(find);
|
|
209
|
+
return '<div style="'.concat(style, '" class="').concat(find._className, " ").concat(ns.e(
|
|
210
|
+
"popper"
|
|
211
|
+
), '">').concat(text, "</div>");
|
|
161
212
|
},
|
|
162
213
|
padding: 0
|
|
163
214
|
};
|
|
@@ -14,6 +14,8 @@ export declare function useMapManager(controller: MapController, opts: ComputedR
|
|
|
14
14
|
chartRef: import("vue").Ref<any>;
|
|
15
15
|
historyNames: import("vue").Ref<string[]>;
|
|
16
16
|
currentName: import("vue").Ref<string>;
|
|
17
|
+
processing: import("vue").Ref<boolean>;
|
|
18
|
+
areaLevelMap: Map<number, string>;
|
|
17
19
|
changeMap: (name: string | number, areaCode: string | number, isInit?: boolean) => Promise<void>;
|
|
18
20
|
getCityInfo: () => import("@ibiz-template/core").IApiData | undefined;
|
|
19
21
|
goBack: () => Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { registerMap, init } from 'echarts';
|
|
2
2
|
import { ref, onMounted, onUnmounted } from 'vue';
|
|
3
3
|
import { listenJSEvent } from '@ibiz-template/core';
|
|
4
|
+
import { toNumber } from 'lodash-es';
|
|
4
5
|
import { getJsonUrl, findData } from './map-chart-user.util.mjs';
|
|
5
6
|
|
|
6
7
|
"use strict";
|
|
@@ -8,6 +9,8 @@ function useMapManager(controller, opts, calcEchartsOpts) {
|
|
|
8
9
|
const mapInfos = /* @__PURE__ */ new Map();
|
|
9
10
|
const currentName = ref("");
|
|
10
11
|
const historyNames = ref([]);
|
|
12
|
+
const areaLevelMap = /* @__PURE__ */ new Map();
|
|
13
|
+
const processing = ref(false);
|
|
11
14
|
let chart;
|
|
12
15
|
const chartRef = ref();
|
|
13
16
|
let resizeObserver;
|
|
@@ -17,8 +20,9 @@ function useMapManager(controller, opts, calcEchartsOpts) {
|
|
|
17
20
|
noChild: json.features.length === 1
|
|
18
21
|
};
|
|
19
22
|
json.features.forEach((item) => {
|
|
20
|
-
const { adcode, name } = item.properties;
|
|
23
|
+
const { adcode, name, level } = item.properties;
|
|
21
24
|
info.cityNames[adcode] = name;
|
|
25
|
+
areaLevelMap.set(adcode, level);
|
|
22
26
|
});
|
|
23
27
|
return info;
|
|
24
28
|
};
|
|
@@ -46,15 +50,18 @@ function useMapManager(controller, opts, calcEchartsOpts) {
|
|
|
46
50
|
}
|
|
47
51
|
};
|
|
48
52
|
const changeMap = async (name, areaCode, isInit = false) => {
|
|
49
|
-
if (!isInit) {
|
|
50
|
-
controller.onMapChange(areaCode);
|
|
51
|
-
}
|
|
52
53
|
const strName = "".concat(name);
|
|
53
54
|
if (!mapInfos.has(strName)) {
|
|
54
55
|
await registerMap$1(strName);
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
+
if (!isInit) {
|
|
58
|
+
controller.onMapChange(areaCode);
|
|
59
|
+
} else {
|
|
60
|
+
const areaLevel = areaLevelMap.get(toNumber(areaCode)) || "";
|
|
61
|
+
controller.state.areaLevel = areaLevel;
|
|
62
|
+
}
|
|
57
63
|
currentName.value = strName;
|
|
64
|
+
controller.state.mapInfo = getCityInfo();
|
|
58
65
|
historyNames.value.push(strName);
|
|
59
66
|
refresh();
|
|
60
67
|
};
|
|
@@ -63,8 +70,9 @@ function useMapManager(controller, opts, calcEchartsOpts) {
|
|
|
63
70
|
historyNames.value.pop();
|
|
64
71
|
const name = historyNames.value.pop();
|
|
65
72
|
const areaCode = opts.value.strAreaCode ? "".concat(name) : Number(name);
|
|
73
|
+
const areaLevel = areaLevelMap.get(toNumber(areaCode)) || "";
|
|
66
74
|
controller.state.areaCode = areaCode;
|
|
67
|
-
|
|
75
|
+
controller.state.areaLevel = areaLevel;
|
|
68
76
|
changeMap(name, areaCode);
|
|
69
77
|
}
|
|
70
78
|
};
|
|
@@ -88,27 +96,53 @@ function useMapManager(controller, opts, calcEchartsOpts) {
|
|
|
88
96
|
if (!params.data) {
|
|
89
97
|
return;
|
|
90
98
|
}
|
|
99
|
+
processing.value = true;
|
|
91
100
|
const { pointData, areaData } = controller.state;
|
|
92
101
|
const data = findData(params.data._id, "point", pointData, areaData);
|
|
93
102
|
if (data) {
|
|
94
103
|
controller.onPointClick(data);
|
|
95
104
|
}
|
|
105
|
+
processing.value = false;
|
|
96
106
|
return;
|
|
97
107
|
}
|
|
98
108
|
if (params.seriesType === "map") {
|
|
109
|
+
processing.value = true;
|
|
99
110
|
const areaCode = opts.value.strAreaCode ? "".concat(params.name) : Number(params.name);
|
|
100
|
-
|
|
101
|
-
const { pointData, areaData, enabledDrillDown } = controller.state;
|
|
111
|
+
const areaLevel = areaLevelMap.get(toNumber(areaCode)) || "";
|
|
112
|
+
const { pointData, areaData, enabledDrillDown, mdctrlActiveMode } = controller.state;
|
|
102
113
|
if (params.data) {
|
|
103
114
|
const data = findData(params.data._id, "area", pointData, areaData);
|
|
104
115
|
if (data) {
|
|
105
|
-
controller.onAreaClick(data);
|
|
116
|
+
controller.onAreaClick(data, areaCode, areaLevel);
|
|
106
117
|
}
|
|
107
118
|
}
|
|
108
|
-
if (params.name !== currentName.value && enabledDrillDown) {
|
|
119
|
+
if (params.name !== currentName.value && enabledDrillDown && mdctrlActiveMode !== 2) {
|
|
120
|
+
if (toNumber(areaCode) > toNumber(controller.state.areaCode)) {
|
|
121
|
+
controller.evt.emit("onDrillDown", { data: { areaCode } });
|
|
122
|
+
}
|
|
123
|
+
controller.state.areaCode = areaCode;
|
|
124
|
+
controller.state.areaLevel = areaLevel || "";
|
|
109
125
|
changeMap(params.name, areaCode);
|
|
110
126
|
}
|
|
127
|
+
processing.value = false;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
chart.on("dblclick", (params) => {
|
|
132
|
+
const { enabledDrillDown, mdctrlActiveMode } = controller.state;
|
|
133
|
+
if (params.componentType === "series" && params.seriesType === "map" && mdctrlActiveMode === 2 && enabledDrillDown) {
|
|
134
|
+
processing.value = true;
|
|
135
|
+
const areaCode = opts.value.strAreaCode ? "".concat(params.name) : Number(params.name);
|
|
136
|
+
const areaLevel = areaLevelMap.get(toNumber(areaCode)) || "";
|
|
137
|
+
if (toNumber(areaCode) > toNumber(controller.state.areaCode)) {
|
|
138
|
+
controller.evt.emit("onDrillDown", { data: { areaCode } });
|
|
139
|
+
}
|
|
140
|
+
controller.state.areaCode = areaCode;
|
|
141
|
+
controller.state.areaLevel = areaLevel;
|
|
142
|
+
if (params.name !== currentName.value) {
|
|
143
|
+
changeMap(params.name, areaCode);
|
|
111
144
|
}
|
|
145
|
+
processing.value = false;
|
|
112
146
|
}
|
|
113
147
|
});
|
|
114
148
|
chart.on("mouseover", function(data) {
|
|
@@ -145,6 +179,8 @@ function useMapManager(controller, opts, calcEchartsOpts) {
|
|
|
145
179
|
chartRef,
|
|
146
180
|
historyNames,
|
|
147
181
|
currentName,
|
|
182
|
+
processing,
|
|
183
|
+
areaLevelMap,
|
|
148
184
|
changeMap,
|
|
149
185
|
getCityInfo,
|
|
150
186
|
goBack,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-calendar-daily{width:100%;height:100%;flex:1;display:flex;flex-direction:column;overflow:hidden}.ibiz-calendar-daily__calendar-daily__head{width:100%;height:58px;min-height:58px;padding-bottom:0;display:flex;position:relative;z-index:100}.ibiz-calendar-daily__allday-info{min-width:90px;height:100%;padding-left:40px;color:var(--ibiz-color-text-3);overflow:hidden;display:flex;align-items:center}.ibiz-calendar-daily__allday-info--work-items{width:100%;height:100%;padding-top:5px;overflow:hidden}.ibiz-calendar-daily__allday-info--work-items-scroll{height:100%;overflow-y:scroll;overflow-x:hidden}.ibiz-calendar-daily__allday-info--work-items-body{height:auto}.ibiz-calendar-daily__allday-info--work-items-body:has(.ibiz-no-data){height:100%}.ibiz-calendar-daily__allday-info--work-items-body:has(.ibiz-no-data) .ibiz-no-data{min-height:100%;min-width:100%}.ibiz-calendar-daily__allday-info--work-items-body:has(.ibiz-no-data) .ibiz-no-data .el-empty__description{margin:0}.ibiz-calendar-daily__allday-info--event-box{width:100%;height:22px;line-height:22px;padding:0 8px;margin-top:4px}.ibiz-calendar-daily__allday-info--event-box:nth-child(1){margin-top:0}.ibiz-calendar-daily__allday-info--event-content{display:block;width:100%;height:100%;border:none;outline:0;text-align:left;border-radius:4px;background:var(--ibiz-color-tertiary-light-hover);
|
|
1
|
+
.ibiz-calendar-daily{width:100%;height:100%;flex:1;display:flex;flex-direction:column;overflow:hidden}.ibiz-calendar-daily__calendar-daily__head{width:100%;height:58px;min-height:58px;padding-bottom:0;display:flex;position:relative;z-index:100}.ibiz-calendar-daily__allday-info{min-width:90px;height:100%;padding-left:40px;color:var(--ibiz-color-text-3);overflow:hidden;display:flex;align-items:center}.ibiz-calendar-daily__allday-info--work-items{width:100%;height:100%;padding-top:5px;overflow:hidden}.ibiz-calendar-daily__allday-info--work-items-scroll{height:100%;overflow-y:scroll;overflow-x:hidden}.ibiz-calendar-daily__allday-info--work-items-body{height:auto}.ibiz-calendar-daily__allday-info--work-items-body:has(.ibiz-no-data){height:100%}.ibiz-calendar-daily__allday-info--work-items-body:has(.ibiz-no-data) .ibiz-no-data{min-height:100%;min-width:100%}.ibiz-calendar-daily__allday-info--work-items-body:has(.ibiz-no-data) .ibiz-no-data .el-empty__description{margin:0}.ibiz-calendar-daily__allday-info--event-box{width:100%;height:22px;line-height:22px;padding:0 8px;margin-top:4px}.ibiz-calendar-daily__allday-info--event-box:nth-child(1){margin-top:0}.ibiz-calendar-daily__allday-info--event-content{display:block;width:100%;height:100%;border:none;outline:0;text-align:left;border-radius:4px;background:var(--ibiz-color-tertiary-light-hover);position:relative;cursor:pointer}.ibiz-calendar-daily__allday-info--event-content.is-selected-event{padding-right:20px}.ibiz-calendar-daily__allday-info--event-summary{width:100%;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-calendar-daily__allday-info--event-icon{margin-right:6px}.ibiz-calendar-daily__allday-info--event-name{margin-right:6px}.ibiz-calendar-daily__allday-info--time-range{margin-right:6px}.ibiz-calendar-daily__allday-info--check{color:var(--ibiz-color-primary);position:absolute;right:6px;top:50%;transform:translate(0,-50%)}.ibiz-calendar-daily__allday-resize-line{width:100%;height:3px;background-color:var(--ibiz-color-border)}.ibiz-calendar-daily__resizable-handle{width:100%;height:10px;position:absolute;bottom:-4px;display:flex;align-items:center;cursor:row-resize}.ibiz-calendar-daily__scroll-area{flex:1;overflow-y:scroll;overflow-x:hidden}.ibiz-calendar-daily__time-pane{height:auto;width:calc(100% - 5px);display:flex;flex-basis:0%;flex-grow:1;flex-shrink:1;position:relative}.ibiz-calendar-daily__time-pane--time-labels{width:90px;min-width:90px;padding:27px 0 27px 40px;border-right:1px solid var(--ibiz-color-border);position:sticky;left:0}.ibiz-calendar-daily__time-pane--time-label{margin-top:38px;height:22px;text-align:left}.ibiz-calendar-daily__time-pane--time-label:nth-child(1){height:22px;margin-top:22px}.ibiz-calendar-daily__time-pane--time-columns{position:relative;flex:1;padding-bottom:59px}.ibiz-calendar-daily__time-pane--time-column{height:60px;border-top:1px dashed var(--ibiz-color-border)}.ibiz-calendar-daily__time-pane--time-column:first-child{border-top:none}.ibiz-calendar-daily__time-pane--time-column-last{border-bottom:1px dashed var(--ibiz-color-border)}.ibiz-calendar-daily__time-pane--event-timed-container{position:absolute;top:0;width:100%;height:100%;overflow:hidden}.ibiz-calendar-daily__time-pane--container-scroll{position:relative;top:0;overflow:auto;height:100%;width:auto;overflow-y:hidden;overflow-x:auto}.ibiz-calendar-daily__time-pane--event-box{position:absolute;width:auto;height:auto;padding-left:4px}.ibiz-calendar-daily__time-pane--event-content{position:relative;z-index:3;width:100%;height:100%;min-height:22px;padding:8px;overflow:hidden;line-height:100%;text-align:left;cursor:pointer;border:none;outline:0}.ibiz-calendar-daily__time-pane--event-content.is-selected-event{border:1px solid var(--ibiz-color-primary)}.ibiz-calendar-daily__time-pane--event-summary{width:100%;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-calendar-daily__time-pane--event-summary>span{margin-right:4px}.ibiz-calendar-daily__time-pane--current-time{width:calc(100% - 36px);margin-left:40px;position:absolute;top:38px;left:-3px;height:2px;background-color:var(--ibiz-color-primary);display:flex;align-items:center}.ibiz-calendar-daily__time-pane--current-time-label{width:48px;min-width:48px;max-width:18px;height:24px;text-align:center;line-height:24px;border:none;border-radius:4px;background:var(--ibiz-color-primary);color:var(--ibiz-color-primary-text)}.ibiz-calendar-daily__event-popover{width:auto;height:auto;padding:0}.ibiz-calendar-daily__event-popover.ibiz-popover{position:absolute;z-index:110;padding:var(--ibiz-spacing-tight);background:var(--ibiz-color-bg-1);border:none;box-shadow:var(--ibiz-shadow-elevated)}.ibiz-calendar-daily__event-popover:has(.ibiz-control-calendar-item-default){display:none!important}.ibiz-calendar-daily__event-popover--body{width:auto;height:auto;overflow:hidden}.ibiz-calendar-daily__event-popover--scroll{width:auto;min-width:200px;height:auto;max-height:80%;overflow:auto;pointer-events:none}.ibiz-calendar-daily__event-popover--scroll .ibiz-control-calendar-item:last-child{margin-bottom:0}.ibiz-calendar-daily__event-popover--scroll .ibiz-control-calendar-item.is-active{background-color:transparent;border-color:transparent}
|
|
@@ -6,7 +6,7 @@ import '../util/index.mjs';
|
|
|
6
6
|
import { useCalendarDaily } from './use-calendar-daily.mjs';
|
|
7
7
|
import './calendar-daily.css';
|
|
8
8
|
import { calendarDailyProps, calendarDailyEmits } from '../interface/calendar-daily.mjs';
|
|
9
|
-
import {
|
|
9
|
+
import { isToday } from '../util/util.mjs';
|
|
10
10
|
|
|
11
11
|
"use strict";
|
|
12
12
|
const CalendarDaily = /* @__PURE__ */ defineComponent({
|
|
@@ -33,8 +33,11 @@ const CalendarDaily = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
handleDragStart,
|
|
34
34
|
handleCurTime,
|
|
35
35
|
initDrawData,
|
|
36
|
-
eventContextmenu
|
|
37
|
-
|
|
36
|
+
eventContextmenu,
|
|
37
|
+
contentMousemove,
|
|
38
|
+
eventMouseenter,
|
|
39
|
+
eventMouseleave
|
|
40
|
+
} = useCalendarDaily(props, emit, ns);
|
|
38
41
|
watch(() => props.selectedData, () => {
|
|
39
42
|
if (props.selectedData && props.selectedData.length > 0) {
|
|
40
43
|
const data = props.selectedData.length > selectedData.value.length ? props.selectedData : selectedData.value;
|
|
@@ -58,6 +61,23 @@ const CalendarDaily = /* @__PURE__ */ defineComponent({
|
|
|
58
61
|
curTimeTimer.value = null;
|
|
59
62
|
}
|
|
60
63
|
});
|
|
64
|
+
const renderPopoverContent = (_event) => {
|
|
65
|
+
var _a;
|
|
66
|
+
const _tempEvent = {
|
|
67
|
+
..._event,
|
|
68
|
+
color: "",
|
|
69
|
+
bkColor: ""
|
|
70
|
+
};
|
|
71
|
+
return createVNode("div", {
|
|
72
|
+
"class": [ns.em("event-popover", "body")]
|
|
73
|
+
}, [createVNode("div", {
|
|
74
|
+
"class": [ns.em("event-popover", "scroll")]
|
|
75
|
+
}, [(slots == null ? void 0 : slots.event) ? (_a = slots.event) == null ? void 0 : _a.call(slots, {
|
|
76
|
+
data: _tempEvent
|
|
77
|
+
}) : createVNode("div", {
|
|
78
|
+
"class": [ns.em("event-popover", "content")]
|
|
79
|
+
}, ["".concat(_event.text || "", " ").concat(_event.timeRange || "")])])]);
|
|
80
|
+
};
|
|
61
81
|
const renderEventItem = (location, eventBoxStyle, eventContentStyle, event, index, slotNme, classEName) => {
|
|
62
82
|
var _a;
|
|
63
83
|
let title = "".concat(event.text || "");
|
|
@@ -66,6 +86,7 @@ const CalendarDaily = /* @__PURE__ */ defineComponent({
|
|
|
66
86
|
title = showTitle(title) || "";
|
|
67
87
|
if (props.showDetail)
|
|
68
88
|
title = "";
|
|
89
|
+
const component = renderPopoverContent(event);
|
|
69
90
|
return createVNode("div", {
|
|
70
91
|
"key": index,
|
|
71
92
|
"class": [ns.em(classEName, "event-box")],
|
|
@@ -79,6 +100,8 @@ const CalendarDaily = /* @__PURE__ */ defineComponent({
|
|
|
79
100
|
handleEventDblClick(event, "head");
|
|
80
101
|
},
|
|
81
102
|
"onContextmenu": (e) => eventContextmenu(event, e),
|
|
103
|
+
"onMouseenter": (_e) => eventMouseenter(_e, component, location),
|
|
104
|
+
"onMouseleave": eventMouseleave,
|
|
82
105
|
"style": eventContentStyle,
|
|
83
106
|
"title": title
|
|
84
107
|
}, [slots[slotNme] ? (_a = slots[slotNme]) == null ? void 0 : _a.call(slots, {
|
|
@@ -96,41 +119,6 @@ const CalendarDaily = /* @__PURE__ */ defineComponent({
|
|
|
96
119
|
"class": ["fa fa-check", ns.em(classEName, "check")]
|
|
97
120
|
}, null) : ""])]);
|
|
98
121
|
};
|
|
99
|
-
const renderPopover = (content, event, placement) => {
|
|
100
|
-
if (!props.showDetail) {
|
|
101
|
-
return content;
|
|
102
|
-
}
|
|
103
|
-
const _tempEvent = {
|
|
104
|
-
...event,
|
|
105
|
-
color: "",
|
|
106
|
-
bkColor: ""
|
|
107
|
-
};
|
|
108
|
-
return createVNode(resolveComponent("el-popover"), {
|
|
109
|
-
"show-after": 100,
|
|
110
|
-
"offset": 4,
|
|
111
|
-
"width": "auto",
|
|
112
|
-
"popper-class": [ns.e("event-popover")],
|
|
113
|
-
"placement": placement || "right-start"
|
|
114
|
-
}, {
|
|
115
|
-
reference: () => content,
|
|
116
|
-
default: () => {
|
|
117
|
-
var _a;
|
|
118
|
-
return createVNode("div", {
|
|
119
|
-
"class": [ns.em("event-popover", "body")]
|
|
120
|
-
}, [createVNode("div", {
|
|
121
|
-
"class": [ns.em("event-popover", "close")],
|
|
122
|
-
"onClick": (el) => handlePopClose(el),
|
|
123
|
-
"innerHTML": closeIcon
|
|
124
|
-
}, null), createVNode("div", {
|
|
125
|
-
"class": [ns.em("event-popover", "scroll")]
|
|
126
|
-
}, [(slots == null ? void 0 : slots.event) ? (_a = slots.event) == null ? void 0 : _a.call(slots, {
|
|
127
|
-
data: _tempEvent
|
|
128
|
-
}) : createVNode("div", {
|
|
129
|
-
"class": [ns.em("event-popover", "content")]
|
|
130
|
-
}, ["".concat(event.text || "", " ").concat(event.timeRange || "")])])]);
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
122
|
const renderHeader = () => {
|
|
135
123
|
return createVNode("div", {
|
|
136
124
|
"class": [ns.e("calendar-daily__head")],
|
|
@@ -150,8 +138,7 @@ const CalendarDaily = /* @__PURE__ */ defineComponent({
|
|
|
150
138
|
const eventContentStyle = {
|
|
151
139
|
background: event.bkColorFade
|
|
152
140
|
};
|
|
153
|
-
|
|
154
|
-
return renderPopover(tempContent, event, "bottom");
|
|
141
|
+
return renderEventItem("header", eventBoxStyle, eventContentStyle, event, index, "head-event", "allday-info");
|
|
155
142
|
}) : createVNode(resolveComponent("iBizNoData"), {
|
|
156
143
|
"hideNoDataImage": true
|
|
157
144
|
}, null)])])]), createVNode("div", {
|
|
@@ -165,7 +152,8 @@ const CalendarDaily = /* @__PURE__ */ defineComponent({
|
|
|
165
152
|
};
|
|
166
153
|
const renderContent = () => {
|
|
167
154
|
return createVNode("div", {
|
|
168
|
-
"class": [ns.e("scroll-area")]
|
|
155
|
+
"class": [ns.e("scroll-area")],
|
|
156
|
+
"onMousemove": contentMousemove
|
|
169
157
|
}, [createVNode("div", {
|
|
170
158
|
"class": ns.e("time-pane")
|
|
171
159
|
}, [createVNode("div", {
|
|
@@ -199,8 +187,7 @@ const CalendarDaily = /* @__PURE__ */ defineComponent({
|
|
|
199
187
|
background: event.bkColorFade,
|
|
200
188
|
"border-left": "3px solid ".concat(event.bkColor)
|
|
201
189
|
};
|
|
202
|
-
|
|
203
|
-
return renderPopover(tempContent, event);
|
|
190
|
+
return renderEventItem("content", eventBoxStyle, eventContentStyle, event, index, "", "time-pane");
|
|
204
191
|
})])])]), isToday(props == null ? void 0 : props.selectedDay, /* @__PURE__ */ new Date()) ? createVNode("div", {
|
|
205
192
|
"class": ns.em("time-pane", "current-time"),
|
|
206
193
|
"style": {
|