@ibiz-template/vue3-components 0.7.41-alpha.170 → 0.7.41-alpha.172
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/{chart-D8ak71ob.js → chart-5YvW_6v1.js} +1 -1
- package/dist/{index-3TWmawfm.js → index-Djn5hsaB.js} +5 -5
- package/dist/{index.es-LxA_BfCY.js → index.es-DK-t7__C.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-Cm91QEYy.js → wang-editor-0QMRlKbm.js} +1 -1
- package/dist/{xlsx-util-DSZIziO3.js → xlsx-util-CWqroKyj.js} +1 -1
- package/es/common/carousel/carousel.mjs +1 -1
- package/es/control/chart/chart.mjs +4 -4
- package/es/control/data-view/data-view.mjs +9 -3
- package/es/control/grid/grid/grid.mjs +4 -4
- package/es/control/list/list.mjs +9 -3
- package/es/control/tree-grid/tree-grid.mjs +4 -4
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +4 -4
- package/es/editor/ai-chat/embed-ai-chat/embed-ai-chat.mjs +25 -10
- package/es/editor/ai-chat/embed-ai-chat-editor.controller.mjs +17 -8
- package/es/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.mjs +14 -14
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +25 -28
- package/es/util/ai-chat-util/ai-chat-util.mjs +42 -1
- package/es/util/modal-util/modal-util.mjs +7 -0
- package/lib/common/carousel/carousel.cjs +1 -1
- package/lib/control/chart/chart.cjs +4 -4
- package/lib/control/data-view/data-view.cjs +8 -2
- package/lib/control/grid/grid/grid.cjs +4 -4
- package/lib/control/list/list.cjs +8 -2
- package/lib/control/tree-grid/tree-grid.cjs +4 -4
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +4 -4
- package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.cjs +24 -9
- package/lib/editor/ai-chat/embed-ai-chat-editor.controller.cjs +17 -8
- package/lib/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.cjs +14 -14
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +25 -28
- package/lib/util/ai-chat-util/ai-chat-util.cjs +41 -0
- package/lib/util/modal-util/modal-util.cjs +7 -0
- package/package.json +5 -5
- package/src/common/carousel/carousel.tsx +1 -1
- package/src/control/chart/chart.tsx +4 -4
- package/src/control/data-view/data-view.tsx +11 -4
- package/src/control/grid/grid/grid.tsx +4 -4
- package/src/control/list/list.tsx +11 -4
- package/src/control/tree-grid/tree-grid.tsx +4 -4
- package/src/control/tree-grid-ex/tree-grid-ex.tsx +4 -4
- package/src/editor/ai-chat/embed-ai-chat/embed-ai-chat.tsx +32 -18
- package/src/editor/ai-chat/embed-ai-chat-editor.controller.ts +25 -13
- package/src/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.tsx +14 -14
- package/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx +42 -63
- package/src/util/ai-chat-util/ai-chat-util.ts +43 -0
- package/src/util/modal-util/modal-util.ts +8 -0
|
@@ -77,16 +77,16 @@ const TreeGridExControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
77
77
|
selector: ".el-table__header .el-table__cell"
|
|
78
78
|
}];
|
|
79
79
|
const childStyle = [{
|
|
80
|
-
|
|
80
|
+
style: semanticStyle("body.row"),
|
|
81
81
|
selector: ".el-table__row"
|
|
82
82
|
}, {
|
|
83
|
-
|
|
83
|
+
style: semanticStyle("header.row"),
|
|
84
84
|
selector: ".el-table__header tr"
|
|
85
85
|
}, {
|
|
86
|
-
|
|
86
|
+
style: semanticStyle("body.cell"),
|
|
87
87
|
selector: ".el-table__body .el-table__cell"
|
|
88
88
|
}, {
|
|
89
|
-
|
|
89
|
+
style: semanticStyle("header.cell"),
|
|
90
90
|
selector: ".el-table__header .el-table__cell"
|
|
91
91
|
}];
|
|
92
92
|
const renderNoData = () => {
|
|
@@ -19,6 +19,27 @@ const IBizEmbedAIChat = /* @__PURE__ */ vue.defineComponent({
|
|
|
19
19
|
const knowledgeMap = /* @__PURE__ */ new Map();
|
|
20
20
|
const aiChatElementRef = vue.ref(null);
|
|
21
21
|
let mountedFlag = false;
|
|
22
|
+
const getTopicId = () => {
|
|
23
|
+
const {
|
|
24
|
+
appDataEntityId,
|
|
25
|
+
appDEACModeId
|
|
26
|
+
} = c.model;
|
|
27
|
+
if (!appDataEntityId || !appDEACModeId)
|
|
28
|
+
return "";
|
|
29
|
+
const editorParams = {
|
|
30
|
+
...c.editorParams
|
|
31
|
+
};
|
|
32
|
+
const appDataEntityName = runtime.calcDeCodeNameById(appDataEntityId);
|
|
33
|
+
let topicId = "".concat(appDataEntityId, "@").concat(c.model.appDEACModeId, "@");
|
|
34
|
+
topicId += c.context[appDataEntityName] ? c.context[appDataEntityName] : editorParams.srfainewtopic === "true" ? qxUtil.createUUID() : "default";
|
|
35
|
+
if (editorParams.srfattachsessiontag) {
|
|
36
|
+
topicId += "__".concat(editorParams.srfattachsessiontag);
|
|
37
|
+
delete editorParams.srfattachsessiontag;
|
|
38
|
+
} else {
|
|
39
|
+
topicId += "__".concat(qxUtil.createUUID());
|
|
40
|
+
}
|
|
41
|
+
return topicId;
|
|
42
|
+
};
|
|
22
43
|
const mountedAIChat = async () => {
|
|
23
44
|
var _a;
|
|
24
45
|
if (mountedFlag)
|
|
@@ -47,16 +68,10 @@ const IBizEmbedAIChat = /* @__PURE__ */ vue.defineComponent({
|
|
|
47
68
|
topicId = srfsessionid.substring(firstAtIndex + 1, lastAtIndex);
|
|
48
69
|
}
|
|
49
70
|
sessionid = editorParams.srfsessionid;
|
|
71
|
+
if (c.isShare)
|
|
72
|
+
topicId = getTopicId();
|
|
50
73
|
} else {
|
|
51
|
-
|
|
52
|
-
topicId = "".concat(appDataEntityId, "@").concat(c.model.appDEACModeId, "@");
|
|
53
|
-
topicId += c.context[appDataEntityName] ? c.context[appDataEntityName] : editorParams.srfainewtopic === "true" ? qxUtil.createUUID() : "default";
|
|
54
|
-
if (editorParams.srfattachsessiontag) {
|
|
55
|
-
topicId += "__".concat(editorParams.srfattachsessiontag);
|
|
56
|
-
delete editorParams.srfattachsessiontag;
|
|
57
|
-
} else {
|
|
58
|
-
topicId += "__".concat(qxUtil.createUUID());
|
|
59
|
-
}
|
|
74
|
+
topicId = getTopicId();
|
|
60
75
|
sessionid = ibiz.aiChatUtil.getChatSessionId("TOPIC", topicId, editorParams.srfattachtimestamp !== "false");
|
|
61
76
|
}
|
|
62
77
|
const tempParams = {
|
|
@@ -39,11 +39,17 @@ class EmbedAIChatEditorController extends runtime.EditorController {
|
|
|
39
39
|
*/
|
|
40
40
|
__publicField(this, "deACMode");
|
|
41
41
|
/**
|
|
42
|
-
* @description
|
|
42
|
+
* @description 是否为简单模式
|
|
43
43
|
* @type {boolean}
|
|
44
44
|
* @memberof EmbedAIChatEditorController
|
|
45
45
|
*/
|
|
46
46
|
__publicField(this, "isSimple", false);
|
|
47
|
+
/**
|
|
48
|
+
* @description 是否为分享模式
|
|
49
|
+
* @type {boolean}
|
|
50
|
+
* @memberof EmbedAIChatEditorController
|
|
51
|
+
*/
|
|
52
|
+
__publicField(this, "isShare", false);
|
|
47
53
|
/**
|
|
48
54
|
* @description 编辑器唯一标识
|
|
49
55
|
* @protected
|
|
@@ -61,6 +67,7 @@ class EmbedAIChatEditorController extends runtime.EditorController {
|
|
|
61
67
|
* @memberof EmbedAIChatEditorController
|
|
62
68
|
*/
|
|
63
69
|
async onInit() {
|
|
70
|
+
var _a;
|
|
64
71
|
await super.onInit();
|
|
65
72
|
const model = this.model;
|
|
66
73
|
if (model.appDEACModeId) {
|
|
@@ -75,15 +82,17 @@ class EmbedAIChatEditorController extends runtime.EditorController {
|
|
|
75
82
|
}
|
|
76
83
|
}
|
|
77
84
|
}
|
|
78
|
-
const
|
|
79
|
-
if (module && module.createFlatChat) {
|
|
80
|
-
this.chatInstance = module.createFlatChat();
|
|
81
|
-
} else if (module && module.default && module.default.createFlatChat) {
|
|
82
|
-
this.chatInstance = module.default.createFlatChat();
|
|
83
|
-
}
|
|
84
|
-
const { issimple } = this.editorParams;
|
|
85
|
+
const { issimple, share } = this.editorParams;
|
|
85
86
|
if (issimple)
|
|
86
87
|
this.isSimple = issimple === "true";
|
|
88
|
+
this.isShare = share === "true";
|
|
89
|
+
const module = await import('@ibiz-template-plugin/ai-chat');
|
|
90
|
+
if (!module)
|
|
91
|
+
return;
|
|
92
|
+
const factory = (_a = module.default) != null ? _a : module;
|
|
93
|
+
const createChat = this.isShare ? factory.createReadonlyChat : factory.createFlatChat;
|
|
94
|
+
if (createChat)
|
|
95
|
+
this.chatInstance = createChat();
|
|
87
96
|
}
|
|
88
97
|
/**
|
|
89
98
|
* @description 重绘
|
|
@@ -68,46 +68,46 @@ const IBizTransferPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
68
68
|
selector: ".ibiz-transfer-panel__item .el-checkbox__label"
|
|
69
69
|
}];
|
|
70
70
|
const childStyle = [{
|
|
71
|
-
|
|
71
|
+
style: semanticStyle("editor.content"),
|
|
72
72
|
selector: ".ibiz-transfer"
|
|
73
73
|
}, {
|
|
74
|
-
|
|
74
|
+
style: semanticStyle("editor.section"),
|
|
75
75
|
selector: ".ibiz-transfer-panel"
|
|
76
76
|
}, {
|
|
77
|
-
|
|
77
|
+
style: semanticStyle("editor.actions"),
|
|
78
78
|
selector: ".ibiz-transfer__buttons"
|
|
79
79
|
}, {
|
|
80
|
-
|
|
80
|
+
style: semanticStyle("editor.actions.item"),
|
|
81
81
|
selector: ".ibiz-transfer__button"
|
|
82
82
|
}, {
|
|
83
|
-
|
|
83
|
+
style: semanticStyle("editor.header"),
|
|
84
84
|
selector: ".ibiz-transfer-panel__header"
|
|
85
85
|
}, {
|
|
86
|
-
|
|
86
|
+
style: semanticStyle("editor.title"),
|
|
87
87
|
selector: ".ibiz-transfer-panel__header--title"
|
|
88
88
|
}, {
|
|
89
|
-
|
|
89
|
+
style: semanticStyle("editor.count"),
|
|
90
90
|
selector: ".ibiz-transfer-panel__header--count"
|
|
91
91
|
}, {
|
|
92
|
-
|
|
92
|
+
style: semanticStyle("editor.body"),
|
|
93
93
|
selector: ".ibiz-transfer-panel__body"
|
|
94
94
|
}, {
|
|
95
|
-
|
|
95
|
+
style: semanticStyle("editor.search"),
|
|
96
96
|
selector: ".el-input__inner"
|
|
97
97
|
}, {
|
|
98
|
-
|
|
98
|
+
style: semanticStyle("editor.search.prefix"),
|
|
99
99
|
selector: ".el-input__prefix"
|
|
100
100
|
}, {
|
|
101
|
-
|
|
101
|
+
style: semanticStyle("editor.list"),
|
|
102
102
|
selector: ".ibiz-transfer-panel__list"
|
|
103
103
|
}, {
|
|
104
|
-
|
|
104
|
+
style: semanticStyle("editor.item"),
|
|
105
105
|
selector: ".ibiz-transfer-panel__item"
|
|
106
106
|
}, {
|
|
107
|
-
|
|
107
|
+
style: semanticStyle("editor.item.checkbox"),
|
|
108
108
|
selector: ".ibiz-transfer-panel__item .el-checkbox__inner"
|
|
109
109
|
}, {
|
|
110
|
-
|
|
110
|
+
style: semanticStyle("editor.item.label"),
|
|
111
111
|
selector: ".ibiz-transfer-panel__item .el-checkbox__label"
|
|
112
112
|
}];
|
|
113
113
|
const curValue = vue.ref([]);
|
|
@@ -410,23 +410,28 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
410
410
|
funcs.stop();
|
|
411
411
|
}
|
|
412
412
|
});
|
|
413
|
+
const getItemStyle = (item) => {
|
|
414
|
+
const isRound = c.editorParams.type === "round";
|
|
415
|
+
return ns.cssVarBlock({
|
|
416
|
+
"select-option-item-color": isRound ? (item == null ? void 0 : item.color) || "var(".concat(ns.cssVarName("color-primary-text"), ")") : item == null ? void 0 : item.color,
|
|
417
|
+
"select-option-item-bkcolor": isRound ? (item == null ? void 0 : item.bkcolor) || "var(".concat(ns.cssVarName("color-primary"), ")") : item == null ? void 0 : item.bkcolor,
|
|
418
|
+
"select-option-item-padding": isRound ? "0 var(".concat(ns.cssVarName("spacing-base"), ")") : ""
|
|
419
|
+
});
|
|
420
|
+
};
|
|
413
421
|
const prefix = {};
|
|
414
422
|
if (c.editorParams.type === "round") {
|
|
415
423
|
Object.assign(prefix, {
|
|
416
424
|
prefix: () => {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
"
|
|
423
|
-
|
|
424
|
-
"
|
|
425
|
-
})
|
|
426
|
-
}
|
|
427
|
-
"icon": codeListItem == null ? void 0 : codeListItem.sysImage
|
|
428
|
-
}, null), text || ""]);
|
|
429
|
-
});
|
|
425
|
+
if (valueText.value)
|
|
426
|
+
return valueText.value.split(valueSeparator).map((text) => {
|
|
427
|
+
const codeListItem = getCodeListItem(text);
|
|
428
|
+
return vue.createVNode("div", {
|
|
429
|
+
"class": [ns.b("select-option-text"), codeListItem == null ? void 0 : codeListItem.textCls],
|
|
430
|
+
"style": getItemStyle(codeListItem)
|
|
431
|
+
}, [(codeListItem == null ? void 0 : codeListItem.sysImage) && vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
432
|
+
"icon": codeListItem == null ? void 0 : codeListItem.sysImage
|
|
433
|
+
}, null), text]);
|
|
434
|
+
});
|
|
430
435
|
}
|
|
431
436
|
});
|
|
432
437
|
}
|
|
@@ -452,6 +457,7 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
452
457
|
onFocus,
|
|
453
458
|
setEditable,
|
|
454
459
|
handleKeyUp,
|
|
460
|
+
getItemStyle,
|
|
455
461
|
getCodeListItem,
|
|
456
462
|
onVisibleChange,
|
|
457
463
|
customNodeClass,
|
|
@@ -542,9 +548,9 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
542
548
|
"value": (_a = item.value) == null ? void 0 : _a.toString(),
|
|
543
549
|
"label": item.text,
|
|
544
550
|
"disabled": item.disableSelect === true,
|
|
545
|
-
"style": [
|
|
546
|
-
"select-option-item-bkcolor":
|
|
547
|
-
})
|
|
551
|
+
"style": [this.ns.cssVarBlock({
|
|
552
|
+
"select-option-item-bkcolor": item.bkcolor
|
|
553
|
+
}), this.semanticStyle("editor.popup.item", {
|
|
548
554
|
item
|
|
549
555
|
})],
|
|
550
556
|
"class": [item.cls ? item.cls : null, this.ns.e("option-item"), this.semanticClass("editor.popup.item", {
|
|
@@ -555,9 +561,7 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
555
561
|
default: () => {
|
|
556
562
|
return vue.createVNode("div", {
|
|
557
563
|
"class": [this.ns.b("select-option-content"), item.textCls ? item.textCls : null],
|
|
558
|
-
"style":
|
|
559
|
-
"select-option-item-color": "".concat(item.color)
|
|
560
|
-
}) : ""
|
|
564
|
+
"style": this.getItemStyle(item)
|
|
561
565
|
}, [item.sysImage && vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
562
566
|
"class": this.ns.em("option-item", "icon"),
|
|
563
567
|
"icon": item.sysImage
|
|
@@ -580,11 +584,7 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
580
584
|
"class": [this.ns.e("item"), codeListItem == null ? void 0 : codeListItem.textCls, this.ns.b("readonly-text-item"), this.semanticClass("editor.item", {
|
|
581
585
|
item: codeListItem
|
|
582
586
|
})],
|
|
583
|
-
"style": [
|
|
584
|
-
"readonly-text-item-color": "".concat(codeListItem.color || ""),
|
|
585
|
-
"select-option-item-color": "".concat(codeListItem.color || ""),
|
|
586
|
-
"select-option-item-bkcolor": "".concat((this.c.editorParams.type === "round" ? codeListItem.bkcolor : "") || "")
|
|
587
|
-
}) : "", this.semanticStyle("editor.item", {
|
|
587
|
+
"style": [this.getItemStyle(codeListItem), this.semanticStyle("editor.item", {
|
|
588
588
|
item: codeListItem
|
|
589
589
|
})]
|
|
590
590
|
}, [(codeListItem == null ? void 0 : codeListItem.sysImage) && vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
@@ -607,10 +607,7 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
607
607
|
"class": [this.ns.e("item"), codeListItem == null ? void 0 : codeListItem.textCls, this.ns.b("content-item"), this.semanticClass("editor.item", {
|
|
608
608
|
item: codeListItem
|
|
609
609
|
})],
|
|
610
|
-
"style": [
|
|
611
|
-
"select-option-item-color": "".concat(codeListItem.color || ""),
|
|
612
|
-
"select-option-item-bkcolor": "".concat((this.c.editorParams.type === "round" ? codeListItem.bkcolor : "") || "")
|
|
613
|
-
}) : "", this.semanticStyle("editor.item", {
|
|
610
|
+
"style": [this.getItemStyle(codeListItem), this.semanticStyle("editor.item", {
|
|
614
611
|
item: codeListItem
|
|
615
612
|
})]
|
|
616
613
|
}, [vue.createVNode("span", {
|
|
@@ -330,6 +330,22 @@ class AIChatUtil {
|
|
|
330
330
|
});
|
|
331
331
|
return result;
|
|
332
332
|
};
|
|
333
|
+
topicOptions.shareTopic = async (realID) => {
|
|
334
|
+
if (!ibiz.config.common.aiSessionShareUIActionTag)
|
|
335
|
+
return;
|
|
336
|
+
await runtime.UIActionUtil.execAndResolved(
|
|
337
|
+
ibiz.config.common.aiSessionShareUIActionTag,
|
|
338
|
+
{
|
|
339
|
+
context,
|
|
340
|
+
params,
|
|
341
|
+
data: [{ id: realID }],
|
|
342
|
+
view: args.view,
|
|
343
|
+
ctrl: args.ctrl
|
|
344
|
+
},
|
|
345
|
+
context.srfappid
|
|
346
|
+
);
|
|
347
|
+
return true;
|
|
348
|
+
};
|
|
333
349
|
topicOptions.action = async (action, context2, params2, data2, event) => {
|
|
334
350
|
if (action === "LINK" && data2.url) {
|
|
335
351
|
await ibiz.openView.push(data2.url);
|
|
@@ -1081,6 +1097,22 @@ class AIChatUtil {
|
|
|
1081
1097
|
});
|
|
1082
1098
|
return result;
|
|
1083
1099
|
};
|
|
1100
|
+
topicOptions.shareTopic = async (realID) => {
|
|
1101
|
+
if (!ibiz.config.common.aiSessionShareUIActionTag)
|
|
1102
|
+
return;
|
|
1103
|
+
await runtime.UIActionUtil.execAndResolved(
|
|
1104
|
+
ibiz.config.common.aiSessionShareUIActionTag,
|
|
1105
|
+
{
|
|
1106
|
+
context,
|
|
1107
|
+
params,
|
|
1108
|
+
data: [{ id: realID }],
|
|
1109
|
+
view: args.view,
|
|
1110
|
+
ctrl: args.ctrl
|
|
1111
|
+
},
|
|
1112
|
+
context.srfappid
|
|
1113
|
+
);
|
|
1114
|
+
return true;
|
|
1115
|
+
};
|
|
1084
1116
|
topicOptions.action = async (action, context2, params2, data2, event) => {
|
|
1085
1117
|
if (action === "LINK" && data2.url) {
|
|
1086
1118
|
await ibiz.openView.push(data2.url);
|
|
@@ -2053,6 +2085,15 @@ class AIChatUtil {
|
|
|
2053
2085
|
);
|
|
2054
2086
|
return result;
|
|
2055
2087
|
};
|
|
2088
|
+
resourceOptions.copySession = async (realID, data) => {
|
|
2089
|
+
const result = await utilService.copySession(
|
|
2090
|
+
context,
|
|
2091
|
+
params,
|
|
2092
|
+
realID,
|
|
2093
|
+
data
|
|
2094
|
+
);
|
|
2095
|
+
return result;
|
|
2096
|
+
};
|
|
2056
2097
|
return resourceOptions;
|
|
2057
2098
|
}
|
|
2058
2099
|
/**
|
|
@@ -4,6 +4,13 @@ var ElementPlus = require('element-plus');
|
|
|
4
4
|
|
|
5
5
|
"use strict";
|
|
6
6
|
class ModalUtil {
|
|
7
|
+
async default(params) {
|
|
8
|
+
await ElementPlus.ElMessageBox({
|
|
9
|
+
message: params.desc,
|
|
10
|
+
...params,
|
|
11
|
+
...params.options
|
|
12
|
+
});
|
|
13
|
+
}
|
|
7
14
|
async info(params) {
|
|
8
15
|
await ElementPlus.ElMessageBox.alert(params.desc, params.title, {
|
|
9
16
|
...params.options,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-components",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.172",
|
|
4
4
|
"description": "web端组件库(vue3)",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
33
33
|
"@floating-ui/dom": "^1.5.3",
|
|
34
|
-
"@ibiz-template-plugin/ai-chat": "^0.0.
|
|
34
|
+
"@ibiz-template-plugin/ai-chat": "^0.0.139",
|
|
35
35
|
"@ibiz-template-plugin/gantt": "0.1.8-alpha.468",
|
|
36
36
|
"@ibiz-template-plugin/bi-report": "0.0.32",
|
|
37
37
|
"@ibiz-template-plugin/data-view": "0.0.8",
|
|
38
38
|
"@ibiz-template/core": "0.7.41-alpha.152",
|
|
39
39
|
"@ibiz-template/devtool": "0.0.18",
|
|
40
|
-
"@ibiz-template/model-helper": "0.7.41-alpha.
|
|
41
|
-
"@ibiz-template/runtime": "0.7.41-alpha.
|
|
40
|
+
"@ibiz-template/model-helper": "0.7.41-alpha.160",
|
|
41
|
+
"@ibiz-template/runtime": "0.7.41-alpha.160",
|
|
42
42
|
"@ibiz-template/theme": "0.7.39",
|
|
43
|
-
"@ibiz-template/vue3-util": "0.7.41-alpha.
|
|
43
|
+
"@ibiz-template/vue3-util": "0.7.41-alpha.160",
|
|
44
44
|
"@ibiz-template/web-theme": "3.16.0",
|
|
45
45
|
"@ibiz/model-core": "^0.1.89",
|
|
46
46
|
"@imengyu/vue3-context-menu": "^1.3.5",
|
|
@@ -80,7 +80,7 @@ export const IBizCarouselComponent = defineComponent({
|
|
|
80
80
|
selector: '.el-carousel__arrow--right',
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
|
-
|
|
83
|
+
style: props.semantic.semanticStyle('indicator'),
|
|
84
84
|
selector: '.el-carousel__indicator',
|
|
85
85
|
},
|
|
86
86
|
];
|
|
@@ -99,19 +99,19 @@ const ChartControl = defineComponent({
|
|
|
99
99
|
// 子类样式透传
|
|
100
100
|
const childStyle = [
|
|
101
101
|
{
|
|
102
|
-
|
|
102
|
+
style: semanticStyle('table.body.row'),
|
|
103
103
|
selector: '.el-table__row',
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
|
-
|
|
106
|
+
style: semanticStyle('table.header.row'),
|
|
107
107
|
selector: '.el-table__header tr',
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
|
-
|
|
110
|
+
style: semanticStyle('table.body.cell'),
|
|
111
111
|
selector: '.el-table__body .el-table__cell',
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
|
-
|
|
114
|
+
style: semanticStyle('table.header.cell'),
|
|
115
115
|
selector: '.el-table__header .el-table__cell',
|
|
116
116
|
},
|
|
117
117
|
];
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
IUIActionGroupDetail,
|
|
24
24
|
} from '@ibiz/model-core';
|
|
25
25
|
import {
|
|
26
|
+
Srfuf,
|
|
26
27
|
ControlVO,
|
|
27
28
|
ISortItem,
|
|
28
29
|
getControl,
|
|
@@ -176,9 +177,11 @@ export const DataViewControl = defineComponent({
|
|
|
176
177
|
* @return {*} {boolean}
|
|
177
178
|
*/
|
|
178
179
|
const isSelected = (item: IData): boolean => {
|
|
179
|
-
let selected = !!c.state.selectedData.find(
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
let selected = !!c.state.selectedData.find(data => {
|
|
181
|
+
const isCreate = data.srfuf === Srfuf.CREATE;
|
|
182
|
+
const compareKey = isCreate ? 'tempsrfkey' : 'srfkey';
|
|
183
|
+
return data[compareKey] === item[compareKey];
|
|
184
|
+
});
|
|
182
185
|
if (
|
|
183
186
|
c.view.model.viewType === 'DEDATAVIEW' &&
|
|
184
187
|
c.state.mdctrlActiveMode === 1 &&
|
|
@@ -195,7 +198,11 @@ export const DataViewControl = defineComponent({
|
|
|
195
198
|
*/
|
|
196
199
|
const toggleSelection = (item: IData): void => {
|
|
197
200
|
const selected: IData[] = c.state.selectedData;
|
|
198
|
-
const
|
|
201
|
+
const isCreate = item.srfuf === Srfuf.CREATE;
|
|
202
|
+
const compareKey = isCreate ? 'tempsrfkey' : 'srfkey';
|
|
203
|
+
const index = selected.findIndex(
|
|
204
|
+
data => data[compareKey] === item[compareKey],
|
|
205
|
+
);
|
|
199
206
|
if (index === -1) {
|
|
200
207
|
selected.push(item);
|
|
201
208
|
} else {
|
|
@@ -487,19 +487,19 @@ export const GridControl = defineComponent({
|
|
|
487
487
|
// 子类样式透传
|
|
488
488
|
const childStyle = [
|
|
489
489
|
{
|
|
490
|
-
|
|
490
|
+
style: semanticStyle('body.row'),
|
|
491
491
|
selector: '.el-table__row',
|
|
492
492
|
},
|
|
493
493
|
{
|
|
494
|
-
|
|
494
|
+
style: semanticStyle('header.row'),
|
|
495
495
|
selector: '.el-table__header tr',
|
|
496
496
|
},
|
|
497
497
|
{
|
|
498
|
-
|
|
498
|
+
style: semanticStyle('body.cell'),
|
|
499
499
|
selector: '.el-table__body .el-table__cell',
|
|
500
500
|
},
|
|
501
501
|
{
|
|
502
|
-
|
|
502
|
+
style: semanticStyle('header.cell'),
|
|
503
503
|
selector: '.el-table__header .el-table__cell',
|
|
504
504
|
},
|
|
505
505
|
];
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
import { IDEList, ILayoutPanel, IUIActionGroupDetail } from '@ibiz/model-core';
|
|
22
22
|
import { isNil, debounce } from 'lodash-es';
|
|
23
23
|
import {
|
|
24
|
+
Srfuf,
|
|
24
25
|
ControlVO,
|
|
25
26
|
ListController,
|
|
26
27
|
IDragChangeInfo,
|
|
@@ -241,9 +242,11 @@ export const ListControl = defineComponent({
|
|
|
241
242
|
* @return {*} {boolean}
|
|
242
243
|
*/
|
|
243
244
|
const isSelected = (item: IData): boolean => {
|
|
244
|
-
let selected = !!c.state.selectedData.find(
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
let selected = !!c.state.selectedData.find(data => {
|
|
246
|
+
const isCreate = data.srfuf === Srfuf.CREATE;
|
|
247
|
+
const compareKey = isCreate ? 'tempsrfkey' : 'srfkey';
|
|
248
|
+
return data[compareKey] === item[compareKey];
|
|
249
|
+
});
|
|
247
250
|
if (
|
|
248
251
|
c.view.model.viewType === 'DELISTVIEW' &&
|
|
249
252
|
c.state.mdctrlActiveMode === 1 &&
|
|
@@ -259,7 +262,11 @@ export const ListControl = defineComponent({
|
|
|
259
262
|
*/
|
|
260
263
|
const toggleSelection = (item: IData): void => {
|
|
261
264
|
const selected: IData[] = c.state.selectedData;
|
|
262
|
-
const
|
|
265
|
+
const isCreate = item.srfuf === Srfuf.CREATE;
|
|
266
|
+
const compareKey = isCreate ? 'tempsrfkey' : 'srfkey';
|
|
267
|
+
const index = selected.findIndex(
|
|
268
|
+
data => data[compareKey] === item[compareKey],
|
|
269
|
+
);
|
|
263
270
|
if (index === -1) {
|
|
264
271
|
selected.push(item);
|
|
265
272
|
} else {
|
|
@@ -132,19 +132,19 @@ export const TreeGridControl = defineComponent({
|
|
|
132
132
|
// 子类样式透传
|
|
133
133
|
const childStyle = [
|
|
134
134
|
{
|
|
135
|
-
|
|
135
|
+
style: semanticStyle('body.row'),
|
|
136
136
|
selector: '.el-table__row',
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
|
-
|
|
139
|
+
style: semanticStyle('header.row'),
|
|
140
140
|
selector: '.el-table__header tr',
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
|
-
|
|
143
|
+
style: semanticStyle('body.cell'),
|
|
144
144
|
selector: '.el-table__body .el-table__cell',
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
|
-
|
|
147
|
+
style: semanticStyle('header.cell'),
|
|
148
148
|
selector: '.el-table__header .el-table__cell',
|
|
149
149
|
},
|
|
150
150
|
];
|
|
@@ -106,19 +106,19 @@ export const TreeGridExControl = defineComponent({
|
|
|
106
106
|
// 子类样式透传
|
|
107
107
|
const childStyle = [
|
|
108
108
|
{
|
|
109
|
-
|
|
109
|
+
style: semanticStyle('body.row'),
|
|
110
110
|
selector: '.el-table__row',
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
|
-
|
|
113
|
+
style: semanticStyle('header.row'),
|
|
114
114
|
selector: '.el-table__header tr',
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
|
-
|
|
117
|
+
style: semanticStyle('body.cell'),
|
|
118
118
|
selector: '.el-table__body .el-table__cell',
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
|
-
|
|
121
|
+
style: semanticStyle('header.cell'),
|
|
122
122
|
selector: '.el-table__header .el-table__cell',
|
|
123
123
|
},
|
|
124
124
|
];
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
watch,
|
|
12
12
|
} from 'vue';
|
|
13
13
|
import { createUUID } from 'qx-util';
|
|
14
|
-
import { ITextArea } from '@ibiz/model-core';
|
|
15
14
|
import {
|
|
16
15
|
convertNavData,
|
|
17
16
|
calcDeCodeNameById,
|
|
@@ -39,6 +38,34 @@ export const IBizEmbedAIChat = defineComponent({
|
|
|
39
38
|
// AI聊天框挂载元素
|
|
40
39
|
const aiChatElementRef: Ref<HTMLElement | null> = ref(null);
|
|
41
40
|
let mountedFlag: boolean = false;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @description 获取 topicId
|
|
44
|
+
* @returns {*} {string}
|
|
45
|
+
*/
|
|
46
|
+
const getTopicId = (): string => {
|
|
47
|
+
const { appDataEntityId, appDEACModeId } = c.model;
|
|
48
|
+
if (!appDataEntityId || !appDEACModeId) return '';
|
|
49
|
+
const editorParams = { ...c.editorParams };
|
|
50
|
+
const appDataEntityName = calcDeCodeNameById(appDataEntityId!);
|
|
51
|
+
let topicId = `${appDataEntityId}@${c.model.appDEACModeId}@`;
|
|
52
|
+
// srfainewtopic 打开即新建会话,不去寻找历史会话
|
|
53
|
+
topicId += c.context[appDataEntityName]
|
|
54
|
+
? c.context[appDataEntityName]
|
|
55
|
+
: editorParams.srfainewtopic === 'true'
|
|
56
|
+
? createUUID()
|
|
57
|
+
: 'default';
|
|
58
|
+
// 附加会话标记附加至数据主键段,主要解决同一数据多个智能体会话历史数据混乱问题
|
|
59
|
+
if (editorParams.srfattachsessiontag) {
|
|
60
|
+
topicId += `__${editorParams.srfattachsessiontag}`;
|
|
61
|
+
delete editorParams.srfattachsessiontag;
|
|
62
|
+
} else {
|
|
63
|
+
// 每次打开没有明确指定会话附加标识,都应该独立
|
|
64
|
+
topicId += `__${createUUID()}`;
|
|
65
|
+
}
|
|
66
|
+
return topicId;
|
|
67
|
+
};
|
|
68
|
+
|
|
42
69
|
// 挂载AI聊天框
|
|
43
70
|
const mountedAIChat = async () => {
|
|
44
71
|
if (mountedFlag) return;
|
|
@@ -53,7 +80,7 @@ export const IBizEmbedAIChat = defineComponent({
|
|
|
53
80
|
);
|
|
54
81
|
Object.assign(editorParams, addParams);
|
|
55
82
|
}
|
|
56
|
-
const appDataEntityId =
|
|
83
|
+
const appDataEntityId = c.model.appDataEntityId;
|
|
57
84
|
const chatInstance = c.chatInstance;
|
|
58
85
|
if (!appDataEntityId || !c.deACMode || !chatInstance) {
|
|
59
86
|
// 条件未就绪时重置标记,允许后续事件触发时重试
|
|
@@ -71,23 +98,10 @@ export const IBizEmbedAIChat = defineComponent({
|
|
|
71
98
|
topicId = srfsessionid.substring(firstAtIndex + 1, lastAtIndex);
|
|
72
99
|
}
|
|
73
100
|
sessionid = editorParams.srfsessionid;
|
|
101
|
+
// 分享时重新计算topicId
|
|
102
|
+
if (c.isShare) topicId = getTopicId();
|
|
74
103
|
} else {
|
|
75
|
-
|
|
76
|
-
topicId = `${appDataEntityId}@${(c.model as ITextArea).appDEACModeId}@`;
|
|
77
|
-
// srfainewtopic 打开即新建会话,不去寻找历史会话
|
|
78
|
-
topicId += c.context[appDataEntityName]
|
|
79
|
-
? c.context[appDataEntityName]
|
|
80
|
-
: editorParams.srfainewtopic === 'true'
|
|
81
|
-
? createUUID()
|
|
82
|
-
: 'default';
|
|
83
|
-
// 附加会话标记附加至数据主键段,主要解决同一数据多个智能体会话历史数据混乱问题
|
|
84
|
-
if (editorParams.srfattachsessiontag) {
|
|
85
|
-
topicId += `__${editorParams.srfattachsessiontag}`;
|
|
86
|
-
delete editorParams.srfattachsessiontag;
|
|
87
|
-
} else {
|
|
88
|
-
// 每次打开没有明确指定会话附加标识,都应该独立
|
|
89
|
-
topicId += `__${createUUID()}`;
|
|
90
|
-
}
|
|
104
|
+
topicId = getTopicId();
|
|
91
105
|
sessionid = ibiz.aiChatUtil.getChatSessionId(
|
|
92
106
|
'TOPIC',
|
|
93
107
|
topicId,
|