@ibiz-template/vue3-components 0.6.14 → 0.6.16
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-l_9Kqet_.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-eoOYCW_R.js → xlsx-util-94ZSfJEl.js} +1 -1
- package/es/common/coop-alert/coop-alert.css +1 -0
- package/es/common/coop-alert/coop-alert.d.ts +41 -0
- package/es/common/coop-alert/coop-alert.mjs +41 -0
- package/es/common/index.mjs +2 -0
- package/es/control/drbar/drbar.controller.d.ts +2 -2
- package/es/control/drbar/drbar.controller.mjs +9 -4
- package/es/control/drtab/drtab.controller.mjs +2 -1
- package/es/control/form/form/form.mjs +1 -1
- package/es/control/form/form-detail/form-item/form-item.d.ts +8 -0
- package/es/control/form/form-detail/form-item/form-item.mjs +5 -1
- package/es/control/form/form-detail/form-item/index.d.ts +8 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +19 -0
- package/es/control/grid/grid/grid.mjs +1 -1
- package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.d.ts +9 -0
- package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.mjs +5 -1
- package/es/control/grid/grid-column/grid-field-edit-column/index.d.ts +8 -0
- package/es/control/toolbar/toolbar.css +1 -1
- package/es/control/toolbar/toolbar.mjs +37 -21
- package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.d.ts +1 -0
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.css +1 -1
- package/es/editor/text-box/input/input.mjs +3 -20
- package/es/panel-component/coop-pos/coop-pos.controller.d.ts +15 -0
- package/es/panel-component/coop-pos/coop-pos.controller.mjs +24 -0
- package/es/panel-component/coop-pos/coop-pos.css +1 -0
- package/es/panel-component/coop-pos/coop-pos.d.ts +25 -0
- package/es/panel-component/coop-pos/coop-pos.mjs +35 -0
- package/es/panel-component/coop-pos/coop-pos.provider.d.ts +7 -0
- package/es/panel-component/coop-pos/coop-pos.provider.mjs +21 -0
- package/es/panel-component/coop-pos/coop-pos.state.d.ts +19 -0
- package/es/panel-component/coop-pos/coop-pos.state.mjs +33 -0
- package/es/panel-component/coop-pos/index.d.ts +26 -0
- package/es/panel-component/coop-pos/index.mjs +14 -0
- package/es/panel-component/index.mjs +2 -0
- package/es/panel-component/nav-tabs/index.d.ts +1 -1
- package/es/panel-component/panel-button/index.d.ts +1 -1
- package/es/panel-component/panel-button/panel-button.d.ts +1 -1
- package/es/panel-component/panel-remember-me/index.mjs +4 -0
- package/es/view-engine/edit-view.engine.d.ts +9 -1
- package/es/view-engine/edit-view.engine.mjs +80 -7
- package/es/view-engine/opt-view.engine.mjs +1 -0
- package/es/view-engine/report-view.engine.mjs +1 -1
- package/es/web-app/App.css +1 -1
- package/lib/common/coop-alert/coop-alert.cjs +43 -0
- package/lib/common/coop-alert/coop-alert.css +1 -0
- package/lib/common/index.cjs +2 -0
- package/lib/control/drbar/drbar.controller.cjs +9 -4
- package/lib/control/drtab/drtab.controller.cjs +2 -1
- package/lib/control/form/form/form.cjs +1 -1
- package/lib/control/form/form-detail/form-item/form-item.cjs +5 -1
- package/lib/control/grid/grid/grid.cjs +1 -1
- package/lib/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.cjs +5 -1
- package/lib/control/toolbar/toolbar.cjs +37 -21
- package/lib/control/toolbar/toolbar.css +1 -1
- package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.css +1 -1
- package/lib/editor/text-box/input/input.cjs +3 -20
- package/lib/panel-component/coop-pos/coop-pos.cjs +37 -0
- package/lib/panel-component/coop-pos/coop-pos.controller.cjs +26 -0
- package/lib/panel-component/coop-pos/coop-pos.css +1 -0
- package/lib/panel-component/coop-pos/coop-pos.provider.cjs +23 -0
- package/lib/panel-component/coop-pos/coop-pos.state.cjs +35 -0
- package/lib/panel-component/coop-pos/index.cjs +21 -0
- package/lib/panel-component/index.cjs +2 -0
- package/lib/panel-component/panel-remember-me/index.cjs +4 -0
- package/lib/view-engine/edit-view.engine.cjs +80 -7
- package/lib/view-engine/opt-view.engine.cjs +1 -0
- package/lib/view-engine/report-view.engine.cjs +1 -1
- package/lib/web-app/App.css +1 -1
- package/package.json +5 -5
- package/dist/index-i8g3CeYA.js +0 -4
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isVNode, ref, computed, watch, onUnmounted, createVNode, resolveComponent, mergeProps, defineComponent } from 'vue';
|
|
2
|
-
import { debounce } from 'lodash-es';
|
|
3
2
|
import { getInputProps, getEditorEmits, useNamespace } from '@ibiz-template/vue3-util';
|
|
4
3
|
import { createUUID } from 'qx-util';
|
|
5
4
|
import './input.css';
|
|
@@ -74,33 +73,17 @@ const IBizInput = /* @__PURE__ */ defineComponent({
|
|
|
74
73
|
}, 100);
|
|
75
74
|
}
|
|
76
75
|
};
|
|
77
|
-
let isDebounce = false;
|
|
78
|
-
let awaitSearch;
|
|
79
76
|
let blurCacheValue;
|
|
80
|
-
const
|
|
77
|
+
const handleChange = (val) => {
|
|
81
78
|
if (blurCacheValue !== val) {
|
|
82
79
|
emit("change", val);
|
|
83
80
|
}
|
|
84
81
|
blurCacheValue = void 0;
|
|
85
|
-
isDebounce = false;
|
|
86
|
-
if (awaitSearch) {
|
|
87
|
-
awaitSearch();
|
|
88
|
-
}
|
|
89
|
-
}, 300, {
|
|
90
|
-
leading: true
|
|
91
|
-
});
|
|
92
|
-
const handleChange = (val) => {
|
|
93
|
-
isDebounce = true;
|
|
94
|
-
debounceChange(val);
|
|
95
82
|
};
|
|
96
83
|
const handleKeyUp = (e) => {
|
|
97
84
|
if (e && e.code === "Enter") {
|
|
98
85
|
emit("enter", e);
|
|
99
|
-
|
|
100
|
-
awaitSearch = () => {
|
|
101
|
-
editorRef.value.$el.dispatchEvent(e);
|
|
102
|
-
};
|
|
103
|
-
}
|
|
86
|
+
editorRef.value.$el.dispatchEvent(e);
|
|
104
87
|
}
|
|
105
88
|
};
|
|
106
89
|
const onBlur = (event) => {
|
|
@@ -281,7 +264,7 @@ const IBizInput = /* @__PURE__ */ defineComponent({
|
|
|
281
264
|
"maxlength": this.c.model.maxLength,
|
|
282
265
|
"minlength": this.c.model.minLength,
|
|
283
266
|
"show-word-limit": this.showLimit && this.c.model.showMaxLength,
|
|
284
|
-
"
|
|
267
|
+
"onChange": this.handleChange,
|
|
285
268
|
"onKeyup": this.handleKeyUp,
|
|
286
269
|
"onBlur": this.onBlur,
|
|
287
270
|
"onFocus": this.onFocus,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IAlertParams, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelRawItem } from '@ibiz/model-core';
|
|
3
|
+
import { CoopPosState } from './coop-pos.state';
|
|
4
|
+
export declare class CoopPosController extends PanelItemController<IPanelRawItem> {
|
|
5
|
+
state: CoopPosState;
|
|
6
|
+
protected createState(): CoopPosState;
|
|
7
|
+
/**
|
|
8
|
+
* 更新消息
|
|
9
|
+
*
|
|
10
|
+
* @author zhanghengfeng
|
|
11
|
+
* @date 2024-04-03 17:04:25
|
|
12
|
+
* @param {IAlertParams} params
|
|
13
|
+
*/
|
|
14
|
+
updateMessage(params: IAlertParams): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { createUUID } from 'qx-util';
|
|
3
|
+
import { CoopPosState } from './coop-pos.state.mjs';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
class CoopPosController extends PanelItemController {
|
|
7
|
+
createState() {
|
|
8
|
+
var _a;
|
|
9
|
+
return new CoopPosState((_a = this.parent) == null ? void 0 : _a.state);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 更新消息
|
|
13
|
+
*
|
|
14
|
+
* @author zhanghengfeng
|
|
15
|
+
* @date 2024-04-03 17:04:25
|
|
16
|
+
* @param {IAlertParams} params
|
|
17
|
+
*/
|
|
18
|
+
updateMessage(params) {
|
|
19
|
+
this.state.key = createUUID();
|
|
20
|
+
this.state.alertParams = params;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { CoopPosController };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-coop-pos{width:100%;height:100%}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IPanelRawItem } from '@ibiz/model-core';
|
|
3
|
+
import { CoopPosController } from './coop-pos.controller';
|
|
4
|
+
export declare const CoopPos: import("vue").DefineComponent<{
|
|
5
|
+
modelData: {
|
|
6
|
+
type: PropType<IPanelRawItem>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
controller: {
|
|
10
|
+
type: typeof CoopPosController;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
15
|
+
c: CoopPosController;
|
|
16
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
modelData: {
|
|
18
|
+
type: PropType<IPanelRawItem>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
controller: {
|
|
22
|
+
type: typeof CoopPosController;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { resolveComponent, mergeProps, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { CoopPosController } from './coop-pos.controller.mjs';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
const CoopPos = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "IBizCoopPos",
|
|
8
|
+
props: {
|
|
9
|
+
modelData: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
},
|
|
13
|
+
controller: {
|
|
14
|
+
type: CoopPosController,
|
|
15
|
+
required: true
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup(props) {
|
|
19
|
+
const c = props.controller;
|
|
20
|
+
const ns = useNamespace("coop-pos");
|
|
21
|
+
return {
|
|
22
|
+
ns,
|
|
23
|
+
c
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
render() {
|
|
27
|
+
return createVNode("div", {
|
|
28
|
+
"class": this.ns.b()
|
|
29
|
+
}, [createVNode(resolveComponent("iBizCoopAlert"), mergeProps({
|
|
30
|
+
"key": this.c.state.key
|
|
31
|
+
}, this.c.state.alertParams), null)]);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export { CoopPos };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelItem } from '@ibiz/model-core';
|
|
3
|
+
import { CoopPosController } from './coop-pos.controller';
|
|
4
|
+
export declare class CoopPosProvider implements IPanelItemProvider {
|
|
5
|
+
component: string;
|
|
6
|
+
createController(panelItem: IPanelItem, panel: PanelController, parent: PanelItemController | undefined): Promise<CoopPosController>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CoopPosController } from './coop-pos.controller.mjs';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => {
|
|
7
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
+
return value;
|
|
9
|
+
};
|
|
10
|
+
class CoopPosProvider {
|
|
11
|
+
constructor() {
|
|
12
|
+
__publicField(this, "component", "IBizCoopPos");
|
|
13
|
+
}
|
|
14
|
+
async createController(panelItem, panel, parent) {
|
|
15
|
+
const c = new CoopPosController(panelItem, panel, parent);
|
|
16
|
+
await c.init();
|
|
17
|
+
return c;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { CoopPosProvider };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IAlertParams, PanelItemState } from '@ibiz-template/runtime';
|
|
2
|
+
export declare class CoopPosState extends PanelItemState {
|
|
3
|
+
/**
|
|
4
|
+
* alert标识
|
|
5
|
+
*
|
|
6
|
+
* @author zhanghengfeng
|
|
7
|
+
* @date 2024-04-03 17:04:04
|
|
8
|
+
* @type {string}
|
|
9
|
+
*/
|
|
10
|
+
key: string;
|
|
11
|
+
/**
|
|
12
|
+
* 提示参数
|
|
13
|
+
*
|
|
14
|
+
* @author zhanghengfeng
|
|
15
|
+
* @date 2024-04-03 17:04:55
|
|
16
|
+
* @type {IAlertParams}
|
|
17
|
+
*/
|
|
18
|
+
alertParams: IAlertParams;
|
|
19
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PanelItemState } from '@ibiz-template/runtime';
|
|
2
|
+
import { createUUID } from 'qx-util';
|
|
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 CoopPosState extends PanelItemState {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
/**
|
|
15
|
+
* alert标识
|
|
16
|
+
*
|
|
17
|
+
* @author zhanghengfeng
|
|
18
|
+
* @date 2024-04-03 17:04:04
|
|
19
|
+
* @type {string}
|
|
20
|
+
*/
|
|
21
|
+
__publicField(this, "key", createUUID());
|
|
22
|
+
/**
|
|
23
|
+
* 提示参数
|
|
24
|
+
*
|
|
25
|
+
* @author zhanghengfeng
|
|
26
|
+
* @date 2024-04-03 17:04:55
|
|
27
|
+
* @type {IAlertParams}
|
|
28
|
+
*/
|
|
29
|
+
__publicField(this, "alertParams", {});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { CoopPosState };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CoopPosState } from './coop-pos.state';
|
|
2
|
+
import { CoopPosController } from './coop-pos.controller';
|
|
3
|
+
export { CoopPosState, CoopPosController };
|
|
4
|
+
export declare const IBizCoopPos: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<{
|
|
5
|
+
modelData: {
|
|
6
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
controller: {
|
|
10
|
+
type: typeof CoopPosController;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
15
|
+
c: CoopPosController;
|
|
16
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
modelData: {
|
|
18
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
controller: {
|
|
22
|
+
type: typeof CoopPosController;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
}>>, {}, {}>>;
|
|
26
|
+
export default IBizCoopPos;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
2
|
+
import { withInstall } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { CoopPos } from './coop-pos.mjs';
|
|
4
|
+
import { CoopPosProvider } from './coop-pos.provider.mjs';
|
|
5
|
+
export { CoopPosState } from './coop-pos.state.mjs';
|
|
6
|
+
export { CoopPosController } from './coop-pos.controller.mjs';
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
const IBizCoopPos = withInstall(CoopPos, function(v) {
|
|
10
|
+
v.component(CoopPos.name, CoopPos);
|
|
11
|
+
registerPanelItemProvider("RAWITEM_COOP_POS", () => new CoopPosProvider());
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { IBizCoopPos, IBizCoopPos as default };
|
|
@@ -18,6 +18,7 @@ import { IBizUserMessage } from './user-message/index.mjs';
|
|
|
18
18
|
import { IBizSearchFormButtons } from './searchform-buttons/index.mjs';
|
|
19
19
|
import { IBizViewMessage } from './view-message/index.mjs';
|
|
20
20
|
import { IBizPanelStaticCarousel } from './panel-static-carousel/index.mjs';
|
|
21
|
+
import { IBizCoopPos } from './coop-pos/index.mjs';
|
|
21
22
|
export { NavPosIndexState } from './nav-pos-index/nav-pos-index.state.mjs';
|
|
22
23
|
export { NavPosIndexController } from './nav-pos-index/nav-pos-index.controller.mjs';
|
|
23
24
|
export { PanelButtonController } from './panel-button/panel-button.controller.mjs';
|
|
@@ -61,6 +62,7 @@ const IBizPanelComponents = {
|
|
|
61
62
|
v.use(IBizPanelStaticCarousel);
|
|
62
63
|
v.use(IBizTeleportPlaceholder);
|
|
63
64
|
v.use(IBizPanelContainerTabs);
|
|
65
|
+
v.use(IBizCoopPos);
|
|
64
66
|
}
|
|
65
67
|
};
|
|
66
68
|
|
|
@@ -20,8 +20,8 @@ export declare const IBizNavTabs: import("@ibiz-template/vue3-util").TypeWithIns
|
|
|
20
20
|
props: {
|
|
21
21
|
readonly disabled: boolean;
|
|
22
22
|
readonly label: string;
|
|
23
|
-
readonly lazy: boolean;
|
|
24
23
|
readonly closable: boolean;
|
|
24
|
+
readonly lazy: boolean;
|
|
25
25
|
readonly name?: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
|
|
26
26
|
};
|
|
27
27
|
paneName: string | number | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const IBizPanelButton: import("@ibiz-template/vue3-util").TypeWit
|
|
|
12
12
|
ns: import("@ibiz-template/core").Namespace;
|
|
13
13
|
isText: boolean;
|
|
14
14
|
captionText: import("vue").ComputedRef<any>;
|
|
15
|
-
buttonType: import("vue").ComputedRef<"info" | "warning" | "
|
|
15
|
+
buttonType: import("vue").ComputedRef<"info" | "warning" | "success" | "primary" | "danger" | null>;
|
|
16
16
|
showCaption: boolean | undefined;
|
|
17
17
|
sysImage: import("@ibiz/model-core").ISysImage | undefined;
|
|
18
18
|
codeName: string | undefined;
|
|
@@ -15,7 +15,7 @@ export declare const PanelButton: import("vue").DefineComponent<{
|
|
|
15
15
|
ns: import("@ibiz-template/core").Namespace;
|
|
16
16
|
isText: boolean;
|
|
17
17
|
captionText: import("vue").ComputedRef<any>;
|
|
18
|
-
buttonType: import("vue").ComputedRef<"info" | "warning" | "
|
|
18
|
+
buttonType: import("vue").ComputedRef<"info" | "warning" | "success" | "primary" | "danger" | null>;
|
|
19
19
|
showCaption: boolean | undefined;
|
|
20
20
|
sysImage: import("@ibiz/model-core").ISysImage | undefined;
|
|
21
21
|
codeName: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewEngineBase, ViewController, IEditFormController, IEditViewState, IEditViewEvent } from '@ibiz-template/runtime';
|
|
1
|
+
import { ViewEngineBase, ViewController, IEditFormController, IEditViewState, IEditViewEvent, IPanelItemCoopPosController } from '@ibiz-template/runtime';
|
|
2
2
|
import { IAppDEEditView } from '@ibiz/model-core';
|
|
3
3
|
export declare class EditViewEngine extends ViewEngineBase {
|
|
4
4
|
/**
|
|
@@ -14,6 +14,7 @@ export declare class EditViewEngine extends ViewEngineBase {
|
|
|
14
14
|
*/
|
|
15
15
|
protected view: ViewController<IAppDEEditView, IEditViewState, IEditViewEvent>;
|
|
16
16
|
get form(): IEditFormController;
|
|
17
|
+
get coopPos(): IPanelItemCoopPosController | undefined;
|
|
17
18
|
/**
|
|
18
19
|
* 实体名称
|
|
19
20
|
* @author lxm
|
|
@@ -77,4 +78,11 @@ export declare class EditViewEngine extends ViewEngineBase {
|
|
|
77
78
|
* @return {*} {Promise<boolean>}
|
|
78
79
|
*/
|
|
79
80
|
reloadConfirm(): Promise<boolean>;
|
|
81
|
+
/**
|
|
82
|
+
* 变更当前页面的数据
|
|
83
|
+
* @author lxm
|
|
84
|
+
* @date 2024-04-01 01:11:58
|
|
85
|
+
* @param {string} type
|
|
86
|
+
*/
|
|
87
|
+
changeRecord(type: string): Promise<void>;
|
|
80
88
|
}
|
|
@@ -22,6 +22,10 @@ class EditViewEngine extends ViewEngineBase {
|
|
|
22
22
|
get form() {
|
|
23
23
|
return this.view.getController("form");
|
|
24
24
|
}
|
|
25
|
+
get coopPos() {
|
|
26
|
+
var _a;
|
|
27
|
+
return (_a = this.view.layoutPanel) == null ? void 0 : _a.panelItems.coop_pos;
|
|
28
|
+
}
|
|
25
29
|
init() {
|
|
26
30
|
super.init();
|
|
27
31
|
if (this.view.model.multiFormMode === 1 && this.view.params.srfdatatype) {
|
|
@@ -91,6 +95,7 @@ class EditViewEngine extends ViewEngineBase {
|
|
|
91
95
|
};
|
|
92
96
|
this.form.evt.on("onLoadSuccess", (event) => {
|
|
93
97
|
formDataStateChange(event);
|
|
98
|
+
this.view.state.srfactiveviewdata = event.data[0];
|
|
94
99
|
evt.emit("onDataChange", { ...event, actionType: "LOAD" });
|
|
95
100
|
});
|
|
96
101
|
this.form.evt.on("onLoadDraftSuccess", (event) => {
|
|
@@ -125,7 +130,7 @@ class EditViewEngine extends ViewEngineBase {
|
|
|
125
130
|
return this.form.save();
|
|
126
131
|
}
|
|
127
132
|
async refresh() {
|
|
128
|
-
|
|
133
|
+
this.form.doNextActive(() => this.load(), { key: "load" });
|
|
129
134
|
}
|
|
130
135
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
131
136
|
async call(key, args) {
|
|
@@ -153,6 +158,10 @@ class EditViewEngine extends ViewEngineBase {
|
|
|
153
158
|
await this.wfStart();
|
|
154
159
|
return null;
|
|
155
160
|
}
|
|
161
|
+
if (key === SysUIActionTag.FIRST_RECORD || key === SysUIActionTag.LAST_RECORD || key === SysUIActionTag.PREV_RECORD || key === SysUIActionTag.NEXT_RECORD) {
|
|
162
|
+
await this.changeRecord(key);
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
156
165
|
if (key === SysUIActionTag.VIEW_WF_STEP) {
|
|
157
166
|
await this.wfSubmit();
|
|
158
167
|
return null;
|
|
@@ -300,12 +309,19 @@ class EditViewEngine extends ViewEngineBase {
|
|
|
300
309
|
default:
|
|
301
310
|
break;
|
|
302
311
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
}
|
|
312
|
+
const message = "".concat(modes.includes("DISPLAYOPPERSON") ? data.username : "\u6709\u4EBA", " ").concat(actionMsg, " ").concat(this.view.state.caption, "-").concat(dataInfo);
|
|
313
|
+
if (this.coopPos) {
|
|
314
|
+
this.coopPos.updateMessage({
|
|
315
|
+
title: message
|
|
316
|
+
});
|
|
317
|
+
} else {
|
|
318
|
+
ibiz.message.notice({
|
|
319
|
+
message,
|
|
320
|
+
showClose: true,
|
|
321
|
+
duration: 3,
|
|
322
|
+
styleType: "alert"
|
|
323
|
+
});
|
|
324
|
+
}
|
|
309
325
|
if (hasOpenConfirm === false && data.action === "UPDATE" && modes.includes("NOTICERELOAD")) {
|
|
310
326
|
hasOpenConfirm = true;
|
|
311
327
|
const isReload = await this.reloadConfirm();
|
|
@@ -391,6 +407,63 @@ class EditViewEngine extends ViewEngineBase {
|
|
|
391
407
|
}
|
|
392
408
|
return result;
|
|
393
409
|
}
|
|
410
|
+
/**
|
|
411
|
+
* 变更当前页面的数据
|
|
412
|
+
* @author lxm
|
|
413
|
+
* @date 2024-04-01 01:11:58
|
|
414
|
+
* @param {string} type
|
|
415
|
+
*/
|
|
416
|
+
async changeRecord(type) {
|
|
417
|
+
const viewId = this.view.context.srfpaginationviewid;
|
|
418
|
+
if (!viewId) {
|
|
419
|
+
throw new RuntimeError("context\u7F3A\u5C11srfpaginationviewid");
|
|
420
|
+
}
|
|
421
|
+
const view = ibiz.util.viewStack.getView(viewId);
|
|
422
|
+
if (!view) {
|
|
423
|
+
throw new RuntimeError("\u627E\u4E0D\u5230id\u662F".concat(viewId, "\u7684\u89C6\u56FE"));
|
|
424
|
+
}
|
|
425
|
+
const items = await view.call(ViewCallTag.GET_ALL_DATA);
|
|
426
|
+
const index = items.findIndex(
|
|
427
|
+
(item) => item.srfkey === this.form.state.data.srfkey
|
|
428
|
+
);
|
|
429
|
+
let targetItem;
|
|
430
|
+
switch (type) {
|
|
431
|
+
case SysUIActionTag.FIRST_RECORD:
|
|
432
|
+
if (index === 0) {
|
|
433
|
+
ibiz.message.info("\u5DF2\u7ECF\u662F\u7B2C\u4E00\u6761\u6570\u636E\u4E86");
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
targetItem = items[0];
|
|
437
|
+
break;
|
|
438
|
+
case SysUIActionTag.LAST_RECORD:
|
|
439
|
+
if (index === items.length - 1) {
|
|
440
|
+
ibiz.message.info("\u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u6761\u6570\u636E\u4E86");
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
targetItem = items[items.length - 1];
|
|
444
|
+
break;
|
|
445
|
+
case SysUIActionTag.PREV_RECORD:
|
|
446
|
+
if (index === 0) {
|
|
447
|
+
ibiz.message.info("\u5DF2\u7ECF\u662F\u7B2C\u4E00\u6761\u6570\u636E\u4E86");
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
targetItem = items[index - 1];
|
|
451
|
+
break;
|
|
452
|
+
case SysUIActionTag.NEXT_RECORD:
|
|
453
|
+
if (index === items.length - 1) {
|
|
454
|
+
ibiz.message.info("\u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u6761\u6570\u636E\u4E86");
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
targetItem = items[index + 1];
|
|
458
|
+
break;
|
|
459
|
+
default:
|
|
460
|
+
break;
|
|
461
|
+
}
|
|
462
|
+
if (targetItem) {
|
|
463
|
+
this.view.context[this.deName] = targetItem.srfkey;
|
|
464
|
+
this.load();
|
|
465
|
+
}
|
|
466
|
+
}
|
|
394
467
|
}
|
|
395
468
|
|
|
396
469
|
export { EditViewEngine };
|
package/es/web-app/App.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
#app{width:100vw;height:100vh;background-color:var(--ibiz-color-bg-0)}body,html{padding:0;margin:0;border:0}
|
|
1
|
+
#app{width:100vw;height:100vh;background-color:var(--ibiz-color-bg-0)}body,html{padding:0;margin:0;border:0}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
require('./coop-alert.css');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizCoopAlert = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
name: "IBizCoopAlert",
|
|
10
|
+
props: {
|
|
11
|
+
title: {
|
|
12
|
+
type: String
|
|
13
|
+
},
|
|
14
|
+
type: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "info"
|
|
17
|
+
},
|
|
18
|
+
closable: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true
|
|
21
|
+
},
|
|
22
|
+
showIcon: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: true
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup() {
|
|
28
|
+
const ns = vue3Util.useNamespace("coop-alert");
|
|
29
|
+
return {
|
|
30
|
+
ns
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
render() {
|
|
34
|
+
if (!this.title) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
return vue.createVNode(vue.resolveComponent("el-alert"), vue.mergeProps({
|
|
38
|
+
"class": this.ns.b()
|
|
39
|
+
}, this.$props), null);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
exports.IBizCoopAlert = IBizCoopAlert;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-coop-alert{--ibiz-coop-alert-color--info:#909399;--ibiz-coop-alert-background-color--info:#f4f4f5;--ibiz-coop-alert-color--success:#67c23a;--ibiz-coop-alert-background-color--success:#f0f9eb;--ibiz-coop-alert-color--warning:#e6a23c;--ibiz-coop-alert-background-color--warning:#fdf6ec;--ibiz-coop-alert-color--error:#f56c6c;--ibiz-coop-alert-background-color--error:#fef0f0;--ibiz-coop-alert-close-btn-color:#a8abb2}.ibiz-coop-alert.el-alert .el-alert__icon{margin-right:var(--ibiz-spacing-tight)}.ibiz-coop-alert.el-alert .el-alert__close-btn{top:50%;right:var(--ibiz-spacing-base-loose);font-size:var(--ibiz-font-size-header-6);color:var(--ibiz-coop-alert-close-btn-color);transform:translateY(-50%)}.ibiz-coop-alert.el-alert .el-alert__content{padding:var(--ibiz-spacing-none) var(--ibiz-spacing-extra-loose) var(--ibiz-spacing-none) var(--ibiz-spacing-none)}.ibiz-coop-alert.el-alert .el-alert__title{line-height:var(--ibiz-spacing-loose)}.ibiz-coop-alert.el-alert--info{color:var(--ibiz-coop-alert-color--info);background-color:var(--ibiz-coop-alert-background-color--info)}.ibiz-coop-alert.el-alert--success{color:var(--ibiz-coop-alert-color--success);background-color:var(--ibiz-coop-alert-background-color--success)}.ibiz-coop-alert.el-alert--warning{color:var(--ibiz-coop-alert-color--warning);background-color:var(--ibiz-coop-alert-background-color--warning)}.ibiz-coop-alert.el-alert--error{color:var(--ibiz-coop-alert-color--error);background-color:var(--ibiz-coop-alert-background-color--error)}.ibiz-message--alert{--ibiz-coop-alert-color--info:#909399;--ibiz-coop-alert-background-color--info:#f4f4f5;--ibiz-coop-alert-color--success:#67c23a;--ibiz-coop-alert-background-color--success:#f0f9eb;--ibiz-coop-alert-color--warning:#e6a23c;--ibiz-coop-alert-background-color--warning:#fdf6ec;--ibiz-coop-alert-color--error:#f56c6c;--ibiz-coop-alert-background-color--error:#fef0f0;--ibiz-coop-alert-close-btn-color:#a8abb2}.ibiz-message--alert.el-message{--el-message-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base)}.ibiz-message--alert.el-message .el-message__content,.ibiz-message--alert.el-message .el-message__icon{color:inherit}.ibiz-message--alert.el-message .el-message__content{padding-right:var(--ibiz-spacing-extra-loose)}.ibiz-message--alert.el-message .el-message__closeBtn{right:var(--ibiz-spacing-base-loose);color:var(--ibiz-coop-alert-close-btn-color)}.ibiz-message--alert .el-message__content{line-height:var(--ibiz-spacing-loose)}.ibiz-message--alert.el-message--info{color:var(--ibiz-coop-alert-color--info);background-color:var(--ibiz-coop-alert-background-color--info)}.ibiz-message--alert.el-message--success{color:var(--ibiz-coop-alert-color--success);background-color:var(--ibiz-coop-alert-background-color--success)}.ibiz-message--alert.el-message--warning{color:var(--ibiz-coop-alert-color--warning);background-color:var(--ibiz-coop-alert-background-color--warning)}.ibiz-message--alert.el-message--error{color:var(--ibiz-coop-alert-color--error);background-color:var(--ibiz-coop-alert-background-color--error)}
|
package/lib/common/index.cjs
CHANGED
|
@@ -22,6 +22,7 @@ var dataImport2Select = require('./data-import2-select/data-import2-select.cjs')
|
|
|
22
22
|
var gridSetting = require('./grid-setting/grid-setting.cjs');
|
|
23
23
|
var doingNotice = require('./doing-notice/doing-notice.cjs');
|
|
24
24
|
var carousel = require('./carousel/carousel.cjs');
|
|
25
|
+
var coopAlert = require('./coop-alert/coop-alert.cjs');
|
|
25
26
|
|
|
26
27
|
"use strict";
|
|
27
28
|
const IBizCommonComponents = {
|
|
@@ -57,6 +58,7 @@ const IBizCommonComponents = {
|
|
|
57
58
|
);
|
|
58
59
|
v.component(vue3Util.IBizBadge.name, vue3Util.IBizBadge);
|
|
59
60
|
v.component(carousel.IBizCarouselComponent.name, carousel.IBizCarouselComponent);
|
|
61
|
+
v.component(coopAlert.IBizCoopAlert.name, coopAlert.IBizCoopAlert);
|
|
60
62
|
}
|
|
61
63
|
};
|
|
62
64
|
|
|
@@ -121,7 +121,7 @@ class DRBarController extends runtime.ControlController {
|
|
|
121
121
|
/**
|
|
122
122
|
* 计算关系界面组权限
|
|
123
123
|
*
|
|
124
|
-
* @param {
|
|
124
|
+
* @param {IDRBarItemsState} item 关系组成员
|
|
125
125
|
* @memberof DRBarController
|
|
126
126
|
*/
|
|
127
127
|
async calcPermitted(item) {
|
|
@@ -171,7 +171,8 @@ class DRBarController extends runtime.ControlController {
|
|
|
171
171
|
async onMounted() {
|
|
172
172
|
await super.onMounted();
|
|
173
173
|
if (this.form) {
|
|
174
|
-
this.form.evt.on("onLoadSuccess", async () => {
|
|
174
|
+
this.form.evt.on("onLoadSuccess", async (event) => {
|
|
175
|
+
this.view.state.srfactiveviewdata = event.data[0];
|
|
175
176
|
await this.calcDrBarItemsState();
|
|
176
177
|
this.handleFormChange();
|
|
177
178
|
this.doDefaultSelect();
|
|
@@ -182,6 +183,8 @@ class DRBarController extends runtime.ControlController {
|
|
|
182
183
|
this.form.evt.on("onSaveSuccess", () => {
|
|
183
184
|
this.handleFormChange();
|
|
184
185
|
});
|
|
186
|
+
} else {
|
|
187
|
+
await this.calcDrBarItemsState();
|
|
185
188
|
}
|
|
186
189
|
if (this.form.state.isLoaded) {
|
|
187
190
|
this.doDefaultSelect();
|
|
@@ -255,7 +258,8 @@ class DRBarController extends runtime.ControlController {
|
|
|
255
258
|
sysImage: item.sysImage,
|
|
256
259
|
disabled: false,
|
|
257
260
|
counterId: item.counterId,
|
|
258
|
-
visible:
|
|
261
|
+
visible: false,
|
|
262
|
+
// 默认不显示
|
|
259
263
|
dataAccessAction: item.dataAccessAction || void 0
|
|
260
264
|
};
|
|
261
265
|
};
|
|
@@ -282,7 +286,8 @@ class DRBarController extends runtime.ControlController {
|
|
|
282
286
|
tag: group.id,
|
|
283
287
|
caption: itemCaption,
|
|
284
288
|
sysImage: group.sysImage,
|
|
285
|
-
visible:
|
|
289
|
+
visible: false,
|
|
290
|
+
// 默认不显示
|
|
286
291
|
children: groupItems.map((item) => getItemState(item))
|
|
287
292
|
});
|
|
288
293
|
} else if (groupItems.length === 1) {
|
|
@@ -105,7 +105,8 @@ class DRTabController extends runtime.ControlController {
|
|
|
105
105
|
async onMounted() {
|
|
106
106
|
await super.onMounted();
|
|
107
107
|
if (this.form) {
|
|
108
|
-
this.form.evt.on("onLoadSuccess", () => {
|
|
108
|
+
this.form.evt.on("onLoadSuccess", (event) => {
|
|
109
|
+
this.view.state.srfactiveviewdata = event.data[0];
|
|
109
110
|
this.handleFormChange();
|
|
110
111
|
});
|
|
111
112
|
this.form.evt.on("onLoadDraftSuccess", () => {
|
|
@@ -47,7 +47,7 @@ const FormControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
47
47
|
modelData: detail,
|
|
48
48
|
controller: c.details[detailId],
|
|
49
49
|
key: detail.id,
|
|
50
|
-
|
|
50
|
+
attrs: renderAttrs(detail)
|
|
51
51
|
};
|
|
52
52
|
if (slots[detailId]) {
|
|
53
53
|
return vue.renderSlot(slots, detailId, {
|