@blueking/ai-ui-sdk 0.1.18-beta.8 → 0.1.19-beta.1
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/components/render-aside/index.vue.css +9 -9
- package/dist/components/render-aside/index.vue.js +1 -1
- package/dist/components/render-auto-height-textarea/index.script.vue.js.js +3 -3
- package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
- package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
- package/dist/components/render-auto-refresh/index.vue.css +8 -8
- package/dist/components/render-auto-refresh/index.vue.js +1 -1
- package/dist/components/render-checkbox/index.vue.css +9 -9
- package/dist/components/render-checkbox/index.vue.js +1 -1
- package/dist/components/render-choose-tag/index.vue.css +7 -7
- package/dist/components/render-choose-tag/index.vue.js +1 -1
- package/dist/components/render-collapse/index.vue.css +2 -2
- package/dist/components/render-collapse/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-review-dataset-data/index.script.vue.js.js +4 -2
- package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
- package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/search-dataset/index.script.vue.js.js +62 -16
- package/dist/components/render-dataset/index.vue.css +1 -1
- package/dist/components/render-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
- package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
- package/dist/components/render-dataset-list/components/main.vue.css +3 -3
- package/dist/components/render-dataset-list/components/main.vue.js +1 -1
- package/dist/components/render-expand-collapse/index.vue.css +3 -3
- package/dist/components/render-expand-collapse/index.vue.js +1 -1
- package/dist/components/render-file-card/index.vue.css +11 -11
- package/dist/components/render-file-card/index.vue.js +1 -1
- package/dist/components/render-file-type-icon/index.vue.css +5 -5
- package/dist/components/render-file-type-icon/index.vue.js +1 -1
- package/dist/components/render-header/index.vue.css +5 -5
- package/dist/components/render-header/index.vue.js +1 -1
- package/dist/components/render-like/index.script.vue.js.js +78 -62
- package/dist/components/render-like/index.vue.css +5 -5
- package/dist/components/render-like/index.vue.d.ts +5 -4
- package/dist/components/render-like/index.vue.js +1 -1
- package/dist/components/render-router-tab/index.vue.css +3 -3
- package/dist/components/render-router-tab/index.vue.js +1 -1
- package/dist/css/fonts/iconcool.eot +0 -0
- package/dist/css/fonts/iconcool.svg +6 -0
- package/dist/css/fonts/iconcool.ttf +0 -0
- package/dist/css/fonts/iconcool.woff +0 -0
- package/dist/css/iconcool.js +1 -1
- package/dist/css/style.css +6 -0
- package/dist/css/tailwind.css +933 -0
- package/dist/hooks/use-chat.d.ts +12 -0
- package/dist/hooks/use-click-proxy.d.ts +1 -1
- package/dist/hooks/use-click-proxy.ts.js +6 -2
- package/dist/hooks/use-session-http.d.ts +8 -2
- package/dist/hooks/use-session-http.ts.js +2 -2
- package/dist/hooks/use-style.d.ts +1 -0
- package/dist/hooks/use-style.ts.js +1 -0
- package/dist/hooks/use-think.ts.js +1 -0
- package/dist/http/helper/dataset.d.ts +1 -0
- package/dist/http/helper/dataset.ts.js +4 -2
- package/dist/http/helper/knowledge.ts.js +2 -0
- package/dist/http/helper/model.ts.js +15 -0
- package/dist/http/helper/session.ts.js +6 -0
- package/dist/http/helper/tool.ts.js +2 -0
- package/dist/types/agent.d.ts +1 -0
- package/dist/types/dataset.d.ts +4 -0
- package/dist/types/enum.d.ts +1 -0
- package/dist/types/enum.ts.js +1 -0
- package/dist/types/knowledge.d.ts +4 -0
- package/dist/types/model.d.ts +30 -0
- package/dist/types/session.d.ts +2 -0
- package/dist/types/tool.d.ts +4 -0
- package/package.json +6 -8
|
@@ -33,6 +33,7 @@ import { ref, toRef } from 'vue';
|
|
|
33
33
|
import { isMatchSearch } from '../../../../common/util.ts.js';
|
|
34
34
|
import RenderSearchSelect from '../../../render-search-select/index.vue.js';
|
|
35
35
|
import { useDatasetHttp } from '../../../../hooks/use-dataset-http.ts.js';
|
|
36
|
+
import { DatasetDataSourceType, EnumCharacter } from '../../../../types/enum.ts.js';
|
|
36
37
|
export default /*@__PURE__*/ _defineComponent({
|
|
37
38
|
props: {
|
|
38
39
|
modelValue: {},
|
|
@@ -52,11 +53,11 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
52
53
|
const data = ref([
|
|
53
54
|
{
|
|
54
55
|
id: 'datasetName',
|
|
55
|
-
name: '
|
|
56
|
+
name: '中文名称'
|
|
56
57
|
},
|
|
57
58
|
{
|
|
58
59
|
id: 'datasetCode',
|
|
59
|
-
name: '
|
|
60
|
+
name: '英文名称'
|
|
60
61
|
},
|
|
61
62
|
{
|
|
62
63
|
id: 'type',
|
|
@@ -65,23 +66,68 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
65
66
|
async: true,
|
|
66
67
|
children: []
|
|
67
68
|
},
|
|
68
|
-
props.isInternal ? {
|
|
69
|
-
id: 'tagName',
|
|
70
|
-
name: '标签'
|
|
71
|
-
} : {
|
|
72
|
-
id: 'componentIds',
|
|
73
|
-
name: '组件',
|
|
74
|
-
multiple: true,
|
|
75
|
-
async: true,
|
|
76
|
-
children: []
|
|
77
|
-
},
|
|
78
69
|
{
|
|
79
|
-
id: '
|
|
80
|
-
name: '
|
|
70
|
+
id: 'sourceType',
|
|
71
|
+
name: '创建方式',
|
|
72
|
+
multiple: true,
|
|
73
|
+
children: [
|
|
74
|
+
{
|
|
75
|
+
id: DatasetDataSourceType.UploadFile,
|
|
76
|
+
name: '文件上传'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: DatasetDataSourceType.ApiReport,
|
|
80
|
+
name: 'API上报'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: DatasetDataSourceType.KnowledgebaseImport,
|
|
84
|
+
name: '知识库导入'
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: DatasetDataSourceType.ManualImport,
|
|
88
|
+
name: '手动录入'
|
|
89
|
+
}
|
|
90
|
+
]
|
|
81
91
|
},
|
|
82
92
|
{
|
|
83
93
|
id: 'description',
|
|
84
94
|
name: '描述'
|
|
95
|
+
},
|
|
96
|
+
...!props.isInternal ? [
|
|
97
|
+
{
|
|
98
|
+
id: 'componentIds',
|
|
99
|
+
name: '组件',
|
|
100
|
+
multiple: true,
|
|
101
|
+
async: true,
|
|
102
|
+
children: []
|
|
103
|
+
}
|
|
104
|
+
] : [],
|
|
105
|
+
{
|
|
106
|
+
id: 'updatedBy',
|
|
107
|
+
name: '更新人'
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: 'generateType',
|
|
111
|
+
name: '公开范围',
|
|
112
|
+
multiple: true,
|
|
113
|
+
children: [
|
|
114
|
+
{
|
|
115
|
+
id: EnumCharacter.All,
|
|
116
|
+
name: '全部'
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: EnumCharacter.Space,
|
|
120
|
+
name: '当前空间'
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: EnumCharacter.User,
|
|
124
|
+
name: '用户'
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: EnumCharacter.Public,
|
|
128
|
+
name: '公开'
|
|
129
|
+
}
|
|
130
|
+
]
|
|
85
131
|
}
|
|
86
132
|
]);
|
|
87
133
|
const handleUpdate = (modelValue)=>{
|
|
@@ -90,7 +136,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
90
136
|
const handleGetMenuList = function() {
|
|
91
137
|
var _ref = _async_to_generator(function*(data, search) {
|
|
92
138
|
if (!data.async) {
|
|
93
|
-
return [];
|
|
139
|
+
return (data.children || []).filter((item)=>isMatchSearch(item.name, search));
|
|
94
140
|
}
|
|
95
141
|
if (data.id === 'componentIds') {
|
|
96
142
|
return handleGetComponentList(search);
|
|
@@ -128,7 +174,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
128
174
|
};
|
|
129
175
|
return (_ctx, _cache)=>{
|
|
130
176
|
return _openBlock(), _createBlock(RenderSearchSelect, {
|
|
131
|
-
placeholder: "
|
|
177
|
+
placeholder: "搜索中英文名称、类型、创建方式、描述、更新人、公开范围",
|
|
132
178
|
data: data.value,
|
|
133
179
|
"model-value": _ctx.modelValue,
|
|
134
180
|
"get-menu-list": handleGetMenuList,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
.origin-data-content[data-v-
|
|
2
|
+
.origin-data-content[data-v-g2rzk498] {
|
|
3
3
|
padding: 24px;
|
|
4
4
|
height: calc(100% - 52px - 44px);
|
|
5
5
|
}
|
|
6
|
-
.origin-data-panel[data-v-
|
|
6
|
+
.origin-data-panel[data-v-g2rzk498] {
|
|
7
7
|
height: 100%;
|
|
8
8
|
padding: 20px;
|
|
9
9
|
background: #ffffff;
|
|
10
10
|
box-shadow: 0 2px 4px 0 #1919290d;
|
|
11
11
|
border-radius: 2px;
|
|
12
12
|
}
|
|
13
|
-
.origin-data-panel .toolbar-search[data-v-
|
|
13
|
+
.origin-data-panel .toolbar-search[data-v-g2rzk498] {
|
|
14
14
|
width: 6.17rem;
|
|
15
15
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
.main-content[data-v-
|
|
2
|
+
.main-content[data-v-a009t58u] {
|
|
3
3
|
padding: 20px 24px;
|
|
4
4
|
height: calc(100% - 52px);
|
|
5
5
|
}
|
|
6
|
-
.main-panel[data-v-
|
|
6
|
+
.main-panel[data-v-a009t58u] {
|
|
7
7
|
height: 100%;
|
|
8
8
|
padding: 20px 24px 0;
|
|
9
9
|
background: #ffffff;
|
|
10
10
|
box-shadow: 0 2px 4px 0 #1919290d;
|
|
11
11
|
border-radius: 2px;
|
|
12
12
|
}
|
|
13
|
-
.main-search[data-v-
|
|
13
|
+
.main-search[data-v-a009t58u] {
|
|
14
14
|
width: 6.17rem;
|
|
15
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.expend-collapse-home[data-v-
|
|
2
|
+
.expend-collapse-home[data-v-oqqgmv1r] {
|
|
3
3
|
width: 16px;
|
|
4
4
|
height: 64px;
|
|
5
5
|
background: #DCDEE5;
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
z-index: 1550;
|
|
17
17
|
}
|
|
18
|
-
.expend-collapse-home[data-v-
|
|
18
|
+
.expend-collapse-home[data-v-oqqgmv1r]:hover {
|
|
19
19
|
background: #979BA5;
|
|
20
20
|
}
|
|
21
|
-
.expend-collapse-home.is-close[data-v-
|
|
21
|
+
.expend-collapse-home.is-close[data-v-oqqgmv1r] {
|
|
22
22
|
left: 0;
|
|
23
23
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
.upload-file-home[data-v-
|
|
2
|
+
.upload-file-home[data-v-oft3crl0] {
|
|
3
3
|
position: relative;
|
|
4
4
|
background: #FFFFFF;
|
|
5
5
|
border: 1px solid #DCDEE5;
|
|
6
6
|
border-radius: 4px;
|
|
7
7
|
padding: 12px 12px 10px 12px;
|
|
8
8
|
}
|
|
9
|
-
.upload-file-home[data-v-
|
|
9
|
+
.upload-file-home[data-v-oft3crl0]:hover {
|
|
10
10
|
border: 1px solid #3A84FF;
|
|
11
11
|
}
|
|
12
|
-
.upload-file-home:hover .file-icons[data-v-
|
|
12
|
+
.upload-file-home:hover .file-icons[data-v-oft3crl0] {
|
|
13
13
|
display: flex;
|
|
14
14
|
}
|
|
15
|
-
.upload-file-home .file-icon[data-v-
|
|
15
|
+
.upload-file-home .file-icon[data-v-oft3crl0] {
|
|
16
16
|
font-size: 32px;
|
|
17
17
|
}
|
|
18
|
-
.upload-file-home .file-content[data-v-
|
|
18
|
+
.upload-file-home .file-content[data-v-oft3crl0] {
|
|
19
19
|
font-size: 12px;
|
|
20
20
|
flex: 1;
|
|
21
21
|
align-items: flex-start;
|
|
@@ -23,28 +23,28 @@
|
|
|
23
23
|
font-weight: normal;
|
|
24
24
|
width: 0;
|
|
25
25
|
}
|
|
26
|
-
.upload-file-home .file-content .file-name[data-v-
|
|
26
|
+
.upload-file-home .file-content .file-name[data-v-oft3crl0] {
|
|
27
27
|
width: 100%;
|
|
28
28
|
font-size: 14px;
|
|
29
29
|
line-height: 20px;
|
|
30
30
|
}
|
|
31
|
-
.upload-file-home .file-content .file-size[data-v-
|
|
31
|
+
.upload-file-home .file-content .file-size[data-v-oft3crl0] {
|
|
32
32
|
font-size: 12px;
|
|
33
33
|
color: #979BA5;
|
|
34
34
|
line-height: 20px;
|
|
35
35
|
}
|
|
36
|
-
.upload-file-home .file-icons[data-v-
|
|
36
|
+
.upload-file-home .file-icons[data-v-oft3crl0] {
|
|
37
37
|
display: none;
|
|
38
38
|
color: #979BA5;
|
|
39
39
|
}
|
|
40
|
-
.upload-file-home .file-icons .bkaidev-icon[data-v-
|
|
40
|
+
.upload-file-home .file-icons .bkaidev-icon[data-v-oft3crl0] {
|
|
41
41
|
cursor: pointer;
|
|
42
42
|
margin-right: 15px;
|
|
43
43
|
font-size: 16px;
|
|
44
44
|
}
|
|
45
|
-
.upload-file-home .file-icons .bkaidev-icon[data-v-
|
|
45
|
+
.upload-file-home .file-icons .bkaidev-icon[data-v-oft3crl0]:hover {
|
|
46
46
|
color: #3A84FF;
|
|
47
47
|
}
|
|
48
|
-
.upload-file-home .file-icons .bkaidev-delete[data-v-
|
|
48
|
+
.upload-file-home .file-icons .bkaidev-delete[data-v-oft3crl0] {
|
|
49
49
|
margin: 0;
|
|
50
50
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
.ai-ui-sdk-icon.ai-ui-sdk-pdf[data-v-
|
|
2
|
+
.ai-ui-sdk-icon.ai-ui-sdk-pdf[data-v-xp3f16du] {
|
|
3
3
|
color: #EA3636;
|
|
4
4
|
}
|
|
5
|
-
.ai-ui-sdk-icon.ai-ui-sdk-doc-2[data-v-
|
|
5
|
+
.ai-ui-sdk-icon.ai-ui-sdk-doc-2[data-v-xp3f16du], .ai-ui-sdk-icon.ai-ui-sdk-ppt-2[data-v-xp3f16du], .ai-ui-sdk-icon.ai-ui-sdk-markdown[data-v-xp3f16du] {
|
|
6
6
|
color: #3A84FF;
|
|
7
7
|
}
|
|
8
|
-
.ai-ui-sdk-icon.ai-ui-sdk-folder-fill[data-v-
|
|
8
|
+
.ai-ui-sdk-icon.ai-ui-sdk-folder-fill[data-v-xp3f16du] {
|
|
9
9
|
color: #C4C6CC;
|
|
10
10
|
}
|
|
11
|
-
.ai-ui-sdk-icon.ai-ui-sdk-excel[data-v-
|
|
11
|
+
.ai-ui-sdk-icon.ai-ui-sdk-excel[data-v-xp3f16du] {
|
|
12
12
|
color: #2DCB56;
|
|
13
13
|
}
|
|
14
|
-
.ai-ui-sdk-icon.ai-ui-sdk-wangye[data-v-
|
|
14
|
+
.ai-ui-sdk-icon.ai-ui-sdk-wangye[data-v-xp3f16du] {
|
|
15
15
|
color: #14A568;
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.header-home[data-v-
|
|
2
|
+
.header-home[data-v-6ymnvla2] {
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 52px;
|
|
5
5
|
background: #FFFFFF;
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
position: relative;
|
|
8
8
|
z-index: 2;
|
|
9
9
|
}
|
|
10
|
-
.header-title[data-v-
|
|
10
|
+
.header-title[data-v-6ymnvla2] {
|
|
11
11
|
position: absolute;
|
|
12
12
|
left: 24px;
|
|
13
13
|
top: 14px;
|
|
14
14
|
font-size: 16px;
|
|
15
15
|
color: #313238;
|
|
16
16
|
}
|
|
17
|
-
.header-main[data-v-
|
|
17
|
+
.header-main[data-v-6ymnvla2] {
|
|
18
18
|
display: flex;
|
|
19
19
|
align-items: center;
|
|
20
20
|
justify-content: flex-end;
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
height: 100%;
|
|
23
23
|
margin: 0 auto;
|
|
24
24
|
}
|
|
25
|
-
.header-select[data-v-
|
|
25
|
+
.header-select[data-v-6ymnvla2] {
|
|
26
26
|
width: 300px;
|
|
27
27
|
margin-right: 8px;
|
|
28
28
|
z-index: 9;
|
|
29
29
|
font-size: 12px;
|
|
30
30
|
}
|
|
31
|
-
.header-input[data-v-
|
|
31
|
+
.header-input[data-v-6ymnvla2] {
|
|
32
32
|
width: 300px;
|
|
33
33
|
font-size: 12px;
|
|
34
34
|
}
|
|
@@ -1,5 +1,33 @@
|
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
2
|
+
if (key in obj) {
|
|
3
|
+
Object.defineProperty(obj, key, {
|
|
4
|
+
value: value,
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true
|
|
8
|
+
});
|
|
9
|
+
} else {
|
|
10
|
+
obj[key] = value;
|
|
11
|
+
}
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
14
|
+
function _object_spread(target) {
|
|
15
|
+
for(var i = 1; i < arguments.length; i++){
|
|
16
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
+
var ownKeys = Object.keys(source);
|
|
18
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
ownKeys.forEach(function(key) {
|
|
24
|
+
_define_property(target, key, source[key]);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
}
|
|
1
29
|
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
-
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass,
|
|
30
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, unref as _unref, createElementVNode as _createElementVNode, withDirectives as _withDirectives, withModifiers as _withModifiers, toDisplayString as _toDisplayString, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, createVNode as _createVNode, createTextVNode as _createTextVNode, mergeProps as _mergeProps, createBlock as _createBlock } from "vue";
|
|
3
31
|
const _hoisted_1 = {
|
|
4
32
|
class: "select-options"
|
|
5
33
|
};
|
|
@@ -12,7 +40,8 @@ const _hoisted_3 = [
|
|
|
12
40
|
const _hoisted_4 = {
|
|
13
41
|
class: "g-flex-row g-justify-end g-mt-16"
|
|
14
42
|
};
|
|
15
|
-
import { clickoutside as vClickoutside } from 'bkui-vue';
|
|
43
|
+
import { bkTooltips as vBkTooltips, Button as BkButton, clickoutside as vClickoutside, Form as BkForm, Loading as BkLoading, Popover as BkPopover } from 'bkui-vue';
|
|
44
|
+
import { BkFormItem } from 'bkui-vue/lib/form';
|
|
16
45
|
import { ref, watch } from 'vue';
|
|
17
46
|
import RenderAutoHeightTextarea from '../render-auto-height-textarea/index.vue.js';
|
|
18
47
|
import { useSessionHttp } from '../../hooks/use-session-http.ts.js';
|
|
@@ -24,11 +53,12 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
24
53
|
spaceId: {},
|
|
25
54
|
rate: {},
|
|
26
55
|
comment: {},
|
|
27
|
-
labels: {}
|
|
56
|
+
labels: {},
|
|
57
|
+
popoverOptions: {},
|
|
58
|
+
tooltipOptions: {}
|
|
28
59
|
},
|
|
29
60
|
emits: [
|
|
30
|
-
"update-session-content-list"
|
|
31
|
-
"close"
|
|
61
|
+
"update-session-content-list"
|
|
32
62
|
],
|
|
33
63
|
setup (__props, { emit: __emit }) {
|
|
34
64
|
const props = __props;
|
|
@@ -46,34 +76,21 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
46
76
|
const formData = ref({
|
|
47
77
|
sessionCode: props.sessionCode,
|
|
48
78
|
sessionContentIds: props.sessionContentIds,
|
|
49
|
-
rate: props.rate === 5 || props.rate === 1 ? props.rate :
|
|
79
|
+
rate: props.rate === 5 || props.rate === 1 ? props.rate : 0,
|
|
50
80
|
comment: props.comment,
|
|
51
81
|
labels: props.labels || []
|
|
52
82
|
});
|
|
53
|
-
const handleClick = (number)=>{
|
|
54
|
-
const currentRate = formData.value.rate;
|
|
55
|
-
formData.value.rate = currentRate === number ? undefined : number;
|
|
56
|
-
isShow.value = formData.value.rate !== undefined;
|
|
57
|
-
if (props.rate === formData.value.rate) {
|
|
58
|
-
formData.value.comment = props.comment;
|
|
59
|
-
formData.value.labels = props.labels || [];
|
|
60
|
-
} else {
|
|
61
|
-
formData.value.comment = '';
|
|
62
|
-
formData.value.labels = [];
|
|
63
|
-
}
|
|
64
|
-
handleGetSessionFeedbackLables();
|
|
65
|
-
};
|
|
66
83
|
const getTooltipContent = (number)=>{
|
|
67
84
|
const tooltipMap = {
|
|
68
85
|
5: {
|
|
69
86
|
5: '取消满意',
|
|
70
87
|
1: '满意',
|
|
71
|
-
|
|
88
|
+
0: '满意'
|
|
72
89
|
},
|
|
73
90
|
1: {
|
|
74
91
|
5: '不满意',
|
|
75
92
|
1: '取消不满意',
|
|
76
|
-
|
|
93
|
+
0: '不满意'
|
|
77
94
|
}
|
|
78
95
|
};
|
|
79
96
|
const rate = formData.value.rate;
|
|
@@ -86,7 +103,21 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
86
103
|
option
|
|
87
104
|
];
|
|
88
105
|
};
|
|
89
|
-
const
|
|
106
|
+
const handleClick = (number)=>{
|
|
107
|
+
formData.value.rate = formData.value.rate === number ? 0 : number;
|
|
108
|
+
formData.value.comment = '';
|
|
109
|
+
formData.value.labels = [];
|
|
110
|
+
formData.value.sessionContentIds = props.sessionContentIds;
|
|
111
|
+
isShow.value = formData.value.rate !== 0;
|
|
112
|
+
if (isShow.value) {
|
|
113
|
+
handleGetSessionFeedbackLabels();
|
|
114
|
+
} else {
|
|
115
|
+
postSessionFeedback(formData.value).then(()=>{
|
|
116
|
+
emit('update-session-content-list', formData.value);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const handleGetSessionFeedbackLabels = ()=>{
|
|
90
121
|
loading.value = true;
|
|
91
122
|
getSessionFeedbackLabels(formData.value.rate).then((result)=>{
|
|
92
123
|
feedbackOptions.value = result;
|
|
@@ -97,19 +128,15 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
97
128
|
const handleSubmit = ()=>{
|
|
98
129
|
submitting.value = true;
|
|
99
130
|
postSessionFeedback(formData.value).then(()=>{
|
|
100
|
-
emit('update-session-content-list');
|
|
101
|
-
|
|
131
|
+
emit('update-session-content-list', formData.value);
|
|
132
|
+
isShow.value = false;
|
|
102
133
|
}).finally(()=>{
|
|
103
134
|
submitting.value = false;
|
|
104
135
|
});
|
|
105
136
|
};
|
|
106
137
|
const handleClose = ()=>{
|
|
107
138
|
isShow.value = false;
|
|
108
|
-
|
|
109
|
-
if (!isShow.value) {
|
|
110
|
-
formData.value.rate = undefined;
|
|
111
|
-
}
|
|
112
|
-
}, 100);
|
|
139
|
+
formData.value.rate = 0;
|
|
113
140
|
};
|
|
114
141
|
const handleClickOutside = (event)=>{
|
|
115
142
|
const target = event.target;
|
|
@@ -117,43 +144,32 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
117
144
|
handleClose();
|
|
118
145
|
}
|
|
119
146
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
formData.value.sessionContentIds = newIds;
|
|
123
|
-
}, {
|
|
124
|
-
deep: true
|
|
147
|
+
watch(()=>props.rate, (newRate)=>{
|
|
148
|
+
formData.value.rate = newRate === 5 || newRate === 1 ? newRate : 0;
|
|
125
149
|
});
|
|
126
150
|
return (_ctx, _cache)=>{
|
|
127
|
-
|
|
128
|
-
const _component_bk_loading = _resolveComponent("bk-loading");
|
|
129
|
-
const _component_bk_form = _resolveComponent("bk-form");
|
|
130
|
-
const _component_bk_button = _resolveComponent("bk-button");
|
|
131
|
-
const _component_bk_popover = _resolveComponent("bk-popover");
|
|
132
|
-
const _directive_bk_tooltips = _resolveDirective("bk-tooltips");
|
|
133
|
-
return _openBlock(), _createBlock(_component_bk_popover, {
|
|
151
|
+
return _openBlock(), _createBlock(_unref(BkPopover), _mergeProps(_ctx.popoverOptions, {
|
|
134
152
|
theme: "light",
|
|
135
153
|
placement: "bottom",
|
|
136
154
|
width: "450",
|
|
137
155
|
trigger: "manual",
|
|
138
156
|
arrow: false,
|
|
139
157
|
"is-show": isShow.value
|
|
140
|
-
}, {
|
|
158
|
+
}), {
|
|
141
159
|
content: _withCtx(()=>[
|
|
142
160
|
_withDirectives((_openBlock(), _createElementBlock("section", _hoisted_1, [
|
|
143
|
-
_createVNode(
|
|
161
|
+
_createVNode(_unref(BkForm), {
|
|
144
162
|
"form-type": "vertical",
|
|
145
163
|
ref: "formRef",
|
|
146
164
|
class: "g-small-form g-short-form",
|
|
147
165
|
model: formData.value
|
|
148
166
|
}, {
|
|
149
167
|
default: _withCtx(()=>[
|
|
150
|
-
_createVNode(
|
|
168
|
+
_createVNode(_unref(BkLoading), {
|
|
151
169
|
loading: loading.value
|
|
152
170
|
}, {
|
|
153
171
|
default: _withCtx(()=>[
|
|
154
|
-
|
|
155
|
-
key: 0
|
|
156
|
-
}, {
|
|
172
|
+
_createVNode(_unref(BkFormItem), null, {
|
|
157
173
|
default: _withCtx(()=>[
|
|
158
174
|
_createElementVNode("h5", _hoisted_2, _toDisplayString(formData.value.rate === 5 ? '什么原因让你满意?' : '什么原因让你不满意?'), 1 /* TEXT */ ),
|
|
159
175
|
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(feedbackOptions.value, (option, index)=>{
|
|
@@ -170,8 +186,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
170
186
|
}), 128 /* KEYED_FRAGMENT */ ))
|
|
171
187
|
]),
|
|
172
188
|
_: 1 /* STABLE */
|
|
173
|
-
})
|
|
174
|
-
_createVNode(
|
|
189
|
+
}),
|
|
190
|
+
_createVNode(_unref(BkFormItem), null, {
|
|
175
191
|
default: _withCtx(()=>[
|
|
176
192
|
_cache[3] || (_cache[3] = _createElementVNode("h5", {
|
|
177
193
|
class: "g-text-12 g-mb-4"
|
|
@@ -202,7 +218,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
202
218
|
"model"
|
|
203
219
|
]),
|
|
204
220
|
_createElementVNode("section", _hoisted_4, [
|
|
205
|
-
_createVNode(
|
|
221
|
+
_createVNode(_unref(BkButton), {
|
|
206
222
|
class: "g-width-88",
|
|
207
223
|
theme: "primary",
|
|
208
224
|
disabled: !formData.value.comment && !(formData.value.labels && formData.value.labels.length > 0),
|
|
@@ -222,7 +238,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
222
238
|
"disabled",
|
|
223
239
|
"loading"
|
|
224
240
|
]),
|
|
225
|
-
_createVNode(
|
|
241
|
+
_createVNode(_unref(BkButton), {
|
|
226
242
|
class: "g-width-88 g-ml-8",
|
|
227
243
|
onClick: _withModifiers(handleClose, [
|
|
228
244
|
"stop"
|
|
@@ -249,17 +265,17 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
249
265
|
onClick: _cache[0] || (_cache[0] = _withModifiers(($event)=>handleClick(5), [
|
|
250
266
|
"stop"
|
|
251
267
|
])),
|
|
252
|
-
class: "select-options"
|
|
268
|
+
class: "select-options g-inline-flex-row"
|
|
253
269
|
}, [
|
|
254
270
|
_renderSlot(_ctx.$slots, "like", {}, ()=>[
|
|
255
271
|
_withDirectives(_createElementVNode("i", {
|
|
256
272
|
class: _normalizeClass([
|
|
257
|
-
'
|
|
258
|
-
formData.value.rate === 5 ? 'g-text-blue
|
|
273
|
+
'ai-ui-sdk-icon g-hover-text-blue g-cursor-pointer g-mr-8',
|
|
274
|
+
formData.value.rate === 5 ? 'g-text-blue ai-ui-sdk-like' : 'g-text-gray ai-ui-sdk-unlike'
|
|
259
275
|
])
|
|
260
276
|
}, null, 2 /* CLASS */ ), [
|
|
261
277
|
[
|
|
262
|
-
|
|
278
|
+
_unref(vBkTooltips),
|
|
263
279
|
{
|
|
264
280
|
content: getTooltipContent(5),
|
|
265
281
|
placement: 'top'
|
|
@@ -272,28 +288,28 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
272
288
|
onClick: _cache[1] || (_cache[1] = _withModifiers(($event)=>handleClick(1), [
|
|
273
289
|
"stop"
|
|
274
290
|
])),
|
|
275
|
-
class: "select-options"
|
|
291
|
+
class: "select-options g-inline-flex-row"
|
|
276
292
|
}, [
|
|
277
293
|
_renderSlot(_ctx.$slots, "dislike", {}, ()=>[
|
|
278
294
|
_withDirectives(_createElementVNode("i", {
|
|
279
295
|
class: _normalizeClass([
|
|
280
|
-
'
|
|
281
|
-
formData.value.rate === 1 ? 'g-text-red
|
|
296
|
+
'ai-ui-sdk-icon dislike-icon g-inline-block g-cursor-pointer g-hover-text-red',
|
|
297
|
+
formData.value.rate === 1 ? 'g-text-red ai-ui-sdk-like' : 'g-text-gray ai-ui-sdk-unlike'
|
|
282
298
|
])
|
|
283
299
|
}, null, 2 /* CLASS */ ), [
|
|
284
300
|
[
|
|
285
|
-
|
|
286
|
-
{
|
|
301
|
+
_unref(vBkTooltips),
|
|
302
|
+
_object_spread({
|
|
287
303
|
content: getTooltipContent(1),
|
|
288
304
|
placement: 'top'
|
|
289
|
-
}
|
|
305
|
+
}, _ctx.tooltipOptions)
|
|
290
306
|
]
|
|
291
307
|
])
|
|
292
308
|
], true)
|
|
293
309
|
])
|
|
294
310
|
]),
|
|
295
311
|
_: 3 /* FORWARDED */
|
|
296
|
-
},
|
|
312
|
+
}, 16 /* FULL_PROPS */ , [
|
|
297
313
|
"is-show"
|
|
298
314
|
]);
|
|
299
315
|
};
|