Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
lijiahangmax
2024-06-30 01:14:58 +08:00
67 changed files with 497 additions and 310 deletions

View File

@@ -1,6 +1,6 @@
VITE_API_BASE_URL= 'http://127.0.0.1:9200/orion-visor/api'
VITE_WS_BASE_URL= 'ws://127.0.0.1:9200/orion-visor/keep-alive'
VITE_APP_VERSION= '2.0.9'
VITE_APP_VERSION= '2.0.10'
VITE_APP_RELEASE= 'community'
VITE_SFTP_PREVIEW_MB= 2
VITE_DEMO_MODE= false

View File

@@ -1,6 +1,6 @@
VITE_API_BASE_URL= '/orion-visor/api'
VITE_WS_BASE_URL= '/orion-visor/keep-alive'
VITE_APP_VERSION= '2.0.9'
VITE_APP_VERSION= '2.0.10'
VITE_APP_RELEASE= 'community'
VITE_SFTP_PREVIEW_MB= 2
VITE_DEMO_MODE= false

View File

@@ -1,7 +1,7 @@
{
"name": "orion-visor-ui",
"description": "Orion Visor UI",
"version": "2.0.9",
"version": "2.0.10",
"private": true,
"author": "Jiahang Li",
"license": "Apache 2.0",

View File

@@ -1,7 +1,7 @@
import axios from 'axios';
import qs from 'query-string';
type PreferenceType = 'SYSTEM' | 'TERMINAL'
export type PreferenceType = 'SYSTEM' | 'TERMINAL'
/**
* 用户偏好更新请求-单个

View File

@@ -2,6 +2,8 @@ import type { CacheState } from './types';
import type { AxiosResponse } from 'axios';
import type { TagType } from '@/api/meta/tag';
import { getTagList } from '@/api/meta/tag';
import type { PreferenceType } from '@/api/user/preference';
import { getPreference } from '@/api/user/preference';
import { defineStore } from 'pinia';
import { getUserList } from '@/api/user/user';
import { getRoleList } from '@/api/user/role';
@@ -131,5 +133,15 @@ export default defineStore('cache', {
return await this.load('execJob', getExecJobList, force);
},
// 加载偏好
async loadPreference<T>(type: PreferenceType, force = false) {
return await this.load(`preference_${type}`, () => getPreference<T>(type), force);
},
// 加载偏好项
async loadPreferenceItem<T>(type: PreferenceType, item: string, force = false) {
return await this.load(`preference_${type}_${item}`, () => getPreference<T>(type, [item]), force);
},
}
});

View File

@@ -3,6 +3,13 @@ import { dateFormat } from '@/utils';
const columns = [
{
title: 'id',
dataIndex: 'id',
slotName: 'id',
width: 100,
align: 'left',
fixed: 'left',
}, {
title: '连接用户',
dataIndex: 'username',
slotName: 'username',

View File

@@ -3,6 +3,13 @@ import { dateFormat } from '@/utils';
const columns = [
{
title: 'id',
dataIndex: 'id',
slotName: 'id',
width: 100,
align: 'left',
fixed: 'left',
}, {
title: '操作用户',
dataIndex: 'username',
slotName: 'username',