From db5872786c1e1697a59af41386136ee002bb68ad Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期五, 30 六月 2023 17:17:12 +0800 Subject: [PATCH] 修改为汇丰默认图标,修改处理率计算方式 --- src/Pool/VideoManageData.ts | 42 ++++++++++++++++++++++-------------------- 1 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/Pool/VideoManageData.ts b/src/Pool/VideoManageData.ts index 1caee06..1877555 100644 --- a/src/Pool/VideoManageData.ts +++ b/src/Pool/VideoManageData.ts @@ -1,6 +1,7 @@ -import { getAllTimeRule, saveTimeRule } from "@/api/timeRule"; -import { findDictionaryByType } from "@/api/dictionary"; -import { findBaseByRuleEditor } from "@/api/es"; +import { getAllTimeRule, saveTimeRule } from "@/api/timeRule" +import { findDictionaryByType } from "@/api/dictionary" +import { findBaseByRuleEditor } from "@/api/es" +import store from "@/store" const AllDayRule = [ { day: 1, time_range: [{ start: "00:00", end: "24:00" }] }, @@ -13,24 +14,25 @@ ] export default class VideoManageData { - public SepTasks: Array<object> = []; - public TimeRules: Array<object> = []; - public Dictionary: object = {}; - public TagList: Array<object> = []; - public TimeRuleSum: number = 0; + public SepTasks: Array<object> = [] + public TimeRules: Array<object> = [] + public Dictionary: object = {} + public TagList: Array<object> = [] + public TimeRuleSum: number = 0 public init() { // this.getAllSeparateTasks(); - this.getTimeRule(); - this.getDictionary(); - this.getTagList(); + this.getTimeRule() + this.getDictionary() + // this.getTagList(); } public async getTimeRule() { - let rsp: any = await getAllTimeRule(); + let rsp: any = await getAllTimeRule(store.state.devId) + if (rsp && rsp.success) { - this.TimeRules = rsp.data; - this.TimeRuleSum = rsp.data.length + this.TimeRules = rsp.data.timeRules + this.TimeRuleSum = this.TimeRules.length } // 娣诲姞涓�鏉¢粯璁よ鍒� @@ -39,26 +41,26 @@ id: "", name: "鍏ㄥぉ", time_rule: AllDayRule - }; + } rsp = await saveTimeRule(newRule) if (rsp && rsp.success) { - this.getTimeRule(); + this.getTimeRule() } } } public async getDictionary() { - const rsp: any = await findDictionaryByType(); + const rsp: any = await findDictionaryByType() if (rsp && rsp.success) { - this.Dictionary = rsp.data; + this.Dictionary = rsp.data } } public async getTagList() { - const rsp: any = await findBaseByRuleEditor(); + const rsp: any = await findBaseByRuleEditor() if (rsp && rsp.success) { - this.TagList = rsp.data; + this.TagList = rsp.data } } } -- Gitblit v1.8.0