@ibiz-template/vue3-components 0.7.41-alpha.94 → 0.7.41-alpha.96
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/ibiz-markdown-editor-CQRvKzXG.js +1 -0
- package/dist/index-CSWh3Soj.js +339 -0
- package/dist/index-ChKlnzfZ.js +1 -0
- package/dist/index-DiSn0c6_.js +1 -0
- package/dist/{index.es-DFx4k2jd.js → index.es-COHR8lWq.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-DGTnSGqn.js +1 -0
- package/dist/{xlsx-util-DwFMdVBD.js → xlsx-util-CzrO72Os.js} +1 -1
- package/es/common/emoji-select/components/categories/categories.mjs +1 -1
- package/es/common/rawitem/rawitem.mjs +1 -0
- package/es/control/dashboard/dashboard-design/dashboard-design.mjs +9 -2
- package/es/control/data-view/data-view.mjs +98 -2
- package/es/control/kanban/swimlane-kanban/swimlane-kanban.mjs +1 -1
- package/es/control/list/list.css +1 -1
- package/es/control/list/list.mjs +77 -2
- package/es/editor/ai-chat/embed-ai-chat/embed-ai-chat.css +1 -0
- package/es/editor/ai-chat/embed-ai-chat/embed-ai-chat.mjs +98 -0
- package/es/editor/ai-chat/embed-ai-chat-editor.controller.mjs +70 -0
- package/es/editor/ai-chat/embed-ai-chat-editor.provider.mjs +22 -0
- package/es/editor/ai-chat/index.mjs +5 -0
- package/es/editor/code/code-editor.controller.mjs +3 -3
- package/es/editor/code/monaco-editor/monaco-editor.mjs +1 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +1 -1
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +1 -1
- package/es/editor/html/wang-editor/wang-editor.mjs +5 -1
- package/es/editor/index.mjs +8 -0
- package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +7 -1
- package/es/editor/text-box/input/input.mjs +5 -1
- package/es/index.mjs +1 -0
- package/es/locale/en/index.mjs +2 -1
- package/es/locale/zh-CN/index.mjs +2 -1
- package/es/panel-component/user-message/user-message.mjs +2 -3
- package/es/util/ai-chat-util/ai-chat-util.mjs +34 -1
- package/es/util/app-util/app-util.mjs +21 -25
- package/es/view/login-view/login-view.mjs +7 -11
- package/es/view-engine/login-view.engine.mjs +12 -21
- package/es/view-engine/pickup-tree-view.engine.mjs +17 -1
- package/es/web-app/guard/auth-guard/auth-guard.mjs +5 -9
- package/es/web-app/index.mjs +2 -0
- package/es/web-app/main.mjs +3 -1
- package/es/web-app/util/app-func-block-provider/app-func-block-provider.mjs +98 -0
- package/es/web-app/util/index.mjs +1 -0
- package/lib/common/emoji-select/components/categories/categories.cjs +1 -1
- package/lib/common/rawitem/rawitem.cjs +1 -0
- package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +9 -2
- package/lib/control/data-view/data-view.cjs +97 -1
- package/lib/control/kanban/swimlane-kanban/swimlane-kanban.cjs +1 -1
- package/lib/control/list/list.cjs +77 -2
- package/lib/control/list/list.css +1 -1
- package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.cjs +100 -0
- package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.css +1 -0
- package/lib/editor/ai-chat/embed-ai-chat-editor.controller.cjs +72 -0
- package/lib/editor/ai-chat/embed-ai-chat-editor.provider.cjs +24 -0
- package/lib/editor/ai-chat/index.cjs +11 -0
- package/lib/editor/code/code-editor.controller.cjs +3 -3
- package/lib/editor/code/monaco-editor/monaco-editor.cjs +1 -1
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +1 -1
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +1 -1
- package/lib/editor/html/wang-editor/wang-editor.cjs +5 -1
- package/lib/editor/index.cjs +8 -0
- package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +7 -1
- package/lib/editor/text-box/input/input.cjs +5 -1
- package/lib/index.cjs +2 -0
- package/lib/locale/en/index.cjs +2 -1
- package/lib/locale/zh-CN/index.cjs +2 -1
- package/lib/panel-component/user-message/user-message.cjs +2 -3
- package/lib/util/ai-chat-util/ai-chat-util.cjs +33 -0
- package/lib/util/app-util/app-util.cjs +20 -24
- package/lib/view/login-view/login-view.cjs +7 -11
- package/lib/view-engine/login-view.engine.cjs +11 -20
- package/lib/view-engine/pickup-tree-view.engine.cjs +17 -1
- package/lib/web-app/guard/auth-guard/auth-guard.cjs +5 -9
- package/lib/web-app/index.cjs +3 -0
- package/lib/web-app/main.cjs +2 -0
- package/lib/web-app/util/app-func-block-provider/app-func-block-provider.cjs +100 -0
- package/lib/web-app/util/index.cjs +2 -0
- package/package.json +6 -6
- package/dist/ibiz-markdown-editor-8I67TTyP.js +0 -1
- package/dist/index-CVIuun-0.js +0 -339
- package/dist/index-DWSyHHzh.js +0 -1
- package/dist/index-X0zcJbo7.js +0 -1
- package/dist/wang-editor-DYEAyKoh.js +0 -1
package/es/index.mjs
CHANGED
|
@@ -191,5 +191,6 @@ export { ArrowLeftBold, ArrowRightBold } from './util/icon/icon.mjs';
|
|
|
191
191
|
export { AuthGuard } from './web-app/guard/auth-guard/auth-guard.mjs';
|
|
192
192
|
export { runApp } from './web-app/main.mjs';
|
|
193
193
|
export { AppRouter } from './web-app/router/index.mjs';
|
|
194
|
+
export { AppFuncBlockProvider } from './web-app/util/app-func-block-provider/app-func-block-provider.mjs';
|
|
194
195
|
|
|
195
196
|
"use strict";
|
package/es/locale/en/index.mjs
CHANGED
|
@@ -35,7 +35,8 @@ var index = {
|
|
|
35
35
|
fullscreen: "Fullscreen",
|
|
36
36
|
cancelFullscreen: "Cancel fullscreen",
|
|
37
37
|
tips: "tips",
|
|
38
|
-
changeLanguage: "Switching languages requires refreshing the page to confirm the switch"
|
|
38
|
+
changeLanguage: "Switching languages requires refreshing the page to confirm the switch",
|
|
39
|
+
piece: ""
|
|
39
40
|
},
|
|
40
41
|
// 视图
|
|
41
42
|
view: {
|
|
@@ -35,7 +35,8 @@ var index = {
|
|
|
35
35
|
fullscreen: "\u5168\u5C4F",
|
|
36
36
|
cancelFullscreen: "\u53D6\u6D88\u5168\u5C4F",
|
|
37
37
|
tips: "\u63D0\u793A",
|
|
38
|
-
changeLanguage: "\u5207\u6362\u8BED\u8A00\u9700\u8981\u5237\u65B0\u9875\u9762\uFF0C\u786E\u8BA4\u5207\u6362"
|
|
38
|
+
changeLanguage: "\u5207\u6362\u8BED\u8A00\u9700\u8981\u5237\u65B0\u9875\u9762\uFF0C\u786E\u8BA4\u5207\u6362",
|
|
39
|
+
piece: "\u4E2A"
|
|
39
40
|
},
|
|
40
41
|
// 视图
|
|
41
42
|
view: {
|
|
@@ -54,9 +54,8 @@ const UserMessage = /* @__PURE__ */ defineComponent({
|
|
|
54
54
|
noticeController.internalMessage.batchMarkRead();
|
|
55
55
|
};
|
|
56
56
|
const verifyAuthentication = async () => {
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
59
|
-
ibiz.appData = res.data;
|
|
57
|
+
const bol = await ibiz.auth.loadAppData(ibiz.appUtil.getAppContext());
|
|
58
|
+
if (bol) {
|
|
60
59
|
updateDevToolConfig();
|
|
61
60
|
}
|
|
62
61
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from 'vue';
|
|
2
2
|
import { createUUID } from 'qx-util';
|
|
3
|
-
import { UIActionUtil, SysUIActionTag, parseViewProtocol, OpenAppViewCommand,
|
|
3
|
+
import { ConfigService, UIActionUtil, SysUIActionTag, parseViewProtocol, OpenAppViewCommand, UtilService, AIUtilService } from '@ibiz-template/runtime';
|
|
4
4
|
import { StringUtil, IBizContext } from '@ibiz-template/core';
|
|
5
5
|
import { isNotNil } from 'ramda';
|
|
6
6
|
import { AIFeedback } from './ai-feedback/ai-feedback.mjs';
|
|
@@ -58,6 +58,39 @@ class AIChatUtil {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
const topicOptions = {};
|
|
61
|
+
topicOptions.captionMode = ibiz.config.common.aiChatTopicCaptionMode;
|
|
62
|
+
if (editorParams.topiccaptionmode) {
|
|
63
|
+
topicOptions.captionMode = editorParams.topiccaptionmode;
|
|
64
|
+
}
|
|
65
|
+
topicOptions.hideTopicSidebar = false;
|
|
66
|
+
if (editorParams.hidetopicsidebar) {
|
|
67
|
+
topicOptions.hideTopicSidebar = editorParams.hidetopicsidebar === "true";
|
|
68
|
+
}
|
|
69
|
+
topicOptions.disableStorage = false;
|
|
70
|
+
if (editorParams.disabletopicstorage) {
|
|
71
|
+
topicOptions.disableStorage = editorParams.disabletopicstorage === "true";
|
|
72
|
+
}
|
|
73
|
+
topicOptions.beforeDelete = async (...args2) => {
|
|
74
|
+
const isBatchRemove = args2[4];
|
|
75
|
+
const result = await ibiz.confirm.warning({
|
|
76
|
+
title: ibiz.i18n.t(
|
|
77
|
+
"util.appUtil.".concat(isBatchRemove ? "clearTopic" : "aiTitle")
|
|
78
|
+
),
|
|
79
|
+
desc: ibiz.i18n.t(
|
|
80
|
+
"util.appUtil.".concat(isBatchRemove ? "clearTopicDesc" : "aiDesc")
|
|
81
|
+
)
|
|
82
|
+
});
|
|
83
|
+
return result;
|
|
84
|
+
};
|
|
85
|
+
topicOptions.action = async (action, context2, params2, data2, event) => {
|
|
86
|
+
if (action === "LINK") {
|
|
87
|
+
await ibiz.openView.push(data2.url);
|
|
88
|
+
}
|
|
89
|
+
return true;
|
|
90
|
+
};
|
|
91
|
+
topicOptions.configService = (appid, storageType, subType) => {
|
|
92
|
+
return new ConfigService(appid, storageType, subType);
|
|
93
|
+
};
|
|
61
94
|
const chatOptions = {
|
|
62
95
|
locale: ibiz.i18n.getLang()
|
|
63
96
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RouteConst, getDeACMode, calcDeCodeNameById, ScriptFactory } from '@ibiz-template/runtime';
|
|
1
|
+
import { RouteConst, getAppFuncBlockProvider, getDeACMode, calcDeCodeNameById, ScriptFactory } from '@ibiz-template/runtime';
|
|
2
2
|
import { route2routePath, useUIStore, routePath2string } from '@ibiz-template/vue3-util';
|
|
3
3
|
|
|
4
4
|
"use strict";
|
|
@@ -81,12 +81,13 @@ class AppUtil {
|
|
|
81
81
|
* @return {*} {Promise<boolean>}
|
|
82
82
|
*/
|
|
83
83
|
async login(loginName, password, remember, headers, opts) {
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
const appFuncBlockProvider = await getAppFuncBlockProvider();
|
|
85
|
+
const bol = await appFuncBlockProvider.login({
|
|
86
|
+
loginname: loginName,
|
|
87
|
+
password,
|
|
88
|
+
rememberme: remember,
|
|
89
|
+
headers
|
|
90
|
+
});
|
|
90
91
|
return bol;
|
|
91
92
|
}
|
|
92
93
|
/**
|
|
@@ -98,22 +99,10 @@ class AppUtil {
|
|
|
98
99
|
* @return {*} {Promise<boolean>}
|
|
99
100
|
*/
|
|
100
101
|
async logout(opts) {
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const href = "".concat(path.origin).concat(path.pathname).concat(path.hash);
|
|
106
|
-
window.history.replaceState({}, "", href);
|
|
107
|
-
}
|
|
108
|
-
await this.router.push(
|
|
109
|
-
// `/login?ru=${encodeURIComponent(
|
|
110
|
-
// window.location.hash.replace('#/', '/'),
|
|
111
|
-
// )}`,
|
|
112
|
-
"/login"
|
|
113
|
-
);
|
|
114
|
-
ibiz.util.showAppLoading();
|
|
115
|
-
window.location.reload();
|
|
116
|
-
}
|
|
102
|
+
const appFuncBlockProvider = await getAppFuncBlockProvider();
|
|
103
|
+
const bol = await appFuncBlockProvider.logout({
|
|
104
|
+
router: this.router
|
|
105
|
+
});
|
|
117
106
|
return bol;
|
|
118
107
|
}
|
|
119
108
|
/**
|
|
@@ -246,7 +235,6 @@ class AppUtil {
|
|
|
246
235
|
let topicId = "".concat(appDataEntityId, "@").concat(appDEACModeId, "@");
|
|
247
236
|
topicId += context[appDataEntityName] ? context[appDataEntityName] : "default";
|
|
248
237
|
const sessionid = ibiz.aiChatUtil.getChatSessionId("TOPIC", topicId);
|
|
249
|
-
const topicCaption = "[".concat(deACMode.logicName, "]").concat((data == null ? void 0 : data.srfmajortext) || "");
|
|
250
238
|
const tempParams = { ...params, ...{ srfactag: deACMode.codeName } };
|
|
251
239
|
const { zIndex } = useUIStore();
|
|
252
240
|
const containerZIndex = zIndex.increment();
|
|
@@ -261,6 +249,14 @@ class AppUtil {
|
|
|
261
249
|
context,
|
|
262
250
|
params
|
|
263
251
|
);
|
|
252
|
+
let topicCaption = "[".concat(deACMode.logicName, "]").concat((data == null ? void 0 : data.srfmajortext) || "");
|
|
253
|
+
if (params.srfaitopiccaption) {
|
|
254
|
+
topicCaption = "[".concat(ibiz.appUtil.resolveI18nText(params.srfaitopiccaption), "]").concat((data == null ? void 0 : data.srfmajortext) || "");
|
|
255
|
+
}
|
|
256
|
+
let chatCaption = deACMode.logicName;
|
|
257
|
+
if (params.srfaichatcaption) {
|
|
258
|
+
chatCaption = ibiz.appUtil.resolveI18nText(params.srfaichatcaption);
|
|
259
|
+
}
|
|
264
260
|
return new Promise((resolve) => {
|
|
265
261
|
chatInstance.create({
|
|
266
262
|
mode: "TOPIC",
|
|
@@ -279,7 +275,7 @@ class AppUtil {
|
|
|
279
275
|
...topicOptions
|
|
280
276
|
},
|
|
281
277
|
chatOptions: {
|
|
282
|
-
caption:
|
|
278
|
+
caption: chatCaption,
|
|
283
279
|
context: { ...context },
|
|
284
280
|
params: tempParams,
|
|
285
281
|
appDataEntityId,
|
|
@@ -3,6 +3,7 @@ import { useNamespace } from '@ibiz-template/vue3-util';
|
|
|
3
3
|
import { useRoute } from 'vue-router';
|
|
4
4
|
import { IBizContext, LoginMode } from '@ibiz-template/core';
|
|
5
5
|
import qs from 'qs';
|
|
6
|
+
import { getAppFuncBlockProvider } from '@ibiz-template/runtime';
|
|
6
7
|
import '../../util/index.mjs';
|
|
7
8
|
import './login-view.css';
|
|
8
9
|
import { useFocusByEnter } from '../../util/keydown-util/keydown-util.mjs';
|
|
@@ -76,17 +77,12 @@ const LoginView = /* @__PURE__ */ defineComponent({
|
|
|
76
77
|
formRef.value.validate(async (vaild) => {
|
|
77
78
|
if (vaild) {
|
|
78
79
|
loading.value = true;
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
window.location.href = path;
|
|
86
|
-
} else {
|
|
87
|
-
window.location.reload();
|
|
88
|
-
}
|
|
89
|
-
}
|
|
80
|
+
const appFuncBlockProvider = await getAppFuncBlockProvider();
|
|
81
|
+
await appFuncBlockProvider.login({
|
|
82
|
+
loginname: loginData.username,
|
|
83
|
+
password: loginData.password,
|
|
84
|
+
rememberme: isRemember.value
|
|
85
|
+
});
|
|
90
86
|
loading.value = false;
|
|
91
87
|
}
|
|
92
88
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewEngineBase, SysUIActionTag } from '@ibiz-template/runtime';
|
|
1
|
+
import { ViewEngineBase, SysUIActionTag, getAppFuncBlockProvider } from '@ibiz-template/runtime';
|
|
2
2
|
import { useRoute } from 'vue-router';
|
|
3
3
|
import { notNilEmpty } from 'qx-util';
|
|
4
4
|
|
|
@@ -93,27 +93,18 @@ class LoginViewEngine extends ViewEngineBase {
|
|
|
93
93
|
if (notNilEmpty(data.orgid)) {
|
|
94
94
|
username = "".concat(data.username, "@").concat(data.orgid);
|
|
95
95
|
}
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
window.history.pushState({}, "");
|
|
107
|
-
if (loginFailed) {
|
|
108
|
-
const path = window.location.href.replace(
|
|
109
|
-
"?srfthird_auth_success=false",
|
|
110
|
-
""
|
|
111
|
-
);
|
|
112
|
-
window.location.href = path;
|
|
113
|
-
} else {
|
|
114
|
-
window.location.reload();
|
|
96
|
+
const appFuncBlockProvider = await getAppFuncBlockProvider();
|
|
97
|
+
await appFuncBlockProvider.login(
|
|
98
|
+
{
|
|
99
|
+
loginname: username,
|
|
100
|
+
password: data.password,
|
|
101
|
+
rememberme,
|
|
102
|
+
headers
|
|
103
|
+
},
|
|
104
|
+
(result) => {
|
|
105
|
+
this.view.evt.emit("onAfterLogin", { ok: result, panelDataParent });
|
|
115
106
|
}
|
|
116
|
-
|
|
107
|
+
);
|
|
117
108
|
}
|
|
118
109
|
/**
|
|
119
110
|
* @description 取消变更
|
|
@@ -68,9 +68,25 @@ class PickupTreeViewEngine extends TreeViewEngine {
|
|
|
68
68
|
}
|
|
69
69
|
this.setSelectedData(this.selectData);
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* @description 获取所有数据
|
|
73
|
+
* @protected
|
|
74
|
+
* @returns {*} {ITreeNodeData[]}
|
|
75
|
+
* @memberof PickupTreeViewEngine
|
|
76
|
+
*/
|
|
77
|
+
getAllData() {
|
|
78
|
+
const { state, model } = this.tree;
|
|
79
|
+
const { enableRootSelect, rootVisible, detreeNodes } = model;
|
|
80
|
+
let items = state.items.filter((item) => !item._disableSelect);
|
|
81
|
+
if (!enableRootSelect && !rootVisible && (detreeNodes == null ? void 0 : detreeNodes.length)) {
|
|
82
|
+
const rootNode = detreeNodes.find((node) => node.rootNode === true);
|
|
83
|
+
items = items.filter((item) => (rootNode == null ? void 0 : rootNode.id) !== item._nodeId);
|
|
84
|
+
}
|
|
85
|
+
return items;
|
|
86
|
+
}
|
|
71
87
|
async call(key, args) {
|
|
72
88
|
if (key === ViewCallTag.GET_ALL_DATA) {
|
|
73
|
-
return this.
|
|
89
|
+
return this.getAllData();
|
|
74
90
|
}
|
|
75
91
|
return super.call(key, args);
|
|
76
92
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getAppCookie, CoreConst, RuntimeError, HttpError } from '@ibiz-template/core';
|
|
2
2
|
import { mergeDeepRight } from 'ramda';
|
|
3
|
+
import { getAppFuncBlockProvider } from '@ibiz-template/runtime';
|
|
3
4
|
import { AppHooks } from '@ibiz-template/vue3-util';
|
|
4
5
|
import { updateDevToolConfig } from '@ibiz-template/devtool';
|
|
5
6
|
|
|
@@ -220,14 +221,8 @@ class AuthGuard {
|
|
|
220
221
|
* @return {*} {Promise<void>}
|
|
221
222
|
*/
|
|
222
223
|
async loadAppData(context) {
|
|
223
|
-
|
|
224
|
-
if (
|
|
225
|
-
res = await ibiz.net.get("/appdata", context);
|
|
226
|
-
} else {
|
|
227
|
-
res = await ibiz.net.get("/appdata");
|
|
228
|
-
}
|
|
229
|
-
if (res.ok) {
|
|
230
|
-
ibiz.appData = res.data;
|
|
224
|
+
const bol = await ibiz.auth.loadAppData(context);
|
|
225
|
+
if (bol) {
|
|
231
226
|
updateDevToolConfig();
|
|
232
227
|
}
|
|
233
228
|
}
|
|
@@ -239,7 +234,8 @@ class AuthGuard {
|
|
|
239
234
|
* @return {*} {Promise<void>}
|
|
240
235
|
*/
|
|
241
236
|
async loadOrgData() {
|
|
242
|
-
const
|
|
237
|
+
const appFuncBlockProvider = await getAppFuncBlockProvider();
|
|
238
|
+
const res = await appFuncBlockProvider.loadOrgData();
|
|
243
239
|
if (res.ok) {
|
|
244
240
|
const orgDataItems = res.data;
|
|
245
241
|
if (orgDataItems) {
|
package/es/web-app/index.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import './guard/index.mjs';
|
|
2
2
|
export { runApp } from './main.mjs';
|
|
3
3
|
export { AppRouter } from './router/index.mjs';
|
|
4
|
+
import './util/index.mjs';
|
|
4
5
|
export { AuthGuard } from './guard/auth-guard/auth-guard.mjs';
|
|
6
|
+
export { AppFuncBlockProvider } from './util/app-func-block-provider/app-func-block-provider.mjs';
|
|
5
7
|
|
|
6
8
|
"use strict";
|
package/es/web-app/main.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { install } from '@ibiz-template/core';
|
|
2
|
-
import { install as install$1 } from '@ibiz-template/runtime';
|
|
2
|
+
import { install as install$1, registerAppFuncBlockProvider } from '@ibiz-template/runtime';
|
|
3
3
|
import { install as install$2, listenOpenDevTool } from '@ibiz-template/devtool';
|
|
4
4
|
import { AppHooks, useAppStore, route2routePath, PluginFactory, OverlayContainer } from '@ibiz-template/vue3-util';
|
|
5
5
|
import { createVueApp } from './create-vue-app.mjs';
|
|
@@ -27,6 +27,7 @@ import { AIChatUtil } from '../util/ai-chat-util/ai-chat-util.mjs';
|
|
|
27
27
|
import { QrcodeUtil } from '../util/qrcode-util/qrcode-util.mjs';
|
|
28
28
|
import { PrintPreviewUtil } from '../util/print-preview-util/print-preview-util.mjs';
|
|
29
29
|
import { FullscreenUtil } from '../util/fullscreen/fullscreen-util.mjs';
|
|
30
|
+
import { AppFuncBlockProvider } from './util/app-func-block-provider/app-func-block-provider.mjs';
|
|
30
31
|
|
|
31
32
|
"use strict";
|
|
32
33
|
async function runApp(plugins, opts) {
|
|
@@ -95,6 +96,7 @@ async function runApp(plugins, opts) {
|
|
|
95
96
|
ibiz.qrcodeUtil = new QrcodeUtil();
|
|
96
97
|
ibiz.printPreview = new PrintPreviewUtil();
|
|
97
98
|
ibiz.fullscreenUtil = new FullscreenUtil();
|
|
99
|
+
registerAppFuncBlockProvider(() => new AppFuncBlockProvider());
|
|
98
100
|
await ibiz.i18n.init();
|
|
99
101
|
app.mount("#app");
|
|
100
102
|
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
class AppFuncBlockProvider {
|
|
3
|
+
/**
|
|
4
|
+
* @description 登录
|
|
5
|
+
* @author tony001
|
|
6
|
+
* @date 2026-05-13 15:05:24
|
|
7
|
+
* @param {ILoginContext} ctx
|
|
8
|
+
* @param {(result: boolean) => void} [requestedCallback] 数据响应成功的回调
|
|
9
|
+
* @returns {*} {Promise<boolean>}
|
|
10
|
+
* @memberof AppFuncBlockProvider
|
|
11
|
+
*/
|
|
12
|
+
async login(ctx, requestedCallback) {
|
|
13
|
+
const { loginname, password, rememberme, headers } = ctx;
|
|
14
|
+
const bol = await ibiz.auth.login(loginname, password, rememberme, headers);
|
|
15
|
+
if (requestedCallback) {
|
|
16
|
+
requestedCallback(bol);
|
|
17
|
+
}
|
|
18
|
+
if (bol === true) {
|
|
19
|
+
const loginFailed = window.location.href.indexOf("srfthird_auth_success=false") >= 0;
|
|
20
|
+
const hash = window.location.hash.substring(1);
|
|
21
|
+
const regex = new RegExp("[?&]ru=([^&]*)");
|
|
22
|
+
const match = hash.match(regex);
|
|
23
|
+
const ru = match ? decodeURIComponent(match[1]) : null;
|
|
24
|
+
window.location.hash = ru || "/";
|
|
25
|
+
window.history.pushState({}, "");
|
|
26
|
+
if (loginFailed) {
|
|
27
|
+
const path = window.location.href.replace(
|
|
28
|
+
"?srfthird_auth_success=false",
|
|
29
|
+
""
|
|
30
|
+
);
|
|
31
|
+
window.location.href = path;
|
|
32
|
+
} else {
|
|
33
|
+
window.location.reload();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return bol;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @description 登出
|
|
40
|
+
* @author tony001
|
|
41
|
+
* @date 2026-05-13 16:05:28
|
|
42
|
+
* @param {IData} [params]
|
|
43
|
+
* @returns {*} {Promise<boolean>}
|
|
44
|
+
* @memberof AppFuncBlockProvider
|
|
45
|
+
*/
|
|
46
|
+
async logout(params) {
|
|
47
|
+
const bol = await ibiz.auth.logout();
|
|
48
|
+
if (bol) {
|
|
49
|
+
const path = window.location;
|
|
50
|
+
if (path.search.indexOf("isAnonymous=true") !== -1) {
|
|
51
|
+
const href = "".concat(path.origin).concat(path.pathname).concat(path.hash);
|
|
52
|
+
window.history.replaceState({}, "", href);
|
|
53
|
+
}
|
|
54
|
+
if (params && params.router) {
|
|
55
|
+
await params.router.push("/login");
|
|
56
|
+
ibiz.util.showAppLoading();
|
|
57
|
+
window.location.reload();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return bol;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @description 加载应用数据
|
|
64
|
+
* @author tony001
|
|
65
|
+
* @date 2026-05-13 16:05:52
|
|
66
|
+
* @param {IParams} [context]
|
|
67
|
+
* @returns {*} {Promise<{ ok: boolean; data: IAppData }>}
|
|
68
|
+
* @memberof AppFuncBlockProvider
|
|
69
|
+
*/
|
|
70
|
+
async loadAppData(context) {
|
|
71
|
+
let res;
|
|
72
|
+
if (context && Object.keys(context).length > 0) {
|
|
73
|
+
res = await ibiz.net.get("/appdata", context);
|
|
74
|
+
} else {
|
|
75
|
+
res = await ibiz.net.get("/appdata");
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
ok: res.ok,
|
|
79
|
+
data: res.data
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @description 获取组织数据
|
|
84
|
+
* @author tony001
|
|
85
|
+
* @date 2026-05-13 16:05:36
|
|
86
|
+
* @returns {*} {Promise<{ ok: boolean; data: IOrgData[] }>}
|
|
87
|
+
* @memberof AppFuncBlockProvider
|
|
88
|
+
*/
|
|
89
|
+
async loadOrgData() {
|
|
90
|
+
const res = await ibiz.net.get("/uaa/getbydcsystem/".concat(ibiz.env.dcSystem));
|
|
91
|
+
return {
|
|
92
|
+
ok: res.ok,
|
|
93
|
+
data: res.data
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export { AppFuncBlockProvider };
|
|
@@ -41,7 +41,7 @@ const Categories = /* @__PURE__ */ vue.defineComponent({
|
|
|
41
41
|
"onClick": () => this.onSelect(category)
|
|
42
42
|
}, [vue.createVNode("span", {
|
|
43
43
|
"class": this.ns.em("category", "svg"),
|
|
44
|
-
"title": core.showTitle(category.
|
|
44
|
+
"title": core.showTitle(category.text),
|
|
45
45
|
"innerHTML": category.icon
|
|
46
46
|
}, null)]);
|
|
47
47
|
})]);
|
|
@@ -129,6 +129,7 @@ const IBizRawItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
129
129
|
if (["TEXT", "HEADING1", "HEADING2", "HEADING3", "HEADING4", "HEADING5", "HEADING6", "PARAGRAPH", "HTML", "RAW"].includes(rawItemType.value)) {
|
|
130
130
|
rawItemText.value = rawItemContent.value;
|
|
131
131
|
if (typeof rawItemText.value === "string") {
|
|
132
|
+
rawItemText.value = ibiz.appUtil.resolveI18nText(rawItemText.value);
|
|
132
133
|
const val = rawItemText.value;
|
|
133
134
|
rawItemText.value = val.replace(/</g, "<").replace(/>/g, ">").replace(/&nbsp;/g, " ").replace(/ /g, " ");
|
|
134
135
|
}
|
|
@@ -135,7 +135,7 @@ const DashboardDesign = /* @__PURE__ */ vue.defineComponent({
|
|
|
135
135
|
const categoryTag = props.dashboard.controlParams.categorytag;
|
|
136
136
|
const portletNameTag = props.dashboard.controlParams.portletnametag;
|
|
137
137
|
app.model.appPortlets.forEach((portlet) => {
|
|
138
|
-
var _a, _b;
|
|
138
|
+
var _a, _b, _c;
|
|
139
139
|
if (!isDEView && !portlet.enableAppDashboard) {
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
@@ -162,13 +162,20 @@ const DashboardDesign = /* @__PURE__ */ vue.defineComponent({
|
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
+
let groupName = (portletCat == null ? void 0 : portletCat.name) || "";
|
|
166
|
+
if (portletCat == null ? void 0 : portletCat.ungroup) {
|
|
167
|
+
groupName = ibiz.i18n.t("control.dashboard.dashboardDesign.unGroup");
|
|
168
|
+
}
|
|
169
|
+
if ((_c = portletCat == null ? void 0 : portletCat.nameLanguageRes) == null ? void 0 : _c.lanResTag) {
|
|
170
|
+
groupName = ibiz.i18n.t(portletCat.nameLanguageRes.lanResTag, groupName);
|
|
171
|
+
}
|
|
165
172
|
const temp = {
|
|
166
173
|
type: "app",
|
|
167
174
|
portletCodeName: portlet.codeName,
|
|
168
175
|
portletName: portlet.name,
|
|
169
176
|
portletImage: portlet.control.sysImage,
|
|
170
177
|
groupCodeName: (portletCat == null ? void 0 : portletCat.codeName) || "",
|
|
171
|
-
groupName
|
|
178
|
+
groupName,
|
|
172
179
|
appCodeName: portlet.appDataEntityId || app.model.pkgcodeName,
|
|
173
180
|
appName: app.model.name
|
|
174
181
|
};
|
|
@@ -526,6 +526,102 @@ const DataViewControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
526
526
|
}
|
|
527
527
|
return icon;
|
|
528
528
|
};
|
|
529
|
+
const ITEM_HEIGHT = 30;
|
|
530
|
+
const calcSkeletonRows = () => {
|
|
531
|
+
const {
|
|
532
|
+
cardHeight
|
|
533
|
+
} = c.model;
|
|
534
|
+
if (cardHeight) {
|
|
535
|
+
return Math.max(1, Math.floor(cardHeight / ITEM_HEIGHT));
|
|
536
|
+
}
|
|
537
|
+
return 2;
|
|
538
|
+
};
|
|
539
|
+
const renderSkeletonItem = () => {
|
|
540
|
+
const rows = calcSkeletonRows();
|
|
541
|
+
return vue.createVNode(vue.resolveComponent("el-card"), {
|
|
542
|
+
"class": [ns.b("item"), ns.e("skeleton-item")],
|
|
543
|
+
"body-style": {
|
|
544
|
+
width: c.model.cardWidth ? "".concat(c.model.cardWidth, "px") : "auto",
|
|
545
|
+
height: c.model.cardHeight ? "".concat(c.model.cardHeight, "px") : "auto",
|
|
546
|
+
overflow: "hidden"
|
|
547
|
+
}
|
|
548
|
+
}, {
|
|
549
|
+
default: () => [vue.createVNode(vue.resolveComponent("el-skeleton"), {
|
|
550
|
+
"animated": true,
|
|
551
|
+
"style": "min-width: 30px;"
|
|
552
|
+
}, {
|
|
553
|
+
template: () => vue.createVNode(vue.Fragment, null, [Array.from({
|
|
554
|
+
length: rows
|
|
555
|
+
}, () => vue.createVNode(vue.resolveComponent("el-skeleton-item"), {
|
|
556
|
+
"variant": "rect"
|
|
557
|
+
}, null))])
|
|
558
|
+
})]
|
|
559
|
+
});
|
|
560
|
+
};
|
|
561
|
+
const renderSkeletonCardLayout = (count) => {
|
|
562
|
+
const {
|
|
563
|
+
cardColXS,
|
|
564
|
+
cardColSM,
|
|
565
|
+
cardColMD,
|
|
566
|
+
cardColLG
|
|
567
|
+
} = c.model;
|
|
568
|
+
if (cardColXS || cardColSM || cardColMD || cardColLG) {
|
|
569
|
+
return vue.createVNode("div", {
|
|
570
|
+
"class": ["el-row", ns.e("layout-row")]
|
|
571
|
+
}, [Array.from({
|
|
572
|
+
length: count
|
|
573
|
+
}, () => vue.createVNode(vue.resolveComponent("el-col"), {
|
|
574
|
+
"xs": cardColXS,
|
|
575
|
+
"sm": cardColSM,
|
|
576
|
+
"md": cardColMD,
|
|
577
|
+
"lg": cardColLG,
|
|
578
|
+
"class": ns.e("layout-col")
|
|
579
|
+
}, {
|
|
580
|
+
default: () => [vue.createVNode("div", {
|
|
581
|
+
"class": ns.b("scroll-item")
|
|
582
|
+
}, [renderSkeletonItem()])]
|
|
583
|
+
}))]);
|
|
584
|
+
}
|
|
585
|
+
return vue.createVNode("div", {
|
|
586
|
+
"class": ns.e("layout-flex")
|
|
587
|
+
}, [Array.from({
|
|
588
|
+
length: count
|
|
589
|
+
}, () => vue.createVNode("div", {
|
|
590
|
+
"class": ns.b("scroll-item")
|
|
591
|
+
}, [renderSkeletonItem()]))]);
|
|
592
|
+
};
|
|
593
|
+
const renderGroupSkeleton = () => {
|
|
594
|
+
return vue.createVNode("div", {
|
|
595
|
+
"class": ns.b("skeleton")
|
|
596
|
+
}, [Array.from({
|
|
597
|
+
length: 3
|
|
598
|
+
}, () => vue.createVNode("div", {
|
|
599
|
+
"class": ns.b("skeleton-group")
|
|
600
|
+
}, [vue.createVNode("div", {
|
|
601
|
+
"class": ns.be("skeleton-group", "header")
|
|
602
|
+
}, [vue.createVNode(vue.resolveComponent("el-skeleton"), {
|
|
603
|
+
"animated": true,
|
|
604
|
+
"rows": 1
|
|
605
|
+
}, {
|
|
606
|
+
template: () => vue.createVNode(vue.resolveComponent("el-skeleton-item"), {
|
|
607
|
+
"variant": "rect",
|
|
608
|
+
"style": "width: 15%"
|
|
609
|
+
}, null)
|
|
610
|
+
})]), vue.createVNode("div", {
|
|
611
|
+
"class": [ns.be("skeleton", "content"), ns.be("skeleton-group", "content")]
|
|
612
|
+
}, [renderSkeletonCardLayout(3)])]))]);
|
|
613
|
+
};
|
|
614
|
+
const renderSkeleton = () => {
|
|
615
|
+
if (c.state.enableGroup) {
|
|
616
|
+
return renderGroupSkeleton();
|
|
617
|
+
}
|
|
618
|
+
const count = c.state.size || 6;
|
|
619
|
+
return vue.createVNode("div", {
|
|
620
|
+
"class": ns.b("skeleton")
|
|
621
|
+
}, [vue.createVNode("div", {
|
|
622
|
+
"class": ns.be("skeleton", "content")
|
|
623
|
+
}, [renderSkeletonCardLayout(Math.min(count, 20))])]);
|
|
624
|
+
};
|
|
529
625
|
const renderNavIcon = () => {
|
|
530
626
|
const {
|
|
531
627
|
enableNavView,
|
|
@@ -558,7 +654,7 @@ const DataViewControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
558
654
|
}, null);
|
|
559
655
|
};
|
|
560
656
|
const renderContent = () => {
|
|
561
|
-
return [c.state.items.length > 0 ? renderHasData() : renderNoData(), renderBatchToolBar(), renderNavIcon(), renderCollapseExpandIcon()];
|
|
657
|
+
return [!c.state.isLoaded ? renderSkeleton() : c.state.items.length > 0 ? renderHasData() : renderNoData(), renderBatchToolBar(), renderNavIcon(), renderCollapseExpandIcon()];
|
|
562
658
|
};
|
|
563
659
|
const renderPagingBar = () => {
|
|
564
660
|
if (c.state.enablePagingBar && c.model.pagingMode === 1)
|
|
@@ -435,7 +435,7 @@ const SwimlaneKanban = /* @__PURE__ */ vue.defineComponent({
|
|
|
435
435
|
"class": ns.em("cell", "right")
|
|
436
436
|
}, [vue.createVNode("span", {
|
|
437
437
|
"class": ns.em("cell", "description")
|
|
438
|
-
}, ["".concat(lane.count, "
|
|
438
|
+
}, ["".concat(lane.count, " ").concat(ibiz.i18n.t("app.piece")).concat(c.laneDescription)])])])]), c.state.groups.map((group) => {
|
|
439
439
|
if (group.hidden)
|
|
440
440
|
return void 0;
|
|
441
441
|
return renderBodyCell(index, lane, group);
|