@blueking/ai-ui-sdk 0.1.0-beta.3 → 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 +6 -3
- package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.vue.d.ts +2 -0
- package/dist/components/render-dataset/components/plus-dataset-data/form/file.script.vue.js.js +66 -12
- package/dist/components/render-dataset/components/plus-dataset-data/form/file.vue.d.ts +2 -0
- 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 +72 -47
- package/dist/components/render-dataset/components/plus-dataset-data/form/manual.vue.d.ts +2 -0
- 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 +36 -13
- package/dist/http/fetch/error-interceptor.ts.js +8 -14
- package/dist/http/fetch/index.ts.js +3 -2
- 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
package/dist/components/render-dataset/components/plus-dataset-data/form/index.script.vue.js.js
CHANGED
@@ -1,37 +1,76 @@
|
|
1
|
+
function _define_property(obj, key, value) {
|
2
|
+
if (key in obj) {
|
3
|
+
Object.defineProperty(obj, key, {
|
4
|
+
value: value,
|
5
|
+
enumerable: true,
|
6
|
+
configurable: true,
|
7
|
+
writable: true
|
8
|
+
});
|
9
|
+
} else {
|
10
|
+
obj[key] = value;
|
11
|
+
}
|
12
|
+
return obj;
|
13
|
+
}
|
14
|
+
function _object_spread(target) {
|
15
|
+
for(var i = 1; i < arguments.length; i++){
|
16
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
17
|
+
var ownKeys = Object.keys(source);
|
18
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
19
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
20
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
21
|
+
}));
|
22
|
+
}
|
23
|
+
ownKeys.forEach(function(key) {
|
24
|
+
_define_property(target, key, source[key]);
|
25
|
+
});
|
26
|
+
}
|
27
|
+
return target;
|
28
|
+
}
|
1
29
|
import { defineComponent as _defineComponent } from 'vue';
|
2
30
|
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
31
|
const _hoisted_1 = {
|
4
32
|
key: 0,
|
5
33
|
class: "plus-dataset-data"
|
6
34
|
};
|
7
|
-
import { ref, useTemplateRef } from 'vue';
|
35
|
+
import { nextTick, ref, useTemplateRef, watch } from 'vue';
|
8
36
|
import RenderCategory from './category.vue.js';
|
9
37
|
import RenderDataset from './dataset.vue.js';
|
10
38
|
import RenderFile from './file.vue.js';
|
11
39
|
import RenderFooter from './footer.vue.js';
|
12
40
|
import RenderManual from './manual.vue.js';
|
41
|
+
import { useFormLeaveConfirm } from '../../../../../hooks/use-form-leave-confirm.ts.js';
|
13
42
|
import { DatasetDataSourceType } from '../../../../../types/enum.ts.js';
|
14
43
|
export default /*@__PURE__*/ _defineComponent({
|
15
44
|
props: {
|
16
45
|
isShow: {
|
17
46
|
type: Boolean
|
18
|
-
}
|
47
|
+
},
|
48
|
+
apiPrefix: {},
|
49
|
+
datasetData: {}
|
19
50
|
},
|
20
51
|
emits: [
|
21
52
|
"update:isShow",
|
22
53
|
"success-confirm"
|
23
54
|
],
|
24
55
|
setup (__props, { emit: __emit }) {
|
56
|
+
const props = __props;
|
25
57
|
const emits = __emit;
|
58
|
+
const { handleInitFormLeaveConfirm, handleFormLeaveConfirm } = useFormLeaveConfirm();
|
26
59
|
const datasetRef = useTemplateRef('datasetRef');
|
27
60
|
const fileRef = useTemplateRef('fileRef');
|
28
61
|
const manualRef = useTemplateRef('manualRef');
|
29
|
-
const
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
62
|
+
const renderDatasetData = ref();
|
63
|
+
const handleClose = (noValidate)=>{
|
64
|
+
const close = ()=>{
|
65
|
+
emits('update:isShow', false);
|
66
|
+
};
|
67
|
+
handleFormLeaveConfirm(close, renderDatasetData.value, noValidate);
|
68
|
+
return false;
|
69
|
+
};
|
70
|
+
const handleSuccess = ()=>{
|
71
|
+
emits('success-confirm');
|
72
|
+
handleClose(true);
|
73
|
+
};
|
35
74
|
const validate = ()=>{
|
36
75
|
return Promise.all([
|
37
76
|
datasetRef.value.validate(),
|
@@ -39,14 +78,26 @@ export default /*@__PURE__*/ _defineComponent({
|
|
39
78
|
manualRef.value.validate()
|
40
79
|
]);
|
41
80
|
};
|
42
|
-
const
|
43
|
-
|
44
|
-
|
81
|
+
const handleClearValidate = ()=>{
|
82
|
+
return nextTick(()=>{
|
83
|
+
datasetRef.value.clearValidate();
|
84
|
+
fileRef.value.clearValidate();
|
85
|
+
manualRef.value.clearValidate();
|
86
|
+
});
|
45
87
|
};
|
46
|
-
const
|
47
|
-
|
48
|
-
|
88
|
+
const handleInitData = ()=>{
|
89
|
+
renderDatasetData.value = _object_spread({
|
90
|
+
data: {},
|
91
|
+
files: [],
|
92
|
+
datasetId: undefined,
|
93
|
+
sourceType: DatasetDataSourceType.UploadFile
|
94
|
+
}, props.datasetData);
|
49
95
|
};
|
96
|
+
watch(()=>props.isShow, ()=>{
|
97
|
+
handleInitData();
|
98
|
+
handleInitFormLeaveConfirm(renderDatasetData.value);
|
99
|
+
handleClearValidate();
|
100
|
+
});
|
50
101
|
return (_ctx, _cache)=>{
|
51
102
|
const _component_bk_sideslider = _resolveComponent("bk-sideslider");
|
52
103
|
return _openBlock(), _createBlock(_component_bk_sideslider, {
|
@@ -60,7 +111,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
60
111
|
footer: _withCtx(()=>[
|
61
112
|
_createVNode(RenderFooter, {
|
62
113
|
validate: validate,
|
63
|
-
"dataset-data":
|
114
|
+
"dataset-data": renderDatasetData.value,
|
64
115
|
onClose: handleClose,
|
65
116
|
onSuccessConfirm: handleSuccess
|
66
117
|
}, null, 8 /* PROPS */ , [
|
@@ -70,34 +121,40 @@ export default /*@__PURE__*/ _defineComponent({
|
|
70
121
|
default: _withCtx(()=>[
|
71
122
|
_ctx.isShow ? (_openBlock(), _createElementBlock("section", _hoisted_1, [
|
72
123
|
_createVNode(RenderCategory, {
|
73
|
-
modelValue:
|
74
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>
|
124
|
+
modelValue: renderDatasetData.value,
|
125
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>renderDatasetData.value = $event)
|
75
126
|
}, null, 8 /* PROPS */ , [
|
76
127
|
"modelValue"
|
77
128
|
]),
|
78
129
|
_createVNode(RenderFile, {
|
79
|
-
modelValue:
|
80
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)=>
|
130
|
+
modelValue: renderDatasetData.value,
|
131
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)=>renderDatasetData.value = $event),
|
132
|
+
"api-prefix": _ctx.apiPrefix,
|
81
133
|
ref_key: "fileRef",
|
82
134
|
ref: fileRef
|
83
135
|
}, null, 8 /* PROPS */ , [
|
84
|
-
"modelValue"
|
136
|
+
"modelValue",
|
137
|
+
"api-prefix"
|
85
138
|
]),
|
86
139
|
_createVNode(RenderManual, {
|
87
|
-
modelValue:
|
88
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event)=>
|
140
|
+
modelValue: renderDatasetData.value,
|
141
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event)=>renderDatasetData.value = $event),
|
142
|
+
"api-prefix": _ctx.apiPrefix,
|
89
143
|
ref_key: "manualRef",
|
90
144
|
ref: manualRef
|
91
145
|
}, null, 8 /* PROPS */ , [
|
92
|
-
"modelValue"
|
146
|
+
"modelValue",
|
147
|
+
"api-prefix"
|
93
148
|
]),
|
94
149
|
_createVNode(RenderDataset, {
|
95
|
-
modelValue:
|
96
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event)=>
|
150
|
+
modelValue: renderDatasetData.value,
|
151
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event)=>renderDatasetData.value = $event),
|
152
|
+
"api-prefix": _ctx.apiPrefix,
|
97
153
|
ref_key: "datasetRef",
|
98
154
|
ref: datasetRef
|
99
155
|
}, null, 8 /* PROPS */ , [
|
100
|
-
"modelValue"
|
156
|
+
"modelValue",
|
157
|
+
"api-prefix"
|
101
158
|
])
|
102
159
|
])) : _createCommentVNode("v-if", true)
|
103
160
|
]),
|
@@ -1,10 +1,7 @@
|
|
1
1
|
|
2
|
-
.plus-dataset-data[data-v-
|
2
|
+
.plus-dataset-data[data-v-af630yfq] {
|
3
3
|
padding: 20px 24px;
|
4
4
|
}
|
5
|
-
.plus-dataset-sideslider[data-v-
|
6
|
-
margin-top: 0;
|
7
|
-
}
|
8
|
-
.plus-dataset-sideslider[data-v-2pl21qci] .bk-modal-content {
|
5
|
+
.plus-dataset-sideslider[data-v-af630yfq] .bk-modal-content {
|
9
6
|
scrollbar-gutter: inherit !important;
|
10
7
|
}
|
@@ -1,5 +1,8 @@
|
|
1
|
+
import type { IDatasetDataForm } from '@/types/dataset';
|
1
2
|
interface IProps {
|
2
3
|
isShow: boolean;
|
4
|
+
apiPrefix: string;
|
5
|
+
datasetData?: Partial<IDatasetDataForm>;
|
3
6
|
}
|
4
7
|
declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
5
8
|
"update:isShow": (val: 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-af630yfq";
|
3
3
|
script.__file = "./src/components/render-dataset/components/plus-dataset-data/form/index.vue";
|
4
4
|
import './index.vue.css';
|
5
5
|
export default script;
|
package/dist/components/render-dataset/components/plus-dataset-data/form/manual.script.vue.js.js
CHANGED
@@ -51,14 +51,15 @@ function _object_spread_props(target, source) {
|
|
51
51
|
return target;
|
52
52
|
}
|
53
53
|
import { defineComponent as _defineComponent } from 'vue';
|
54
|
-
import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createBlock as _createBlock,
|
54
|
+
import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from "vue";
|
55
55
|
import { ref, useTemplateRef, watch } from 'vue';
|
56
56
|
import AutoHeightTextarea from '../../../../render-auto-height-textarea/index.vue.js';
|
57
57
|
import { useDatasetHttp } from '../../../../../hooks/use-dataset-http.ts.js';
|
58
58
|
import { DatasetDataSourceType } from '../../../../../types/enum.ts.js';
|
59
59
|
export default /*@__PURE__*/ _defineComponent({
|
60
60
|
props: {
|
61
|
-
modelValue: {}
|
61
|
+
modelValue: {},
|
62
|
+
apiPrefix: {}
|
62
63
|
},
|
63
64
|
emits: [
|
64
65
|
"update:modelValue"
|
@@ -66,11 +67,18 @@ export default /*@__PURE__*/ _defineComponent({
|
|
66
67
|
setup (__props, { expose: __expose, emit: __emit }) {
|
67
68
|
const props = __props;
|
68
69
|
const emits = __emit;
|
69
|
-
const { getSchemaList } = useDatasetHttp();
|
70
|
+
const { getSchemaList } = useDatasetHttp(props.apiPrefix);
|
70
71
|
const formRef = useTemplateRef('formRef');
|
71
72
|
const loading = ref(false);
|
72
73
|
const schema = ref({});
|
73
|
-
const validate = ()=>
|
74
|
+
const validate = ()=>{
|
75
|
+
var _formRef_value;
|
76
|
+
return (_formRef_value = formRef.value) === null || _formRef_value === void 0 ? void 0 : _formRef_value.validate();
|
77
|
+
};
|
78
|
+
const clearValidate = ()=>{
|
79
|
+
var _formRef_value;
|
80
|
+
return (_formRef_value = formRef.value) === null || _formRef_value === void 0 ? void 0 : _formRef_value.clearValidate();
|
81
|
+
};
|
74
82
|
const handleUpdate = (key, value)=>{
|
75
83
|
const modelValue = _object_spread_props(_object_spread({}, props.modelValue), {
|
76
84
|
data: _object_spread_props(_object_spread({}, props.modelValue.data), {
|
@@ -79,6 +87,12 @@ export default /*@__PURE__*/ _defineComponent({
|
|
79
87
|
});
|
80
88
|
emits('update:modelValue', modelValue);
|
81
89
|
};
|
90
|
+
const handleClearData = ()=>{
|
91
|
+
const modelValue = _object_spread_props(_object_spread({}, props.modelValue), {
|
92
|
+
data: {}
|
93
|
+
});
|
94
|
+
emits('update:modelValue', modelValue);
|
95
|
+
};
|
82
96
|
const handleUpdateSchema = (schemaItem)=>{
|
83
97
|
// 保存 schema
|
84
98
|
schema.value = schemaItem || {};
|
@@ -93,6 +107,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
93
107
|
emits('update:modelValue', modelValue);
|
94
108
|
};
|
95
109
|
const handleInitSchema = ()=>{
|
110
|
+
// 不是手动,无需初始化模型
|
111
|
+
if (props.modelValue.sourceType !== DatasetDataSourceType.ManualImport) {
|
112
|
+
return;
|
113
|
+
}
|
96
114
|
if (!props.modelValue.datasetId) {
|
97
115
|
// 清空
|
98
116
|
handleUpdateSchema();
|
@@ -107,62 +125,69 @@ export default /*@__PURE__*/ _defineComponent({
|
|
107
125
|
loading.value = false;
|
108
126
|
});
|
109
127
|
};
|
110
|
-
watch(()=>props.modelValue.
|
128
|
+
watch(()=>props.modelValue.sourceType, handleClearData);
|
129
|
+
watch([
|
130
|
+
()=>props.modelValue.datasetId,
|
131
|
+
()=>props.modelValue.sourceType
|
132
|
+
], handleInitSchema, {
|
111
133
|
immediate: true
|
112
134
|
});
|
113
135
|
__expose({
|
114
|
-
validate
|
136
|
+
validate,
|
137
|
+
clearValidate
|
115
138
|
});
|
116
139
|
return (_ctx, _cache)=>{
|
117
140
|
const _component_bk_form_item = _resolveComponent("bk-form-item");
|
118
141
|
const _component_bk_form = _resolveComponent("bk-form");
|
119
|
-
const
|
120
|
-
return _ctx.modelValue.sourceType === _unref(DatasetDataSourceType).ManualImport ?
|
142
|
+
const _component_bk_loading = _resolveComponent("bk-loading");
|
143
|
+
return _ctx.modelValue.sourceType === _unref(DatasetDataSourceType).ManualImport ? (_openBlock(), _createBlock(_component_bk_loading, {
|
121
144
|
key: 0,
|
122
|
-
|
123
|
-
"form-type": "vertical",
|
124
|
-
ref_key: "formRef",
|
125
|
-
ref: formRef,
|
126
|
-
model: _ctx.modelValue
|
145
|
+
loading: loading.value
|
127
146
|
}, {
|
128
147
|
default: _withCtx(()=>[
|
129
|
-
(
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
148
|
+
_createVNode(_component_bk_form, {
|
149
|
+
class: "g-small-form",
|
150
|
+
"form-type": "vertical",
|
151
|
+
ref_key: "formRef",
|
152
|
+
ref: formRef,
|
153
|
+
model: _ctx.modelValue
|
154
|
+
}, {
|
155
|
+
default: _withCtx(()=>[
|
156
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(Object.keys(schema.value), (key)=>{
|
157
|
+
return _openBlock(), _createBlock(_component_bk_form_item, {
|
158
|
+
key: key,
|
159
|
+
label: key,
|
160
|
+
property: `data.${key}`,
|
161
|
+
required: ""
|
162
|
+
}, {
|
163
|
+
default: _withCtx(()=>[
|
164
|
+
_createVNode(AutoHeightTextarea, {
|
165
|
+
"model-value": _ctx.modelValue.data[key],
|
166
|
+
placeholder: schema.value[key],
|
167
|
+
height: 150,
|
168
|
+
onInput: (value)=>handleUpdate(key, value)
|
169
|
+
}, null, 8 /* PROPS */ , [
|
170
|
+
"model-value",
|
171
|
+
"placeholder",
|
172
|
+
"onInput"
|
173
|
+
])
|
174
|
+
]),
|
175
|
+
_: 2 /* DYNAMIC */
|
176
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
|
177
|
+
"label",
|
178
|
+
"property"
|
179
|
+
]);
|
180
|
+
}), 128 /* KEYED_FRAGMENT */ ))
|
181
|
+
]),
|
182
|
+
_: 1 /* STABLE */
|
183
|
+
}, 8 /* PROPS */ , [
|
184
|
+
"model"
|
185
|
+
])
|
154
186
|
]),
|
155
187
|
_: 1 /* STABLE */
|
156
188
|
}, 8 /* PROPS */ , [
|
157
|
-
"
|
158
|
-
])),
|
159
|
-
[
|
160
|
-
_directive_bkloading,
|
161
|
-
{
|
162
|
-
loading: loading.value
|
163
|
-
}
|
164
|
-
]
|
165
|
-
]) : _createCommentVNode("v-if", true);
|
189
|
+
"loading"
|
190
|
+
])) : _createCommentVNode("v-if", true);
|
166
191
|
};
|
167
192
|
}
|
168
193
|
});
|
@@ -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
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<{
|
@@ -3,6 +3,10 @@ import { createTextVNode as _createTextVNode, resolveComponent as _resolveCompon
|
|
3
3
|
import { ref } from 'vue';
|
4
4
|
import RenderForm from './form/index.vue.js';
|
5
5
|
export default /*@__PURE__*/ _defineComponent({
|
6
|
+
props: {
|
7
|
+
datasetData: {},
|
8
|
+
apiPrefix: {}
|
9
|
+
},
|
6
10
|
emits: [
|
7
11
|
"success-plus"
|
8
12
|
],
|
@@ -33,9 +37,13 @@ export default /*@__PURE__*/ _defineComponent({
|
|
33
37
|
_createVNode(RenderForm, {
|
34
38
|
"is-show": isShow.value,
|
35
39
|
"onUpdate:isShow": _cache[0] || (_cache[0] = ($event)=>isShow.value = $event),
|
40
|
+
"dataset-data": _ctx.datasetData,
|
41
|
+
"api-prefix": _ctx.apiPrefix,
|
36
42
|
onSuccessConfirm: handleSuccessPlus
|
37
43
|
}, null, 8 /* PROPS */ , [
|
38
|
-
"is-show"
|
44
|
+
"is-show",
|
45
|
+
"dataset-data",
|
46
|
+
"api-prefix"
|
39
47
|
])
|
40
48
|
], 64 /* STABLE_FRAGMENT */ );
|
41
49
|
};
|
@@ -1,6 +1,11 @@
|
|
1
|
-
|
1
|
+
import type { IDatasetDataForm } from '@/types/dataset';
|
2
|
+
interface IProps {
|
3
|
+
datasetData?: Partial<IDatasetDataForm>;
|
4
|
+
apiPrefix: string;
|
5
|
+
}
|
6
|
+
declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
2
7
|
"success-plus": () => any;
|
3
|
-
}, string, import("vue").PublicProps, Readonly<
|
8
|
+
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
4
9
|
"onSuccess-plus"?: () => any;
|
5
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions,
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
6
11
|
export default _default;
|
package/dist/components/render-dataset/components/search-operation-record/index.script.vue.js.js
CHANGED
@@ -1,147 +1,74 @@
|
|
1
|
-
function _define_property(obj, key, value) {
|
2
|
-
if (key in obj) {
|
3
|
-
Object.defineProperty(obj, key, {
|
4
|
-
value: value,
|
5
|
-
enumerable: true,
|
6
|
-
configurable: true,
|
7
|
-
writable: true
|
8
|
-
});
|
9
|
-
} else {
|
10
|
-
obj[key] = value;
|
11
|
-
}
|
12
|
-
return obj;
|
13
|
-
}
|
14
|
-
function _object_spread(target) {
|
15
|
-
for(var i = 1; i < arguments.length; i++){
|
16
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
17
|
-
var ownKeys = Object.keys(source);
|
18
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
19
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
20
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
21
|
-
}));
|
22
|
-
}
|
23
|
-
ownKeys.forEach(function(key) {
|
24
|
-
_define_property(target, key, source[key]);
|
25
|
-
});
|
26
|
-
}
|
27
|
-
return target;
|
28
|
-
}
|
29
1
|
import { defineComponent as _defineComponent } from 'vue';
|
30
2
|
import { openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
31
|
-
import {
|
3
|
+
import { ref } from 'vue';
|
32
4
|
import RenderSearchSelect from '../../../render-search-select/index.vue.js';
|
33
|
-
import {
|
34
|
-
import { DatasetDataOperatRecordType } from '../../../../types/enum.ts.js';
|
5
|
+
import { DatasetDataOperatRecordActionId, DatasetDataOperatRecordResultCode } from '../../../../types/enum.ts.js';
|
35
6
|
export default /*@__PURE__*/ _defineComponent({
|
36
7
|
props: {
|
37
8
|
modelValue: {},
|
38
|
-
apiPrefix: {},
|
39
9
|
datasetId: {}
|
40
10
|
},
|
41
11
|
emits: [
|
42
12
|
"update:modelValue"
|
43
13
|
],
|
44
14
|
setup (__props, { emit: __emit }) {
|
45
|
-
const props = __props;
|
46
15
|
const emits = __emit;
|
47
|
-
const { getSchemaList } = useDatasetHttp(props.apiPrefix);
|
48
16
|
const data = ref([
|
49
17
|
{
|
50
|
-
id: '
|
18
|
+
id: 'instanceId',
|
51
19
|
name: 'ID'
|
52
20
|
},
|
53
21
|
{
|
54
|
-
id: '
|
22
|
+
id: 'actionId',
|
55
23
|
name: '操作类型',
|
56
24
|
children: [
|
57
25
|
{
|
58
|
-
id:
|
59
|
-
name: '
|
60
|
-
},
|
61
|
-
{
|
62
|
-
id: DatasetDataOperatRecordType.Add,
|
63
|
-
name: '文件上传'
|
64
|
-
},
|
65
|
-
{
|
66
|
-
id: DatasetDataOperatRecordType.Add,
|
67
|
-
name: '文件上传'
|
68
|
-
},
|
69
|
-
{
|
70
|
-
id: DatasetDataOperatRecordType.Add,
|
71
|
-
name: '文件上传'
|
72
|
-
},
|
73
|
-
{
|
74
|
-
id: DatasetDataOperatRecordType.Add,
|
75
|
-
name: '文件上传'
|
26
|
+
id: DatasetDataOperatRecordActionId.AddDatasetItem,
|
27
|
+
name: '新增数据'
|
76
28
|
},
|
77
29
|
{
|
78
|
-
id:
|
79
|
-
name: '
|
30
|
+
id: DatasetDataOperatRecordActionId.DeleteDatasetItem,
|
31
|
+
name: '编辑数据'
|
80
32
|
},
|
81
33
|
{
|
82
|
-
id:
|
83
|
-
name: '
|
84
|
-
},
|
85
|
-
{
|
86
|
-
id: DatasetDataOperatRecordType.Add,
|
87
|
-
name: '文件上传'
|
88
|
-
},
|
89
|
-
{
|
90
|
-
id: DatasetDataOperatRecordType.Add,
|
91
|
-
name: '文件上传'
|
92
|
-
},
|
93
|
-
{
|
94
|
-
id: DatasetDataOperatRecordType.Add,
|
95
|
-
name: '文件上传'
|
34
|
+
id: DatasetDataOperatRecordActionId.EditDatasetItem,
|
35
|
+
name: '删除数据'
|
96
36
|
}
|
97
37
|
]
|
98
38
|
},
|
99
39
|
{
|
100
|
-
id: '
|
40
|
+
id: 'resultCode',
|
101
41
|
name: '操作状态',
|
102
42
|
children: [
|
103
43
|
{
|
104
|
-
id:
|
44
|
+
id: DatasetDataOperatRecordResultCode.Success,
|
105
45
|
name: '成功'
|
106
46
|
},
|
107
47
|
{
|
108
|
-
id:
|
48
|
+
id: DatasetDataOperatRecordResultCode.Failed,
|
109
49
|
name: '失败'
|
110
50
|
}
|
111
51
|
]
|
112
52
|
},
|
113
53
|
{
|
114
|
-
id: '
|
54
|
+
id: 'instanceData',
|
55
|
+
name: '操作结果'
|
56
|
+
},
|
57
|
+
{
|
58
|
+
id: 'username',
|
115
59
|
name: '操作人'
|
116
60
|
}
|
117
61
|
]);
|
118
|
-
const placeholder = ref('ID、操作类型、操作状态、操作人、');
|
119
62
|
const handleUpdate = (modelValue)=>{
|
120
|
-
emits('update:modelValue',
|
121
|
-
};
|
122
|
-
const handleGetSchema = ()=>{
|
123
|
-
getSchemaList(props.datasetId).then((schemaList)=>{
|
124
|
-
const schema = schemaList[0];
|
125
|
-
const searchSelectItems = Object.keys(schema.schema).reduce((acc, cur)=>{
|
126
|
-
acc.push({
|
127
|
-
id: cur,
|
128
|
-
name: cur
|
129
|
-
});
|
130
|
-
return acc;
|
131
|
-
}, []);
|
132
|
-
data.value.push(...searchSelectItems);
|
133
|
-
placeholder.value += searchSelectItems.map((item)=>item.id).join('、');
|
134
|
-
});
|
63
|
+
emits('update:modelValue', modelValue);
|
135
64
|
};
|
136
|
-
onBeforeMount(handleGetSchema);
|
137
65
|
return (_ctx, _cache)=>{
|
138
66
|
return _openBlock(), _createBlock(RenderSearchSelect, {
|
139
|
-
placeholder:
|
67
|
+
placeholder: "ID、操作类型、操作状态、操作结果、操作人",
|
140
68
|
data: data.value,
|
141
69
|
"model-value": _ctx.modelValue,
|
142
70
|
"onUpdate:modelValue": handleUpdate
|
143
71
|
}, null, 8 /* PROPS */ , [
|
144
|
-
"placeholder",
|
145
72
|
"data",
|
146
73
|
"model-value"
|
147
74
|
]);
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { IOperatRecordParam } from '@/types/dataset';
|
2
2
|
interface IProps {
|
3
3
|
modelValue: IOperatRecordParam;
|
4
|
-
apiPrefix: string;
|
5
4
|
datasetId: number;
|
6
5
|
}
|
7
6
|
declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
@@ -1,10 +1,10 @@
|
|
1
1
|
|
2
|
-
.bkaidev-markdown[data-v-
|
2
|
+
.bkaidev-markdown[data-v-xyj6m0za] {
|
3
3
|
color: #3a84ff;
|
4
4
|
}
|
5
|
-
.bkaidev-wangye[data-v-
|
5
|
+
.bkaidev-wangye[data-v-xyj6m0za] {
|
6
6
|
color: #14A568;
|
7
7
|
}
|
8
|
-
.bkaidev-wenben[data-v-
|
8
|
+
.bkaidev-wenben[data-v-xyj6m0za] {
|
9
9
|
color: #979ba5;
|
10
10
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import script from './index.script.vue.js.js';
|
2
|
-
script.__scopeId = "data-v-
|
2
|
+
script.__scopeId = "data-v-xyj6m0za";
|
3
3
|
script.__file = "./src/components/render-dataset/components/source-type-icon/index.vue";
|
4
4
|
import './index.vue.css';
|
5
5
|
export default script;
|