@blueking/ai-ui-sdk 0.5.1-beta.2 → 0.5.1-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/components/render-agent/agent-type.vue.css +4 -4
- package/dist/components/render-agent/agent-type.vue.js +1 -1
- package/dist/components/render-auth/auth-dialog.script.vue.js.js +4 -4
- package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
- package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
- package/dist/components/render-auto-refresh/index.vue.css +8 -8
- package/dist/components/render-auto-refresh/index.vue.js +1 -1
- package/dist/components/render-card/agent/prefix-info-tool.vue.css +5 -5
- package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
- package/dist/components/render-card/agent/upgrade.vue.css +2 -2
- package/dist/components/render-card/agent/upgrade.vue.js +1 -1
- package/dist/components/render-card/base.vue.css +12 -12
- package/dist/components/render-card/base.vue.js +1 -1
- package/dist/components/render-card/llm/corner-badge.vue.css +3 -3
- package/dist/components/render-card/llm/corner-badge.vue.js +1 -1
- package/dist/components/render-card/llm/icons.vue.css +2 -2
- package/dist/components/render-card/llm/icons.vue.js +1 -1
- package/dist/components/render-card/llm/info.vue.css +1 -1
- package/dist/components/render-card/llm/info.vue.js +1 -1
- package/dist/components/render-card/llm/tag-prefix.vue.css +2 -2
- package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
- package/dist/components/render-card/mcp/name-suffix.vue.css +2 -2
- package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
- package/dist/components/render-card/prompt/icons.vue.css +1 -1
- package/dist/components/render-card/prompt/icons.vue.js +1 -1
- package/dist/components/render-card/skill/scanner.vue.css +3 -3
- package/dist/components/render-card/skill/scanner.vue.js +1 -1
- package/dist/components/render-checkbox/index.vue.css +9 -9
- package/dist/components/render-checkbox/index.vue.js +1 -1
- package/dist/components/render-choose-tag/index.vue.css +7 -7
- package/dist/components/render-choose-tag/index.vue.js +1 -1
- package/dist/components/render-collapse/index.vue.css +2 -2
- package/dist/components/render-collapse/index.vue.js +1 -1
- package/dist/components/render-collection/content/index.vue.css +4 -4
- package/dist/components/render-collection/content/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.script.vue.js +6 -6
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +3 -3
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
- package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.script.vue.js +11 -15
- package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset/dataset-form.script.vue.js +16 -16
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.script.vue.js.js +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +24 -29
- package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
- package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
- package/dist/components/render-dataset-list/components/main.vue.css +3 -3
- package/dist/components/render-dataset-list/components/main.vue.js +1 -1
- package/dist/components/render-dataset-list/components/table.script.vue.js +24 -26
- package/dist/components/render-dataset-list/index.vue.css +2 -2
- package/dist/components/render-dataset-list/index.vue.js +1 -1
- package/dist/components/render-dialog/choose-resource.vue.css +3 -3
- package/dist/components/render-dialog/choose-resource.vue.js +1 -1
- package/dist/components/render-dialog/choose-result.vue.css +14 -14
- package/dist/components/render-dialog/choose-result.vue.js +1 -1
- package/dist/components/render-dialog/choose-space.vue.css +9 -9
- package/dist/components/render-dialog/choose-space.vue.js +1 -1
- package/dist/components/render-dialog/index.vue.css +6 -6
- package/dist/components/render-dialog/index.vue.js +1 -1
- package/dist/components/render-dropdown/index.vue.d.ts +1 -1
- package/dist/components/render-file-card/index.vue.css +11 -11
- package/dist/components/render-file-card/index.vue.js +1 -1
- package/dist/components/render-file-type-icon/index.vue.css +6 -6
- package/dist/components/render-file-type-icon/index.vue.js +1 -1
- package/dist/components/render-generate-tag/index.vue.css +5 -5
- package/dist/components/render-generate-tag/index.vue.js +1 -1
- package/dist/components/render-knowledge/icon/index.vue.css +1 -1
- package/dist/components/render-knowledge/icon/index.vue.js +1 -1
- package/dist/components/render-prompt/content/index.vue.css +1 -1
- package/dist/components/render-prompt/content/index.vue.js +1 -1
- package/dist/components/render-reference/index.script.vue.js +33 -33
- package/dist/components/render-reference/index.vue.css +2 -2
- package/dist/components/render-reference/index.vue.js +1 -1
- package/dist/components/render-resource-version/index.vue.css +2 -2
- package/dist/components/render-resource-version/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-select-plus-extension/index.vue.css +3 -3
- package/dist/components/render-select-plus-extension/index.vue.js +1 -1
- package/dist/components/render-t-table/index.script.vue.js.js +437 -0
- package/dist/components/render-t-table/index.vue.css +154 -190
- package/dist/components/render-t-table/index.vue.d.ts +23 -42
- package/dist/components/render-t-table/index.vue.js +2 -2
- package/dist/components/render-tag-tree/index.vue.css +7 -7
- package/dist/components/render-tag-tree/index.vue.js +1 -1
- package/dist/components/render-tags/index.vue.css +6 -6
- package/dist/components/render-tags/index.vue.js +1 -1
- package/dist/css/g-utilities.css +6 -33
- package/dist/css/g-utilities.manifest.json +2 -3
- package/dist/hooks/use-dataset-http.d.ts +21 -12
- package/dist/hooks/use-dataset-http.ts.js +13 -10
- package/dist/hooks/use-t-table.d.ts +11 -31
- package/dist/hooks/use-t-table.ts.js +27 -53
- package/dist/http/helper/mcp.ts.js +3 -1
- package/dist/types/common.d.ts +11 -23
- package/dist/types/common.ts.js +1 -1
- package/dist/types/enum.d.ts +13 -5
- package/dist/types/enum.ts.js +16 -6
- package/dist/types/mcp.d.ts +1 -0
- package/package.json +2 -2
- package/dist/components/render-t-table/index.script.vue.js +0 -365
|
@@ -5,10 +5,13 @@ export declare const useDatasetHttp: (apiPrefix?: string, spaceId?: Ref<string>)
|
|
|
5
5
|
getCompanyList: () => Promise<import("@/types/dataset").ICompany[]>;
|
|
6
6
|
getDatasetMineInfo: () => Promise<IDatasetInfo>;
|
|
7
7
|
getComponentList: () => Promise<IComponent[]>;
|
|
8
|
-
getDatasetList:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
getDatasetList: {
|
|
9
|
+
(query?: IDatasetListParam): Promise<{
|
|
10
|
+
count: number;
|
|
11
|
+
results: import("@/types/dataset").IDataset[];
|
|
12
|
+
}>;
|
|
13
|
+
abort(): void;
|
|
14
|
+
};
|
|
12
15
|
getDataset: (id: number) => Promise<import("@/types/dataset").IDataset>;
|
|
13
16
|
getDatasetStatusInfo: (id: number) => Promise<IDatasetStatusInfo>;
|
|
14
17
|
createDataset: (data: IDatasetForm) => Promise<import("@/types/dataset").IDataset>;
|
|
@@ -17,10 +20,13 @@ export declare const useDatasetHttp: (apiPrefix?: string, spaceId?: Ref<string>)
|
|
|
17
20
|
exportDataset: (id: number) => void;
|
|
18
21
|
getDatasetApiGuide: (id: number) => Promise<import("@/types/dataset").IDatasetApiGuide>;
|
|
19
22
|
getDatasetDataIds: (query: IDatasetDataParam) => Promise<number[]>;
|
|
20
|
-
getDatasetDataList:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
getDatasetDataList: {
|
|
24
|
+
(query: IDatasetDataParam): Promise<{
|
|
25
|
+
count: number;
|
|
26
|
+
results: import("@/types/dataset").IDatasetData[];
|
|
27
|
+
}>;
|
|
28
|
+
abort(): void;
|
|
29
|
+
};
|
|
24
30
|
createDatasetData: (data: IDatasetDataForm) => Promise<{
|
|
25
31
|
createCount: number;
|
|
26
32
|
duplicateCount: number;
|
|
@@ -35,10 +41,13 @@ export declare const useDatasetHttp: (apiPrefix?: string, spaceId?: Ref<string>)
|
|
|
35
41
|
getUserInfo: () => Promise<import("@/types/dataset").IUserInfo>;
|
|
36
42
|
logout: () => Promise<unknown>;
|
|
37
43
|
getSchemaList: (datasetId?: number) => Promise<ISchema[]>;
|
|
38
|
-
getOperateRecordList:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
getOperateRecordList: {
|
|
45
|
+
(param: IOperatRecordParam): Promise<{
|
|
46
|
+
count: number;
|
|
47
|
+
results: import("@/types/dataset").IOperatRecord[];
|
|
48
|
+
}>;
|
|
49
|
+
abort(): void;
|
|
50
|
+
};
|
|
42
51
|
getCompanyParticipantList: (fuzzy?: string) => Promise<{
|
|
43
52
|
companyNames: string[];
|
|
44
53
|
list: import("@/types/dataset").ICompanyParticipant[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import fetch from '../http/fetch/index.ts.js';
|
|
1
|
+
import fetch, { withAbort } from '../http/fetch/index.ts.js';
|
|
2
2
|
import { transferBatchRetryReviewDatasetData2BatchRetryReviewDatasetDataApi, transferBatchReviewDatasetData2BatchReviewDatasetDataApi, transferBatchUpdateDatasetDataValidity2BatchUpdateDatasetDataValidityApi, transferCompanyApi2Company, transferCompanyParticipantApi2CompanyParticipantList, transferCreateDatasetDataResultApi2CreateDatasetDataResult, transferDatasetApi2Dataset, transferDatasetApiGuideApi2DatasetApiGuide, transferDatasetDataApi2DatasetData, transferDatasetDataFileApi2DatasetDataFile, transferDatasetDataForm2DatasetDataFormApi, transferDatasetDataParam2DatasetDataParamApi, transferDatasetForm2DatasetFormApi, transferDatasetListParam2DatasetListParamApi, transferOperatRecordApi2OperatRecord, transferOperatRecordParam2OperatRecordParamApi, transferUserInfoApi2UserInfo, transferUserInfoForm2UserInfoFormApi } from '../http/helper/dataset.ts.js';
|
|
3
3
|
import { transferTagApi2Tag } from '../http/helper/meta.ts.js';
|
|
4
4
|
const datasetPerfix = 'dataset/v1';
|
|
@@ -19,14 +19,15 @@ export const useDatasetHttp = (apiPrefix, spaceId)=>{
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
// 查询操作记录列表
|
|
22
|
-
const getOperateRecordList = (param)=>fetch.post(`${apiPrefix}/${metaPerfix}/operate_record/list/`, transferOperatRecordParam2OperatRecordParamApi(param), {
|
|
22
|
+
const getOperateRecordList = withAbort((signal, param)=>fetch.post(`${apiPrefix}/${metaPerfix}/operate_record/list/`, transferOperatRecordParam2OperatRecordParamApi(param), {
|
|
23
23
|
headers: {
|
|
24
24
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
|
+
signal
|
|
26
27
|
}).then(({ count, results })=>({
|
|
27
28
|
count,
|
|
28
29
|
results: results.map(transferOperatRecordApi2OperatRecord)
|
|
29
|
-
}));
|
|
30
|
+
})));
|
|
30
31
|
// 获取来源团队-组件和参与方列表
|
|
31
32
|
const getCompanyParticipantList = (fuzzy)=>fetch.get(`${apiPrefix}/${metaPerfix}/company/participant_list/`, {
|
|
32
33
|
fuzzy
|
|
@@ -64,14 +65,15 @@ export const useDatasetHttp = (apiPrefix, spaceId)=>{
|
|
|
64
65
|
}
|
|
65
66
|
});
|
|
66
67
|
// 获取数据集列表
|
|
67
|
-
const getDatasetList = (query)=>fetch.post(`${apiPrefix}/${datasetPerfix}/dataset/list/`, transferDatasetListParam2DatasetListParamApi(query), {
|
|
68
|
+
const getDatasetList = withAbort((signal, query)=>fetch.post(`${apiPrefix}/${datasetPerfix}/dataset/list/`, transferDatasetListParam2DatasetListParamApi(query), {
|
|
68
69
|
headers: {
|
|
69
70
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
70
|
-
}
|
|
71
|
+
},
|
|
72
|
+
signal
|
|
71
73
|
}).then(({ count, results })=>({
|
|
72
74
|
count,
|
|
73
75
|
results: results.map(transferDatasetApi2Dataset)
|
|
74
|
-
}));
|
|
76
|
+
})));
|
|
75
77
|
// 获取数据集
|
|
76
78
|
const getDataset = (id)=>fetch.get(`${apiPrefix}/${datasetPerfix}/dataset/${id}/`, undefined, {
|
|
77
79
|
headers: {
|
|
@@ -122,14 +124,15 @@ export const useDatasetHttp = (apiPrefix, spaceId)=>{
|
|
|
122
124
|
}
|
|
123
125
|
});
|
|
124
126
|
// 获取数据集数据列表
|
|
125
|
-
const getDatasetDataList = (query)=>fetch.post(`${apiPrefix}/${datasetPerfix}/dataset_item/list/`, transferDatasetDataParam2DatasetDataParamApi(query), {
|
|
127
|
+
const getDatasetDataList = withAbort((signal, query)=>fetch.post(`${apiPrefix}/${datasetPerfix}/dataset_item/list/`, transferDatasetDataParam2DatasetDataParamApi(query), {
|
|
126
128
|
headers: {
|
|
127
129
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
128
|
-
}
|
|
130
|
+
},
|
|
131
|
+
signal
|
|
129
132
|
}).then(({ count, results })=>({
|
|
130
133
|
count,
|
|
131
134
|
results: results.map(transferDatasetDataApi2DatasetData)
|
|
132
|
-
}));
|
|
135
|
+
})));
|
|
133
136
|
// 创建数据集数据
|
|
134
137
|
const createDatasetData = (data)=>fetch.post(`${apiPrefix}/${datasetPerfix}/dataset_item/`, transferDatasetDataForm2DatasetDataFormApi(data), {
|
|
135
138
|
headers: {
|
|
@@ -1,29 +1,10 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
|
-
import type { IPagination, IPaginationParam,
|
|
2
|
+
import type { IPagination, IPaginationParam, IPaginationResponse, ISortParam } from '@/types/common';
|
|
3
3
|
import { OrderMethod } from '@/types/enum';
|
|
4
|
-
|
|
5
|
-
results?: T;
|
|
6
|
-
count?: number;
|
|
7
|
-
}
|
|
8
|
-
type ITableRow<T> = T extends Array<infer E> ? E : T;
|
|
9
|
-
export declare const useTTable: <T>() => {
|
|
4
|
+
export declare const useTTable: <T, S>() => {
|
|
10
5
|
isLoading: Ref<boolean, boolean>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
descending?: OrderMethod;
|
|
14
|
-
sortKey?: string;
|
|
15
|
-
}, ITTableSort | {
|
|
16
|
-
descending?: OrderMethod;
|
|
17
|
-
sortKey?: string;
|
|
18
|
-
}>;
|
|
19
|
-
handleSortChange: (config: {
|
|
20
|
-
descending: boolean;
|
|
21
|
-
}, { col }: {
|
|
22
|
-
col: {
|
|
23
|
-
sortKey: string;
|
|
24
|
-
};
|
|
25
|
-
}) => Promise<void>;
|
|
26
|
-
triggerApi: () => Promise<void>;
|
|
6
|
+
orderBy: Ref<S, S>;
|
|
7
|
+
orderMethod: Ref<OrderMethod, OrderMethod>;
|
|
27
8
|
pagination: Ref<{
|
|
28
9
|
current: number;
|
|
29
10
|
limit: number;
|
|
@@ -33,13 +14,12 @@ export declare const useTTable: <T>() => {
|
|
|
33
14
|
limit: number;
|
|
34
15
|
count: number;
|
|
35
16
|
}>;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
17
|
+
tableData: Ref<T[], T[]>;
|
|
18
|
+
selectedDatas: Ref<T[], T[]>;
|
|
19
|
+
initHook: (callBackFn: (params: IPaginationParam & ISortParam<S>) => Promise<IPaginationResponse<T> | T[]>, isShowPagination: boolean, abortFn: () => void) => void;
|
|
20
|
+
handleSortChange: (orderByValue?: S, orderMethodValue?: OrderMethod) => void;
|
|
21
|
+
triggerApi: () => Promise<void>;
|
|
22
|
+
handleResetPagination: () => Promise<void>;
|
|
23
|
+
handlePageChange: (current: number, pageSize: number) => void;
|
|
43
24
|
handleClearSelection: () => void;
|
|
44
25
|
};
|
|
45
|
-
export {};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
|
-
import { OrderMethod } from '../types/enum.ts.js';
|
|
3
2
|
export const useTTable = ()=>{
|
|
4
|
-
const
|
|
5
|
-
const selectedIds = ref([]);
|
|
3
|
+
const selectedDatas = ref([]);
|
|
6
4
|
const isLoading = ref(false);
|
|
7
|
-
const
|
|
8
|
-
const
|
|
5
|
+
const orderBy = ref();
|
|
6
|
+
const orderMethod = ref();
|
|
9
7
|
const tableData = ref([]);
|
|
10
8
|
const pagination = ref({
|
|
11
9
|
current: 1,
|
|
12
10
|
limit: 20,
|
|
13
11
|
count: 0
|
|
14
12
|
});
|
|
13
|
+
// 待初始化数据
|
|
15
14
|
let callBack;
|
|
16
|
-
let
|
|
17
|
-
|
|
15
|
+
let isPagination = false;
|
|
16
|
+
let abort;
|
|
18
17
|
// 更新数据
|
|
19
18
|
const triggerApi = ()=>{
|
|
20
19
|
isLoading.value = true;
|
|
20
|
+
abort();
|
|
21
21
|
return callBack({
|
|
22
22
|
page: pagination.value.current,
|
|
23
23
|
pageSize: pagination.value.limit,
|
|
24
|
-
orderBy:
|
|
25
|
-
orderMethod:
|
|
24
|
+
orderBy: orderBy.value,
|
|
25
|
+
orderMethod: orderMethod.value
|
|
26
26
|
}).then((apiResult)=>{
|
|
27
|
-
if (isPagination
|
|
27
|
+
if (isPagination) {
|
|
28
28
|
tableData.value = apiResult.results;
|
|
29
29
|
pagination.value.count = apiResult.count;
|
|
30
30
|
} else {
|
|
@@ -34,71 +34,45 @@ export const useTTable = ()=>{
|
|
|
34
34
|
isLoading.value = false;
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
const initHook = (callBackFn, isShowPagination,
|
|
37
|
+
const initHook = (callBackFn, isShowPagination, abortFn)=>{
|
|
38
38
|
callBack = callBackFn;
|
|
39
|
-
isPagination
|
|
40
|
-
|
|
39
|
+
isPagination = isShowPagination;
|
|
40
|
+
abort = abortFn;
|
|
41
41
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
sort.value = {};
|
|
46
|
-
return triggerApi();
|
|
47
|
-
}
|
|
48
|
-
const { descending } = config;
|
|
49
|
-
sort.value = {
|
|
50
|
-
sortKey: col.sortKey,
|
|
51
|
-
descending: descending ? OrderMethod.Desc : OrderMethod.Asc
|
|
52
|
-
};
|
|
42
|
+
const handleSortChange = (orderByValue, orderMethodValue)=>{
|
|
43
|
+
orderBy.value = orderByValue;
|
|
44
|
+
orderMethod.value = orderMethodValue;
|
|
53
45
|
triggerApi();
|
|
54
46
|
};
|
|
55
|
-
//
|
|
56
|
-
const handlePageChange = (current)=>{
|
|
57
|
-
if (pagination.value.current === current) return;
|
|
47
|
+
// 分页器变化处理
|
|
48
|
+
const handlePageChange = (current, pageSize)=>{
|
|
58
49
|
pagination.value.current = current;
|
|
59
|
-
triggerApi();
|
|
60
|
-
};
|
|
61
|
-
// 分页器 页码大小变化处理
|
|
62
|
-
const handlePageSizeChange = (pageSize)=>{
|
|
63
|
-
if (pagination.value.limit === pageSize) return;
|
|
64
50
|
pagination.value.limit = pageSize;
|
|
65
|
-
pagination.value.current = 1;
|
|
66
51
|
triggerApi();
|
|
67
52
|
};
|
|
68
|
-
const
|
|
53
|
+
const handleResetPagination = ()=>{
|
|
69
54
|
pagination.value = {
|
|
70
55
|
current: 1,
|
|
71
56
|
limit: 20,
|
|
72
57
|
count: 0
|
|
73
58
|
};
|
|
74
|
-
|
|
75
|
-
const handleSelectionChange = (_keys, selectedRowData)=>{
|
|
76
|
-
const currentPageIds = tableData.value.map(getRowKey);
|
|
77
|
-
const otherPageRows = selectedRows.value.filter((row)=>!currentPageIds.includes(getRowKey(row)));
|
|
78
|
-
selectedRows.value = [
|
|
79
|
-
...otherPageRows,
|
|
80
|
-
...selectedRowData
|
|
81
|
-
];
|
|
82
|
-
selectedIds.value = selectedRows.value.map(getRowKey);
|
|
59
|
+
return triggerApi();
|
|
83
60
|
};
|
|
84
61
|
const handleClearSelection = ()=>{
|
|
85
|
-
|
|
86
|
-
selectedIds.value = [];
|
|
62
|
+
selectedDatas.value = [];
|
|
87
63
|
};
|
|
88
64
|
return {
|
|
89
65
|
isLoading,
|
|
66
|
+
orderBy,
|
|
67
|
+
orderMethod,
|
|
68
|
+
pagination,
|
|
69
|
+
tableData,
|
|
70
|
+
selectedDatas,
|
|
90
71
|
initHook,
|
|
91
|
-
sort,
|
|
92
72
|
handleSortChange,
|
|
93
73
|
triggerApi,
|
|
94
|
-
|
|
95
|
-
resetPagination,
|
|
96
|
-
tableData,
|
|
74
|
+
handleResetPagination,
|
|
97
75
|
handlePageChange,
|
|
98
|
-
handlePageSizeChange,
|
|
99
|
-
selectedRows,
|
|
100
|
-
selectedIds,
|
|
101
|
-
handleSelectionChange,
|
|
102
76
|
handleClearSelection
|
|
103
77
|
};
|
|
104
78
|
};
|
|
@@ -51,6 +51,7 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
53
|
import { transferBaseCountParam2BaseCountParamApi, transferIApprovalSettingValue2IApprovalSettingValueApi, transferIApprovalSettingValueApi2IApprovalSettingValue, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommon2ResourceCommonApi, transferResourceCommonApi2ResourceCommon, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi, transferResourceFormCommon2ResourceFormCommonApi, transferResourceFormCommonApi2ResourceFormCommon } from './common.ts.js';
|
|
54
|
+
import { uuid } from '../../common/util.ts.js';
|
|
54
55
|
/**
|
|
55
56
|
* ui转换为接口使用
|
|
56
57
|
* @param data IMcpListParam
|
|
@@ -175,7 +176,8 @@ import { transferBaseCountParam2BaseCountParamApi, transferIApprovalSettingValue
|
|
|
175
176
|
detailUrl: data.detail_url,
|
|
176
177
|
refCount: data.ref_count,
|
|
177
178
|
favorite: data.favorite,
|
|
178
|
-
favoriteCount: data.favorite_count
|
|
179
|
+
favoriteCount: data.favorite_count,
|
|
180
|
+
uuid: uuid(8)
|
|
179
181
|
});
|
|
180
182
|
};
|
|
181
183
|
/**
|
package/dist/types/common.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import type { PrimaryTableCol
|
|
2
|
-
import { EnumCharacter, GroupType, OrderMethod, ResourceStatus, SessionPromptRole,
|
|
1
|
+
import type { PrimaryTableCol } from 'tdesign-vue-next';
|
|
2
|
+
import { EnumCharacter, GroupType, OrderMethod, ResourceStatus, SessionPromptRole, TTableColumnAlign, TTableColumnFixed, TTableColumnType } from './enum';
|
|
3
3
|
import type { IResourcePermission, IResourcePermissionApi } from './permission';
|
|
4
|
+
export { TableSort as ITTableSort, SortInfo as ITTableSortInfo, } from 'tdesign-vue-next';
|
|
5
|
+
export type ITTableColumn<T> = Omit<PrimaryTableCol<T>, 'type' | 'fixed' | 'align'> & {
|
|
6
|
+
sortKey?: string;
|
|
7
|
+
defaultHide?: boolean;
|
|
8
|
+
isOperate?: boolean;
|
|
9
|
+
type?: TTableColumnType;
|
|
10
|
+
fixed?: TTableColumnFixed;
|
|
11
|
+
align?: TTableColumnAlign;
|
|
12
|
+
};
|
|
4
13
|
export interface ITab {
|
|
5
14
|
id?: string | number;
|
|
6
15
|
name: string;
|
|
@@ -12,27 +21,6 @@ export interface IPagination {
|
|
|
12
21
|
limit: number;
|
|
13
22
|
count: number;
|
|
14
23
|
}
|
|
15
|
-
export interface ITTableSort {
|
|
16
|
-
descending?: OrderMethod;
|
|
17
|
-
sortKey?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface ITTableColEllipsis {
|
|
20
|
-
theme?: string;
|
|
21
|
-
placement?: string;
|
|
22
|
-
className?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface ITTableColFilter extends Omit<TableColumnFilter, 'type'> {
|
|
25
|
-
type?: TTableFilterType;
|
|
26
|
-
}
|
|
27
|
-
export interface ITTableCol<T> extends Omit<PrimaryTableCol<T>, 'type' | 'align' | 'fixed' | 'sortKey' | 'ellipsis' | 'filter'> {
|
|
28
|
-
defaultShow?: boolean;
|
|
29
|
-
sortKey?: string;
|
|
30
|
-
type?: string;
|
|
31
|
-
fixed?: string;
|
|
32
|
-
align?: string;
|
|
33
|
-
ellipsis?: boolean | ITTableColEllipsis;
|
|
34
|
-
filter?: ITTableColFilter;
|
|
35
|
-
}
|
|
36
24
|
export interface IPaginationParam {
|
|
37
25
|
page?: number;
|
|
38
26
|
pageSize?: number;
|
package/dist/types/common.ts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { };
|
|
1
|
+
export { TableSort as ITTableSort, SortInfo as ITTableSortInfo } from 'tdesign-vue-next';
|
package/dist/types/enum.d.ts
CHANGED
|
@@ -291,11 +291,6 @@ export declare enum AgentCommandType {
|
|
|
291
291
|
Number = "number",
|
|
292
292
|
Select = "select"
|
|
293
293
|
}
|
|
294
|
-
export declare enum TTableFilterType {
|
|
295
|
-
Input = "input",
|
|
296
|
-
Single = "single",
|
|
297
|
-
Multiple = "multiple"
|
|
298
|
-
}
|
|
299
294
|
export declare enum ModelSpaceAuthMode {
|
|
300
295
|
Public = "PUBLIC",
|
|
301
296
|
Authorized = "AUTHORIZED",
|
|
@@ -381,3 +376,16 @@ export declare enum SdkNavigateActionType {
|
|
|
381
376
|
Prompt = "prompt",
|
|
382
377
|
Collection = "collection"
|
|
383
378
|
}
|
|
379
|
+
export declare enum TTableColumnFixed {
|
|
380
|
+
Left = "left",
|
|
381
|
+
Right = "right"
|
|
382
|
+
}
|
|
383
|
+
export declare enum TTableColumnAlign {
|
|
384
|
+
Left = "left",
|
|
385
|
+
Center = "center",
|
|
386
|
+
Right = "right"
|
|
387
|
+
}
|
|
388
|
+
export declare enum TTableColumnType {
|
|
389
|
+
Single = "single",
|
|
390
|
+
Multiple = "multiple"
|
|
391
|
+
}
|
package/dist/types/enum.ts.js
CHANGED
|
@@ -326,12 +326,6 @@ export var AgentCommandType;
|
|
|
326
326
|
AgentCommandType["Number"] = "number";
|
|
327
327
|
AgentCommandType["Select"] = "select";
|
|
328
328
|
})(AgentCommandType || (AgentCommandType = {}));
|
|
329
|
-
export var TTableFilterType;
|
|
330
|
-
(function(TTableFilterType) {
|
|
331
|
-
TTableFilterType["Input"] = "input";
|
|
332
|
-
TTableFilterType["Single"] = "single";
|
|
333
|
-
TTableFilterType["Multiple"] = "multiple";
|
|
334
|
-
})(TTableFilterType || (TTableFilterType = {}));
|
|
335
329
|
export var ModelSpaceAuthMode;
|
|
336
330
|
(function(ModelSpaceAuthMode) {
|
|
337
331
|
ModelSpaceAuthMode["Public"] = "PUBLIC";
|
|
@@ -430,3 +424,19 @@ export var SdkNavigateActionType;
|
|
|
430
424
|
SdkNavigateActionType["Prompt"] = "prompt";
|
|
431
425
|
SdkNavigateActionType["Collection"] = "collection";
|
|
432
426
|
})(SdkNavigateActionType || (SdkNavigateActionType = {}));
|
|
427
|
+
export var TTableColumnFixed;
|
|
428
|
+
(function(TTableColumnFixed) {
|
|
429
|
+
TTableColumnFixed["Left"] = "left";
|
|
430
|
+
TTableColumnFixed["Right"] = "right";
|
|
431
|
+
})(TTableColumnFixed || (TTableColumnFixed = {}));
|
|
432
|
+
export var TTableColumnAlign;
|
|
433
|
+
(function(TTableColumnAlign) {
|
|
434
|
+
TTableColumnAlign["Left"] = "left";
|
|
435
|
+
TTableColumnAlign["Center"] = "center";
|
|
436
|
+
TTableColumnAlign["Right"] = "right";
|
|
437
|
+
})(TTableColumnAlign || (TTableColumnAlign = {}));
|
|
438
|
+
export var TTableColumnType;
|
|
439
|
+
(function(TTableColumnType) {
|
|
440
|
+
TTableColumnType["Single"] = "single";
|
|
441
|
+
TTableColumnType["Multiple"] = "multiple";
|
|
442
|
+
})(TTableColumnType || (TTableColumnType = {}));
|
package/dist/types/mcp.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueking/ai-ui-sdk",
|
|
3
|
-
"version": "0.5.1-beta.
|
|
3
|
+
"version": "0.5.1-beta.4",
|
|
4
4
|
"description": "蓝鲸AI UI SDK",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/main.d.ts",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"vue-router": "^4.2.4"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@blueking/aidev-g-utilities": "0.1.0-beta.
|
|
102
|
+
"@blueking/aidev-g-utilities": "0.1.0-beta.27",
|
|
103
103
|
"@blueking/babel-preset-bk": "2.1.3",
|
|
104
104
|
"@blueking/cli-service": "0.2.2-beta.1",
|
|
105
105
|
"@blueking/eslint-config-bk": "2.1.0",
|