fix: 看板Hooks数据复位

This commit is contained in:
TsMask
2024-04-17 10:48:53 +08:00
parent 662583c73b
commit 432666b1ab
5 changed files with 68 additions and 24 deletions

View File

@@ -1,8 +1,7 @@
import { parseSizeFromBits, parseSizeFromKbs } from '@/utils/parse-utils';
import { ref } from 'vue';
/**UPF-流量数据 */
export const upfFlowData = ref<{
type FDType = {
/**时间 */
lineXTime: string[];
/**上行 N3 */
@@ -11,7 +10,10 @@ export const upfFlowData = ref<{
lineYDown: number[];
/**容量 */
cap: number;
}>({
};
/**UPF-流量数据 */
export const upfFlowData = ref<FDType>({
lineXTime: [],
lineYUp: [],
lineYDown: [],
@@ -74,3 +76,32 @@ export function upfTFParse(data: Record<string, string>) {
/**UPF-总流量数 选中 */
export const upfTFActive = ref<number>(0);
/**属性复位 */
export function upfTotalFlowReset() {
upfFlowData.value = {
lineXTime: [],
lineYUp: [],
lineYDown: [],
cap: 0,
};
upfTotalFlow.value = [
// 0天 当天24小时
{
up: '0 B',
down: '0 B',
requestFlag: false,
},
{
up: '0 B',
down: '0 B',
requestFlag: false,
},
{
up: '0 B',
down: '0 B',
requestFlag: false,
},
];
upfTFActive.value = 0;
}