@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/types/dataset.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { IPage } from './common';
|
2
|
-
import type {
|
2
|
+
import type { DatasetDataOperatRecordActionId, DatasetDataOperatRecordResultCode, DatasetDataSourceType, DatasetType } from './enum';
|
3
3
|
import type { IFileInfo, IFileInfoApi } from './file';
|
4
4
|
export interface IDatasetInfo {
|
5
5
|
all: number;
|
@@ -85,6 +85,7 @@ export interface IDatasetData extends IDatasetDataForm {
|
|
85
85
|
id: number;
|
86
86
|
}
|
87
87
|
export interface IDatasetDataParam extends IPage {
|
88
|
+
datasetId?: number;
|
88
89
|
createdBy?: string;
|
89
90
|
modelType?: string;
|
90
91
|
ordering?: string;
|
@@ -92,30 +93,30 @@ export interface IDatasetDataParam extends IPage {
|
|
92
93
|
[key: string]: string | number;
|
93
94
|
}
|
94
95
|
export interface IDatasetDataParamApi extends IPage {
|
96
|
+
dataset_id?: number;
|
95
97
|
created_by?: string;
|
96
98
|
model_type?: string;
|
97
99
|
ordering?: string;
|
98
100
|
source_type?: DatasetDataSourceType;
|
101
|
+
[key: string]: string | number;
|
99
102
|
}
|
100
|
-
export interface
|
101
|
-
|
102
|
-
|
103
|
-
company: number;
|
104
|
-
telephone: string;
|
105
|
-
id: number;
|
103
|
+
export interface IUserInfoFormApi {
|
104
|
+
company_id: number;
|
105
|
+
phone: string;
|
106
106
|
email: string;
|
107
|
-
username: string;
|
108
|
-
status: UserInfoStatus;
|
109
107
|
}
|
110
|
-
export interface
|
111
|
-
|
112
|
-
|
113
|
-
company: number;
|
114
|
-
telephone: string;
|
115
|
-
id: number;
|
108
|
+
export interface IUserInfoForm {
|
109
|
+
companyId: number;
|
110
|
+
phone: string;
|
116
111
|
email: string;
|
117
|
-
|
118
|
-
|
112
|
+
}
|
113
|
+
export interface IUserInfoApi extends IUserInfoFormApi {
|
114
|
+
nickname: string;
|
115
|
+
company_name: string;
|
116
|
+
}
|
117
|
+
export interface IUserInfo extends IUserInfoForm {
|
118
|
+
nickname: string;
|
119
|
+
companyName: string;
|
119
120
|
}
|
120
121
|
export interface ISchema {
|
121
122
|
id: string;
|
@@ -124,30 +125,49 @@ export interface ISchema {
|
|
124
125
|
}
|
125
126
|
export interface IOperatRecordParam {
|
126
127
|
id?: number;
|
127
|
-
|
128
|
-
|
128
|
+
instanceId?: number;
|
129
|
+
parentId?: number;
|
130
|
+
resourceTypeId: 'dataset_item';
|
131
|
+
username?: string;
|
132
|
+
actionId?: DatasetDataOperatRecordActionId;
|
133
|
+
date?: {
|
134
|
+
start: string;
|
135
|
+
end: string;
|
136
|
+
};
|
137
|
+
resultCode?: DatasetDataOperatRecordResultCode;
|
138
|
+
instanceData?: string;
|
139
|
+
}
|
140
|
+
export interface IOperatRecordParamApi {
|
141
|
+
id?: number;
|
142
|
+
instance_id?: number;
|
143
|
+
parent_id?: number;
|
144
|
+
resource_type_id: 'dataset_item';
|
145
|
+
username?: string;
|
146
|
+
action_id?: DatasetDataOperatRecordActionId;
|
129
147
|
date?: {
|
130
148
|
start: string;
|
131
149
|
end: string;
|
132
150
|
};
|
133
|
-
|
134
|
-
|
151
|
+
result_code?: DatasetDataOperatRecordResultCode;
|
152
|
+
instance_data?: string;
|
135
153
|
}
|
136
154
|
export interface IOperatRecordApi {
|
137
155
|
id: number;
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
156
|
+
username: string;
|
157
|
+
instance_id: number;
|
158
|
+
action_id: DatasetDataOperatRecordActionId;
|
159
|
+
result_code: DatasetDataOperatRecordResultCode;
|
160
|
+
instance_data: Record<string, string>;
|
161
|
+
end_time: string;
|
143
162
|
}
|
144
163
|
export interface IOperatRecord {
|
145
164
|
id: number;
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
165
|
+
username: string;
|
166
|
+
instanceId: number;
|
167
|
+
actionId: DatasetDataOperatRecordActionId;
|
168
|
+
resultCode: DatasetDataOperatRecordResultCode;
|
169
|
+
instanceData: Record<string, string>;
|
170
|
+
endTime: string;
|
151
171
|
}
|
152
172
|
export interface ICompanyParticipantApi {
|
153
173
|
category: string;
|
package/dist/types/enum.d.ts
CHANGED
@@ -89,8 +89,7 @@ export declare enum FileLinkType {
|
|
89
89
|
BkRepo = "bk_repo"
|
90
90
|
}
|
91
91
|
export declare enum EventType {
|
92
|
-
|
93
|
-
Unauthorized = "unauthorized"
|
92
|
+
Error = "error"
|
94
93
|
}
|
95
94
|
export declare enum LLMSupport {
|
96
95
|
Summary = "summary",
|
@@ -110,21 +109,18 @@ export declare enum DatasetDataSourceType {
|
|
110
109
|
KnowledgebaseImport = "knowledgebase_import",
|
111
110
|
ManualImport = "manual_import"
|
112
111
|
}
|
113
|
-
export declare enum
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
}
|
119
|
-
export declare enum
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
AutoPass = "auto_pass",
|
128
|
-
AutoReject = "auto_reject",
|
129
|
-
DataCleaning = "data_cleaning"
|
112
|
+
export declare enum UserStatus {
|
113
|
+
Unauthorized = "UNAUTHORIZED",
|
114
|
+
NotSubmitted = "NOT_SUBMITTED",
|
115
|
+
Approval = "APPROVAL",
|
116
|
+
Deny = "DENY"
|
117
|
+
}
|
118
|
+
export declare enum DatasetDataOperatRecordActionId {
|
119
|
+
AddDatasetItem = "add_dataset_item",
|
120
|
+
EditDatasetItem = "edit_dataset_item",
|
121
|
+
DeleteDatasetItem = "delete_dataset_item"
|
122
|
+
}
|
123
|
+
export declare enum DatasetDataOperatRecordResultCode {
|
124
|
+
Success = 0,
|
125
|
+
Failed = 1
|
130
126
|
}
|
package/dist/types/enum.ts.js
CHANGED
@@ -101,8 +101,7 @@ export var FileLinkType;
|
|
101
101
|
})(FileLinkType || (FileLinkType = {}));
|
102
102
|
export var EventType;
|
103
103
|
(function(EventType) {
|
104
|
-
EventType["
|
105
|
-
EventType["Unauthorized"] = "unauthorized";
|
104
|
+
EventType["Error"] = "error";
|
106
105
|
})(EventType || (EventType = {}));
|
107
106
|
export var LLMSupport;
|
108
107
|
(function(LLMSupport) {
|
@@ -125,23 +124,21 @@ export var DatasetDataSourceType;
|
|
125
124
|
DatasetDataSourceType["KnowledgebaseImport"] = "knowledgebase_import";
|
126
125
|
DatasetDataSourceType["ManualImport"] = "manual_import";
|
127
126
|
})(DatasetDataSourceType || (DatasetDataSourceType = {}));
|
128
|
-
export var
|
129
|
-
(function(
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
})(
|
135
|
-
export var
|
136
|
-
(function(
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
DatasetDataOperatRecordType["DataCleaning"] = "data_cleaning";
|
147
|
-
})(DatasetDataOperatRecordType || (DatasetDataOperatRecordType = {}));
|
127
|
+
export var UserStatus;
|
128
|
+
(function(UserStatus) {
|
129
|
+
UserStatus["Unauthorized"] = "UNAUTHORIZED";
|
130
|
+
UserStatus["NotSubmitted"] = "NOT_SUBMITTED";
|
131
|
+
UserStatus["Approval"] = "APPROVAL";
|
132
|
+
UserStatus["Deny"] = "DENY";
|
133
|
+
})(UserStatus || (UserStatus = {}));
|
134
|
+
export var DatasetDataOperatRecordActionId;
|
135
|
+
(function(DatasetDataOperatRecordActionId) {
|
136
|
+
DatasetDataOperatRecordActionId["AddDatasetItem"] = "add_dataset_item";
|
137
|
+
DatasetDataOperatRecordActionId["EditDatasetItem"] = "edit_dataset_item";
|
138
|
+
DatasetDataOperatRecordActionId["DeleteDatasetItem"] = "delete_dataset_item";
|
139
|
+
})(DatasetDataOperatRecordActionId || (DatasetDataOperatRecordActionId = {}));
|
140
|
+
export var DatasetDataOperatRecordResultCode;
|
141
|
+
(function(DatasetDataOperatRecordResultCode) {
|
142
|
+
DatasetDataOperatRecordResultCode[DatasetDataOperatRecordResultCode["Success"] = 0] = "Success";
|
143
|
+
DatasetDataOperatRecordResultCode[DatasetDataOperatRecordResultCode["Failed"] = 1] = "Failed";
|
144
|
+
})(DatasetDataOperatRecordResultCode || (DatasetDataOperatRecordResultCode = {}));
|
package/package.json
CHANGED
@@ -1,268 +0,0 @@
|
|
1
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
2
|
-
try {
|
3
|
-
var info = gen[key](arg);
|
4
|
-
var value = info.value;
|
5
|
-
} catch (error) {
|
6
|
-
reject(error);
|
7
|
-
return;
|
8
|
-
}
|
9
|
-
if (info.done) {
|
10
|
-
resolve(value);
|
11
|
-
} else {
|
12
|
-
Promise.resolve(value).then(_next, _throw);
|
13
|
-
}
|
14
|
-
}
|
15
|
-
function _async_to_generator(fn) {
|
16
|
-
return function() {
|
17
|
-
var self = this, args = arguments;
|
18
|
-
return new Promise(function(resolve, reject) {
|
19
|
-
var gen = fn.apply(self, args);
|
20
|
-
function _next(value) {
|
21
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
22
|
-
}
|
23
|
-
function _throw(err) {
|
24
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
25
|
-
}
|
26
|
-
_next(undefined);
|
27
|
-
});
|
28
|
-
};
|
29
|
-
}
|
30
|
-
function _define_property(obj, key, value) {
|
31
|
-
if (key in obj) {
|
32
|
-
Object.defineProperty(obj, key, {
|
33
|
-
value: value,
|
34
|
-
enumerable: true,
|
35
|
-
configurable: true,
|
36
|
-
writable: true
|
37
|
-
});
|
38
|
-
} else {
|
39
|
-
obj[key] = value;
|
40
|
-
}
|
41
|
-
return obj;
|
42
|
-
}
|
43
|
-
function _object_spread(target) {
|
44
|
-
for(var i = 1; i < arguments.length; i++){
|
45
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
46
|
-
var ownKeys = Object.keys(source);
|
47
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
48
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
49
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
50
|
-
}));
|
51
|
-
}
|
52
|
-
ownKeys.forEach(function(key) {
|
53
|
-
_define_property(target, key, source[key]);
|
54
|
-
});
|
55
|
-
}
|
56
|
-
return target;
|
57
|
-
}
|
58
|
-
import { defineComponent as _defineComponent } from 'vue';
|
59
|
-
import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, resolveComponent as _resolveComponent, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, unref as _unref, withCtx as _withCtx, createBlock as _createBlock, createTextVNode as _createTextVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createSlots as _createSlots } from "vue";
|
60
|
-
const _hoisted_1 = {
|
61
|
-
class: "g-flex-row g-justify-between"
|
62
|
-
};
|
63
|
-
const _hoisted_2 = {
|
64
|
-
class: "id"
|
65
|
-
};
|
66
|
-
const _hoisted_3 = {
|
67
|
-
class: "content"
|
68
|
-
};
|
69
|
-
const _hoisted_4 = {
|
70
|
-
class: "value-content"
|
71
|
-
};
|
72
|
-
import { EditLine } from 'bkui-vue/lib/icon';
|
73
|
-
import { nextTick, ref, watch } from 'vue';
|
74
|
-
import Collapse from '../../../render-collapse/index.vue.js';
|
75
|
-
import { useDatasetHttp } from '../../../../hooks/use-dataset-http.ts.js';
|
76
|
-
export default /*@__PURE__*/ _defineComponent({
|
77
|
-
props: {
|
78
|
-
isShow: {
|
79
|
-
type: Boolean
|
80
|
-
},
|
81
|
-
data: {},
|
82
|
-
apiPrefix: {}
|
83
|
-
},
|
84
|
-
emits: [
|
85
|
-
"update:isShow"
|
86
|
-
],
|
87
|
-
setup (__props, { emit: __emit }) {
|
88
|
-
const props = __props;
|
89
|
-
const emits = __emit;
|
90
|
-
const { updateDatasetData } = useDatasetHttp(props.apiPrefix);
|
91
|
-
const pagination = {
|
92
|
-
current: 1,
|
93
|
-
limit: 10,
|
94
|
-
count: 10
|
95
|
-
};
|
96
|
-
const mode = ref('view');
|
97
|
-
const editTextarea = ref();
|
98
|
-
const formData = ref();
|
99
|
-
const editData = ref({
|
100
|
-
key: '',
|
101
|
-
value: ''
|
102
|
-
});
|
103
|
-
watch(()=>props.isShow, (val)=>{
|
104
|
-
if (val) {
|
105
|
-
mode.value = 'view';
|
106
|
-
formData.value = _object_spread({}, props.data);
|
107
|
-
}
|
108
|
-
});
|
109
|
-
const handleEdit = (key, value)=>{
|
110
|
-
editData.value = {
|
111
|
-
key,
|
112
|
-
value
|
113
|
-
};
|
114
|
-
mode.value = 'edit';
|
115
|
-
nextTick(()=>{
|
116
|
-
if (editTextarea.value) {
|
117
|
-
editTextarea.value.focus();
|
118
|
-
}
|
119
|
-
});
|
120
|
-
};
|
121
|
-
const handleClose = ()=>{
|
122
|
-
emits('update:isShow', false);
|
123
|
-
return true;
|
124
|
-
};
|
125
|
-
const handleConfirm = function() {
|
126
|
-
var _ref = _async_to_generator(function*() {
|
127
|
-
formData.value.data[editData.value.key] = editData.value.value;
|
128
|
-
yield updateDatasetData(formData.value, formData.value.id);
|
129
|
-
mode.value = 'view';
|
130
|
-
});
|
131
|
-
return function handleConfirm() {
|
132
|
-
return _ref.apply(this, arguments);
|
133
|
-
};
|
134
|
-
}();
|
135
|
-
return (_ctx, _cache)=>{
|
136
|
-
const _component_bk_pagination = _resolveComponent("bk-pagination");
|
137
|
-
const _component_bk_input = _resolveComponent("bk-input");
|
138
|
-
const _component_bk_button = _resolveComponent("bk-button");
|
139
|
-
const _component_bk_sideslider = _resolveComponent("bk-sideslider");
|
140
|
-
const _directive_bk_tooltips = _resolveDirective("bk-tooltips");
|
141
|
-
return _openBlock(), _createBlock(_component_bk_sideslider, {
|
142
|
-
class: "data-set-edit-slider",
|
143
|
-
width: 960,
|
144
|
-
"is-show": _ctx.isShow,
|
145
|
-
"before-close": handleClose
|
146
|
-
}, _createSlots({
|
147
|
-
header: _withCtx(()=>[
|
148
|
-
_createElementVNode("div", _hoisted_1, [
|
149
|
-
_cache[3] || (_cache[3] = _createElementVNode("span", null, "编辑数据", -1 /* HOISTED */ )),
|
150
|
-
_createElementVNode("span", _hoisted_2, _toDisplayString(`#${_ctx.data.id}`), 1 /* TEXT */ )
|
151
|
-
]),
|
152
|
-
_createVNode(_component_bk_pagination, {
|
153
|
-
modelValue: pagination.current,
|
154
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>pagination.current = $event),
|
155
|
-
class: "g-mr-24",
|
156
|
-
small: "",
|
157
|
-
count: 10,
|
158
|
-
limit: 1,
|
159
|
-
"limit-list": [
|
160
|
-
1
|
161
|
-
],
|
162
|
-
layout: [
|
163
|
-
'list'
|
164
|
-
]
|
165
|
-
}, null, 8 /* PROPS */ , [
|
166
|
-
"modelValue"
|
167
|
-
])
|
168
|
-
]),
|
169
|
-
default: _withCtx(()=>[
|
170
|
-
_createElementVNode("section", _hoisted_3, [
|
171
|
-
mode.value === 'view' ? (_openBlock(true), _createElementBlock(_Fragment, {
|
172
|
-
key: 0
|
173
|
-
}, _renderList(_ctx.data.data, (value, key)=>{
|
174
|
-
return _openBlock(), _createElementBlock("div", {
|
175
|
-
class: "g-mb-16",
|
176
|
-
key: key
|
177
|
-
}, [
|
178
|
-
_createVNode(Collapse, {
|
179
|
-
title: key
|
180
|
-
}, {
|
181
|
-
suffix: _withCtx(()=>[
|
182
|
-
_createVNode(_unref(EditLine), {
|
183
|
-
class: "g-ml-10 g-text-blue g-cursor-pointer",
|
184
|
-
onClick: ($event)=>handleEdit(key, value)
|
185
|
-
}, null, 8 /* PROPS */ , [
|
186
|
-
"onClick"
|
187
|
-
])
|
188
|
-
]),
|
189
|
-
default: _withCtx(()=>[
|
190
|
-
_createElementVNode("div", _hoisted_4, [
|
191
|
-
_createElementVNode("span", null, _toDisplayString(value), 1 /* TEXT */ )
|
192
|
-
])
|
193
|
-
]),
|
194
|
-
_: 2 /* DYNAMIC */
|
195
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
|
196
|
-
"title"
|
197
|
-
])
|
198
|
-
]);
|
199
|
-
}), 128 /* KEYED_FRAGMENT */ )) : (_openBlock(), _createBlock(Collapse, {
|
200
|
-
key: 1,
|
201
|
-
title: `编辑${editData.value.key}`
|
202
|
-
}, {
|
203
|
-
default: _withCtx(()=>[
|
204
|
-
_createVNode(_component_bk_input, {
|
205
|
-
modelValue: editData.value.value,
|
206
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)=>editData.value.value = $event),
|
207
|
-
ref_key: "editTextarea",
|
208
|
-
ref: editTextarea,
|
209
|
-
class: "edit-textarea",
|
210
|
-
type: "textarea",
|
211
|
-
resize: false
|
212
|
-
}, null, 8 /* PROPS */ , [
|
213
|
-
"modelValue"
|
214
|
-
])
|
215
|
-
]),
|
216
|
-
_: 1 /* STABLE */
|
217
|
-
}, 8 /* PROPS */ , [
|
218
|
-
"title"
|
219
|
-
]))
|
220
|
-
])
|
221
|
-
]),
|
222
|
-
_: 2 /* DYNAMIC */
|
223
|
-
}, [
|
224
|
-
mode.value === 'edit' ? {
|
225
|
-
name: "footer",
|
226
|
-
fn: _withCtx(()=>[
|
227
|
-
_withDirectives((_openBlock(), _createBlock(_component_bk_button, {
|
228
|
-
class: "footer-button",
|
229
|
-
theme: "primary",
|
230
|
-
onClick: handleConfirm
|
231
|
-
}, {
|
232
|
-
default: _withCtx(()=>_cache[4] || (_cache[4] = [
|
233
|
-
_createTextVNode(" 保存 ")
|
234
|
-
])),
|
235
|
-
_: 1 /* STABLE */ ,
|
236
|
-
__: [
|
237
|
-
4
|
238
|
-
]
|
239
|
-
})), [
|
240
|
-
[
|
241
|
-
_directive_bk_tooltips,
|
242
|
-
{
|
243
|
-
content: '如数据已审核通过,重新编辑\n后,将会重新进入待审核状态',
|
244
|
-
placement: 'top'
|
245
|
-
}
|
246
|
-
]
|
247
|
-
]),
|
248
|
-
_createVNode(_component_bk_button, {
|
249
|
-
class: "footer-button",
|
250
|
-
onClick: _cache[2] || (_cache[2] = ($event)=>mode.value = 'view')
|
251
|
-
}, {
|
252
|
-
default: _withCtx(()=>_cache[5] || (_cache[5] = [
|
253
|
-
_createTextVNode(" 取消 ")
|
254
|
-
])),
|
255
|
-
_: 1 /* STABLE */ ,
|
256
|
-
__: [
|
257
|
-
5
|
258
|
-
]
|
259
|
-
})
|
260
|
-
]),
|
261
|
-
key: "0"
|
262
|
-
} : undefined
|
263
|
-
]), 1032 /* PROPS, DYNAMIC_SLOTS */ , [
|
264
|
-
"is-show"
|
265
|
-
]);
|
266
|
-
};
|
267
|
-
}
|
268
|
-
});
|
package/dist/components/render-dataset-detail-origin-data/components/edit-data/index.vue.css
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
|
2
|
-
.content[data-v-6jop091p] {
|
3
|
-
padding: 18px 24px 0;
|
4
|
-
height: 100%;
|
5
|
-
overflow: auto;
|
6
|
-
}
|
7
|
-
.data-set-edit-slider .value-content[data-v-6jop091p] {
|
8
|
-
margin-top: 8px;
|
9
|
-
padding: 16px;
|
10
|
-
border: 1px solid #DCDEE5;
|
11
|
-
}
|
12
|
-
.data-set-edit-slider[data-v-6jop091p] .bk-sideslider-title {
|
13
|
-
justify-content: space-between;
|
14
|
-
width: 100%;
|
15
|
-
}
|
16
|
-
.data-set-edit-slider[data-v-6jop091p] .bk-sideslider-title .id::before {
|
17
|
-
content: '';
|
18
|
-
display: inline-block;
|
19
|
-
width: 1px;
|
20
|
-
height: 14px;
|
21
|
-
background: #DCDEE5;
|
22
|
-
margin: 0 8px 0 16px;
|
23
|
-
}
|
24
|
-
.data-set-edit-slider[data-v-6jop091p] .bk-sideslider-content {
|
25
|
-
height: calc(100vh - 60px - 56px);
|
26
|
-
}
|
27
|
-
.data-set-edit-slider[data-v-6jop091p] .bk-sideslider-content .edit-textarea {
|
28
|
-
height: calc(100% - 40px);
|
29
|
-
margin-top: 8px;
|
30
|
-
}
|
31
|
-
.data-set-edit-slider[data-v-6jop091p] .bk-sideslider-content .edit-textarea textarea {
|
32
|
-
padding: 16px;
|
33
|
-
height: 100%;
|
34
|
-
}
|
35
|
-
.footer-button[data-v-6jop091p] {
|
36
|
-
width: 88px;
|
37
|
-
margin-right: 8px;
|
38
|
-
}
|
package/dist/components/render-dataset-detail-origin-data/components/edit-data/index.vue.d.ts
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
import { IDatasetData } from '@/types/dataset';
|
2
|
-
interface IProps {
|
3
|
-
isShow: boolean;
|
4
|
-
data: IDatasetData;
|
5
|
-
apiPrefix: string;
|
6
|
-
}
|
7
|
-
declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
8
|
-
"update:isShow": (value: boolean) => any;
|
9
|
-
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
10
|
-
"onUpdate:isShow"?: (value: boolean) => any;
|
11
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
12
|
-
export default _default;
|
@@ -1,96 +0,0 @@
|
|
1
|
-
import { defineComponent as _defineComponent } from 'vue';
|
2
|
-
import { createVNode as _createVNode, resolveComponent as _resolveComponent, createElementVNode as _createElementVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } 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 RenderTable from './table/index.vue.js';
|
11
|
-
import RenderSearchOperationRecord from '../../../render-dataset/components/search-operation-record/index.vue.js';
|
12
|
-
export default /*@__PURE__*/ _defineComponent({
|
13
|
-
props: {
|
14
|
-
isShow: {
|
15
|
-
type: Boolean
|
16
|
-
},
|
17
|
-
datasetId: {},
|
18
|
-
apiPrefix: {}
|
19
|
-
},
|
20
|
-
emits: [
|
21
|
-
"update:isShow"
|
22
|
-
],
|
23
|
-
setup (__props, { emit: __emit }) {
|
24
|
-
const emits = __emit;
|
25
|
-
const search = ref({});
|
26
|
-
const handleClose = ()=>{
|
27
|
-
emits('update:isShow', false);
|
28
|
-
return true;
|
29
|
-
};
|
30
|
-
const handleDateChange = (value)=>{
|
31
|
-
search.value.date = {
|
32
|
-
start: value[0],
|
33
|
-
end: value[1]
|
34
|
-
};
|
35
|
-
};
|
36
|
-
return (_ctx, _cache)=>{
|
37
|
-
const _component_bk_date_picker = _resolveComponent("bk-date-picker");
|
38
|
-
const _component_bk_sideslider = _resolveComponent("bk-sideslider");
|
39
|
-
return _openBlock(), _createBlock(_component_bk_sideslider, {
|
40
|
-
title: "操作记录",
|
41
|
-
class: "record-slider",
|
42
|
-
width: 960,
|
43
|
-
"is-show": _ctx.isShow,
|
44
|
-
"before-close": handleClose
|
45
|
-
}, {
|
46
|
-
default: _withCtx(()=>[
|
47
|
-
_createElementVNode("section", _hoisted_1, [
|
48
|
-
_createElementVNode("section", _hoisted_2, [
|
49
|
-
_createVNode(RenderSearchOperationRecord, {
|
50
|
-
modelValue: search.value,
|
51
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>search.value = $event),
|
52
|
-
"api-prefix": _ctx.apiPrefix,
|
53
|
-
"dataset-id": _ctx.datasetId,
|
54
|
-
class: "record-search"
|
55
|
-
}, null, 8 /* PROPS */ , [
|
56
|
-
"modelValue",
|
57
|
-
"api-prefix",
|
58
|
-
"dataset-id"
|
59
|
-
]),
|
60
|
-
_createVNode(_component_bk_date_picker, {
|
61
|
-
ref: "datePickerRef",
|
62
|
-
class: "record-data-picker",
|
63
|
-
type: "daterange",
|
64
|
-
"append-to-body": "",
|
65
|
-
clearable: "",
|
66
|
-
format: "yyyy-MM-dd",
|
67
|
-
"model-value": [
|
68
|
-
search.value.date.start,
|
69
|
-
search.value.date.end
|
70
|
-
],
|
71
|
-
"time-picker-options": {
|
72
|
-
allowCrossDay: true
|
73
|
-
},
|
74
|
-
onChange: handleDateChange
|
75
|
-
}, null, 8 /* PROPS */ , [
|
76
|
-
"model-value"
|
77
|
-
])
|
78
|
-
]),
|
79
|
-
_createVNode(RenderTable, {
|
80
|
-
"dataset-id": _ctx.datasetId,
|
81
|
-
search: search.value,
|
82
|
-
"api-prefix": _ctx.apiPrefix
|
83
|
-
}, null, 8 /* PROPS */ , [
|
84
|
-
"dataset-id",
|
85
|
-
"search",
|
86
|
-
"api-prefix"
|
87
|
-
])
|
88
|
-
])
|
89
|
-
]),
|
90
|
-
_: 1 /* STABLE */
|
91
|
-
}, 8 /* PROPS */ , [
|
92
|
-
"is-show"
|
93
|
-
]);
|
94
|
-
};
|
95
|
-
}
|
96
|
-
});
|