@blueking/ai-ui-sdk 0.1.0-beta.1 → 0.1.0-beta.3
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.vue.css +11 -11
- package/dist/components/render-auto-height-textarea/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/plus-dataset/dataset-form.script.vue.js.js +32 -55
- package/dist/components/render-dataset/components/plus-dataset/dataset-form.vue.css +5 -5
- package/dist/components/render-dataset/components/plus-dataset/dataset-form.vue.d.ts +1 -0
- package/dist/components/render-dataset/components/plus-dataset/dataset-form.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.script.vue.js.js +10 -4
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +7 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.script.vue.js.js +4 -3
- package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.vue.d.ts +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/file.script.vue.js.js +4 -5
- package/dist/components/render-dataset/components/plus-dataset-data/form/file.vue.d.ts +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.script.vue.js.js +11 -11
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +10 -0
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +2 -0
- package/dist/components/render-dataset/components/plus-dataset-data/form/manual.script.vue.js.js +28 -23
- package/dist/components/render-dataset/components/plus-dataset-data/form/manual.vue.d.ts +1 -1
- package/dist/components/render-dataset/components/search-dataset/index.script.vue.js.js +62 -0
- package/dist/components/render-dataset/components/search-dataset/index.vue.d.ts +10 -1
- package/dist/components/render-dataset/components/search-dataset/index.vue.js +1 -2
- package/dist/components/render-dataset/components/search-dataset-data/index.script.vue.js.js +62 -0
- package/dist/components/render-dataset/components/search-dataset-data/index.vue.d.ts +11 -0
- package/dist/components/render-dataset/components/search-dataset-data/index.vue.js +3 -0
- package/dist/components/render-dataset/components/search-operation-record/index.script.vue.js.js +150 -0
- package/dist/components/render-dataset/components/search-operation-record/index.vue.d.ts +12 -0
- package/dist/components/render-dataset/components/search-operation-record/index.vue.js +3 -0
- package/dist/components/render-dataset/components/source-type-icon/index.script.vue.js.js +2 -2
- package/dist/components/render-dataset/components/source-type-icon/index.vue.css +3 -3
- package/dist/components/render-dataset/components/source-type-icon/index.vue.js +1 -1
- 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/edit-data/index.vue.css +8 -8
- package/dist/components/render-dataset-detail-origin-data/components/edit-data/index.vue.js +1 -1
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/index.script.vue.js.js +27 -20
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/index.vue.css +4 -4
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/index.vue.d.ts +1 -1
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/index.vue.js +1 -1
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/table/index.script.vue.js.js +10 -20
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/table/index.vue.css +1 -1
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/table/index.vue.d.ts +2 -2
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/table/index.vue.js +1 -1
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/view-op-result/index.vue.css +1 -1
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/view-op-result/index.vue.js +1 -1
- package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js.js +46 -22
- 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.d.ts +3 -0
- 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 +61 -27
- 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.script.vue.js.js +13 -3
- 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 +47 -12
- package/dist/components/render-dataset-list/components/table.vue.d.ts +2 -0
- 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-router-tab/index.vue.css +3 -3
- package/dist/components/render-router-tab/index.vue.js +1 -1
- package/dist/components/render-search-select/index.script.vue.js.js +127 -0
- package/dist/components/render-search-select/index.vue.d.ts +31 -0
- package/dist/components/render-search-select/index.vue.js +3 -0
- 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 +8 -2
- package/dist/hooks/use-dataset-http.d.ts +3 -2
- package/dist/hooks/use-dataset-http.ts.js +26 -24
- package/dist/http/fetch/error-interceptor.d.ts +1 -1
- package/dist/http/fetch/error-interceptor.ts.js +8 -8
- package/dist/http/fetch/success-interceptor.ts.js +7 -4
- package/dist/http/helper/dataset.d.ts +7 -19
- package/dist/http/helper/dataset.ts.js +21 -53
- package/dist/types/common.d.ts +8 -0
- package/dist/types/dataset.d.ts +24 -31
- package/package.json +4 -1
- package/dist/components/render-dataset/components/search-dataset/index.script.vue.js +0 -7
- package/dist/components/render-dataset-detail-origin-data/components/search/index.script.vue.js +0 -7
- package/dist/components/render-dataset-detail-origin-data/components/search/index.vue.d.ts +0 -2
- package/dist/components/render-dataset-detail-origin-data/components/search/index.vue.js +0 -4
@@ -1,12 +1,12 @@
|
|
1
1
|
|
2
|
-
.aside-home[data-v-
|
2
|
+
.aside-home[data-v-6cgy4iso] {
|
3
3
|
width: 300px;
|
4
4
|
height: 100%;
|
5
5
|
background: #FFFFFF;
|
6
6
|
padding: 16px;
|
7
7
|
border-right: 1px solid #eaebf0;
|
8
8
|
}
|
9
|
-
[data-v-
|
9
|
+
[data-v-6cgy4iso] .aside-item {
|
10
10
|
width: 268px;
|
11
11
|
line-height: 36px;
|
12
12
|
border-radius: 2px;
|
@@ -16,30 +16,30 @@
|
|
16
16
|
justify-content: space-between;
|
17
17
|
color: #979BA5;
|
18
18
|
}
|
19
|
-
[data-v-
|
19
|
+
[data-v-6cgy4iso] .aside-item.is-tab {
|
20
20
|
background: #F5F7FA;
|
21
21
|
cursor: pointer;
|
22
22
|
color: #4D4F56;
|
23
23
|
}
|
24
|
-
[data-v-
|
24
|
+
[data-v-6cgy4iso] .aside-item.is-tab:hover {
|
25
25
|
background: #F0F5FF;
|
26
26
|
}
|
27
|
-
[data-v-
|
27
|
+
[data-v-6cgy4iso] .aside-item.active {
|
28
28
|
background: #F0F5FF;
|
29
29
|
color: #3A84FF;
|
30
30
|
font-weight: 700;
|
31
31
|
}
|
32
|
-
[data-v-
|
32
|
+
[data-v-6cgy4iso] .aside-item.active .tab-num {
|
33
33
|
background: #3A84FF;
|
34
34
|
color: #fff;
|
35
35
|
}
|
36
|
-
[data-v-
|
36
|
+
[data-v-6cgy4iso] .aside-item.active .active-text {
|
37
37
|
color: #3A84FF;
|
38
38
|
}
|
39
|
-
[data-v-
|
39
|
+
[data-v-6cgy4iso] .aside-item .tab-name {
|
40
40
|
flex: 1;
|
41
41
|
}
|
42
|
-
[data-v-
|
42
|
+
[data-v-6cgy4iso] .aside-item .tab-num {
|
43
43
|
background: #EAEBF0;
|
44
44
|
border-radius: 2px;
|
45
45
|
margin-left: 5px;
|
@@ -1,40 +1,40 @@
|
|
1
1
|
|
2
|
-
.send-container[data-v-
|
2
|
+
.send-container[data-v-hxfg179q] {
|
3
3
|
position: relative;
|
4
4
|
}
|
5
|
-
.send-container[data-v-
|
5
|
+
.send-container[data-v-hxfg179q]:has(textarea:focus) {
|
6
6
|
z-index: 2;
|
7
7
|
}
|
8
|
-
.send-container:hover .send-clear[data-v-
|
8
|
+
.send-container:hover .send-clear[data-v-hxfg179q] {
|
9
9
|
display: inline-flex !important;
|
10
10
|
}
|
11
|
-
.send-input[data-v-
|
11
|
+
.send-input[data-v-hxfg179q] {
|
12
12
|
width: 100%;
|
13
13
|
flex-direction: row;
|
14
14
|
height: var(--origin-height);
|
15
15
|
}
|
16
|
-
.send-input[data-v-
|
16
|
+
.send-input[data-v-hxfg179q]:has(textarea:focus) {
|
17
17
|
height: var(--text-height);
|
18
18
|
}
|
19
|
-
.send-input[data-v-
|
19
|
+
.send-input[data-v-hxfg179q] textarea {
|
20
20
|
font-size: 12px;
|
21
21
|
line-height: 16px;
|
22
22
|
padding: 7px;
|
23
23
|
resize: none !important;
|
24
24
|
}
|
25
|
-
.send-input[data-v-
|
25
|
+
.send-input[data-v-hxfg179q] textarea::-webkit-scrollbar {
|
26
26
|
width: 4px;
|
27
27
|
height: 4px;
|
28
28
|
}
|
29
|
-
.send-input[data-v-
|
29
|
+
.send-input[data-v-hxfg179q] textarea::-webkit-scrollbar-thumb {
|
30
30
|
height: 5px;
|
31
31
|
border-radius: 3px;
|
32
32
|
background-color: #dcdee5;
|
33
33
|
}
|
34
|
-
.send-input[data-v-
|
34
|
+
.send-input[data-v-hxfg179q] textarea::placeholder {
|
35
35
|
line-height: 16px;
|
36
36
|
}
|
37
|
-
.send-clear[data-v-
|
37
|
+
.send-clear[data-v-hxfg179q] {
|
38
38
|
display: none !important;
|
39
39
|
position: absolute;
|
40
40
|
right: 10px;
|
@@ -43,6 +43,6 @@
|
|
43
43
|
font-size: 14px;
|
44
44
|
cursor: pointer;
|
45
45
|
}
|
46
|
-
.send-clear[data-v-
|
46
|
+
.send-clear[data-v-hxfg179q]:hover {
|
47
47
|
color: #313238;
|
48
48
|
}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
|
2
|
-
.collapse-title[data-v-
|
2
|
+
.collapse-title[data-v-faojwd00] {
|
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-faojwd00] {
|
9
9
|
transform: rotate(-90deg);
|
10
10
|
}
|
package/dist/components/render-dataset/components/plus-dataset/dataset-form.script.vue.js.js
CHANGED
@@ -77,7 +77,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
77
77
|
setup (__props, { expose: __expose, emit: __emit }) {
|
78
78
|
const props = __props;
|
79
79
|
const emits = __emit;
|
80
|
-
const {
|
80
|
+
const { getComponentList, getSchemaList, getCompanyList } = useDatasetHttp(props.apiPrefix);
|
81
81
|
const rules = {
|
82
82
|
datasetName: [
|
83
83
|
{
|
@@ -87,13 +87,16 @@ export default /*@__PURE__*/ _defineComponent({
|
|
87
87
|
}
|
88
88
|
]
|
89
89
|
};
|
90
|
-
const
|
90
|
+
const isLoadingCompanyList = ref(false);
|
91
|
+
const isLoadingComponentList = ref(false);
|
91
92
|
const isLoadingSchemaList = ref(false);
|
92
|
-
const
|
93
|
+
const companyList = ref();
|
94
|
+
const componentList = ref();
|
93
95
|
const schemaList = ref();
|
94
96
|
const renderSchema = ref();
|
95
97
|
const formRef = ref();
|
96
98
|
const validate = ()=>formRef.value.validate();
|
99
|
+
const clearValidate = ()=>formRef.value.clearValidate();
|
97
100
|
const handleChange = (key, value)=>{
|
98
101
|
// 选择类型的时候,需要更新一下schema
|
99
102
|
if (key === 'type') {
|
@@ -104,12 +107,20 @@ export default /*@__PURE__*/ _defineComponent({
|
|
104
107
|
});
|
105
108
|
emits('update:formData', formData);
|
106
109
|
};
|
107
|
-
const
|
108
|
-
|
109
|
-
|
110
|
-
|
110
|
+
const handleGetCompanyList = ()=>{
|
111
|
+
isLoadingCompanyList.value = true;
|
112
|
+
getCompanyList().then((data)=>{
|
113
|
+
companyList.value = data;
|
111
114
|
}).finally(()=>{
|
112
|
-
|
115
|
+
isLoadingCompanyList.value = false;
|
116
|
+
});
|
117
|
+
};
|
118
|
+
const handleGetComponentList = ()=>{
|
119
|
+
isLoadingComponentList.value = true;
|
120
|
+
getComponentList().then((data)=>{
|
121
|
+
componentList.value = data;
|
122
|
+
}).finally(()=>{
|
123
|
+
isLoadingComponentList.value = false;
|
113
124
|
});
|
114
125
|
};
|
115
126
|
const handleGetSchemaList = ()=>{
|
@@ -121,11 +132,13 @@ export default /*@__PURE__*/ _defineComponent({
|
|
121
132
|
});
|
122
133
|
};
|
123
134
|
onBeforeMount(()=>{
|
124
|
-
|
135
|
+
handleGetCompanyList();
|
136
|
+
handleGetComponentList();
|
125
137
|
handleGetSchemaList();
|
126
138
|
});
|
127
139
|
__expose({
|
128
|
-
validate
|
140
|
+
validate,
|
141
|
+
clearValidate
|
129
142
|
});
|
130
143
|
return (_ctx, _cache)=>{
|
131
144
|
const _component_bk_input = _resolveComponent("bk-input");
|
@@ -144,7 +157,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
144
157
|
}, {
|
145
158
|
default: _withCtx(()=>[
|
146
159
|
_createElementVNode("section", null, [
|
147
|
-
_cache[
|
160
|
+
_cache[3] || (_cache[3] = _createElementVNode("h5", {
|
148
161
|
class: "g-text-14 g-text-black g-weight-bold g-mb-16"
|
149
162
|
}, " 基本信息 ", -1 /* HOISTED */ )),
|
150
163
|
_createVNode(_component_bk_form_item, {
|
@@ -237,57 +250,21 @@ export default /*@__PURE__*/ _defineComponent({
|
|
237
250
|
]),
|
238
251
|
_: 1 /* STABLE */
|
239
252
|
})) : _createCommentVNode("v-if", true),
|
253
|
+
_createCommentVNode(" <bk-form-item\n label=\"来源团队\"\n property=\"sourceTeam\"\n required\n >\n <bk-select\n id-key=\"id\"\n display-key=\"companyName\"\n :model-value=\"formData.sourceTeam\"\n :list=\"companyList\"\n @change=\"(value: string) => handleChange('sourceTeam', value)\"\n />\n </bk-form-item> "),
|
240
254
|
_createVNode(_component_bk_form_item, {
|
241
|
-
label: "
|
242
|
-
property: "sourceTeam",
|
243
|
-
required: ""
|
244
|
-
}, {
|
245
|
-
default: _withCtx(()=>[
|
246
|
-
_createVNode(_component_bk_select, {
|
247
|
-
"model-value": _ctx.formData.sourceTeam,
|
248
|
-
onChange: _cache[2] || (_cache[2] = (value)=>handleChange('sourceTeam', value))
|
249
|
-
}, {
|
250
|
-
default: _withCtx(()=>[
|
251
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(sourceTeamList.value, (sourceTeam)=>{
|
252
|
-
return _openBlock(), _createBlock(_component_bk_option, {
|
253
|
-
key: sourceTeam.id,
|
254
|
-
label: sourceTeam.name
|
255
|
-
}, null, 8 /* PROPS */ , [
|
256
|
-
"label"
|
257
|
-
]);
|
258
|
-
}), 128 /* KEYED_FRAGMENT */ ))
|
259
|
-
]),
|
260
|
-
_: 1 /* STABLE */
|
261
|
-
}, 8 /* PROPS */ , [
|
262
|
-
"model-value"
|
263
|
-
])
|
264
|
-
]),
|
265
|
-
_: 1 /* STABLE */
|
266
|
-
}),
|
267
|
-
_createVNode(_component_bk_form_item, {
|
268
|
-
label: "标签",
|
255
|
+
label: "组件",
|
269
256
|
property: "component",
|
270
257
|
class: "g-last-form-item"
|
271
258
|
}, {
|
272
259
|
default: _withCtx(()=>[
|
273
260
|
_createVNode(_component_bk_select, {
|
261
|
+
"id-key": "id",
|
262
|
+
"display-key": "name",
|
263
|
+
list: componentList.value,
|
274
264
|
"model-value": _ctx.formData.componentId,
|
275
|
-
onChange: _cache[
|
276
|
-
},
|
277
|
-
|
278
|
-
(_openBlock(), _createElementBlock(_Fragment, null, _renderList(5, (item)=>{
|
279
|
-
return _createVNode(_component_bk_option, {
|
280
|
-
id: `标签${item}`,
|
281
|
-
key: item,
|
282
|
-
name: `标签${item}`
|
283
|
-
}, null, 8 /* PROPS */ , [
|
284
|
-
"id",
|
285
|
-
"name"
|
286
|
-
]);
|
287
|
-
}), 64 /* STABLE_FRAGMENT */ ))
|
288
|
-
]),
|
289
|
-
_: 1 /* STABLE */
|
290
|
-
}, 8 /* PROPS */ , [
|
265
|
+
onChange: _cache[2] || (_cache[2] = (value)=>handleChange('componentId', value))
|
266
|
+
}, null, 8 /* PROPS */ , [
|
267
|
+
"list",
|
291
268
|
"model-value"
|
292
269
|
])
|
293
270
|
]),
|
@@ -1,15 +1,15 @@
|
|
1
1
|
|
2
|
-
.schema-preview-content[data-v-
|
2
|
+
.schema-preview-content[data-v-wn1crk1w] {
|
3
3
|
display: flex;
|
4
4
|
border: 1px solid #DCDEE5;
|
5
5
|
border-radius: 2px;
|
6
6
|
}
|
7
|
-
.schema-preview-content .label[data-v-
|
8
|
-
height:
|
9
|
-
line-height:
|
7
|
+
.schema-preview-content .label[data-v-wn1crk1w], .schema-preview-content .text[data-v-wn1crk1w] {
|
8
|
+
height: 42px;
|
9
|
+
line-height: 42px;
|
10
10
|
padding-left: 16px;
|
11
11
|
}
|
12
|
-
.schema-preview-content .label[data-v-
|
12
|
+
.schema-preview-content .label[data-v-wn1crk1w] {
|
13
13
|
background: #F0F1F5;
|
14
14
|
border-bottom: 1px solid #DCDEE5;
|
15
15
|
}
|
@@ -5,6 +5,7 @@ interface IProps {
|
|
5
5
|
}
|
6
6
|
declare const _default: import("vue").DefineComponent<IProps, {
|
7
7
|
validate: () => Promise<boolean>;
|
8
|
+
clearValidate: () => Promise<boolean>;
|
8
9
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
9
10
|
"update:formData": (data: IDatasetForm) => any;
|
10
11
|
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import script from './dataset-form.script.vue.js.js';
|
2
|
-
script.__scopeId = "data-v-
|
2
|
+
script.__scopeId = "data-v-wn1crk1w";
|
3
3
|
script.__file = "./src/components/render-dataset/components/plus-dataset/dataset-form.vue";
|
4
4
|
import './dataset-form.vue.css';
|
5
5
|
export default script;
|
@@ -2,9 +2,9 @@ import { defineComponent as _defineComponent } from 'vue';
|
|
2
2
|
import { createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, Fragment as _Fragment } from "vue";
|
3
3
|
const _hoisted_1 = {
|
4
4
|
key: 0,
|
5
|
-
class: "content"
|
5
|
+
class: "dataset-data-content"
|
6
6
|
};
|
7
|
-
import { ref, useTemplateRef, watch } from 'vue';
|
7
|
+
import { nextTick, ref, useTemplateRef, watch } from 'vue';
|
8
8
|
import DatasetFooter from './dataset-footer.vue.js';
|
9
9
|
import DatasetForm from './dataset-form.vue.js';
|
10
10
|
import { useFormLeaveConfirm } from '../../../../hooks/use-form-leave-confirm.ts.js';
|
@@ -40,14 +40,20 @@ export default /*@__PURE__*/ _defineComponent({
|
|
40
40
|
formData.value = {
|
41
41
|
datasetName: '',
|
42
42
|
type: undefined,
|
43
|
-
|
43
|
+
companyId: undefined,
|
44
44
|
componentId: undefined
|
45
45
|
};
|
46
46
|
};
|
47
|
+
const handleClearValidate = ()=>{
|
48
|
+
nextTick(()=>{
|
49
|
+
formRef.value.clearValidate();
|
50
|
+
});
|
51
|
+
};
|
47
52
|
watch(()=>isShow.value, (val)=>{
|
48
53
|
if (val) {
|
49
54
|
handleInitFormData();
|
50
55
|
handleInitFormLeaveConfirm(formData.value);
|
56
|
+
handleClearValidate();
|
51
57
|
}
|
52
58
|
});
|
53
59
|
return (_ctx, _cache)=>{
|
@@ -70,7 +76,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
70
76
|
width: 960,
|
71
77
|
"is-show": isShow.value,
|
72
78
|
"before-close": handleClose,
|
73
|
-
class: "
|
79
|
+
class: "dataset-data-slider"
|
74
80
|
}, {
|
75
81
|
footer: _withCtx(()=>[
|
76
82
|
_createVNode(DatasetFooter, {
|
@@ -1,5 +1,11 @@
|
|
1
1
|
|
2
|
-
.content[data-v-
|
2
|
+
.dataset-data-content[data-v-zuq4kf2m] {
|
3
3
|
padding: 20px 24px;
|
4
4
|
height: 100%;
|
5
5
|
}
|
6
|
+
.dataset-data-slider[data-v-zuq4kf2m] .bk-sideslider-footer {
|
7
|
+
margin-top: 0;
|
8
|
+
}
|
9
|
+
.dataset-data-slider[data-v-zuq4kf2m] .bk-modal-content {
|
10
|
+
scrollbar-gutter: inherit !important;
|
11
|
+
}
|
package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.script.vue.js.js
CHANGED
@@ -52,7 +52,7 @@ function _object_spread_props(target, source) {
|
|
52
52
|
}
|
53
53
|
import { defineComponent as _defineComponent } from 'vue';
|
54
54
|
import { resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
55
|
-
import { onBeforeMount, ref } from 'vue';
|
55
|
+
import { onBeforeMount, ref, useTemplateRef } from 'vue';
|
56
56
|
import { useDatasetHttp } from '../../../../../hooks/use-dataset-http.ts.js';
|
57
57
|
export default /*@__PURE__*/ _defineComponent({
|
58
58
|
props: {
|
@@ -65,9 +65,9 @@ export default /*@__PURE__*/ _defineComponent({
|
|
65
65
|
const props = __props;
|
66
66
|
const emits = __emit;
|
67
67
|
const { getDatasetList } = useDatasetHttp();
|
68
|
+
const formRef = useTemplateRef('formRef');
|
68
69
|
const loading = ref(false);
|
69
70
|
const datasets = ref([]);
|
70
|
-
const formRef = ref();
|
71
71
|
const validate = ()=>formRef.value.validate();
|
72
72
|
const handleChange = (val)=>{
|
73
73
|
const dataset = _object_spread_props(_object_spread({}, props.modelValue), {
|
@@ -80,7 +80,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
80
80
|
getDatasetList().then((data)=>{
|
81
81
|
datasets.value = data.results;
|
82
82
|
}).finally(()=>{
|
83
|
-
loading.value =
|
83
|
+
loading.value = false;
|
84
84
|
});
|
85
85
|
};
|
86
86
|
onBeforeMount(handleGetDatasetList);
|
@@ -102,6 +102,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
102
102
|
_createVNode(_component_bk_form_item, {
|
103
103
|
label: "所属数据集",
|
104
104
|
property: "datasetId",
|
105
|
+
class: "g-last-form-item",
|
105
106
|
required: ""
|
106
107
|
}, {
|
107
108
|
default: _withCtx(()=>[
|
@@ -3,7 +3,7 @@ interface IProps {
|
|
3
3
|
modelValue: IDatasetDataForm;
|
4
4
|
}
|
5
5
|
declare const _default: import("vue").DefineComponent<IProps, {
|
6
|
-
validate: () => Promise<
|
6
|
+
validate: () => Promise<unknown>;
|
7
7
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
8
8
|
"update:modelValue": (val: IDatasetDataForm) => any;
|
9
9
|
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
package/dist/components/render-dataset/components/plus-dataset-data/form/file.script.vue.js.js
CHANGED
@@ -81,7 +81,7 @@ function _object_spread_props(target, source) {
|
|
81
81
|
}
|
82
82
|
import { defineComponent as _defineComponent } from 'vue';
|
83
83
|
import { unref as _unref, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from "vue";
|
84
|
-
import { ref } from 'vue';
|
84
|
+
import { ref, useTemplateRef } from 'vue';
|
85
85
|
import { chooseFile } from '../../../../../common/util.ts.js';
|
86
86
|
import RenderFileCard from '../../../../render-file-card/index.vue.js';
|
87
87
|
import { useDatasetHttp } from '../../../../../hooks/use-dataset-http.ts.js';
|
@@ -97,14 +97,14 @@ export default /*@__PURE__*/ _defineComponent({
|
|
97
97
|
const props = __props;
|
98
98
|
const emits = __emit;
|
99
99
|
const { uploadDatasetDataFiles } = useDatasetHttp();
|
100
|
+
const formRef = useTemplateRef('formRef');
|
100
101
|
const loading = ref(false);
|
101
|
-
const
|
102
|
-
const validate = formRef.value.validate();
|
102
|
+
const validate = ()=>formRef.value.validate();
|
103
103
|
const handleUploadFile = function() {
|
104
104
|
var _ref = _async_to_generator(function*() {
|
105
105
|
try {
|
106
106
|
// 用户选择
|
107
|
-
const chooseResult = yield chooseFile('.csv
|
107
|
+
const chooseResult = yield chooseFile('.csv', 50 * 1024 * 1024, true, false);
|
108
108
|
// loading
|
109
109
|
loading.value = true;
|
110
110
|
// 上传
|
@@ -150,7 +150,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
150
150
|
_createVNode(_component_bk_form_item, {
|
151
151
|
label: "上传文件",
|
152
152
|
property: "fileIds",
|
153
|
-
class: "g-last-form-item",
|
154
153
|
required: ""
|
155
154
|
}, {
|
156
155
|
default: _withCtx(()=>[
|
@@ -3,7 +3,7 @@ interface IProps {
|
|
3
3
|
modelValue: IDatasetDataForm;
|
4
4
|
}
|
5
5
|
declare const _default: import("vue").DefineComponent<IProps, {
|
6
|
-
validate: () => Promise<
|
6
|
+
validate: () => Promise<unknown>;
|
7
7
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
8
8
|
"update:modelValue": (val: IDatasetDataForm) => any;
|
9
9
|
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import script from './footer.script.vue.js.js';
|
2
|
-
script.__scopeId = "data-v-
|
2
|
+
script.__scopeId = "data-v-zdsoh2li";
|
3
3
|
script.__file = "./src/components/render-dataset/components/plus-dataset-data/form/footer.vue";
|
4
4
|
import './footer.vue.css';
|
5
5
|
export default script;
|
package/dist/components/render-dataset/components/plus-dataset-data/form/index.script.vue.js.js
CHANGED
@@ -2,7 +2,7 @@ import { defineComponent as _defineComponent } from 'vue';
|
|
2
2
|
import { createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createBlock as _createBlock } from "vue";
|
3
3
|
const _hoisted_1 = {
|
4
4
|
key: 0,
|
5
|
-
class: "
|
5
|
+
class: "plus-dataset-data"
|
6
6
|
};
|
7
7
|
import { ref, useTemplateRef } from 'vue';
|
8
8
|
import RenderCategory from './category.vue.js';
|
@@ -50,8 +50,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
50
50
|
return (_ctx, _cache)=>{
|
51
51
|
const _component_bk_sideslider = _resolveComponent("bk-sideslider");
|
52
52
|
return _openBlock(), _createBlock(_component_bk_sideslider, {
|
53
|
-
class: "knowledge-sideslider",
|
54
53
|
title: "添加数据",
|
54
|
+
class: "plus-dataset-sideslider",
|
55
55
|
"esc-close": false,
|
56
56
|
width: 960,
|
57
57
|
"is-show": _ctx.isShow,
|
@@ -75,27 +75,27 @@ export default /*@__PURE__*/ _defineComponent({
|
|
75
75
|
}, null, 8 /* PROPS */ , [
|
76
76
|
"modelValue"
|
77
77
|
]),
|
78
|
-
_createVNode(
|
78
|
+
_createVNode(RenderFile, {
|
79
79
|
modelValue: datasetData.value,
|
80
80
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)=>datasetData.value = $event),
|
81
|
-
ref_key: "
|
82
|
-
ref:
|
81
|
+
ref_key: "fileRef",
|
82
|
+
ref: fileRef
|
83
83
|
}, null, 8 /* PROPS */ , [
|
84
84
|
"modelValue"
|
85
85
|
]),
|
86
|
-
_createVNode(
|
86
|
+
_createVNode(RenderManual, {
|
87
87
|
modelValue: datasetData.value,
|
88
88
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event)=>datasetData.value = $event),
|
89
|
-
ref_key: "
|
90
|
-
ref:
|
89
|
+
ref_key: "manualRef",
|
90
|
+
ref: manualRef
|
91
91
|
}, null, 8 /* PROPS */ , [
|
92
92
|
"modelValue"
|
93
93
|
]),
|
94
|
-
_createVNode(
|
94
|
+
_createVNode(RenderDataset, {
|
95
95
|
modelValue: datasetData.value,
|
96
96
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event)=>datasetData.value = $event),
|
97
|
-
ref_key: "
|
98
|
-
ref:
|
97
|
+
ref_key: "datasetRef",
|
98
|
+
ref: datasetRef
|
99
99
|
}, null, 8 /* PROPS */ , [
|
100
100
|
"modelValue"
|
101
101
|
])
|
@@ -0,0 +1,10 @@
|
|
1
|
+
|
2
|
+
.plus-dataset-data[data-v-2pl21qci] {
|
3
|
+
padding: 20px 24px;
|
4
|
+
}
|
5
|
+
.plus-dataset-sideslider[data-v-2pl21qci] .bk-sideslider-footer {
|
6
|
+
margin-top: 0;
|
7
|
+
}
|
8
|
+
.plus-dataset-sideslider[data-v-2pl21qci] .bk-modal-content {
|
9
|
+
scrollbar-gutter: inherit !important;
|
10
|
+
}
|