@gct-paas/render-web 0.1.6-dev.9 → 6.0.0-dev.10
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/README.md +161 -0
- package/dist/index.min.css +1 -1
- package/dist/loader.esm.min.js +2 -1
- package/es/Event/Events.d.ts +1 -0
- package/es/Event/Events.mjs +7 -3
- package/es/_virtual/_rolldown/runtime.mjs +13 -0
- package/es/components/base-vxe-table/base-vxe-table.vue.d.ts +80 -0
- package/es/components/base-vxe-table/base-vxe-table.vue.mjs +7 -0
- package/es/components/base-vxe-table/base-vxe-table.vue_vue_type_script_setup_true_name_base-vxe-table_lang.mjs +154 -0
- package/es/components/base-vxe-table/base-vxe-table.vue_vue_type_style_index_0_scoped_bf4b3774_lang.css +10 -0
- package/es/components/base-vxe-table/utils.d.ts +25 -0
- package/es/components/base-vxe-table/utils.mjs +25 -0
- package/es/components/card-view-render/card-view-render.d.ts +2 -2
- package/es/components/card-view-render/card-view-render.mjs +21 -1
- package/es/components/collapse-detail/components/collapse-list.vue.d.ts +24 -0
- package/es/components/collapse-detail/components/collapse-list.vue.mjs +5 -0
- package/es/components/collapse-detail/components/collapse-list.vue_vue_type_script_setup_true_lang.mjs +103 -0
- package/es/components/collapse-detail/components/enum-tag-label.vue.d.ts +6 -0
- package/es/components/collapse-detail/components/enum-tag-label.vue.mjs +5 -0
- package/es/components/collapse-detail/components/enum-tag-label.vue_vue_type_script_setup_true_lang.mjs +61 -0
- package/es/components/collapse-detail/components/instance-status-label.vue.d.ts +34 -0
- package/es/components/collapse-detail/components/instance-status-label.vue.mjs +7 -0
- package/es/components/collapse-detail/components/instance-status-label.vue_vue_type_script_setup_true_lang.mjs +76 -0
- package/es/components/collapse-detail/components/instance-status-label.vue_vue_type_style_index_0_scoped_610b0bb3_lang.css +77 -0
- package/es/components/collapse-detail/components/label-tag.vue.d.ts +6 -0
- package/es/components/collapse-detail/components/label-tag.vue.mjs +7 -0
- package/es/components/collapse-detail/components/label-tag.vue_vue_type_script_setup_true_lang.mjs +34 -0
- package/es/components/collapse-detail/components/label-tag.vue_vue_type_style_index_0_scoped_b25afce5_lang.css +39 -0
- package/es/components/collapse-detail/constants/instance-theme-config.d.ts +64 -0
- package/es/components/collapse-detail/constants/instance-theme-config.mjs +100 -0
- package/es/components/collapse-detail/constants/status.d.ts +36 -0
- package/es/components/collapse-detail/constants/status.mjs +34 -0
- package/es/components/collapse-detail/index.d.ts +3 -0
- package/es/components/collapse-detail/index.mjs +1 -0
- package/es/components/collapse-detail/index.vue.d.ts +37 -0
- package/es/components/collapse-detail/index.vue.mjs +7 -0
- package/es/components/collapse-detail/index.vue_vue_type_script_setup_true_name_collapse-detail_lang.mjs +90 -0
- package/es/components/collapse-detail/index.vue_vue_type_style_index_0_scoped_b4b9903c_lang.css +83 -0
- package/es/components/collapse-detail/typing.d.ts +44 -0
- package/es/components/collapse-detail/typing.mjs +17 -0
- package/es/components/field-search-cascader/field-cascader.vue.d.ts +17 -0
- package/es/components/field-search-cascader/field-cascader.vue.mjs +8 -0
- package/es/components/field-search-cascader/field-cascader.vue_vue_type_script_setup_true_lang.mjs +297 -0
- package/es/components/field-search-cascader/field-cascader.vue_vue_type_style_index_0_scoped_cb5e4d67_lang.css +52 -0
- package/es/components/field-search-cascader/field-cascader.vue_vue_type_style_index_1_lang.css +3 -0
- package/es/components/field-search-cascader/index.d.ts +2 -0
- package/es/components/field-search-cascader/index.mjs +1 -0
- package/es/components/form-component/FieldSelect.css +22 -0
- package/es/components/form-component/FieldSelect.d.ts +9 -0
- package/es/components/form-component/FieldSelect.mjs +19 -8
- package/es/components/form-component/field-label/tag-label.vue.d.ts +1 -0
- package/es/components/form-component/field-label/tag-label.vue.mjs +2 -2
- package/es/components/form-component/field-label/tag-label.vue_vue_type_script_setup_true_name_TagLabel_lang.mjs +15 -13
- package/es/components/form-component/field-label/tag-label.vue_vue_type_style_index_0_scoped_5e1146da_lang.css +18 -0
- package/es/components/form-component/field-label/tag-span.vue.mjs +1 -1
- package/es/components/form-component/field-readonly.vue_vue_type_script_setup_true_lang.mjs +26 -44
- package/es/components/index.d.ts +7 -0
- package/es/components/index.mjs +9 -0
- package/es/components/layouts/basic-page/basic-page.vue.d.ts +30 -0
- package/es/components/layouts/basic-page/basic-page.vue.mjs +7 -0
- package/es/components/layouts/basic-page/basic-page.vue_vue_type_script_setup_true_name_basic-page_lang.mjs +30 -0
- package/es/components/layouts/basic-page/basic-page.vue_vue_type_style_index_0_scoped_23453a1b_lang.css +20 -0
- package/es/components/layouts/basic-page-render/basic-page-render.vue.d.ts +30 -0
- package/es/components/layouts/basic-page-render/basic-page-render.vue.mjs +7 -0
- package/es/components/layouts/basic-page-render/basic-page-render.vue_vue_type_script_setup_true_name_BasicPageRender_lang.mjs +30 -0
- package/es/components/layouts/basic-page-render/basic-page-render.vue_vue_type_style_index_0_scoped_3c6aba55_lang.css +20 -0
- package/es/components/multi-field/multi-field-display.vue.mjs +2 -2
- package/es/components/multi-field/multi-field-display.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/multi-field/{multi-field-display.vue_vue_type_style_index_0_scoped_0f2f02cc_lang.css → multi-field-display.vue_vue_type_style_index_0_scoped_a62c7691_lang.css} +1 -1
- package/es/components/rich-editor/index.d.ts +2 -0
- package/es/components/rich-editor/index.mjs +1 -0
- package/es/components/rich-editor/rich-editor.vue.d.ts +22 -0
- package/es/components/rich-editor/rich-editor.vue.mjs +5 -0
- package/es/components/rich-editor/rich-editor.vue_vue_type_script_setup_true_lang.mjs +150 -0
- package/es/components/rich-editor/style.css +747 -0
- package/es/constants/xlsx-parser.d.ts +15 -0
- package/es/constants/xlsx-parser.mjs +58 -0
- package/es/enums/xlsx-parser.d.ts +293 -0
- package/es/enums/xlsx-parser.mjs +36 -0
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/refCardList.d.ts +12 -2
- package/es/hooks/refCardList.mjs +74 -11
- package/es/hooks/useQuickSearch.d.ts +8 -0
- package/es/hooks/useQuickSearch.mjs +96 -0
- package/es/index.d.ts +3 -0
- package/es/index.mjs +14 -2
- package/es/interface/xlsx-parser/base.d.ts +151 -0
- package/es/interface/xlsx-parser/index.d.ts +246 -0
- package/es/locale/auto-register.d.ts +2 -0
- package/es/locale/auto-register.mjs +31 -0
- package/es/locale/sys/appDesigner.d.ts +11 -0
- package/es/locale/sys/appDesigner.mjs +11 -0
- package/es/locale/sys/bi.d.ts +4 -0
- package/es/locale/sys/bi.mjs +6 -0
- package/es/locale/sys/bpmn.d.ts +10 -0
- package/es/locale/sys/bpmn.mjs +12 -0
- package/es/locale/sys/component.d.ts +15 -0
- package/es/locale/sys/component.mjs +15 -0
- package/es/locale/sys/developer.d.ts +6 -0
- package/es/locale/sys/developer.mjs +6 -0
- package/es/locale/sys/edhr.d.ts +19 -0
- package/es/locale/sys/edhr.mjs +15 -0
- package/es/locale/sys/message.d.ts +4 -0
- package/es/locale/sys/message.mjs +6 -0
- package/es/locale/sys/model.d.ts +34 -0
- package/es/locale/sys/model.mjs +38 -0
- package/es/locale/sys/onlineForm.d.ts +8 -0
- package/es/locale/sys/onlineForm.mjs +12 -0
- package/es/locale/sys/pageDesigner.d.ts +7 -0
- package/es/locale/sys/pageDesigner.mjs +9 -0
- package/es/locale/sys.d.ts +10 -0
- package/es/locale/sys.mjs +14 -0
- package/es/modules/app-mqtt/app-mqtt.interface.d.ts +26 -0
- package/es/modules/app-mqtt/app-mqtt.service.d.ts +73 -0
- package/es/modules/app-mqtt/app-mqtt.service.mjs +134 -0
- package/es/modules/app-mqtt/index.d.ts +2 -0
- package/es/modules/app-mqtt/index.mjs +1 -0
- package/es/plugins/render-card-field/render-card-field.css +171 -0
- package/es/plugins/render-card-field/render-card-field.d.ts +48 -0
- package/es/plugins/render-card-field/render-card-field.mjs +176 -0
- package/es/plugins/render-card-field/render-card-field.provider.d.ts +7 -0
- package/es/plugins/render-card-field/render-card-field.provider.mjs +10 -0
- package/es/plugins/render-card-view-page/render-card-view-page.css +72 -0
- package/es/plugins/render-card-view-page/render-card-view-page.d.ts +33 -0
- package/es/plugins/render-card-view-page/render-card-view-page.mjs +61 -0
- package/es/plugins/render-card-view-page/render-card-view-page.provider.d.ts +7 -0
- package/es/plugins/render-card-view-page/render-card-view-page.provider.mjs +10 -0
- package/es/plugins/render-design-editor/index.d.ts +5 -0
- package/es/plugins/render-design-editor/upload-file/index.d.ts +4 -0
- package/es/plugins/render-design-editor/upload-file/upload-file.d.ts +51 -0
- package/es/plugins/render-design-editor/upload-image/index.d.ts +4 -0
- package/es/plugins/render-design-editor/upload-image/upload-image.d.ts +51 -0
- package/es/plugins/render-design-editor/user-signature/index.d.ts +4 -0
- package/es/plugins/render-design-editor/user-signature/user-signature.d.ts +51 -0
- package/es/setup-app.d.ts +2 -0
- package/es/setup-app.mjs +22 -0
- package/es/types/shims-modules.d.ts +11 -0
- package/es/utils/cell-border.d.ts +73 -0
- package/es/utils/cell-border.mjs +203 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.mjs +1 -0
- package/es/utils/xlsx-parser.d.ts +141 -0
- package/es/utils/xlsx-parser.mjs +262 -0
- package/package.json +23 -12
- package/es/components/form-component/field-label/tag-label.vue_vue_type_style_index_0_scoped_6c507fe8_lang.css +0 -15
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region src/locale/sys/model.ts
|
|
3
|
+
var model_exports = /* @__PURE__ */ __exportAll({ default: () => model_default });
|
|
4
|
+
var model_default = {
|
|
5
|
+
uniqueOrNot: "是否唯一",
|
|
6
|
+
option: "枚举单选",
|
|
7
|
+
related_lot_no: "关联批次",
|
|
8
|
+
product: "物料",
|
|
9
|
+
mfg_order: "工单号",
|
|
10
|
+
record_no: "记录单号",
|
|
11
|
+
trace_date: "追溯日期",
|
|
12
|
+
order_no: "订单号",
|
|
13
|
+
routing_operation: "工序",
|
|
14
|
+
good_qty: "良品数量",
|
|
15
|
+
not_good_qty: "不良品数量",
|
|
16
|
+
report_start_time: "报工开始时间",
|
|
17
|
+
report_end_time: "报工结束时间",
|
|
18
|
+
work_hours: "工时",
|
|
19
|
+
production_date: "生产日期",
|
|
20
|
+
reporter: "报工人",
|
|
21
|
+
not_good_reason: "不良原因",
|
|
22
|
+
not_good_group: "不良分类",
|
|
23
|
+
scrap_reason: "报废原因",
|
|
24
|
+
scrap_group: "报废分类",
|
|
25
|
+
scrap_qty: "报废数量",
|
|
26
|
+
scrap_material: "报废物料",
|
|
27
|
+
scrap_material_no: "报废物料批次",
|
|
28
|
+
destructive_test_qty: "破坏性试验数量",
|
|
29
|
+
product_check_qty: "产品检验数量",
|
|
30
|
+
warehouse_receipt_no: "单据编号",
|
|
31
|
+
warehouse_receipt_date: "单据日期",
|
|
32
|
+
warehouse_manager: "仓管员",
|
|
33
|
+
qty_required: "需求数量",
|
|
34
|
+
qty_consumed: "已消耗数量",
|
|
35
|
+
qty: "数量"
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { model_exports };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region src/locale/sys/onlineForm.ts
|
|
3
|
+
var onlineForm_exports = /* @__PURE__ */ __exportAll({ default: () => onlineForm_default });
|
|
4
|
+
var onlineForm_default = {
|
|
5
|
+
fieldKey: "字段KEY",
|
|
6
|
+
disabledStatus: "是否禁用状态",
|
|
7
|
+
formStyle: "表单样式",
|
|
8
|
+
formFields: "表单字段",
|
|
9
|
+
noAssociation: "无关联"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { onlineForm_exports };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region src/locale/sys/pageDesigner.ts
|
|
3
|
+
var pageDesigner_exports = /* @__PURE__ */ __exportAll({ default: () => pageDesigner_default });
|
|
4
|
+
var pageDesigner_default = {
|
|
5
|
+
searchField: "搜索字段",
|
|
6
|
+
dataLinkage: { rootSelectPlaceholder2: "请选择模型字段" }
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { pageDesigner_exports };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region src/locale/sys.ts
|
|
3
|
+
var sys_exports = /* @__PURE__ */ __exportAll({ default: () => sys_default });
|
|
4
|
+
var sys_default = {
|
|
5
|
+
FieldName: "字段名称",
|
|
6
|
+
requiredOrNot: "是否必填",
|
|
7
|
+
text: "文本",
|
|
8
|
+
tableColumnDate: "时间",
|
|
9
|
+
signatureImage: "签名",
|
|
10
|
+
true: "是",
|
|
11
|
+
checkBarcodeFieldTip: "请关联实体模型后再配置变量类型的条码内容"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { sys_exports };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 在线人数变化
|
|
3
|
+
*
|
|
4
|
+
* @export
|
|
5
|
+
* @interface IOnlineCountPayload
|
|
6
|
+
*/
|
|
7
|
+
export interface IOnlineCountPayload {
|
|
8
|
+
/**
|
|
9
|
+
* 应用标识
|
|
10
|
+
*
|
|
11
|
+
* @type {string}
|
|
12
|
+
*/
|
|
13
|
+
appId: string;
|
|
14
|
+
/**
|
|
15
|
+
* 在线人数
|
|
16
|
+
*
|
|
17
|
+
* @type {number}
|
|
18
|
+
*/
|
|
19
|
+
count: number;
|
|
20
|
+
/**
|
|
21
|
+
* 具体环境标识
|
|
22
|
+
*
|
|
23
|
+
* @type {string}
|
|
24
|
+
*/
|
|
25
|
+
env: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { SystemMqttService, IMqttClient, MqttCancelSub, MqttSubCallback } from '@gct-paas/core';
|
|
2
|
+
import { IOnlineCountPayload } from './app-mqtt.interface';
|
|
3
|
+
export declare class AppMqttService extends SystemMqttService {
|
|
4
|
+
protected static app_client: IMqttClient | undefined;
|
|
5
|
+
protected static client_id: string;
|
|
6
|
+
/**
|
|
7
|
+
* 用户控制消息 topic
|
|
8
|
+
*
|
|
9
|
+
* @static
|
|
10
|
+
*/
|
|
11
|
+
static readonly USER_CONTROL_TOPIC = "users/control/msg";
|
|
12
|
+
/**
|
|
13
|
+
* 在线人数变化 topic
|
|
14
|
+
*
|
|
15
|
+
* @readonly
|
|
16
|
+
* @static
|
|
17
|
+
* @type {string}
|
|
18
|
+
*/
|
|
19
|
+
static get ONLINE_COUNT_TOPIC(): string;
|
|
20
|
+
/**
|
|
21
|
+
* 用户被从当前应用踢出 topic
|
|
22
|
+
*
|
|
23
|
+
* @readonly
|
|
24
|
+
* @static
|
|
25
|
+
* @type {string}
|
|
26
|
+
*/
|
|
27
|
+
static get APP_EXIT_TOPIC(): string;
|
|
28
|
+
/**
|
|
29
|
+
* 初始化系统级 MQTT 客户端,需要在用户信息以及应用信息加载完成后调用
|
|
30
|
+
*
|
|
31
|
+
* @static
|
|
32
|
+
* @return {*} {Promise<void>}
|
|
33
|
+
*/
|
|
34
|
+
protected static createMqtt(): Promise<void>;
|
|
35
|
+
protected static subs(): void;
|
|
36
|
+
protected static subKickOut(): MqttCancelSub;
|
|
37
|
+
/**
|
|
38
|
+
* 订阅应用级 MQTT 消息
|
|
39
|
+
*
|
|
40
|
+
* @static
|
|
41
|
+
* @param {string} topic
|
|
42
|
+
*/
|
|
43
|
+
static subscribeApp<T = IObject>(topic: string, callback: MqttSubCallback<T>): MqttCancelSub;
|
|
44
|
+
/**
|
|
45
|
+
* 订阅在线人数变化
|
|
46
|
+
*
|
|
47
|
+
* @static
|
|
48
|
+
* @param {MqttSubCallback<IOnlineCountPayload>} callback
|
|
49
|
+
* @return {*} {MqttCancelSub}
|
|
50
|
+
*/
|
|
51
|
+
static subOnlineCount(callback: MqttSubCallback<IOnlineCountPayload>): MqttCancelSub;
|
|
52
|
+
/**
|
|
53
|
+
* 订阅用户被从当前应用踢出
|
|
54
|
+
*
|
|
55
|
+
* @static
|
|
56
|
+
* @param {MqttSubCallback<void>} callback
|
|
57
|
+
* @return {*} {MqttCancelSub}
|
|
58
|
+
*/
|
|
59
|
+
static subAppExit(): MqttCancelSub;
|
|
60
|
+
/**
|
|
61
|
+
* 发送用户上线消息
|
|
62
|
+
*
|
|
63
|
+
* @static
|
|
64
|
+
* @param {string} clientId
|
|
65
|
+
*/
|
|
66
|
+
static pubOnline(): void;
|
|
67
|
+
/**
|
|
68
|
+
* 发送用户下线消息
|
|
69
|
+
*
|
|
70
|
+
* @static
|
|
71
|
+
*/
|
|
72
|
+
static pubExit(): void;
|
|
73
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { AuthUtil, DEFAULT_MQTT_INSTANCE_ID, SystemMqttService } from "@gct-paas/core";
|
|
2
|
+
//#region src/modules/app-mqtt/app-mqtt.service.ts
|
|
3
|
+
var AppMqttService = class extends SystemMqttService {
|
|
4
|
+
static app_client;
|
|
5
|
+
static client_id = "";
|
|
6
|
+
/**
|
|
7
|
+
* 用户控制消息 topic
|
|
8
|
+
*
|
|
9
|
+
* @static
|
|
10
|
+
*/
|
|
11
|
+
static USER_CONTROL_TOPIC = "users/control/msg";
|
|
12
|
+
/**
|
|
13
|
+
* 在线人数变化 topic
|
|
14
|
+
*
|
|
15
|
+
* @readonly
|
|
16
|
+
* @static
|
|
17
|
+
* @type {string}
|
|
18
|
+
*/
|
|
19
|
+
static get ONLINE_COUNT_TOPIC() {
|
|
20
|
+
return `${_gct.store.appInfo.id}/${_gct.env.getEnv()}/ONLINE_COUNT`;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 用户被从当前应用踢出 topic
|
|
24
|
+
*
|
|
25
|
+
* @readonly
|
|
26
|
+
* @static
|
|
27
|
+
* @type {string}
|
|
28
|
+
*/
|
|
29
|
+
static get APP_EXIT_TOPIC() {
|
|
30
|
+
return `web.${_gct.store.userInfo.userId}/${_gct.env.getEnv()}.${_gct.store.appInfo.id}.${_gct.store.userInfo.ip}.${this.fingerprint}/EXIT`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 初始化系统级 MQTT 客户端,需要在用户信息以及应用信息加载完成后调用
|
|
34
|
+
*
|
|
35
|
+
* @static
|
|
36
|
+
* @return {*} {Promise<void>}
|
|
37
|
+
*/
|
|
38
|
+
static async createMqtt() {
|
|
39
|
+
await super.createMqtt();
|
|
40
|
+
this.client_id = `web.${_gct.store.userInfo.userId}.${_gct.env.getEnv()}.${_gct.store.appInfo.id}.${_gct.store.userInfo.ip}.${this.fingerprint}.${(/* @__PURE__ */ new Date()).getTime()}`;
|
|
41
|
+
const mqttProperties = _gct.store.userInfo?.mqttProperties || {};
|
|
42
|
+
this.app_client = _gct.mqtt.create(DEFAULT_MQTT_INSTANCE_ID, {
|
|
43
|
+
...mqttProperties,
|
|
44
|
+
clientId: this.client_id,
|
|
45
|
+
will: {
|
|
46
|
+
topic: this.USER_CONTROL_TOPIC,
|
|
47
|
+
payload: JSON.stringify({
|
|
48
|
+
clientId: this.client_id,
|
|
49
|
+
msg: "exit"
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
static subs() {
|
|
55
|
+
super.subs();
|
|
56
|
+
this.subAppExit();
|
|
57
|
+
}
|
|
58
|
+
static subKickOut() {
|
|
59
|
+
return super.subKickOut(() => {
|
|
60
|
+
this.pubLogout();
|
|
61
|
+
this.pubExit();
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 订阅应用级 MQTT 消息
|
|
66
|
+
*
|
|
67
|
+
* @static
|
|
68
|
+
* @param {string} topic
|
|
69
|
+
*/
|
|
70
|
+
static subscribeApp(topic, callback) {
|
|
71
|
+
if (!this.app_client) throw new Error("App MQTT client is not initialized");
|
|
72
|
+
return this.app_client.subscribe(topic, (_topic, payload) => {
|
|
73
|
+
try {
|
|
74
|
+
callback(JSON.parse(payload.toString()));
|
|
75
|
+
} catch (error) {
|
|
76
|
+
console.error("解析 MQTT 消息 payload 失败:", error);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 订阅在线人数变化
|
|
82
|
+
*
|
|
83
|
+
* @static
|
|
84
|
+
* @param {MqttSubCallback<IOnlineCountPayload>} callback
|
|
85
|
+
* @return {*} {MqttCancelSub}
|
|
86
|
+
*/
|
|
87
|
+
static subOnlineCount(callback) {
|
|
88
|
+
return this.subscribeApp(this.ONLINE_COUNT_TOPIC, callback);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* 订阅用户被从当前应用踢出
|
|
92
|
+
*
|
|
93
|
+
* @static
|
|
94
|
+
* @param {MqttSubCallback<void>} callback
|
|
95
|
+
* @return {*} {MqttCancelSub}
|
|
96
|
+
*/
|
|
97
|
+
static subAppExit() {
|
|
98
|
+
return this.subscribeApp(this.APP_EXIT_TOPIC, () => {
|
|
99
|
+
_gct.message.error(`您已被移出应用【${_gct.store.appInfo.name}】,请稍后再试。`);
|
|
100
|
+
setTimeout(() => {
|
|
101
|
+
if (_gct.env.isAppSingle || _gct.env.isSandbox) AuthUtil.getInstance().logout(true);
|
|
102
|
+
else {
|
|
103
|
+
const url = new URL(`${location.origin}/paas-front/portal#/home`);
|
|
104
|
+
window.location.href = url.toString();
|
|
105
|
+
}
|
|
106
|
+
}, 1e3);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* 发送用户上线消息
|
|
111
|
+
*
|
|
112
|
+
* @static
|
|
113
|
+
* @param {string} clientId
|
|
114
|
+
*/
|
|
115
|
+
static pubOnline() {
|
|
116
|
+
this.app_client?.publish(this.USER_CONTROL_TOPIC, JSON.stringify({
|
|
117
|
+
clientId: this.client_id,
|
|
118
|
+
msg: "online"
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* 发送用户下线消息
|
|
123
|
+
*
|
|
124
|
+
* @static
|
|
125
|
+
*/
|
|
126
|
+
static pubExit() {
|
|
127
|
+
this.app_client?.publish(this.USER_CONTROL_TOPIC, JSON.stringify({
|
|
128
|
+
clientId: this.client_id,
|
|
129
|
+
msg: "exit"
|
|
130
|
+
}));
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
export { AppMqttService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./app-mqtt.service.mjs";
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
3
|
+
/* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
|
|
4
|
+
/**
|
|
5
|
+
* 定义 Block 块
|
|
6
|
+
* @param {String} $block - Block 块名称
|
|
7
|
+
* @example
|
|
8
|
+
* @include b('button') {
|
|
9
|
+
* padding: 10px;
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 定义 Element 元素
|
|
14
|
+
* @param {String|List} $element - Element 元素名称,支持单个或多个
|
|
15
|
+
* @example
|
|
16
|
+
* @include b('button') {
|
|
17
|
+
* @include e('text') {
|
|
18
|
+
* color: #000;
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* // 或传入多个元素
|
|
22
|
+
* @include b('button') {
|
|
23
|
+
* @include e(('text', 'icon')) {
|
|
24
|
+
* margin: 5px;
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* 定义 Modifier 修饰符
|
|
30
|
+
* @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
|
|
31
|
+
* @example
|
|
32
|
+
* @include b('button') {
|
|
33
|
+
* @include m('primary') {
|
|
34
|
+
* background: blue;
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* // 或传入多个修饰符
|
|
38
|
+
* @include b('button') {
|
|
39
|
+
* @include m(('primary', 'large')) {
|
|
40
|
+
* background: blue;
|
|
41
|
+
* font-size: 16px;
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* 定义状态选择器
|
|
47
|
+
* @param {String} $state - 状态名称
|
|
48
|
+
* @example
|
|
49
|
+
* @include b('button') {
|
|
50
|
+
* @include when('disabled') {
|
|
51
|
+
* opacity: 0.5;
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* 深色主题样式
|
|
57
|
+
* @param {String} $block - Block 块名称
|
|
58
|
+
* @example
|
|
59
|
+
* @include dark('button') {
|
|
60
|
+
* background: #333;
|
|
61
|
+
* color: #fff;
|
|
62
|
+
* }
|
|
63
|
+
*/
|
|
64
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
65
|
+
.gct-render-card-field--horizontal {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: start;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.gct-render-card-field--vertical {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.gct-render-card-field__placeholder {
|
|
76
|
+
font-style: italic;
|
|
77
|
+
color: var(--gct-color-text-3);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.gct-render-card-field__label--name.is-ellipsis {
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
text-overflow: ellipsis;
|
|
83
|
+
white-space: nowrap;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.gct-render-card-field__label--name {
|
|
87
|
+
max-width: calc(100% - 14px);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.gct-render-card-field__label {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-shrink: 0;
|
|
93
|
+
align-items: center;
|
|
94
|
+
}
|
|
95
|
+
.gct-render-card-field__label > span {
|
|
96
|
+
display: inline-block;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.gct-render-card-field__value {
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-grow: 1;
|
|
102
|
+
align-items: center;
|
|
103
|
+
}
|
|
104
|
+
.gct-render-card-field__value .field-tags-container {
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-wrap: wrap;
|
|
107
|
+
gap: 4px;
|
|
108
|
+
align-items: center;
|
|
109
|
+
}
|
|
110
|
+
.gct-render-card-field__value .field-tag {
|
|
111
|
+
display: inline-block;
|
|
112
|
+
padding: 2px 8px;
|
|
113
|
+
font-size: 12px;
|
|
114
|
+
line-height: 1.5;
|
|
115
|
+
color: var(--gct-color-primary);
|
|
116
|
+
white-space: nowrap;
|
|
117
|
+
background-color: var(--gct-color-primary-light-8);
|
|
118
|
+
border-radius: 4px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.gct-render-card-field__value-tag {
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
padding: 2px var(--gct-padding-4);
|
|
125
|
+
color: var(--ant-primary-color);
|
|
126
|
+
}
|
|
127
|
+
.gct-render-card-field__value-tag.radius {
|
|
128
|
+
color: #fff;
|
|
129
|
+
background-color: var(--ant-primary-color);
|
|
130
|
+
border-radius: 5px;
|
|
131
|
+
}
|
|
132
|
+
.gct-render-card-field__value-tag.linear_radius {
|
|
133
|
+
border: 1px solid var(--ant-primary-color);
|
|
134
|
+
border-radius: 5px;
|
|
135
|
+
}
|
|
136
|
+
.gct-render-card-field__value-tag.big_radius {
|
|
137
|
+
color: #fff;
|
|
138
|
+
background-color: var(--ant-primary-color);
|
|
139
|
+
border-radius: 10px;
|
|
140
|
+
}
|
|
141
|
+
.gct-render-card-field__value-tag.linear_big_radius {
|
|
142
|
+
border: 1px solid var(--ant-primary-color);
|
|
143
|
+
border-radius: 10px;
|
|
144
|
+
}
|
|
145
|
+
.gct-render-card-field__value-tag.dashed_radius {
|
|
146
|
+
border: 1px dashed var(--ant-primary-color);
|
|
147
|
+
border-radius: 5px;
|
|
148
|
+
}
|
|
149
|
+
.gct-render-card-field__value-tag.status {
|
|
150
|
+
color: #fff;
|
|
151
|
+
background-color: var(--ant-primary-color);
|
|
152
|
+
border-radius: 4px;
|
|
153
|
+
border-top-left-radius: 15px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.gct-render-card-field {
|
|
157
|
+
height: 100%;
|
|
158
|
+
margin-bottom: var(--gct-spacing-3);
|
|
159
|
+
overflow: hidden;
|
|
160
|
+
color: var(--gct-color-text-4);
|
|
161
|
+
}
|
|
162
|
+
.gct-render-card-field.render-card-field--vertical .render-card-field__label {
|
|
163
|
+
margin-bottom: var(--gct-spacing-2);
|
|
164
|
+
}
|
|
165
|
+
.gct-render-card-field.render-card-field--vertical .render-card-field__value {
|
|
166
|
+
word-break: break-all;
|
|
167
|
+
}
|
|
168
|
+
.gct-render-card-field.render-card-field--horizontal .render-card-field__label {
|
|
169
|
+
min-width: 80px;
|
|
170
|
+
margin-right: var(--gct-spacing-3);
|
|
171
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IDesignNode } from '@gct-paas/schema';
|
|
3
|
+
export declare const RenderCardField: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
c: {
|
|
5
|
+
type: ObjectConstructor;
|
|
6
|
+
};
|
|
7
|
+
model: {
|
|
8
|
+
type: PropType<IDesignNode>;
|
|
9
|
+
default: () => {};
|
|
10
|
+
};
|
|
11
|
+
context: {
|
|
12
|
+
type: ObjectConstructor;
|
|
13
|
+
default: () => {};
|
|
14
|
+
};
|
|
15
|
+
preview: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
pageModel: {
|
|
20
|
+
type: PropType<IDesignNode>;
|
|
21
|
+
default: () => {};
|
|
22
|
+
};
|
|
23
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
24
|
+
c: {
|
|
25
|
+
type: ObjectConstructor;
|
|
26
|
+
};
|
|
27
|
+
model: {
|
|
28
|
+
type: PropType<IDesignNode>;
|
|
29
|
+
default: () => {};
|
|
30
|
+
};
|
|
31
|
+
context: {
|
|
32
|
+
type: ObjectConstructor;
|
|
33
|
+
default: () => {};
|
|
34
|
+
};
|
|
35
|
+
preview: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
pageModel: {
|
|
40
|
+
type: PropType<IDesignNode>;
|
|
41
|
+
default: () => {};
|
|
42
|
+
};
|
|
43
|
+
}>> & Readonly<{}>, {
|
|
44
|
+
model: IDesignNode<import('@gct-paas/schema').IDesignNodeData>;
|
|
45
|
+
context: Record<string, any>;
|
|
46
|
+
preview: boolean;
|
|
47
|
+
pageModel: IDesignNode<import('@gct-paas/schema').IDesignNodeData>;
|
|
48
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|