添加修改主机配置页面.

This commit is contained in:
lijiahang
2023-09-22 11:50:56 +08:00
parent 9398f0f4fd
commit fdc3bc6147
27 changed files with 366 additions and 46 deletions

View File

@@ -1,7 +1,7 @@
import { defineStore } from 'pinia';
import { CacheState } from './types';
export type CacheType = 'menus' | 'roles' | 'tags' | 'hostKeys'
export type CacheType = 'menus' | 'roles' | 'tags' | 'hostKeys' | 'hostIdentities'
const useCacheStore = defineStore('cache', {
state: (): CacheState => ({
@@ -9,6 +9,7 @@ const useCacheStore = defineStore('cache', {
roles: [],
tags: [],
hostKeys: [],
hostIdentities: [],
}),
getters: {},

View File

@@ -2,12 +2,14 @@ import { MenuQueryResponse } from '@/api/system/menu';
import { RoleQueryResponse } from '@/api/user/role';
import { TagQueryResponse } from '@/api/meta/tag';
import { HostKeyQueryResponse } from '@/api/asset/host-key';
import { HostIdentityQueryResponse } from '@/api/asset/host-identity';
export interface CacheState {
menus: MenuQueryResponse[];
roles: RoleQueryResponse[];
tags: TagQueryResponse[];
hostKeys: HostKeyQueryResponse[];
hostIdentities: HostIdentityQueryResponse[];
[key: string]: unknown;
}

View File

@@ -70,6 +70,7 @@ const useUserStore = defineStore('user', {
async logout() {
try {
await userLogout();
} catch (e) {
} finally {
// 登出回调
this.logoutCallBack();