diff --git a/src/api_mangage/key.js b/src/api_mangage/key.js new file mode 100644 index 0000000..43829b8 --- /dev/null +++ b/src/api_mangage/key.js @@ -0,0 +1,39 @@ +import request from "@/utils/request.js"; + + +/** + * @description 获取密钥列表 + * @param {*} (pageNum,pageSize) + * @returns data + */ +export function keyListApi(pageNum, pageSize) { + return request({ + url: `/thirdPartyApi/page?pageNum=${pageNum}&pageSize=${pageSize}`, + method: 'get' + }) +} + +/** + * @description 根据id获取密钥详情 + * @param {*} (id) + * @returns data + */ +export function getKeyByIdApi(id) { + return request({ + url: `/thirdPartyApi/get?id=${id}`, + method: 'get' + }) +} + +/** + * @description 更改密钥状态 + * @param {*} (id,status) + * @returns data + */ +export function updateKeyStatusApi(id, status) { + return request({ + url: `/thirdPartyApi/updateStatus`, + method: 'post', + data: { id, status } + }) +} \ No newline at end of file diff --git a/src/lang/package/en.ts b/src/lang/package/en.ts index 8011723..8beff8f 100644 --- a/src/lang/package/en.ts +++ b/src/lang/package/en.ts @@ -226,6 +226,11 @@ export default { keyMangage: { title: "Key", + list: "Key List", + name: "Owner", + status: "Status", + operations: "Operations", + check: "Check", }, priceMangage: { diff --git a/src/lang/package/zh-cn.ts b/src/lang/package/zh-cn.ts index bba6a79..cd6d088 100644 --- a/src/lang/package/zh-cn.ts +++ b/src/lang/package/zh-cn.ts @@ -225,6 +225,11 @@ export default { keyMangage: { title: "密钥管理", + list: "密钥列表", + name: "所属人", + status: "密钥状态", + operations: "操作", + check: "查看", }, priceMangage: { diff --git a/src/layout/index.vue b/src/layout/index.vue index afccd79..f13ca26 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -47,7 +47,7 @@ -
+
{{ $t("keyMangage.title") }} diff --git a/src/router/index.ts b/src/router/index.ts index 70ff4ab..92ee18c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -38,6 +38,24 @@ export const constantRoutes: RouteRecordRaw[] = [ ], }, + { + path: "/", + component: Layout, + redirect: "/keyList", + children: [ + { + path: "keyList", + component: () => import("@/views/mangage/keyList.vue"), + name: "keyList", + meta: { + title: "keyList", + icon: "homepage", + affix: true, + name: "keyMangage.list", + }, + }, + ], + }, { path: "/", component: Layout, diff --git a/src/types/components.d.ts b/src/types/components.d.ts index a5771ae..70f8d65 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -14,37 +14,26 @@ declare module '@vue/runtime-core' { EditPosition: typeof import('./../components/EditPosition.vue')['default'] 'EditPosition copy': typeof import('./../components/EditPosition copy.vue')['default'] ElButton: typeof import('element-plus/es')['ElButton'] - ElCard: typeof import('element-plus/es')['ElCard'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] - ElForm: typeof import('element-plus/es')['ElForm'] - ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] - ElRadio: typeof import('element-plus/es')['ElRadio'] - ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] - ElTag: typeof import('element-plus/es')['ElTag'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElUpload: typeof import('element-plus/es')['ElUpload'] GithubCorner: typeof import('./../components/GithubCorner/index.vue')['default'] Hamburger: typeof import('./../components/Hamburger/index.vue')['default'] IconSelect: typeof import('./../components/IconSelect/index.vue')['default'] - IEpCollection: typeof import('~icons/ep/collection')['default'] - IEpDelete: typeof import('~icons/ep/delete')['default'] IEpDocumentAdd: typeof import('~icons/ep/document-add')['default'] IEpEdit: typeof import('~icons/ep/edit')['default'] - IEpPlus: typeof import('~icons/ep/plus')['default'] - IEpRefresh: typeof import('~icons/ep/refresh')['default'] - IEpSearch: typeof import('~icons/ep/search')['default'] LangSelect: typeof import('./../components/LangSelect/index.vue')['default'] MultiUpload: typeof import('./../components/Upload/MultiUpload.vue')['default'] MyLoading: typeof import('./../components/myLoading.vue')['default'] @@ -60,6 +49,5 @@ declare module '@vue/runtime-core' { } export interface ComponentCustomProperties { vInfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll'] - vLoading: typeof import('element-plus/es')['ElLoadingDirective'] } } diff --git a/src/views/mangage/keyCheck.vue b/src/views/mangage/keyCheck.vue index 5210b1b..abdad3b 100644 --- a/src/views/mangage/keyCheck.vue +++ b/src/views/mangage/keyCheck.vue @@ -1,22 +1,47 @@