| | |
| | | </div> |
| | | |
| | | <div v-if="Camera.analytics" class="flex-box" v-show="cameraType === 'camera'"> |
| | | <span class="label">分辨率</span> |
| | | <el-select |
| | | v-model="Camera.selectResolution" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 134px; |
| | | margin-left:10px;" |
| | | > |
| | | <el-option |
| | | v-for="item in Camera.resolutionOption" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | <span |
| | | class="label" |
| | | >分辨率: {{(Camera.camearInfo.resolution_width == 0 || Camera.camearInfo.resolution_height == 0) ? '本机分辨率': `${Camera.camearInfo.resolution_width} * ${Camera.camearInfo.resolution_height}` }}</span> |
| | | </div> |
| | | |
| | | <div v-if="Camera.analytics" class="flex-box"> |
| | | <span class="label">智能计算节点: {{ Camera.runServerName}}</span> |
| | | <span class="label">SmartAI节点: {{ Camera.runServerName}}</span> |
| | | </div> |
| | | |
| | | <div v-if="Camera.analytics" class="flex-box"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | //import { timeSilderData } from "@/mockData/timeSilder"; |
| | | import { savePolygon } from "@/api/polygon"; |
| | | |
| | | import { |
| | |
| | | |
| | | import { |
| | | saveCameraScene, |
| | | getCameraSceneRule, |
| | | } from '@/api/scene' |
| | | |
| | | import { changeRunType } from "@/api/pollConfig"; |
| | |
| | | |
| | | import TimeSlider from "./TimeSlider"; |
| | | import polygonCanvas from "@/components/canvas"; |
| | | //import Sysinfo from "./SystemInfo"; |
| | | import Sysinfo from "@/components/subComponents/SystemInfo"; |
| | | import SceneRule from "./SceneRule"; |
| | | import SlideScene from "./scene/SlideScene"; |
| | | import { duration } from 'moment'; |
| | | |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | prevEl: ".swiper-local-prev" |
| | | } |
| | | }, |
| | | swiperOption: { |
| | | slidesPerView: 5, |
| | | spaceBetween: 8, |
| | | pagination: { |
| | | el: ".swiper-pagination", |
| | | clickable: true |
| | | }, |
| | | navigation: { |
| | | nextEl: ".swiper-next-border", |
| | | prevEl: ".swiper-pre-border" |
| | | } |
| | | }, |
| | | // swiperOption: { |
| | | // slidesPerView: 5, |
| | | // spaceBetween: 8, |
| | | // pagination: { |
| | | // el: ".swiper-pagination", |
| | | // clickable: true |
| | | // }, |
| | | // navigation: { |
| | | // nextEl: ".swiper-next-border", |
| | | // prevEl: ".swiper-pre-border" |
| | | // } |
| | | // }, |
| | | tableRuleList: [], |
| | | |
| | | cameraId: "", |
| | | activeTaskIndex: 0, |
| | | activeTaskId: "", |
| | | booleanValue: false, |
| | | showSysInfo: false, |
| | | showCanvas: true, |
| | | canvasWidth: 576, |
| | |
| | | this.stackFilesSize = 5; |
| | | this.stackId = n; |
| | | if (this.stackId) { |
| | | // console.log('getStackFiles') |
| | | this.swipercanvasData = []; |
| | | this.getStackFiles() |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | prevClick() { |
| | | // console.log(this.swiperIndex) |
| | | // console.log(this.$refs.swiper.swiper.activeIndex) |
| | | if (this.swiperIndex == 0) { |
| | | // console.log('本次分页的第一条') |
| | | //请求上一页 |
| | | if (this.stackFilesPage > 1) { |
| | | this.stackFilesPage--; |
| | | this.getStackFiles(true); |
| | |
| | | }, |
| | | nextClick() { |
| | | if (this.swiperIndex == this.swipercanvasData.length - 1) { |
| | | // console.log('最后一张,加载更多') |
| | | //请求下一页 |
| | | this.stackFilesPage++; |
| | | this.getStackFiles(true); |
| | | } |
| | |
| | | } |
| | | } |
| | | } else { |
| | | // console.log(this.swipercanvasData) |
| | | this.$message({ |
| | | type: 'error', |
| | | message: '数据请求失败,请稍后重试!' |
| | |
| | | } |
| | | this.getStackFileLoading = false; |
| | | }).catch(e => { |
| | | // console.log(e); |
| | | this.getStackFileLoading = false; |
| | | }); |
| | | }, |
| | |
| | | polyon.camera_id = this.Camera.cameraId; |
| | | savePolygon(polyon).then(rsp => { |
| | | this.Camera.getPolygon(); |
| | | this.Camera.getCameraTask(); |
| | | //this.Camera.getCameraTask(); |
| | | }); |
| | | }, |
| | | refresh(url) { |
| | |
| | | }, |
| | | changeLoading(params) { |
| | | this.loading = params |
| | | // console.log(this.loading,'changeLoading',params) |
| | | }, |
| | | //是否进行视频分析处理 |
| | | pollEnable(row) { |
| | |
| | | val = -1 |
| | | } |
| | | if (this.Camera.cameraId && this.Camera.cameraId !== undefined) { |
| | | debugger |
| | | changeRunType({ camera_ids: [this.Camera.cameraId], run_type: val }).then( |
| | | rsp => { |
| | | if (rsp && rsp.success) { |
| | |
| | | message: "配置失败" |
| | | }); |
| | | } |
| | | // this.selectCamera(this.TreeDataPool.selectedNode) |
| | | this.TreeDataPool.fetchTreeData(); |
| | | } |
| | | ); |
| | | } |
| | | this.TreeDataPool.fetchTreeData(); |
| | | this.PollData.statisticTaskInfo(); |
| | | }, |
| | | //实时、轮询切换 |
| | | 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 }).then( |
| | | rsp => { |
| | | if (rsp && rsp.success) { |
| | |
| | | } else { |
| | | if (this.Camera.dealWay) { |
| | | this.Camera.dealWay = false |
| | | debugger |
| | | changeRunType({ camera_ids: [this.Camera.cameraId], run_type: this.Camera.dealWay ? 1 : 0 }).then( |
| | | rsp => { |
| | | if (rsp && rsp.success) { |
| | |
| | | sourceId: this.TreeDataPool.ctrlCameraId, |
| | | targetIds: [this.Camera.cameraId] |
| | | }).then((res) => { |
| | | // console.log(res,'复制算法') |
| | | if (res && res.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | |
| | | }) |
| | | } |
| | | }).catch(err => { |
| | | // console.log(err,'复制算法报错!') |
| | | this.$notify({ |
| | | type: "error", |
| | | message: "粘贴算法失败!" |
| | |
| | | </script> |
| | | <style lang="scss"> |
| | | .el-message--info .el-message__content { |
| | | color: #999; |
| | | color: #999 !important; |
| | | } |
| | | .swiper-container { |
| | | margin-left: auto; |