| | |
| | | |
| | | <div v-if="Camera.analytics && isShowPolling === 'show'" class="flex-box" v-show="cameraType === 'camera'"> |
| | | <span class="label">处理方式</span> |
| | | <toggle-button :value="Camera.dealWay" :width="60" :labels="{ checked: '实时', unchecked: '轮询' }" :color="{ |
| | | <toggle-button :width="60" :labels="{ checked: '实时', unchecked: '实时' }" :color="{ |
| | | checked: '#3D68E1', |
| | | unchecked: '#3D68E1', |
| | | disabled: '#CCCCCC' |
| | | }" :sync="true"/> |
| | | <!-- <toggle-button :value="Camera.dealWay" :width="60" :labels="{ checked: '实时', unchecked: '轮询' }" :color="{ |
| | | checked: '#3D68E1', |
| | | unchecked: '#FF7733', |
| | | disabled: '#CCCCCC' |
| | | }" :sync="true" @change="changePoll" /> |
| | | }" :sync="true" @change="changePoll" /> --> |
| | | </div> |
| | | <div v-if="Camera.analytics" class="flex-box" v-show="cameraType === 'camera'"> |
| | | <span class="label">处理状态: {{ camStatus }}</span> |
| | |
| | | <span class="label">SmartAI节点: {{ Camera.runServerName }}</span> |
| | | </div> |
| | | |
| | | <div v-if="Camera.analytics" class="flex-box"> |
| | | <!-- <div v-if="Camera.analytics" class="flex-box"> |
| | | <span class="label">算法快速通道</span> |
| | | <div class="channel flex-box"> |
| | | <el-tooltip effect="dark" content="复制此摄像机算法规则" placement="bottom" popper-class="atooltip"> |
| | |
| | | " @click="ctrlV" class="iconfont iconniantie ml5"></span> |
| | | </el-tooltip> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | 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" |
| | | |
| | |
| | | }, |
| | | refresh(url) { |
| | | this.Camera.baseImg = url |
| | | // console.info("url="+url) |
| | | }, |
| | | // 初始化摄像机信息,父组件调用 |
| | | async initCameraData(id, type) { |
| | |
| | | }, |
| | | //是否进行视频分析处理 |
| | | pollEnable(row) { |
| | | // console.info("Camera.:"+JSON.stringify(this.Camera)) |
| | | let val = 0 |
| | | if (row) { |
| | | if (this.PollData.RealTimeSum < this.PollData.channelTotal) { |
| | |
| | | this.Camera.dealWay = false |
| | | val = -1 |
| | | } |
| | | console.info("isOpen:"+this.Camera.analytics?1:0) |
| | | 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 |
| | | isOpen: this.Camera.analytics?1:0 |
| | | }).then((rsp) => { |
| | | this.getStatus() |
| | | if (rsp && rsp.success) { |
| | | if (rsp && rsp.status === 200) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "配置成功" |
| | | }) |
| | | } else { |
| | | this.Camera.analytics = !this.Camera.analytics |
| | | this.$notify({ |
| | | type: "error", |
| | | message: "配置失败" |
| | | message: rsp.msg |
| | | }) |
| | | } |
| | | 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() |
| | | }, |
| | | //实时、轮询切换 |
| | | changePoll(row) { |
| | | //判断是新增还是更新 |
| | | if (this.Camera.cameraId && this.Camera.cameraId !== undefined) { |
| | | if (this.PollData.RealTimeSum < this.PollData.channelTotal) { |
| | | if (row.value) { |
| | | this.Camera.dealWay = true |
| | | } else { |
| | | this.Camera.dealWay = false |
| | | } |
| | | changeRunType({ |
| | | camera_ids: [this.Camera.cameraId], |
| | | run_type: this.Camera.dealWay ? 1 : 0, |
| | | isGb: this.Camera.gb28181 |
| | | }).then((rsp) => { |
| | | if (rsp && rsp.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "配置成功" |
| | | }) |
| | | } else { |
| | | this.$notify({ |
| | | type: "error", |
| | | message: "配置失败" |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | if (this.Camera.dealWay) { |
| | | this.Camera.dealWay = false |
| | | changeRunType({ |
| | | camera_ids: [this.Camera.cameraId], |
| | | run_type: this.Camera.dealWay ? 1 : 0 |
| | | }).then((rsp) => { |
| | | if (rsp && rsp.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "配置成功" |
| | | }) |
| | | } else { |
| | | this.$notify({ |
| | | type: "error", |
| | | message: "配置失败" |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | this.TreeDataPool.fetchTreeData() |
| | | this.PollData.statisticTaskInfo() |
| | | } |
| | | // if (this.Camera.cameraId && this.Camera.cameraId !== undefined) { |
| | | // if (this.PollData.RealTimeSum < this.PollData.channelTotal) { |
| | | // if (row.value) { |
| | | // this.Camera.dealWay = true |
| | | // } else { |
| | | // this.Camera.dealWay = false |
| | | // } |
| | | // changeRunType({ |
| | | // camera_ids: [this.Camera.cameraId], |
| | | // run_type: this.Camera.dealWay ? 1 : 0, |
| | | // isGb: this.Camera.gb28181 |
| | | // }).then((rsp) => { |
| | | // if (rsp && rsp.success) { |
| | | // this.$notify({ |
| | | // type: "success", |
| | | // message: "配置成功" |
| | | // }) |
| | | // } else { |
| | | // this.$notify({ |
| | | // type: "error", |
| | | // message: "配置失败" |
| | | // }) |
| | | // } |
| | | // }) |
| | | // } else { |
| | | // if (this.Camera.dealWay) { |
| | | // this.Camera.dealWay = false |
| | | // changeRunType({ |
| | | // camera_ids: [this.Camera.cameraId], |
| | | // run_type: this.Camera.dealWay ? 1 : 0 |
| | | // }).then((rsp) => { |
| | | // if (rsp && rsp.success) { |
| | | // this.$notify({ |
| | | // type: "success", |
| | | // message: "配置成功" |
| | | // }) |
| | | // } else { |
| | | // this.$notify({ |
| | | // type: "error", |
| | | // message: "配置失败" |
| | | // }) |
| | | // } |
| | | // }) |
| | | // } |
| | | // } |
| | | // this.TreeDataPool.fetchTreeData() |
| | | // this.PollData.statisticTaskInfo() |
| | | // } |
| | | }, |
| | | //复制 |
| | | ctrlC() { |