| | |
| | | <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'" |
| | | > |
| | |
| | | :loading="Camera.loading" |
| | | :canvasWidth="canvasWidth" |
| | | :canvasHeight="canvasHeight" |
| | | :isGB28181="Camera.gb28181" |
| | | @fromCanvas="getCanvasData" |
| | | @changeLoading="changeLoading" |
| | | @refresh="refresh" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | isShowPolling: sessionStorage.getItem("isShowPolling"), |
| | | mockSceneData: [], |
| | | loading: false, |
| | | Camera: new VideoRuleData(), |
| | |
| | | }, |
| | | }, |
| | | tableRuleList: [], |
| | | camStatus:'', |
| | | camStatus: "", |
| | | cameraId: "", |
| | | showSysInfo: false, |
| | | showCanvas: true, |
| | |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.mockAsync(); |
| | | this.PollData.statistics(); |
| | | }, |
| | | watch: { |
| | |
| | | switch (res.data.status) { |
| | | case 0: |
| | | this.camStatus = "未配规则"; |
| | | return |
| | | return; |
| | | case 1: |
| | | this.camStatus = "等待轮询处理"; |
| | | return |
| | | return; |
| | | case 2: |
| | | this.camStatus = "正在执行分析处理"; |
| | | return |
| | | return; |
| | | case -1: |
| | | this.camStatus = "其他情况导致未处理"; |
| | | return |
| | | return; |
| | | case -2: |
| | | this.camStatus = "故障导致未处理"; |
| | | return |
| | | return; |
| | | } |
| | | } |
| | | }); |
| | |
| | | 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 { |
| | |
| | | camera_ids: [this.Camera.cameraId], |
| | | run_type: val, |
| | | }).then((rsp) => { |
| | | this.getStatus() |
| | | this.getStatus(); |
| | | if (rsp && rsp.success) { |
| | | this.$notify({ |
| | | type: "success", |