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,14 +1,5 @@
import { ref } from 'vue';
/**UE事件数据 */
export const ueEventData = ref<Record<string, any>[]>([]);
/**UE事件总量 */
export const ueEventTotal = ref<number>(0);
/**UE事件推送id */
export const ueEventId = ref<string>('');
/**ueEvent UE会话事件 数据解析 */
export function ueEventParse(item: Record<string, any>) {
let evData: Record<string, any> = item.eventJSON;
@@ -29,15 +20,6 @@ export function ueEventParse(item: Record<string, any>) {
};
}
/**CDR事件数据 */
export const cdrEventData = ref<Record<string, any>[]>([]);
/**CDR事件总量 */
export const cdrEventTotal = ref<number>(0);
/**CDR事件推送id */
export const cdrEventId = ref<string>('');
/**cdrEvent CDR会话事件 数据解析 */
export function cdrEventParse(item: Record<string, any>) {
let evData: Record<string, any> = item.cdrJSON || item.CDR;
@@ -69,3 +51,10 @@ export const eventData = ref<Record<string, any>[]>([]);
export const eventTotal = ref<number>(0);
/**CDR/UE事件推送id */
export const eventId = ref<string>('');
/**属性复位 */
export function userActivityReset() {
eventData.value = [];
eventTotal.value = 0;
eventId.value = '';
}