@blueking/ai-ui-sdk 0.1.10-beta.1 → 0.1.10-beta.10
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/common/util.d.ts +7 -0
- package/dist/common/util.ts.js +9 -0
- 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.vue.css +11 -11
- package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
- package/dist/components/render-auto-refresh/index.script.vue.js.js +125 -0
- package/dist/components/render-auto-refresh/index.vue.css +45 -0
- package/dist/components/render-auto-refresh/index.vue.d.ts +6 -0
- package/dist/components/render-auto-refresh/index.vue.js +5 -0
- package/dist/components/render-checkbox/index.script.vue.js.js +37 -0
- package/dist/components/render-checkbox/index.vue.css +59 -0
- package/dist/components/render-checkbox/index.vue.d.ts +11 -0
- package/dist/components/render-checkbox/index.vue.js +5 -0
- package/dist/components/render-choose-tag/index.script.vue.js.js +68 -65
- package/dist/components/render-choose-tag/index.vue.css +19 -12
- package/dist/components/render-choose-tag/index.vue.d.ts +3 -3
- 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 +8 -5
- package/dist/components/render-dataset/components/batch-review-dataset-data/index.vue.d.ts +1 -0
- package/dist/components/render-dataset/components/dataset-data-level/index.script.vue.js.js +19 -0
- package/dist/components/render-dataset/components/dataset-data-level/index.vue.d.ts +6 -0
- package/dist/components/render-dataset/components/dataset-data-level/index.vue.js +3 -0
- package/dist/components/render-dataset/components/dataset-data-status/index.script.vue.js.js +1 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.script.vue.js.js +3 -2
- 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.d.ts +2 -0
- 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.script.vue.js.js +23 -12
- 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.script.vue.js.js +1 -7
- 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/dataset-form.script.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/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.script.vue.js.js +180 -151
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +29 -3
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.d.ts +2 -0
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/search-dataset-data/index.script.vue.js.js +6 -6
- package/dist/components/render-dataset/components/search-operation-record/index.script.vue.js.js +4 -0
- 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/components/batch-operation/index.script.vue.js.js +2 -0
- package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +72 -40
- package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.css +1 -1
- package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.js +1 -1
- package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.js +47 -28
- 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-dataset-list/components/table.script.vue.js.js +6 -3
- 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.script.vue.js.js +17 -33
- package/dist/components/render-header/index.vue.css +5 -5
- package/dist/components/render-header/index.vue.d.ts +15 -10
- package/dist/components/render-header/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/components.d.ts +4 -1
- package/dist/components.ts.js +4 -1
- package/dist/css/fonts/iconcool.eot +0 -0
- package/dist/css/fonts/iconcool.svg +9 -0
- package/dist/css/fonts/iconcool.ttf +0 -0
- package/dist/css/fonts/iconcool.woff +0 -0
- package/dist/css/iconcool.js +2 -2
- package/dist/css/style.css +9 -0
- package/dist/hooks/use-chat.d.ts +8 -2
- package/dist/hooks/use-chat.ts.js +22 -0
- package/dist/hooks/use-meta-http.d.ts +3 -3
- package/dist/hooks/use-meta-http.ts.js +6 -5
- package/dist/http/helper/dataset.d.ts +2 -1
- package/dist/http/helper/dataset.ts.js +15 -10
- package/dist/http/helper/knowledge.ts.js +3 -0
- package/dist/http/helper/meta.d.ts +2 -0
- package/dist/http/helper/meta.ts.js +7 -0
- package/dist/http/helper/model.d.ts +2 -0
- package/dist/http/helper/model.ts.js +15 -0
- package/dist/transforms.d.ts +1 -0
- package/dist/transforms.ts.js +1 -0
- package/dist/types/dataset.d.ts +24 -17
- package/dist/types/enum.d.ts +3 -2
- package/dist/types/enum.ts.js +8 -7
- package/dist/types/knowledge.d.ts +4 -2
- package/dist/types/meta.d.ts +5 -0
- package/dist/types/model.d.ts +17 -0
- package/dist/types/model.ts.js +1 -0
- package/dist/types/session.d.ts +4 -4
- package/dist/types.d.ts +1 -0
- package/dist/types.ts.js +1 -0
- package/package.json +20 -2
- package/dist/types/tag.d.ts +0 -7
@@ -28,17 +28,15 @@ function _async_to_generator(fn) {
|
|
28
28
|
};
|
29
29
|
}
|
30
30
|
import { defineComponent as _defineComponent } from 'vue';
|
31
|
-
import {
|
31
|
+
import { resolveComponent as _resolveComponent, createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, unref as _unref, resolveDirective as _resolveDirective, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, createBlock as _createBlock } from "vue";
|
32
32
|
const _hoisted_1 = {
|
33
33
|
key: 0,
|
34
|
-
class: "g-flex-row plus-tag-input"
|
34
|
+
class: "g-flex-row plus-tag-input render-tag"
|
35
35
|
};
|
36
|
-
import { Message } from 'bkui-vue';
|
37
36
|
import { Done, Error } from 'bkui-vue/lib/icon';
|
38
|
-
import {
|
37
|
+
import { onBeforeMount, ref, toRef, watch } from 'vue';
|
39
38
|
import { useFormRule } from '../../hooks/use-form-rule.ts.js';
|
40
39
|
import { useMetaHttp } from '../../hooks/use-meta-http.ts.js';
|
41
|
-
import { HttpErrorCode, Modules } from '../../types/enum.ts.js';
|
42
40
|
export default /*@__PURE__*/ _defineComponent({
|
43
41
|
props: {
|
44
42
|
modelValue: {},
|
@@ -52,67 +50,66 @@ export default /*@__PURE__*/ _defineComponent({
|
|
52
50
|
setup (__props, { emit: __emit }) {
|
53
51
|
const props = __props;
|
54
52
|
const emits = __emit;
|
53
|
+
const { getLengthRule } = useFormRule(props.apiPrefix, toRef(props, 'spaceId'));
|
55
54
|
const { getTags, plusTag, checkTag } = useMetaHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
56
|
-
const { getNameRule, getLengthRule } = useFormRule(props.apiPrefix, toRef(props, 'spaceId'));
|
57
55
|
const isShowEdit = ref(false);
|
58
56
|
const isPulsingTag = ref(false);
|
59
57
|
const tempTagName = ref('');
|
60
58
|
const tagRef = ref();
|
61
59
|
const tagFormRef = ref();
|
62
60
|
const isLoadingTag = ref(false);
|
61
|
+
const isShow = ref(false);
|
63
62
|
const tags = ref([]);
|
64
63
|
const checkTagRule = {
|
65
|
-
validator: (value)=>checkTag(value).then(()=>true).catch(()=>false),
|
64
|
+
validator: (value)=>checkTag(handleGetTagNames(value)).then(()=>true).catch(()=>false),
|
66
65
|
message: '标签名称重复',
|
67
66
|
trigger: 'change'
|
68
67
|
};
|
69
68
|
const tagRules = {
|
70
69
|
tempTagName: [
|
71
|
-
getNameRule(Modules.Tag),
|
72
70
|
checkTagRule,
|
73
71
|
getLengthRule('标签名称', 16)
|
74
72
|
]
|
75
73
|
};
|
76
|
-
const
|
77
|
-
|
78
|
-
nextTick(()=>{
|
79
|
-
tagRef.value.focus();
|
80
|
-
});
|
74
|
+
const handleFocus = ()=>{
|
75
|
+
isShow.value = true;
|
81
76
|
};
|
82
|
-
const
|
83
|
-
|
84
|
-
handleHidePlusTag();
|
85
|
-
}
|
77
|
+
const handleBlur = ()=>{
|
78
|
+
isShow.value = false;
|
86
79
|
};
|
87
|
-
const
|
88
|
-
emits('update:modelValue',
|
80
|
+
const handleChange = (val)=>{
|
81
|
+
emits('update:modelValue', val);
|
89
82
|
};
|
90
83
|
const handleTagKeyDown = (value, event)=>{
|
91
84
|
if (event.keyCode === 13 || event.key === 'Enter') {
|
92
85
|
handlePlusTag();
|
93
86
|
}
|
94
87
|
};
|
88
|
+
const handleGetTagNames = (tagName)=>{
|
89
|
+
const tagGroups = tagName.split('、');
|
90
|
+
return tagGroups.reduce((acc, cur)=>{
|
91
|
+
if (cur.trim()) {
|
92
|
+
const tagNames = cur.split('/').filter(Boolean);
|
93
|
+
acc.push(tagNames);
|
94
|
+
}
|
95
|
+
return acc;
|
96
|
+
}, []);
|
97
|
+
};
|
95
98
|
const handlePlusTag = function() {
|
96
99
|
var _ref = _async_to_generator(function*() {
|
97
100
|
try {
|
98
101
|
isPulsingTag.value = true;
|
102
|
+
const tagNames = handleGetTagNames(tempTagName.value);
|
99
103
|
yield tagFormRef.value.validate();
|
100
|
-
yield plusTag(
|
104
|
+
yield plusTag(tagNames);
|
101
105
|
emits('update:modelValue', [
|
102
106
|
...props.modelValue,
|
103
|
-
|
107
|
+
...tagNames
|
104
108
|
]);
|
105
109
|
handleGetTags();
|
106
110
|
handleHidePlusTag();
|
107
111
|
} catch (error) {
|
108
|
-
|
109
|
-
Message({
|
110
|
-
message: '标签已存在,请重新输入',
|
111
|
-
theme: 'error'
|
112
|
-
});
|
113
|
-
} else {
|
114
|
-
console.error(error.message || error);
|
115
|
-
}
|
112
|
+
console.error(error.message || error);
|
116
113
|
} finally{
|
117
114
|
isPulsingTag.value = false;
|
118
115
|
}
|
@@ -121,6 +118,9 @@ export default /*@__PURE__*/ _defineComponent({
|
|
121
118
|
return _ref.apply(this, arguments);
|
122
119
|
};
|
123
120
|
}();
|
121
|
+
const handleShowPlusTag = ()=>{
|
122
|
+
isShowEdit.value = true;
|
123
|
+
};
|
124
124
|
const handleHidePlusTag = ()=>{
|
125
125
|
isShowEdit.value = false;
|
126
126
|
tempTagName.value = '';
|
@@ -136,23 +136,22 @@ export default /*@__PURE__*/ _defineComponent({
|
|
136
136
|
watch(()=>props.spaceId, handleGetTags);
|
137
137
|
onBeforeMount(handleGetTags);
|
138
138
|
return (_ctx, _cache)=>{
|
139
|
-
const _component_bk_option = _resolveComponent("bk-option");
|
140
139
|
const _component_bk_input = _resolveComponent("bk-input");
|
140
|
+
const _component_bk_popover = _resolveComponent("bk-popover");
|
141
141
|
const _component_bk_form_item = _resolveComponent("bk-form-item");
|
142
142
|
const _component_bk_form = _resolveComponent("bk-form");
|
143
|
-
const
|
143
|
+
const _component_bk_cascader = _resolveComponent("bk-cascader");
|
144
144
|
const _directive_bkloading = _resolveDirective("bkloading");
|
145
|
-
return _openBlock(), _createBlock(
|
146
|
-
multiple: "",
|
145
|
+
return _openBlock(), _createBlock(_component_bk_cascader, {
|
147
146
|
filterable: "",
|
148
|
-
"
|
149
|
-
"
|
150
|
-
"
|
147
|
+
"id-key": "tagName",
|
148
|
+
"name-key": "tagName",
|
149
|
+
"ext-cls": "tag-cascader",
|
150
|
+
multiple: true,
|
151
151
|
loading: isLoadingTag.value,
|
152
|
-
|
152
|
+
list: tags.value,
|
153
153
|
"model-value": _ctx.modelValue,
|
154
|
-
|
155
|
-
onToggle: handleTagToggle
|
154
|
+
"onUpdate:modelValue": handleChange
|
156
155
|
}, {
|
157
156
|
extension: _withCtx(()=>[
|
158
157
|
isShowEdit.value ? (_openBlock(), _createElementBlock("section", _hoisted_1, [
|
@@ -174,16 +173,32 @@ export default /*@__PURE__*/ _defineComponent({
|
|
174
173
|
required: ""
|
175
174
|
}, {
|
176
175
|
default: _withCtx(()=>[
|
177
|
-
_createVNode(
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
176
|
+
_createVNode(_component_bk_popover, {
|
177
|
+
"is-show": isShow.value,
|
178
|
+
theme: "light",
|
179
|
+
trigger: "manual"
|
180
|
+
}, {
|
181
|
+
content: _withCtx(()=>_cache[1] || (_cache[1] = [
|
182
|
+
_createTextVNode(" 如需定义层级标签,以英文“/”分割层级,多个标签以“、”分隔 ")
|
183
|
+
])),
|
184
|
+
default: _withCtx(()=>[
|
185
|
+
_createVNode(_component_bk_input, {
|
186
|
+
modelValue: tempTagName.value,
|
187
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>tempTagName.value = $event),
|
188
|
+
maxlength: 20,
|
189
|
+
ref_key: "tagRef",
|
190
|
+
ref: tagRef,
|
191
|
+
placeholder: "如需定义层级标签,以英文“/”分割层级,多个标签以“、”分隔",
|
192
|
+
onKeydown: handleTagKeyDown,
|
193
|
+
onFocus: handleFocus,
|
194
|
+
onBlur: handleBlur
|
195
|
+
}, null, 8 /* PROPS */ , [
|
196
|
+
"modelValue"
|
197
|
+
])
|
198
|
+
]),
|
199
|
+
_: 1 /* STABLE */
|
200
|
+
}, 8 /* PROPS */ , [
|
201
|
+
"is-show"
|
187
202
|
])
|
188
203
|
]),
|
189
204
|
_: 1 /* STABLE */
|
@@ -210,31 +225,19 @@ export default /*@__PURE__*/ _defineComponent({
|
|
210
225
|
})
|
211
226
|
])) : (_openBlock(), _createElementBlock("span", {
|
212
227
|
key: 1,
|
213
|
-
class: "plus-tag",
|
228
|
+
class: "plus-tag render-tag",
|
214
229
|
onClick: handleShowPlusTag
|
215
|
-
}, _cache[
|
230
|
+
}, _cache[2] || (_cache[2] = [
|
216
231
|
_createElementVNode("i", {
|
217
|
-
class: "
|
232
|
+
class: "ai-ui-sdk-icon ai-ui-sdk-plus-circle g-text-14 g-mr-6"
|
218
233
|
}, null, -1 /* HOISTED */ ),
|
219
234
|
_createTextVNode(" 新建标签 ")
|
220
235
|
])))
|
221
236
|
]),
|
222
|
-
default: _withCtx(()=>[
|
223
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tags.value, (tag)=>{
|
224
|
-
return _openBlock(), _createBlock(_component_bk_option, {
|
225
|
-
key: tag,
|
226
|
-
id: tag,
|
227
|
-
name: tag
|
228
|
-
}, null, 8 /* PROPS */ , [
|
229
|
-
"id",
|
230
|
-
"name"
|
231
|
-
]);
|
232
|
-
}), 128 /* KEYED_FRAGMENT */ ))
|
233
|
-
]),
|
234
237
|
_: 1 /* STABLE */
|
235
238
|
}, 8 /* PROPS */ , [
|
236
|
-
"popover-options",
|
237
239
|
"loading",
|
240
|
+
"list",
|
238
241
|
"model-value"
|
239
242
|
]);
|
240
243
|
};
|
@@ -1,39 +1,46 @@
|
|
1
1
|
|
2
|
-
.plus-tag-input[data-v-
|
2
|
+
.plus-tag-input[data-v-cfz2a66r] {
|
3
3
|
padding: 7px 12px;
|
4
|
-
|
4
|
+
height: 40px;
|
5
|
+
background: #FAFBFD;
|
6
|
+
border-top: 1px solid #DCDEE5;
|
5
7
|
}
|
6
|
-
.plus-tag-input .plus-tag-done[data-v-
|
8
|
+
.plus-tag-input .plus-tag-done[data-v-cfz2a66r] {
|
7
9
|
cursor: pointer;
|
8
10
|
font-size: 22px;
|
9
11
|
color: #2DCB56;
|
10
12
|
margin: 0 5px 0 10px;
|
11
13
|
}
|
12
|
-
.plus-tag-input .plus-tag-error[data-v-
|
14
|
+
.plus-tag-input .plus-tag-error[data-v-cfz2a66r] {
|
13
15
|
cursor: pointer;
|
14
16
|
font-size: 16px;
|
15
17
|
color: #C4C6CC;
|
16
18
|
margin-right: 5px;
|
17
19
|
}
|
18
|
-
.plus-tag-input .plus-tag-form[data-v-
|
20
|
+
.plus-tag-input .plus-tag-form[data-v-cfz2a66r] {
|
19
21
|
flex: 1;
|
20
22
|
}
|
21
|
-
.plus-tag-input .plus-tag-form-item[data-v-
|
23
|
+
.plus-tag-input .plus-tag-form-item[data-v-cfz2a66r] {
|
22
24
|
margin-bottom: 0;
|
23
25
|
}
|
24
|
-
.plus-tag[data-v-
|
26
|
+
.plus-tag[data-v-cfz2a66r] {
|
25
27
|
cursor: pointer;
|
26
28
|
width: 100%;
|
29
|
+
height: 40px;
|
30
|
+
background: #FAFBFD;
|
31
|
+
border-top: 1px solid #DCDEE5;
|
32
|
+
border-radius: 0 0 2px 2px;
|
27
33
|
display: flex;
|
28
34
|
justify-content: center;
|
29
35
|
align-items: center;
|
30
36
|
font-size: 12px;
|
31
37
|
line-height: 20px;
|
32
38
|
}
|
33
|
-
.plus-tag
|
34
|
-
font-size: 14px;
|
35
|
-
margin-right: 6px;
|
36
|
-
}
|
37
|
-
.plus-tag[data-v-eqksb2rr]:hover {
|
39
|
+
.plus-tag[data-v-cfz2a66r]:hover {
|
38
40
|
color: #3A84FF;
|
39
41
|
}
|
42
|
+
|
43
|
+
|
44
|
+
.bk-cascader-popover:has(.render-tag) .bk-cascader-node {
|
45
|
+
width: 240px !important;
|
46
|
+
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
interface IProps {
|
2
|
-
modelValue: string[];
|
2
|
+
modelValue: string[][];
|
3
3
|
apiPrefix: string;
|
4
4
|
spaceId?: string;
|
5
5
|
popoverOptions?: Record<string, unknown>;
|
6
6
|
}
|
7
7
|
declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
8
|
-
"update:modelValue": (value: string[]) => any;
|
8
|
+
"update:modelValue": (value: string[][]) => any;
|
9
9
|
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
10
|
-
"onUpdate:modelValue"?: (value: string[]) => any;
|
10
|
+
"onUpdate:modelValue"?: (value: string[][]) => any;
|
11
11
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
12
12
|
export default _default;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
|
2
|
-
.collapse-title[data-v-
|
2
|
+
.collapse-title[data-v-8lqjgsrl] {
|
3
3
|
height: 28px;
|
4
4
|
background: #F0F1F5;
|
5
5
|
border-radius: 2px;
|
6
6
|
padding: 0 12px;
|
7
7
|
}
|
8
|
-
.collapse-title .is-hidden[data-v-
|
8
|
+
.collapse-title .is-hidden[data-v-8lqjgsrl] {
|
9
9
|
transform: rotate(-90deg);
|
10
10
|
}
|
package/dist/components/render-dataset/components/batch-review-dataset-data/index.script.vue.js.js
CHANGED
@@ -38,13 +38,14 @@ const _hoisted_2 = {
|
|
38
38
|
import { ref, toRef, watch } from 'vue';
|
39
39
|
import AutoHeightTextarea from '../../../render-auto-height-textarea/index.vue.js';
|
40
40
|
import { useDatasetHttp } from '../../../../hooks/use-dataset-http.ts.js';
|
41
|
-
import {
|
41
|
+
import { DatasetDataReviewLevel } from '../../../../types/enum.ts.js';
|
42
42
|
export default /*@__PURE__*/ _defineComponent({
|
43
43
|
props: {
|
44
44
|
modelValue: {
|
45
45
|
type: Boolean
|
46
46
|
},
|
47
47
|
datasetDatas: {},
|
48
|
+
datasetId: {},
|
48
49
|
apiPrefix: {},
|
49
50
|
spaceId: {}
|
50
51
|
},
|
@@ -61,8 +62,9 @@ export default /*@__PURE__*/ _defineComponent({
|
|
61
62
|
const formData = ref({
|
62
63
|
acceptAi: true,
|
63
64
|
accept: true,
|
65
|
+
datasetId: undefined,
|
64
66
|
datasetItemIds: [],
|
65
|
-
level:
|
67
|
+
level: DatasetDataReviewLevel.A,
|
66
68
|
reviewReason: ''
|
67
69
|
});
|
68
70
|
const handleConfirm = function() {
|
@@ -95,9 +97,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
95
97
|
if (newVal) {
|
96
98
|
formData.value = {
|
97
99
|
datasetItemIds: props.datasetDatas.map((datasetData)=>datasetData.id),
|
100
|
+
datasetId: props.datasetId,
|
98
101
|
acceptAi: true,
|
99
102
|
accept: true,
|
100
|
-
level:
|
103
|
+
level: DatasetDataReviewLevel.A,
|
101
104
|
reviewReason: ''
|
102
105
|
};
|
103
106
|
}
|
@@ -166,7 +169,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
166
169
|
"form-type": "vertical",
|
167
170
|
ref_key: "formRef",
|
168
171
|
ref: formRef,
|
169
|
-
class: "g-small-form",
|
172
|
+
class: "g-small-form g-short-form",
|
170
173
|
model: formData.value
|
171
174
|
}, {
|
172
175
|
default: _withCtx(()=>[
|
@@ -221,7 +224,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
221
224
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)=>formData.value.level = $event)
|
222
225
|
}, {
|
223
226
|
default: _withCtx(()=>[
|
224
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(
|
227
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(DatasetDataReviewLevel), (value, key)=>{
|
225
228
|
return _openBlock(), _createBlock(_component_bk_radio_button, {
|
226
229
|
key: key,
|
227
230
|
label: value
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
2
|
+
import { unref as _unref, toDisplayString as _toDisplayString, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeProps as _normalizeProps } from "vue";
|
3
|
+
import { DatasetDataReviewLevel } from '../../../../types/enum.ts.js';
|
4
|
+
export default /*@__PURE__*/ _defineComponent({
|
5
|
+
props: {
|
6
|
+
level: {}
|
7
|
+
},
|
8
|
+
setup (__props) {
|
9
|
+
return (_ctx, _cache)=>{
|
10
|
+
return _ctx.level ? (_openBlock(), _createElementBlock("span", _mergeProps({
|
11
|
+
key: 0
|
12
|
+
}, _ctx.$attrs, {
|
13
|
+
class: _ctx.level === _unref(DatasetDataReviewLevel).D ? 'g-text-red g-text-bold' : 'g-text-green g-text-bold'
|
14
|
+
}), _toDisplayString(_ctx.level), 17 /* TEXT, FULL_PROPS */ )) : (_openBlock(), _createElementBlock("span", _normalizeProps(_mergeProps({
|
15
|
+
key: 1
|
16
|
+
}, _ctx.$attrs)), " -- ", 16 /* FULL_PROPS */ ));
|
17
|
+
};
|
18
|
+
}
|
19
|
+
});
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { DatasetDataReviewLevel } from '@/types/enum';
|
2
|
+
interface IProps {
|
3
|
+
level: DatasetDataReviewLevel;
|
4
|
+
}
|
5
|
+
declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
6
|
+
export default _default;
|
package/dist/components/render-dataset/components/dataset-data-status/index.script.vue.js.js
CHANGED
@@ -33,7 +33,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
33
33
|
_ctx.name ? (_openBlock(), _createElementBlock("svg", {
|
34
34
|
key: 0,
|
35
35
|
class: _normalizeClass({
|
36
|
-
'g-mr-
|
36
|
+
'g-mr-4 g-width-16 g-height-16 g-min-width-16 g-text-blue': true,
|
37
37
|
'g-rotate-infinite': [
|
38
38
|
_unref(DatasetDataStatus).Reviewing,
|
39
39
|
_unref(DatasetDataReviewStatus).AIReviewing
|
@@ -103,7 +103,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
103
103
|
index: {},
|
104
104
|
datasetId: {},
|
105
105
|
apiPrefix: {},
|
106
|
-
spaceId: {}
|
106
|
+
spaceId: {},
|
107
|
+
search: {}
|
107
108
|
},
|
108
109
|
emits: [
|
109
110
|
"success-edit",
|
@@ -121,7 +122,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
121
122
|
const handleGetDatasetDataList = (params)=>{
|
122
123
|
return getDatasetDataList(_object_spread({
|
123
124
|
datasetId: props.datasetId
|
124
|
-
}, params));
|
125
|
+
}, props.search, params));
|
125
126
|
};
|
126
127
|
const { tableData, pagination, isLoading, handlePageChange, triggerApi } = useTable(handleGetDatasetDataList, 'results', {
|
127
128
|
current: 1,
|
@@ -1,15 +1,15 @@
|
|
1
1
|
|
2
|
-
.content[data-v-
|
2
|
+
.content[data-v-sh8c0c9n] {
|
3
3
|
padding: 18px 24px 0;
|
4
4
|
height: 100%;
|
5
5
|
overflow: auto;
|
6
6
|
}
|
7
|
-
.data-set-edit-slider .value-content[data-v-
|
7
|
+
.data-set-edit-slider .value-content[data-v-sh8c0c9n] {
|
8
8
|
padding: 16px;
|
9
9
|
border: 1px solid #DCDEE5;
|
10
10
|
line-height: 22px;
|
11
11
|
}
|
12
|
-
.data-set-edit-slider[data-v-
|
12
|
+
.data-set-edit-slider[data-v-sh8c0c9n] .bk-sideslider-title {
|
13
13
|
justify-content: space-between;
|
14
14
|
width: 100%;
|
15
15
|
}
|
@@ -1,9 +1,11 @@
|
|
1
|
+
import type { IDatasetDataParam } from '@/types/dataset';
|
1
2
|
interface IProps {
|
2
3
|
modelValue: boolean;
|
3
4
|
index: number;
|
4
5
|
datasetId: number;
|
5
6
|
apiPrefix: string;
|
6
7
|
spaceId?: string;
|
8
|
+
search: IDatasetDataParam;
|
7
9
|
}
|
8
10
|
declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
9
11
|
"update:modelValue": (modelValue: boolean) => any;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import script from './index.script.vue.js.js';
|
2
|
-
script.__scopeId = "data-v-
|
2
|
+
script.__scopeId = "data-v-sh8c0c9n";
|
3
3
|
script.__file = "./src/components/render-dataset/components/edit-dataset-data/index.vue";
|
4
4
|
import './index.vue.css';
|
5
5
|
export default script;
|
@@ -1,18 +1,18 @@
|
|
1
1
|
|
2
|
-
.content[data-v-
|
2
|
+
.content[data-v-dip4cxql] {
|
3
3
|
padding: 0 24px 0px 32px;
|
4
4
|
height: 100%;
|
5
5
|
}
|
6
|
-
.content .toolbar[data-v-
|
6
|
+
.content .toolbar[data-v-dip4cxql] {
|
7
7
|
margin: 16px 0;
|
8
8
|
display: flex;
|
9
9
|
align-items: center;
|
10
10
|
justify-content: right;
|
11
11
|
gap: 8px;
|
12
12
|
}
|
13
|
-
.content .toolbar .record-search[data-v-
|
13
|
+
.content .toolbar .record-search[data-v-dip4cxql] {
|
14
14
|
width: 360px;
|
15
15
|
}
|
16
|
-
.content .toolbar .record-data-picker[data-v-
|
16
|
+
.content .toolbar .record-data-picker[data-v-dip4cxql] {
|
17
17
|
width: 260px;
|
18
18
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import script from './index.script.vue.js.js';
|
2
|
-
script.__scopeId = "data-v-
|
2
|
+
script.__scopeId = "data-v-dip4cxql";
|
3
3
|
script.__file = "./src/components/render-dataset/components/operation-record/index.vue";
|
4
4
|
import './index.vue.css';
|
5
5
|
export default script;
|
package/dist/components/render-dataset/components/operation-record/table/index.script.vue.js.js
CHANGED
@@ -27,18 +27,27 @@ function _object_spread(target) {
|
|
27
27
|
return target;
|
28
28
|
}
|
29
29
|
import { defineComponent as _defineComponent } from 'vue';
|
30
|
-
import { unref as _unref, resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createElementVNode as _createElementVNode,
|
30
|
+
import { unref as _unref, resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, createBlock as _createBlock, withDirectives as _withDirectives, Fragment as _Fragment } from "vue";
|
31
31
|
const _hoisted_1 = {
|
32
|
-
class: "g-flex-row
|
32
|
+
class: "g-flex-row"
|
33
33
|
};
|
34
34
|
const _hoisted_2 = {
|
35
|
+
class: "g-mr-4 g-width-16 g-height-16 g-min-width-16"
|
36
|
+
};
|
37
|
+
const _hoisted_3 = [
|
38
|
+
"href"
|
39
|
+
];
|
40
|
+
const _hoisted_4 = {
|
41
|
+
class: "g-flex-row g-justify-between"
|
42
|
+
};
|
43
|
+
const _hoisted_5 = {
|
35
44
|
class: "text"
|
36
45
|
};
|
37
46
|
import { ref, toRef, watch } from 'vue';
|
38
47
|
import ViewOpResult from '../view-op-result/index.vue.js';
|
39
48
|
import { useDatasetHttp } from '../../../../../hooks/use-dataset-http.ts.js';
|
40
49
|
import useTable from '../../../../../hooks/use-table.ts.js';
|
41
|
-
import {
|
50
|
+
import { DatasetDataOperatRecordResultCode } from '../../../../../types/enum.ts.js';
|
42
51
|
export default /*@__PURE__*/ _defineComponent({
|
43
52
|
props: {
|
44
53
|
search: {},
|
@@ -52,11 +61,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
52
61
|
[DatasetDataOperatRecordResultCode.Failed]: '失败',
|
53
62
|
[DatasetDataOperatRecordResultCode.Success]: '成功'
|
54
63
|
};
|
55
|
-
const actionIdMap = {
|
56
|
-
[DatasetDataOperatRecordActionId.AddDatasetItem]: '新增数据',
|
57
|
-
[DatasetDataOperatRecordActionId.EditDatasetItem]: '编辑数据',
|
58
|
-
[DatasetDataOperatRecordActionId.DeleteDatasetItem]: '删除数据'
|
59
|
-
};
|
60
64
|
const isShowView = ref(false);
|
61
65
|
const viewData = ref();
|
62
66
|
const handleGetOperateRecordList = (params)=>{
|
@@ -107,7 +111,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
107
111
|
width: "142"
|
108
112
|
}, {
|
109
113
|
default: _withCtx(({ row })=>[
|
110
|
-
_createTextVNode(_toDisplayString(
|
114
|
+
_createTextVNode(_toDisplayString(row.actionName), 1 /* TEXT */ )
|
111
115
|
]),
|
112
116
|
_: 1 /* STABLE */
|
113
117
|
}),
|
@@ -116,7 +120,14 @@ export default /*@__PURE__*/ _defineComponent({
|
|
116
120
|
width: "142"
|
117
121
|
}, {
|
118
122
|
default: _withCtx(({ row })=>[
|
119
|
-
|
123
|
+
_createElementVNode("span", _hoisted_1, [
|
124
|
+
(_openBlock(), _createElementBlock("svg", _hoisted_2, [
|
125
|
+
_createElementVNode("use", {
|
126
|
+
href: row.resultCode === _unref(DatasetDataOperatRecordResultCode).Success ? '#ai-ui-sdk-sync-success' : '#ai-ui-sdk-sync-failed'
|
127
|
+
}, null, 8 /* PROPS */ , _hoisted_3)
|
128
|
+
])),
|
129
|
+
_createTextVNode(" " + _toDisplayString(resultCodeMap[row.resultCode]), 1 /* TEXT */ )
|
130
|
+
])
|
120
131
|
]),
|
121
132
|
_: 1 /* STABLE */
|
122
133
|
}),
|
@@ -124,8 +135,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
124
135
|
label: "操作结果"
|
125
136
|
}, {
|
126
137
|
default: _withCtx(({ row })=>[
|
127
|
-
_createElementVNode("span",
|
128
|
-
_createElementVNode("span",
|
138
|
+
_createElementVNode("span", _hoisted_4, [
|
139
|
+
_createElementVNode("span", _hoisted_5, _toDisplayString(row.instanceData), 1 /* TEXT */ ),
|
129
140
|
_createVNode(_component_bk_button, {
|
130
141
|
text: "",
|
131
142
|
theme: "primary",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import script from './index.script.vue.js.js';
|
2
|
-
script.__scopeId = "data-v-
|
2
|
+
script.__scopeId = "data-v-88e3vqxz";
|
3
3
|
script.__file = "./src/components/render-dataset/components/operation-record/table/index.vue";
|
4
4
|
import './index.vue.css';
|
5
5
|
export default script;
|