@blueking/ai-ui-sdk 0.1.0-beta.2 → 0.1.0-beta.4
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 +6 -0
- package/dist/common/util.ts.js +16 -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-collapse/index.vue.css +2 -2
- package/dist/components/render-collapse/index.vue.js +1 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.script.vue.js.js +358 -0
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +24 -0
- package/dist/components/{render-dataset-detail-origin-data/components/operation-record → render-dataset/components/edit-dataset-data}/index.vue.d.ts +3 -3
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +5 -0
- package/dist/components/render-dataset/components/operation-record/index.script.vue.js.js +114 -0
- package/dist/components/{render-dataset-detail-origin-data → render-dataset}/components/operation-record/index.vue.css +4 -4
- package/dist/components/render-dataset/components/operation-record/index.vue.d.ts +7 -0
- package/dist/components/render-dataset/components/operation-record/index.vue.js +5 -0
- package/dist/components/{render-dataset-detail-origin-data → render-dataset}/components/operation-record/table/index.script.vue.js.js +24 -18
- package/dist/components/{render-dataset-detail-origin-data → render-dataset}/components/operation-record/table/index.vue.css +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.js +5 -0
- package/dist/components/{render-dataset-detail-origin-data → render-dataset}/components/operation-record/view-op-result/index.script.vue.js.js +15 -19
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +12 -0
- package/dist/components/{render-dataset-detail-origin-data → render-dataset}/components/operation-record/view-op-result/index.vue.d.ts +2 -1
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +5 -0
- package/dist/components/render-dataset/components/plus-dataset/dataset-form.vue.css +3 -3
- package/dist/components/render-dataset/components/plus-dataset/dataset-form.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -5
- 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 +8 -5
- package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.vue.d.ts +3 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/file.script.vue.js.js +67 -13
- package/dist/components/render-dataset/components/plus-dataset-data/form/file.vue.d.ts +3 -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 +83 -26
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -5
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.d.ts +3 -0
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/manual.script.vue.js.js +74 -49
- package/dist/components/render-dataset/components/plus-dataset-data/form/manual.vue.d.ts +3 -1
- package/dist/components/render-dataset/components/plus-dataset-data/index.script.vue.js.js +9 -1
- package/dist/components/render-dataset/components/plus-dataset-data/index.vue.d.ts +8 -3
- package/dist/components/render-dataset/components/search-dataset-data/index.script.vue.js.js +1 -1
- package/dist/components/render-dataset/components/search-operation-record/index.script.vue.js.js +20 -93
- package/dist/components/render-dataset/components/search-operation-record/index.vue.d.ts +0 -1
- 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/components/header.script.vue.js.js +41 -12
- package/dist/components/render-dataset-detail/components/header.vue.d.ts +5 -1
- package/dist/components/render-dataset-detail/index.script.vue.js.js +11 -1
- package/dist/components/render-dataset-detail/index.vue.d.ts +5 -1
- package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.script.vue.js.js +69 -12
- package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.vue.d.ts +12 -1
- package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js.js +197 -161
- 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 +10 -2
- 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 +33 -12
- package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
- package/dist/components/render-dataset-detail-origin-data/index.vue.d.ts +1 -0
- 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 +32 -43
- 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.script.vue.js.js +2 -2
- 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.script.vue.js.js +8 -8
- 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 +43 -33
- package/dist/css/fonts/iconcool.eot +0 -0
- package/dist/css/fonts/iconcool.svg +27 -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 +27 -0
- package/dist/event/index.ts.js +1 -2
- package/dist/hooks/use-dataset-http.d.ts +18 -6
- package/dist/hooks/use-dataset-http.ts.js +37 -16
- package/dist/http/fetch/error-interceptor.ts.js +10 -14
- package/dist/http/fetch/index.ts.js +3 -2
- package/dist/http/fetch/success-interceptor.ts.js +7 -4
- package/dist/http/helper/dataset.d.ts +8 -2
- package/dist/http/helper/dataset.ts.js +127 -28
- package/dist/types/common.d.ts +1 -1
- package/dist/types/dataset.d.ts +51 -31
- package/dist/types/enum.d.ts +15 -19
- package/dist/types/enum.ts.js +19 -22
- package/package.json +1 -1
- package/dist/components/render-dataset-detail-origin-data/components/edit-data/index.script.vue.js.js +0 -268
- package/dist/components/render-dataset-detail-origin-data/components/edit-data/index.vue.css +0 -38
- package/dist/components/render-dataset-detail-origin-data/components/edit-data/index.vue.d.ts +0 -12
- package/dist/components/render-dataset-detail-origin-data/components/edit-data/index.vue.js +0 -5
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/index.script.vue.js.js +0 -96
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/index.vue.js +0 -5
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/table/index.vue.js +0 -5
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/view-op-result/index.vue.css +0 -6
- package/dist/components/render-dataset-detail-origin-data/components/operation-record/view-op-result/index.vue.js +0 -5
- /package/dist/components/{render-dataset-detail-origin-data → render-dataset}/components/operation-record/table/index.vue.d.ts +0 -0
@@ -0,0 +1,114 @@
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
2
|
+
import { createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
3
|
+
const _hoisted_1 = {
|
4
|
+
class: "content"
|
5
|
+
};
|
6
|
+
const _hoisted_2 = {
|
7
|
+
class: "toolbar"
|
8
|
+
};
|
9
|
+
import { ref } from 'vue';
|
10
|
+
import RenderSearchOperationRecord from '../search-operation-record/index.vue.js';
|
11
|
+
import RenderTable from './table/index.vue.js';
|
12
|
+
export default /*@__PURE__*/ _defineComponent({
|
13
|
+
props: {
|
14
|
+
apiPrefix: {},
|
15
|
+
datasetId: {},
|
16
|
+
datasetDataId: {}
|
17
|
+
},
|
18
|
+
setup (__props) {
|
19
|
+
const props = __props;
|
20
|
+
const search = ref({
|
21
|
+
resourceTypeId: 'dataset_item'
|
22
|
+
});
|
23
|
+
const isShow = ref(false);
|
24
|
+
const handleShow = ()=>{
|
25
|
+
isShow.value = true;
|
26
|
+
search.value = {
|
27
|
+
resourceTypeId: 'dataset_item',
|
28
|
+
parentId: props.datasetId
|
29
|
+
};
|
30
|
+
if (props.datasetDataId) {
|
31
|
+
search.value.instanceId = props.datasetDataId;
|
32
|
+
}
|
33
|
+
};
|
34
|
+
const handleClose = ()=>{
|
35
|
+
isShow.value = false;
|
36
|
+
return true;
|
37
|
+
};
|
38
|
+
const handleDateChange = (value)=>{
|
39
|
+
search.value.date = (value === null || value === void 0 ? void 0 : value[0]) && (value === null || value === void 0 ? void 0 : value[1]) ? {
|
40
|
+
start: value[0],
|
41
|
+
end: value[1]
|
42
|
+
} : undefined;
|
43
|
+
};
|
44
|
+
return (_ctx, _cache)=>{
|
45
|
+
const _component_bk_button = _resolveComponent("bk-button");
|
46
|
+
const _component_bk_date_picker = _resolveComponent("bk-date-picker");
|
47
|
+
const _component_bk_sideslider = _resolveComponent("bk-sideslider");
|
48
|
+
return _openBlock(), _createElementBlock(_Fragment, null, [
|
49
|
+
_createVNode(_component_bk_button, _mergeProps(_ctx.$attrs, {
|
50
|
+
onClick: handleShow
|
51
|
+
}), {
|
52
|
+
default: _withCtx(()=>_cache[1] || (_cache[1] = [
|
53
|
+
_createTextVNode(" 操作记录 ")
|
54
|
+
])),
|
55
|
+
_: 1 /* STABLE */ ,
|
56
|
+
__: [
|
57
|
+
1
|
58
|
+
]
|
59
|
+
}, 16 /* FULL_PROPS */ ),
|
60
|
+
_createVNode(_component_bk_sideslider, {
|
61
|
+
title: "操作记录",
|
62
|
+
class: "record-slider",
|
63
|
+
width: 960,
|
64
|
+
"is-show": isShow.value,
|
65
|
+
"before-close": handleClose
|
66
|
+
}, {
|
67
|
+
default: _withCtx(()=>{
|
68
|
+
var _search_value_date, _search_value_date1;
|
69
|
+
return [
|
70
|
+
_createElementVNode("section", _hoisted_1, [
|
71
|
+
_createElementVNode("section", _hoisted_2, [
|
72
|
+
_createVNode(RenderSearchOperationRecord, {
|
73
|
+
modelValue: search.value,
|
74
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>search.value = $event),
|
75
|
+
"dataset-id": _ctx.datasetId,
|
76
|
+
class: "record-search"
|
77
|
+
}, null, 8 /* PROPS */ , [
|
78
|
+
"modelValue",
|
79
|
+
"dataset-id"
|
80
|
+
]),
|
81
|
+
_createVNode(_component_bk_date_picker, {
|
82
|
+
clearable: "",
|
83
|
+
class: "record-data-picker",
|
84
|
+
type: "daterange",
|
85
|
+
format: "yyyy-MM-dd",
|
86
|
+
"model-value": [
|
87
|
+
(_search_value_date = search.value.date) === null || _search_value_date === void 0 ? void 0 : _search_value_date.start,
|
88
|
+
(_search_value_date1 = search.value.date) === null || _search_value_date1 === void 0 ? void 0 : _search_value_date1.end
|
89
|
+
],
|
90
|
+
onChange: handleDateChange
|
91
|
+
}, null, 8 /* PROPS */ , [
|
92
|
+
"model-value"
|
93
|
+
])
|
94
|
+
]),
|
95
|
+
_createVNode(RenderTable, {
|
96
|
+
"dataset-id": _ctx.datasetId,
|
97
|
+
search: search.value,
|
98
|
+
"api-prefix": _ctx.apiPrefix
|
99
|
+
}, null, 8 /* PROPS */ , [
|
100
|
+
"dataset-id",
|
101
|
+
"search",
|
102
|
+
"api-prefix"
|
103
|
+
])
|
104
|
+
])
|
105
|
+
];
|
106
|
+
}),
|
107
|
+
_: 1 /* STABLE */
|
108
|
+
}, 8 /* PROPS */ , [
|
109
|
+
"is-show"
|
110
|
+
])
|
111
|
+
], 64 /* STABLE_FRAGMENT */ );
|
112
|
+
};
|
113
|
+
}
|
114
|
+
});
|
@@ -1,18 +1,18 @@
|
|
1
1
|
|
2
|
-
.content[data-v-
|
2
|
+
.content[data-v-rlrkwm7s] {
|
3
3
|
padding: 0 24px 0px 32px;
|
4
4
|
height: 100%;
|
5
5
|
}
|
6
|
-
.content .toolbar[data-v-
|
6
|
+
.content .toolbar[data-v-rlrkwm7s] {
|
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-rlrkwm7s] {
|
14
14
|
width: 360px;
|
15
15
|
}
|
16
|
-
.content .toolbar .record-data-picker[data-v-
|
16
|
+
.content .toolbar .record-data-picker[data-v-rlrkwm7s] {
|
17
17
|
width: 260px;
|
18
18
|
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
interface IProps {
|
2
|
+
apiPrefix: string;
|
3
|
+
datasetId: number;
|
4
|
+
datasetDataId?: number;
|
5
|
+
}
|
6
|
+
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>;
|
7
|
+
export default _default;
|
@@ -38,7 +38,7 @@ import { ref, watch } from 'vue';
|
|
38
38
|
import ViewOpResult from '../view-op-result/index.vue.js';
|
39
39
|
import { useDatasetHttp } from '../../../../../hooks/use-dataset-http.ts.js';
|
40
40
|
import useTable from '../../../../../hooks/use-table.ts.js';
|
41
|
-
import {
|
41
|
+
import { DatasetDataOperatRecordActionId, DatasetDataOperatRecordResultCode } from '../../../../../types/enum.ts.js';
|
42
42
|
export default /*@__PURE__*/ _defineComponent({
|
43
43
|
props: {
|
44
44
|
search: {},
|
@@ -47,17 +47,14 @@ export default /*@__PURE__*/ _defineComponent({
|
|
47
47
|
setup (__props) {
|
48
48
|
const props = __props;
|
49
49
|
const { getOperateRecordList } = useDatasetHttp(props.apiPrefix);
|
50
|
-
const
|
51
|
-
[
|
52
|
-
[
|
53
|
-
|
54
|
-
|
55
|
-
[
|
56
|
-
[
|
57
|
-
[
|
58
|
-
[DatasetDataOperatRecordType.AutoPass]: '自动通过',
|
59
|
-
[DatasetDataOperatRecordType.AutoReject]: '自动拒绝',
|
60
|
-
[DatasetDataOperatRecordType.DataCleaning]: '数据清洗'
|
50
|
+
const resultCodeMap = {
|
51
|
+
[DatasetDataOperatRecordResultCode.Failed]: '失败',
|
52
|
+
[DatasetDataOperatRecordResultCode.Success]: '成功'
|
53
|
+
};
|
54
|
+
const actionIdMap = {
|
55
|
+
[DatasetDataOperatRecordActionId.AddDatasetItem]: '新增数据',
|
56
|
+
[DatasetDataOperatRecordActionId.EditDatasetItem]: '编辑数据',
|
57
|
+
[DatasetDataOperatRecordActionId.DeleteDatasetItem]: '删除数据'
|
61
58
|
};
|
62
59
|
const isShowView = ref(false);
|
63
60
|
const viewData = ref();
|
@@ -101,7 +98,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
101
98
|
default: _withCtx(()=>[
|
102
99
|
_createVNode(_component_bk_table_column, {
|
103
100
|
label: "ID",
|
104
|
-
field: "
|
101
|
+
field: "instanceId",
|
105
102
|
width: "80"
|
106
103
|
}),
|
107
104
|
_createVNode(_component_bk_table_column, {
|
@@ -109,7 +106,16 @@ export default /*@__PURE__*/ _defineComponent({
|
|
109
106
|
width: "142"
|
110
107
|
}, {
|
111
108
|
default: _withCtx(({ row })=>[
|
112
|
-
_createTextVNode(_toDisplayString(
|
109
|
+
_createTextVNode(_toDisplayString(actionIdMap[row.actionId]), 1 /* TEXT */ )
|
110
|
+
]),
|
111
|
+
_: 1 /* STABLE */
|
112
|
+
}),
|
113
|
+
_createVNode(_component_bk_table_column, {
|
114
|
+
label: "操作状态",
|
115
|
+
width: "142"
|
116
|
+
}, {
|
117
|
+
default: _withCtx(({ row })=>[
|
118
|
+
_createTextVNode(_toDisplayString(resultCodeMap[row.resultCode]), 1 /* TEXT */ )
|
113
119
|
]),
|
114
120
|
_: 1 /* STABLE */
|
115
121
|
}),
|
@@ -118,14 +124,14 @@ export default /*@__PURE__*/ _defineComponent({
|
|
118
124
|
}, {
|
119
125
|
default: _withCtx(({ row })=>[
|
120
126
|
_createElementVNode("span", _hoisted_1, [
|
121
|
-
_createElementVNode("span", _hoisted_2, _toDisplayString(row.
|
127
|
+
_createElementVNode("span", _hoisted_2, _toDisplayString(row.instanceData), 1 /* TEXT */ ),
|
122
128
|
_createVNode(_component_bk_button, {
|
123
129
|
text: "",
|
124
130
|
theme: "primary",
|
125
131
|
onClick: ($event)=>handleView(row)
|
126
132
|
}, {
|
127
133
|
default: _withCtx(()=>_cache[1] || (_cache[1] = [
|
128
|
-
_createTextVNode("[查看]")
|
134
|
+
_createTextVNode(" [查看] ")
|
129
135
|
])),
|
130
136
|
_: 2 /* DYNAMIC */ ,
|
131
137
|
__: [
|
@@ -140,12 +146,12 @@ export default /*@__PURE__*/ _defineComponent({
|
|
140
146
|
}),
|
141
147
|
_createVNode(_component_bk_table_column, {
|
142
148
|
label: "操作人",
|
143
|
-
field: "
|
149
|
+
field: "username",
|
144
150
|
width: "142"
|
145
151
|
}),
|
146
152
|
_createVNode(_component_bk_table_column, {
|
147
153
|
label: "操作时间",
|
148
|
-
field: "
|
154
|
+
field: "endTime",
|
149
155
|
width: "152"
|
150
156
|
})
|
151
157
|
]),
|
@@ -1,11 +1,14 @@
|
|
1
1
|
import { defineComponent as _defineComponent } from 'vue';
|
2
|
-
import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock,
|
2
|
+
import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, createVNode as _createVNode, resolveComponent as _resolveComponent, createBlock as _createBlock } from "vue";
|
3
3
|
const _hoisted_1 = {
|
4
4
|
class: "g-text-14 g-text-normal g-ml-24"
|
5
5
|
};
|
6
6
|
const _hoisted_2 = {
|
7
7
|
class: "content"
|
8
8
|
};
|
9
|
+
const _hoisted_3 = {
|
10
|
+
class: "value-content"
|
11
|
+
};
|
9
12
|
import Collapse from '../../../../render-collapse/index.vue.js';
|
10
13
|
export default /*@__PURE__*/ _defineComponent({
|
11
14
|
props: {
|
@@ -24,7 +27,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
24
27
|
return true;
|
25
28
|
};
|
26
29
|
return (_ctx, _cache)=>{
|
27
|
-
const _component_bk_input = _resolveComponent("bk-input");
|
28
30
|
const _component_bk_sideslider = _resolveComponent("bk-sideslider");
|
29
31
|
return _openBlock(), _createBlock(_component_bk_sideslider, {
|
30
32
|
width: 960,
|
@@ -35,34 +37,28 @@ export default /*@__PURE__*/ _defineComponent({
|
|
35
37
|
header: _withCtx(()=>[
|
36
38
|
_createElementVNode("div", null, [
|
37
39
|
_cache[0] || (_cache[0] = _createElementVNode("span", null, "查看操作结果", -1 /* HOISTED */ )),
|
38
|
-
_createElementVNode("span", _hoisted_1, _toDisplayString(`操作类型: ${_ctx.data.
|
40
|
+
_createElementVNode("span", _hoisted_1, _toDisplayString(`操作类型: ${_ctx.data.actionId}`), 1 /* TEXT */ )
|
39
41
|
])
|
40
42
|
]),
|
41
43
|
default: _withCtx(()=>[
|
42
44
|
_createElementVNode("section", _hoisted_2, [
|
43
|
-
(_openBlock(), _createElementBlock(_Fragment, null, _renderList(
|
44
|
-
return
|
45
|
-
key:
|
45
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.data.instanceData, (value, key)=>{
|
46
|
+
return _openBlock(), _createElementBlock("div", {
|
47
|
+
key: key,
|
46
48
|
class: "g-mb-16"
|
47
49
|
}, [
|
48
50
|
_createVNode(Collapse, {
|
49
|
-
title:
|
51
|
+
title: key
|
50
52
|
}, {
|
51
53
|
default: _withCtx(()=>[
|
52
|
-
|
53
|
-
"model-value": _ctx.data.result,
|
54
|
-
type: "textarea",
|
55
|
-
disabled: "",
|
56
|
-
resize: false,
|
57
|
-
autosize: ""
|
58
|
-
}, null, 8 /* PROPS */ , [
|
59
|
-
"model-value"
|
60
|
-
])
|
54
|
+
_createElementVNode("h5", _hoisted_3, _toDisplayString(value), 1 /* TEXT */ )
|
61
55
|
]),
|
62
|
-
_:
|
63
|
-
}
|
56
|
+
_: 2 /* DYNAMIC */
|
57
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
|
58
|
+
"title"
|
59
|
+
])
|
64
60
|
]);
|
65
|
-
}),
|
61
|
+
}), 128 /* KEYED_FRAGMENT */ ))
|
66
62
|
])
|
67
63
|
]),
|
68
64
|
_: 1 /* STABLE */
|
@@ -1,6 +1,7 @@
|
|
1
|
+
import type { IOperatRecord } from '@/types/dataset';
|
1
2
|
interface IProps {
|
2
3
|
isShow: boolean;
|
3
|
-
data:
|
4
|
+
data: IOperatRecord;
|
4
5
|
}
|
5
6
|
declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
6
7
|
"update:isShow": (value: boolean) => any;
|
@@ -1,15 +1,15 @@
|
|
1
1
|
|
2
|
-
.schema-preview-content[data-v-
|
2
|
+
.schema-preview-content[data-v-a853nu05] {
|
3
3
|
display: flex;
|
4
4
|
border: 1px solid #DCDEE5;
|
5
5
|
border-radius: 2px;
|
6
6
|
}
|
7
|
-
.schema-preview-content .label[data-v-
|
7
|
+
.schema-preview-content .label[data-v-a853nu05], .schema-preview-content .text[data-v-a853nu05] {
|
8
8
|
height: 42px;
|
9
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-a853nu05] {
|
13
13
|
background: #F0F1F5;
|
14
14
|
border-bottom: 1px solid #DCDEE5;
|
15
15
|
}
|
@@ -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-a853nu05";
|
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;
|
@@ -1,11 +1,8 @@
|
|
1
1
|
|
2
|
-
.dataset-data-content[data-v-
|
2
|
+
.dataset-data-content[data-v-wk7ftgo6] {
|
3
3
|
padding: 20px 24px;
|
4
4
|
height: 100%;
|
5
5
|
}
|
6
|
-
.dataset-data-slider[data-v-
|
7
|
-
margin-top: 0;
|
8
|
-
}
|
9
|
-
.dataset-data-slider[data-v-elhw2a1m] .bk-modal-content {
|
6
|
+
.dataset-data-slider[data-v-wk7ftgo6] .bk-modal-content {
|
10
7
|
scrollbar-gutter: inherit !important;
|
11
8
|
}
|
package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.script.vue.js.js
CHANGED
@@ -52,11 +52,12 @@ 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: {
|
59
|
-
modelValue: {}
|
59
|
+
modelValue: {},
|
60
|
+
apiPrefix: {}
|
60
61
|
},
|
61
62
|
emits: [
|
62
63
|
"update:modelValue"
|
@@ -64,11 +65,12 @@ export default /*@__PURE__*/ _defineComponent({
|
|
64
65
|
setup (__props, { expose: __expose, emit: __emit }) {
|
65
66
|
const props = __props;
|
66
67
|
const emits = __emit;
|
67
|
-
const { getDatasetList } = useDatasetHttp();
|
68
|
+
const { getDatasetList } = useDatasetHttp(props.apiPrefix);
|
69
|
+
const formRef = useTemplateRef('formRef');
|
68
70
|
const loading = ref(false);
|
69
71
|
const datasets = ref([]);
|
70
|
-
const formRef = ref();
|
71
72
|
const validate = ()=>formRef.value.validate();
|
73
|
+
const clearValidate = ()=>formRef.value.clearValidate();
|
72
74
|
const handleChange = (val)=>{
|
73
75
|
const dataset = _object_spread_props(_object_spread({}, props.modelValue), {
|
74
76
|
datasetId: val
|
@@ -85,7 +87,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
85
87
|
};
|
86
88
|
onBeforeMount(handleGetDatasetList);
|
87
89
|
__expose({
|
88
|
-
validate
|
90
|
+
validate,
|
91
|
+
clearValidate
|
89
92
|
});
|
90
93
|
return (_ctx, _cache)=>{
|
91
94
|
const _component_bk_select = _resolveComponent("bk-select");
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import type { IDatasetDataForm } from '@/types/dataset';
|
2
2
|
interface IProps {
|
3
3
|
modelValue: IDatasetDataForm;
|
4
|
+
apiPrefix: string;
|
4
5
|
}
|
5
6
|
declare const _default: import("vue").DefineComponent<IProps, {
|
6
|
-
validate: () => Promise<
|
7
|
+
validate: () => Promise<unknown>;
|
8
|
+
clearValidate: () => void;
|
7
9
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
8
10
|
"update:modelValue": (val: IDatasetDataForm) => any;
|
9
11
|
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
package/dist/components/render-dataset/components/plus-dataset-data/form/file.script.vue.js.js
CHANGED
@@ -80,15 +80,16 @@ function _object_spread_props(target, source) {
|
|
80
80
|
return target;
|
81
81
|
}
|
82
82
|
import { defineComponent as _defineComponent } from 'vue';
|
83
|
-
import { unref as _unref, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode,
|
84
|
-
import { ref } from 'vue';
|
83
|
+
import { unref as _unref, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, resolveDirective as _resolveDirective, openBlock as _openBlock, createBlock as _createBlock, withDirectives as _withDirectives, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createCommentVNode as _createCommentVNode } from "vue";
|
84
|
+
import { ref, useTemplateRef, watch } 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';
|
88
88
|
import { DatasetDataSourceType } from '../../../../../types/enum.ts.js';
|
89
89
|
export default /*@__PURE__*/ _defineComponent({
|
90
90
|
props: {
|
91
|
-
modelValue: {}
|
91
|
+
modelValue: {},
|
92
|
+
apiPrefix: {}
|
92
93
|
},
|
93
94
|
emits: [
|
94
95
|
"update:modelValue"
|
@@ -96,10 +97,17 @@ export default /*@__PURE__*/ _defineComponent({
|
|
96
97
|
setup (__props, { expose: __expose, emit: __emit }) {
|
97
98
|
const props = __props;
|
98
99
|
const emits = __emit;
|
99
|
-
const { uploadDatasetDataFiles } = useDatasetHttp();
|
100
|
+
const { uploadDatasetDataFiles, downloadDatasetDataTemplateFile } = useDatasetHttp(props.apiPrefix);
|
101
|
+
const formRef = useTemplateRef('formRef');
|
100
102
|
const loading = ref(false);
|
101
|
-
const
|
102
|
-
|
103
|
+
const validate = ()=>{
|
104
|
+
var _formRef_value;
|
105
|
+
return (_formRef_value = formRef.value) === null || _formRef_value === void 0 ? void 0 : _formRef_value.validate();
|
106
|
+
};
|
107
|
+
const clearValidate = ()=>{
|
108
|
+
var _formRef_value;
|
109
|
+
return (_formRef_value = formRef.value) === null || _formRef_value === void 0 ? void 0 : _formRef_value.clearValidate();
|
110
|
+
};
|
103
111
|
const handleUploadFile = function() {
|
104
112
|
var _ref = _async_to_generator(function*() {
|
105
113
|
try {
|
@@ -124,6 +132,9 @@ export default /*@__PURE__*/ _defineComponent({
|
|
124
132
|
return _ref.apply(this, arguments);
|
125
133
|
};
|
126
134
|
}();
|
135
|
+
const handleDownloadFile = ()=>{
|
136
|
+
downloadDatasetDataTemplateFile(props.modelValue.datasetId);
|
137
|
+
};
|
127
138
|
const handleDeleteFile = (file)=>{
|
128
139
|
const files = props.modelValue.files.filter((item)=>item.id !== file.id);
|
129
140
|
const dataset = _object_spread_props(_object_spread({}, props.modelValue), {
|
@@ -131,13 +142,22 @@ export default /*@__PURE__*/ _defineComponent({
|
|
131
142
|
});
|
132
143
|
emits('update:modelValue', dataset);
|
133
144
|
};
|
145
|
+
const handleClearFile = ()=>{
|
146
|
+
const dataset = _object_spread_props(_object_spread({}, props.modelValue), {
|
147
|
+
files: []
|
148
|
+
});
|
149
|
+
emits('update:modelValue', dataset);
|
150
|
+
};
|
151
|
+
watch(()=>props.modelValue.sourceType, handleClearFile);
|
134
152
|
__expose({
|
135
|
-
validate
|
153
|
+
validate,
|
154
|
+
clearValidate
|
136
155
|
});
|
137
156
|
return (_ctx, _cache)=>{
|
138
157
|
const _component_bk_button = _resolveComponent("bk-button");
|
139
158
|
const _component_bk_form_item = _resolveComponent("bk-form-item");
|
140
159
|
const _component_bk_form = _resolveComponent("bk-form");
|
160
|
+
const _directive_bk_tooltips = _resolveDirective("bk-tooltips");
|
141
161
|
return _ctx.modelValue.sourceType === _unref(DatasetDataSourceType).UploadFile ? (_openBlock(), _createBlock(_component_bk_form, {
|
142
162
|
key: 0,
|
143
163
|
class: "g-small-form",
|
@@ -149,18 +169,18 @@ export default /*@__PURE__*/ _defineComponent({
|
|
149
169
|
default: _withCtx(()=>[
|
150
170
|
_createVNode(_component_bk_form_item, {
|
151
171
|
label: "上传文件",
|
152
|
-
property: "
|
172
|
+
property: "files",
|
153
173
|
required: ""
|
154
174
|
}, {
|
155
175
|
default: _withCtx(()=>[
|
156
176
|
_createVNode(_component_bk_button, {
|
157
177
|
loading: loading.value,
|
158
|
-
class: "
|
178
|
+
class: "g-text-12 g-mr-8",
|
159
179
|
onClick: handleUploadFile
|
160
180
|
}, {
|
161
181
|
default: _withCtx(()=>_cache[0] || (_cache[0] = [
|
162
182
|
_createElementVNode("i", {
|
163
|
-
class: "
|
183
|
+
class: "ai-ui-sdk-icon ai-ui-sdk-dongzuo-shangchuan g-text-16 g-mr-4"
|
164
184
|
}, null, -1 /* HOISTED */ ),
|
165
185
|
_createTextVNode(" 上传文件 ")
|
166
186
|
])),
|
@@ -171,17 +191,51 @@ export default /*@__PURE__*/ _defineComponent({
|
|
171
191
|
}, 8 /* PROPS */ , [
|
172
192
|
"loading"
|
173
193
|
]),
|
174
|
-
(_openBlock(
|
194
|
+
_withDirectives((_openBlock(), _createBlock(_component_bk_button, {
|
195
|
+
loading: loading.value,
|
196
|
+
disabled: !_ctx.modelValue.datasetId,
|
197
|
+
class: "g-text-12 g-mr-8",
|
198
|
+
onClick: handleDownloadFile
|
199
|
+
}, {
|
200
|
+
default: _withCtx(()=>_cache[1] || (_cache[1] = [
|
201
|
+
_createElementVNode("i", {
|
202
|
+
class: "ai-ui-sdk-icon ai-ui-sdk-dongzuo-xiazai g-text-16 g-mr-4"
|
203
|
+
}, null, -1 /* HOISTED */ ),
|
204
|
+
_createTextVNode(" 下载示例 ")
|
205
|
+
])),
|
206
|
+
_: 1 /* STABLE */ ,
|
207
|
+
__: [
|
208
|
+
1
|
209
|
+
]
|
210
|
+
}, 8 /* PROPS */ , [
|
211
|
+
"loading",
|
212
|
+
"disabled"
|
213
|
+
])), [
|
214
|
+
[
|
215
|
+
_directive_bk_tooltips,
|
216
|
+
{
|
217
|
+
content: '请先选择所属数据集',
|
218
|
+
disabled: _ctx.modelValue.datasetId
|
219
|
+
}
|
220
|
+
]
|
221
|
+
]),
|
222
|
+
_cache[2] || (_cache[2] = _createElementVNode("span", null, "支持 .csv 类型文件解析处理,单文件大小在 50M 以内", -1 /* HOISTED */ )),
|
223
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.modelValue.files, (file, index)=>{
|
175
224
|
return _openBlock(), _createBlock(RenderFileCard, {
|
176
225
|
key: file.id,
|
177
226
|
file: file,
|
227
|
+
class: _normalizeClass(index <= 0 ? 'g-mt-12' : 'g-mt-8'),
|
178
228
|
onDelete: handleDeleteFile
|
179
229
|
}, null, 8 /* PROPS */ , [
|
180
|
-
"file"
|
230
|
+
"file",
|
231
|
+
"class"
|
181
232
|
]);
|
182
233
|
}), 128 /* KEYED_FRAGMENT */ ))
|
183
234
|
]),
|
184
|
-
_: 1 /* STABLE */
|
235
|
+
_: 1 /* STABLE */ ,
|
236
|
+
__: [
|
237
|
+
2
|
238
|
+
]
|
185
239
|
})
|
186
240
|
]),
|
187
241
|
_: 1 /* STABLE */
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import type { IDatasetDataForm } from '@/types/dataset';
|
2
2
|
interface IProps {
|
3
3
|
modelValue: IDatasetDataForm;
|
4
|
+
apiPrefix: string;
|
4
5
|
}
|
5
6
|
declare const _default: import("vue").DefineComponent<IProps, {
|
6
|
-
validate: () => Promise<
|
7
|
+
validate: () => Promise<unknown>;
|
8
|
+
clearValidate: () => void;
|
7
9
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
8
10
|
"update:modelValue": (val: IDatasetDataForm) => any;
|
9
11
|
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|