| | |
| | | * @param {*} params 包含参数 range 参数值参考 116.292735,40.0717; 116.476708, 40.083625; 116.476708, 40.083625; 116.292735, 40.0717 |
| | | * @returns |
| | | */ |
| | | export const getRegionList = (page = 1, count = 15, params) => { |
| | | export const getRegionList = (page = 1, count = 15, range) => { |
| | | return request({ |
| | | url: '/device/query/SpatialQueryList', |
| | | method: 'get', |
| | | params: params |
| | | params: { |
| | | page, |
| | | count, |
| | | range |
| | | } |
| | | }) |
| | | } |
| | |
| | | width: 400px; |
| | | height: calc(100% - 80px); |
| | | background: $bg-color; |
| | | z-index: 99; |
| | | z-index: 90; |
| | | } |
| | | |
| | | .right-container { |
| | |
| | | width: 400px; |
| | | height: calc(100% - 80px); |
| | | background: $bg-color; |
| | | z-index: 99; |
| | | z-index: 90; |
| | | } |
| | | |
| | | .center-container { |
| | |
| | | left: 50%; |
| | | bottom: 320px; |
| | | transform: translate(-50%, 0); |
| | | z-index: 99; |
| | | z-index: 90; |
| | | |
| | | .layers-control-btn { |
| | | display: flex; |
| | |
| | | |
| | | <!-- 菜单导航 --> |
| | | <div class="menu-list"> |
| | | <div @mouseenter="item.childrenFlag = true" @mouseleave="item.childrenFlag = false" class="nav-list" |
| | | :class="{ on: currentUrl.indexOf(item.path) != -1 }" @click="goToPath(item)" |
| | | v-for="(item, index) in menuList" :key="index"> |
| | | <div |
| | | @mouseenter="item.childrenFlag = true" |
| | | @mouseleave="item.childrenFlag = false" |
| | | class="nav-list" |
| | | :class="{ on: currentUrl.indexOf(item.path) != -1 }" |
| | | @click="goToPath(item)" |
| | | v-for="(item, index) in menuList" |
| | | :key="index" |
| | | > |
| | | {{ item.menuName }} |
| | | <div class="sub-nav-list" v-show="item.children && item.childrenFlag"> |
| | | <div v-for="(subItem, subIndex) in item.children" :key="subIndex" @click="goToPath(subItem)"> |
| | | {{ subItem.menuName }} |
| | | </div> |
| | | <div |
| | | v-for="(subItem, subIndex) in item.children" |
| | | :key="subIndex" |
| | | @click="goToPath(subItem)" |
| | | >{{ subItem.menuName }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <mapBox ref="modalForm" /> |
| | | |
| | | <!-- 主体内容区域 --> |
| | | <div class="main-content" id="MainContent" |
| | | :class="{ 'spread': leftShow && show, 'take-back': leftShow && !show }"> |
| | | <div |
| | | class="main-content" |
| | | id="MainContent" |
| | | :class="{ 'spread': leftShow && show, 'take-back': leftShow && !show }" |
| | | > |
| | | <router-view ref="target-name"></router-view> |
| | | </div> |
| | | |
| | | <el-button v-show="leftShow" class="flexible-btn" |
| | | <el-button |
| | | v-show="leftShow" |
| | | class="flexible-btn" |
| | | :class="{ 'spread': leftShow && show, 'take-back': leftShow && !show }" |
| | | :icon="show ? 'el-icon-arrow-left' : 'el-icon-arrow-right'" id="FlexibleBtn" type="primary" |
| | | @click="flexibelClick"></el-button> |
| | | :icon="show ? 'el-icon-arrow-left' : 'el-icon-arrow-right'" |
| | | id="FlexibleBtn" |
| | | type="primary" |
| | | @click="flexibelClick" |
| | | ></el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | overflow: hidden; |
| | | letter-spacing: 6px; |
| | | |
| | | &>img { |
| | | & > img { |
| | | // width: 100%; |
| | | height: 80%; |
| | | margin: 0 10px 0 10px; |
| | |
| | | top: 60px; |
| | | width: 100%; |
| | | cursor: default; |
| | | z-index: 999; |
| | | |
| | | div { |
| | | height: 36px; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .user-infor {} |
| | | } |
| | | |
| | | .main-container { |
| | |
| | | <button @click="searchClick" class="el-icon-search"></button> |
| | | </div> |
| | | |
| | | <div class="draw-btn"> |
| | | <el-button type="primary" size="mini" @click="draw('polygon')">绘制面</el-button> |
| | | <el-button type="primary" size="mini" @click="draw('polyline')">绘制线</el-button> |
| | | <el-button type="primary" size="mini" @click="removeDrawLayer">清除</el-button> |
| | | <el-button type="primary" size="mini">保存</el-button> |
| | | </div> |
| | | <div class="range-input" v-show="inputpopup"> |
| | | <div class="close" @click="closeRangeInput"></div> |
| | | <h3>请输入距离</h3> |
| | | <input type="text" v-model="range" /> |
| | | <button @click="changeRange" class="btn">确定</button> |
| | | </div> |
| | | |
| | | <div v-show="true" class="search-val-box"> |
| | | <div |
| | | @click="searchVlaClick(item)" |
| | |
| | | import EntityDraw from "@/utils/EntityDraw.js" |
| | | import { listQuery, accurateSearch } from "@/utils/search.js" |
| | | import monitoringList from '@/assets/data/monitoring.js' |
| | | import { getVideoList, getDevices } from '@/api/video/index.js' |
| | | import { getVideoList, getDevices, getRegionList } from '@/api/video/index.js' |
| | | import flvjs from 'flv.js' |
| | | |
| | | let graphicLayer = null |
| | |
| | | searchValBoxShow: false, |
| | | boxShow: true, |
| | | flvPlayer: null, |
| | | range: 100, |
| | | inputpopup: false, |
| | | changeBtn: false, |
| | | } |
| | | }, |
| | | |
| | |
| | | this.monitoringList = [item] |
| | | }, |
| | | |
| | | draw (type) { |
| | | if (type == 'polyline') { |
| | | this.inputpopup = true |
| | | } else { |
| | | this.inputpopup = false |
| | | } |
| | | const that = this |
| | | graphicLayer.activate(type, (lastEventData) => { |
| | | console.log('数据更新', JSON.stringify(lastEventData)) |
| | | this.getRegionList(JSON.stringify(lastEventData)) |
| | | }) |
| | | |
| | | }, |
| | | |
| | | removeDrawLayer () { |
| | | this.inputpopup = false |
| | | graphicLayer.clearLayer() |
| | | }, |
| | | |
| | | // 修改范围 |
| | | setRegion (range) { |
| | | graphicLayer.addPolyLineGon(range, (lastEventData) => { |
| | | console.log('数据更新', JSON.stringify(lastEventData)) |
| | | }) |
| | | }, |
| | | |
| | | // 大小重置 |
| | | boxResize (val) { |
| | | this.boxShow = val |
| | | }, |
| | | |
| | | changeRange () { |
| | | this.setRegion(this.range) |
| | | }, |
| | | |
| | | closeRangeInput () { |
| | | this.inputpopup = false |
| | | }, |
| | | |
| | | getRegionList (data) { |
| | | const chinaSouth = '77.100744,34.645318;136.443312,46.379954;116.241876,12.205314;77.100744,34.645318;'//范围内有两个监控 |
| | | let positionStr = '' |
| | | JSON.parse(data).forEach(item => { |
| | | positionStr = positionStr + item.lng + ',' + item.lat + ';' |
| | | }) |
| | | positionStr = positionStr + JSON.parse(data)[0].lng + ',' + JSON.parse(data)[0].lat + ';' |
| | | // console.log(11111, positionStr) |
| | | getRegionList(1, 15, positionStr).then(res => { |
| | | console.log('1111111', res) |
| | | }) |
| | | } |
| | | }, |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | .draw-btn { |
| | | margin: 8px; |
| | | margin-top: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | height: 26px; |
| | | |
| | | .el-button { |
| | | flex: 1; |
| | | } |
| | | } |
| | | |
| | | .range-input { |
| | | position: absolute; |
| | | right: -190px; |
| | | top: 20px; |
| | | width: 180px; |
| | | height: 100px; |
| | | background-color: $bg-color; |
| | | input { |
| | | outline: none; |
| | | border: 1px solid #005ca9; |
| | | background-color: transparent; |
| | | width: 160px; |
| | | height: 30px; |
| | | margin-top: 10px; |
| | | color: #fff; |
| | | padding-left: 6px; |
| | | } |
| | | .btn { |
| | | width: 60px; |
| | | height: 30px; |
| | | background-color: #65b1ff; |
| | | color: #fff; |
| | | border-radius: 4px; |
| | | cursor: pointer; |
| | | margin-top: 10px; |
| | | } |
| | | .close { |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | width: 20px; |
| | | height: 10px; |
| | | } |
| | | .close::before { |
| | | content: '\e6db'; |
| | | font-family: element-icons; |
| | | font-size: 18px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |
| | | .list-show { |
| | | flex: 1; |
| | | |
| | |
| | | <button @click="searchClick" class="el-icon-search"></button> |
| | | </div> |
| | | |
| | | <div class="draw-btn"> |
| | | <el-button type="primary" size="mini" @click="draw('polygon')">绘制面</el-button> |
| | | <el-button type="primary" size="mini" @click="draw('polyline')">绘制线</el-button> |
| | | <el-button type="primary" size="mini" @click="removeDrawLayer">清除</el-button> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | @click="inputpopup = true" |
| | | v-show="changeBtn" |
| | | >修改范围</el-button> |
| | | </div> |
| | | <div class="range-input" v-show="changeBtn && inputpopup"> |
| | | <h3>请输入距离</h3> |
| | | <input type="text" v-model="range" /> |
| | | <button @click="changeRange" class="btn">确定</button> |
| | | </div> |
| | | |
| | | <div v-show="true" class="search-val-box"> |
| | | <div |
| | | @click="searchVlaClick(item)" |
| | |
| | | searchValBoxShow: false, |
| | | boxShow: true, |
| | | flvPlayer: null, |
| | | range: 5000, |
| | | inputpopup: false, |
| | | changeBtn: false, |
| | | } |
| | | }, |
| | | |
| | |
| | | this.monitoringList = [item] |
| | | }, |
| | | |
| | | draw (type) { |
| | | if (type == 'polyline') { |
| | | this.inputpopup = false |
| | | this.changeBtn = true |
| | | } else { |
| | | this.changeBtn = false |
| | | } |
| | | const that = this |
| | | graphicLayer.activate(type, (lastEventData) => { |
| | | console.log('数据更新', JSON.stringify(lastEventData)) |
| | | }) |
| | | |
| | | }, |
| | | |
| | | removeDrawLayer () { |
| | | this.changeBtn = false |
| | | graphicLayer.clearLayer() |
| | | }, |
| | | |
| | | // 修改范围 |
| | | setRegion (range) { |
| | | graphicLayer.addPolyLineGon(range, (lastEventData) => { |
| | | console.log('数据更新', JSON.stringify(lastEventData)) |
| | | }) |
| | | }, |
| | | |
| | | // 大小重置 |
| | | boxResize (val) { |
| | | this.boxShow = val |
| | | }, |
| | | |
| | | changeRange () { |
| | | this.setRegion(this.range) |
| | | this.inputpopup = false |
| | | } |
| | | }, |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | .draw-btn { |
| | | margin: 8px; |
| | | margin-top: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | height: 26px; |
| | | |
| | | .el-button { |
| | | flex: 1; |
| | | } |
| | | } |
| | | |
| | | .range-input { |
| | | position: absolute; |
| | | right: -190px; |
| | | top: 20px; |
| | | width: 180px; |
| | | height: 100px; |
| | | background-color: $bg-color; |
| | | input { |
| | | outline: none; |
| | | border: 1px solid #005ca9; |
| | | background-color: transparent; |
| | | width: 160px; |
| | | height: 30px; |
| | | margin-top: 10px; |
| | | color: #fff; |
| | | padding-left: 6px; |
| | | } |
| | | .btn { |
| | | width: 60px; |
| | | height: 30px; |
| | | background-color: #65b1ff; |
| | | color: #fff; |
| | | border-radius: 4px; |
| | | cursor: pointer; |
| | | margin-top: 10px; |
| | | } |
| | | } |
| | | |
| | | .list-show { |
| | | flex: 1; |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | </style> |