| | |
| | | <div class="s-separate-rules"> |
| | | <div class="ai"> |
| | | <div class="check-area"> |
| | | <div class="ai-select"> |
| | | <div class="ai-select" v-if="TreeDataPool.selectedNode.type !== 'MENU'"> |
| | | <div v-show="cameraType === 'camera'"> |
| | | <span> |
| | | <span class="label">视频分析处理</span> |
| | |
| | | </span> |
| | | </div> |
| | | |
| | | <div v-if="Camera.analytics" class="flex-box" v-show="cameraType === 'camera'"> |
| | | <div v-if="Camera.analytics && isShowPolling === 'show'" class="flex-box" v-show="cameraType === 'camera'"> |
| | | <span class="label">处理方式</span> |
| | | <toggle-button |
| | | :value="Camera.dealWay" |
| | |
| | | |
| | | import { pasteRules } from "@/api/task" |
| | | import { getCameraInfo } from "@/api/camera" |
| | | import { getGB28181CameraInfo } from "@/api/camera" |
| | | import { saveCameraScene } from "@/api/scene" |
| | | |
| | | import { changeRunType } from "@/api/pollConfig" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | isShowPolling: sessionStorage.getItem("isShowPolling"), |
| | | mockSceneData: [], |
| | | loading: false, |
| | | Camera: new VideoRuleData(), |
| | |
| | | }, |
| | | methods: { |
| | | getStatus() { |
| | | getCameraInfo(this.Camera.cameraId).then((res) => { |
| | | let refreshCameraInfo = getCameraInfo |
| | | if (this.Camera.gb28181) { |
| | | refreshCameraInfo = getGB28181CameraInfo |
| | | } |
| | | refreshCameraInfo(this.Camera.cameraId).then((res) => { |
| | | if (res.success) { |
| | | switch (res.data.status) { |
| | | case 0: |
| | |
| | | this.swiperIndex = this.$refs.swiper.swiper.activeIndex |
| | | }, |
| | | drawBaseImg() { |
| | | if (!this.Camera.cameraId) { |
| | | this.$notify({ |
| | | type: "warning", |
| | | message: "请先选择摄像机" |
| | | }) |
| | | return |
| | | } |
| | | if (Array.isArray(this.$refs.canvas)) { |
| | | if (this.$refs.canvas.length > 0) { |
| | | this.$refs.canvas[0].showModal() |
| | |
| | | if (this.Camera.cameraId && this.Camera.cameraId !== undefined) { |
| | | changeRunType({ |
| | | camera_ids: [this.Camera.cameraId], |
| | | run_type: val |
| | | run_type: val, |
| | | isGb: this.Camera.gb28181 |
| | | }).then((rsp) => { |
| | | this.getStatus() |
| | | if (rsp && rsp.success) { |
| | |
| | | //实时、轮询切换 |
| | | changePoll(row) { |
| | | //判断是新增还是更新 |
| | | debugger |
| | | if (this.Camera.cameraId && this.Camera.cameraId !== undefined) { |
| | | if (this.PollData.RealTimeSum < this.PollData.channelTotal) { |
| | | if (row.value) { |
| | |
| | | } else { |
| | | this.Camera.dealWay = false |
| | | } |
| | | debugger |
| | | changeRunType({ |
| | | camera_ids: [this.Camera.cameraId], |
| | | run_type: this.Camera.dealWay ? 1 : 0 |
| | | run_type: this.Camera.dealWay ? 1 : 0, |
| | | isGb: this.Camera.gb28181 |
| | | }).then((rsp) => { |
| | | if (rsp && rsp.success) { |
| | | this.$notify({ |
| | |
| | | } else { |
| | | if (this.Camera.dealWay) { |
| | | this.Camera.dealWay = false |
| | | debugger |
| | | changeRunType({ |
| | | camera_ids: [this.Camera.cameraId], |
| | | run_type: this.Camera.dealWay ? 1 : 0 |