From 9a7a2915fcdaa052e13d38c839b070c9457e648d Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Thu, 26 Oct 2023 16:20:42 +0800 Subject: [PATCH] upload --- src/api_mangage/key.js | 39 ++ src/lang/package/en.ts | 5 + src/lang/package/zh-cn.ts | 5 + src/layout/index.vue | 2 +- src/router/index.ts | 18 + src/types/auto-imports.d.ts | 2 - src/types/components.d.ts | 3 + src/views/mangage/keyCheck.vue | 200 ++++++-- src/views/mangage/keyList.vue | 148 ++++++ src/views/myCreating/index copy.vue | 698 ---------------------------- 10 files changed, 380 insertions(+), 740 deletions(-) create mode 100644 src/api_mangage/key.js create mode 100644 src/views/mangage/keyList.vue delete mode 100644 src/views/myCreating/index copy.vue 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 daac857..7fe1088 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -25,7 +25,7 @@ {{ $t("businessMangage.title") }} -
+
diff --git a/src/router/index.ts b/src/router/index.ts index cbd1ad7..195ff30 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -37,6 +37,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/auto-imports.d.ts b/src/types/auto-imports.d.ts index e5c7bdb..9ea2d5d 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -2,7 +2,6 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] - const ElForm: typeof import('element-plus/es')['ElForm'] const ElMessage: typeof import('element-plus/es')['ElMessage'] const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] @@ -271,7 +270,6 @@ import { UnwrapRef } from 'vue' declare module 'vue' { interface ComponentCustomProperties { readonly EffectScope: UnwrapRef - readonly ElForm: UnwrapRef readonly ElMessage: UnwrapRef readonly ElMessageBox: UnwrapRef readonly asyncComputed: UnwrapRef diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 6fa6b5c..a3de3b7 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -24,8 +24,11 @@ declare module '@vue/runtime-core' { 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'] 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'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElUpload: typeof import('element-plus/es')['ElUpload'] GithubCorner: typeof import('./../components/GithubCorner/index.vue')['default'] diff --git a/src/views/mangage/keyCheck.vue b/src/views/mangage/keyCheck.vue index 7616a7c..abdad3b 100644 --- a/src/views/mangage/keyCheck.vue +++ b/src/views/mangage/keyCheck.vue @@ -1,24 +1,47 @@