From 8701303012aca89eaf426b752c9041c669d55d38 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Sat, 9 Sep 2023 19:24:09 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=B1:=20[client]=20sync=20upgrade=20wit?= =?UTF-8?q?h=203=20commits=20[trident-sync]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit perf: dict.getNodesByValues 修改为单例模式也可以运行,无需配置prototype,优化性能 chore: 各ui支持table-select --- packages/ui/certd-client/src/mock/base.ts | 32 ++++-- .../src/router/source/modules/crud.ts | 6 ++ .../src/views/crud/advanced/big-data/api.ts | 2 +- .../views/crud/advanced/from-backend/api.ts | 2 +- .../views/crud/advanced/in-dialog/crud/api.ts | 2 +- .../src/views/crud/advanced/linkage/api.ts | 2 +- .../crud/advanced/local-pagination/api.ts | 2 +- .../src/views/crud/advanced/nest/api.ts | 2 +- .../crud/advanced/nest/aside-table/api.ts | 2 +- .../views/crud/advanced/nest/sub-table/api.ts | 2 +- .../crud/basis/column-merge-plugin/api.ts | 2 +- .../src/views/crud/basis/columns-set/api.ts | 2 +- .../src/views/crud/basis/compute-more/api.ts | 2 +- .../src/views/crud/basis/compute/api.ts | 2 +- .../src/views/crud/basis/custom/api.ts | 2 +- .../src/views/crud/basis/first/api.ts | 2 +- .../src/views/crud/basis/i18n/api.ts | 2 +- .../src/views/crud/basis/layout-card/api.ts | 2 +- .../src/views/crud/basis/layout-custom/api.ts | 2 +- .../src/views/crud/basis/reset/api.ts | 2 +- .../src/views/crud/basis/value-change/api.ts | 2 +- .../src/views/crud/component/button/api.ts | 2 +- .../src/views/crud/component/cascader/api.ts | 2 +- .../src/views/crud/component/checkbox/api.ts | 2 +- .../src/views/crud/component/date/api.ts | 2 +- .../src/views/crud/component/editor/api.ts | 2 +- .../src/views/crud/component/icon/api.ts | 2 +- .../src/views/crud/component/json/api.ts | 2 +- .../src/views/crud/component/number/api.ts | 2 +- .../src/views/crud/component/radio/api.ts | 2 +- .../src/views/crud/component/select/api.ts | 2 +- .../src/views/crud/component/switch/api.ts | 2 +- .../views/crud/component/table-select/api.ts | 42 ++++++++ .../crud/component/table-select/crud.tsx | 99 +++++++++++++++++++ .../crud/component/table-select/index.vue | 30 ++++++ .../views/crud/component/table-select/mock.ts | 21 ++++ .../src/views/crud/component/text/api.ts | 9 +- .../src/views/crud/component/tree/api.ts | 2 +- .../crud/component/uploader/alioss/api.ts | 2 +- .../views/crud/component/uploader/cos/api.ts | 2 +- .../crud/component/uploader/cropper/api.ts | 2 +- .../views/crud/component/uploader/form/api.ts | 2 +- .../crud/component/uploader/qiniu/api.ts | 2 +- .../views/crud/component/uploader/s3/api.ts | 2 +- .../certd-client/src/views/crud/debug/api.ts | 2 +- .../src/views/crud/dict/cloneable/api.ts | 2 +- .../src/views/crud/dict/prototype/api.ts | 2 +- .../src/views/crud/dict/shared/manager/api.ts | 2 +- .../src/views/crud/dict/shared/use/api.ts | 2 +- .../src/views/crud/dict/single/api.ts | 2 +- .../views/crud/feature/column-resize/api.ts | 2 +- .../src/views/crud/feature/column-sort/api.ts | 2 +- .../src/views/crud/feature/columns-set/api.ts | 2 +- .../views/crud/feature/editable-row/api.ts | 2 +- .../src/views/crud/feature/editable/api.ts | 2 +- .../src/views/crud/feature/expand/api.ts | 2 +- .../src/views/crud/feature/export/api.ts | 2 +- .../src/views/crud/feature/filter/api.ts | 2 +- .../src/views/crud/feature/fixed/api.ts | 2 +- .../views/crud/feature/header-group/api.ts | 2 +- .../src/views/crud/feature/header/api.ts | 2 +- .../src/views/crud/feature/height/api.ts | 2 +- .../src/views/crud/feature/hide/api.ts | 2 +- .../src/views/crud/feature/index/api.ts | 2 +- .../src/views/crud/feature/merge/api.ts | 2 +- .../src/views/crud/feature/remove/api.ts | 2 +- .../views/crud/feature/search-multi/api.ts | 2 +- .../src/views/crud/feature/search/api.ts | 2 +- .../views/crud/feature/selection-radio/api.ts | 2 +- .../src/views/crud/feature/selection/api.ts | 2 +- .../src/views/crud/feature/sortable/api.ts | 2 +- .../src/views/crud/feature/tabs/api.ts | 2 +- .../src/views/crud/feature/tree/api.ts | 2 +- .../views/crud/feature/value-builder/api.ts | 2 +- .../src/views/crud/form/base/api.ts | 2 +- .../src/views/crud/form/custom-form/api.ts | 2 +- .../src/views/crud/form/drawer/api.ts | 2 +- .../src/views/crud/form/group-tabs/api.ts | 2 +- .../src/views/crud/form/group/api.ts | 2 +- .../src/views/crud/form/helper/api.ts | 2 +- .../src/views/crud/form/inner/api.ts | 2 +- .../src/views/crud/form/inner/area/api.ts | 2 +- .../src/views/crud/form/layout-flex/api.ts | 2 +- .../src/views/crud/form/layout-grid/api.ts | 2 +- .../src/views/crud/form/layout/api.ts | 2 +- .../src/views/crud/form/nest/api.ts | 2 +- .../src/views/crud/form/render/api.ts | 2 +- .../src/views/crud/form/reset/api.ts | 2 +- .../src/views/crud/form/single-column/api.ts | 2 +- .../src/views/crud/form/validation/api.ts | 2 +- .../src/views/crud/form/view/api.ts | 2 +- .../src/views/crud/row-handle/dropdown/api.ts | 2 +- .../src/views/crud/row-handle/tooltip/api.ts | 2 +- .../src/views/crud/slots/cell/api.ts | 2 +- .../src/views/crud/slots/form-item/api.ts | 2 +- .../src/views/crud/slots/form/api.ts | 2 +- .../src/views/crud/slots/layout/api.ts | 2 +- .../src/views/crud/slots/search/api.ts | 2 +- 98 files changed, 322 insertions(+), 99 deletions(-) create mode 100644 packages/ui/certd-client/src/views/crud/component/table-select/api.ts create mode 100644 packages/ui/certd-client/src/views/crud/component/table-select/crud.tsx create mode 100644 packages/ui/certd-client/src/views/crud/component/table-select/index.vue create mode 100644 packages/ui/certd-client/src/views/crud/component/table-select/mock.ts diff --git a/packages/ui/certd-client/src/mock/base.ts b/packages/ui/certd-client/src/mock/base.ts index f5df80c9..c5084a6a 100644 --- a/packages/ui/certd-client/src/mock/base.ts +++ b/packages/ui/certd-client/src/mock/base.ts @@ -39,6 +39,17 @@ function findById(id: any, list: any) { } } } +function findByIds(ids: any[], list: any) { + const res = []; + for (const id of ids) { + const item = findById(id, list); + if (item != null) { + res.push(item); + } + } + console.log("findbyids", res, ids); + return res; +} const mockUtil: any = { findById, buildMock(options: any) { @@ -173,13 +184,7 @@ const mockUtil: any = { handle(req: any) { let id = req.params.id; id = parseInt(id); - let current = null; - for (const item of list) { - if (item.id === id) { - current = item; - break; - } - } + const current = findById(req.body.id, list); return { code: 0, msg: "success", @@ -187,6 +192,19 @@ const mockUtil: any = { }; } }, + { + path: "/mock/" + name + "/byIds", + method: "post", + handle(req: any) { + const ids = req.body.ids; + const res = findByIds(ids, list); + return { + code: 0, + msg: "success", + data: res + }; + } + }, { path: "/mock/" + name + "/add", method: "post", diff --git a/packages/ui/certd-client/src/router/source/modules/crud.ts b/packages/ui/certd-client/src/router/source/modules/crud.ts index 98fa69a4..b6291772 100644 --- a/packages/ui/certd-client/src/router/source/modules/crud.ts +++ b/packages/ui/certd-client/src/router/source/modules/crud.ts @@ -192,6 +192,12 @@ export const crudResources = [ path: "/crud/component/select", component: "/crud/component/select/index.vue" }, + { + title: "表格选择(table-select)", + name: "ComponentTableSelect", + path: "/crud/component/table-select", + component: "/crud/component/table-select/index.vue" + }, { title: "级联(cascader)", name: "ComponentCascader", diff --git a/packages/ui/certd-client/src/views/crud/advanced/big-data/api.ts b/packages/ui/certd-client/src/views/crud/advanced/big-data/api.ts index 77ad4f4e..5895fc6b 100644 --- a/packages/ui/certd-client/src/views/crud/advanced/big-data/api.ts +++ b/packages/ui/certd-client/src/views/crud/advanced/big-data/api.ts @@ -36,7 +36,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/advanced/from-backend/api.ts b/packages/ui/certd-client/src/views/crud/advanced/from-backend/api.ts index 924b5a7d..b2b5d786 100644 --- a/packages/ui/certd-client/src/views/crud/advanced/from-backend/api.ts +++ b/packages/ui/certd-client/src/views/crud/advanced/from-backend/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/advanced/in-dialog/crud/api.ts b/packages/ui/certd-client/src/views/crud/advanced/in-dialog/crud/api.ts index 4fb54bad..8b6b001c 100644 --- a/packages/ui/certd-client/src/views/crud/advanced/in-dialog/crud/api.ts +++ b/packages/ui/certd-client/src/views/crud/advanced/in-dialog/crud/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/advanced/linkage/api.ts b/packages/ui/certd-client/src/views/crud/advanced/linkage/api.ts index b8259923..198d7d49 100644 --- a/packages/ui/certd-client/src/views/crud/advanced/linkage/api.ts +++ b/packages/ui/certd-client/src/views/crud/advanced/linkage/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/advanced/local-pagination/api.ts b/packages/ui/certd-client/src/views/crud/advanced/local-pagination/api.ts index c8f38736..382cc6a6 100644 --- a/packages/ui/certd-client/src/views/crud/advanced/local-pagination/api.ts +++ b/packages/ui/certd-client/src/views/crud/advanced/local-pagination/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/advanced/nest/api.ts b/packages/ui/certd-client/src/views/crud/advanced/nest/api.ts index 84aaae30..c553e3dc 100644 --- a/packages/ui/certd-client/src/views/crud/advanced/nest/api.ts +++ b/packages/ui/certd-client/src/views/crud/advanced/nest/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/advanced/nest/aside-table/api.ts b/packages/ui/certd-client/src/views/crud/advanced/nest/aside-table/api.ts index 1f759d5d..4b065e53 100644 --- a/packages/ui/certd-client/src/views/crud/advanced/nest/aside-table/api.ts +++ b/packages/ui/certd-client/src/views/crud/advanced/nest/aside-table/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/advanced/nest/sub-table/api.ts b/packages/ui/certd-client/src/views/crud/advanced/nest/sub-table/api.ts index 681972eb..d8f5d178 100644 --- a/packages/ui/certd-client/src/views/crud/advanced/nest/sub-table/api.ts +++ b/packages/ui/certd-client/src/views/crud/advanced/nest/sub-table/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/basis/column-merge-plugin/api.ts b/packages/ui/certd-client/src/views/crud/basis/column-merge-plugin/api.ts index 3dae301b..704320a3 100644 --- a/packages/ui/certd-client/src/views/crud/basis/column-merge-plugin/api.ts +++ b/packages/ui/certd-client/src/views/crud/basis/column-merge-plugin/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/basis/columns-set/api.ts b/packages/ui/certd-client/src/views/crud/basis/columns-set/api.ts index ea92a29c..01afe62a 100644 --- a/packages/ui/certd-client/src/views/crud/basis/columns-set/api.ts +++ b/packages/ui/certd-client/src/views/crud/basis/columns-set/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/basis/compute-more/api.ts b/packages/ui/certd-client/src/views/crud/basis/compute-more/api.ts index 2e82fd32..88e88dd5 100644 --- a/packages/ui/certd-client/src/views/crud/basis/compute-more/api.ts +++ b/packages/ui/certd-client/src/views/crud/basis/compute-more/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/basis/compute/api.ts b/packages/ui/certd-client/src/views/crud/basis/compute/api.ts index 0404b55d..a68548e3 100644 --- a/packages/ui/certd-client/src/views/crud/basis/compute/api.ts +++ b/packages/ui/certd-client/src/views/crud/basis/compute/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/basis/custom/api.ts b/packages/ui/certd-client/src/views/crud/basis/custom/api.ts index dcb36ac8..1ccc733a 100644 --- a/packages/ui/certd-client/src/views/crud/basis/custom/api.ts +++ b/packages/ui/certd-client/src/views/crud/basis/custom/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/basis/first/api.ts b/packages/ui/certd-client/src/views/crud/basis/first/api.ts index 8053df3a..227af989 100644 --- a/packages/ui/certd-client/src/views/crud/basis/first/api.ts +++ b/packages/ui/certd-client/src/views/crud/basis/first/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/basis/i18n/api.ts b/packages/ui/certd-client/src/views/crud/basis/i18n/api.ts index 1a99bda1..4e4d75cf 100644 --- a/packages/ui/certd-client/src/views/crud/basis/i18n/api.ts +++ b/packages/ui/certd-client/src/views/crud/basis/i18n/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/basis/layout-card/api.ts b/packages/ui/certd-client/src/views/crud/basis/layout-card/api.ts index 8cbb7197..23cf53e8 100644 --- a/packages/ui/certd-client/src/views/crud/basis/layout-card/api.ts +++ b/packages/ui/certd-client/src/views/crud/basis/layout-card/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/basis/layout-custom/api.ts b/packages/ui/certd-client/src/views/crud/basis/layout-custom/api.ts index cf3bd2b7..3c390674 100644 --- a/packages/ui/certd-client/src/views/crud/basis/layout-custom/api.ts +++ b/packages/ui/certd-client/src/views/crud/basis/layout-custom/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/basis/reset/api.ts b/packages/ui/certd-client/src/views/crud/basis/reset/api.ts index 964ef0ab..f93c5e96 100644 --- a/packages/ui/certd-client/src/views/crud/basis/reset/api.ts +++ b/packages/ui/certd-client/src/views/crud/basis/reset/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/basis/value-change/api.ts b/packages/ui/certd-client/src/views/crud/basis/value-change/api.ts index f6e2f105..620c51e5 100644 --- a/packages/ui/certd-client/src/views/crud/basis/value-change/api.ts +++ b/packages/ui/certd-client/src/views/crud/basis/value-change/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/button/api.ts b/packages/ui/certd-client/src/views/crud/component/button/api.ts index f158045b..ade0ebe4 100644 --- a/packages/ui/certd-client/src/views/crud/component/button/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/button/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/cascader/api.ts b/packages/ui/certd-client/src/views/crud/component/cascader/api.ts index 65972947..777c83f3 100644 --- a/packages/ui/certd-client/src/views/crud/component/cascader/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/cascader/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/checkbox/api.ts b/packages/ui/certd-client/src/views/crud/component/checkbox/api.ts index 7820fd68..026486f7 100644 --- a/packages/ui/certd-client/src/views/crud/component/checkbox/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/checkbox/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/date/api.ts b/packages/ui/certd-client/src/views/crud/component/date/api.ts index 8f15ff62..46e9f44c 100644 --- a/packages/ui/certd-client/src/views/crud/component/date/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/date/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/editor/api.ts b/packages/ui/certd-client/src/views/crud/component/editor/api.ts index 815ca0de..c49c7a83 100644 --- a/packages/ui/certd-client/src/views/crud/component/editor/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/editor/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/icon/api.ts b/packages/ui/certd-client/src/views/crud/component/icon/api.ts index f9886a5c..f29e47ad 100644 --- a/packages/ui/certd-client/src/views/crud/component/icon/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/icon/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/json/api.ts b/packages/ui/certd-client/src/views/crud/component/json/api.ts index 3e93d5ee..ff19433e 100644 --- a/packages/ui/certd-client/src/views/crud/component/json/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/json/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/number/api.ts b/packages/ui/certd-client/src/views/crud/component/number/api.ts index d7244f5b..7fe4bc4e 100644 --- a/packages/ui/certd-client/src/views/crud/component/number/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/number/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/radio/api.ts b/packages/ui/certd-client/src/views/crud/component/radio/api.ts index eb066efc..707ff60b 100644 --- a/packages/ui/certd-client/src/views/crud/component/radio/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/radio/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/select/api.ts b/packages/ui/certd-client/src/views/crud/component/select/api.ts index 9001a443..71f20c92 100644 --- a/packages/ui/certd-client/src/views/crud/component/select/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/select/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/switch/api.ts b/packages/ui/certd-client/src/views/crud/component/switch/api.ts index 87ad0c8f..ba122962 100644 --- a/packages/ui/certd-client/src/views/crud/component/switch/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/switch/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/table-select/api.ts b/packages/ui/certd-client/src/views/crud/component/table-select/api.ts new file mode 100644 index 00000000..c34364c7 --- /dev/null +++ b/packages/ui/certd-client/src/views/crud/component/table-select/api.ts @@ -0,0 +1,42 @@ +import { requestForMock } from "/src/api/service"; +const request = requestForMock; +const apiPrefix = "/mock/ComponentTableSelect"; +export function GetList(query: any) { + return request({ + url: apiPrefix + "/page", + method: "get", + data: query + }); +} + +export function AddObj(obj: any) { + return request({ + url: apiPrefix + "/add", + method: "post", + data: obj + }); +} + +export function UpdateObj(obj: any) { + return request({ + url: apiPrefix + "/update", + method: "post", + data: obj + }); +} + +export function DelObj(id: any) { + return request({ + url: apiPrefix + "/delete", + method: "post", + params: { id } + }); +} + +export function GetObj(id: any) { + return request({ + url: apiPrefix + "/get", + method: "get", + params: { id } + }); +} diff --git a/packages/ui/certd-client/src/views/crud/component/table-select/crud.tsx b/packages/ui/certd-client/src/views/crud/component/table-select/crud.tsx new file mode 100644 index 00000000..caa941a0 --- /dev/null +++ b/packages/ui/certd-client/src/views/crud/component/table-select/crud.tsx @@ -0,0 +1,99 @@ +import * as api from "./api"; +import * as textTableApi from "../text/api"; +import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud"; +import createCrudOptionsText from "../text/crud"; +export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet { + const pageRequest = async (query: UserPageQuery): Promise => { + return await api.GetList(query); + }; + const editRequest = async ({ form, row }: EditReq) => { + form.id = row.id; + return await api.UpdateObj(form); + }; + const delRequest = async ({ row }: DelReq) => { + return await api.DelObj(row.id); + }; + + const addRequest = async ({ form }: AddReq) => { + return await api.AddObj(form); + }; + + return { + crudOptions: { + request: { + pageRequest, + addRequest, + editRequest, + delRequest + }, + columns: { + id: { + title: "ID", + key: "id", + type: "number", + column: { + width: 50 + }, + form: { + show: false + } + }, + single: { + title: "单选", + search: { show: true }, + type: "table-select", + dict: dict({ + value: "id", + label: "name", + getNodesByValues: async (values: any[]) => { + return await textTableApi.GetByIds(values); + } + }), + form: { + component: { + createCrudOptions: createCrudOptionsText, + crudOptionsOverride: { + table: { + scroll: { + x: 2000 + } + }, + rowHandle: { + fixed: "right" + } + } + } + } + }, + multi: { + title: "多选", + search: { show: true }, + type: "table-select", + dict: dict({ + value: "id", + label: "name", + getNodesByValues: async (values: any[]) => { + return await textTableApi.GetByIds(values); + } + }), + form: { + component: { + multiple: true, + createCrudOptions: createCrudOptionsText, + crudOptionsOverride: { + table: { + scroll: { + x: 2000 + } + }, + rowHandle: { + fixed: "right" + } + } + } + } + } + } + } + }; +} diff --git a/packages/ui/certd-client/src/views/crud/component/table-select/index.vue b/packages/ui/certd-client/src/views/crud/component/table-select/index.vue new file mode 100644 index 00000000..cf9684cc --- /dev/null +++ b/packages/ui/certd-client/src/views/crud/component/table-select/index.vue @@ -0,0 +1,30 @@ + + + diff --git a/packages/ui/certd-client/src/views/crud/component/table-select/mock.ts b/packages/ui/certd-client/src/views/crud/component/table-select/mock.ts new file mode 100644 index 00000000..b44acd38 --- /dev/null +++ b/packages/ui/certd-client/src/views/crud/component/table-select/mock.ts @@ -0,0 +1,21 @@ +import mockUtil from "/src/mock/base"; +const options: any = { + name: "ComponentTableSelect", + idGenerator: 0 +}; +const list = [ + { + single: 1, + multi: [1, 2] + }, + { + single: 3, + multi: [1, 2, 3] + }, + { + single: 2 + } +]; +options.list = list; +const mock = mockUtil.buildMock(options); +export default mock; diff --git a/packages/ui/certd-client/src/views/crud/component/text/api.ts b/packages/ui/certd-client/src/views/crud/component/text/api.ts index dafb7ebe..6227edcd 100644 --- a/packages/ui/certd-client/src/views/crud/component/text/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/text/api.ts @@ -35,8 +35,15 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); } +export function GetByIds(ids: any) { + return request({ + url: apiPrefix + "/byIds", + method: "post", + data: { ids } + }); +} diff --git a/packages/ui/certd-client/src/views/crud/component/tree/api.ts b/packages/ui/certd-client/src/views/crud/component/tree/api.ts index d0aa6340..8b567c7a 100644 --- a/packages/ui/certd-client/src/views/crud/component/tree/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/tree/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/uploader/alioss/api.ts b/packages/ui/certd-client/src/views/crud/component/uploader/alioss/api.ts index d7f5a890..cddadbd7 100644 --- a/packages/ui/certd-client/src/views/crud/component/uploader/alioss/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/uploader/alioss/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/uploader/cos/api.ts b/packages/ui/certd-client/src/views/crud/component/uploader/cos/api.ts index 7a5d5526..93f67345 100644 --- a/packages/ui/certd-client/src/views/crud/component/uploader/cos/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/uploader/cos/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/uploader/cropper/api.ts b/packages/ui/certd-client/src/views/crud/component/uploader/cropper/api.ts index 30dcd2a5..3680fec0 100644 --- a/packages/ui/certd-client/src/views/crud/component/uploader/cropper/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/uploader/cropper/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/uploader/form/api.ts b/packages/ui/certd-client/src/views/crud/component/uploader/form/api.ts index f58f3966..2abff86c 100644 --- a/packages/ui/certd-client/src/views/crud/component/uploader/form/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/uploader/form/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/uploader/qiniu/api.ts b/packages/ui/certd-client/src/views/crud/component/uploader/qiniu/api.ts index 76042752..23818b6e 100644 --- a/packages/ui/certd-client/src/views/crud/component/uploader/qiniu/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/uploader/qiniu/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/component/uploader/s3/api.ts b/packages/ui/certd-client/src/views/crud/component/uploader/s3/api.ts index fa6df773..b1f40f00 100644 --- a/packages/ui/certd-client/src/views/crud/component/uploader/s3/api.ts +++ b/packages/ui/certd-client/src/views/crud/component/uploader/s3/api.ts @@ -37,7 +37,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/debug/api.ts b/packages/ui/certd-client/src/views/crud/debug/api.ts index c0036862..ca651ead 100644 --- a/packages/ui/certd-client/src/views/crud/debug/api.ts +++ b/packages/ui/certd-client/src/views/crud/debug/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/dict/cloneable/api.ts b/packages/ui/certd-client/src/views/crud/dict/cloneable/api.ts index d70f9f72..625829bc 100644 --- a/packages/ui/certd-client/src/views/crud/dict/cloneable/api.ts +++ b/packages/ui/certd-client/src/views/crud/dict/cloneable/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/dict/prototype/api.ts b/packages/ui/certd-client/src/views/crud/dict/prototype/api.ts index a5ed03e4..69669b86 100644 --- a/packages/ui/certd-client/src/views/crud/dict/prototype/api.ts +++ b/packages/ui/certd-client/src/views/crud/dict/prototype/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/dict/shared/manager/api.ts b/packages/ui/certd-client/src/views/crud/dict/shared/manager/api.ts index 7c30f4ea..829796c4 100644 --- a/packages/ui/certd-client/src/views/crud/dict/shared/manager/api.ts +++ b/packages/ui/certd-client/src/views/crud/dict/shared/manager/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/dict/shared/use/api.ts b/packages/ui/certd-client/src/views/crud/dict/shared/use/api.ts index 8c2a6f5e..a15f5c06 100644 --- a/packages/ui/certd-client/src/views/crud/dict/shared/use/api.ts +++ b/packages/ui/certd-client/src/views/crud/dict/shared/use/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/dict/single/api.ts b/packages/ui/certd-client/src/views/crud/dict/single/api.ts index f79a4aee..4bf86f46 100644 --- a/packages/ui/certd-client/src/views/crud/dict/single/api.ts +++ b/packages/ui/certd-client/src/views/crud/dict/single/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/column-resize/api.ts b/packages/ui/certd-client/src/views/crud/feature/column-resize/api.ts index 807f5fca..2e28954b 100644 --- a/packages/ui/certd-client/src/views/crud/feature/column-resize/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/column-resize/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/column-sort/api.ts b/packages/ui/certd-client/src/views/crud/feature/column-sort/api.ts index 34b72d57..62d80c79 100644 --- a/packages/ui/certd-client/src/views/crud/feature/column-sort/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/column-sort/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/columns-set/api.ts b/packages/ui/certd-client/src/views/crud/feature/columns-set/api.ts index 2b889ccc..175ad5a0 100644 --- a/packages/ui/certd-client/src/views/crud/feature/columns-set/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/columns-set/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/editable-row/api.ts b/packages/ui/certd-client/src/views/crud/feature/editable-row/api.ts index c89dff11..904b85ef 100644 --- a/packages/ui/certd-client/src/views/crud/feature/editable-row/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/editable-row/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/editable/api.ts b/packages/ui/certd-client/src/views/crud/feature/editable/api.ts index 607abb83..9e2bda63 100644 --- a/packages/ui/certd-client/src/views/crud/feature/editable/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/editable/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/expand/api.ts b/packages/ui/certd-client/src/views/crud/feature/expand/api.ts index 1cd3c2fe..04422556 100644 --- a/packages/ui/certd-client/src/views/crud/feature/expand/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/expand/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/export/api.ts b/packages/ui/certd-client/src/views/crud/feature/export/api.ts index 1d711aaf..929ae61a 100644 --- a/packages/ui/certd-client/src/views/crud/feature/export/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/export/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/filter/api.ts b/packages/ui/certd-client/src/views/crud/feature/filter/api.ts index 1ce40799..e4093938 100644 --- a/packages/ui/certd-client/src/views/crud/feature/filter/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/filter/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/fixed/api.ts b/packages/ui/certd-client/src/views/crud/feature/fixed/api.ts index 32a20d40..d23945d8 100644 --- a/packages/ui/certd-client/src/views/crud/feature/fixed/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/fixed/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/header-group/api.ts b/packages/ui/certd-client/src/views/crud/feature/header-group/api.ts index 50b50a54..4e287644 100644 --- a/packages/ui/certd-client/src/views/crud/feature/header-group/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/header-group/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/header/api.ts b/packages/ui/certd-client/src/views/crud/feature/header/api.ts index e418caed..ba066dc3 100644 --- a/packages/ui/certd-client/src/views/crud/feature/header/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/header/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/height/api.ts b/packages/ui/certd-client/src/views/crud/feature/height/api.ts index 58c615b2..541c533d 100644 --- a/packages/ui/certd-client/src/views/crud/feature/height/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/height/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/hide/api.ts b/packages/ui/certd-client/src/views/crud/feature/hide/api.ts index 93fb32e2..8aababa3 100644 --- a/packages/ui/certd-client/src/views/crud/feature/hide/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/hide/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/index/api.ts b/packages/ui/certd-client/src/views/crud/feature/index/api.ts index d2c01b7a..9fe205fc 100644 --- a/packages/ui/certd-client/src/views/crud/feature/index/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/index/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/merge/api.ts b/packages/ui/certd-client/src/views/crud/feature/merge/api.ts index 525475d6..28e4fc96 100644 --- a/packages/ui/certd-client/src/views/crud/feature/merge/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/merge/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/remove/api.ts b/packages/ui/certd-client/src/views/crud/feature/remove/api.ts index c04645e7..056d615e 100644 --- a/packages/ui/certd-client/src/views/crud/feature/remove/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/remove/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/search-multi/api.ts b/packages/ui/certd-client/src/views/crud/feature/search-multi/api.ts index 1d7234b0..7c8a37e1 100644 --- a/packages/ui/certd-client/src/views/crud/feature/search-multi/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/search-multi/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/search/api.ts b/packages/ui/certd-client/src/views/crud/feature/search/api.ts index 61fd0a47..7a1e4eb6 100644 --- a/packages/ui/certd-client/src/views/crud/feature/search/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/search/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/selection-radio/api.ts b/packages/ui/certd-client/src/views/crud/feature/selection-radio/api.ts index 368439c1..3a282f76 100644 --- a/packages/ui/certd-client/src/views/crud/feature/selection-radio/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/selection-radio/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/selection/api.ts b/packages/ui/certd-client/src/views/crud/feature/selection/api.ts index 368439c1..3a282f76 100644 --- a/packages/ui/certd-client/src/views/crud/feature/selection/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/selection/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/sortable/api.ts b/packages/ui/certd-client/src/views/crud/feature/sortable/api.ts index 0e92da07..e14aa74b 100644 --- a/packages/ui/certd-client/src/views/crud/feature/sortable/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/sortable/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/tabs/api.ts b/packages/ui/certd-client/src/views/crud/feature/tabs/api.ts index 31628b68..604402c2 100644 --- a/packages/ui/certd-client/src/views/crud/feature/tabs/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/tabs/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: number) { export function GetObj(id: number) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/tree/api.ts b/packages/ui/certd-client/src/views/crud/feature/tree/api.ts index 7c9d96c1..e0ba2cff 100644 --- a/packages/ui/certd-client/src/views/crud/feature/tree/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/tree/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/feature/value-builder/api.ts b/packages/ui/certd-client/src/views/crud/feature/value-builder/api.ts index 6dd8a4d0..c2092b5d 100644 --- a/packages/ui/certd-client/src/views/crud/feature/value-builder/api.ts +++ b/packages/ui/certd-client/src/views/crud/feature/value-builder/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/base/api.ts b/packages/ui/certd-client/src/views/crud/form/base/api.ts index d0da5ff9..484f1f27 100644 --- a/packages/ui/certd-client/src/views/crud/form/base/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/base/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/custom-form/api.ts b/packages/ui/certd-client/src/views/crud/form/custom-form/api.ts index 57904acc..2a424586 100644 --- a/packages/ui/certd-client/src/views/crud/form/custom-form/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/custom-form/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/drawer/api.ts b/packages/ui/certd-client/src/views/crud/form/drawer/api.ts index ae16f768..ab483c23 100644 --- a/packages/ui/certd-client/src/views/crud/form/drawer/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/drawer/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/group-tabs/api.ts b/packages/ui/certd-client/src/views/crud/form/group-tabs/api.ts index 79130e7e..3f29ccb9 100644 --- a/packages/ui/certd-client/src/views/crud/form/group-tabs/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/group-tabs/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/group/api.ts b/packages/ui/certd-client/src/views/crud/form/group/api.ts index 2c3961f6..1c878e6c 100644 --- a/packages/ui/certd-client/src/views/crud/form/group/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/group/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/helper/api.ts b/packages/ui/certd-client/src/views/crud/form/helper/api.ts index 600940d3..c8ddc835 100644 --- a/packages/ui/certd-client/src/views/crud/form/helper/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/helper/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/inner/api.ts b/packages/ui/certd-client/src/views/crud/form/inner/api.ts index f4b429da..8123f957 100644 --- a/packages/ui/certd-client/src/views/crud/form/inner/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/inner/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/inner/area/api.ts b/packages/ui/certd-client/src/views/crud/form/inner/area/api.ts index 99f34abb..fb4554b6 100644 --- a/packages/ui/certd-client/src/views/crud/form/inner/area/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/inner/area/api.ts @@ -43,7 +43,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/layout-flex/api.ts b/packages/ui/certd-client/src/views/crud/form/layout-flex/api.ts index c78b2136..382983dc 100644 --- a/packages/ui/certd-client/src/views/crud/form/layout-flex/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/layout-flex/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/layout-grid/api.ts b/packages/ui/certd-client/src/views/crud/form/layout-grid/api.ts index 027cba85..01bf8605 100644 --- a/packages/ui/certd-client/src/views/crud/form/layout-grid/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/layout-grid/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/layout/api.ts b/packages/ui/certd-client/src/views/crud/form/layout/api.ts index 07ece6a8..0a228c1e 100644 --- a/packages/ui/certd-client/src/views/crud/form/layout/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/layout/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/nest/api.ts b/packages/ui/certd-client/src/views/crud/form/nest/api.ts index 7648aae2..db682eb5 100644 --- a/packages/ui/certd-client/src/views/crud/form/nest/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/nest/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/render/api.ts b/packages/ui/certd-client/src/views/crud/form/render/api.ts index 2076fcad..07791fcb 100644 --- a/packages/ui/certd-client/src/views/crud/form/render/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/render/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/reset/api.ts b/packages/ui/certd-client/src/views/crud/form/reset/api.ts index 7fd495b6..015c7604 100644 --- a/packages/ui/certd-client/src/views/crud/form/reset/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/reset/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/single-column/api.ts b/packages/ui/certd-client/src/views/crud/form/single-column/api.ts index 6fe4e7b7..04725326 100644 --- a/packages/ui/certd-client/src/views/crud/form/single-column/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/single-column/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/validation/api.ts b/packages/ui/certd-client/src/views/crud/form/validation/api.ts index 9ff68e6e..9e2dfa5f 100644 --- a/packages/ui/certd-client/src/views/crud/form/validation/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/validation/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/form/view/api.ts b/packages/ui/certd-client/src/views/crud/form/view/api.ts index 4e17d236..3cd028b6 100644 --- a/packages/ui/certd-client/src/views/crud/form/view/api.ts +++ b/packages/ui/certd-client/src/views/crud/form/view/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/row-handle/dropdown/api.ts b/packages/ui/certd-client/src/views/crud/row-handle/dropdown/api.ts index 546c2a0d..872ce124 100644 --- a/packages/ui/certd-client/src/views/crud/row-handle/dropdown/api.ts +++ b/packages/ui/certd-client/src/views/crud/row-handle/dropdown/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/row-handle/tooltip/api.ts b/packages/ui/certd-client/src/views/crud/row-handle/tooltip/api.ts index 7bd5e0a5..2cda9ae8 100644 --- a/packages/ui/certd-client/src/views/crud/row-handle/tooltip/api.ts +++ b/packages/ui/certd-client/src/views/crud/row-handle/tooltip/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/slots/cell/api.ts b/packages/ui/certd-client/src/views/crud/slots/cell/api.ts index 352fb24c..6aaf0f52 100644 --- a/packages/ui/certd-client/src/views/crud/slots/cell/api.ts +++ b/packages/ui/certd-client/src/views/crud/slots/cell/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/slots/form-item/api.ts b/packages/ui/certd-client/src/views/crud/slots/form-item/api.ts index b328c061..573bba37 100644 --- a/packages/ui/certd-client/src/views/crud/slots/form-item/api.ts +++ b/packages/ui/certd-client/src/views/crud/slots/form-item/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/slots/form/api.ts b/packages/ui/certd-client/src/views/crud/slots/form/api.ts index 5fc5aeec..a654aab8 100644 --- a/packages/ui/certd-client/src/views/crud/slots/form/api.ts +++ b/packages/ui/certd-client/src/views/crud/slots/form/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/slots/layout/api.ts b/packages/ui/certd-client/src/views/crud/slots/layout/api.ts index 6be777f2..df82753d 100644 --- a/packages/ui/certd-client/src/views/crud/slots/layout/api.ts +++ b/packages/ui/certd-client/src/views/crud/slots/layout/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } }); diff --git a/packages/ui/certd-client/src/views/crud/slots/search/api.ts b/packages/ui/certd-client/src/views/crud/slots/search/api.ts index d8d50036..90b43bfa 100644 --- a/packages/ui/certd-client/src/views/crud/slots/search/api.ts +++ b/packages/ui/certd-client/src/views/crud/slots/search/api.ts @@ -35,7 +35,7 @@ export function DelObj(id: any) { export function GetObj(id: any) { return request({ - url: apiPrefix + "/info", + url: apiPrefix + "/get", method: "get", params: { id } });