| | |
| | | <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> |
| | |
| | | </div> |
| | | |
| | | <div |
| | | v-if="Camera.analytics" |
| | | v-if="Camera.analytics && isShowPolling === 'show'" |
| | | class="flex-box" |
| | | v-show="cameraType === 'camera'" |
| | | > |
| | |
| | | @change="changePoll" |
| | | /> |
| | | </div> |
| | | |
| | | <div |
| | | v-if="Camera.analytics" |
| | | class="flex-box" |
| | | v-show="cameraType === 'camera'" |
| | | > |
| | | <span class="label">处理状态: {{ camStatus }}</span> |
| | | </div> |
| | | <div |
| | | v-if="Camera.analytics" |
| | | class="flex-box" |
| | |
| | | :loading="Camera.loading" |
| | | :canvasWidth="canvasWidth" |
| | | :canvasHeight="canvasHeight" |
| | | :isGB28181="Camera.gb28181" |
| | | @fromCanvas="getCanvasData" |
| | | @changeLoading="changeLoading" |
| | | @refresh="refresh" |
| | |
| | | import { savePolygon } from "@/api/polygon"; |
| | | |
| | | import { pasteRules } from "@/api/task"; |
| | | |
| | | import { getCameraInfo } 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(), |
| | |
| | | prevEl: ".swiper-local-prev", |
| | | }, |
| | | }, |
| | | // swiperOption: { |
| | | // slidesPerView: 5, |
| | | // spaceBetween: 8, |
| | | // pagination: { |
| | | // el: ".swiper-pagination", |
| | | // clickable: true |
| | | // }, |
| | | // navigation: { |
| | | // nextEl: ".swiper-next-border", |
| | | // prevEl: ".swiper-pre-border" |
| | | // } |
| | | // }, |
| | | tableRuleList: [], |
| | | |
| | | camStatus: "", |
| | | cameraId: "", |
| | | showSysInfo: false, |
| | | showCanvas: true, |
| | |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.mockAsync(); |
| | | this.PollData.statistics(); |
| | | }, |
| | | watch: { |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | getStatus() { |
| | | getCameraInfo(this.Camera.cameraId).then((res) => { |
| | | if (res.success) { |
| | | switch (res.data.status) { |
| | | case 0: |
| | | this.camStatus = "未配规则"; |
| | | return; |
| | | case 1: |
| | | this.camStatus = "等待轮询处理"; |
| | | return; |
| | | case 2: |
| | | this.camStatus = "正在执行分析处理"; |
| | | return; |
| | | case -1: |
| | | this.camStatus = "其他情况导致未处理"; |
| | | return; |
| | | case -2: |
| | | this.camStatus = "故障导致未处理"; |
| | | return; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | prevClick() { |
| | | if (this.swiperIndex == 0) { |
| | | if (this.stackFilesPage > 1) { |
| | |
| | | swiperSlideChange() { |
| | | this.swiperIndex = this.$refs.swiper.swiper.activeIndex; |
| | | }, |
| | | mockAsync() { |
| | | setTimeout(() => { |
| | | this.mockSceneData = [ |
| | | { |
| | | scenename: "name1", |
| | | id: 1, |
| | | icon: ["iconrenlianjiance", "icongetijingzhi"], |
| | | }, |
| | | { scenename: "name2", id: 2, icon: ["iconchouyan-copy"] }, |
| | | { |
| | | scenename: "name3", |
| | | id: 3, |
| | | icon: [ |
| | | "iconrenshukouzhao", |
| | | "iconchouyan-copy", |
| | | "iconrenlianjiance", |
| | | "icongetijingzhi", |
| | | ], |
| | | }, |
| | | { |
| | | scenename: "name4", |
| | | id: 4, |
| | | icon: ["iconchouyan-copy", "iconrenlianjiance", "icongetijingzhi"], |
| | | }, |
| | | { scenename: "name5", id: 5, icon: ["icongetijingzhi"] }, |
| | | { |
| | | scenename: "name6", |
| | | id: 6, |
| | | icon: ["iconrenshukouzhao", "icongetijingzhi"], |
| | | }, |
| | | { scenename: "name7", id: 7, icon: ["iconrenlianjiance"] }, |
| | | ]; |
| | | }, 3000); |
| | | }, |
| | | 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(); |
| | |
| | | async initCameraData(id, type) { |
| | | this.Camera = new VideoRuleData(); |
| | | |
| | | console.log("121212"); |
| | | console.log(type); |
| | | |
| | | if (id && id !== "") { |
| | | this.loading = false; |
| | | this.Camera.cameraId = id; |
| | | this.Camera.gb28181 = type === 1; |
| | | if (type === 1) { |
| | | await this.Camera.update(true); |
| | | } else { |
| | |
| | | val = -1; |
| | | } |
| | | if (this.Camera.cameraId && this.Camera.cameraId !== undefined) { |
| | | debugger; |
| | | changeRunType({ |
| | | camera_ids: [this.Camera.cameraId], |
| | | run_type: val, |
| | | }).then((rsp) => { |
| | | this.getStatus(); |
| | | if (rsp && rsp.success) { |
| | | this.$notify({ |
| | | type: "success", |