diff --git a/src/api/login.ts b/src/api/login.ts index e7ff947d..ca521231 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -1,3 +1,5 @@ +import { CACHE_SESSION_CRYPTO_API } from '@/constants/cache-keys-constants'; +import { sessionGet } from '@/utils/cache-session-utils'; import { request } from '@/plugins/http-fetch'; // 登录方法 @@ -7,7 +9,7 @@ export function login(data: Record) { method: 'post', data: data, whithToken: false, - crypto: true, + crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false', }); } @@ -22,7 +24,7 @@ export function register(data: Record) { method: 'post', data: data, whithToken: false, - crypto: true, + crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false', }); } diff --git a/src/api/ne/neInfo.ts b/src/api/ne/neInfo.ts index 2d66d90b..013443c3 100644 --- a/src/api/ne/neInfo.ts +++ b/src/api/ne/neInfo.ts @@ -1,3 +1,5 @@ +import { CACHE_SESSION_CRYPTO_API } from '@/constants/cache-keys-constants'; +import { sessionGet } from '@/utils/cache-session-utils'; import { request } from '@/plugins/http-fetch'; /** @@ -36,7 +38,7 @@ export function addNeInfo(data: Record) { url: `/ne/info`, method: 'post', data: data, - crypto: true, + crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false', timeout: 30_000, }); } @@ -51,7 +53,7 @@ export function updateNeInfo(data: Record) { url: `/ne/info`, method: 'put', data: data, - crypto: true, + crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false', timeout: 30_000, }); } diff --git a/src/constants/cache-keys-constants.ts b/src/constants/cache-keys-constants.ts index 94e02304..b09b2ffb 100644 --- a/src/constants/cache-keys-constants.ts +++ b/src/constants/cache-keys-constants.ts @@ -1,3 +1,6 @@ +/**会话缓存-接口加密 */ +export const CACHE_SESSION_CRYPTO_API = 'cache:session:cryptoApi'; + /**会话缓存-网络请求 */ export const CACHE_SESSION_FATCH = 'cache:session:fatch'; diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index 81405212..b10f77d6 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -1,9 +1,10 @@ import { getSysConf } from '@/api'; -import { CACHE_LOCAL_I18N } from '@/constants/cache-keys-constants'; +import { CACHE_LOCAL_I18N, CACHE_SESSION_CRYPTO_API } from '@/constants/cache-keys-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { removeToken } from '@/plugins/auth-token'; import { parseUrlPath } from '@/plugins/file-static-url'; import { localGet, localSet } from '@/utils/cache-local-utils'; +import { sessionSet } from '@/utils/cache-session-utils'; import { defineStore } from 'pinia'; /**应用参数类型 */ @@ -22,6 +23,8 @@ type AppStore = { bootloader: boolean; // 用户登录认证 loginAuth: boolean; + // 用户接口加密 + cryptoApi: boolean; // 序列号 serialNum: string; /**应用版权声明 */ @@ -55,6 +58,7 @@ const useAppStore = defineStore('app', { buildTime: `-`, bootloader: false, loginAuth: true, + cryptoApi: true, serialNum: `-`, copyright: `Copyright ©2023 For ${import.meta.env.VITE_APP_NAME}`, logoType: 'icon', @@ -88,7 +92,9 @@ const useAppStore = defineStore('app', { if (this.bootloader) { removeToken(); } - this.loginAuth = res.data.loginAuth !== 'false' ; + this.loginAuth = res.data.loginAuth !== 'false'; + this.cryptoApi = res.data.cryptoApi !== 'false'; + sessionSet(CACHE_SESSION_CRYPTO_API, res.data.cryptoApi); this.serialNum = res.data.serialNum; this.appName = res.data.title; this.copyright = res.data.copyright; diff --git a/src/views/dashboard/smfCDRByIMSI/index.vue b/src/views/dashboard/smfCDRByIMSI/index.vue index 841bd578..f7a0939f 100644 --- a/src/views/dashboard/smfCDRByIMSI/index.vue +++ b/src/views/dashboard/smfCDRByIMSI/index.vue @@ -73,8 +73,8 @@ const option = { const downlinkValueF = parseSizeFromByte(downlinkValue); return `
${title}
-
Uplink: ${uplinkValueF}
Downlink: ${downlinkValueF}
+
Uplink: ${uplinkValueF}
`; }, }, @@ -95,7 +95,7 @@ const option = { }, dataZoom: [ { - show: true, + show: false, realtime: true, start: 0, end: 100, @@ -113,13 +113,13 @@ const option = { { left: '10%', right: 50, - height: '30%', + height: '40%', }, { left: '10%', right: 50, top: '50%', - height: '30%', + height: '40%', }, ], xAxis: [ @@ -129,7 +129,7 @@ const option = { axisLine: { onZero: true }, data: [], // x轴初始数据 axisLabel: { - show: true, // 显示标签 + show: false, // 显示标签 rotate: 15, // 设置倾斜角度(如15度) }, }, @@ -147,30 +147,30 @@ const option = { ], yAxis: [ { - name: 'Uplink (Byte)', + name: 'Downlink (Byte)', type: 'value', }, { gridIndex: 1, - name: 'Downlink (Byte)', + name: 'Uplink (Byte)', type: 'value', inverse: true, }, ], series: [ { - name: 'Uplink', + name: 'Downlink', type: 'line', data: [], // y轴初始数据 symbol: 'circle', // 数据点形状 symbolSize: 6, // 数据点大小 smooth: true, // 平滑曲线 - color: 'rgb(17, 178, 255)', + color: 'rgb(0, 190, 99)', areaStyle: { color: { colorStops: [ - { offset: 0, color: 'rgba(17, 178, 255, .5)' }, - { offset: 1, color: 'rgba(17, 178, 255, 0.5)' }, + { offset: 0, color: 'rgba(0, 190, 99, .5)' }, + { offset: 1, color: 'rgba(0, 190, 99, 0.5)' }, ], x: 0, y: 0, @@ -184,7 +184,7 @@ const option = { }, }, { - name: 'Downlink', + name: 'Uplink', type: 'line', xAxisIndex: 1, yAxisIndex: 1, @@ -192,12 +192,12 @@ const option = { symbol: 'circle', // 数据点形状 symbolSize: 6, // 数据点大小 smooth: true, // 平滑曲线 - color: 'rgb(0, 190, 99)', + color: 'rgb(17, 178, 255)', areaStyle: { color: { colorStops: [ - { offset: 0, color: 'rgba(0, 190, 99, .5)' }, - { offset: 1, color: 'rgba(0, 190, 99, 0.5)' }, + { offset: 0, color: 'rgba(17, 178, 255, .5)' }, + { offset: 1, color: 'rgba(17, 178, 255, 0.5)' }, ], x: 0, y: 0, @@ -267,6 +267,7 @@ let queryParams = reactive({ neType: 'SMF', neId: '001', subscriberID: '', + dnn: '', sortField: 'timestamp', sortOrder: 'desc', /**开始时间 */ @@ -281,6 +282,8 @@ let queryParams = reactive({ /**查询参数重置 */ function fnQueryReset() { + queryParams.subscriberID = ''; + queryParams.dnn = ''; queryRangePicker.value = [dayjs().startOf('hour'), dayjs().endOf('hour')]; fnGetList(1); } @@ -611,21 +614,15 @@ onBeforeUnmount(() => { > - - - + + + > @@ -650,6 +647,23 @@ onBeforeUnmount(() => { + + + + + diff --git a/src/views/ne-data/base-station/components/list.vue b/src/views/ne-data/base-station/components/list.vue index b7b130e3..1d829638 100644 --- a/src/views/ne-data/base-station/components/list.vue +++ b/src/views/ne-data/base-station/components/list.vue @@ -313,6 +313,7 @@ let modalState: ModalStateType = reactive({ address: '', name: '', position: '', + state: undefined, }, confirmLoading: false, }); @@ -481,6 +482,7 @@ onMounted(() => { v-model:value="queryParams.state" :options="nbState" :placeholder="t('common.selectPlease')" + @change="fnGetList" /> @@ -538,12 +540,25 @@ onMounted(() => {