@ibiz-template/vue3-components 0.7.41-alpha.94 → 0.7.41-alpha.95
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-1KhprUjB.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-Cvhhf-Jp.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-DYEAyKoh.js → wang-editor-D7CsxIdH.js} +1 -1
- package/dist/{xlsx-util-DwFMdVBD.js → xlsx-util-Dq_UVHCG.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/kanban/swimlane-kanban/swimlane-kanban.mjs +1 -1
- 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 +91 -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/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +1 -1
- package/es/editor/index.mjs +8 -0
- 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 +12 -23
- 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/kanban/swimlane-kanban/swimlane-kanban.cjs +1 -1
- package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.cjs +93 -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/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +1 -1
- package/lib/editor/index.cjs +8 -0
- 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 +11 -22
- 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 +5 -5
- package/dist/index-CVIuun-0.js +0 -339
- package/dist/index-DWSyHHzh.js +0 -1
- package/dist/index-X0zcJbo7.js +0 -1
|
@@ -39,7 +39,7 @@ const Categories = /* @__PURE__ */ defineComponent({
|
|
|
39
39
|
"onClick": () => this.onSelect(category)
|
|
40
40
|
}, [createVNode("span", {
|
|
41
41
|
"class": this.ns.em("category", "svg"),
|
|
42
|
-
"title": showTitle(category.
|
|
42
|
+
"title": showTitle(category.text),
|
|
43
43
|
"innerHTML": category.icon
|
|
44
44
|
}, null)]);
|
|
45
45
|
})]);
|
|
@@ -127,6 +127,7 @@ const IBizRawItem = /* @__PURE__ */ defineComponent({
|
|
|
127
127
|
if (["TEXT", "HEADING1", "HEADING2", "HEADING3", "HEADING4", "HEADING5", "HEADING6", "PARAGRAPH", "HTML", "RAW"].includes(rawItemType.value)) {
|
|
128
128
|
rawItemText.value = rawItemContent.value;
|
|
129
129
|
if (typeof rawItemText.value === "string") {
|
|
130
|
+
rawItemText.value = ibiz.appUtil.resolveI18nText(rawItemText.value);
|
|
130
131
|
const val = rawItemText.value;
|
|
131
132
|
rawItemText.value = val.replace(/</g, "<").replace(/>/g, ">").replace(/&nbsp;/g, " ").replace(/ /g, " ");
|
|
132
133
|
}
|
|
@@ -133,7 +133,7 @@ const DashboardDesign = /* @__PURE__ */ defineComponent({
|
|
|
133
133
|
const categoryTag = props.dashboard.controlParams.categorytag;
|
|
134
134
|
const portletNameTag = props.dashboard.controlParams.portletnametag;
|
|
135
135
|
app.model.appPortlets.forEach((portlet) => {
|
|
136
|
-
var _a, _b;
|
|
136
|
+
var _a, _b, _c;
|
|
137
137
|
if (!isDEView && !portlet.enableAppDashboard) {
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
@@ -160,13 +160,20 @@ const DashboardDesign = /* @__PURE__ */ defineComponent({
|
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
+
let groupName = (portletCat == null ? void 0 : portletCat.name) || "";
|
|
164
|
+
if (portletCat == null ? void 0 : portletCat.ungroup) {
|
|
165
|
+
groupName = ibiz.i18n.t("control.dashboard.dashboardDesign.unGroup");
|
|
166
|
+
}
|
|
167
|
+
if ((_c = portletCat == null ? void 0 : portletCat.nameLanguageRes) == null ? void 0 : _c.lanResTag) {
|
|
168
|
+
groupName = ibiz.i18n.t(portletCat.nameLanguageRes.lanResTag, groupName);
|
|
169
|
+
}
|
|
163
170
|
const temp = {
|
|
164
171
|
type: "app",
|
|
165
172
|
portletCodeName: portlet.codeName,
|
|
166
173
|
portletName: portlet.name,
|
|
167
174
|
portletImage: portlet.control.sysImage,
|
|
168
175
|
groupCodeName: (portletCat == null ? void 0 : portletCat.codeName) || "",
|
|
169
|
-
groupName
|
|
176
|
+
groupName,
|
|
170
177
|
appCodeName: portlet.appDataEntityId || app.model.pkgcodeName,
|
|
171
178
|
appName: app.model.name
|
|
172
179
|
};
|
|
@@ -433,7 +433,7 @@ const SwimlaneKanban = /* @__PURE__ */ defineComponent({
|
|
|
433
433
|
"class": ns.em("cell", "right")
|
|
434
434
|
}, [createVNode("span", {
|
|
435
435
|
"class": ns.em("cell", "description")
|
|
436
|
-
}, ["".concat(lane.count, "
|
|
436
|
+
}, ["".concat(lane.count, " ").concat(ibiz.i18n.t("app.piece")).concat(c.laneDescription)])])])]), c.state.groups.map((group) => {
|
|
437
437
|
if (group.hidden)
|
|
438
438
|
return void 0;
|
|
439
439
|
return renderBodyCell(index, lane, group);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-embed-ai-chat{width:100%;height:100%}.ibiz-embed-ai-chat__container{width:100%;height:100%}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineComponent, createVNode, ref, onMounted, onUnmounted } from 'vue';
|
|
2
|
+
import { createUUID } from 'qx-util';
|
|
3
|
+
import { useNamespace, getEditorEmits, getInputProps } from '@ibiz-template/vue3-util';
|
|
4
|
+
import './embed-ai-chat.css';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const IBizEmbedAIChat = /* @__PURE__ */ defineComponent({
|
|
8
|
+
name: "IBizEmbedAIChat",
|
|
9
|
+
props: getInputProps(),
|
|
10
|
+
emits: getEditorEmits(),
|
|
11
|
+
setup(props) {
|
|
12
|
+
const ns = useNamespace("embed-ai-chat");
|
|
13
|
+
const c = props.controller;
|
|
14
|
+
const aiChatElementRef = ref(null);
|
|
15
|
+
const mountedAIChat = async () => {
|
|
16
|
+
var _a;
|
|
17
|
+
const appDataEntityId = c.model.appDataEntityId;
|
|
18
|
+
const chatInstance = c.chatInstance;
|
|
19
|
+
if (!appDataEntityId || !c.deACMode || !chatInstance)
|
|
20
|
+
return;
|
|
21
|
+
const topicId = createUUID();
|
|
22
|
+
const sessionid = ibiz.aiChatUtil.getChatSessionId("TOPIC", topicId);
|
|
23
|
+
const topicCaption = "[".concat(c.deACMode.logicName, "]").concat(((_a = props.data) == null ? void 0 : _a.srfmajortext) || "");
|
|
24
|
+
const tempParams = {
|
|
25
|
+
...c.params,
|
|
26
|
+
...{
|
|
27
|
+
srfactag: c.deACMode.codeName
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const {
|
|
31
|
+
topicOptions,
|
|
32
|
+
chatOptions
|
|
33
|
+
} = await ibiz.aiChatUtil.getEditorExAIChatParams(c.editorParams, c.context, c.params, props.data, c.deACMode, {
|
|
34
|
+
chatInstance,
|
|
35
|
+
view: c.view,
|
|
36
|
+
ctrl: c.ctrl
|
|
37
|
+
});
|
|
38
|
+
const resourceOptions = await ibiz.aiChatUtil.getAIResourceOptions(c.context, c.params);
|
|
39
|
+
chatInstance.create({
|
|
40
|
+
mode: "TOPIC",
|
|
41
|
+
resourceOptions,
|
|
42
|
+
containerOptions: {
|
|
43
|
+
container: aiChatElementRef.value
|
|
44
|
+
},
|
|
45
|
+
topicOptions: {
|
|
46
|
+
appid: ibiz.env.appId,
|
|
47
|
+
id: topicId,
|
|
48
|
+
caption: topicCaption,
|
|
49
|
+
url: window.location.hash.substring(1),
|
|
50
|
+
type: c.context.srftopicpath || "default",
|
|
51
|
+
...topicOptions
|
|
52
|
+
},
|
|
53
|
+
chatOptions: {
|
|
54
|
+
caption: c.deACMode.logicName,
|
|
55
|
+
context: {
|
|
56
|
+
...c.context
|
|
57
|
+
},
|
|
58
|
+
params: tempParams,
|
|
59
|
+
appDataEntityId,
|
|
60
|
+
// 扩展参数
|
|
61
|
+
...chatOptions,
|
|
62
|
+
sessionid
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
onMounted(() => {
|
|
67
|
+
mountedAIChat();
|
|
68
|
+
});
|
|
69
|
+
onUnmounted(() => {
|
|
70
|
+
const chatInstance = c.chatInstance;
|
|
71
|
+
if (chatInstance) {
|
|
72
|
+
chatInstance.close();
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
return {
|
|
76
|
+
c,
|
|
77
|
+
ns,
|
|
78
|
+
aiChatElementRef
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
render() {
|
|
82
|
+
return createVNode("div", {
|
|
83
|
+
"class": this.ns.b()
|
|
84
|
+
}, [createVNode("div", {
|
|
85
|
+
"class": this.ns.e("container"),
|
|
86
|
+
"ref": "aiChatElementRef"
|
|
87
|
+
}, null)]);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export { IBizEmbedAIChat };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { EditorController, getDeACMode } from '@ibiz-template/runtime';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => {
|
|
7
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
+
return value;
|
|
9
|
+
};
|
|
10
|
+
class EmbedAIChatEditorController extends EditorController {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
/**
|
|
14
|
+
* @description 聊天框实例
|
|
15
|
+
* @author tony001
|
|
16
|
+
* @date 2026-05-15 15:05:37
|
|
17
|
+
* @type {*}
|
|
18
|
+
* @memberof EmbedAIChatEditorController
|
|
19
|
+
*/
|
|
20
|
+
__publicField(this, "chatInstance");
|
|
21
|
+
/**
|
|
22
|
+
* @description 应用实体服务
|
|
23
|
+
* @author tony001
|
|
24
|
+
* @date 2026-05-15 16:05:22
|
|
25
|
+
* @type {IAppDEService}
|
|
26
|
+
* @memberof EmbedAIChatEditorController
|
|
27
|
+
*/
|
|
28
|
+
__publicField(this, "deService");
|
|
29
|
+
/**
|
|
30
|
+
* @description 自填模式
|
|
31
|
+
* @author tony001
|
|
32
|
+
* @date 2026-05-15 16:05:30
|
|
33
|
+
* @type {IAppDEACMode}
|
|
34
|
+
* @memberof EmbedAIChatEditorController
|
|
35
|
+
*/
|
|
36
|
+
__publicField(this, "deACMode");
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @description 初始化
|
|
40
|
+
* @author tony001
|
|
41
|
+
* @date 2026-05-15 16:05:12
|
|
42
|
+
* @protected
|
|
43
|
+
* @returns {*} {Promise<void>}
|
|
44
|
+
* @memberof EmbedAIChatEditorController
|
|
45
|
+
*/
|
|
46
|
+
async onInit() {
|
|
47
|
+
await super.onInit();
|
|
48
|
+
const model = this.model;
|
|
49
|
+
if (model.appDEACModeId) {
|
|
50
|
+
this.deACMode = await getDeACMode(
|
|
51
|
+
model.appDEACModeId,
|
|
52
|
+
model.appDataEntityId,
|
|
53
|
+
this.context.srfappid
|
|
54
|
+
);
|
|
55
|
+
if (this.deACMode) {
|
|
56
|
+
if (this.deACMode.actype === "CHATCOMPLETION" && ibiz.env.enableAI) {
|
|
57
|
+
this.deService = await ibiz.hub.getApp(model.appId).deService.getService(this.context, model.appDataEntityId);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const module = await import('@ibiz-template-plugin/ai-chat');
|
|
62
|
+
if (module && module.createFlatChat) {
|
|
63
|
+
this.chatInstance = module.createFlatChat();
|
|
64
|
+
} else if (module && module.default && module.default.createFlatChat) {
|
|
65
|
+
this.chatInstance = module.default.createFlatChat();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { EmbedAIChatEditorController };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EmbedAIChatEditorController } from './embed-ai-chat-editor.controller.mjs';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => {
|
|
7
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
+
return value;
|
|
9
|
+
};
|
|
10
|
+
class EmbedAIChatEditorProvider {
|
|
11
|
+
constructor() {
|
|
12
|
+
__publicField(this, "formEditor", "IBizEmbedAIChat");
|
|
13
|
+
__publicField(this, "gridEditor", "IBizEmbedAIChat");
|
|
14
|
+
}
|
|
15
|
+
async createController(editorModel, parentController) {
|
|
16
|
+
const c = new EmbedAIChatEditorController(editorModel, parentController);
|
|
17
|
+
await c.init();
|
|
18
|
+
return c;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { EmbedAIChatEditorProvider };
|
|
@@ -79,7 +79,7 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
79
79
|
if (c.blankItemName && !c.multiple) {
|
|
80
80
|
items.value = [{
|
|
81
81
|
value: void 0,
|
|
82
|
-
text: c.blankItemName
|
|
82
|
+
text: ibiz.appUtil.resolveI18nText(c.blankItemName)
|
|
83
83
|
}, ...codeList];
|
|
84
84
|
} else {
|
|
85
85
|
items.value = codeList;
|
package/es/editor/index.mjs
CHANGED
|
@@ -30,6 +30,7 @@ import './carousel/index.mjs';
|
|
|
30
30
|
import './user/ibiz-searchcond-edit/index.mjs';
|
|
31
31
|
import './date-range-select/index.mjs';
|
|
32
32
|
import './map-picker/index.mjs';
|
|
33
|
+
import './ai-chat/index.mjs';
|
|
33
34
|
import { IBizImageCropping } from './upload/ibiz-image-cropping/ibiz-image-cropping.mjs';
|
|
34
35
|
import { IBizSpan } from './span/span/span.mjs';
|
|
35
36
|
import { IBizSpanLink } from './span/span-link/span-link.mjs';
|
|
@@ -73,6 +74,7 @@ import { IBizPresetRawitem } from './preset/preset-rawitem/ibiz-preset-rawitem/i
|
|
|
73
74
|
import { IBizSearchCondEdit } from './user/ibiz-searchcond-edit/ibiz-searchcond-edit.mjs';
|
|
74
75
|
import { IBizCarousel } from './carousel/ibiz-carousel/ibiz-carousel.mjs';
|
|
75
76
|
import { IBizMapPicker } from './map-picker/ibiz-map-picker/ibiz-map-picker.mjs';
|
|
77
|
+
import { IBizEmbedAIChat } from './ai-chat/embed-ai-chat/embed-ai-chat.mjs';
|
|
76
78
|
import { IBizDateRangeSelect } from './date-range-select/date-range-select-picker/date-range-select.mjs';
|
|
77
79
|
import { IBizVirtualizedList } from './dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs';
|
|
78
80
|
import { SpanEditorProvider } from './span/span-editor.provider.mjs';
|
|
@@ -102,6 +104,7 @@ import { CascaderEditorProvider } from './cascader/cascader-editor.provider.mjs'
|
|
|
102
104
|
import { ColorPickerEditorProvider } from './color-picker/color-picker-editor.provider.mjs';
|
|
103
105
|
import { SearchCondEditEditorProvider } from './user/ibiz-searchcond-edit/ibiz-searchcond-edit.provider.mjs';
|
|
104
106
|
import { MapPickerEditorProvider } from './map-picker/map-picker-editor.provider.mjs';
|
|
107
|
+
import { EmbedAIChatEditorProvider } from './ai-chat/embed-ai-chat-editor.provider.mjs';
|
|
105
108
|
import { CarouselEditorProvider } from './carousel/carousel-editor.provider.mjs';
|
|
106
109
|
|
|
107
110
|
"use strict";
|
|
@@ -151,6 +154,7 @@ const IBizEditor = {
|
|
|
151
154
|
v.component(IBizSearchCondEdit.name, IBizSearchCondEdit);
|
|
152
155
|
v.component(IBizCarousel.name, IBizCarousel);
|
|
153
156
|
v.component(IBizMapPicker.name, IBizMapPicker);
|
|
157
|
+
v.component(IBizEmbedAIChat.name, IBizEmbedAIChat);
|
|
154
158
|
v.component(
|
|
155
159
|
"IBizHtml",
|
|
156
160
|
defineAsyncComponent(() => import('./html/wang-editor/wang-editor.mjs'))
|
|
@@ -439,6 +443,10 @@ const IBizEditor = {
|
|
|
439
443
|
() => new SearchCondEditEditorProvider()
|
|
440
444
|
);
|
|
441
445
|
registerEditorProvider("MAPPICKER", () => new MapPickerEditorProvider());
|
|
446
|
+
registerEditorProvider(
|
|
447
|
+
"TEXTAREA_EMBED_AI_CHAT",
|
|
448
|
+
() => new EmbedAIChatEditorProvider()
|
|
449
|
+
);
|
|
442
450
|
registerEditorProvider(
|
|
443
451
|
"FIELD_IMAGE_PICTURE_ONE",
|
|
444
452
|
() => new FileUploaderEditorProvider("PICTURE_ONE")
|
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
|
/**
|
|
@@ -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
|
}
|