From 91b2a939b970ee50fe96a416cb1d92b4637e5576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E5=90=8C=E5=AD=A6?= Date: Wed, 22 Oct 2025 11:40:57 +0800 Subject: [PATCH] =?UTF-8?q?UPDATE:=201=E3=80=81=E9=87=8D=E6=96=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=BF=80=E6=B4=BB=E9=80=BB=E8=BE=91=EF=BC=9B2?= =?UTF-8?q?=E3=80=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/activate/index.ts | 5 +- frontend/src/api/activate/interface/index.ts | 25 +-- .../src/layouts/components/Footer/index.vue | 17 +- frontend/src/stores/modules/auth.ts | 17 +- frontend/src/views/home/tabs/model.vue | 23 +-- .../device/components/monitorPopup.vue | 53 ++++-- .../plan/planList/components/childrenPlan.vue | 14 +- frontend/src/views/plan/planList/index.vue | 4 +- .../views/system/versionRegister/index.vue | 168 ++++++------------ 9 files changed, 127 insertions(+), 199 deletions(-) diff --git a/frontend/src/api/activate/index.ts b/frontend/src/api/activate/index.ts index 13eade5..fcc14d2 100644 --- a/frontend/src/api/activate/index.ts +++ b/frontend/src/api/activate/index.ts @@ -1,8 +1,7 @@ import http from '@/api' -import type { Activate } from '@/api/activate/interface' -export const generateApplicationCode = (params: Activate.ApplicationCodePlaintext) => { - return http.post(`/activate/generateApplicationCode`, params) +export const generateApplicationCode = () => { + return http.post(`/activate/generateApplicationCode`) } export const verifyActivationCode = (activationCode: string) => { diff --git a/frontend/src/api/activate/interface/index.ts b/frontend/src/api/activate/interface/index.ts index b21e6cc..b9fbda3 100644 --- a/frontend/src/api/activate/interface/index.ts +++ b/frontend/src/api/activate/interface/index.ts @@ -1,37 +1,14 @@ //激活模块 export namespace Activate { - export interface ApplicationModule { - /** - * 是否申请 1是 0否 - */ - apply: number; - } - export interface ActivateModule extends ApplicationModule { + export interface ActivateModule { /** * 是否永久 1是 0否 */ permanently: number; } - export interface ApplicationCodePlaintext { - - /** - * 模拟式模块 - */ - simulate: ApplicationModule; - - /** - * 数字式模块 - */ - digital: ApplicationModule; - - /** - * 比对式模块 - */ - contrast: ApplicationModule; - } export interface ActivationCodePlaintext { /** diff --git a/frontend/src/layouts/components/Footer/index.vue b/frontend/src/layouts/components/Footer/index.vue index 36df60e..0f4e5fd 100644 --- a/frontend/src/layouts/components/Footer/index.vue +++ b/frontend/src/layouts/components/Footer/index.vue @@ -41,32 +41,23 @@ const modeList = [ name: '模拟式模块', code: '模拟式', key: 'simulate', - activated: - isActivateOpen === 'true' - ? activateInfo.simulate.apply === 1 && activateInfo.simulate.permanently === 1 - : true + activated: isActivateOpen === 'true' ? activateInfo.simulate.permanently === 1 : true }, { name: '数字式模块', code: '数字式', key: 'digital', - activated: - isActivateOpen === 'true' - ? activateInfo.digital.apply === 1 && activateInfo.digital.permanently === 1 - : true + activated: isActivateOpen === 'true' ? activateInfo.digital.permanently === 1 : true }, { name: '比对式模块', code: '比对式', key: 'contrast', - activated: - isActivateOpen === 'true' - ? activateInfo.contrast.apply === 1 && activateInfo.contrast.permanently === 1 - : true + activated: isActivateOpen === 'true' ? activateInfo.contrast.permanently === 1 : true } ] const handelOpen = async (item: string, key: string) => { - if (isActivateOpen === 'true' && (activateInfo[key].apply !== 1 || activateInfo[key].permanently !== 1)) { + if (isActivateOpen === 'true' && activateInfo[key].permanently !== 1) { ElMessage.warning(`${item}模块未激活`) return } diff --git a/frontend/src/stores/modules/auth.ts b/frontend/src/stores/modules/auth.ts index bd86c63..e438136 100644 --- a/frontend/src/stores/modules/auth.ts +++ b/frontend/src/stores/modules/auth.ts @@ -79,7 +79,22 @@ export const useAuthStore = defineStore({ }, async setActivateInfo() { const license_result = await getLicense() - const licenseData = license_result.data as unknown as Activate.ActivationCodePlaintext + const licenseData = license_result.data as Activate.ActivationCodePlaintext + if (!licenseData.simulate) { + licenseData.simulate = { + permanently: 0 + } + } + if (!licenseData.digital) { + licenseData.digital = { + permanently: 0 + } + } + if (!licenseData.contrast) { + licenseData.contrast = { + permanently: 0 + } + } this.activateInfo = licenseData } } diff --git a/frontend/src/views/home/tabs/model.vue b/frontend/src/views/home/tabs/model.vue index 25e1e4f..6b8dcf5 100644 --- a/frontend/src/views/home/tabs/model.vue +++ b/frontend/src/views/home/tabs/model.vue @@ -43,30 +43,21 @@ const modeList = [ code: '模拟式', subName: '未启用模拟式检测计划', img: new URL('/src/assets/images/dashboard/1.svg', import.meta.url).href, - activated: - isActivateOpen === 'true' - ? activateInfo.simulate.apply === 1 && activateInfo.simulate.permanently === 1 - : true + activated: isActivateOpen === 'true' ? activateInfo.simulate.permanently === 1 : true }, { name: '数字式模块', code: '数字式', subName: '启用数字检测计划', img: new URL('/src/assets/images/dashboard/2.svg', import.meta.url).href, - activated: - isActivateOpen === 'true' - ? activateInfo.digital.apply === 1 && activateInfo.digital.permanently === 1 - : true + activated: isActivateOpen === 'true' ? activateInfo.digital.permanently === 1 : true }, { name: '比对式模块', code: '比对式', subName: '启用比对式检测计划', img: new URL('/src/assets/images/dashboard/3.svg', import.meta.url).href, - activated: - isActivateOpen === 'true' - ? activateInfo.contrast.apply === 1 && activateInfo.contrast.permanently === 1 - : true + activated: isActivateOpen === 'true' ? activateInfo.contrast.permanently === 1 : true } ] const handelOpen = async (item: any) => { @@ -81,12 +72,8 @@ const handelOpen = async (item: any) => { await authStore.getAuthMenuList() return } -const handleSelect = (key: string, keyPath: string[]) => { - -} -onMounted(() => { - -}) +const handleSelect = (key: string, keyPath: string[]) => {} +onMounted(() => {})