@ibiz-template/vue3-components 0.6.0-alpha.3 → 0.6.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-wFXNmg_E.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-Ao2cn6nx.js → xlsx-util-HHmyYumg.js} +1 -1
- package/es/common/data-import2/data-import2.mjs +3 -1
- package/es/control/drbar/drbar.controller.mjs +3 -0
- package/es/control/form/form-detail/form-item/form-item.mjs +1 -0
- package/es/control/tab-exp-panel/tab-exp-panel.mjs +9 -21
- package/es/control/toolbar/toolbar.mjs +1 -0
- package/es/control/tree/tree.css +1 -1
- package/es/control/tree/tree.mjs +5 -3
- package/es/control/tree-grid-ex/index.d.ts +1 -0
- package/es/control/tree-grid-ex/tree-grid-ex.d.ts +1 -0
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +8 -0
- package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.d.ts +1 -0
- package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.mjs +5 -1
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +2 -2
- package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +1 -1
- package/es/editor/span/span/span.css +1 -1
- package/es/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.provider.mjs +3 -17
- package/es/util/app-modal/app-modal-component.d.ts +0 -1
- package/es/util/app-modal/app-modal-component.mjs +3 -9
- package/es/view-engine/edit-view.engine.d.ts +7 -0
- package/es/view-engine/edit-view.engine.mjs +87 -37
- package/lib/common/data-import2/data-import2.cjs +3 -1
- package/lib/control/drbar/drbar.controller.cjs +3 -0
- package/lib/control/form/form-detail/form-item/form-item.cjs +1 -0
- package/lib/control/tab-exp-panel/tab-exp-panel.cjs +8 -20
- package/lib/control/toolbar/toolbar.cjs +1 -0
- package/lib/control/tree/tree.cjs +5 -3
- package/lib/control/tree/tree.css +1 -1
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +8 -0
- package/lib/editor/color-picker/ibiz-color-picker/ibiz-color-picker.cjs +5 -1
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +1 -1
- package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +1 -1
- package/lib/editor/span/span/span.css +1 -1
- package/lib/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.provider.cjs +2 -16
- package/lib/util/app-modal/app-modal-component.cjs +3 -9
- package/lib/view-engine/edit-view.engine.cjs +87 -37
- package/package.json +5 -5
- package/dist/index-YUUYgkW-.js +0 -4
|
@@ -452,7 +452,9 @@ const DataImport2 = /* @__PURE__ */ defineComponent({
|
|
|
452
452
|
}), this.previewinfo[0] && this.previewinfo[0].length ? createVNode("div", {
|
|
453
453
|
"class": "ibiz-control-toolbar__item"
|
|
454
454
|
}, [createVNode(resolveComponent("el-button"), {
|
|
455
|
-
"onClick": this.onButtonImportClick
|
|
455
|
+
"onClick": this.onButtonImportClick,
|
|
456
|
+
"disabled": !this.selectValues.join(""),
|
|
457
|
+
"title": !this.selectValues.join("") ? "\u8BF7\u9009\u62E9\u5217\u5BFC\u5165\u5C5E\u6027!" : ""
|
|
456
458
|
}, _isSlot(_slot2 = ibiz.i18n.t("component.dataImport2.import")) ? _slot2 : {
|
|
457
459
|
default: () => [_slot2]
|
|
458
460
|
})]) : ""])])])]), createVNode(resolveComponent("data-import2-table"), {
|
|
@@ -250,6 +250,9 @@ class DRBarController extends ControlController {
|
|
|
250
250
|
*/
|
|
251
251
|
handleSelectChange(key, isRoutePushed = false) {
|
|
252
252
|
var _a;
|
|
253
|
+
if (this.state.selectedItem === key) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
253
256
|
const drBarItem = (_a = this.model.dedrctrlItems) == null ? void 0 : _a.find((item) => item.id === key);
|
|
254
257
|
if (drBarItem) {
|
|
255
258
|
this.setVisible("navPos");
|
|
@@ -65,6 +65,7 @@ const FormItem = /* @__PURE__ */ defineComponent({
|
|
|
65
65
|
}
|
|
66
66
|
return createVNode(resolveComponent("iBizFormItemContainer"), {
|
|
67
67
|
"class": [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass],
|
|
68
|
+
"style": this.modelData.cssStyle,
|
|
68
69
|
"required": this.c.state.required,
|
|
69
70
|
"error": this.c.state.error,
|
|
70
71
|
"label": this.c.labelCaption,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isVNode, watch, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
|
-
import { useControlController, useNamespace } from '@ibiz-template/vue3-util';
|
|
2
|
+
import { useControlController, useNamespace, route2routePath } from '@ibiz-template/vue3-util';
|
|
3
3
|
import './tab-exp-panel.css';
|
|
4
4
|
import { TabExpPanelController } from '@ibiz-template/runtime';
|
|
5
5
|
import { useRoute } from 'vue-router';
|
|
@@ -42,28 +42,16 @@ const TabExpPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
const route = useRoute();
|
|
43
43
|
watch(() => route.fullPath, (newVal, oldVal) => {
|
|
44
44
|
if (newVal !== oldVal) {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const tempFullPath = route.fullPath.split("/").slice(0, nextKeyNumber).join("/");
|
|
54
|
-
c.state.tabPages.forEach((page) => {
|
|
55
|
-
if (page.fullPath === tempFullPath) {
|
|
56
|
-
c.state.activeName = page.tabTag;
|
|
45
|
+
const depth = c.view.modal.routeDepth;
|
|
46
|
+
if (depth) {
|
|
47
|
+
const routePath = route2routePath(route);
|
|
48
|
+
const {
|
|
49
|
+
srfnav
|
|
50
|
+
} = routePath.pathNodes[depth - 1];
|
|
51
|
+
if (srfnav && c.state.activeName && c.state.activeName !== srfnav) {
|
|
52
|
+
c.state.activeName = srfnav;
|
|
57
53
|
c.handleTabChange();
|
|
58
54
|
}
|
|
59
|
-
});
|
|
60
|
-
if (c.state.activeName) {
|
|
61
|
-
const currentPage = c.state.tabPages.find((page) => {
|
|
62
|
-
return page.tabTag === c.state.activeName;
|
|
63
|
-
});
|
|
64
|
-
if (currentPage) {
|
|
65
|
-
currentPage.fullPath = tempFullPath;
|
|
66
|
-
}
|
|
67
55
|
}
|
|
68
56
|
}
|
|
69
57
|
}, {
|
package/es/control/tree/tree.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-treeview{--ibiz-control-treeview-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);--ibiz-control-treeview-icon-height:var(--ibiz-spacing-base);--ibiz-control-treeview-icon-width:var(--ibiz-spacing-base);height:100%;padding:var(--ibiz-control-treeview-padding)}.ibiz-control-treeview-node{display:flex;flex-grow:1;flex-shrink:1;align-items:center;min-width:1px;height:100%}.ibiz-control-treeview-node__icon{width:var(--ibiz-control-treeview-icon-width);height:var(--ibiz-control-treeview-icon-height);margin-right:var(--ibiz-spacing-tight)}.ibiz-control-treeview-node__label{flex-grow:1;flex-shrink:1;min-width:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-control-treeview-node:hover .ibiz-control-treeview-context-menu-trigger{display:inline-block}.ibiz-control-treeview-context-menu-trigger{display:none;flex-shrink:0;width:30px;text-align:center;cursor:pointer}.ibiz-control-treeview-context-menu-trigger__caption-icon{vertical-align:middle}.ibiz-control-treeview-context-menu.mx-context-menu{padding:var(--ibiz-spacing-extra-tight) 0}.ibiz-control-treeview-context-menu.mx-context-menu .mx-context-menu-item{padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base)}.ibiz-control-treeview-quick-search{margin-bottom:var(--ibiz-spacing-tight)}
|
|
1
|
+
.ibiz-control-treeview{--ibiz-control-treeview-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);--ibiz-control-treeview-icon-height:var(--ibiz-spacing-base);--ibiz-control-treeview-icon-width:var(--ibiz-spacing-base);height:100%;padding:var(--ibiz-control-treeview-padding)}.ibiz-control-treeview-node{display:flex;flex-grow:1;flex-shrink:1;align-items:center;min-width:1px;height:100%}.ibiz-control-treeview-node__icon{width:var(--ibiz-control-treeview-icon-width);height:var(--ibiz-control-treeview-icon-height);margin-right:var(--ibiz-spacing-tight)}.ibiz-control-treeview-node__label{flex-grow:1;flex-shrink:1;min-width:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-control-treeview-node:hover .ibiz-control-treeview-context-menu-trigger{display:inline-block}.ibiz-control-treeview-node--disabled{color:var(--ibiz-color-disabled-text);cursor:not-allowed}.ibiz-control-treeview-context-menu-trigger{display:none;flex-shrink:0;width:30px;text-align:center;cursor:pointer}.ibiz-control-treeview-context-menu-trigger__caption-icon{vertical-align:middle}.ibiz-control-treeview-context-menu.mx-context-menu{padding:var(--ibiz-spacing-extra-tight) 0}.ibiz-control-treeview-context-menu.mx-context-menu .mx-context-menu-item{padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base)}.ibiz-control-treeview-quick-search{margin-bottom:var(--ibiz-spacing-tight)}
|
package/es/control/tree/tree.mjs
CHANGED
|
@@ -120,7 +120,8 @@ const TreeControl = /* @__PURE__ */ defineComponent({
|
|
|
120
120
|
_id: node._id,
|
|
121
121
|
_uuid: node._uuid,
|
|
122
122
|
_leaf: node._leaf,
|
|
123
|
-
_text: node._text
|
|
123
|
+
_text: node._text,
|
|
124
|
+
_disableSelect: node._disableSelect
|
|
124
125
|
}));
|
|
125
126
|
};
|
|
126
127
|
c.evt.on("onAfterRefreshParent", (event) => {
|
|
@@ -457,7 +458,8 @@ const TreeControl = /* @__PURE__ */ defineComponent({
|
|
|
457
458
|
"props": {
|
|
458
459
|
label: "_text",
|
|
459
460
|
children: "_children",
|
|
460
|
-
isLeaf: "_leaf"
|
|
461
|
+
isLeaf: "_leaf",
|
|
462
|
+
disabled: "_disableSelect"
|
|
461
463
|
},
|
|
462
464
|
"lazy": true,
|
|
463
465
|
"load": this.loadData,
|
|
@@ -525,7 +527,7 @@ const TreeControl = /* @__PURE__ */ defineComponent({
|
|
|
525
527
|
"onDblclick": (evt) => this.onNodeDbClick(nodeData, evt),
|
|
526
528
|
"onClick": (evt) => this.onNodeClick(nodeData, evt),
|
|
527
529
|
"onContextmenu": (evt) => this.onNodeContextmenu(nodeData, evt),
|
|
528
|
-
"class": [this.ns.b("node"), (_b = nodeModel.sysCss) == null ? void 0 : _b.cssName]
|
|
530
|
+
"class": [this.ns.b("node"), nodeData._disableSelect ? this.ns.bm("node", "disabled") : "", (_b = nodeModel.sysCss) == null ? void 0 : _b.cssName]
|
|
529
531
|
}, [content, this.renderCounter(nodeModel), this.renderContextMenu(nodeModel, nodeData)]);
|
|
530
532
|
}
|
|
531
533
|
});
|
|
@@ -20,6 +20,7 @@ export declare const IBizTreeGridExControl: import("@ibiz-template/vue3-util").T
|
|
|
20
20
|
tableRef: import("vue").Ref<IData | undefined>;
|
|
21
21
|
elTableData: import("vue").ComputedRef<IData[]>;
|
|
22
22
|
renderColumns: import("vue").ComputedRef<import("@ibiz/model-core").IDETreeColumn[]>;
|
|
23
|
+
tableRefreshKey: import("vue").Ref<string>;
|
|
23
24
|
renderNoData: () => false | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
24
25
|
[key: string]: any;
|
|
25
26
|
}>;
|
|
@@ -24,6 +24,7 @@ export declare const TreeGridExControl: import("vue").DefineComponent<{
|
|
|
24
24
|
tableRef: import("vue").Ref<IData | undefined>;
|
|
25
25
|
elTableData: import("vue").ComputedRef<IData[]>;
|
|
26
26
|
renderColumns: import("vue").ComputedRef<IDETreeColumn[]>;
|
|
27
|
+
tableRefreshKey: import("vue").Ref<string>;
|
|
27
28
|
renderNoData: () => VNode | false;
|
|
28
29
|
loadData: (item: IData, treeNode: unknown, callback: (nodes: IData[]) => void) => Promise<void>;
|
|
29
30
|
onRowClick: (data: IData, _column: IData, event: MouseEvent) => Promise<void>;
|
|
@@ -3,6 +3,7 @@ import { useControlController, useNamespace } from '@ibiz-template/vue3-util';
|
|
|
3
3
|
import { TreeGridExController } from '@ibiz-template/runtime';
|
|
4
4
|
import './tree-grid-ex.css';
|
|
5
5
|
import { RuntimeError } from '@ibiz-template/core';
|
|
6
|
+
import { createUUID } from 'qx-util';
|
|
6
7
|
import { useRowEditPopover } from './use-row-edit-popover.mjs';
|
|
7
8
|
|
|
8
9
|
"use strict";
|
|
@@ -64,6 +65,7 @@ const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
|
64
65
|
return temp;
|
|
65
66
|
});
|
|
66
67
|
};
|
|
68
|
+
const tableRefreshKey = ref(createUUID());
|
|
67
69
|
const treeRootData = computed(() => {
|
|
68
70
|
if (!c.state.isLoaded) {
|
|
69
71
|
return [];
|
|
@@ -76,11 +78,15 @@ const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
|
76
78
|
}, []);
|
|
77
79
|
});
|
|
78
80
|
const elTableData = computed(() => {
|
|
81
|
+
tableRefreshKey.value = createUUID();
|
|
79
82
|
if (treeRootData.value.length === 0) {
|
|
80
83
|
return [];
|
|
81
84
|
}
|
|
82
85
|
return toElNodes(treeRootData.value, true);
|
|
83
86
|
});
|
|
87
|
+
c.evt.on("onAfterRefreshParent", () => {
|
|
88
|
+
tableRefreshKey.value = createUUID();
|
|
89
|
+
});
|
|
84
90
|
const loadData = async (item, treeNode, callback) => {
|
|
85
91
|
let nodes;
|
|
86
92
|
const nodeData = c.getNodeData(item.id);
|
|
@@ -155,6 +161,7 @@ const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
|
155
161
|
tableRef,
|
|
156
162
|
elTableData,
|
|
157
163
|
renderColumns,
|
|
164
|
+
tableRefreshKey,
|
|
158
165
|
renderNoData,
|
|
159
166
|
loadData,
|
|
160
167
|
onRowClick,
|
|
@@ -207,6 +214,7 @@ const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
|
207
214
|
}, {
|
|
208
215
|
default: () => [this.c.state.isLoaded && createVNode(resolveComponent("el-table"), {
|
|
209
216
|
"ref": "tableRef",
|
|
217
|
+
"key": this.tableRefreshKey,
|
|
210
218
|
"class": this.ns.e("table"),
|
|
211
219
|
"border": true,
|
|
212
220
|
"row-key": "id",
|
|
@@ -27,6 +27,7 @@ export declare const IBizColorPicker: import("vue").DefineComponent<{
|
|
|
27
27
|
ns: import("@ibiz-template/core").Namespace;
|
|
28
28
|
c: ColorPickerEditorController;
|
|
29
29
|
currentVal: Ref<string | null>;
|
|
30
|
+
predefineColors: Ref<string[]>;
|
|
30
31
|
contentStyle: import("vue").ComputedRef<IData | null>;
|
|
31
32
|
colorPicker: Ref<IData | null>;
|
|
32
33
|
handleChange: (e: string | null) => void;
|
|
@@ -14,6 +14,7 @@ const IBizColorPicker = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
const c = props.controller;
|
|
15
15
|
const currentVal = ref("");
|
|
16
16
|
const colorPicker = ref(null);
|
|
17
|
+
const predefineColors = ref(["#000000", "#2C2C2C", "#50555C", "#ACB3BF", "#D0D3D9", "#C4C4C4", "#DADADA", "#E5E5E5", "#F0F0F0", "#F24E1E", "#E99C58", "#FFC700", "#FF4D00", "#FF00D6", "#D82E57", "#8E1DE8", "#0ACF83", "#18A0FB", "#A259FF", "#907CFF"]);
|
|
17
18
|
const showFormDefaultContent = computed(() => {
|
|
18
19
|
if (props.controlParams && props.controlParams.editmode === "hover") {
|
|
19
20
|
return true;
|
|
@@ -57,6 +58,7 @@ const IBizColorPicker = /* @__PURE__ */ defineComponent({
|
|
|
57
58
|
ns,
|
|
58
59
|
c,
|
|
59
60
|
currentVal,
|
|
61
|
+
predefineColors,
|
|
60
62
|
contentStyle,
|
|
61
63
|
colorPicker,
|
|
62
64
|
handleChange,
|
|
@@ -83,7 +85,9 @@ const IBizColorPicker = /* @__PURE__ */ defineComponent({
|
|
|
83
85
|
"onChange": this.handleChange,
|
|
84
86
|
"onBlur": this.onBlur,
|
|
85
87
|
"onFocus": this.onFocus,
|
|
86
|
-
"size": "small"
|
|
88
|
+
"size": "small",
|
|
89
|
+
"predefine": this.predefineColors,
|
|
90
|
+
"show-alpha": true
|
|
87
91
|
}, null), createVNode("span", {
|
|
88
92
|
"class": this.ns.b("text")
|
|
89
93
|
}, [this.currentVal])]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, computed, watch, onMounted, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { getDataPickerProps, getEditorEmits, useNamespace, renderString } from '@ibiz-template/vue3-util';
|
|
3
|
-
import { isEmpty } from 'ramda';
|
|
3
|
+
import { isEmpty, isNil } from 'ramda';
|
|
4
4
|
import './ibiz-picker.css';
|
|
5
5
|
|
|
6
6
|
"use strict";
|
|
@@ -161,7 +161,7 @@ const IBizPicker = /* @__PURE__ */ defineComponent({
|
|
|
161
161
|
onMounted(() => {
|
|
162
162
|
watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
163
163
|
if (newVal !== oldVal) {
|
|
164
|
-
if (!isLoaded.value && editorRef.value) {
|
|
164
|
+
if (!isLoaded.value && editorRef.value && isNil(props.value)) {
|
|
165
165
|
await onSearch("");
|
|
166
166
|
}
|
|
167
167
|
const curItem = items.value.find((item) => Object.is(item[c.keyName], newVal));
|
|
@@ -89,7 +89,7 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
89
89
|
onMounted(() => {
|
|
90
90
|
watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
91
91
|
if (newVal !== oldVal) {
|
|
92
|
-
if (!isLoaded.value && editorRef.value) {
|
|
92
|
+
if (!isLoaded.value && editorRef.value && isNil(props.value)) {
|
|
93
93
|
shouldLoad.value = true;
|
|
94
94
|
await onSearch("");
|
|
95
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-span{display:inline-block;font-size:var(--ibiz-form-item-font-size);line-height:var(--ibiz-form-item-line-height);color:var(--ibiz-form-item-text-color);white-space:pre-line}.ibiz-span--readonly{color:var(--ibiz-form-item-readonly-color)}.ibiz-span__code-list{
|
|
1
|
+
.ibiz-span{display:inline-block;font-size:var(--ibiz-form-item-font-size);line-height:var(--ibiz-form-item-line-height);color:var(--ibiz-form-item-text-color);white-space:pre-line}.ibiz-span--readonly{color:var(--ibiz-form-item-readonly-color)}.ibiz-span__code-list{height:100%}.ibiz-form-item .ibiz-span.is-show-default{padding:var(--ibiz-form-item-hover-edit-padding)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IBizContext } from '@ibiz-template/core';
|
|
2
|
-
import { OpenAppViewCommand } from '@ibiz-template/runtime';
|
|
2
|
+
import { parseViewProtocol, OpenAppViewCommand } from '@ibiz-template/runtime';
|
|
3
3
|
import { h } from 'vue';
|
|
4
4
|
import { InternalMessageDefault } from './internal-message-default.mjs';
|
|
5
5
|
|
|
@@ -39,25 +39,11 @@ class InternalMessageDefaultProvider {
|
|
|
39
39
|
*/
|
|
40
40
|
async openRedirectView(msg, redirectUrl) {
|
|
41
41
|
await ibiz.hub.notice.internalMessage.markRead(msg);
|
|
42
|
-
|
|
43
|
-
const params = {};
|
|
44
|
-
const url = new URL(redirectUrl);
|
|
45
|
-
if (url.searchParams.size > 0) {
|
|
46
|
-
url.searchParams.forEach((value, _key) => {
|
|
47
|
-
params[_key] = value;
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
const rdTagItems = url.pathname.replace("//", "").split("/");
|
|
51
|
-
const [appOrViewTag, viewTag] = rdTagItems;
|
|
52
|
-
if (viewTag) {
|
|
53
|
-
viewId = viewTag;
|
|
54
|
-
} else {
|
|
55
|
-
viewId = appOrViewTag;
|
|
56
|
-
}
|
|
42
|
+
const { viewId, context, params } = parseViewProtocol(redirectUrl);
|
|
57
43
|
ibiz.commands.execute(
|
|
58
44
|
OpenAppViewCommand.TAG,
|
|
59
45
|
viewId,
|
|
60
|
-
IBizContext.create(
|
|
46
|
+
IBizContext.create(context),
|
|
61
47
|
params
|
|
62
48
|
);
|
|
63
49
|
}
|
|
@@ -21,7 +21,6 @@ export declare const AppModalComponent: import("vue").DefineComponent<{
|
|
|
21
21
|
modal: Modal;
|
|
22
22
|
present: () => void;
|
|
23
23
|
dismiss: (_data?: IModalData) => void;
|
|
24
|
-
onClosed: () => void;
|
|
25
24
|
onBeforeClose: (done: () => void) => Promise<void>;
|
|
26
25
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
26
|
opts: {
|
|
@@ -16,7 +16,6 @@ const AppModalComponent = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
setup(props, ctx) {
|
|
17
17
|
const ns = useNamespace("modal");
|
|
18
18
|
const isShow = ref(false);
|
|
19
|
-
let data;
|
|
20
19
|
const {
|
|
21
20
|
zIndex
|
|
22
21
|
} = useUIStore();
|
|
@@ -50,10 +49,10 @@ const AppModalComponent = /* @__PURE__ */ defineComponent({
|
|
|
50
49
|
const modal = new Modal({
|
|
51
50
|
mode: ViewMode.MODAL,
|
|
52
51
|
viewUsage: 2,
|
|
53
|
-
dismiss: (
|
|
52
|
+
dismiss: (data) => {
|
|
54
53
|
zIndex.decrement();
|
|
55
54
|
isShow.value = false;
|
|
56
|
-
data
|
|
55
|
+
ctx.emit("dismiss", data);
|
|
57
56
|
}
|
|
58
57
|
});
|
|
59
58
|
const onBeforeClose = async (done) => {
|
|
@@ -68,9 +67,6 @@ const AppModalComponent = /* @__PURE__ */ defineComponent({
|
|
|
68
67
|
const present = () => {
|
|
69
68
|
isShow.value = true;
|
|
70
69
|
};
|
|
71
|
-
const onClosed = () => {
|
|
72
|
-
ctx.emit("dismiss", data);
|
|
73
|
-
};
|
|
74
70
|
return {
|
|
75
71
|
ns,
|
|
76
72
|
isShow,
|
|
@@ -80,7 +76,6 @@ const AppModalComponent = /* @__PURE__ */ defineComponent({
|
|
|
80
76
|
modal,
|
|
81
77
|
present,
|
|
82
78
|
dismiss,
|
|
83
|
-
onClosed,
|
|
84
79
|
onBeforeClose
|
|
85
80
|
};
|
|
86
81
|
},
|
|
@@ -92,8 +87,7 @@ const AppModalComponent = /* @__PURE__ */ defineComponent({
|
|
|
92
87
|
class: [this.ns.b(), this.options.placement && this.ns.m(this.options.placement), this.options.modalClass],
|
|
93
88
|
style: this.customStyle,
|
|
94
89
|
zIndex: this.modalZIndex,
|
|
95
|
-
|
|
96
|
-
onBeforeClose: this.onBeforeClose,
|
|
90
|
+
beforeClose: this.onBeforeClose,
|
|
97
91
|
...this.options
|
|
98
92
|
}, (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a, this.modal));
|
|
99
93
|
}
|
|
@@ -70,4 +70,11 @@ export declare class EditViewEngine extends ViewEngineBase {
|
|
|
70
70
|
* @return {*} {void}
|
|
71
71
|
*/
|
|
72
72
|
initMarkOpenData(): void;
|
|
73
|
+
/**
|
|
74
|
+
* 刷新确认
|
|
75
|
+
* @author lxm
|
|
76
|
+
* @date 2024-02-06 11:40:36
|
|
77
|
+
* @return {*} {Promise<boolean>}
|
|
78
|
+
*/
|
|
79
|
+
reloadConfirm(): Promise<boolean>;
|
|
73
80
|
}
|
|
@@ -267,11 +267,12 @@ class EditViewEngine extends ViewEngineBase {
|
|
|
267
267
|
* @return {*} {void}
|
|
268
268
|
*/
|
|
269
269
|
initMarkOpenData() {
|
|
270
|
-
if (isNil(this.view.modal.routeDepth)) {
|
|
270
|
+
if (isNil(this.view.modal.routeDepth) || !this.view.model.markOpenDataMode) {
|
|
271
271
|
return;
|
|
272
272
|
}
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
const modes = this.view.model.markOpenDataMode.split(";");
|
|
274
|
+
let hasOpenConfirm = false;
|
|
275
|
+
const callback = async (data) => {
|
|
275
276
|
if (!this.view.state.activated) {
|
|
276
277
|
return;
|
|
277
278
|
}
|
|
@@ -292,44 +293,93 @@ class EditViewEngine extends ViewEngineBase {
|
|
|
292
293
|
}
|
|
293
294
|
ibiz.notification.info({
|
|
294
295
|
position: "bottom-right",
|
|
295
|
-
title:
|
|
296
|
-
desc: "".concat(actionMsg, " ").concat(this.view.state.caption, "-").concat(dataInfo)
|
|
297
|
-
});
|
|
298
|
-
};
|
|
299
|
-
this.form.evt.on("onLoadSuccess", (event) => {
|
|
300
|
-
const formData = event.data[0];
|
|
301
|
-
srfkey = formData.srfkey;
|
|
302
|
-
ibiz.markOpenData.action(this.deName, srfkey, "VIEW");
|
|
303
|
-
ibiz.markOpenData.subscribe(this.deName, srfkey, callback);
|
|
304
|
-
this.view.evt.on("onDestroyed", () => {
|
|
305
|
-
ibiz.markOpenData.unsubscribe(this.deName, srfkey, callback);
|
|
296
|
+
title: "\u901A\u77E5",
|
|
297
|
+
desc: "".concat(modes.includes("DISPLAYOPPERSON") ? data.username : "\u6709\u4EBA", " ").concat(actionMsg, " ").concat(this.view.state.caption, "-").concat(dataInfo)
|
|
306
298
|
});
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
299
|
+
if (hasOpenConfirm === false && data.action === "UPDATE" && modes.includes("NOTICERELOAD")) {
|
|
300
|
+
hasOpenConfirm = true;
|
|
301
|
+
const isReload = await this.reloadConfirm();
|
|
302
|
+
if (isReload) {
|
|
303
|
+
this.refresh();
|
|
304
|
+
}
|
|
305
|
+
hasOpenConfirm = false;
|
|
312
306
|
}
|
|
313
|
-
isWait = true;
|
|
314
|
-
ibiz.markOpenData.action(this.deName, srfkey, "EDIT");
|
|
315
|
-
setTimeout(
|
|
316
|
-
() => {
|
|
317
|
-
isWait = false;
|
|
318
|
-
},
|
|
319
|
-
1e3 * 60 * 5
|
|
320
|
-
);
|
|
321
307
|
};
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
308
|
+
const doActions = [];
|
|
309
|
+
if (modes.includes("EDITDATA") || modes.includes("DISPLAYOPPERSON") || modes.includes("NOTICERELOAD")) {
|
|
310
|
+
doActions.push("EDIT", "VIEW", "UPDATE", "CLOSE");
|
|
311
|
+
} else if (modes.includes("OPENDATA")) {
|
|
312
|
+
doActions.push("VIEW", "CLOSE");
|
|
313
|
+
}
|
|
314
|
+
if (doActions.length === 0) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
let srfkey;
|
|
318
|
+
let hasSubscribe = false;
|
|
319
|
+
if (doActions.includes("VIEW")) {
|
|
320
|
+
this.form.evt.on("onLoadSuccess", (event) => {
|
|
321
|
+
const formData = event.data[0];
|
|
322
|
+
srfkey = formData.srfkey;
|
|
323
|
+
ibiz.markOpenData.action(this.deName, srfkey, "VIEW");
|
|
324
|
+
if (!hasSubscribe) {
|
|
325
|
+
ibiz.markOpenData.subscribe(this.deName, srfkey, callback);
|
|
326
|
+
this.view.evt.on("onDestroyed", () => {
|
|
327
|
+
ibiz.markOpenData.unsubscribe(this.deName, srfkey, callback);
|
|
328
|
+
});
|
|
329
|
+
hasSubscribe = true;
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
if (doActions.includes("EDIT")) {
|
|
334
|
+
let isWait = false;
|
|
335
|
+
const actionEdit = () => {
|
|
336
|
+
if (!srfkey || isWait) {
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
isWait = true;
|
|
340
|
+
ibiz.markOpenData.action(this.deName, srfkey, "EDIT");
|
|
341
|
+
setTimeout(
|
|
342
|
+
() => {
|
|
343
|
+
isWait = false;
|
|
344
|
+
},
|
|
345
|
+
1e3 * 60 * 5
|
|
346
|
+
);
|
|
347
|
+
};
|
|
348
|
+
this.form.evt.on("onFormDataChange", actionEdit);
|
|
349
|
+
}
|
|
350
|
+
if (doActions.includes("UPDATE")) {
|
|
351
|
+
this.form.evt.on("onSaveSuccess", () => {
|
|
352
|
+
if (srfkey) {
|
|
353
|
+
ibiz.markOpenData.action(this.deName, srfkey, "UPDATE");
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
if (doActions.includes("CLOSE")) {
|
|
358
|
+
this.view.evt.on("onCloseView", () => {
|
|
359
|
+
if (srfkey) {
|
|
360
|
+
ibiz.markOpenData.action(this.deName, srfkey, "CLOSE");
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* 刷新确认
|
|
367
|
+
* @author lxm
|
|
368
|
+
* @date 2024-02-06 11:40:36
|
|
369
|
+
* @return {*} {Promise<boolean>}
|
|
370
|
+
*/
|
|
371
|
+
async reloadConfirm() {
|
|
372
|
+
const result = await ibiz.confirm.info({
|
|
373
|
+
title: "\u662F\u5426\u5237\u65B0",
|
|
374
|
+
desc: "\u6570\u636E\u5DF2\u88AB\u4FEE\u6539\u662F\u5426\u5237\u65B0\u9875\u9762\uFF1F"
|
|
332
375
|
});
|
|
376
|
+
if (result && this.form.state.modified) {
|
|
377
|
+
return ibiz.confirm.warning({
|
|
378
|
+
title: "\u5237\u65B0\u63D0\u9192",
|
|
379
|
+
desc: "\u8868\u5355\u6570\u636E\u5DF2\u7ECF\u4FEE\u6539\uFF0C\u786E\u5B9A\u8981\u5237\u65B0\uFF1F"
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
return result;
|
|
333
383
|
}
|
|
334
384
|
}
|
|
335
385
|
|
|
@@ -454,7 +454,9 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
454
454
|
}), this.previewinfo[0] && this.previewinfo[0].length ? vue.createVNode("div", {
|
|
455
455
|
"class": "ibiz-control-toolbar__item"
|
|
456
456
|
}, [vue.createVNode(vue.resolveComponent("el-button"), {
|
|
457
|
-
"onClick": this.onButtonImportClick
|
|
457
|
+
"onClick": this.onButtonImportClick,
|
|
458
|
+
"disabled": !this.selectValues.join(""),
|
|
459
|
+
"title": !this.selectValues.join("") ? "\u8BF7\u9009\u62E9\u5217\u5BFC\u5165\u5C5E\u6027!" : ""
|
|
458
460
|
}, _isSlot(_slot2 = ibiz.i18n.t("component.dataImport2.import")) ? _slot2 : {
|
|
459
461
|
default: () => [_slot2]
|
|
460
462
|
})]) : ""])])])]), vue.createVNode(vue.resolveComponent("data-import2-table"), {
|
|
@@ -252,6 +252,9 @@ class DRBarController extends runtime.ControlController {
|
|
|
252
252
|
*/
|
|
253
253
|
handleSelectChange(key, isRoutePushed = false) {
|
|
254
254
|
var _a;
|
|
255
|
+
if (this.state.selectedItem === key) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
255
258
|
const drBarItem = (_a = this.model.dedrctrlItems) == null ? void 0 : _a.find((item) => item.id === key);
|
|
256
259
|
if (drBarItem) {
|
|
257
260
|
this.setVisible("navPos");
|
|
@@ -69,6 +69,7 @@ const FormItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
69
69
|
}
|
|
70
70
|
return vue.createVNode(vue.resolveComponent("iBizFormItemContainer"), {
|
|
71
71
|
"class": [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass],
|
|
72
|
+
"style": this.modelData.cssStyle,
|
|
72
73
|
"required": this.c.state.required,
|
|
73
74
|
"error": this.c.state.error,
|
|
74
75
|
"label": this.c.labelCaption,
|
|
@@ -44,28 +44,16 @@ const TabExpPanelControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
44
|
const route = vueRouter.useRoute();
|
|
45
45
|
vue.watch(() => route.fullPath, (newVal, oldVal) => {
|
|
46
46
|
if (newVal !== oldVal) {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const tempFullPath = route.fullPath.split("/").slice(0, nextKeyNumber).join("/");
|
|
56
|
-
c.state.tabPages.forEach((page) => {
|
|
57
|
-
if (page.fullPath === tempFullPath) {
|
|
58
|
-
c.state.activeName = page.tabTag;
|
|
47
|
+
const depth = c.view.modal.routeDepth;
|
|
48
|
+
if (depth) {
|
|
49
|
+
const routePath = vue3Util.route2routePath(route);
|
|
50
|
+
const {
|
|
51
|
+
srfnav
|
|
52
|
+
} = routePath.pathNodes[depth - 1];
|
|
53
|
+
if (srfnav && c.state.activeName && c.state.activeName !== srfnav) {
|
|
54
|
+
c.state.activeName = srfnav;
|
|
59
55
|
c.handleTabChange();
|
|
60
56
|
}
|
|
61
|
-
});
|
|
62
|
-
if (c.state.activeName) {
|
|
63
|
-
const currentPage = c.state.tabPages.find((page) => {
|
|
64
|
-
return page.tabTag === c.state.activeName;
|
|
65
|
-
});
|
|
66
|
-
if (currentPage) {
|
|
67
|
-
currentPage.fullPath = tempFullPath;
|
|
68
|
-
}
|
|
69
57
|
}
|
|
70
58
|
}
|
|
71
59
|
}, {
|
|
@@ -72,6 +72,7 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
72
72
|
return vue.createVNode(vue.resolveComponent("el-sub-menu"), {
|
|
73
73
|
"class": ns.b("submenu"),
|
|
74
74
|
"index": item.id,
|
|
75
|
+
"title": item.tooltip,
|
|
75
76
|
"popper-class": ns.b("submenu-popper")
|
|
76
77
|
}, {
|
|
77
78
|
default: () => {
|
|
@@ -122,7 +122,8 @@ const TreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
122
122
|
_id: node._id,
|
|
123
123
|
_uuid: node._uuid,
|
|
124
124
|
_leaf: node._leaf,
|
|
125
|
-
_text: node._text
|
|
125
|
+
_text: node._text,
|
|
126
|
+
_disableSelect: node._disableSelect
|
|
126
127
|
}));
|
|
127
128
|
};
|
|
128
129
|
c.evt.on("onAfterRefreshParent", (event) => {
|
|
@@ -459,7 +460,8 @@ const TreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
459
460
|
"props": {
|
|
460
461
|
label: "_text",
|
|
461
462
|
children: "_children",
|
|
462
|
-
isLeaf: "_leaf"
|
|
463
|
+
isLeaf: "_leaf",
|
|
464
|
+
disabled: "_disableSelect"
|
|
463
465
|
},
|
|
464
466
|
"lazy": true,
|
|
465
467
|
"load": this.loadData,
|
|
@@ -527,7 +529,7 @@ const TreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
527
529
|
"onDblclick": (evt) => this.onNodeDbClick(nodeData, evt),
|
|
528
530
|
"onClick": (evt) => this.onNodeClick(nodeData, evt),
|
|
529
531
|
"onContextmenu": (evt) => this.onNodeContextmenu(nodeData, evt),
|
|
530
|
-
"class": [this.ns.b("node"), (_b = nodeModel.sysCss) == null ? void 0 : _b.cssName]
|
|
532
|
+
"class": [this.ns.b("node"), nodeData._disableSelect ? this.ns.bm("node", "disabled") : "", (_b = nodeModel.sysCss) == null ? void 0 : _b.cssName]
|
|
531
533
|
}, [content, this.renderCounter(nodeModel), this.renderContextMenu(nodeModel, nodeData)]);
|
|
532
534
|
}
|
|
533
535
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-treeview{--ibiz-control-treeview-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);--ibiz-control-treeview-icon-height:var(--ibiz-spacing-base);--ibiz-control-treeview-icon-width:var(--ibiz-spacing-base);height:100%;padding:var(--ibiz-control-treeview-padding)}.ibiz-control-treeview-node{display:flex;flex-grow:1;flex-shrink:1;align-items:center;min-width:1px;height:100%}.ibiz-control-treeview-node__icon{width:var(--ibiz-control-treeview-icon-width);height:var(--ibiz-control-treeview-icon-height);margin-right:var(--ibiz-spacing-tight)}.ibiz-control-treeview-node__label{flex-grow:1;flex-shrink:1;min-width:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-control-treeview-node:hover .ibiz-control-treeview-context-menu-trigger{display:inline-block}.ibiz-control-treeview-context-menu-trigger{display:none;flex-shrink:0;width:30px;text-align:center;cursor:pointer}.ibiz-control-treeview-context-menu-trigger__caption-icon{vertical-align:middle}.ibiz-control-treeview-context-menu.mx-context-menu{padding:var(--ibiz-spacing-extra-tight) 0}.ibiz-control-treeview-context-menu.mx-context-menu .mx-context-menu-item{padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base)}.ibiz-control-treeview-quick-search{margin-bottom:var(--ibiz-spacing-tight)}
|
|
1
|
+
.ibiz-control-treeview{--ibiz-control-treeview-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);--ibiz-control-treeview-icon-height:var(--ibiz-spacing-base);--ibiz-control-treeview-icon-width:var(--ibiz-spacing-base);height:100%;padding:var(--ibiz-control-treeview-padding)}.ibiz-control-treeview-node{display:flex;flex-grow:1;flex-shrink:1;align-items:center;min-width:1px;height:100%}.ibiz-control-treeview-node__icon{width:var(--ibiz-control-treeview-icon-width);height:var(--ibiz-control-treeview-icon-height);margin-right:var(--ibiz-spacing-tight)}.ibiz-control-treeview-node__label{flex-grow:1;flex-shrink:1;min-width:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-control-treeview-node:hover .ibiz-control-treeview-context-menu-trigger{display:inline-block}.ibiz-control-treeview-node--disabled{color:var(--ibiz-color-disabled-text);cursor:not-allowed}.ibiz-control-treeview-context-menu-trigger{display:none;flex-shrink:0;width:30px;text-align:center;cursor:pointer}.ibiz-control-treeview-context-menu-trigger__caption-icon{vertical-align:middle}.ibiz-control-treeview-context-menu.mx-context-menu{padding:var(--ibiz-spacing-extra-tight) 0}.ibiz-control-treeview-context-menu.mx-context-menu .mx-context-menu-item{padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base)}.ibiz-control-treeview-quick-search{margin-bottom:var(--ibiz-spacing-tight)}
|