@ibiz-template/vue3-components 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-8RikZoLN.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-keqImqNu.js → xlsx-util-vcRxGFII.js} +1 -1
- package/es/common/data-import/data-import.d.ts +1 -3
- package/es/common/data-import/data-import.mjs +34 -77
- package/es/common/view-message/view-message.mjs +3 -0
- package/es/control/form/form/form.mjs +7 -9
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +40 -0
- package/es/control/form/form-detail/form-rawitem/form-rawitem.mjs +2 -1
- package/es/control/grid/grid/grid.d.ts +1 -0
- package/es/control/grid/grid/grid.mjs +15 -3
- package/es/control/grid/grid/index.d.ts +3 -0
- package/es/control/tree-grid/index.d.ts +3 -0
- package/es/control/tree-grid/tree-grid.d.ts +3 -1
- package/es/control/tree-grid/tree-grid.mjs +15 -3
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +7 -1
- package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.css +1 -1
- package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.mjs +7 -3
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +5 -1
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.css +1 -1
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +7 -3
- package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +5 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +18 -3
- package/es/editor/text-box/input/input.d.ts +1 -1
- package/es/index.mjs +1 -0
- package/es/panel-component/data-import/data-import-shell.css +0 -0
- package/es/panel-component/data-import/data-import-shell.d.ts +27 -0
- package/es/panel-component/data-import/data-import-shell.mjs +49 -0
- package/es/panel-component/data-import/data-import.provider.d.ts +15 -0
- package/es/panel-component/data-import/data-import.provider.mjs +21 -0
- package/es/panel-component/data-import/index.d.ts +24 -0
- package/es/panel-component/data-import/index.mjs +15 -0
- package/es/panel-component/index.d.ts +1 -0
- package/es/panel-component/index.mjs +5 -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 +9 -3
- package/es/panel-component/user-action/index.d.ts +25 -0
- package/es/panel-component/user-action/index.mjs +14 -0
- package/es/panel-component/user-action/user-action-provider.d.ts +6 -0
- package/es/panel-component/user-action/user-action-provider.mjs +21 -0
- package/es/panel-component/user-action/user-action.css +1 -0
- package/es/panel-component/user-action/user-action.d.ts +28 -0
- package/es/panel-component/user-action/user-action.mjs +74 -0
- package/es/view-engine/app-data-upload-view.engine.d.ts +13 -0
- package/es/view-engine/app-data-upload-view.engine.mjs +7 -0
- package/es/view-engine/index-view.engine.mjs +13 -1
- package/es/view-engine/index.mjs +5 -0
- package/es/view-engine/tab-search-view.engine.mjs +5 -0
- package/lib/common/data-import/data-import.cjs +33 -76
- package/lib/common/view-message/view-message.cjs +3 -0
- package/lib/control/form/form/form.cjs +7 -9
- package/lib/control/form/form-detail/form-rawitem/form-rawitem.cjs +2 -1
- package/lib/control/grid/grid/grid.cjs +14 -2
- package/lib/control/tree-grid/tree-grid.cjs +14 -2
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +6 -0
- package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.cjs +7 -3
- package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.css +1 -1
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +5 -1
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +7 -3
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.css +1 -1
- package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +5 -1
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +18 -3
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
- package/lib/index.cjs +12 -10
- package/lib/panel-component/data-import/data-import-shell.cjs +51 -0
- package/lib/panel-component/data-import/data-import-shell.css +0 -0
- package/lib/panel-component/data-import/data-import.provider.cjs +23 -0
- package/lib/panel-component/data-import/index.cjs +20 -0
- package/lib/panel-component/index.cjs +31 -26
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.cjs +9 -3
- package/lib/panel-component/user-action/index.cjs +19 -0
- package/lib/panel-component/user-action/user-action-provider.cjs +23 -0
- package/lib/panel-component/user-action/user-action.cjs +76 -0
- package/lib/panel-component/user-action/user-action.css +1 -0
- package/lib/view-engine/app-data-upload-view.engine.cjs +9 -0
- package/lib/view-engine/index-view.engine.cjs +12 -0
- package/lib/view-engine/index.cjs +5 -0
- package/lib/view-engine/tab-search-view.engine.cjs +5 -0
- package/package.json +6 -6
- package/dist/index-Wk7Kbc7Z.js +0 -4
|
@@ -233,6 +233,8 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
233
233
|
},
|
|
234
234
|
render() {
|
|
235
235
|
let _slot;
|
|
236
|
+
const overflowMode = ibiz.config.pickerEditor.overflowMode;
|
|
237
|
+
const isEllipsis = overflowMode === "ellipsis";
|
|
236
238
|
const editContent = this.hasChildren ? createVNode(resolveComponent("el-tree-select"), mergeProps({
|
|
237
239
|
"ref": "editorRef",
|
|
238
240
|
"modelValue": this.curValue,
|
|
@@ -248,6 +250,7 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
248
250
|
"placeholder": this.c.placeHolder ? this.c.placeHolder : " ",
|
|
249
251
|
"disabled": this.disabled,
|
|
250
252
|
"loading": this.isLoading,
|
|
253
|
+
"fit-input-width": isEllipsis,
|
|
251
254
|
"onBlur": this.onBlur,
|
|
252
255
|
"onFocus": this.onFocus,
|
|
253
256
|
"onKeyup": this.handleKeyUp,
|
|
@@ -255,7 +258,15 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
255
258
|
"props": {
|
|
256
259
|
class: this.customNodeClass
|
|
257
260
|
}
|
|
258
|
-
}, this.$attrs),
|
|
261
|
+
}, this.$attrs), {
|
|
262
|
+
default: (node) => {
|
|
263
|
+
const data = node.data || {};
|
|
264
|
+
const label = data.label || "";
|
|
265
|
+
return createVNode("span", {
|
|
266
|
+
"title": isEllipsis ? label : ""
|
|
267
|
+
}, [label]);
|
|
268
|
+
}
|
|
269
|
+
}) : createVNode(resolveComponent("el-select"), mergeProps({
|
|
259
270
|
"ref": "editorRef",
|
|
260
271
|
"modelValue": this.curValue,
|
|
261
272
|
"onUpdate:modelValue": ($event) => this.curValue = $event,
|
|
@@ -268,6 +279,7 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
268
279
|
"placeholder": this.c.placeHolder ? this.c.placeHolder : " ",
|
|
269
280
|
"disabled": this.disabled,
|
|
270
281
|
"loading": this.isLoading,
|
|
282
|
+
"fit-input-width": isEllipsis,
|
|
271
283
|
"onBlur": this.onBlur,
|
|
272
284
|
"onFocus": this.onFocus,
|
|
273
285
|
"onKeyup": this.handleKeyUp,
|
|
@@ -281,7 +293,8 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
281
293
|
"style": item.bkcolor ? this.ns.cssVarBlock({
|
|
282
294
|
"select-option-item-bkcolor": "".concat(item.bkcolor)
|
|
283
295
|
}) : "",
|
|
284
|
-
"class": [item.cls ? item.cls : null]
|
|
296
|
+
"class": [item.cls ? item.cls : null],
|
|
297
|
+
"title": isEllipsis ? item.text : ""
|
|
285
298
|
}, {
|
|
286
299
|
default: () => {
|
|
287
300
|
return createVNode("div", {
|
|
@@ -291,7 +304,9 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
291
304
|
}) : ""
|
|
292
305
|
}, [item.sysImage && createVNode(resolveComponent("iBizIcon"), {
|
|
293
306
|
"icon": item.sysImage
|
|
294
|
-
}, null),
|
|
307
|
+
}, null), createVNode("span", {
|
|
308
|
+
"class": [isEllipsis && this.ns.be("select-option-content", "text")]
|
|
309
|
+
}, [item.text])]);
|
|
295
310
|
}
|
|
296
311
|
});
|
|
297
312
|
})) ? _slot : {
|
|
@@ -26,7 +26,7 @@ export declare const IBizInput: import("vue").DefineComponent<{
|
|
|
26
26
|
c: TextBoxEditorController;
|
|
27
27
|
ns: import("@ibiz-template/core").Namespace;
|
|
28
28
|
rows: import("vue").Ref<number>;
|
|
29
|
-
type: import("vue").ComputedRef<"string" | "text" | "
|
|
29
|
+
type: import("vue").ComputedRef<"string" | "text" | "textarea" | "password">;
|
|
30
30
|
currentVal: import("vue").Ref<string>;
|
|
31
31
|
readonlyText: import("vue").ComputedRef<string>;
|
|
32
32
|
handleChange: (val: string | number) => void;
|
package/es/index.mjs
CHANGED
|
@@ -98,6 +98,7 @@ export { SplitContainerController } from './panel-component/split-container/spli
|
|
|
98
98
|
export { IBizSplitContainer } from './panel-component/split-container/index.mjs';
|
|
99
99
|
export { IBizPanelIndexViewSearch } from './panel-component/panel-index-view-search/index.mjs';
|
|
100
100
|
export { IBizIndexActions } from './panel-component/index-actions/index.mjs';
|
|
101
|
+
export { IBizUserAction } from './panel-component/user-action/index.mjs';
|
|
101
102
|
export { View404 } from './view/404-view/404-view.mjs';
|
|
102
103
|
export { LoginView } from './view/login-view/login-view.mjs';
|
|
103
104
|
export { IBizWFStepTraceView } from './view/wf-step-trace-view/index.mjs';
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IPanelRawItem } from '@ibiz/model-core';
|
|
3
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
4
|
+
import './data-import-shell.scss';
|
|
5
|
+
export declare const DataImportShell: import("vue").DefineComponent<{
|
|
6
|
+
modelData: {
|
|
7
|
+
type: PropType<IPanelRawItem>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
controller: {
|
|
11
|
+
type: typeof PanelItemController;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
16
|
+
c: PanelItemController<import("@ibiz/model-core").IPanelItem>;
|
|
17
|
+
onDismiss: () => void;
|
|
18
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
modelData: {
|
|
20
|
+
type: PropType<IPanelRawItem>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
controller: {
|
|
24
|
+
type: typeof PanelItemController;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { resolveComponent, h, defineComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
4
|
+
import './data-import-shell.css';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const DataImportShell = /* @__PURE__ */ defineComponent({
|
|
8
|
+
name: "IBizDataImportShell",
|
|
9
|
+
props: {
|
|
10
|
+
modelData: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
controller: {
|
|
15
|
+
type: PanelItemController,
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(prop) {
|
|
20
|
+
const ns = useNamespace("data-import-shell");
|
|
21
|
+
const c = prop.controller;
|
|
22
|
+
const onDismiss = () => {
|
|
23
|
+
c.panel.view.closeView();
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
ns,
|
|
27
|
+
c,
|
|
28
|
+
onDismiss
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
render() {
|
|
32
|
+
const {
|
|
33
|
+
deDataImport,
|
|
34
|
+
appDataEntity
|
|
35
|
+
} = this.c.panel.view.state;
|
|
36
|
+
const classNames = [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass];
|
|
37
|
+
const importComponentName = deDataImport.enableCustomized ? "DataImport2" : "DataImport";
|
|
38
|
+
return h(resolveComponent(importComponentName), {
|
|
39
|
+
dismiss: this.onDismiss,
|
|
40
|
+
dataImport: deDataImport,
|
|
41
|
+
appDataEntity,
|
|
42
|
+
context: this.c.panel.context,
|
|
43
|
+
params: this.c.panel.params,
|
|
44
|
+
class: classNames
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export { DataImportShell };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelItem } from '@ibiz/model-core';
|
|
3
|
+
/**
|
|
4
|
+
* 用户信息适配器
|
|
5
|
+
*
|
|
6
|
+
* @author lxm
|
|
7
|
+
* @date 2022-09-19 22:09:03
|
|
8
|
+
* @export
|
|
9
|
+
* @class DataImportProvider
|
|
10
|
+
* @implements {EditorProvider}
|
|
11
|
+
*/
|
|
12
|
+
export declare class DataImportProvider implements IPanelItemProvider {
|
|
13
|
+
component: string;
|
|
14
|
+
createController(panelItem: IPanelItem, panel: PanelController, parent: PanelItemController | undefined): Promise<PanelItemController>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
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 DataImportProvider {
|
|
11
|
+
constructor() {
|
|
12
|
+
__publicField(this, "component", "IBizDataImportShell");
|
|
13
|
+
}
|
|
14
|
+
async createController(panelItem, panel, parent) {
|
|
15
|
+
const c = new PanelItemController(panelItem, panel, parent);
|
|
16
|
+
await c.init();
|
|
17
|
+
return c;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { DataImportProvider };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const IBizDataImport: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
modelData: {
|
|
3
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
controller: {
|
|
7
|
+
type: typeof import("@ibiz-template/runtime").PanelItemController;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
12
|
+
c: import("@ibiz-template/runtime").PanelItemController<import("@ibiz/model-core").IPanelItem>;
|
|
13
|
+
onDismiss: () => void;
|
|
14
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
modelData: {
|
|
16
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
controller: {
|
|
20
|
+
type: typeof import("@ibiz-template/runtime").PanelItemController;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
}>>, {}, {}>>;
|
|
24
|
+
export default IBizDataImport;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
2
|
+
import { withInstall } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { DataImportShell } from './data-import-shell.mjs';
|
|
4
|
+
import { DataImportProvider } from './data-import.provider.mjs';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const IBizDataImport = withInstall(DataImportShell, function(v) {
|
|
8
|
+
v.component(DataImportShell.name, DataImportShell);
|
|
9
|
+
registerPanelItemProvider(
|
|
10
|
+
"RAWITEM_DATA_IMPORT",
|
|
11
|
+
() => new DataImportProvider()
|
|
12
|
+
);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { IBizDataImport, IBizDataImport as default };
|
|
@@ -7,6 +7,7 @@ export * from './panel-tab-panel';
|
|
|
7
7
|
export * from './split-container';
|
|
8
8
|
export * from './panel-index-view-search';
|
|
9
9
|
export * from './index-actions';
|
|
10
|
+
export * from './user-action';
|
|
10
11
|
export declare const IBizPanelComponents: {
|
|
11
12
|
install: (v: App) => void;
|
|
12
13
|
};
|
|
@@ -20,6 +20,8 @@ import { IBizViewMessage } from './view-message/index.mjs';
|
|
|
20
20
|
import { IBizPanelStaticCarousel } from './panel-static-carousel/index.mjs';
|
|
21
21
|
import { IBizCoopPos } from './coop-pos/index.mjs';
|
|
22
22
|
import { IBizViewMsgPos } from './view-msg-pos/index.mjs';
|
|
23
|
+
import { IBizUserAction } from './user-action/index.mjs';
|
|
24
|
+
import { IBizDataImport } from './data-import/index.mjs';
|
|
23
25
|
export { NavPosIndexState } from './nav-pos-index/nav-pos-index.state.mjs';
|
|
24
26
|
export { NavPosIndexController } from './nav-pos-index/nav-pos-index.controller.mjs';
|
|
25
27
|
export { PanelButtonController } from './panel-button/panel-button.controller.mjs';
|
|
@@ -65,7 +67,9 @@ const IBizPanelComponents = {
|
|
|
65
67
|
v.use(IBizPanelContainerTabs);
|
|
66
68
|
v.use(IBizCoopPos);
|
|
67
69
|
v.use(IBizViewMsgPos);
|
|
70
|
+
v.use(IBizUserAction);
|
|
71
|
+
v.use(IBizDataImport);
|
|
68
72
|
}
|
|
69
73
|
};
|
|
70
74
|
|
|
71
|
-
export { IBizAuthUserinfo, IBizIndexActions, IBizNavPosIndex, IBizPanelAppTitle, IBizPanelButton, IBizPanelComponents, IBizPanelIndexViewSearch, IBizPanelTabPanel, IBizSplitContainer, IBizPanelComponents as default };
|
|
75
|
+
export { IBizAuthUserinfo, IBizIndexActions, IBizNavPosIndex, IBizPanelAppTitle, IBizPanelButton, IBizPanelComponents, IBizPanelIndexViewSearch, IBizPanelTabPanel, IBizSplitContainer, IBizUserAction, IBizPanelComponents as default };
|
|
@@ -16,6 +16,7 @@ export declare const IBizPanelIndexViewSearch: import("@ibiz-template/vue3-util"
|
|
|
16
16
|
c: import("@ibiz-template/runtime").PanelItemController<import("@ibiz/model-core").IPanelItem>;
|
|
17
17
|
query: import("vue").Ref<string>;
|
|
18
18
|
menuAlign: import("vue").ComputedRef<string>;
|
|
19
|
+
onEnter: (event: KeyboardEvent) => void;
|
|
19
20
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
21
|
modelData: {
|
|
21
22
|
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
@@ -20,6 +20,7 @@ export declare const PanelIndexViewSearch: import("vue").DefineComponent<{
|
|
|
20
20
|
c: PanelItemController<import("@ibiz/model-core").IPanelItem>;
|
|
21
21
|
query: import("vue").Ref<string>;
|
|
22
22
|
menuAlign: import("vue").ComputedRef<string>;
|
|
23
|
+
onEnter: (event: KeyboardEvent) => void;
|
|
23
24
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
25
|
modelData: {
|
|
25
26
|
type: PropType<IPanelRawItem>;
|
|
@@ -58,11 +58,16 @@ const PanelIndexViewSearch = /* @__PURE__ */ defineComponent({
|
|
|
58
58
|
tempContext.srfappid = targetMenu.appId || ibiz.env.appId;
|
|
59
59
|
await ibiz.commands.execute(AppFuncCommand.TAG, targetMenu.appFuncId, tempContext, {
|
|
60
60
|
...tempParam,
|
|
61
|
-
|
|
61
|
+
srfquery: query.value
|
|
62
62
|
}, {});
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
+
const onEnter = (event) => {
|
|
67
|
+
if (event.key === "Enter") {
|
|
68
|
+
onSearch();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
66
71
|
return {
|
|
67
72
|
ns,
|
|
68
73
|
classArr,
|
|
@@ -71,7 +76,8 @@ const PanelIndexViewSearch = /* @__PURE__ */ defineComponent({
|
|
|
71
76
|
onSearch,
|
|
72
77
|
c,
|
|
73
78
|
query,
|
|
74
|
-
menuAlign
|
|
79
|
+
menuAlign,
|
|
80
|
+
onEnter
|
|
75
81
|
};
|
|
76
82
|
},
|
|
77
83
|
render() {
|
|
@@ -85,7 +91,7 @@ const PanelIndexViewSearch = /* @__PURE__ */ defineComponent({
|
|
|
85
91
|
"class": this.ns.b("search"),
|
|
86
92
|
"placeholder": ibiz.i18n.t("component.indexSearch.placeholder"),
|
|
87
93
|
"onInput": this.onInput,
|
|
88
|
-
"
|
|
94
|
+
"onKeyup": this.onEnter
|
|
89
95
|
}, {
|
|
90
96
|
prefix: () => {
|
|
91
97
|
return createVNode("ion-icon", {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const IBizUserAction: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
modelData: {
|
|
3
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
controller: {
|
|
7
|
+
type: import("vue").PropType<import("@ibiz-template/runtime").PanelItemController<import("@ibiz/model-core").IPanelItem>>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
12
|
+
c: import("@ibiz-template/runtime").PanelItemController<import("@ibiz/model-core").IPanelItem>;
|
|
13
|
+
sysImage: import("@ibiz/model-core").ISysImage | undefined;
|
|
14
|
+
onClick: () => Promise<void>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
modelData: {
|
|
17
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
controller: {
|
|
21
|
+
type: import("vue").PropType<import("@ibiz-template/runtime").PanelItemController<import("@ibiz/model-core").IPanelItem>>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
}>>, {}, {}>>;
|
|
25
|
+
export default IBizUserAction;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { withInstall } from '@ibiz-template/vue3-util';
|
|
2
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
3
|
+
import { UserAction } from './user-action.mjs';
|
|
4
|
+
import { UserActionProvider } from './user-action-provider.mjs';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const IBizUserAction = withInstall(UserAction, function(v) {
|
|
8
|
+
v.component(UserAction.name, UserAction);
|
|
9
|
+
registerPanelItemProvider("RAWITEM_SETTING", () => new UserActionProvider());
|
|
10
|
+
registerPanelItemProvider("RAWITEM_HELPER", () => new UserActionProvider());
|
|
11
|
+
registerPanelItemProvider("RAWITEM_CUSTOM", () => new UserActionProvider());
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { IBizUserAction, IBizUserAction as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelItem } from '@ibiz/model-core';
|
|
3
|
+
export declare class UserActionProvider implements IPanelItemProvider {
|
|
4
|
+
component: string;
|
|
5
|
+
createController(panelItem: IPanelItem, panel: PanelController, parent: PanelItemController | undefined): Promise<PanelItemController>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
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 UserActionProvider {
|
|
11
|
+
constructor() {
|
|
12
|
+
__publicField(this, "component", "IBizUserAction");
|
|
13
|
+
}
|
|
14
|
+
async createController(panelItem, panel, parent) {
|
|
15
|
+
const c = new PanelItemController(panelItem, panel, parent);
|
|
16
|
+
await c.init();
|
|
17
|
+
return c;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { UserActionProvider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-user-action{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ibiz-user-action__image{display:flex;place-items:center center;justify-content:center;width:28px;height:28px;margin-bottom:6px;cursor:pointer}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
3
|
+
import { IPanelRawItem } from '@ibiz/model-core';
|
|
4
|
+
import './user-action.scss';
|
|
5
|
+
export declare const UserAction: import("vue").DefineComponent<{
|
|
6
|
+
modelData: {
|
|
7
|
+
type: PropType<IPanelRawItem>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
controller: {
|
|
11
|
+
type: PropType<PanelItemController<import("@ibiz/model-core").IPanelItem>>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
16
|
+
c: PanelItemController<import("@ibiz/model-core").IPanelItem>;
|
|
17
|
+
sysImage: import("@ibiz/model-core").ISysImage | undefined;
|
|
18
|
+
onClick: () => Promise<void>;
|
|
19
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
modelData: {
|
|
21
|
+
type: PropType<IPanelRawItem>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
controller: {
|
|
25
|
+
type: PropType<PanelItemController<import("@ibiz/model-core").IPanelItem>>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { AppFuncCommand } from '@ibiz-template/runtime';
|
|
4
|
+
import './user-action.css';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const UserAction = /* @__PURE__ */ defineComponent({
|
|
8
|
+
name: "IBizUserAction",
|
|
9
|
+
props: {
|
|
10
|
+
modelData: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
controller: {
|
|
15
|
+
type: Object,
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(props) {
|
|
20
|
+
const ns = useNamespace("user-action");
|
|
21
|
+
const c = props.controller;
|
|
22
|
+
const imgConfig = {
|
|
23
|
+
SETTING: {
|
|
24
|
+
imagePath: "svg/setting.svg"
|
|
25
|
+
},
|
|
26
|
+
HELPER: {
|
|
27
|
+
imagePath: "svg/helper.svg"
|
|
28
|
+
},
|
|
29
|
+
CUSTOM: {
|
|
30
|
+
imagePath: "svg/custom-workbench.svg"
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
let sysImage = props.modelData.sysImage;
|
|
34
|
+
if (!sysImage && props.modelData && props.modelData.rawItem) {
|
|
35
|
+
const predefinedType = props.modelData.rawItem.predefinedType;
|
|
36
|
+
if (predefinedType) {
|
|
37
|
+
sysImage = imgConfig[predefinedType];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const onClick = async () => {
|
|
41
|
+
const id = props.modelData.id;
|
|
42
|
+
const menuC = c.panel.view.getController("appmenu");
|
|
43
|
+
if (menuC) {
|
|
44
|
+
const targetMenu = menuC.allAppMenuItems.find((item) => {
|
|
45
|
+
return item.id === id;
|
|
46
|
+
});
|
|
47
|
+
if (targetMenu) {
|
|
48
|
+
const tempContext = c.panel.context.clone();
|
|
49
|
+
const tempParam = c.panel.params;
|
|
50
|
+
tempContext.srfappid = targetMenu.appId || ibiz.env.appId;
|
|
51
|
+
await ibiz.commands.execute(AppFuncCommand.TAG, targetMenu.appFuncId, tempContext, tempParam, {});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
return {
|
|
56
|
+
ns,
|
|
57
|
+
c,
|
|
58
|
+
sysImage,
|
|
59
|
+
onClick
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
render() {
|
|
63
|
+
return createVNode("div", {
|
|
64
|
+
"class": this.ns.b(),
|
|
65
|
+
"onClick": this.onClick,
|
|
66
|
+
"title": this.modelData.caption
|
|
67
|
+
}, [createVNode(resolveComponent("i-biz-icon"), {
|
|
68
|
+
"class": [this.ns.e("image")],
|
|
69
|
+
"icon": this.sysImage
|
|
70
|
+
}, null)]);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export { UserAction };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAppDataUploadViewState, IViewEvent, ViewController, ViewEngineBase } from '@ibiz-template/runtime';
|
|
2
|
+
import { IAppView } from '@ibiz/model-core';
|
|
3
|
+
/**
|
|
4
|
+
* 应用数据上传视图引擎
|
|
5
|
+
* @author lxm
|
|
6
|
+
* @date 2024-04-15 04:03:03
|
|
7
|
+
* @export
|
|
8
|
+
* @class AppDataUploadViewEngine
|
|
9
|
+
* @extends {ViewEngineBase}
|
|
10
|
+
*/
|
|
11
|
+
export declare class AppDataUploadViewEngine extends ViewEngineBase {
|
|
12
|
+
protected view: ViewController<IAppView, IAppDataUploadViewState, IViewEvent>;
|
|
13
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewEngineBase, ViewCallTag } from '@ibiz-template/runtime';
|
|
1
|
+
import { ViewEngineBase, OpenAppViewCommand, ViewCallTag } from '@ibiz-template/runtime';
|
|
2
2
|
|
|
3
3
|
"use strict";
|
|
4
4
|
class IndexViewEngine extends ViewEngineBase {
|
|
@@ -30,6 +30,18 @@ class IndexViewEngine extends ViewEngineBase {
|
|
|
30
30
|
}
|
|
31
31
|
async onMounted() {
|
|
32
32
|
await super.onMounted();
|
|
33
|
+
if (!this.isExistAndInLayout("appmenu")) {
|
|
34
|
+
const { model, context, params } = this.view;
|
|
35
|
+
const { defAppViewId } = model;
|
|
36
|
+
if (defAppViewId) {
|
|
37
|
+
ibiz.commands.execute(
|
|
38
|
+
OpenAppViewCommand.TAG,
|
|
39
|
+
defAppViewId,
|
|
40
|
+
context,
|
|
41
|
+
params
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
33
45
|
if (window.innerWidth <= 1200) {
|
|
34
46
|
this.toggleCollapse();
|
|
35
47
|
}
|
package/es/view-engine/index.mjs
CHANGED
|
@@ -44,6 +44,7 @@ import { GanttViewEngine } from './gantt-view.engine.mjs';
|
|
|
44
44
|
import { DEIndexViewEngine } from './de-index-view-engine.mjs';
|
|
45
45
|
import { SubAppRefViewEngine } from './sub-app-ref-view.engine.mjs';
|
|
46
46
|
import { TabSearchViewEngine } from './tab-search-view.engine.mjs';
|
|
47
|
+
import { AppDataUploadViewEngine } from './app-data-upload-view.engine.mjs';
|
|
47
48
|
|
|
48
49
|
"use strict";
|
|
49
50
|
const IBizViewEngine = {
|
|
@@ -236,6 +237,10 @@ const IBizViewEngine = {
|
|
|
236
237
|
"VIEW_DESUBAPPREFVIEW",
|
|
237
238
|
(c) => new SubAppRefViewEngine(c)
|
|
238
239
|
);
|
|
240
|
+
ibiz.engine.register(
|
|
241
|
+
"VIEW_APPDATAUPLOADVIEW",
|
|
242
|
+
(c) => new AppDataUploadViewEngine(c)
|
|
243
|
+
);
|
|
239
244
|
ibiz.engine.register(
|
|
240
245
|
"VIEW_GridView9",
|
|
241
246
|
(c) => new GridViewEngine(c)
|
|
@@ -60,6 +60,11 @@ class TabSearchViewEngine extends TabExpViewEngine {
|
|
|
60
60
|
this.calcViewParams();
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
+
if (this.tabExpPanel) {
|
|
64
|
+
this.tabExpPanel.evt.on("onTabChange", () => {
|
|
65
|
+
this.calcViewParams();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
63
68
|
}
|
|
64
69
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
65
70
|
async call(key, args) {
|