From b2d0ac2db80c08783fd848933230618cc30d76a2 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期三, 30 八月 2023 11:38:24 +0800 Subject: [PATCH] 添加锦汇企业编码. 修复点位列表平铺的bug --- 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