@gct-paas/design 0.1.6-dev.3 → 0.1.6-dev.30
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.min.css +1 -1
- package/dist/loader.esm.min.js +2 -1
- package/es/components/field-transfer/components/field-transfer-modal.vue.mjs +2 -2
- package/es/components/field-transfer/components/field-transfer-modal.vue_vue_type_style_index_0_scoped_2f34388d_lang.css +8 -0
- package/es/components/index.d.ts +0 -4
- package/es/components/index.mjs +0 -5
- package/es/components/mobile-container/mobile-container.d.ts +2 -2
- package/es/components/user-occupy/index.d.ts +0 -1
- package/es/components/user-occupy/index.mjs +0 -1
- package/es/components/user-occupy/user-lock.vue.mjs +2 -2
- package/es/components/user-occupy/user-lock.vue_vue_type_script_setup_true_lang.mjs +2 -1
- package/es/components/user-occupy/user-lock.vue_vue_type_style_index_0_scoped_143659f6_lang.css +29 -0
- package/es/components/user-occupy/user-occupy.vue.mjs +2 -2
- package/es/components/user-occupy/user-occupy.vue_vue_type_script_setup_true_lang.mjs +2 -1
- package/es/components/user-occupy/{user-occupy.vue_vue_type_style_index_0_scoped_9b136922_lang.css → user-occupy.vue_vue_type_style_index_0_scoped_1234af11_lang.css} +6 -6
- package/es/constant/index.d.ts +5 -0
- package/es/constant/index.mjs +6 -1
- package/es/constant/page-designer.d.ts +9 -36
- package/es/constant/page-designer.mjs +2 -32
- package/es/create-app-vue.d.ts +1 -1
- package/es/create-app-vue.mjs +1 -1
- package/es/{components/user-occupy → hooks/design-view/components}/useUserOccupy.d.ts +3 -3
- package/es/{components/user-occupy → hooks/design-view/components}/useUserOccupy.mjs +48 -27
- package/es/hooks/design-view/design-state.d.ts +91 -1
- package/es/hooks/design-view/design-state.mjs +7 -7
- package/es/hooks/design-view/designer/useDesignCache.mjs +2 -3
- package/es/hooks/design-view/designer/useDesignPreview.mjs +11 -5
- package/es/hooks/design-view/designer/useDesignSave.d.ts +2 -2
- package/es/hooks/design-view/designer/useDesignSave.mjs +131 -21
- package/es/hooks/design-view/layout/useToolkit.d.ts +1 -1
- package/es/hooks/design-view/layout/useToolkit.mjs +123 -82
- package/es/hooks/design-view/page/usePage.d.ts +12 -7
- package/es/hooks/design-view/page/usePage.mjs +131 -8
- package/es/hooks/design-view/useDesigner.d.ts +6 -2
- package/es/hooks/design-view/useDesigner.mjs +14 -3
- package/es/hooks/design-view/widget/useSelectedWidget.mjs +55 -28
- package/es/hooks/design-view/widget/useWidget.mjs +2 -1
- package/es/hooks/index.d.ts +1 -1
- package/es/hooks/index.mjs +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.mjs +10 -12
- package/es/interface/index.d.ts +0 -1
- package/es/locale/auto-register.d.ts +2 -0
- package/es/locale/auto-register.mjs +25 -0
- package/es/locale/sys/app.mjs +6 -0
- package/es/locale/sys/appDesigner.mjs +9 -0
- package/es/locale/sys/cardDesign.d.ts +4 -4
- package/es/locale/sys/cardDesign.mjs +17 -0
- package/es/locale/sys/component.mjs +21 -0
- package/es/locale/sys/model.mjs +10 -0
- package/es/locale/sys/pageDesigner.mjs +32 -0
- package/es/locale/sys/platform.mjs +11 -0
- package/es/locale/sys.d.ts +7 -5
- package/es/locale/sys.mjs +26 -0
- package/es/props/design-plugin-props.d.ts +64 -0
- package/es/props/design-plugin-props.mjs +59 -0
- package/es/props/index.d.ts +1 -0
- package/es/register/designer-register/designer-register.d.ts +6 -3
- package/es/register/designer-register/designer-register.mjs +20 -14
- package/es/register/index.d.ts +1 -0
- package/es/register/index.mjs +1 -0
- package/es/register/props-editor/props-editor.register.d.ts +24 -0
- package/es/register/props-editor/props-editor.register.mjs +30 -0
- package/es/schema/begin-drag/begin-drag.mjs +1 -1
- package/es/schema/field/index.mjs +17 -3
- package/es/setup-app.d.ts +2 -1
- package/es/setup-app.mjs +3 -1
- package/es/types/index.d.ts +2 -1
- package/package.json +11 -11
- package/es/components/design-save-tip/design-save-tip.css +0 -107
- package/es/components/design-save-tip/design-save-tip.d.ts +0 -44
- package/es/components/design-save-tip/design-save-tip.mjs +0 -81
- package/es/components/design-step-check/design-step-check.css +0 -133
- package/es/components/design-step-check/design-step-check.d.ts +0 -30
- package/es/components/design-step-check/design-step-check.mjs +0 -96
- package/es/components/design-view-layout/design-view-layout.css +0 -157
- package/es/components/design-view-layout/design-view-layout.d.ts +0 -1
- package/es/components/design-view-layout/design-view-layout.mjs +0 -139
- package/es/components/field-transfer/components/field-transfer-modal.vue_vue_type_style_index_0_scoped_711e6992_lang.css +0 -8
- package/es/components/modal-name-editor/modal-name-editor.css +0 -117
- package/es/components/modal-name-editor/modal-name-editor.d.ts +0 -34
- package/es/components/modal-name-editor/modal-name-editor.mjs +0 -124
- package/es/components/user-occupy/occupy.const.d.ts +0 -4
- package/es/components/user-occupy/occupy.const.mjs +0 -7
- package/es/components/user-occupy/user-lock.vue_vue_type_style_index_0_scoped_b40d46ff_lang.css +0 -29
- package/es/hooks/develop/useKeyParser.d.ts +0 -16
- package/es/hooks/develop/useKeyParser.mjs +0 -79
- package/es/interface/i-view-step/i-view-step.d.ts +0 -32
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
2
|
import field_transfer_modal_vue_vue_type_script_setup_true_name_field_transfer_modal_lang_default from "./field-transfer-modal.vue_vue_type_script_setup_true_name_field-transfer-modal_lang.mjs";
|
|
3
|
-
import './field-transfer-modal.
|
|
3
|
+
import './field-transfer-modal.vue_vue_type_style_index_0_scoped_2f34388d_lang.css';/* empty css */
|
|
4
4
|
//#region src/components/field-transfer/components/field-transfer-modal.vue
|
|
5
|
-
var field_transfer_modal_default = /* @__PURE__ */ _plugin_vue_export_helper_default(field_transfer_modal_vue_vue_type_script_setup_true_name_field_transfer_modal_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var field_transfer_modal_default = /* @__PURE__ */ _plugin_vue_export_helper_default(field_transfer_modal_vue_vue_type_script_setup_true_name_field_transfer_modal_lang_default, [["__scopeId", "data-v-2f34388d"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { field_transfer_modal_default as default };
|
package/es/components/index.d.ts
CHANGED
|
@@ -6,10 +6,6 @@ export default _default;
|
|
|
6
6
|
export * from './design';
|
|
7
7
|
export * from './material';
|
|
8
8
|
export * from './panel';
|
|
9
|
-
export { DesignSaveTip } from './design-save-tip/design-save-tip';
|
|
10
|
-
export { DesignStepCheck } from './design-step-check/design-step-check';
|
|
11
|
-
export { DesignViewLayout } from './design-view-layout/design-view-layout';
|
|
12
9
|
export * from './field-transfer';
|
|
13
|
-
export { ModalNameEditor } from './modal-name-editor/modal-name-editor';
|
|
14
10
|
export * from './user-occupy';
|
|
15
11
|
export * from './multi-field';
|
package/es/components/index.mjs
CHANGED
|
@@ -8,14 +8,9 @@ import "./material/material-content/material-content.mjs";
|
|
|
8
8
|
import "./material/index.mjs";
|
|
9
9
|
import "./panel/panel-content/panel-content.mjs";
|
|
10
10
|
import "./panel/index.mjs";
|
|
11
|
-
import "./design-save-tip/design-save-tip.mjs";
|
|
12
|
-
import "./design-step-check/design-step-check.mjs";
|
|
13
|
-
import "./modal-name-editor/modal-name-editor.mjs";
|
|
14
|
-
import "./design-view-layout/design-view-layout.mjs";
|
|
15
11
|
import "./field-transfer/components/Cascader/FieldCascader.mjs";
|
|
16
12
|
import "./field-transfer/useFieldTransfer.mjs";
|
|
17
13
|
import "./field-transfer/index.mjs";
|
|
18
|
-
import "./user-occupy/useUserOccupy.mjs";
|
|
19
14
|
import "./user-occupy/user-lock.vue.mjs";
|
|
20
15
|
import "./user-occupy/user-occupy.vue.mjs";
|
|
21
16
|
import "./user-occupy/index.mjs";
|
|
@@ -9,7 +9,7 @@ export declare const MobileContainer: import('vue').DefineComponent<import('vue'
|
|
|
9
9
|
};
|
|
10
10
|
title: {
|
|
11
11
|
type: StringConstructor;
|
|
12
|
-
default: () =>
|
|
12
|
+
default: () => string | undefined;
|
|
13
13
|
};
|
|
14
14
|
}>, {
|
|
15
15
|
ns: import('@gct-paas/core').Namespace;
|
|
@@ -25,7 +25,7 @@ export declare const MobileContainer: import('vue').DefineComponent<import('vue'
|
|
|
25
25
|
};
|
|
26
26
|
title: {
|
|
27
27
|
type: StringConstructor;
|
|
28
|
-
default: () =>
|
|
28
|
+
default: () => string | undefined;
|
|
29
29
|
};
|
|
30
30
|
}>> & Readonly<{}>, {
|
|
31
31
|
headerBgColor: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
2
|
import user_lock_vue_vue_type_script_setup_true_lang_default from "./user-lock.vue_vue_type_script_setup_true_lang.mjs";
|
|
3
|
-
import './user-lock.
|
|
3
|
+
import './user-lock.vue_vue_type_style_index_0_scoped_143659f6_lang.css';/* empty css */
|
|
4
4
|
//#region src/components/user-occupy/user-lock.vue
|
|
5
|
-
var user_lock_default = /* @__PURE__ */ _plugin_vue_export_helper_default(user_lock_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var user_lock_default = /* @__PURE__ */ _plugin_vue_export_helper_default(user_lock_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-143659f6"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { user_lock_default as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useUserOccupy } from "
|
|
1
|
+
import { useUserOccupy } from "../../hooks/design-view/components/useUserOccupy.mjs";
|
|
2
|
+
import "../../hooks/index.mjs";
|
|
2
3
|
import { t } from "@gct-paas/core";
|
|
3
4
|
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref } from "vue";
|
|
4
5
|
//#region src/components/user-occupy/user-lock.vue?vue&type=script&setup=true&lang.ts
|
package/es/components/user-occupy/user-lock.vue_vue_type_style_index_0_scoped_143659f6_lang.css
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.user-lock[data-v-143659f6] {
|
|
2
|
+
color: rgba(255, 255, 255, 0.72);
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
}
|
|
5
|
+
.user-lock .user-lock-info[data-v-143659f6] {
|
|
6
|
+
padding-right: 4px;
|
|
7
|
+
color: rgba(255, 255, 255, 0.72);
|
|
8
|
+
}
|
|
9
|
+
.user-lock .iconfont[data-v-143659f6] {
|
|
10
|
+
color: rgba(255, 255, 255, 0.72);
|
|
11
|
+
margin-right: 6px;
|
|
12
|
+
margin-left: 6px;
|
|
13
|
+
}
|
|
14
|
+
.user-lock[data-v-143659f6]:hover {
|
|
15
|
+
color: #ffffff;
|
|
16
|
+
}
|
|
17
|
+
.user-lock:hover .iconfont[data-v-143659f6],
|
|
18
|
+
.user-lock:hover .user-lock-info[data-v-143659f6] {
|
|
19
|
+
color: #ffffff;
|
|
20
|
+
}
|
|
21
|
+
.user-lock.locked[data-v-143659f6] {
|
|
22
|
+
color: #ff8c4b;
|
|
23
|
+
}
|
|
24
|
+
.user-lock.locked .iconfont[data-v-143659f6] {
|
|
25
|
+
color: #ff8c4b;
|
|
26
|
+
}
|
|
27
|
+
.user-lock.locked .user-lock-info[data-v-143659f6] {
|
|
28
|
+
color: #ffffff;
|
|
29
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
2
|
import user_occupy_vue_vue_type_script_setup_true_lang_default from "./user-occupy.vue_vue_type_script_setup_true_lang.mjs";
|
|
3
|
-
import './user-occupy.
|
|
3
|
+
import './user-occupy.vue_vue_type_style_index_0_scoped_1234af11_lang.css';/* empty css */
|
|
4
4
|
//#region src/components/user-occupy/user-occupy.vue
|
|
5
|
-
var user_occupy_default = /* @__PURE__ */ _plugin_vue_export_helper_default(user_occupy_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var user_occupy_default = /* @__PURE__ */ _plugin_vue_export_helper_default(user_occupy_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-1234af11"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { user_occupy_default as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useUserOccupy } from "
|
|
1
|
+
import { useUserOccupy } from "../../hooks/design-view/components/useUserOccupy.mjs";
|
|
2
|
+
import "../../hooks/index.mjs";
|
|
2
3
|
import { t } from "@gct-paas/core";
|
|
3
4
|
import { computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, resolveComponent, toDisplayString, unref } from "vue";
|
|
4
5
|
//#region src/components/user-occupy/user-occupy.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
.gct-svg-icon[data-v-
|
|
1
|
+
.gct-svg-icon[data-v-1234af11] {
|
|
2
2
|
margin-right: 8px;
|
|
3
3
|
font-size: 16px;
|
|
4
4
|
}
|
|
5
|
-
.user-occupy[data-v-
|
|
5
|
+
.user-occupy[data-v-1234af11] {
|
|
6
6
|
color: #fff;
|
|
7
7
|
display: flex;
|
|
8
8
|
align-items: center;
|
|
9
9
|
line-height: 1em;
|
|
10
10
|
font-size: 12px;
|
|
11
11
|
}
|
|
12
|
-
.user-occupy__username[data-v-
|
|
12
|
+
.user-occupy__username[data-v-1234af11] {
|
|
13
13
|
color: var(--ant-primary-color);
|
|
14
14
|
display: inline-block;
|
|
15
15
|
white-space: nowrap;
|
|
16
16
|
overflow: hidden;
|
|
17
17
|
vertical-align: bottom;
|
|
18
18
|
}
|
|
19
|
-
.user-occupy .
|
|
19
|
+
.user-occupy .gct-assets-svg-icon[data-v-1234af11] {
|
|
20
20
|
margin-right: 6px;
|
|
21
21
|
}
|
|
22
|
-
.designer-stage .user-occupy[data-v-
|
|
23
|
-
.so-toolbar .user-occupy[data-v-
|
|
22
|
+
.designer-stage .user-occupy[data-v-1234af11],
|
|
23
|
+
.so-toolbar .user-occupy[data-v-1234af11] {
|
|
24
24
|
color: #5c616a;
|
|
25
25
|
}
|
package/es/constant/index.d.ts
CHANGED
package/es/constant/index.mjs
CHANGED
|
@@ -237,5 +237,10 @@ var DesignItemActionTag = /* @__PURE__ */ function(DesignItemActionTag) {
|
|
|
237
237
|
DesignItemActionTag["SELECT_PARENT"] = "select-parent";
|
|
238
238
|
return DesignItemActionTag;
|
|
239
239
|
}({});
|
|
240
|
+
var newKeyTag = "___new___";
|
|
241
|
+
/**
|
|
242
|
+
* occupy 的 mqtt 唯一实例的 key 标识
|
|
243
|
+
*/
|
|
244
|
+
var OCCUPY_MQTT_KEY = "occupy_mqtt_key";
|
|
240
245
|
//#endregion
|
|
241
|
-
export { ControllerType, DesignItemActionTag, DesignItemAttribute, DesignNodePrefix, DesignNodeType, DesignViewPrefix, InsertNodeMode, MaterialGroup };
|
|
246
|
+
export { ControllerType, DesignItemActionTag, DesignItemAttribute, DesignNodePrefix, DesignNodeType, DesignViewPrefix, InsertNodeMode, MaterialGroup, OCCUPY_MQTT_KEY, newKeyTag };
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
import { FormDesignEnum, PrintTypeEnum } from '@gct-paas/core';
|
|
1
|
+
import { FormDesignEnum, PrintTypeEnum, ProcessTypeEnum, ScriptTypeEnum, ModelTypeEnum } from '@gct-paas/core';
|
|
2
2
|
export declare enum MenuClickEvent {
|
|
3
3
|
NEW = "new",
|
|
4
4
|
EDIT = "edit",
|
|
5
5
|
DELETE = "delete"
|
|
6
6
|
}
|
|
7
|
-
export declare enum ModelTypeEnum {
|
|
8
|
-
/** 实体模型 */
|
|
9
|
-
ENTITY = "entity_module",
|
|
10
|
-
/** 枚举 */
|
|
11
|
-
ENUM = "enum_module",
|
|
12
|
-
/** 虚拟 */
|
|
13
|
-
VIRTUAL = 5,
|
|
14
|
-
/** 视图 */
|
|
15
|
-
VIEW = "view_model_module",
|
|
16
|
-
/** SQL */
|
|
17
|
-
SQL = 7,
|
|
18
|
-
/** 数据 */
|
|
19
|
-
DATA = "data_model"
|
|
20
|
-
}
|
|
21
7
|
export declare enum PageTypeEnum {
|
|
22
8
|
/** WEB */
|
|
23
9
|
WEB = "web_module",
|
|
@@ -28,37 +14,24 @@ export declare enum PageTypeEnum {
|
|
|
28
14
|
/** 统计 */
|
|
29
15
|
STATISTICS = 8
|
|
30
16
|
}
|
|
31
|
-
export declare enum ScriptTypeEnum {
|
|
32
|
-
/** 公共方法 */
|
|
33
|
-
GLOBAL_METHOD = "global_method_module",
|
|
34
|
-
/** 脚本 */
|
|
35
|
-
DEFAULT = "script_module",
|
|
36
|
-
/** 编排 */
|
|
37
|
-
ORCHESTRATION = "so_module"
|
|
38
|
-
}
|
|
39
|
-
export declare enum ProcessTypeEnum {
|
|
40
|
-
/** 业务流 */
|
|
41
|
-
/** 审批流 */
|
|
42
|
-
APPROVAL = "approval_process_module"
|
|
43
|
-
}
|
|
44
17
|
export declare const CategoryEnum: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
RECEIPT: PrintTypeEnum.RECEIPT;
|
|
18
|
+
GLOBAL_METHOD: ScriptTypeEnum.GLOBAL_METHOD;
|
|
19
|
+
DEFAULT: ScriptTypeEnum.DEFAULT;
|
|
20
|
+
ORCHESTRATION: ScriptTypeEnum.ORCHESTRATION;
|
|
49
21
|
ENTITY: ModelTypeEnum.ENTITY;
|
|
50
22
|
ENUM: ModelTypeEnum.ENUM;
|
|
51
23
|
VIRTUAL: ModelTypeEnum.VIRTUAL;
|
|
52
24
|
VIEW: ModelTypeEnum.VIEW;
|
|
53
25
|
SQL: ModelTypeEnum.SQL;
|
|
54
26
|
DATA: ModelTypeEnum.DATA;
|
|
27
|
+
ONLINE_FORM: FormDesignEnum.ONLINE_FORM;
|
|
28
|
+
EDHR: FormDesignEnum.EDHR;
|
|
29
|
+
LABEL: PrintTypeEnum.LABEL;
|
|
30
|
+
RECEIPT: PrintTypeEnum.RECEIPT;
|
|
31
|
+
APPROVAL: ProcessTypeEnum.APPROVAL;
|
|
55
32
|
WEB: PageTypeEnum.WEB;
|
|
56
33
|
MOBILE: PageTypeEnum.MOBILE;
|
|
57
34
|
PAD: PageTypeEnum.PAD;
|
|
58
35
|
STATISTICS: PageTypeEnum.STATISTICS;
|
|
59
|
-
GLOBAL_METHOD: ScriptTypeEnum.GLOBAL_METHOD;
|
|
60
|
-
DEFAULT: ScriptTypeEnum.DEFAULT;
|
|
61
|
-
ORCHESTRATION: ScriptTypeEnum.ORCHESTRATION;
|
|
62
|
-
APPROVAL: ProcessTypeEnum.APPROVAL;
|
|
63
36
|
};
|
|
64
37
|
export type CategoryType = ModelTypeEnum | PageTypeEnum | ScriptTypeEnum | PrintTypeEnum | ProcessTypeEnum;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormDesignEnum, PrintTypeEnum } from "@gct-paas/core";
|
|
1
|
+
import { FormDesignEnum, ModelTypeEnum, PrintTypeEnum, ProcessTypeEnum, ScriptTypeEnum } from "@gct-paas/core";
|
|
2
2
|
//#region src/constant/page-designer.ts
|
|
3
3
|
var MenuClickEvent = /* @__PURE__ */ function(MenuClickEvent) {
|
|
4
4
|
MenuClickEvent["NEW"] = "new";
|
|
@@ -6,21 +6,6 @@ var MenuClickEvent = /* @__PURE__ */ function(MenuClickEvent) {
|
|
|
6
6
|
MenuClickEvent["DELETE"] = "delete";
|
|
7
7
|
return MenuClickEvent;
|
|
8
8
|
}({});
|
|
9
|
-
var ModelTypeEnum = /* @__PURE__ */ function(ModelTypeEnum) {
|
|
10
|
-
/** 实体模型 */
|
|
11
|
-
ModelTypeEnum["ENTITY"] = "entity_module";
|
|
12
|
-
/** 枚举 */
|
|
13
|
-
ModelTypeEnum["ENUM"] = "enum_module";
|
|
14
|
-
/** 虚拟 */
|
|
15
|
-
ModelTypeEnum[ModelTypeEnum["VIRTUAL"] = 5] = "VIRTUAL";
|
|
16
|
-
/** 视图 */
|
|
17
|
-
ModelTypeEnum["VIEW"] = "view_model_module";
|
|
18
|
-
/** SQL */
|
|
19
|
-
ModelTypeEnum[ModelTypeEnum["SQL"] = 7] = "SQL";
|
|
20
|
-
/** 数据 */
|
|
21
|
-
ModelTypeEnum["DATA"] = "data_model";
|
|
22
|
-
return ModelTypeEnum;
|
|
23
|
-
}({});
|
|
24
9
|
var PageTypeEnum = /* @__PURE__ */ function(PageTypeEnum) {
|
|
25
10
|
/** WEB */
|
|
26
11
|
PageTypeEnum["WEB"] = "web_module";
|
|
@@ -32,21 +17,6 @@ var PageTypeEnum = /* @__PURE__ */ function(PageTypeEnum) {
|
|
|
32
17
|
PageTypeEnum[PageTypeEnum["STATISTICS"] = 8] = "STATISTICS";
|
|
33
18
|
return PageTypeEnum;
|
|
34
19
|
}({});
|
|
35
|
-
var ScriptTypeEnum = /* @__PURE__ */ function(ScriptTypeEnum) {
|
|
36
|
-
/** 公共方法 */
|
|
37
|
-
ScriptTypeEnum["GLOBAL_METHOD"] = "global_method_module";
|
|
38
|
-
/** 脚本 */
|
|
39
|
-
ScriptTypeEnum["DEFAULT"] = "script_module";
|
|
40
|
-
/** 编排 */
|
|
41
|
-
ScriptTypeEnum["ORCHESTRATION"] = "so_module";
|
|
42
|
-
return ScriptTypeEnum;
|
|
43
|
-
}({});
|
|
44
|
-
var ProcessTypeEnum = /* @__PURE__ */ function(ProcessTypeEnum) {
|
|
45
|
-
/** 业务流 */
|
|
46
|
-
/** 审批流 */
|
|
47
|
-
ProcessTypeEnum["APPROVAL"] = "approval_process_module";
|
|
48
|
-
return ProcessTypeEnum;
|
|
49
|
-
}({});
|
|
50
20
|
var CategoryEnum = {
|
|
51
21
|
...ModelTypeEnum,
|
|
52
22
|
...PageTypeEnum,
|
|
@@ -56,4 +26,4 @@ var CategoryEnum = {
|
|
|
56
26
|
...FormDesignEnum
|
|
57
27
|
};
|
|
58
28
|
//#endregion
|
|
59
|
-
export { CategoryEnum, MenuClickEvent,
|
|
29
|
+
export { CategoryEnum, MenuClickEvent, PageTypeEnum };
|
package/es/create-app-vue.d.ts
CHANGED
package/es/create-app-vue.mjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { PageOccupyResponse } from '@gct-paas/api/apaas';
|
|
2
|
-
import { DebouncedFunc } from 'lodash-es';
|
|
3
2
|
import { getGetPageOccupyMsgQuery } from '@gct-paas/api/apaas/apis/designer-lock.service';
|
|
4
3
|
interface IUserLockInfo {
|
|
5
4
|
id?: string;
|
|
6
5
|
name?: string;
|
|
7
6
|
}
|
|
8
|
-
|
|
7
|
+
declare function _useUserOccupy(): {
|
|
9
8
|
initOccupy: (data: getGetPageOccupyMsgQuery) => void;
|
|
10
9
|
loadOccupyInfo: () => Promise<void>;
|
|
11
10
|
occupyInfo: import('vue').Ref<{
|
|
@@ -21,7 +20,7 @@ export declare function useUserOccupy(): {
|
|
|
21
20
|
occupyName?: string | undefined;
|
|
22
21
|
querySpanNum?: number | undefined;
|
|
23
22
|
}>;
|
|
24
|
-
occupy:
|
|
23
|
+
occupy: () => Promise<void> | undefined;
|
|
25
24
|
cancelOccupy: () => Promise<void>;
|
|
26
25
|
setLockInfo: (data: IUserLockInfo) => void;
|
|
27
26
|
lockInfo: import('vue').Ref<{
|
|
@@ -35,4 +34,5 @@ export declare function useUserOccupy(): {
|
|
|
35
34
|
lock: () => Promise<void>;
|
|
36
35
|
unlock: () => Promise<void>;
|
|
37
36
|
};
|
|
37
|
+
export declare const useUserOccupy: typeof _useUserOccupy;
|
|
38
38
|
export {};
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { PageTypeEnum
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "../../hooks/index.mjs";
|
|
5
|
-
import { OCCUPY_MQTT_KEY } from "./occupy.const.mjs";
|
|
1
|
+
import { PageTypeEnum } from "../../../constant/page-designer.mjs";
|
|
2
|
+
import { OCCUPY_MQTT_KEY } from "../../../constant/index.mjs";
|
|
3
|
+
import { pageInfo } from "../design-state.mjs";
|
|
6
4
|
import { throttle } from "lodash-es";
|
|
7
|
-
import { t } from "@gct-paas/core";
|
|
5
|
+
import { ScriptTypeEnum, t } from "@gct-paas/core";
|
|
8
6
|
import { computed, createVNode, ref } from "vue";
|
|
9
7
|
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
|
8
|
+
import { createSharedComposable } from "@vueuse/core";
|
|
10
9
|
import { Modal } from "ant-design-vue";
|
|
11
|
-
//#region src/
|
|
10
|
+
//#region src/hooks/design-view/components/useUserOccupy.ts
|
|
12
11
|
var i18nKeyMap = {
|
|
13
12
|
[PageTypeEnum.WEB]: "sys.page",
|
|
14
13
|
[PageTypeEnum.MOBILE]: "sys.page",
|
|
15
14
|
[PageTypeEnum.PAD]: "sys.page",
|
|
16
15
|
[ScriptTypeEnum.DEFAULT]: "sys.script"
|
|
17
16
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
function _useUserOccupy() {
|
|
18
|
+
/** 参数 */
|
|
19
|
+
let params = {};
|
|
21
20
|
/** 占用信息 */
|
|
22
21
|
const occupyInfo = ref({});
|
|
23
22
|
/** 锁定信息 */
|
|
@@ -30,10 +29,19 @@ function useUserOccupy() {
|
|
|
30
29
|
});
|
|
31
30
|
const unlockAvailable = computed(() => {
|
|
32
31
|
const { userId, username } = _gct.store.userInfo;
|
|
33
|
-
|
|
32
|
+
const lockUserId = lockInfo.value.id;
|
|
33
|
+
if (!lockUserId) return false;
|
|
34
|
+
return String(lockUserId) === String(userId) || username === "admin";
|
|
34
35
|
});
|
|
36
|
+
function applyLockInfo(data) {
|
|
37
|
+
lockInfo.value = data;
|
|
38
|
+
pageInfo.value.lockUserId = data.id || "";
|
|
39
|
+
pageInfo.value.lockUserName = data.name || "";
|
|
40
|
+
}
|
|
35
41
|
/** 查询占用定时器 */
|
|
36
42
|
let occupyTimer = null;
|
|
43
|
+
/** 节流 wait 是否已按真实 cacheNum 初始化 */
|
|
44
|
+
let _occupyThrottleInitialized = false;
|
|
37
45
|
async function _loadOccupyInfo() {
|
|
38
46
|
if (!params.id || !params.type || params.id.startsWith("___new___")) return;
|
|
39
47
|
const res = await _api.apaas.designerLock.getGetPageOccupyMsg(params);
|
|
@@ -41,6 +49,11 @@ function useUserOccupy() {
|
|
|
41
49
|
if (!data.querySpanNum) data.querySpanNum = 120;
|
|
42
50
|
if (!data.cacheNum) data.cacheNum = 500;
|
|
43
51
|
occupyInfo.value = data;
|
|
52
|
+
if (wait.value > 0 && !_occupyThrottleInitialized) {
|
|
53
|
+
_occupyThrottle.cancel();
|
|
54
|
+
_occupyThrottle = throttle(_occupy, wait.value, { trailing: false });
|
|
55
|
+
_occupyThrottleInitialized = true;
|
|
56
|
+
}
|
|
44
57
|
if (res?.occupyId) destoryOccupyTimer();
|
|
45
58
|
else if (!occupyTimer) occupyTimer = setInterval(() => {
|
|
46
59
|
_loadOccupyInfo();
|
|
@@ -67,17 +80,20 @@ function useUserOccupy() {
|
|
|
67
80
|
})
|
|
68
81
|
}
|
|
69
82
|
}).subscribe(CLEAN_CACHE, () => {
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
arr[1] = Date.now().toString();
|
|
74
|
-
window.location.href = arr.join("reloadTime=");
|
|
75
|
-
} else window.location.href = currentUrl + "&reloadTime=" + Date.now();
|
|
76
|
-
else window.location.href = currentUrl + "?reloadTime=" + Date.now();
|
|
83
|
+
const url = new URL(window.location.href);
|
|
84
|
+
url.searchParams.set("reloadTime", Date.now().toString());
|
|
85
|
+
window.location.href = url.toString();
|
|
77
86
|
location.reload();
|
|
78
87
|
});
|
|
79
88
|
}
|
|
80
89
|
function initOccupy(data) {
|
|
90
|
+
destoryOccupyTimer();
|
|
91
|
+
if (_gct.mqtt.has("occupy_mqtt_key")) _gct.mqtt.destroy(OCCUPY_MQTT_KEY);
|
|
92
|
+
occupyInfo.value = {};
|
|
93
|
+
lockInfo.value = {};
|
|
94
|
+
_occupyThrottle.cancel();
|
|
95
|
+
_occupyThrottle = throttle(_occupy, 0, { trailing: false });
|
|
96
|
+
_occupyThrottleInitialized = false;
|
|
81
97
|
params = data;
|
|
82
98
|
initMqttOccupy(params);
|
|
83
99
|
}
|
|
@@ -89,29 +105,32 @@ function useUserOccupy() {
|
|
|
89
105
|
if (lockInfo.value.id) return;
|
|
90
106
|
if (_gct.store.userInfo.userId !== occupyInfo.value.occupyId && occupyInfo.value.occupyId) return;
|
|
91
107
|
try {
|
|
92
|
-
await _api.apaas.designerLock.
|
|
108
|
+
await _api.apaas.designerLock.postOccupyPage(params);
|
|
93
109
|
} catch (err) {
|
|
94
110
|
console.warn("【占用异常】", err);
|
|
95
111
|
} finally {
|
|
96
112
|
await _loadOccupyInfo();
|
|
97
113
|
}
|
|
98
114
|
}
|
|
115
|
+
let _occupyThrottle = throttle(_occupy, 0, { trailing: false });
|
|
99
116
|
/**
|
|
100
117
|
* 占用
|
|
101
118
|
*/
|
|
102
|
-
|
|
119
|
+
function occupy() {
|
|
120
|
+
return _occupyThrottle();
|
|
121
|
+
}
|
|
103
122
|
/**
|
|
104
123
|
* 取消占用
|
|
105
124
|
*/
|
|
106
125
|
async function cancelOccupy() {
|
|
107
126
|
if (!params.id || !params.type) return;
|
|
108
127
|
if (lockInfo.value.id) return;
|
|
109
|
-
|
|
128
|
+
_occupyThrottle.cancel();
|
|
110
129
|
await _api.apaas.designerLock.postCancelOccupyPage(params);
|
|
111
130
|
await _loadOccupyInfo();
|
|
112
131
|
}
|
|
113
132
|
function setLockInfo(data) {
|
|
114
|
-
|
|
133
|
+
applyLockInfo(data);
|
|
115
134
|
}
|
|
116
135
|
/**
|
|
117
136
|
* 锁定
|
|
@@ -127,10 +146,10 @@ function useUserOccupy() {
|
|
|
127
146
|
async onOk() {
|
|
128
147
|
await _api.apaas.designerLock.postLockPage(params);
|
|
129
148
|
_gct.message.success(t("sys.operationSuccess"));
|
|
130
|
-
|
|
131
|
-
id: _gct.store.userInfo.userId,
|
|
149
|
+
applyLockInfo({
|
|
150
|
+
id: String(_gct.store.userInfo.userId),
|
|
132
151
|
name: _gct.store.userInfo.fullname
|
|
133
|
-
};
|
|
152
|
+
});
|
|
134
153
|
}
|
|
135
154
|
});
|
|
136
155
|
}
|
|
@@ -138,12 +157,13 @@ function useUserOccupy() {
|
|
|
138
157
|
* 解锁
|
|
139
158
|
*/
|
|
140
159
|
async function unlock() {
|
|
160
|
+
if (!unlockAvailable.value) return;
|
|
141
161
|
await _api.apaas.designerLock.postUnLockPage(params);
|
|
142
162
|
_gct.message.success(t("sys.operationSuccess"));
|
|
143
|
-
|
|
163
|
+
applyLockInfo({
|
|
144
164
|
id: "",
|
|
145
165
|
name: ""
|
|
146
|
-
};
|
|
166
|
+
});
|
|
147
167
|
}
|
|
148
168
|
return {
|
|
149
169
|
initOccupy,
|
|
@@ -158,5 +178,6 @@ function useUserOccupy() {
|
|
|
158
178
|
unlock
|
|
159
179
|
};
|
|
160
180
|
}
|
|
181
|
+
var useUserOccupy = createSharedComposable(_useUserOccupy);
|
|
161
182
|
//#endregion
|
|
162
183
|
export { useUserOccupy };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pageLayoutModeEnum } from '@gct-paas/core';
|
|
2
2
|
import { ExportMethod, LowCodeWidget, PageJson, IModal } from '@gct-paas/schema';
|
|
3
|
-
import { PageDesignerLogResponse } from '@gct-paas/api/apaas';
|
|
3
|
+
import { PageDesignerLogResponse, WebpageResponse } from '@gct-paas/api/apaas';
|
|
4
4
|
import { platform, designRegister } from '../../utils';
|
|
5
5
|
export { platform, designRegister };
|
|
6
6
|
/**
|
|
@@ -13,6 +13,93 @@ export declare const widgetInfo: import('vue').ComputedRef<import('@gct-paas/sch
|
|
|
13
13
|
/**
|
|
14
14
|
* 当前平台的插件注册实例
|
|
15
15
|
*/
|
|
16
|
+
export type PageInfo = WebpageResponse & {
|
|
17
|
+
categoryId?: string;
|
|
18
|
+
version?: string;
|
|
19
|
+
default?: boolean;
|
|
20
|
+
modelKey?: string;
|
|
21
|
+
_designerJson?: string;
|
|
22
|
+
detailDesignerJson?: string;
|
|
23
|
+
txnPageMode?: 'create' | 'detail';
|
|
24
|
+
baseId?: string;
|
|
25
|
+
};
|
|
26
|
+
/** 当前设计页面基础信息 */
|
|
27
|
+
export declare const pageInfo: import('vue').Ref<{
|
|
28
|
+
categoryResponse?: {
|
|
29
|
+
createTime?: string | undefined;
|
|
30
|
+
createUserId?: string | undefined;
|
|
31
|
+
createUserName?: string | undefined;
|
|
32
|
+
id?: string | undefined;
|
|
33
|
+
modifyTime?: string | undefined;
|
|
34
|
+
modifyUserId?: string | undefined;
|
|
35
|
+
modifyUserName?: string | undefined;
|
|
36
|
+
module?: string | undefined;
|
|
37
|
+
name?: string | undefined;
|
|
38
|
+
sortNum?: number | undefined;
|
|
39
|
+
sysBuiltin?: number | undefined;
|
|
40
|
+
} | undefined;
|
|
41
|
+
createTime?: string | undefined;
|
|
42
|
+
createUserId?: string | undefined;
|
|
43
|
+
createUserName?: string | undefined;
|
|
44
|
+
description?: string | undefined;
|
|
45
|
+
designerJson?: string | undefined;
|
|
46
|
+
id?: string | undefined;
|
|
47
|
+
key?: string | undefined;
|
|
48
|
+
lockUserId?: string | undefined;
|
|
49
|
+
lockUserName?: string | undefined;
|
|
50
|
+
modifyTime?: string | undefined;
|
|
51
|
+
modifyUserId?: string | undefined;
|
|
52
|
+
modifyUserName?: string | undefined;
|
|
53
|
+
name?: string | undefined;
|
|
54
|
+
newLogId?: string | undefined;
|
|
55
|
+
runtimeJson?: string | undefined;
|
|
56
|
+
categoryId?: string | undefined;
|
|
57
|
+
version?: string | undefined;
|
|
58
|
+
default?: boolean | undefined;
|
|
59
|
+
modelKey?: string | undefined;
|
|
60
|
+
_designerJson?: string | undefined;
|
|
61
|
+
detailDesignerJson?: string | undefined;
|
|
62
|
+
txnPageMode?: "create" | "detail" | undefined;
|
|
63
|
+
baseId?: string | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
categoryResponse?: {
|
|
66
|
+
createTime?: string | undefined;
|
|
67
|
+
createUserId?: string | undefined;
|
|
68
|
+
createUserName?: string | undefined;
|
|
69
|
+
id?: string | undefined;
|
|
70
|
+
modifyTime?: string | undefined;
|
|
71
|
+
modifyUserId?: string | undefined;
|
|
72
|
+
modifyUserName?: string | undefined;
|
|
73
|
+
module?: string | undefined;
|
|
74
|
+
name?: string | undefined;
|
|
75
|
+
sortNum?: number | undefined;
|
|
76
|
+
sysBuiltin?: number | undefined;
|
|
77
|
+
} | undefined;
|
|
78
|
+
createTime?: string | undefined;
|
|
79
|
+
createUserId?: string | undefined;
|
|
80
|
+
createUserName?: string | undefined;
|
|
81
|
+
description?: string | undefined;
|
|
82
|
+
designerJson?: string | undefined;
|
|
83
|
+
id?: string | undefined;
|
|
84
|
+
key?: string | undefined;
|
|
85
|
+
lockUserId?: string | undefined;
|
|
86
|
+
lockUserName?: string | undefined;
|
|
87
|
+
modifyTime?: string | undefined;
|
|
88
|
+
modifyUserId?: string | undefined;
|
|
89
|
+
modifyUserName?: string | undefined;
|
|
90
|
+
name?: string | undefined;
|
|
91
|
+
newLogId?: string | undefined;
|
|
92
|
+
runtimeJson?: string | undefined;
|
|
93
|
+
categoryId?: string | undefined;
|
|
94
|
+
version?: string | undefined;
|
|
95
|
+
default?: boolean | undefined;
|
|
96
|
+
modelKey?: string | undefined;
|
|
97
|
+
_designerJson?: string | undefined;
|
|
98
|
+
detailDesignerJson?: string | undefined;
|
|
99
|
+
txnPageMode?: "create" | "detail" | undefined;
|
|
100
|
+
baseId?: string | undefined;
|
|
101
|
+
} | PageInfo>;
|
|
102
|
+
export declare const defaultPageJson: PageJson;
|
|
16
103
|
/** 设计页面JSON */
|
|
17
104
|
export declare const pageJson: {
|
|
18
105
|
id: string;
|
|
@@ -1081,6 +1168,9 @@ export declare const pageJson: {
|
|
|
1081
1168
|
title?: string | undefined;
|
|
1082
1169
|
} | undefined;
|
|
1083
1170
|
hasFooter?: boolean | undefined;
|
|
1171
|
+
unitType?: "px" | "%" | undefined;
|
|
1172
|
+
pageWidth?: number | undefined;
|
|
1173
|
+
independentDetailPage?: boolean | undefined;
|
|
1084
1174
|
};
|
|
1085
1175
|
pageVars: {
|
|
1086
1176
|
id: string;
|