@ibiz-template/vue3-components 0.6.16 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chart-jfPZ04eU.js +1 -0
- package/dist/index-Wk7Kbc7Z.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-94ZSfJEl.js → xlsx-util-keqImqNu.js} +1 -1
- package/es/common/pagination/pagination.d.ts +9 -0
- package/es/common/pagination/pagination.mjs +12 -2
- package/es/common/view-message/view-message.css +1 -1
- package/es/common/view-message/view-message.d.ts +27 -1
- package/es/common/view-message/view-message.mjs +130 -17
- package/es/control/caption-bar/caption-bar.css +1 -1
- package/es/control/caption-bar/caption-bar.mjs +3 -1
- package/es/control/chart/chart.css +1 -1
- package/es/control/chart/chart.d.ts +3 -1
- package/es/control/chart/chart.mjs +70 -6
- package/es/control/data-view/data-view.mjs +1 -0
- package/es/control/drbar/drbar.controller.d.ts +9 -0
- package/es/control/drbar/drbar.controller.mjs +31 -17
- package/es/control/drtab/drtab.controller.d.ts +9 -0
- package/es/control/drtab/drtab.controller.mjs +16 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.css +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.d.ts +2 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.mjs +13 -4
- package/es/control/form/form-detail/form-mdctrl/index.d.ts +1 -0
- package/es/control/form/form-detail/form-rawitem/form-rawitem.d.ts +2 -1
- package/es/control/form/form-detail/form-rawitem/form-rawitem.mjs +31 -1
- package/es/control/form/form-detail/form-rawitem/index.d.ts +1 -0
- package/es/control/grid/grid/grid.mjs +1 -0
- package/es/control/grid/grid-column/grid-field-edit-column/cell-edit.mjs +3 -1
- package/es/control/list/list.mjs +1 -0
- package/es/control/search-bar/filter-tree/filter-tree.d.ts +3 -3
- package/es/control/search-bar/filter-tree/filter-tree.mjs +98 -37
- package/es/control/search-bar/index.d.ts +1 -0
- package/es/control/search-bar/index.mjs +2 -0
- package/es/control/search-bar/quick-search-select/quick-search-select.css +1 -0
- package/es/control/search-bar/quick-search-select/quick-search-select.d.ts +16 -0
- package/es/control/search-bar/quick-search-select/quick-search-select.mjs +72 -0
- package/es/control/search-bar/search-bar.css +1 -1
- package/es/control/search-bar/search-bar.d.ts +1 -0
- package/es/control/search-bar/search-bar.mjs +14 -3
- package/es/control/toolbar/index.d.ts +1 -0
- package/es/control/toolbar/toolbar.d.ts +1 -0
- package/es/control/toolbar/toolbar.mjs +15 -14
- package/es/control/tree-grid/tree-grid.mjs +1 -0
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/cell-edit.mjs +3 -1
- package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.mjs +11 -3
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +5 -7
- package/es/editor/date-picker/ibiz-date-picker/ibiz-date-picker.mjs +5 -7
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +19 -10
- package/es/editor/list-box/ibiz-list-box/ibiz-list-box.mjs +13 -5
- package/es/editor/raw/ibiz-raw/ibiz-raw.mjs +7 -0
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +6 -8
- package/es/editor/text-box/input/input.mjs +7 -9
- package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.mjs +9 -11
- package/es/panel-component/index.mjs +2 -0
- package/es/panel-component/nav-tabs/nav-tabs.css +1 -1
- package/es/panel-component/nav-tabs/nav-tabs.mjs +7 -1
- package/es/panel-component/panel-index-view-search/index.d.ts +1 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.d.ts +1 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.mjs +22 -2
- package/es/panel-component/view-msg-pos/index.d.ts +25 -0
- package/es/panel-component/view-msg-pos/index.mjs +16 -0
- package/es/panel-component/view-msg-pos/view-msg-pos.controller.d.ts +21 -0
- package/es/panel-component/view-msg-pos/view-msg-pos.controller.mjs +48 -0
- package/es/panel-component/view-msg-pos/view-msg-pos.d.ts +25 -0
- package/es/panel-component/view-msg-pos/view-msg-pos.mjs +47 -0
- package/es/panel-component/view-msg-pos/view-msg-pos.provider.d.ts +16 -0
- package/es/panel-component/view-msg-pos/view-msg-pos.provider.mjs +21 -0
- package/es/view-engine/index.mjs +4 -0
- package/es/view-engine/panel-view-engine.d.ts +2 -2
- package/es/web-app/App.mjs +9 -1
- package/es/web-app/main.mjs +8 -1
- package/lib/common/pagination/pagination.cjs +12 -2
- package/lib/common/view-message/view-message.cjs +129 -16
- package/lib/common/view-message/view-message.css +1 -1
- package/lib/control/caption-bar/caption-bar.cjs +3 -1
- package/lib/control/caption-bar/caption-bar.css +1 -1
- package/lib/control/chart/chart.cjs +69 -5
- package/lib/control/chart/chart.css +1 -1
- package/lib/control/data-view/data-view.cjs +1 -0
- package/lib/control/drbar/drbar.controller.cjs +31 -17
- package/lib/control/drtab/drtab.controller.cjs +16 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.cjs +13 -4
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.css +1 -1
- package/lib/control/form/form-detail/form-rawitem/form-rawitem.cjs +30 -0
- package/lib/control/grid/grid/grid.cjs +1 -0
- package/lib/control/grid/grid-column/grid-field-edit-column/cell-edit.cjs +3 -1
- package/lib/control/list/list.cjs +1 -0
- package/lib/control/search-bar/filter-tree/filter-tree.cjs +98 -37
- package/lib/control/search-bar/index.cjs +2 -0
- package/lib/control/search-bar/quick-search-select/quick-search-select.cjs +74 -0
- package/lib/control/search-bar/quick-search-select/quick-search-select.css +1 -0
- package/lib/control/search-bar/search-bar.cjs +14 -3
- package/lib/control/search-bar/search-bar.css +1 -1
- package/lib/control/toolbar/toolbar.cjs +15 -14
- package/lib/control/tree-grid/tree-grid.cjs +1 -0
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/cell-edit.cjs +3 -1
- package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.cjs +11 -3
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +5 -7
- package/lib/editor/date-picker/ibiz-date-picker/ibiz-date-picker.cjs +5 -7
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +19 -10
- package/lib/editor/list-box/ibiz-list-box/ibiz-list-box.cjs +13 -5
- package/lib/editor/raw/ibiz-raw/ibiz-raw.cjs +7 -0
- package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +6 -8
- package/lib/editor/text-box/input/input.cjs +7 -9
- package/lib/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.cjs +8 -10
- package/lib/panel-component/index.cjs +2 -0
- package/lib/panel-component/nav-tabs/nav-tabs.cjs +7 -1
- package/lib/panel-component/nav-tabs/nav-tabs.css +1 -1
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.cjs +21 -1
- package/lib/panel-component/view-msg-pos/index.cjs +22 -0
- package/lib/panel-component/view-msg-pos/view-msg-pos.cjs +49 -0
- package/lib/panel-component/view-msg-pos/view-msg-pos.controller.cjs +50 -0
- package/lib/panel-component/view-msg-pos/view-msg-pos.provider.cjs +23 -0
- package/lib/view-engine/index.cjs +4 -0
- package/lib/web-app/App.cjs +8 -0
- package/lib/web-app/main.cjs +7 -0
- package/package.json +14 -14
- package/dist/chart-IsmrW_d0.js +0 -1
- package/dist/index-l_9Kqet_.js +0 -4
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import { useNamespace, useCtx } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { ViewMsgPosController } from './view-msg-pos.controller.mjs';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
const ViewMsgPos = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "IBizViewMsgPos",
|
|
8
|
+
props: {
|
|
9
|
+
modelData: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
},
|
|
13
|
+
controller: {
|
|
14
|
+
type: ViewMsgPosController,
|
|
15
|
+
required: true
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup() {
|
|
19
|
+
const ns = useNamespace("view-msg-pos");
|
|
20
|
+
const ctx = useCtx();
|
|
21
|
+
const view = ctx.view;
|
|
22
|
+
return {
|
|
23
|
+
ns,
|
|
24
|
+
view
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
render() {
|
|
28
|
+
const c = this.controller;
|
|
29
|
+
if (!this.view.state.isCreated) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const position = c.rawItemParams.position || "BODY";
|
|
33
|
+
const scroll = c.rawItemParams.scroll === "true";
|
|
34
|
+
const viewMessages = this.view.state.viewMessages[position];
|
|
35
|
+
if (viewMessages == null ? void 0 : viewMessages.length) {
|
|
36
|
+
return createVNode("div", {
|
|
37
|
+
"class": this.ns.b()
|
|
38
|
+
}, [createVNode(resolveComponent("view-message"), {
|
|
39
|
+
"messages": viewMessages,
|
|
40
|
+
"scroll": scroll
|
|
41
|
+
}, null)]);
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export { ViewMsgPos };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelItem } from '@ibiz/model-core';
|
|
3
|
+
import { ViewMsgPosController } from './view-msg-pos.controller';
|
|
4
|
+
/**
|
|
5
|
+
* 预置视图消息适配器
|
|
6
|
+
*
|
|
7
|
+
* @author zk
|
|
8
|
+
* @date 2024-01-25 02:01:01
|
|
9
|
+
* @export
|
|
10
|
+
* @class ViewMessageProvider
|
|
11
|
+
* @implements {IPanelItemProvider}
|
|
12
|
+
*/
|
|
13
|
+
export declare class ViewMsgPosProvider implements IPanelItemProvider {
|
|
14
|
+
component: string;
|
|
15
|
+
createController(panelItem: IPanelItem, panel: PanelController, parent: PanelItemController | undefined): Promise<ViewMsgPosController>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ViewMsgPosController } from './view-msg-pos.controller.mjs';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => {
|
|
7
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
+
return value;
|
|
9
|
+
};
|
|
10
|
+
class ViewMsgPosProvider {
|
|
11
|
+
constructor() {
|
|
12
|
+
__publicField(this, "component", "IBizViewMsgPos");
|
|
13
|
+
}
|
|
14
|
+
async createController(panelItem, panel, parent) {
|
|
15
|
+
const c = new ViewMsgPosController(panelItem, panel, parent);
|
|
16
|
+
await c.init();
|
|
17
|
+
return c;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { ViewMsgPosProvider };
|
package/es/view-engine/index.mjs
CHANGED
|
@@ -180,6 +180,10 @@ const IBizViewEngine = {
|
|
|
180
180
|
"VIEW_DEPANELVIEW",
|
|
181
181
|
(c) => new PanelViewEngine(c)
|
|
182
182
|
);
|
|
183
|
+
ibiz.engine.register(
|
|
184
|
+
"VIEW_APPPANELVIEW",
|
|
185
|
+
(c) => new PanelViewEngine(c)
|
|
186
|
+
);
|
|
183
187
|
ibiz.engine.register(
|
|
184
188
|
"VIEW_DECUSTOMVIEW",
|
|
185
189
|
(c) => new CustomViewEngine(c)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewEngineBase, ViewController,
|
|
1
|
+
import { ViewEngineBase, ViewController, IPanelController, IPanelViewEvent, IPanelViewState } from '@ibiz-template/runtime';
|
|
2
2
|
import { IAppView } from '@ibiz/model-core';
|
|
3
3
|
export declare class PanelViewEngine extends ViewEngineBase {
|
|
4
4
|
/**
|
|
@@ -16,6 +16,6 @@ export declare class PanelViewEngine extends ViewEngineBase {
|
|
|
16
16
|
* @readonly
|
|
17
17
|
* @memberof PanelViewEngine
|
|
18
18
|
*/
|
|
19
|
-
get panel():
|
|
19
|
+
get panel(): IPanelController;
|
|
20
20
|
onMounted(): Promise<void>;
|
|
21
21
|
}
|
package/es/web-app/App.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveComponent, createVNode, defineComponent } from 'vue';
|
|
1
|
+
import { onUnmounted, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { ViewMode, Modal } from '@ibiz-template/runtime';
|
|
3
3
|
import { AppHooks } from '@ibiz-template/vue3-util';
|
|
4
4
|
import './App.css';
|
|
@@ -20,6 +20,14 @@ var App = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
document.addEventListener("keydown", listenDevtool);
|
|
23
|
+
const destroyAppHub = () => {
|
|
24
|
+
window.removeEventListener("unload", destroyAppHub);
|
|
25
|
+
ibiz.hub.destroy();
|
|
26
|
+
};
|
|
27
|
+
window.addEventListener("unload", destroyAppHub);
|
|
28
|
+
onUnmounted(() => {
|
|
29
|
+
destroyAppHub();
|
|
30
|
+
});
|
|
23
31
|
return {
|
|
24
32
|
modal
|
|
25
33
|
};
|
package/es/web-app/main.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { install } from '@ibiz-template/core';
|
|
2
2
|
import { install as install$1 } from '@ibiz-template/runtime';
|
|
3
|
-
import { AppHooks, PluginFactory, OverlayContainer } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { AppHooks, useAppStore, route2routePath, PluginFactory, OverlayContainer } from '@ibiz-template/vue3-util';
|
|
4
4
|
import { createVueApp } from './create-vue-app.mjs';
|
|
5
5
|
import { attachEnvironmentConfig } from './attach-environment-config.mjs';
|
|
6
6
|
import App from './App.mjs';
|
|
@@ -30,6 +30,13 @@ async function runApp(plugins, opts) {
|
|
|
30
30
|
});
|
|
31
31
|
install();
|
|
32
32
|
install$1();
|
|
33
|
+
ibiz.util.getGlobalParam = () => {
|
|
34
|
+
return useAppStore().appStore;
|
|
35
|
+
};
|
|
36
|
+
ibiz.util.getRouterParams = () => {
|
|
37
|
+
const routePath = route2routePath(AppRouter.getRouter().currentRoute.value);
|
|
38
|
+
return routePath.pathNodes;
|
|
39
|
+
};
|
|
33
40
|
ibiz.plugin = new PluginFactory();
|
|
34
41
|
ibiz.util.error.register(new UnauthorizedHandler());
|
|
35
42
|
const app = createVueApp(App);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
var ramda = require('ramda');
|
|
5
6
|
require('./pagination.css');
|
|
6
7
|
|
|
7
8
|
"use strict";
|
|
@@ -19,6 +20,10 @@ const IBizPagination = /* @__PURE__ */ vue.defineComponent({
|
|
|
19
20
|
size: {
|
|
20
21
|
type: Number,
|
|
21
22
|
required: true
|
|
23
|
+
},
|
|
24
|
+
totalPages: {
|
|
25
|
+
type: Number || void 0,
|
|
26
|
+
required: false
|
|
22
27
|
}
|
|
23
28
|
},
|
|
24
29
|
emits: ["change", "pageSizeChange", "pageRefresh"],
|
|
@@ -44,6 +49,9 @@ const IBizPagination = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
49
|
const inputChange = (event) => {
|
|
45
50
|
event.stopPropagation();
|
|
46
51
|
};
|
|
52
|
+
const calcTotalPages = vue.computed(() => {
|
|
53
|
+
return Math.ceil(props.total / props.size);
|
|
54
|
+
});
|
|
47
55
|
return {
|
|
48
56
|
ns,
|
|
49
57
|
start,
|
|
@@ -51,7 +59,8 @@ const IBizPagination = /* @__PURE__ */ vue.defineComponent({
|
|
|
51
59
|
onPageChange,
|
|
52
60
|
onPageSizeChange,
|
|
53
61
|
pageRefresh,
|
|
54
|
-
inputChange
|
|
62
|
+
inputChange,
|
|
63
|
+
calcTotalPages
|
|
55
64
|
};
|
|
56
65
|
},
|
|
57
66
|
render() {
|
|
@@ -61,6 +70,7 @@ const IBizPagination = /* @__PURE__ */ vue.defineComponent({
|
|
|
61
70
|
"layout": "slot, prev, pager, next, sizes, jumper",
|
|
62
71
|
"background": true,
|
|
63
72
|
"total": this.total,
|
|
73
|
+
"page-count": !ramda.isNil(this.totalPages) && this.calcTotalPages === this.totalPages ? this.calcTotalPages : this.totalPages,
|
|
64
74
|
"current-page": this.curPage,
|
|
65
75
|
"page-size": this.size,
|
|
66
76
|
"page-sizes": [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
|
|
@@ -78,7 +88,7 @@ const IBizPagination = /* @__PURE__ */ vue.defineComponent({
|
|
|
78
88
|
default: () => [vue.createVNode("ion-icon", {
|
|
79
89
|
"name": "refresh"
|
|
80
90
|
}, null)]
|
|
81
|
-
})]), vue.createVNode("span", null, [ibiz.i18n.t("component.pagination.display"), vue.createTextVNode("\xA0"), this.start, vue.createTextVNode("\xA0-\xA0"), this.end, vue.createTextVNode("\xA0"), ibiz.i18n.t("component.pagination.piece"), vue.createTextVNode("\uFF0C"), ibiz.i18n.t("component.pagination.total"), vue.createTextVNode("\xA0"), this.total, vue.createTextVNode("\xA0"), ibiz.i18n.t("component.pagination.pieceData")])]
|
|
91
|
+
})]), ramda.isNil(this.totalPages) || this.calcTotalPages === this.totalPages ? vue.createVNode("span", null, [ibiz.i18n.t("component.pagination.display"), vue.createTextVNode("\xA0"), this.start, vue.createTextVNode("\xA0-\xA0"), this.end, vue.createTextVNode("\xA0"), ibiz.i18n.t("component.pagination.piece"), vue.createTextVNode("\uFF0C")]) : null, vue.createVNode("span", null, [ibiz.i18n.t("component.pagination.total"), vue.createTextVNode("\xA0"), this.total, vue.createTextVNode("\xA0"), ibiz.i18n.t("component.pagination.pieceData")])]
|
|
82
92
|
})]);
|
|
83
93
|
}
|
|
84
94
|
});
|
|
@@ -2,17 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
var qxUtil = require('qx-util');
|
|
5
6
|
require('./view-message.css');
|
|
6
7
|
|
|
7
8
|
"use strict";
|
|
9
|
+
function _isSlot(s) {
|
|
10
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
11
|
+
}
|
|
8
12
|
const ViewMessage = /* @__PURE__ */ vue.defineComponent({
|
|
9
13
|
name: "ViewMessage",
|
|
10
14
|
props: {
|
|
11
15
|
messages: {
|
|
12
16
|
type: Array
|
|
17
|
+
},
|
|
18
|
+
scroll: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
13
21
|
}
|
|
14
22
|
},
|
|
15
|
-
setup() {
|
|
23
|
+
setup(props) {
|
|
16
24
|
const ns = vue3Util.useNamespace("view-message");
|
|
17
25
|
const getType = (messageType) => {
|
|
18
26
|
switch (messageType) {
|
|
@@ -24,27 +32,132 @@ const ViewMessage = /* @__PURE__ */ vue.defineComponent({
|
|
|
24
32
|
return "info";
|
|
25
33
|
}
|
|
26
34
|
};
|
|
35
|
+
const items = vue.ref([]);
|
|
36
|
+
const initialIndex = vue.ref(0);
|
|
37
|
+
const uuid = vue.ref("");
|
|
38
|
+
const isHiddenContainer = vue.ref(false);
|
|
39
|
+
vue.watch(() => props.messages, () => {
|
|
40
|
+
initialIndex.value = 0;
|
|
41
|
+
uuid.value = qxUtil.createUUID();
|
|
42
|
+
if (Array.isArray(props.messages)) {
|
|
43
|
+
items.value = props.messages.filter((item) => item.title || item.message).map((item) => {
|
|
44
|
+
return {
|
|
45
|
+
...item
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
isHiddenContainer.value = false;
|
|
49
|
+
} else {
|
|
50
|
+
items.value = [];
|
|
51
|
+
isHiddenContainer.value = true;
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
immediate: true
|
|
55
|
+
});
|
|
56
|
+
const container = vue.ref(null);
|
|
57
|
+
const carouselHeight = vue.ref("");
|
|
58
|
+
vue.onMounted(() => {
|
|
59
|
+
vue.nextTick(() => {
|
|
60
|
+
const el = container.value;
|
|
61
|
+
if (!el) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const alertEl = el.querySelector(".el-alert");
|
|
65
|
+
if (alertEl) {
|
|
66
|
+
carouselHeight.value = "".concat(alertEl.offsetHeight, "px");
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
const handleAlertClose = (index) => {
|
|
71
|
+
items.value[index].hidden = true;
|
|
72
|
+
const isHiddenCarouse = items.value.every((item) => item.hidden);
|
|
73
|
+
if (isHiddenCarouse) {
|
|
74
|
+
isHiddenContainer.value = true;
|
|
75
|
+
}
|
|
76
|
+
uuid.value = qxUtil.createUUID();
|
|
77
|
+
};
|
|
78
|
+
const handleChange = (index) => {
|
|
79
|
+
initialIndex.value = index;
|
|
80
|
+
};
|
|
27
81
|
return {
|
|
28
82
|
ns,
|
|
29
|
-
getType
|
|
83
|
+
getType,
|
|
84
|
+
items,
|
|
85
|
+
container,
|
|
86
|
+
carouselHeight,
|
|
87
|
+
initialIndex,
|
|
88
|
+
uuid,
|
|
89
|
+
isHiddenContainer,
|
|
90
|
+
handleAlertClose,
|
|
91
|
+
handleChange
|
|
30
92
|
};
|
|
31
93
|
},
|
|
32
94
|
render() {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return
|
|
95
|
+
const renderScrollMessages = () => {
|
|
96
|
+
let _slot;
|
|
97
|
+
return vue.createVNode("div", {
|
|
98
|
+
"class": [this.ns.b(), this.isHiddenContainer && this.ns.m("hidden")],
|
|
99
|
+
"ref": "container"
|
|
100
|
+
}, [vue.createVNode(vue.resolveComponent("el-carousel"), {
|
|
101
|
+
"key": this.uuid,
|
|
102
|
+
"indicatorPosition": "none",
|
|
103
|
+
"arrow": "never",
|
|
104
|
+
"height": this.carouselHeight,
|
|
105
|
+
"initialIndex": this.initialIndex,
|
|
106
|
+
"onChange": this.handleChange
|
|
107
|
+
}, _isSlot(_slot = this.items.map((item, i) => {
|
|
108
|
+
if (item.hidden) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
return vue.createVNode(vue.resolveComponent("el-carousel-item"), null, {
|
|
112
|
+
default: () => [vue.createVNode(vue.resolveComponent("el-alert"), {
|
|
113
|
+
"type": this.getType(item.messageType),
|
|
114
|
+
"class": this.ns.b("carousel-alert"),
|
|
115
|
+
"closable": item.removeMode !== 0,
|
|
116
|
+
"onClose": () => this.handleAlertClose(i)
|
|
117
|
+
}, {
|
|
118
|
+
title: () => {
|
|
119
|
+
return vue.createVNode("div", {
|
|
120
|
+
"class": this.ns.be("carousel-alert", "title")
|
|
121
|
+
}, [item.title || ""]);
|
|
122
|
+
},
|
|
123
|
+
default: () => {
|
|
124
|
+
return vue.createVNode("div", {
|
|
125
|
+
"class": this.ns.be("carousel-alert", "message")
|
|
126
|
+
}, [item.message || ""]);
|
|
127
|
+
}
|
|
128
|
+
})]
|
|
129
|
+
});
|
|
130
|
+
})) ? _slot : {
|
|
131
|
+
default: () => [_slot]
|
|
132
|
+
})]);
|
|
133
|
+
};
|
|
134
|
+
const renderMessages = () => {
|
|
135
|
+
return vue.createVNode("div", {
|
|
136
|
+
"class": [this.ns.b(), this.isHiddenContainer && this.ns.m("hidden")]
|
|
137
|
+
}, [this.items.map((item, i) => {
|
|
138
|
+
return vue.createVNode(vue.resolveComponent("el-alert"), {
|
|
139
|
+
"type": this.getType(item.messageType),
|
|
140
|
+
"class": [this.ns.b("alert"), this.ns.bm("alert", item.title && item.message ? "" : "single"), this.ns.bm("alert", !item.title && item.message ? "single-message" : "")],
|
|
141
|
+
"closable": item.removeMode !== 0,
|
|
142
|
+
"onClose": () => this.handleAlertClose(i)
|
|
143
|
+
}, {
|
|
144
|
+
title: () => {
|
|
145
|
+
return vue.createVNode("div", {
|
|
146
|
+
"class": this.ns.be("alert", "title")
|
|
147
|
+
}, [item.title || ""]);
|
|
148
|
+
},
|
|
149
|
+
default: () => {
|
|
150
|
+
return vue.createVNode("div", {
|
|
151
|
+
"class": this.ns.be("alert", "message")
|
|
152
|
+
}, [item.message || ""]);
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
})]);
|
|
156
|
+
};
|
|
157
|
+
if (this.items.length > 1 && this.scroll) {
|
|
158
|
+
return renderScrollMessages();
|
|
36
159
|
}
|
|
37
|
-
return
|
|
38
|
-
"class": [this.ns.b()]
|
|
39
|
-
}, [(_b = this.messages) == null ? void 0 : _b.map((message) => {
|
|
40
|
-
return vue.createVNode(vue.resolveComponent("el-alert"), {
|
|
41
|
-
"type": this.getType(message.messageType),
|
|
42
|
-
"title": message.title,
|
|
43
|
-
"class": [this.ns.e("alert"), this.ns.is("no-title", !message.title)],
|
|
44
|
-
"description": message.message,
|
|
45
|
-
"closable": message.removeMode !== 0
|
|
46
|
-
}, null);
|
|
47
|
-
})]);
|
|
160
|
+
return renderMessages();
|
|
48
161
|
}
|
|
49
162
|
});
|
|
50
163
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-view-
|
|
1
|
+
.ibiz-view-message{--ibiz-view-message-border--warning:1px solid var(--ibiz-color-warning-active);--ibiz-view-message-border--error:1px solid var(--ibiz-color-danger-active);--ibiz-view-message-border--info:1px solid var(--ibiz-color-info-active);padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none)}.ibiz-view-message--hidden{display:none}.ibiz-view-message .el-alert--warning.is-light{border:var(--ibiz-view-message-border--warning)}.ibiz-view-message .el-alert--error.is-light{border:var(--ibiz-view-message-border--error)}.ibiz-view-message .el-alert--info.is-light{border:var(--ibiz-view-message-border--info)}.ibiz-view-message-alert{margin-bottom:var(--ibiz-spacing-tight)}.ibiz-view-message-alert:last-child{margin-bottom:var(--ibiz-spacing-none)}.ibiz-view-message-alert--single .el-alert__description{margin:0}.ibiz-view-message-alert--single-message .el-alert__close-btn{top:calc(var(--ibiz-spacing-tight) + var(--ibiz-spacing-super-tight))}.ibiz-view-message-alert__title{line-height:calc(var(--ibiz-spacing-base-loose) - var(--ibiz-spacing-super-tight))}.ibiz-view-message-alert__message{line-height:var(--ibiz-spacing-base)}.ibiz-view-message-carousel-alert .el-alert__content{overflow:hidden}.ibiz-view-message-carousel-alert__title{height:calc(var(--ibiz-spacing-base-loose) - var(--ibiz-spacing-super-tight));overflow:hidden;line-height:calc(var(--ibiz-spacing-base-loose) - var(--ibiz-spacing-super-tight));text-overflow:ellipsis;white-space:nowrap}.ibiz-view-message-carousel-alert__message{height:var(--ibiz-spacing-base);overflow:hidden;line-height:var(--ibiz-spacing-base);text-overflow:ellipsis;white-space:nowrap}
|
|
@@ -47,7 +47,9 @@ const CaptionBarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
47
47
|
}, [this.c.model.sysImage && vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
48
48
|
"class": [this.ns.be("caption", "icon")],
|
|
49
49
|
"icon": this.c.model.sysImage
|
|
50
|
-
}, null),
|
|
50
|
+
}, null), vue.createVNode("div", {
|
|
51
|
+
"class": [this.ns.be("caption", "content")]
|
|
52
|
+
}, [this.c.state.caption])])]
|
|
51
53
|
});
|
|
52
54
|
}
|
|
53
55
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-captionbar{--ibiz-control-captionbar-color:var(--ibiz-color-text-0);--ibiz-control-captionbar-font-size:var(--ibiz-font-size-header-5);--ibiz-control-captionbar-font-weight:var(--ibiz-font-weight-regular);--ibiz-control-captionbar-padding:0 var(--ibiz-spacing-base);--ibiz-control-captionbar-margin:var(--ibiz-spacing-none);position:relative;height:100%;padding:var(--ibiz-control-captionbar-padding)}.ibiz-control-captionbar .ibiz-control-captionbar-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative;height:100%;padding-left:var(--ibiz-spacing-base);font-size:var(--ibiz-control-captionbar-font-size);font-weight:var(--ibiz-control-captionbar-font-weight);color:var(--ibiz-control-captionbar-color);display:flex;align-items:center;justify-content:flex-start}.ibiz-control-captionbar .ibiz-control-captionbar-caption::before{position:absolute;top:50%;left:0;width:4px;height:20px;content:"";background-color:var(--ibiz-color-primary);border-radius:2px;transform:translateY(-50%)}.ibiz-control-captionbar .ibiz-control-captionbar-caption.is-show-icon{padding-left:0}.ibiz-control-captionbar .ibiz-control-captionbar-caption.is-show-icon::before{display:none}.ibiz-control-captionbar-caption__icon{margin-right:var(--ibiz-spacing-tight)}.ibiz-view:not(.ibiz-view-appindexview) .ibiz-view .ibiz-view .ibiz-control-captionbar-caption{--ibiz-control-captionbar-font-size:var(--ibiz-font-size-header-5);--ibiz-control-captionbar-font-weight:var(--ibiz-font-weight-regular);padding-left:0}.ibiz-view:not(.ibiz-view-appindexview) .ibiz-view .ibiz-view .ibiz-control-captionbar-caption::before{content:none}.ibiz-drawer .ibiz-view .ibiz-view .ibiz-control-captionbar-caption,.ibiz-modal .ibiz-view .ibiz-view .ibiz-control-captionbar-caption,.ibiz-popover .ibiz-view .ibiz-view .ibiz-control-captionbar-caption{--ibiz-control-captionbar-font-size:var(--ibiz-font-size-header-5);--ibiz-control-captionbar-font-weight:var(--ibiz-font-weight-regular);padding-left:0}.ibiz-drawer .ibiz-view .ibiz-view .ibiz-control-captionbar-caption::before,.ibiz-modal .ibiz-view .ibiz-view .ibiz-control-captionbar-caption::before,.ibiz-popover .ibiz-view .ibiz-view .ibiz-control-captionbar-caption::before{content:none}
|
|
1
|
+
.ibiz-control-captionbar{--ibiz-control-captionbar-color:var(--ibiz-color-text-0);--ibiz-control-captionbar-font-size:var(--ibiz-font-size-header-5);--ibiz-control-captionbar-font-weight:var(--ibiz-font-weight-regular);--ibiz-control-captionbar-padding:0 var(--ibiz-spacing-base);--ibiz-control-captionbar-margin:var(--ibiz-spacing-none);position:relative;height:100%;padding:var(--ibiz-control-captionbar-padding)}.ibiz-control-captionbar .ibiz-control-captionbar-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative;height:100%;padding-left:var(--ibiz-spacing-base);font-size:var(--ibiz-control-captionbar-font-size);font-weight:var(--ibiz-control-captionbar-font-weight);color:var(--ibiz-control-captionbar-color);display:flex;align-items:center;justify-content:flex-start}.ibiz-control-captionbar .ibiz-control-captionbar-caption::before{position:absolute;top:50%;left:0;width:4px;height:20px;content:"";background-color:var(--ibiz-color-primary);border-radius:2px;transform:translateY(-50%)}.ibiz-control-captionbar .ibiz-control-captionbar-caption.is-show-icon{padding-left:0}.ibiz-control-captionbar .ibiz-control-captionbar-caption.is-show-icon::before{display:none}.ibiz-control-captionbar-caption__icon{margin-right:var(--ibiz-spacing-tight)}.ibiz-control-captionbar-caption__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-view:not(.ibiz-view-appindexview) .ibiz-view .ibiz-view .ibiz-control-captionbar-caption{--ibiz-control-captionbar-font-size:var(--ibiz-font-size-header-5);--ibiz-control-captionbar-font-weight:var(--ibiz-font-weight-regular);padding-left:0}.ibiz-view:not(.ibiz-view-appindexview) .ibiz-view .ibiz-view .ibiz-control-captionbar-caption::before{content:none}.ibiz-drawer .ibiz-view .ibiz-view .ibiz-control-captionbar-caption,.ibiz-modal .ibiz-view .ibiz-view .ibiz-control-captionbar-caption,.ibiz-popover .ibiz-view .ibiz-view .ibiz-control-captionbar-caption{--ibiz-control-captionbar-font-size:var(--ibiz-font-size-header-5);--ibiz-control-captionbar-font-weight:var(--ibiz-font-weight-regular);padding-left:0}.ibiz-drawer .ibiz-view .ibiz-view .ibiz-control-captionbar-caption::before,.ibiz-modal .ibiz-view .ibiz-view .ibiz-control-captionbar-caption::before,.ibiz-popover .ibiz-view .ibiz-view .ibiz-control-captionbar-caption::before{content:none}
|
|
@@ -5,10 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
7
7
|
var echarts = require('echarts');
|
|
8
|
-
require('
|
|
8
|
+
var qxUtil = require('qx-util');
|
|
9
9
|
var runtime = require('@ibiz-template/runtime');
|
|
10
|
+
require('./chart.css');
|
|
10
11
|
|
|
11
12
|
"use strict";
|
|
13
|
+
function _isSlot(s) {
|
|
14
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
15
|
+
}
|
|
12
16
|
const ChartControl = /* @__PURE__ */ vue.defineComponent({
|
|
13
17
|
name: "IBizChartControl",
|
|
14
18
|
props: {
|
|
@@ -40,27 +44,87 @@ const ChartControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
40
44
|
const c = vue3Util.useControlController((...args) => new runtime.ChartController(...args));
|
|
41
45
|
const ns = vue3Util.useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
42
46
|
const chartRef = vue.ref();
|
|
47
|
+
const maxHeight = vue.ref(0);
|
|
48
|
+
const uuid = qxUtil.createUUID();
|
|
49
|
+
const setHeight = async () => {
|
|
50
|
+
await vue.nextTick();
|
|
51
|
+
const el = document.getElementById(uuid);
|
|
52
|
+
if (el) {
|
|
53
|
+
if (c.state.gridPosition === "bottom" || c.state.gridPosition === "top") {
|
|
54
|
+
maxHeight.value = el.offsetHeight / 2 - 8;
|
|
55
|
+
} else {
|
|
56
|
+
maxHeight.value = el.offsetHeight - 16;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const getGridData = () => {
|
|
61
|
+
return c.state.gridData || [];
|
|
62
|
+
};
|
|
43
63
|
vue.onMounted(() => {
|
|
44
64
|
const chart = echarts.init(chartRef.value);
|
|
45
65
|
c.initChart(chart);
|
|
66
|
+
window.addEventListener("resize", setHeight);
|
|
67
|
+
setHeight();
|
|
68
|
+
});
|
|
69
|
+
vue.watch(() => c.state.showGrid, () => {
|
|
70
|
+
setHeight();
|
|
71
|
+
}, {
|
|
72
|
+
immediate: true
|
|
73
|
+
});
|
|
74
|
+
const renderGrid = () => {
|
|
75
|
+
let _slot;
|
|
76
|
+
return vue.createVNode(vue.resolveComponent("el-table"), {
|
|
77
|
+
"ref": "tableRef",
|
|
78
|
+
"data": getGridData(),
|
|
79
|
+
"border": true,
|
|
80
|
+
"style": {
|
|
81
|
+
width: "100%"
|
|
82
|
+
},
|
|
83
|
+
"max-height": maxHeight.value,
|
|
84
|
+
"header-row-class-name": ns.e("grid-header")
|
|
85
|
+
}, _isSlot(_slot = c.state.gridHeaders.map((column) => {
|
|
86
|
+
return vue.createVNode(vue.resolveComponent("el-table-column"), {
|
|
87
|
+
"prop": column.id,
|
|
88
|
+
"align": "center",
|
|
89
|
+
"label": column.name
|
|
90
|
+
}, null);
|
|
91
|
+
})) ? _slot : {
|
|
92
|
+
default: () => [_slot]
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
vue.onBeforeUnmount(() => {
|
|
96
|
+
window.removeEventListener("resize", setHeight);
|
|
46
97
|
});
|
|
47
98
|
return {
|
|
48
99
|
c,
|
|
49
100
|
ns,
|
|
50
|
-
chartRef
|
|
101
|
+
chartRef,
|
|
102
|
+
uuid,
|
|
103
|
+
renderGrid
|
|
51
104
|
};
|
|
52
105
|
},
|
|
53
106
|
render() {
|
|
54
107
|
return vue.createVNode(vue.resolveComponent("iBizControlBase"), {
|
|
55
108
|
"controller": this.c
|
|
56
109
|
}, {
|
|
57
|
-
default: () => [vue.createVNode(
|
|
110
|
+
default: () => [vue.createVNode("div", {
|
|
111
|
+
"id": this.uuid,
|
|
112
|
+
"class": this.ns.b("chart-container")
|
|
113
|
+
}, [vue.createVNode(vue.resolveComponent("el-empty"), {
|
|
58
114
|
"class": [this.ns.e("empty"), this.ns.is("no-data", this.c.state.items.length === 0)],
|
|
59
115
|
"description": "\u6682\u65E0\u6570\u636E"
|
|
60
116
|
}, null), vue.createVNode("div", {
|
|
117
|
+
"class": [this.ns.e("chart-grid"), this.ns.is("no-data", this.c.state.items.length === 0), this.ns.is("show-grid", this.c.state.showGrid), {
|
|
118
|
+
[this.ns.em("chart-grid", this.c.state.gridPosition)]: this.c.state.showGrid
|
|
119
|
+
}]
|
|
120
|
+
}, [vue.createVNode("div", {
|
|
121
|
+
"class": [this.ns.e("chart-grid-container"), this.ns.is(this.c.state.gridPosition, this.c.state.showGrid), this.ns.is("no-grid", !this.c.state.showGrid)]
|
|
122
|
+
}, [vue.createVNode("div", {
|
|
61
123
|
"ref": "chartRef",
|
|
62
|
-
"class": [this.ns.e("chart")
|
|
63
|
-
}, [ibiz.i18n.t("control.chart.chartPlaceholder")])]
|
|
124
|
+
"class": [this.ns.e("chart")]
|
|
125
|
+
}, [ibiz.i18n.t("control.chart.chartPlaceholder")])]), this.c.state.showGrid ? vue.createVNode("div", {
|
|
126
|
+
"class": this.ns.e("grid")
|
|
127
|
+
}, [this.renderGrid()]) : null])])]
|
|
64
128
|
});
|
|
65
129
|
}
|
|
66
130
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-chart{width:100%;height:100%}.ibiz-control-chart__chart{width:100%;height:100%}.ibiz-control-chart__chart.is-no-data{display:none}.ibiz-control-chart__empty{display:none;height:100%}.ibiz-control-chart__empty.is-no-data{display:flex}
|
|
1
|
+
.ibiz-control-chart{width:100%;height:100%}.ibiz-control-chart__chart-grid{width:100%;height:100%}.ibiz-control-chart__chart-grid.is-show-grid{display:flex;height:calc(100% - 16px)}.ibiz-control-chart__chart-grid--bottom{flex-direction:column}.ibiz-control-chart__chart-grid--top{flex-direction:column-reverse}.ibiz-control-chart__chart-grid--left{flex-direction:row-reverse}.ibiz-control-chart__chart-grid--right{flex-direction:row}.ibiz-control-chart__chart-grid.is-no-data{display:none}.ibiz-control-chart__chart-grid-container{flex:1;height:50%}.ibiz-control-chart__chart-grid-container.is-bottom{width:100%;height:50%;min-height:50%}.ibiz-control-chart__chart-grid-container.is-top{width:100%;height:50%;min-height:50%}.ibiz-control-chart__chart-grid-container.is-left{width:50%;min-width:50%;height:100%}.ibiz-control-chart__chart-grid-container.is-right{width:50%;min-width:50%;height:100%}.ibiz-control-chart__chart-grid-container.is-no-grid{flex:unset;width:100%;height:100%}.ibiz-control-chart__chart{width:100%;height:100%}.ibiz-control-chart__grid{flex:1;height:auto}.ibiz-control-chart__grid .cell{text-overflow:ellipsis;white-space:nowrap}.ibiz-control-chart__grid .el-table__body-wrapper{border-bottom:1px solid var(--ibiz-color-border)}.ibiz-control-chart__empty{display:none;height:100%}.ibiz-control-chart__empty.is-no-data{display:flex}.ibiz-control-chart-chart-container{width:100%;height:100%}
|
|
@@ -283,6 +283,7 @@ const DataViewControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
283
283
|
"total": this.c.state.total,
|
|
284
284
|
"curPage": this.c.state.curPage,
|
|
285
285
|
"size": this.c.state.size,
|
|
286
|
+
"totalPages": this.c.state.totalPages,
|
|
286
287
|
"onChange": this.onPageChange,
|
|
287
288
|
"onPageSizeChange": this.onPageSizeChange,
|
|
288
289
|
"onPageRefresh": this.onPageRefresh
|
|
@@ -54,7 +54,8 @@ class DRBarController extends runtime.ControlController {
|
|
|
54
54
|
* @memberof DRBarController
|
|
55
55
|
*/
|
|
56
56
|
get form() {
|
|
57
|
-
|
|
57
|
+
var _a;
|
|
58
|
+
return (_a = this.view) == null ? void 0 : _a.getController("form");
|
|
58
59
|
}
|
|
59
60
|
/**
|
|
60
61
|
* 是否是新建
|
|
@@ -145,22 +146,21 @@ class DRBarController extends runtime.ControlController {
|
|
|
145
146
|
* @memberof DRBarController
|
|
146
147
|
*/
|
|
147
148
|
async calcDrBarItemsState() {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
});
|
|
149
|
+
await Promise.all(
|
|
150
|
+
this.state.drBarItems.map(async (item) => {
|
|
151
|
+
var _a;
|
|
152
|
+
if ((_a = item.children) == null ? void 0 : _a.length) {
|
|
153
|
+
await Promise.all(
|
|
154
|
+
item.children.map(async (childItem) => {
|
|
155
|
+
await this.calcPermitted(childItem);
|
|
156
|
+
})
|
|
157
|
+
);
|
|
158
|
+
item.visible = item.children.some((childItem) => childItem.visible);
|
|
159
|
+
} else {
|
|
160
|
+
await this.calcPermitted(item);
|
|
161
|
+
}
|
|
162
|
+
})
|
|
163
|
+
);
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
166
|
* 加载完成
|
|
@@ -444,6 +444,20 @@ class DRBarController extends runtime.ControlController {
|
|
|
444
444
|
);
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
+
/**
|
|
448
|
+
* 监听组件销毁
|
|
449
|
+
*
|
|
450
|
+
* @author zhanghengfeng
|
|
451
|
+
* @date 2024-04-10 19:04:43
|
|
452
|
+
* @protected
|
|
453
|
+
* @return {*} {Promise<void>}
|
|
454
|
+
*/
|
|
455
|
+
async onDestroyed() {
|
|
456
|
+
await super.onDestroyed();
|
|
457
|
+
if (this.counter) {
|
|
458
|
+
this.counter.destroy();
|
|
459
|
+
}
|
|
460
|
+
}
|
|
447
461
|
}
|
|
448
462
|
|
|
449
463
|
exports.DRBarController = DRBarController;
|
|
@@ -45,7 +45,8 @@ class DRTabController extends runtime.ControlController {
|
|
|
45
45
|
* @memberof DRTabController
|
|
46
46
|
*/
|
|
47
47
|
get form() {
|
|
48
|
-
|
|
48
|
+
var _a;
|
|
49
|
+
return (_a = this.view) == null ? void 0 : _a.getController("form");
|
|
49
50
|
}
|
|
50
51
|
/**
|
|
51
52
|
* 路由层级
|
|
@@ -307,6 +308,20 @@ class DRTabController extends runtime.ControlController {
|
|
|
307
308
|
);
|
|
308
309
|
}
|
|
309
310
|
}
|
|
311
|
+
/**
|
|
312
|
+
* 监听组件销毁
|
|
313
|
+
*
|
|
314
|
+
* @author zhanghengfeng
|
|
315
|
+
* @date 2024-04-10 19:04:40
|
|
316
|
+
* @protected
|
|
317
|
+
* @return {*} {Promise<void>}
|
|
318
|
+
*/
|
|
319
|
+
async onDestroyed() {
|
|
320
|
+
await super.onDestroyed();
|
|
321
|
+
if (this.counter) {
|
|
322
|
+
this.counter.destroy();
|
|
323
|
+
}
|
|
324
|
+
}
|
|
310
325
|
}
|
|
311
326
|
|
|
312
327
|
exports.DRTabController = DRTabController;
|