feat: 看板上下行数据

This commit is contained in:
TsMask
2024-01-29 15:18:02 +08:00
parent e3f206b541
commit c9d571ce1d
3 changed files with 64 additions and 43 deletions

View 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);