src/pages/cameraAccess/components/SeparateRules.vue
@@ -157,7 +157,7 @@
import { saveCameraScene } from "@/api/scene"
import { saveCameraAndTask, updateCameraAndTask } from "@/api/selectRule";
import { changeRunType } from "@/api/pollConfig"
import { changeRunType,changeRunTypeTwo } from "@/api/pollConfig"
import { findAllFileByStackId } from "@/api/localVedio"
import VideoRuleData from "@/Pool/VideoRuleData"
@@ -439,6 +439,7 @@
    },
    //是否进行视频分析处理
    pollEnable(row) {
      // console.info("Camera.:"+JSON.stringify(this.Camera))
      let val = 0
      if (row) {
        if (this.PollData.RealTimeSum < this.PollData.channelTotal) {
@@ -453,10 +454,9 @@
        val = -1
      }
      if (this.Camera.cameraId && this.Camera.cameraId !== undefined) {
        changeRunType({
          camera_ids: [this.Camera.cameraId],
          run_type: val,
          isGb: this.Camera.gb28181
        changeRunTypeTwo({
          videoId: this.Camera.cameraId,
          isOpen: val===1?1:0
        }).then((rsp) => {
          this.getStatus()
          if (rsp && rsp.success) {
@@ -472,6 +472,25 @@
          }
          this.TreeDataPool.fetchTreeData()
        })
        // changeRunType({
        //   camera_ids: [this.Camera.cameraId],
        //   run_type: val,
        //   isGb: this.Camera.gb28181
        // }).then((rsp) => {
        //   this.getStatus()
        //   if (rsp && rsp.success) {
        //     this.$notify({
        //       type: "success",
        //       message: "配置成功"
        //     })
        //   } else {
        //     this.$notify({
        //       type: "error",
        //       message: "配置失败"
        //     })
        //   }
        //   this.TreeDataPool.fetchTreeData()
        // })
      }
      this.PollData.statisticTaskInfo()
    },