From d498cdcf61fd8e2ec341cad3e7c21829ecef1672 Mon Sep 17 00:00:00 2001 From: sd <shidong@jhsoft.cc> Date: 星期二, 26 八月 2025 17:44:18 +0800 Subject: [PATCH] 摄像机配置、数据推送和文搜万物 bug和样式修复; 知识库卡片样式调整参照大模型平台知识库样式。 --- src/Pool/VideoRuleData.ts | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Pool/VideoRuleData.ts b/src/Pool/VideoRuleData.ts index 534be1d..51a8cad 100644 --- a/src/Pool/VideoRuleData.ts +++ b/src/Pool/VideoRuleData.ts @@ -1,7 +1,7 @@ import { getCameraInfo, getGB28181CameraInfo } from "@/api/camera" import { getAllPolygon } from "@/api/polygon" import { getDirDetails, findAllFileByStackId } from "@/api/localVedio" -import { getCameraSceneRule } from "@/api/scene" +import { getCameraSceneRule,getCameraSceneRuleTwo } from "@/api/scene" export default class VideoRuleData { public selectTask: Array<object> @@ -153,11 +153,26 @@ const rsp: any = await getCameraSceneRule({ cameraId: this.cameraId }) if (rsp && rsp.success) { let rspData = rsp.data.taskList ? rsp.data.taskList : [] - this.rules = rsp.data.rules ? rsp.data.rules : [] + // this.rules = rsp.data.rules ? rsp.data.rules : [] this.camearInfo = rsp.data.cameraInfo ? rsp.data.cameraInfo : {} this.analytics = rsp.data.cameraInfo.run_type !== -1 ? true : false this.dealWay = rsp.data.cameraInfo.run_type === 1 ? true : false this.runServerName = rsp.data.cameraInfo.runServerName } + const rspTwo: any = await getCameraSceneRuleTwo({ videoId: this.cameraId }) + if (rspTwo && rspTwo.status === 200) { + this.rules = rspTwo.data.list ? rspTwo.data.list.map(item => ({ + ...item, + id:item.taskId, + scene_name: item.taskName, + desc:item.taskDescription, + alarm_level:item.eventLevel, + checkContents: item.checkContent ? item.checkContent.map(check => check.checkId) : [], + warningRules: item.warningRule ? item.warningRule.map(rule => rule.ruleId) : [], + workingTimes: item.workingTime ? item.workingTime.map(time => time.labelId)[0] : "", + })) : [] + } + // console.info("rules:"+JSON.stringify(rsp.data)) + // console.info("list:"+JSON.stringify(this.rules)) } } -- Gitblit v1.8.0