@ibiz-template/vue3-util 0.7.38-alpha.33 → 0.7.38-alpha.57
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/index.system.min.js +1 -1
- package/es/common/badge/badge.d.ts +9 -0
- package/es/common/badge/badge.d.ts.map +1 -1
- package/es/common/badge/badge.mjs +5 -1
- package/es/common/code-list/code-list.d.ts +1 -1
- package/es/common/code-list/code-list.d.ts.map +1 -1
- package/es/common/code-list/code-list.mjs +1 -1
- package/es/common/control-base/control-base.css +1 -1
- package/es/common/control-base/control-base.d.ts.map +1 -1
- package/es/common/control-base/control-base.mjs +65 -2
- package/es/common/custom-render/custom-render.css +1 -0
- package/es/common/custom-render/custom-render.d.ts +18 -0
- package/es/common/custom-render/custom-render.d.ts.map +1 -0
- package/es/common/custom-render/custom-render.mjs +85 -0
- package/es/common/icon/icon.d.ts.map +1 -1
- package/es/common/icon/icon.mjs +5 -0
- package/es/common/index.d.ts +1 -0
- package/es/common/index.d.ts.map +1 -1
- package/es/common/index.mjs +1 -0
- package/es/common/view-shell/view-shell.d.ts.map +1 -1
- package/es/common/view-shell/view-shell.mjs +63 -62
- package/es/index.mjs +4 -1
- package/es/locale/en/index.d.ts +2 -0
- package/es/locale/en/index.d.ts.map +1 -1
- package/es/locale/en/index.mjs +3 -1
- package/es/locale/zh-CN/index.d.ts +2 -0
- package/es/locale/zh-CN/index.d.ts.map +1 -1
- package/es/locale/zh-CN/index.mjs +3 -1
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.d.ts +126 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.d.ts.map +1 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.mjs +193 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.css +1 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.d.ts +27 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.d.ts.map +1 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.mjs +68 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.provider.d.ts +15 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.provider.d.ts.map +1 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.provider.mjs +15 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.state.d.ts +54 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.state.d.ts.map +1 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.state.mjs +7 -0
- package/es/panel-component/auth-wxmp-qrcode/index.d.ts +24 -0
- package/es/panel-component/auth-wxmp-qrcode/index.d.ts.map +1 -0
- package/es/panel-component/auth-wxmp-qrcode/index.mjs +19 -0
- package/es/panel-component/index.d.ts +1 -0
- package/es/panel-component/index.d.ts.map +1 -1
- package/es/panel-component/index.mjs +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts +9 -0
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.controller.mjs +15 -2
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.d.ts +8 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.d.ts.map +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.mjs +14 -2
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.mjs +4 -2
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts +8 -0
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/single-data-container/single-data-container.controller.mjs +14 -2
- package/es/props/editor/common.d.ts +2 -2
- package/es/props/editor/common.d.ts.map +1 -1
- package/es/props/editor/common.mjs +2 -2
- package/es/use/index.mjs +1 -0
- package/es/use/view/index.d.ts +1 -0
- package/es/use/view/index.d.ts.map +1 -1
- package/es/use/view/index.mjs +1 -0
- package/es/use/view/use-view-operation/use-view-operation.d.ts +11 -0
- package/es/use/view/use-view-operation/use-view-operation.d.ts.map +1 -0
- package/es/use/view/use-view-operation/use-view-operation.mjs +27 -0
- package/es/util/index.mjs +1 -1
- package/es/util/render/render.d.ts +10 -0
- package/es/util/render/render.d.ts.map +1 -1
- package/es/util/render/render.mjs +8 -1
- package/es/util/route/route.d.ts.map +1 -1
- package/es/util/route/route.mjs +10 -4
- package/es/view/common/view.d.ts.map +1 -1
- package/es/view/common/view.mjs +2 -0
- package/lib/common/badge/badge.cjs +5 -1
- package/lib/common/code-list/code-list.cjs +1 -1
- package/lib/common/control-base/control-base.cjs +64 -1
- package/lib/common/control-base/control-base.css +1 -1
- package/lib/common/custom-render/custom-render.cjs +87 -0
- package/lib/common/custom-render/custom-render.css +1 -0
- package/lib/common/icon/icon.cjs +5 -0
- package/lib/common/index.cjs +2 -0
- package/lib/common/view-shell/view-shell.cjs +63 -62
- package/lib/index.cjs +30 -23
- package/lib/locale/en/index.cjs +3 -1
- package/lib/locale/zh-CN/index.cjs +3 -1
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.cjs +70 -0
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.cjs +195 -0
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.css +1 -0
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.provider.cjs +17 -0
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.state.cjs +9 -0
- package/lib/panel-component/auth-wxmp-qrcode/index.cjs +24 -0
- package/lib/panel-component/index.cjs +2 -0
- package/lib/panel-component/multi-data-container/multi-data-container.controller.cjs +14 -1
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.controller.cjs +13 -1
- package/lib/panel-component/nav-pos/nav-pos.controller.cjs +4 -2
- package/lib/panel-component/single-data-container/single-data-container.controller.cjs +13 -1
- package/lib/props/editor/common.cjs +2 -2
- package/lib/use/index.cjs +2 -0
- package/lib/use/view/index.cjs +2 -0
- package/lib/use/view/use-view-operation/use-view-operation.cjs +29 -0
- package/lib/util/index.cjs +1 -0
- package/lib/util/render/render.cjs +8 -0
- package/lib/util/route/route.cjs +10 -4
- package/lib/view/common/view.cjs +2 -0
- package/package.json +5 -5
|
@@ -96,77 +96,78 @@ const IBizViewShell = /* @__PURE__ */ vue.defineComponent({
|
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
const init = async () => {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
hasAuthority.value = await checkViewAuthority(viewModel);
|
|
104
|
-
if (!hasAuthority.value) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
if (viewModel.dynaSysMode === 1) {
|
|
108
|
-
const appDataEntityId = viewModel.appDataEntityId;
|
|
109
|
-
if (!appDataEntityId) {
|
|
110
|
-
throw new core.RuntimeError(ibiz.i18n.t("vue3Util.common.noSupportLoadingDynamic", {
|
|
111
|
-
codeName: viewModel.codeName
|
|
112
|
-
}));
|
|
99
|
+
try {
|
|
100
|
+
await initViewModel();
|
|
101
|
+
if (!viewModel) {
|
|
102
|
+
throw new core.RuntimeError(ibiz.i18n.t("vue3Util.common.noFoundViewModel"));
|
|
113
103
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
});
|
|
118
|
-
if (params.value.srfdatatype) {
|
|
119
|
-
loadModelParams.srfdatatype = params.value.srfdatatype;
|
|
104
|
+
hasAuthority.value = await checkViewAuthority(viewModel);
|
|
105
|
+
if (!hasAuthority.value) {
|
|
106
|
+
return;
|
|
120
107
|
}
|
|
121
|
-
if (
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
108
|
+
if (viewModel.dynaSysMode === 1) {
|
|
109
|
+
const appDataEntityId = viewModel.appDataEntityId;
|
|
110
|
+
if (!appDataEntityId) {
|
|
111
|
+
throw new core.RuntimeError(ibiz.i18n.t("vue3Util.common.noSupportLoadingDynamic", {
|
|
112
|
+
codeName: viewModel.codeName
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
115
|
+
const loadModelParams = await runtime.calcDynaSysParams(appDataEntityId, context.value, {
|
|
116
|
+
viewParams: params.value,
|
|
117
|
+
appId: viewModel.appId
|
|
118
|
+
});
|
|
119
|
+
if (params.value.srfdatatype) {
|
|
120
|
+
loadModelParams.srfdatatype = params.value.srfdatatype;
|
|
121
|
+
}
|
|
122
|
+
if (params.value.srfwftag) {
|
|
123
|
+
loadModelParams.srfwftag = params.value.srfwftag;
|
|
124
|
+
} else if (appDataEntityId && viewModel.enableWF) {
|
|
125
|
+
if (loadModelParams.srfkey) {
|
|
126
|
+
const noSrfSessionId = ramda.isNil(context.value.srfsessionid) || ramda.isEmpty(context.value.srfsessionid);
|
|
127
|
+
const id = qxUtil.createUUID();
|
|
128
|
+
if (noSrfSessionId) {
|
|
129
|
+
const domain = ibiz.uiDomainManager.create(id);
|
|
130
|
+
context.value.srfsessionid = domain.id;
|
|
142
131
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
132
|
+
const app = ibiz.hub.getApp(viewModel.appId);
|
|
133
|
+
const service = await app.deService.getService(context.value, appDataEntityId);
|
|
134
|
+
const res = await service.get(context.value, params.value || {});
|
|
135
|
+
if (res.ok && res.data) {
|
|
136
|
+
const {
|
|
137
|
+
srfwftag,
|
|
138
|
+
processdefinitionkey,
|
|
139
|
+
taskdefinitionkey
|
|
140
|
+
} = res.data;
|
|
141
|
+
if (srfwftag) {
|
|
142
|
+
loadModelParams.srfwftag = srfwftag;
|
|
146
143
|
}
|
|
147
|
-
if (
|
|
148
|
-
params.value.
|
|
144
|
+
if (["DEWFDYNAEDITVIEW3", "DEWFDYNAEDITVIEW"].includes(viewModel.viewType)) {
|
|
145
|
+
if (ramda.isNil(params.value.processDefinitionKey)) {
|
|
146
|
+
params.value.processDefinitionKey = processdefinitionkey;
|
|
147
|
+
}
|
|
148
|
+
if (ramda.isNil(params.value.taskDefinitionKey)) {
|
|
149
|
+
params.value.taskDefinitionKey = taskdefinitionkey;
|
|
150
|
+
}
|
|
149
151
|
}
|
|
150
152
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
if (noSrfSessionId) {
|
|
154
|
+
ibiz.uiDomainManager.destroy(id);
|
|
155
|
+
context.value.srfsessionid = "";
|
|
156
|
+
}
|
|
154
157
|
}
|
|
155
158
|
}
|
|
159
|
+
const curDynaViewCacheKey = getDynaViewCacheKey(loadModelParams);
|
|
160
|
+
if (curDynaViewCacheKey === dynaViewCacheKey) {
|
|
161
|
+
setTimeout(() => {
|
|
162
|
+
isComplete.value = true;
|
|
163
|
+
});
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
viewModelData.value = await ibiz.hub.loadAppView(viewModel.appId, viewModel.id, loadModelParams);
|
|
167
|
+
dynaViewCacheKey = getDynaViewCacheKey(loadModelParams);
|
|
168
|
+
} else {
|
|
169
|
+
viewModelData.value = viewModel;
|
|
156
170
|
}
|
|
157
|
-
const curDynaViewCacheKey = getDynaViewCacheKey(loadModelParams);
|
|
158
|
-
if (curDynaViewCacheKey === dynaViewCacheKey) {
|
|
159
|
-
setTimeout(() => {
|
|
160
|
-
isComplete.value = true;
|
|
161
|
-
});
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
viewModelData.value = await ibiz.hub.loadAppView(viewModel.appId, viewModel.id, loadModelParams);
|
|
165
|
-
dynaViewCacheKey = getDynaViewCacheKey(loadModelParams);
|
|
166
|
-
} else {
|
|
167
|
-
viewModelData.value = viewModel;
|
|
168
|
-
}
|
|
169
|
-
try {
|
|
170
171
|
provider.value = await runtime.getViewProvider(viewModel);
|
|
171
172
|
} catch (error) {
|
|
172
173
|
ibiz.log.error(error);
|
package/lib/index.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var viewShell = require('./common/view-shell/view-shell.cjs');
|
|
|
20
20
|
var codeList = require('./common/code-list/code-list.cjs');
|
|
21
21
|
var controlLoadingPlaceholder = require('./common/control-loading-placeholder/control-loading-placeholder.cjs');
|
|
22
22
|
var badge = require('./common/badge/badge.cjs');
|
|
23
|
+
var customRender = require('./common/custom-render/custom-render.cjs');
|
|
23
24
|
var panelContainer_state = require('./panel-component/panel-container/panel-container.state.cjs');
|
|
24
25
|
var panelContainer_controller = require('./panel-component/panel-container/panel-container.controller.cjs');
|
|
25
26
|
var index = require('./panel-component/panel-container/index.cjs');
|
|
@@ -61,14 +62,15 @@ var teleportPlaceholder_provider = require('./panel-component/teleport-placehold
|
|
|
61
62
|
var index$e = require('./panel-component/teleport-placeholder/index.cjs');
|
|
62
63
|
var index$f = require('./panel-component/panel-container-tabs/index.cjs');
|
|
63
64
|
var index$g = require('./panel-component/panel-ctrl-view-page-caption/index.cjs');
|
|
65
|
+
var index$h = require('./panel-component/auth-wxmp-qrcode/index.cjs');
|
|
64
66
|
var appRedirectView = require('./view/app-redirect-view/app-redirect-view.cjs');
|
|
65
|
-
var index$
|
|
67
|
+
var index$i = require('./view/common/index.cjs');
|
|
66
68
|
var todoRedirect = require('./view/todo-redirect/todo-redirect.cjs');
|
|
67
|
-
var index$
|
|
68
|
-
var index$
|
|
69
|
-
var index$
|
|
70
|
-
var index$
|
|
71
|
-
var index$
|
|
69
|
+
var index$j = require('./view/portal-view/index.cjs');
|
|
70
|
+
var index$k = require('./view/de-redirect-view/index.cjs');
|
|
71
|
+
var index$l = require('./view/html-view/index.cjs');
|
|
72
|
+
var index$m = require('./control/panel/view-layout-panel/index.cjs');
|
|
73
|
+
var index$n = require('./control/panel/panel/index.cjs');
|
|
72
74
|
var pluginFactory = require('./plugin/plugin-factory/plugin-factory.cjs');
|
|
73
75
|
var clickOutside = require('./use/click-outside/click-outside.cjs');
|
|
74
76
|
var useControlController = require('./use/control/use-control-controller/use-control-controller.cjs');
|
|
@@ -76,11 +78,12 @@ var event = require('./use/event/event.cjs');
|
|
|
76
78
|
var focusBlur = require('./use/focus-blur/focus-blur.cjs');
|
|
77
79
|
var namespace = require('./use/namespace/namespace.cjs');
|
|
78
80
|
var route = require('./use/route/route.cjs');
|
|
79
|
-
var index$
|
|
81
|
+
var index$o = require('./use/util/index.cjs');
|
|
80
82
|
var useViewController = require('./use/view/use-view-controller/use-view-controller.cjs');
|
|
83
|
+
var useViewOperation = require('./use/view/use-view-operation/use-view-operation.cjs');
|
|
81
84
|
var vue = require('./use/vue/vue.cjs');
|
|
82
85
|
var codelistListen = require('./use/codeList-listen/codelist-listen.cjs');
|
|
83
|
-
var index$
|
|
86
|
+
var index$p = require('./use/storage/index.cjs');
|
|
84
87
|
var autofocusBlur = require('./use/autofocus-blur/autofocus-blur.cjs');
|
|
85
88
|
var overlayContainer = require('./util/overlay-container/overlay-container.cjs');
|
|
86
89
|
var overlayPopoverContainer = require('./util/overlay-popover-container/overlay-popover-container.cjs');
|
|
@@ -93,7 +96,7 @@ var render = require('./util/render/render.cjs');
|
|
|
93
96
|
var overlayViewUtil = require('./util/overlay-view-util/overlay-view-util.cjs');
|
|
94
97
|
var appStore = require('./util/store/app-store/app-store.cjs');
|
|
95
98
|
var uiStore = require('./util/store/ui-store/ui-store.cjs');
|
|
96
|
-
var index$
|
|
99
|
+
var index$q = require('./util/store/index.cjs');
|
|
97
100
|
var common = require('./props/common.cjs');
|
|
98
101
|
var textBox = require('./props/editor/text-box.cjs');
|
|
99
102
|
var span = require('./props/editor/span.cjs');
|
|
@@ -120,8 +123,8 @@ var markdown = require('./props/editor/markdown.cjs');
|
|
|
120
123
|
var array = require('./props/editor/array.cjs');
|
|
121
124
|
var cascader = require('./props/editor/cascader.cjs');
|
|
122
125
|
var colorPicker = require('./props/editor/color-picker.cjs');
|
|
123
|
-
var index$
|
|
124
|
-
var index$
|
|
126
|
+
var index$r = require('./locale/en/index.cjs');
|
|
127
|
+
var index$s = require('./locale/zh-CN/index.cjs');
|
|
125
128
|
|
|
126
129
|
"use strict";
|
|
127
130
|
|
|
@@ -134,6 +137,7 @@ exports.IBizViewShell = viewShell.IBizViewShell;
|
|
|
134
137
|
exports.IBizCodeList = codeList.IBizCodeList;
|
|
135
138
|
exports.ControlLoadingPlaceholder = controlLoadingPlaceholder.ControlLoadingPlaceholder;
|
|
136
139
|
exports.IBizBadge = badge.IBizBadge;
|
|
140
|
+
exports.IBizCustomRender = customRender.IBizCustomRender;
|
|
137
141
|
exports.PanelContainerState = panelContainer_state.PanelContainerState;
|
|
138
142
|
exports.PanelContainerController = panelContainer_controller.PanelContainerController;
|
|
139
143
|
exports.IBizPanelContainer = index.IBizPanelContainer;
|
|
@@ -175,14 +179,15 @@ exports.TeleportPlaceholderProvider = teleportPlaceholder_provider.TeleportPlace
|
|
|
175
179
|
exports.IBizTeleportPlaceholder = index$e.IBizTeleportPlaceholder;
|
|
176
180
|
exports.IBizPanelContainerTabs = index$f.IBizPanelContainerTabs;
|
|
177
181
|
exports.IBizPanelCtrlViewPageCaption = index$g.IBizPanelCtrlViewPageCaption;
|
|
182
|
+
exports.IBizAuthWxmpQrcode = index$h.IBizAuthWxmpQrcode;
|
|
178
183
|
exports.AppRedirectView = appRedirectView.AppRedirectView;
|
|
179
|
-
exports.IBizView = index$
|
|
184
|
+
exports.IBizView = index$i.IBizView;
|
|
180
185
|
exports.TodoRedirect = todoRedirect.TodoRedirect;
|
|
181
|
-
exports.IBizPortalView = index$
|
|
182
|
-
exports.IBizDeRedirectView = index$
|
|
183
|
-
exports.IBizHtmlView = index$
|
|
184
|
-
exports.IBizViewLayoutPanelControl = index$
|
|
185
|
-
exports.IBizPanelControl = index$
|
|
186
|
+
exports.IBizPortalView = index$j.IBizPortalView;
|
|
187
|
+
exports.IBizDeRedirectView = index$k.IBizDeRedirectView;
|
|
188
|
+
exports.IBizHtmlView = index$l.IBizHtmlView;
|
|
189
|
+
exports.IBizViewLayoutPanelControl = index$m.IBizViewLayoutPanelControl;
|
|
190
|
+
exports.IBizPanelControl = index$n.IBizPanelControl;
|
|
186
191
|
exports.PluginFactory = pluginFactory.PluginFactory;
|
|
187
192
|
exports.useClickOutside = clickOutside.useClickOutside;
|
|
188
193
|
exports.useControlController = useControlController.useControlController;
|
|
@@ -191,9 +196,10 @@ exports.useFocusAndBlur = focusBlur.useFocusAndBlur;
|
|
|
191
196
|
exports.useNamespace = namespace.useNamespace;
|
|
192
197
|
exports.useRouteKey = route.useRouteKey;
|
|
193
198
|
exports.useRouterQuery = route.useRouterQuery;
|
|
194
|
-
exports.useCtx = index$
|
|
195
|
-
exports.useMobCtx = index$
|
|
199
|
+
exports.useCtx = index$o.useCtx;
|
|
200
|
+
exports.useMobCtx = index$o.useMobCtx;
|
|
196
201
|
exports.useViewController = useViewController.useViewController;
|
|
202
|
+
exports.useViewOperation = useViewOperation.useViewOperation;
|
|
197
203
|
exports.EmptyVNode = vue.EmptyVNode;
|
|
198
204
|
exports.getOrigin = vue.getOrigin;
|
|
199
205
|
exports.isEmptyVNode = vue.isEmptyVNode;
|
|
@@ -203,7 +209,7 @@ exports.useForceTogether = vue.useForceTogether;
|
|
|
203
209
|
exports.useProps = vue.useProps;
|
|
204
210
|
exports.usePropsWatch = vue.usePropsWatch;
|
|
205
211
|
exports.useCodeListListen = codelistListen.useCodeListListen;
|
|
206
|
-
exports.useLocalCacheKey = index$
|
|
212
|
+
exports.useLocalCacheKey = index$p.useLocalCacheKey;
|
|
207
213
|
exports.useAutoFocusBlur = autofocusBlur.useAutoFocusBlur;
|
|
208
214
|
exports.OverlayContainer = overlayContainer.OverlayContainer;
|
|
209
215
|
exports.OverlayPopoverContainer = overlayPopoverContainer.OverlayPopoverContainer;
|
|
@@ -221,6 +227,7 @@ exports.routePath2string = route$1.routePath2string;
|
|
|
221
227
|
exports.RouteListener = routeListener.RouteListener;
|
|
222
228
|
exports.withInstall = install.withInstall;
|
|
223
229
|
exports.prepareControl = prepareControl.prepareControl;
|
|
230
|
+
exports.hasEmptyPanelRenderer = render.hasEmptyPanelRenderer;
|
|
224
231
|
exports.renderString = render.renderString;
|
|
225
232
|
exports.createOverlayView = overlayViewUtil.createOverlayView;
|
|
226
233
|
exports.getDrawerPlacement = overlayViewUtil.getDrawerPlacement;
|
|
@@ -230,7 +237,7 @@ exports.openViewModal = overlayViewUtil.openViewModal;
|
|
|
230
237
|
exports.openViewPopover = overlayViewUtil.openViewPopover;
|
|
231
238
|
exports.useAppStore = appStore.useAppStore;
|
|
232
239
|
exports.useUIStore = uiStore.useUIStore;
|
|
233
|
-
exports.piniaInstance = index$
|
|
240
|
+
exports.piniaInstance = index$q.piniaInstance;
|
|
234
241
|
exports.RequiredProp = common.RequiredProp;
|
|
235
242
|
exports.getGridInputIpProps = textBox.getGridInputIpProps;
|
|
236
243
|
exports.getGridInputNumberProps = textBox.getGridInputNumberProps;
|
|
@@ -288,5 +295,5 @@ exports.getCascaderProps = cascader.getCascaderProps;
|
|
|
288
295
|
exports.getGridCascaderProps = cascader.getGridCascaderProps;
|
|
289
296
|
exports.getColorPickerProps = colorPicker.getColorPickerProps;
|
|
290
297
|
exports.getGridColorPickerProps = colorPicker.getGridColorPickerProps;
|
|
291
|
-
exports.en = index$
|
|
292
|
-
exports.zhCn = index$
|
|
298
|
+
exports.en = index$r.en;
|
|
299
|
+
exports.zhCn = index$s.zhCn;
|
package/lib/locale/en/index.cjs
CHANGED
|
@@ -27,7 +27,9 @@ const en = {
|
|
|
27
27
|
noProvidedSlot: "No {id} slot provided",
|
|
28
28
|
cannotEmpty: "{caption} cannot be empty",
|
|
29
29
|
unadaptedLayout: "Unadapted layout placeholder {layoutPos}",
|
|
30
|
-
placeholderIdentifier: "The placeholder identifier for panel member {id} of view {viewCodeName} is:"
|
|
30
|
+
placeholderIdentifier: "The placeholder identifier for panel member {id} of view {viewCodeName} is:",
|
|
31
|
+
refresh: "Refresh",
|
|
32
|
+
wxQrcodeCaption: "Please use wechat to scan the QR code to log in"
|
|
31
33
|
},
|
|
32
34
|
plugin: {
|
|
33
35
|
failureConfigurationLoad: "Configuration load failure",
|
|
@@ -27,7 +27,9 @@ const zhCn = {
|
|
|
27
27
|
noProvidedSlot: "\u672A\u63D0\u4F9B{id}\u63D2\u69FD",
|
|
28
28
|
cannotEmpty: "{caption} \u4E0D\u80FD\u4E3A\u7A7A",
|
|
29
29
|
unadaptedLayout: "\u672A\u9002\u914D\u7684\u5E03\u5C40\u5360\u4F4D{layoutPos}",
|
|
30
|
-
placeholderIdentifier: "\u89C6\u56FE{viewCodeName}\u7684\u9762\u677F\u6210\u5458{id}\u7684\u5360\u4F4D\u6807\u8BC6\u662F\uFF1A"
|
|
30
|
+
placeholderIdentifier: "\u89C6\u56FE{viewCodeName}\u7684\u9762\u677F\u6210\u5458{id}\u7684\u5360\u4F4D\u6807\u8BC6\u662F\uFF1A",
|
|
31
|
+
refresh: "\u5237\u65B0",
|
|
32
|
+
wxQrcodeCaption: "\u8BF7\u4F7F\u7528\u5FAE\u4FE1\u626B\u63CF\u4E8C\u7EF4\u7801\u767B\u5F55"
|
|
31
33
|
},
|
|
32
34
|
plugin: {
|
|
33
35
|
failureConfigurationLoad: "\u914D\u7F6E\u52A0\u8F7D\u5931\u8D25",
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vueRouter = require('vue-router');
|
|
5
|
+
require('../../use/index.cjs');
|
|
6
|
+
require('./auth-wxmp-qrcode.css');
|
|
7
|
+
var namespace = require('../../use/namespace/namespace.cjs');
|
|
8
|
+
|
|
9
|
+
"use strict";
|
|
10
|
+
const AuthWxmpQrcode = /* @__PURE__ */ vue.defineComponent({
|
|
11
|
+
name: "IBizAuthWxmpQrcode",
|
|
12
|
+
props: {
|
|
13
|
+
modelData: {
|
|
14
|
+
type: Object,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
controller: {
|
|
18
|
+
type: Object,
|
|
19
|
+
required: true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
setup(props) {
|
|
23
|
+
const ns = namespace.useNamespace("auth-wxmp-qrcode");
|
|
24
|
+
const {
|
|
25
|
+
state
|
|
26
|
+
} = props.controller;
|
|
27
|
+
const route = vueRouter.useRoute();
|
|
28
|
+
props.controller.setRouter(route);
|
|
29
|
+
const loadQrcode = async () => {
|
|
30
|
+
await props.controller.loadQrcode();
|
|
31
|
+
};
|
|
32
|
+
vue.watch(() => state.visible, () => {
|
|
33
|
+
var _a;
|
|
34
|
+
if (state.visible && (state.keepAlive && !((_a = state.qrcode) == null ? void 0 : _a.expirein) || !state.keepAlive)) {
|
|
35
|
+
loadQrcode();
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
immediate: true
|
|
39
|
+
});
|
|
40
|
+
vue.onUnmounted(() => {
|
|
41
|
+
props.controller.destroy();
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
ns,
|
|
45
|
+
loadQrcode
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
render() {
|
|
49
|
+
var _a, _b;
|
|
50
|
+
return vue.createVNode("div", {
|
|
51
|
+
"class": this.ns.b()
|
|
52
|
+
}, [vue.createVNode("div", {
|
|
53
|
+
"class": this.ns.e("content")
|
|
54
|
+
}, [this.controller.state.qrcode && vue.createVNode("img", {
|
|
55
|
+
"class": this.ns.e("qrcode"),
|
|
56
|
+
"src": (_a = this.controller.state.qrcode) == null ? void 0 : _a.url
|
|
57
|
+
}, null), !((_b = this.controller.state.qrcode) == null ? void 0 : _b.expirein) && vue.createVNode("div", {
|
|
58
|
+
"class": this.ns.e("mask")
|
|
59
|
+
}, [vue.createVNode("ion-icon", {
|
|
60
|
+
"title": ibiz.i18n.t("vue3Util.panelComponent.refresh"),
|
|
61
|
+
"name": "reload-outline",
|
|
62
|
+
"onClick": this.loadQrcode,
|
|
63
|
+
"class": this.ns.em("mask", "icon")
|
|
64
|
+
}, null)])]), vue.createVNode("div", {
|
|
65
|
+
"class": this.ns.e("caption")
|
|
66
|
+
}, [this.controller.state.tips])]);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
exports.AuthWxmpQrcode = AuthWxmpQrcode;
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@ibiz-template/core');
|
|
4
|
+
var qxUtil = require('qx-util');
|
|
5
|
+
var runtime = require('@ibiz-template/runtime');
|
|
6
|
+
var authWxmpQrcode_state = require('./auth-wxmp-qrcode.state.cjs');
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
class AuthWxmpQrcodeController extends runtime.PanelItemController {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
/**
|
|
13
|
+
* 轮询时间(秒)
|
|
14
|
+
* - 默认2秒
|
|
15
|
+
* @private
|
|
16
|
+
* @type {number}
|
|
17
|
+
* @memberof AuthWxmpQrcodeController
|
|
18
|
+
*/
|
|
19
|
+
this.pollingTime = 2;
|
|
20
|
+
/**
|
|
21
|
+
* 自定义补充参数
|
|
22
|
+
*
|
|
23
|
+
* @type {IData}
|
|
24
|
+
* @memberof AuthWxmpQrcodeController
|
|
25
|
+
*/
|
|
26
|
+
this.rawItemParams = {};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 创建状态对象
|
|
30
|
+
*
|
|
31
|
+
* @protected
|
|
32
|
+
* @return {*} {AuthWxmpQrcodeState}
|
|
33
|
+
* @memberof AuthWxmpQrcodeController
|
|
34
|
+
*/
|
|
35
|
+
createState() {
|
|
36
|
+
var _a;
|
|
37
|
+
return new authWxmpQrcode_state.AuthWxmpQrcodeState((_a = this.parent) == null ? void 0 : _a.state);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 初始化
|
|
41
|
+
*
|
|
42
|
+
* @protected
|
|
43
|
+
* @return {*} {Promise<void>}
|
|
44
|
+
* @memberof AuthWxmpQrcodeController
|
|
45
|
+
*/
|
|
46
|
+
async onInit() {
|
|
47
|
+
await super.onInit();
|
|
48
|
+
this.handleRawItemParams();
|
|
49
|
+
this.initParams();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* 设置 Route 对象
|
|
53
|
+
*
|
|
54
|
+
* @param {RouteLocationNormalizedLoaded} route
|
|
55
|
+
* @memberof AuthWxmpQrcodeController
|
|
56
|
+
*/
|
|
57
|
+
setRouter(route) {
|
|
58
|
+
this.route = route;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* 处理自定义补充参数
|
|
62
|
+
*
|
|
63
|
+
* @protected
|
|
64
|
+
* @memberof AuthWxmpQrcodeController
|
|
65
|
+
*/
|
|
66
|
+
handleRawItemParams() {
|
|
67
|
+
var _a;
|
|
68
|
+
let params = {};
|
|
69
|
+
const rawItemParams = (_a = this.model.rawItem) == null ? void 0 : _a.rawItemParams;
|
|
70
|
+
if (qxUtil.notNilEmpty(rawItemParams)) {
|
|
71
|
+
params = rawItemParams.reduce((param, item) => {
|
|
72
|
+
param[item.key.toLowerCase()] = item.value;
|
|
73
|
+
return param;
|
|
74
|
+
}, {});
|
|
75
|
+
}
|
|
76
|
+
Object.assign(this.rawItemParams, params);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 初始化参数
|
|
80
|
+
*
|
|
81
|
+
* @protected
|
|
82
|
+
* @memberof AuthWxmpQrcodeController
|
|
83
|
+
*/
|
|
84
|
+
initParams() {
|
|
85
|
+
const isNumeric = (str) => {
|
|
86
|
+
return !!str && isFinite(Number(str));
|
|
87
|
+
};
|
|
88
|
+
this.pollingTime = isNumeric(this.rawItemParams.pollingtime) ? Number(this.rawItemParams.pollingtime) : 2;
|
|
89
|
+
this.state.tips = this.model.caption || ibiz.i18n.t("vue3Util.panelComponent.wxQrcodeCaption");
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* 加载二维码
|
|
93
|
+
*
|
|
94
|
+
* @protected
|
|
95
|
+
* @return {*} {Promise<void>}
|
|
96
|
+
* @memberof AuthWxmpQrcodeController
|
|
97
|
+
*/
|
|
98
|
+
async loadQrcode() {
|
|
99
|
+
try {
|
|
100
|
+
const res = await ibiz.net.get(
|
|
101
|
+
"/uaa/open/wxmp/createqrcode",
|
|
102
|
+
{},
|
|
103
|
+
{ srfdcsystem: ibiz.env.dcSystem }
|
|
104
|
+
);
|
|
105
|
+
if (res.ok && res.data) {
|
|
106
|
+
this.state.qrcode = res.data;
|
|
107
|
+
this.setTimer();
|
|
108
|
+
}
|
|
109
|
+
} catch (error) {
|
|
110
|
+
ibiz.log.error(error.message);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* 设置定时器
|
|
115
|
+
*
|
|
116
|
+
* @protected
|
|
117
|
+
* @memberof AuthWxmpQrcodeController
|
|
118
|
+
*/
|
|
119
|
+
setTimer() {
|
|
120
|
+
this.expirationTimer = setInterval(() => {
|
|
121
|
+
if (this.state.qrcode && this.state.qrcode.expirein > 0) {
|
|
122
|
+
this.state.qrcode.expirein -= 1;
|
|
123
|
+
} else {
|
|
124
|
+
clearInterval(this.expirationTimer);
|
|
125
|
+
}
|
|
126
|
+
}, 1e3);
|
|
127
|
+
this.pollingTimer = setInterval(async () => {
|
|
128
|
+
await this.pollingLogin();
|
|
129
|
+
}, this.pollingTime * 1e3);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* 轮询登录
|
|
133
|
+
*
|
|
134
|
+
* @protected
|
|
135
|
+
* @return {*} {Promise<void>}
|
|
136
|
+
* @memberof AuthWxmpQrcodeController
|
|
137
|
+
*/
|
|
138
|
+
async pollingLogin() {
|
|
139
|
+
try {
|
|
140
|
+
if (this.state.qrcode && this.state.qrcode.expirein > 0) {
|
|
141
|
+
if (this.state.visible) {
|
|
142
|
+
const res = await ibiz.net.get(
|
|
143
|
+
"/uaa/open/wxmp/qrcode/".concat(this.state.qrcode.ticket),
|
|
144
|
+
{},
|
|
145
|
+
{ srfdcsystem: ibiz.env.dcSystem }
|
|
146
|
+
);
|
|
147
|
+
const { data, ok } = res;
|
|
148
|
+
if (ok && (data == null ? void 0 : data.token)) {
|
|
149
|
+
clearInterval(this.pollingTimer);
|
|
150
|
+
const cacheDay = 30;
|
|
151
|
+
core.setAppCookie(core.CoreConst.TOKEN_REMEMBER, "1", cacheDay);
|
|
152
|
+
core.setAppCookie(core.CoreConst.TOKEN, data.token, cacheDay);
|
|
153
|
+
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (data.expirein || 7199) * 1e3;
|
|
154
|
+
core.setAppCookie(core.CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), cacheDay);
|
|
155
|
+
if (data.refresh_token) {
|
|
156
|
+
core.setAppCookie(
|
|
157
|
+
core.CoreConst.REFRESH_TOKEN,
|
|
158
|
+
data.refresh_token,
|
|
159
|
+
cacheDay
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
core.clearAppCookie(core.CoreConst.IS_ANONYMOUS);
|
|
163
|
+
const ru = this.route.query.ru || "/";
|
|
164
|
+
window.location.hash = ru || "/";
|
|
165
|
+
window.history.pushState({}, "");
|
|
166
|
+
window.location.reload();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
} else {
|
|
170
|
+
clearInterval(this.pollingTimer);
|
|
171
|
+
}
|
|
172
|
+
} catch (error) {
|
|
173
|
+
ibiz.log.error(error.message);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* 销毁方法
|
|
178
|
+
*
|
|
179
|
+
* @return {*} {Promise<void>}
|
|
180
|
+
* @memberof AuthWxmpQrcodeController
|
|
181
|
+
*/
|
|
182
|
+
async destroy() {
|
|
183
|
+
await super.destroy();
|
|
184
|
+
if (this.pollingTimer) {
|
|
185
|
+
clearInterval(this.pollingTimer);
|
|
186
|
+
this.pollingTimer = void 0;
|
|
187
|
+
}
|
|
188
|
+
if (this.expirationTimer) {
|
|
189
|
+
clearInterval(this.expirationTimer);
|
|
190
|
+
this.expirationTimer = void 0;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
exports.AuthWxmpQrcodeController = AuthWxmpQrcodeController;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-auth-wxmp-qrcode{width:100%;height:100%}.ibiz-auth-wxmp-qrcode__content{position:relative;width:100%;height:100%}.ibiz-auth-wxmp-qrcode__qrcode{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.ibiz-auth-wxmp-qrcode__caption{font-size:var(--ibiz-font-size-small);text-align:center}.ibiz-auth-wxmp-qrcode__mask{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:var(--ibiz-color-primary);background-color:rgba(255,255,255,.9)}.ibiz-auth-wxmp-qrcode__mask--icon{font-size:var(--ibiz-font-size-header-1);cursor:pointer}.ibiz-auth-wxmp-qrcode__mask--icon:hover{color:var(--ibiz-color-primary-hover)}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var authWxmpQrcode_controller = require('./auth-wxmp-qrcode.controller.cjs');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
class AuthWxmpQrcodeProvider {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.component = "IBizAuthWxmpQrcode";
|
|
9
|
+
}
|
|
10
|
+
async createController(panelItem, panel, parent) {
|
|
11
|
+
const c = new authWxmpQrcode_controller.AuthWxmpQrcodeController(panelItem, panel, parent);
|
|
12
|
+
await c.init();
|
|
13
|
+
return c;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
exports.AuthWxmpQrcodeProvider = AuthWxmpQrcodeProvider;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var runtime = require('@ibiz-template/runtime');
|
|
6
|
+
require('../../util/index.cjs');
|
|
7
|
+
var authWxmpQrcode = require('./auth-wxmp-qrcode.cjs');
|
|
8
|
+
var authWxmpQrcode_provider = require('./auth-wxmp-qrcode.provider.cjs');
|
|
9
|
+
var install = require('../../util/install.cjs');
|
|
10
|
+
|
|
11
|
+
"use strict";
|
|
12
|
+
const IBizAuthWxmpQrcode = install.withInstall(
|
|
13
|
+
authWxmpQrcode.AuthWxmpQrcode,
|
|
14
|
+
function(v) {
|
|
15
|
+
v.component(authWxmpQrcode.AuthWxmpQrcode.name, authWxmpQrcode.AuthWxmpQrcode);
|
|
16
|
+
runtime.registerPanelItemProvider(
|
|
17
|
+
"RAWITEM_AUTH_WXMP_QRCODE",
|
|
18
|
+
() => new authWxmpQrcode_provider.AuthWxmpQrcodeProvider()
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
exports.IBizAuthWxmpQrcode = IBizAuthWxmpQrcode;
|
|
24
|
+
exports.default = IBizAuthWxmpQrcode;
|
|
@@ -17,6 +17,7 @@ var index$d = require('./panel-item-render/index.cjs');
|
|
|
17
17
|
var index$e = require('./teleport-placeholder/index.cjs');
|
|
18
18
|
var index$f = require('./panel-container-tabs/index.cjs');
|
|
19
19
|
var index$g = require('./panel-ctrl-view-page-caption/index.cjs');
|
|
20
|
+
var index$h = require('./auth-wxmp-qrcode/index.cjs');
|
|
20
21
|
var panelContainer_state = require('./panel-container/panel-container.state.cjs');
|
|
21
22
|
var panelContainer_controller = require('./panel-container/panel-container.controller.cjs');
|
|
22
23
|
var panelCtrlPos_controller = require('./panel-ctrl-pos/panel-ctrl-pos.controller.cjs');
|
|
@@ -61,6 +62,7 @@ exports.IBizPanelItemRender = index$d.IBizPanelItemRender;
|
|
|
61
62
|
exports.IBizTeleportPlaceholder = index$e.IBizTeleportPlaceholder;
|
|
62
63
|
exports.IBizPanelContainerTabs = index$f.IBizPanelContainerTabs;
|
|
63
64
|
exports.IBizPanelCtrlViewPageCaption = index$g.IBizPanelCtrlViewPageCaption;
|
|
65
|
+
exports.IBizAuthWxmpQrcode = index$h.IBizAuthWxmpQrcode;
|
|
64
66
|
exports.PanelContainerState = panelContainer_state.PanelContainerState;
|
|
65
67
|
exports.PanelContainerController = panelContainer_controller.PanelContainerController;
|
|
66
68
|
exports.PanelCtrlPosController = panelCtrlPos_controller.PanelCtrlPosController;
|
|
@@ -44,7 +44,20 @@ class MultiDataContainerController extends runtime.PanelItemController {
|
|
|
44
44
|
async onInit() {
|
|
45
45
|
await super.onInit();
|
|
46
46
|
await this.initPanelItemProviders();
|
|
47
|
-
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 面板状态变更通知
|
|
50
|
+
*
|
|
51
|
+
* @author tony001
|
|
52
|
+
* @date 2024-12-11 11:12:24
|
|
53
|
+
* @param {PanelNotifyState} _state
|
|
54
|
+
* @return {*} {Promise<void>}
|
|
55
|
+
*/
|
|
56
|
+
async panelStateNotify(_state) {
|
|
57
|
+
super.panelStateNotify(_state);
|
|
58
|
+
if (_state === runtime.PanelNotifyState.LOAD) {
|
|
59
|
+
this.initContainerData();
|
|
60
|
+
}
|
|
48
61
|
}
|
|
49
62
|
/**
|
|
50
63
|
* 初始化面板成员控制器
|