sd
2025-07-28 e7d40e5061afb87166c0929050ea721cc2956b76
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 { getCheckContents, getWarningRules,getKnowsList } from "@/api/selectRule";
const AllDayRule = [
  { day: 1, time_range: [{ start: "00:00", end: "24:00" }] },
@@ -15,6 +16,9 @@
export default class VideoManageData {
  public SepTasks: Array<object> = [];
  public TimeRules: Array<object> = [];
  public checkOptions: Array<object> = [];//检测内容
  public ruleOptions: Array<object> = [];//预警规则
  public knowsList: Array<object> = [];//知识库
  public Dictionary: object = {};
  public TagList: Array<object> = [];
  public TimeRuleSum: number = 0;
@@ -24,6 +28,45 @@
    this.getTimeRule();
    this.getDictionary();
    this.getTagList();
    this.getSelectRule();
  }
  public async getSelectRule() {
    let rspc: any = await getCheckContents(
      {
        page: 1,
        pageSize: 999
      }
    );
    if (rspc && rspc.status === 200) {
      this.checkOptions = rspc.data.list;
    }
    let rspw: any = await getWarningRules(
      {
        page: 1,
        pageSize: 999
      }
    );
    if (rspw && rspw.status === 200) {
      this.ruleOptions = rspw.data.list;
    }
    let rspk: any = await getKnowsList(
      {
        page: 1,
        pageSize: 999
      }
    );
    if (rspk && rspk.status === 200) {
      this.knowsList = rspk.data.map(k => ({
        id: Number(k.knowledgeId),
        title: k.title,
        files: k.files.map(f => ({
          id: Number(f.id),
          title: f.title
        }))
      }))
    }
    console.info("rspk:"+JSON.stringify(this.knowsList))
  }
  public async getTimeRule() {