feat: 看板上下行数据
This commit is contained in:
38
src/views/dashboard/overview/hooks/useUPFTotalFlow.ts
Normal file
38
src/views/dashboard/overview/hooks/useUPFTotalFlow.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { parseSizeFromBytes } from '@/utils/parse-utils';
|
||||
import { reactive, ref } from 'vue';
|
||||
|
||||
type TFType = {
|
||||
/**上行 N3 */
|
||||
up: string;
|
||||
/**下行 N6 */
|
||||
down: string;
|
||||
};
|
||||
|
||||
/**UPF-总流量数 */
|
||||
export const upfTotalFlow = ref<TFType[]>([
|
||||
// 0天 当天24小时
|
||||
{
|
||||
up: '0 B',
|
||||
down: '0 B',
|
||||
},
|
||||
{
|
||||
up: '0 B',
|
||||
down: '0 B',
|
||||
},
|
||||
{
|
||||
up: '0 B',
|
||||
down: '0 B',
|
||||
},
|
||||
]);
|
||||
|
||||
/**UPF-总流量数 数据解析 */
|
||||
export function upfTFParse(data: Record<string, string>) {
|
||||
let { up, down } = data;
|
||||
up = parseSizeFromBytes(up);
|
||||
down = parseSizeFromBytes(down);
|
||||
return { up, down };
|
||||
}
|
||||
|
||||
|
||||
/**UPF-总流量数 选中 */
|
||||
export const upfTFActive = ref<number>(0);
|
||||
Reference in New Issue
Block a user