@ibiz-template/vue3-components 0.3.2 → 0.3.3
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-zqQcb8gx.js +14 -0
- package/dist/index-zqQcb8gx.js.map +1 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-dxEbPtZK.js → xlsx-util-T__pkKxV.js} +2 -2
- package/dist/{xlsx-util-dxEbPtZK.js.map → xlsx-util-T__pkKxV.js.map} +1 -1
- package/es/common/data-import/data-import.d.ts +9 -1
- package/es/common/data-import/data-import.mjs +12 -5
- package/es/control/form/form/form.mjs +39 -15
- package/es/control/form/search-form/search-form.css +1 -1
- package/es/control/form/search-form/search-form.mjs +3 -32
- package/es/control/panel/panel/index.d.ts +6 -0
- package/es/control/panel/panel/panel.d.ts +7 -1
- package/es/control/panel/panel/panel.mjs +4 -1
- package/es/control/panel/view-layout-panel/index.d.ts +6 -0
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts +7 -1
- package/es/control/panel/view-layout-panel/view-layout-panel.mjs +4 -1
- package/es/panel-component/index.mjs +2 -0
- package/es/panel-component/nav-pos-index/nav-pos-index.controller.mjs +3 -4
- package/es/panel-component/searchform-buttons/index.d.ts +25 -0
- package/es/panel-component/searchform-buttons/index.mjs +15 -0
- package/es/panel-component/searchform-buttons/searchform-buttons.controller.d.ts +38 -0
- package/es/panel-component/searchform-buttons/searchform-buttons.controller.mjs +67 -0
- package/es/panel-component/searchform-buttons/searchform-buttons.css +1 -0
- package/es/panel-component/searchform-buttons/searchform-buttons.d.ts +28 -0
- package/es/panel-component/searchform-buttons/searchform-buttons.mjs +63 -0
- package/es/panel-component/searchform-buttons/searchform-buttons.provider.d.ts +15 -0
- package/es/panel-component/searchform-buttons/searchform-buttons.provider.mjs +21 -0
- package/lib/common/data-import/data-import.cjs +12 -5
- package/lib/control/form/form/form.cjs +38 -14
- package/lib/control/form/search-form/search-form.cjs +2 -31
- package/lib/control/form/search-form/search-form.css +1 -1
- package/lib/control/panel/panel/panel.cjs +4 -1
- package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +4 -1
- package/lib/panel-component/index.cjs +2 -0
- package/lib/panel-component/nav-pos-index/nav-pos-index.controller.cjs +3 -4
- package/lib/panel-component/searchform-buttons/index.cjs +20 -0
- package/lib/panel-component/searchform-buttons/searchform-buttons.cjs +65 -0
- package/lib/panel-component/searchform-buttons/searchform-buttons.controller.cjs +69 -0
- package/lib/panel-component/searchform-buttons/searchform-buttons.css +1 -0
- package/lib/panel-component/searchform-buttons/searchform-buttons.provider.cjs +23 -0
- package/package.json +7 -7
- package/dist/index-bG6JVwfZ.js +0 -14
- package/dist/index-bG6JVwfZ.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAppDataEntity } from '@ibiz/model-core';
|
|
1
|
+
import { IAppDataEntity, IAppDEDataImport } from '@ibiz/model-core';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
import './data-import.scss';
|
|
4
4
|
export declare const DataImport: import("vue").DefineComponent<{
|
|
@@ -10,6 +10,10 @@ export declare const DataImport: import("vue").DefineComponent<{
|
|
|
10
10
|
type: PropType<IAppDataEntity>;
|
|
11
11
|
required: true;
|
|
12
12
|
};
|
|
13
|
+
dataImport: {
|
|
14
|
+
type: PropType<IAppDEDataImport>;
|
|
15
|
+
required: false;
|
|
16
|
+
};
|
|
13
17
|
}, {
|
|
14
18
|
ns: import("@ibiz-template/core").Namespace;
|
|
15
19
|
onLinkClick: () => Promise<void>;
|
|
@@ -31,4 +35,8 @@ export declare const DataImport: import("vue").DefineComponent<{
|
|
|
31
35
|
type: PropType<IAppDataEntity>;
|
|
32
36
|
required: true;
|
|
33
37
|
};
|
|
38
|
+
dataImport: {
|
|
39
|
+
type: PropType<IAppDEDataImport>;
|
|
40
|
+
required: false;
|
|
41
|
+
};
|
|
34
42
|
}>>, {}, {}>;
|
|
@@ -14,6 +14,10 @@ const DataImport = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
appDataEntity: {
|
|
15
15
|
type: Object,
|
|
16
16
|
required: true
|
|
17
|
+
},
|
|
18
|
+
dataImport: {
|
|
19
|
+
type: Object,
|
|
20
|
+
required: false
|
|
17
21
|
}
|
|
18
22
|
},
|
|
19
23
|
setup(props) {
|
|
@@ -38,14 +42,14 @@ const DataImport = /* @__PURE__ */ defineComponent({
|
|
|
38
42
|
isLoading.value = true;
|
|
39
43
|
try {
|
|
40
44
|
if (ibiz.env.enableMqtt) {
|
|
41
|
-
asyncImportData(selectedFile, props.appDataEntity);
|
|
45
|
+
asyncImportData(selectedFile, props.appDataEntity, props.dataImport);
|
|
42
46
|
ibiz.notification.info({
|
|
43
47
|
desc: "\u5F00\u59CB\u5BFC\u5165\uFF0C\u8BE6\u7EC6\u8FDB\u5EA6\u548C\u7ED3\u679C\u8BF7\u770B\u5E94\u7528\u901A\u77E5"
|
|
44
48
|
});
|
|
45
49
|
onCancelButtonClick();
|
|
46
50
|
return;
|
|
47
51
|
}
|
|
48
|
-
result = await importData(selectedFile, props.appDataEntity);
|
|
52
|
+
result = await importData(selectedFile, props.appDataEntity, props.dataImport);
|
|
49
53
|
ibiz.mc.command.send({
|
|
50
54
|
srfdecodename: props.appDataEntity.codeName
|
|
51
55
|
}, "OBJECTCREATED");
|
|
@@ -64,13 +68,16 @@ const DataImport = /* @__PURE__ */ defineComponent({
|
|
|
64
68
|
}
|
|
65
69
|
};
|
|
66
70
|
const onLinkClick = async () => {
|
|
67
|
-
var _a;
|
|
68
|
-
|
|
71
|
+
var _a, _b;
|
|
72
|
+
let templateUrl = `${props.appDataEntity.codeName2.toLowerCase()}/importtemplate`;
|
|
73
|
+
if ((_a = props.dataImport) == null ? void 0 : _a.codeName) {
|
|
74
|
+
templateUrl += `?srfimporttag=${props.dataImport.codeName}`;
|
|
75
|
+
}
|
|
69
76
|
const res = await ibiz.net.request(templateUrl, {
|
|
70
77
|
responseType: "blob"
|
|
71
78
|
});
|
|
72
79
|
if (res.status === 200) {
|
|
73
|
-
let fileName = ((
|
|
80
|
+
let fileName = ((_b = res.headers["content-disposition"].split(";").find((str) => str.indexOf("filename=") !== -1)) == null ? void 0 : _b.slice(9)) || "";
|
|
74
81
|
fileName = decodeURIComponent(fileName);
|
|
75
82
|
const blob = new Blob([res.data], {
|
|
76
83
|
type: "application/vnd.ms-excel"
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { renderSlot, createTextVNode, createVNode, resolveComponent, h, defineComponent } from 'vue';
|
|
1
|
+
import { isVNode, renderSlot, createTextVNode, createVNode, resolveComponent, h, defineComponent } from 'vue';
|
|
2
2
|
import { findChildFormDetails } from '@ibiz-template/runtime';
|
|
3
3
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
4
4
|
import './form.css';
|
|
5
5
|
|
|
6
6
|
"use strict";
|
|
7
|
+
function _isSlot(s) {
|
|
8
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
9
|
+
}
|
|
7
10
|
const FormControl = /* @__PURE__ */ defineComponent({
|
|
8
11
|
name: "IBizFormControl",
|
|
9
12
|
props: {
|
|
@@ -77,23 +80,44 @@ const FormControl = /* @__PURE__ */ defineComponent({
|
|
|
77
80
|
};
|
|
78
81
|
},
|
|
79
82
|
render() {
|
|
83
|
+
const {
|
|
84
|
+
state,
|
|
85
|
+
model,
|
|
86
|
+
controlPanel
|
|
87
|
+
} = this.c;
|
|
88
|
+
const {
|
|
89
|
+
isCreated
|
|
90
|
+
} = state;
|
|
91
|
+
const slots = {};
|
|
92
|
+
if (isCreated) {
|
|
93
|
+
if (this.$slots.default) {
|
|
94
|
+
slots.default = () => {
|
|
95
|
+
return this.$slots.default({
|
|
96
|
+
...this.slotProps
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
} else {
|
|
100
|
+
const key = this.c.controlPanel ? model.name : "default";
|
|
101
|
+
slots[key] = () => {
|
|
102
|
+
return createVNode(resolveComponent("iBizFormPage"), {
|
|
103
|
+
"modelData": this.c.model,
|
|
104
|
+
"controller": this.c
|
|
105
|
+
}, {
|
|
106
|
+
default: () => {
|
|
107
|
+
var _a;
|
|
108
|
+
return [(_a = this.c.model.deformPages) == null ? void 0 : _a.map((page) => {
|
|
109
|
+
return this.renderByDetailType(page);
|
|
110
|
+
})];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}
|
|
80
116
|
return createVNode(resolveComponent("iBizControlBase"), {
|
|
81
117
|
"class": [this.ns.b()],
|
|
82
118
|
"controller": this.c
|
|
83
|
-
}, {
|
|
84
|
-
default: () => [
|
|
85
|
-
...this.slotProps
|
|
86
|
-
}) : createVNode(resolveComponent("iBizFormPage"), {
|
|
87
|
-
"modelData": this.c.model,
|
|
88
|
-
"controller": this.c
|
|
89
|
-
}, {
|
|
90
|
-
default: () => {
|
|
91
|
-
var _a;
|
|
92
|
-
return [(_a = this.c.model.deformPages) == null ? void 0 : _a.map((page) => {
|
|
93
|
-
return this.renderByDetailType(page);
|
|
94
|
-
})];
|
|
95
|
-
}
|
|
96
|
-
}), this.$slots.searchButtons && this.$slots.searchButtons({})]]
|
|
119
|
+
}, _isSlot(slots) ? slots : {
|
|
120
|
+
default: () => [slots]
|
|
97
121
|
});
|
|
98
122
|
}
|
|
99
123
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.ibiz-control-searchform-buttons{display:flex;align-items:center;justify-content:flex-end;flex-shrink:0;height:100%;margin-top:var(--ibiz-spacing-tight);margin-left:var(--ibiz-spacing-tight);text-align:right}.ibiz-control-searchform{--ibiz-control-searchform-bg-color:transparent;--ibiz-control-searchform-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);display:flex;padding:var(--ibiz-control-searchform-padding);background-color:var(--ibiz-control-searchform-bg-color)}.ibiz-control-searchform>.ibiz-form-page{flex-grow:1}
|
|
1
|
+
@charset "UTF-8";.ibiz-control-searchform-buttons{display:flex;align-items:center;justify-content:flex-end;flex-shrink:0;height:100%;margin-top:var(--ibiz-spacing-tight);margin-left:var(--ibiz-spacing-tight);text-align:right}.ibiz-control-searchform{--ibiz-control-searchform-bg-color:transparent;--ibiz-control-searchform-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);display:flex;padding:var(--ibiz-control-searchform-padding);background-color:var(--ibiz-control-searchform-bg-color)}.ibiz-control-searchform>.ibiz-form-page{flex-grow:1}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive, resolveComponent,
|
|
1
|
+
import { reactive, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { SearchFormController } from '@ibiz-template/runtime';
|
|
3
3
|
import { useControlController, useNamespace } from '@ibiz-template/vue3-util';
|
|
4
4
|
import './search-form.css';
|
|
@@ -50,40 +50,11 @@ const SearchFormControl = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
return createVNode(resolveComponent("iBizFormControl"), {
|
|
53
|
-
"class": [this.ns.b()
|
|
53
|
+
"class": [this.ns.b()],
|
|
54
54
|
"controller": this.c,
|
|
55
55
|
"onKeyup": (e) => this.c.onKeyUp(e)
|
|
56
56
|
}, {
|
|
57
|
-
...this.$slots
|
|
58
|
-
searchButtons: () => {
|
|
59
|
-
if (this.c.model.searchButtonStyle === "NONE") {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
return createVNode("div", {
|
|
63
|
-
"class": this.ns.b("buttons")
|
|
64
|
-
}, [this.c.model.searchButtonStyle === "SEARCHONLY" ? createVNode(resolveComponent("el-button"), {
|
|
65
|
-
"onClick": () => this.c.onSearchButtonClick()
|
|
66
|
-
}, {
|
|
67
|
-
default: () => [createTextVNode("\u641C\u7D22")]
|
|
68
|
-
}) : createVNode(resolveComponent("el-dropdown"), {
|
|
69
|
-
"split-button": true,
|
|
70
|
-
"type": "primary",
|
|
71
|
-
"onClick": () => this.c.onSearchButtonClick()
|
|
72
|
-
}, {
|
|
73
|
-
default: () => createVNode("span", {
|
|
74
|
-
"class": this.ns.b("label")
|
|
75
|
-
}, [createTextVNode("\u641C\u7D22")]),
|
|
76
|
-
dropdown: () => {
|
|
77
|
-
return createVNode(resolveComponent("el-dropdown-menu"), null, {
|
|
78
|
-
default: () => [createVNode(resolveComponent("el-dropdown-item"), {
|
|
79
|
-
"onClick": () => this.c.reset()
|
|
80
|
-
}, {
|
|
81
|
-
default: () => [createTextVNode("\u91CD\u7F6E")]
|
|
82
|
-
})]
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
})]);
|
|
86
|
-
}
|
|
57
|
+
...this.$slots
|
|
87
58
|
});
|
|
88
59
|
}
|
|
89
60
|
});
|
|
@@ -14,6 +14,9 @@ export declare const IBizPanelControl: import("@ibiz-template/vue3-util").TypeWi
|
|
|
14
14
|
provider: {
|
|
15
15
|
type: import("vue").PropType<import("@ibiz-template/runtime").IControlProvider>;
|
|
16
16
|
};
|
|
17
|
+
container: {
|
|
18
|
+
type: import("vue").PropType<import("@ibiz-template/runtime").IController<import("@ibiz/model-core").IModelObject, object, import("@ibiz-template/runtime").IComponentEvent>>;
|
|
19
|
+
};
|
|
17
20
|
data: import("vue").PropType<IData>;
|
|
18
21
|
loadDefault: {
|
|
19
22
|
type: BooleanConstructor;
|
|
@@ -38,6 +41,9 @@ export declare const IBizPanelControl: import("@ibiz-template/vue3-util").TypeWi
|
|
|
38
41
|
provider: {
|
|
39
42
|
type: import("vue").PropType<import("@ibiz-template/runtime").IControlProvider>;
|
|
40
43
|
};
|
|
44
|
+
container: {
|
|
45
|
+
type: import("vue").PropType<import("@ibiz-template/runtime").IController<import("@ibiz/model-core").IModelObject, object, import("@ibiz-template/runtime").IComponentEvent>>;
|
|
46
|
+
};
|
|
41
47
|
data: import("vue").PropType<IData>;
|
|
42
48
|
loadDefault: {
|
|
43
49
|
type: BooleanConstructor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { IPanel } from '@ibiz/model-core';
|
|
3
3
|
import './panel.scss';
|
|
4
|
-
import { IControlProvider, PanelController } from '@ibiz-template/runtime';
|
|
4
|
+
import { IControlProvider, IController, PanelController } from '@ibiz-template/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* 视图布局面板组件
|
|
7
7
|
*/
|
|
@@ -21,6 +21,9 @@ export declare const PanelControl: import("vue").DefineComponent<{
|
|
|
21
21
|
provider: {
|
|
22
22
|
type: PropType<IControlProvider>;
|
|
23
23
|
};
|
|
24
|
+
container: {
|
|
25
|
+
type: PropType<IController<import("@ibiz/model-core").IModelObject, object, import("@ibiz-template/runtime").IComponentEvent>>;
|
|
26
|
+
};
|
|
24
27
|
data: PropType<IData>;
|
|
25
28
|
loadDefault: {
|
|
26
29
|
type: BooleanConstructor;
|
|
@@ -45,6 +48,9 @@ export declare const PanelControl: import("vue").DefineComponent<{
|
|
|
45
48
|
provider: {
|
|
46
49
|
type: PropType<IControlProvider>;
|
|
47
50
|
};
|
|
51
|
+
container: {
|
|
52
|
+
type: PropType<IController<import("@ibiz/model-core").IModelObject, object, import("@ibiz-template/runtime").IComponentEvent>>;
|
|
53
|
+
};
|
|
48
54
|
data: PropType<IData>;
|
|
49
55
|
loadDefault: {
|
|
50
56
|
type: BooleanConstructor;
|
|
@@ -63,6 +63,9 @@ const PanelControl = /* @__PURE__ */ defineComponent({
|
|
|
63
63
|
provider: {
|
|
64
64
|
type: Object
|
|
65
65
|
},
|
|
66
|
+
container: {
|
|
67
|
+
type: Object
|
|
68
|
+
},
|
|
66
69
|
data: Object,
|
|
67
70
|
loadDefault: {
|
|
68
71
|
type: Boolean,
|
|
@@ -70,7 +73,7 @@ const PanelControl = /* @__PURE__ */ defineComponent({
|
|
|
70
73
|
}
|
|
71
74
|
},
|
|
72
75
|
setup(props) {
|
|
73
|
-
const c = useControlController((...args) => new PanelController(...args));
|
|
76
|
+
const c = useControlController((...args) => new PanelController(...args, props.container));
|
|
74
77
|
const ns = useNamespace(`control-${c.model.controlType.toLowerCase()}`);
|
|
75
78
|
watch(() => props.data, (newVal) => {
|
|
76
79
|
if (newVal) {
|
|
@@ -14,6 +14,9 @@ export declare const IBizViewLayoutPanelControl: import("@ibiz-template/vue3-uti
|
|
|
14
14
|
provider: {
|
|
15
15
|
type: import("vue").PropType<import("@ibiz-template/runtime").IControlProvider>;
|
|
16
16
|
};
|
|
17
|
+
container: {
|
|
18
|
+
type: import("vue").PropType<import("@ibiz-template/runtime").IController<import("@ibiz/model-core").IModelObject, object, import("@ibiz-template/runtime").IComponentEvent>>;
|
|
19
|
+
};
|
|
17
20
|
data: import("vue").PropType<IData>;
|
|
18
21
|
}, {
|
|
19
22
|
c: import("@ibiz-template/runtime").ViewLayoutPanelController;
|
|
@@ -44,6 +47,9 @@ export declare const IBizViewLayoutPanelControl: import("@ibiz-template/vue3-uti
|
|
|
44
47
|
provider: {
|
|
45
48
|
type: import("vue").PropType<import("@ibiz-template/runtime").IControlProvider>;
|
|
46
49
|
};
|
|
50
|
+
container: {
|
|
51
|
+
type: import("vue").PropType<import("@ibiz-template/runtime").IController<import("@ibiz/model-core").IModelObject, object, import("@ibiz-template/runtime").IComponentEvent>>;
|
|
52
|
+
};
|
|
47
53
|
data: import("vue").PropType<IData>;
|
|
48
54
|
}>>, {
|
|
49
55
|
params: IParams;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType, VNode } from 'vue';
|
|
2
2
|
import { IPanelItem, IViewLayoutPanel } from '@ibiz/model-core';
|
|
3
3
|
import './view-layout-panel.scss';
|
|
4
|
-
import { IControlProvider, IPanelItemController, IPanelItemProvider, ViewLayoutPanelController } from '@ibiz-template/runtime';
|
|
4
|
+
import { IController, IControlProvider, IPanelItemController, IPanelItemProvider, ViewLayoutPanelController } from '@ibiz-template/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* 视图布局面板组件
|
|
7
7
|
*/
|
|
@@ -21,6 +21,9 @@ export declare const ViewLayoutPanelControl: import("vue").DefineComponent<{
|
|
|
21
21
|
provider: {
|
|
22
22
|
type: PropType<IControlProvider>;
|
|
23
23
|
};
|
|
24
|
+
container: {
|
|
25
|
+
type: PropType<IController<import("@ibiz/model-core").IModelObject, object, import("@ibiz-template/runtime").IComponentEvent>>;
|
|
26
|
+
};
|
|
24
27
|
data: PropType<IData>;
|
|
25
28
|
}, {
|
|
26
29
|
c: ViewLayoutPanelController;
|
|
@@ -49,6 +52,9 @@ export declare const ViewLayoutPanelControl: import("vue").DefineComponent<{
|
|
|
49
52
|
provider: {
|
|
50
53
|
type: PropType<IControlProvider>;
|
|
51
54
|
};
|
|
55
|
+
container: {
|
|
56
|
+
type: PropType<IController<import("@ibiz/model-core").IModelObject, object, import("@ibiz-template/runtime").IComponentEvent>>;
|
|
57
|
+
};
|
|
52
58
|
data: PropType<IData>;
|
|
53
59
|
}>>, {
|
|
54
60
|
params: IParams;
|
|
@@ -25,12 +25,15 @@ const ViewLayoutPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
provider: {
|
|
26
26
|
type: Object
|
|
27
27
|
},
|
|
28
|
+
container: {
|
|
29
|
+
type: Object
|
|
30
|
+
},
|
|
28
31
|
data: Object
|
|
29
32
|
},
|
|
30
33
|
setup(props, {
|
|
31
34
|
slots
|
|
32
35
|
}) {
|
|
33
|
-
const c = useControlController((...args) => new ViewLayoutPanelController(...args));
|
|
36
|
+
const c = useControlController((...args) => new ViewLayoutPanelController(...args, props.container));
|
|
34
37
|
const ns = useNamespace(`control-${c.model.controlType.toLowerCase()}`);
|
|
35
38
|
watch(() => props.data, (newVal) => {
|
|
36
39
|
if (newVal) {
|
|
@@ -17,6 +17,7 @@ import { IBizPanelRememberMe } from './panel-remember-me/index.mjs';
|
|
|
17
17
|
import { IBizIndexActions } from './index-actions/index.mjs';
|
|
18
18
|
import { IBizPanelContainerGroup } from './panel-container-group/index.mjs';
|
|
19
19
|
import { IBizUserMessage } from './user-message/index.mjs';
|
|
20
|
+
import { IBizSearchFormButtons } from './searchform-buttons/index.mjs';
|
|
20
21
|
export { NavPosIndexState } from './nav-pos-index/nav-pos-index.state.mjs';
|
|
21
22
|
export { NavPosIndexController } from './nav-pos-index/nav-pos-index.controller.mjs';
|
|
22
23
|
export { PanelButtonController } from './panel-button/panel-button.controller.mjs';
|
|
@@ -54,6 +55,7 @@ const IBizPanelComponents = {
|
|
|
54
55
|
v.use(IBizPanelContainerGroup);
|
|
55
56
|
v.use(IBizUserMessage);
|
|
56
57
|
v.use(IBizPanelContainerImage);
|
|
58
|
+
v.use(IBizSearchFormButtons);
|
|
57
59
|
}
|
|
58
60
|
};
|
|
59
61
|
|
|
@@ -94,15 +94,11 @@ class NavPosIndexController extends PanelItemController {
|
|
|
94
94
|
currentKey,
|
|
95
95
|
fullPath
|
|
96
96
|
}) {
|
|
97
|
-
if (currentKey === "") {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
97
|
const isCurrentKeyChange = this.state.currentKey !== currentKey;
|
|
101
98
|
if (isCurrentKeyChange) {
|
|
102
99
|
if (this.state.cacheKeys.includes(currentKey) && this.router && this.router.currentRoute.value.matched.length === this.routeDepth + 1) {
|
|
103
100
|
const lastFullPath = this.state.navViewMsgs[currentKey].fullPath;
|
|
104
101
|
if (lastFullPath !== fullPath) {
|
|
105
|
-
console.log("redirect to lastFullPath", lastFullPath);
|
|
106
102
|
setTimeout(() => {
|
|
107
103
|
this.router.push({ path: lastFullPath });
|
|
108
104
|
}, 0);
|
|
@@ -114,6 +110,9 @@ class NavPosIndexController extends PanelItemController {
|
|
|
114
110
|
this.navTabs.state.currentKey = currentKey;
|
|
115
111
|
}
|
|
116
112
|
}
|
|
113
|
+
if (currentKey === "") {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
117
116
|
const index = this.state.operateSort.indexOf(currentKey);
|
|
118
117
|
if (index !== -1) {
|
|
119
118
|
this.state.operateSort.splice(index, 1);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const IBizSearchFormButtons: 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("./searchform-buttons.controller").SearchFormButtonsController;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
12
|
+
c: import("./searchform-buttons.controller").SearchFormButtonsController;
|
|
13
|
+
onSearchButtonClick: () => void;
|
|
14
|
+
onResetButtonClick: () => 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: typeof import("./searchform-buttons.controller").SearchFormButtonsController;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
}>>, {}, {}>>;
|
|
25
|
+
export default IBizSearchFormButtons;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
2
|
+
import { withInstall } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { SearchFormButtons } from './searchform-buttons.mjs';
|
|
4
|
+
import { SearchFormButtonsProvider } from './searchform-buttons.provider.mjs';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const IBizSearchFormButtons = withInstall(SearchFormButtons, function(v) {
|
|
8
|
+
v.component(SearchFormButtons.name, SearchFormButtons);
|
|
9
|
+
registerPanelItemProvider(
|
|
10
|
+
"RAWITEM_SEARCHFORM_BUTTONS",
|
|
11
|
+
() => new SearchFormButtonsProvider()
|
|
12
|
+
);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { IBizSearchFormButtons, IBizSearchFormButtons as default };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ISearchFormController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* 搜索表单按钮控制器
|
|
4
|
+
* @author lxm
|
|
5
|
+
* @date 2023-11-21 02:18:14
|
|
6
|
+
* @export
|
|
7
|
+
* @class SearchFormButtonsController
|
|
8
|
+
* @extends {PanelItemController}
|
|
9
|
+
*/
|
|
10
|
+
export declare class SearchFormButtonsController extends PanelItemController {
|
|
11
|
+
/**
|
|
12
|
+
* 搜索按钮样式
|
|
13
|
+
* @author lxm
|
|
14
|
+
* @date 2023-11-21 03:25:31
|
|
15
|
+
* @type {(string | 'DEFAULT' | 'NONE' | 'SEARCHONLY' | 'USER' | 'USER2')}
|
|
16
|
+
*/
|
|
17
|
+
get searchButtonStyle(): string;
|
|
18
|
+
/**
|
|
19
|
+
* 搜索表单控制器
|
|
20
|
+
* @author lxm
|
|
21
|
+
* @date 2023-11-21 04:32:58
|
|
22
|
+
* @type {ISearchFormController}
|
|
23
|
+
*/
|
|
24
|
+
searchFrom: ISearchFormController;
|
|
25
|
+
protected onInit(): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* 点击搜索按钮
|
|
28
|
+
* @author lxm
|
|
29
|
+
* @date 2023-11-21 04:31:55
|
|
30
|
+
*/
|
|
31
|
+
onSearchButtonClick(): void;
|
|
32
|
+
/**
|
|
33
|
+
* 点击重置按钮
|
|
34
|
+
* @author lxm
|
|
35
|
+
* @date 2023-11-21 04:32:09
|
|
36
|
+
*/
|
|
37
|
+
onResetButtonClick(): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { RuntimeError } from '@ibiz-template/core';
|
|
2
|
+
import { PanelItemController, UIActionUtil } from '@ibiz-template/runtime';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
+
var __publicField = (obj, key, value) => {
|
|
8
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9
|
+
return value;
|
|
10
|
+
};
|
|
11
|
+
class SearchFormButtonsController extends PanelItemController {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
/**
|
|
15
|
+
* 搜索表单控制器
|
|
16
|
+
* @author lxm
|
|
17
|
+
* @date 2023-11-21 04:32:58
|
|
18
|
+
* @type {ISearchFormController}
|
|
19
|
+
*/
|
|
20
|
+
__publicField(this, "searchFrom");
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 搜索按钮样式
|
|
24
|
+
* @author lxm
|
|
25
|
+
* @date 2023-11-21 03:25:31
|
|
26
|
+
* @type {(string | 'DEFAULT' | 'NONE' | 'SEARCHONLY' | 'USER' | 'USER2')}
|
|
27
|
+
*/
|
|
28
|
+
get searchButtonStyle() {
|
|
29
|
+
return this.searchFrom.model.searchButtonStyle || "DEFAULT";
|
|
30
|
+
}
|
|
31
|
+
async onInit() {
|
|
32
|
+
await super.onInit();
|
|
33
|
+
const searchFrom = this.panel.container;
|
|
34
|
+
if (!searchFrom) {
|
|
35
|
+
throw new RuntimeError("\u5F53\u524D\u89C6\u56FE\u91CC\u6CA1\u6709\u627E\u5230\u53EBsearchform\u7684\u641C\u7D22\u8868\u5355");
|
|
36
|
+
}
|
|
37
|
+
this.searchFrom = searchFrom;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 点击搜索按钮
|
|
41
|
+
* @author lxm
|
|
42
|
+
* @date 2023-11-21 04:31:55
|
|
43
|
+
*/
|
|
44
|
+
onSearchButtonClick() {
|
|
45
|
+
UIActionUtil.execAndResolved("search", {
|
|
46
|
+
context: this.panel.context,
|
|
47
|
+
params: this.panel.params,
|
|
48
|
+
data: [],
|
|
49
|
+
view: this.panel.view
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 点击重置按钮
|
|
54
|
+
* @author lxm
|
|
55
|
+
* @date 2023-11-21 04:32:09
|
|
56
|
+
*/
|
|
57
|
+
onResetButtonClick() {
|
|
58
|
+
UIActionUtil.execAndResolved("reset", {
|
|
59
|
+
context: this.panel.context,
|
|
60
|
+
params: this.panel.params,
|
|
61
|
+
data: [],
|
|
62
|
+
view: this.panel.view
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { SearchFormButtonsController };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-searchform-buttons{--ibiz-searchform-buttons-height:40px;height:var(--ibiz-searchform-buttons-height);margin-top:var(--ibiz-spacing-tight);margin-left:var(--ibiz-spacing-tight)}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import './searchform-buttons.scss';
|
|
3
|
+
import { IPanelRawItem } from '@ibiz/model-core';
|
|
4
|
+
import { SearchFormButtonsController } from './searchform-buttons.controller';
|
|
5
|
+
export declare const SearchFormButtons: import("vue").DefineComponent<{
|
|
6
|
+
modelData: {
|
|
7
|
+
type: PropType<IPanelRawItem>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
controller: {
|
|
11
|
+
type: typeof SearchFormButtonsController;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
16
|
+
c: SearchFormButtonsController;
|
|
17
|
+
onSearchButtonClick: () => void;
|
|
18
|
+
onResetButtonClick: () => 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: typeof SearchFormButtonsController;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { resolveComponent, createTextVNode, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import './searchform-buttons.css';
|
|
4
|
+
import { SearchFormButtonsController } from './searchform-buttons.controller.mjs';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const SearchFormButtons = /* @__PURE__ */ defineComponent({
|
|
8
|
+
name: "IBizSearchFormButtons",
|
|
9
|
+
props: {
|
|
10
|
+
modelData: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
controller: {
|
|
15
|
+
type: SearchFormButtonsController,
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(prop) {
|
|
20
|
+
const ns = useNamespace("searchform-buttons");
|
|
21
|
+
const c = prop.controller;
|
|
22
|
+
const onSearchButtonClick = () => {
|
|
23
|
+
c.onSearchButtonClick();
|
|
24
|
+
};
|
|
25
|
+
const onResetButtonClick = () => {
|
|
26
|
+
c.onResetButtonClick();
|
|
27
|
+
};
|
|
28
|
+
return {
|
|
29
|
+
ns,
|
|
30
|
+
c,
|
|
31
|
+
onSearchButtonClick,
|
|
32
|
+
onResetButtonClick
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
render() {
|
|
36
|
+
return createVNode("div", {
|
|
37
|
+
"class": [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass]
|
|
38
|
+
}, [this.controller.searchButtonStyle === "SEARCHONLY" ? createVNode(resolveComponent("el-button"), {
|
|
39
|
+
"onClick": this.onSearchButtonClick
|
|
40
|
+
}, {
|
|
41
|
+
default: () => [createTextVNode("\u641C\u7D22")]
|
|
42
|
+
}) : createVNode(resolveComponent("el-dropdown"), {
|
|
43
|
+
"split-button": true,
|
|
44
|
+
"type": "primary",
|
|
45
|
+
"onClick": this.onSearchButtonClick
|
|
46
|
+
}, {
|
|
47
|
+
default: () => createVNode("span", {
|
|
48
|
+
"class": this.ns.b("label")
|
|
49
|
+
}, [createTextVNode("\u641C\u7D22")]),
|
|
50
|
+
dropdown: () => {
|
|
51
|
+
return createVNode(resolveComponent("el-dropdown-menu"), null, {
|
|
52
|
+
default: () => [createVNode(resolveComponent("el-dropdown-item"), {
|
|
53
|
+
"onClick": this.onResetButtonClick
|
|
54
|
+
}, {
|
|
55
|
+
default: () => [createTextVNode("\u91CD\u7F6E")]
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
})]);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export { SearchFormButtons };
|
|
@@ -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 SearchFormButtonsProvider
|
|
10
|
+
* @implements {EditorProvider}
|
|
11
|
+
*/
|
|
12
|
+
export declare class SearchFormButtonsProvider implements IPanelItemProvider {
|
|
13
|
+
component: string;
|
|
14
|
+
createController(panelItem: IPanelItem, panel: PanelController, parent: PanelItemController | undefined): Promise<PanelItemController>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SearchFormButtonsController } from './searchform-buttons.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 SearchFormButtonsProvider {
|
|
11
|
+
constructor() {
|
|
12
|
+
__publicField(this, "component", "IBizSearchFormButtons");
|
|
13
|
+
}
|
|
14
|
+
async createController(panelItem, panel, parent) {
|
|
15
|
+
const c = new SearchFormButtonsController(panelItem, panel, parent);
|
|
16
|
+
await c.init();
|
|
17
|
+
return c;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { SearchFormButtonsProvider };
|