| | |
| | | "eslint": "^5.16.0", |
| | | "eslint-plugin-prettier": "^3.1.0", |
| | | "eslint-plugin-vue": "^5.0.0", |
| | | "parcel-bundler": "^1.12.5", |
| | | "prettier": "^1.18.2", |
| | | "sass": "^1.18.0", |
| | | "sass-loader": "^7.1.0", |
| | |
| | | <div class="video">1</div> |
| | | |
| | | <div class="control"> |
| | | <span class="icon iconfont"></span> |
| | | <span class="icon iconfont mid"></span> |
| | | <span class="icon iconfont"></span> |
| | | <img src="/images/InternetData/ææ.png" /> |
| | | <img src="/images/InternetData/声é³.png" class="mid" /> |
| | | <img src="/images/InternetData/è¯ç.png" /> |
| | | </div> |
| | | |
| | | <div class="close el-icon-close" @click="close"></div> |
| | |
| | | .control { |
| | | margin-top: 50px; |
| | | |
| | | .icon { |
| | | font-size: 37px; |
| | | img { |
| | | width: 37px; |
| | | height: 37px; |
| | | } |
| | | |
| | | .mid { |
| | |
| | | |
| | | <!-- æºè½å®å
¨å¸½ --> |
| | | <helmet |
| | | v-if="activeTab === 0" |
| | | /> |
| | | |
| | | </div> |
| | |
| | | currentPage:1, |
| | | tableData: [ |
| | | {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98", |
| | | longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | longitude:120.123123, latitude:120.123123,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | isSend:false,istele:false |
| | | }, |
| | | {code: "A123123123123", elec:29.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98", |
| | | longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | longitude:120.123123, latitude:120.123123,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | isSend:false,istele:false |
| | | }, |
| | | {code: "A123123123123", elec:0, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98", |
| | | longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | longitude:120.123123, latitude:120.123123,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | isSend:false,istele:false |
| | | }, |
| | | {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98", |
| | | longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | longitude:120.123123, latitude:120.123123,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | isSend:false,istele:false |
| | | }, |
| | | {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98", |
| | | longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | longitude:120.123123, latitude:120.123123,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | isSend:false,istele:false |
| | | }, |
| | | {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98", |
| | | longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | longitude:120.123123, latitude:120.123123,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | isSend:false,istele:false |
| | | }, |
| | | {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98", |
| | | longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | longitude:120.123123, latitude:120.123123,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | isSend:false,istele:false |
| | | }, |
| | | {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98", |
| | | longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | longitude:120.123123, latitude:120.123123,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | isSend:false,istele:false |
| | | }, |
| | | {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98", |
| | | longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | longitude:120.123123, latitude:120.123123,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | isSend:false,istele:false |
| | | }, |
| | | {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98", |
| | | longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | longitude:120.123123, latitude:120.123123,height:"11.21",time:"0.23.45",positon:"ååå®ä½", |
| | | isSend:false,istele:false |
| | | }, |
| | | ], |
| | |
| | | <div class="number" :style="colorStyle">{{number}}</div> |
| | | <div class="info">{{info}}</div> |
| | | </div> |
| | | <div class="card-right icon iconfont"></div> |
| | | <img class="card-right" :src="src" alt=""> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | require: true |
| | | }, |
| | | color: { |
| | | require: true |
| | | }, |
| | | src: { |
| | | require: true |
| | | } |
| | | }, |
| | |
| | | } |
| | | |
| | | .card-right { |
| | | font-size: 58px; |
| | | color: var(--color); |
| | | width: 58px; |
| | | height: 58px; |
| | | |
| | | } |
| | | } |
| | |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: ['1', '2021-09-02 00:00', '1', '2021-09-02 00:00', '1', '2021-09-02 00:00', '1'], |
| | | data: ['', '2021-09-02 00:00', '', '2021-09-02 00:00', '', '2021-09-02 00:00', ''], |
| | | axisLine: { |
| | | show: false //䏿¾ç¤ºåæ 轴轴线 |
| | | }, |
| | |
| | | }, |
| | | spiltLine:{ |
| | | show: false //æ³è¦ä¸æ¾ç¤ºç½æ ¼çº¿ï¼æ¹ä¸ºfalse |
| | | }, |
| | | axisLabel:{ |
| | | interval: 0 |
| | | } |
| | | }, |
| | | yAxis: { |
| | |
| | | :key="index" |
| | | :number="item.number" |
| | | :info="item.info" |
| | | :icon="item.icon" |
| | | :color="item.color" |
| | | :src="cardImage[index]" |
| | | /> |
| | | |
| | | <helemetEchart /> |
| | |
| | | data (){ |
| | | return { |
| | | cardData: [ |
| | | {number:233,info:"è®¾å¤æ»é",icon:"\ue743",color:"#4E94FF"}, |
| | | {number:34,info:"æ¬ææ°å¢",icon:"\ue743",color:"#FFAA44"}, |
| | | {number:45,info:"仿¥é¢è¦",icon:"\ue743",color:"#FF6464"}, |
| | | {number:233,info:"è®¾å¤æ»é",color:"#4E94FF"}, |
| | | {number:34,info:"æ¬ææ°å¢",color:"#FFAA44"}, |
| | | {number:45,info:"仿¥é¢è¦",color:"#FF6464"}, |
| | | ], |
| | | cardImage: [ |
| | | '/images/InternetDevice/Group 441.png', |
| | | '/images/InternetDevice/Group 367.png', |
| | | '/images/InternetDevice/Group 368.png', |
| | | ] |
| | | } |
| | | }, |
New file |
| | |
| | | <template> |
| | | <div class="process-warn"> |
| | | <div class="close el-icon-close" @click="close"></div> |
| | | <span class="el-icon-question"></span> |
| | | <div class="title">确认æç¤º</div> |
| | | <div class="des">请确å®é¢è¦æ°æ®æ¯å¦å·²å¤çï¼</div> |
| | | <div class="radio"> |
| | | <el-radio v-model="radio" :label="false">æªå¤ç</el-radio> |
| | | <el-radio v-model="radio" :label="true">å·²å¤ç</el-radio> |
| | | </div> |
| | | <div class="btn"> |
| | | <div class="cancel" @click="close">åæ¶</div> |
| | | <div class="save" @click="save">ç¡®å®</div> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props :{ |
| | | warnObj :{ |
| | | warnObj :true |
| | | } |
| | | }, |
| | | data (){ |
| | | return { |
| | | radio : false |
| | | } |
| | | }, |
| | | methods:{ |
| | | close (){ |
| | | this.$emit("close",this.warnObj) |
| | | }, |
| | | save (){ |
| | | if (this.radio) { |
| | | this.$emit("save",this.warnObj) |
| | | } |
| | | this.$emit("close",this.warnObj) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .process-warn { |
| | | position: fixed; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items:center; |
| | | z-index: 2; |
| | | padding: 48px 30px 30px 30px; |
| | | |
| | | width: 420px; |
| | | height: 274px; |
| | | left: 50%; |
| | | top: 50%; |
| | | margin-top: -15%; |
| | | margin-left: -15%; |
| | | |
| | | background: #FFFFFF; |
| | | border-radius: 8px; |
| | | color: #4F4F4F; |
| | | |
| | | span { |
| | | font-size: 40px; |
| | | color:#FFAA44; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .close { |
| | | position: absolute; |
| | | top: 12px; |
| | | right: 12px; |
| | | font-size: 12px; |
| | | font-weight: 700; |
| | | } |
| | | |
| | | .title { |
| | | margin: 6px 0 4px 0; |
| | | font-weight: 700; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .des { |
| | | margin-bottom: 10px; |
| | | font-size: 14px; |
| | | color: #828282; |
| | | } |
| | | |
| | | label ::v-deep .el-radio__inner:hover { |
| | | border-color: #FFAA44; |
| | | } |
| | | |
| | | label.is-checked { |
| | | ::v-deep .el-radio__inner { |
| | | border-color: #FFAA44; |
| | | background: #FFAA44; |
| | | } |
| | | ::v-deep .el-radio__label { |
| | | color: #FFAA44; |
| | | } |
| | | } |
| | | |
| | | .btn { |
| | | display: flex; |
| | | margin-top: 34px; |
| | | justify-content: space-between; |
| | | width: 100%; |
| | | } |
| | | |
| | | .cancel { |
| | | width: 175px; |
| | | height: 40px; |
| | | border: 1px solid #E0E0E0; |
| | | box-sizing: border-box; |
| | | border-radius: 25px; |
| | | font-size: 16px; |
| | | line-height: 40px; |
| | | color: #333; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .save { |
| | | width: 175px; |
| | | height: 40px; |
| | | background: #11AA66; |
| | | border-radius: 25px; |
| | | font-size: 16px; |
| | | line-height: 40px; |
| | | color: #fff; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <div class="warn-description"> |
| | | <div class="code"><span>设å¤ç¼ç : </span>{{warnDes.code}}</div> |
| | | <div class="location" v-if="warnDes.location">{{warnDes.location}}</div> |
| | | <div class="location" v-if="warnDes.location"><span>ä½ç½®: </span>{{warnDes.location}}</div> |
| | | <div class="time"><span>æ¶é´: </span>{{warnDes.time}}</div> |
| | | <div class="position" v-if="warnDes.longitude"><span>ç»åº¦: </span>{{warnDes.longitude}} <span>纬度: </span>{{warnDes.latitude}}</div> |
| | | <div class="warnIcon" v-if="warnDes.warn"><span class="icon iconfont"></span> {{warnDes.warn}}</div> |
| | |
| | | <!-- å³ä¾§å
容 --> |
| | | <div class="right_content"> |
| | | <!-- å®å
¨å¸½è®¾å¤ --> |
| | | <helemetEquipment v-if="activeTab === 0"/> |
| | | <helemetEquipment /> |
| | | |
| | | </div> |
| | | </div> |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | * { |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .internert-equipment { |
| | | display: flex; |
| | |
| | | } |
| | | } |
| | | </style> |
| | | |
| | | <style > |
| | | * { |
| | | box-sizing: border-box; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="elec-module"> |
| | | <div class="title"></div> |
| | | <div class="title">çµéè¿ä½é¢è¦</div> |
| | | |
| | | <div class="elec-item" |
| | | v-for="(item,index) in warnArr" |
| | | :key="index"> |
| | | <div class="left"> |
| | | <img src="/images/InternetDevice/çµæ± .png" alt=""> |
| | | <div class="colobox" |
| | | :style="{'width':`${item.elec/100*29}px`, |
| | | 'background-color':`${item.elec >= 30 ? 'rgb(37, 174, 109)' : 'rgb(255, 100, 100)'}`}"></div> |
| | | <div class="elec">çµé: {{item.elec}}</div> |
| | | </div> |
| | | <warnDescription |
| | | :warnDes="{code:item.code, |
| | | time:item.time, |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | |
| | | .elec-module { |
| | | padding: 20px; |
| | | width: 280px; |
| | | height: 292px; |
| | | background-color: #fff; |
| | | box-shadow: 0px 2px 10px rgba(141, 164, 187, 0.25); |
| | | border-radius: 15px; |
| | | overflow-y: scroll; |
| | | |
| | | .title { |
| | | margin-bottom: 10px; |
| | | font-size: 14px; |
| | | font-weight: 700; |
| | | text-align: left; |
| | | } |
| | | |
| | | .elec-item { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 4px; |
| | | padding: 20px 5px 20px 5px; |
| | | width: 240px; |
| | | height: 78px; |
| | | background: #F9FAFC; |
| | | border-radius: 10px; |
| | | |
| | | .elec { |
| | | font-weight: 700; |
| | | } |
| | | |
| | | .left { |
| | | position: relative; |
| | | img { |
| | | width: 40px; |
| | | height: 20px; |
| | | } |
| | | |
| | | .colobox { |
| | | position: absolute; |
| | | top: 2px; |
| | | left: 10px; |
| | | width: 29px; |
| | | height: 15px; |
| | | border-radius: 2px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="history-module"> |
| | | <div class="title"></div> |
| | | <div class="title">å岿¥è¦</div> |
| | | <div class="history-item" |
| | | v-for="(item,index) in warnArr" |
| | | v-for="(item,index) in warnArrProcess" |
| | | :key="index"> |
| | | <warnDescription |
| | | :warnDes="{code:item.code, |
| | | time:item.time, |
| | | warn:item.warn}"/> |
| | | <div |
| | | class="button" |
| | | @click="process(item)">å¤ç</div> |
| | | </div> |
| | | <processWarn |
| | | v-if="activeWarn" |
| | | :warnObj="activeWarn" |
| | | @close="close" |
| | | @save="save"/> |
| | | <div class="mask" v-if="activeWarn"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import warnDescription from '@/pages/internetEquipment/components/warnDescription' |
| | | import processWarn from '@/pages/internetEquipment/components/processWarn' |
| | | export default { |
| | | data (){ |
| | | return { |
| | | activeWarn:null |
| | | } |
| | | }, |
| | | props :{ |
| | | warnArr : { |
| | | type: Array |
| | | } |
| | | }, |
| | | components :{ |
| | | warnDescription |
| | | warnDescription, |
| | | processWarn |
| | | }, |
| | | computed :{ |
| | | warnArrProcess(){ |
| | | return this.warnArr.filter(item=>!item.processed) |
| | | } |
| | | }, |
| | | methods: { |
| | | process(item){ |
| | | this.activeWarn = item |
| | | }, |
| | | close(){ |
| | | this.activeWarn =null |
| | | }, |
| | | save(item) { |
| | | this.$set(item,'processed',true) |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .history-module { |
| | | padding: 20px; |
| | | width: 280px; |
| | | height: 292px; |
| | | background-color: #fff; |
| | | box-shadow: 0px 2px 10px rgba(141, 164, 187, 0.25); |
| | | border-radius: 15px; |
| | | overflow-y: scroll; |
| | | |
| | | .title { |
| | | margin-bottom: 10px; |
| | | font-size: 14px; |
| | | font-weight: 700; |
| | | text-align: left; |
| | | } |
| | | |
| | | .history-item { |
| | | display: flex; |
| | | width: 240px; |
| | | height: 74px; |
| | | margin-bottom: 4px; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | background: #F9FAFC; |
| | | border-radius: 10px; |
| | | padding: 0 10px; |
| | | .button { |
| | | width: 54px; |
| | | height: 20px; |
| | | background: #CFEEE0; |
| | | border-radius: 30px; |
| | | font-size: 12px; |
| | | line-height: 20px; |
| | | color: #11AA66; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |
| | | .mask { |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | text-align: center; |
| | | z-index: 1; |
| | | background-color: black; |
| | | opacity: .5; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="map-index"> |
| | | |
| | | <div id="map-index"> |
| | | <div class="control"> |
| | | <div class="location icon iconfont" @click="location"></div> |
| | | <div class="zoom-in icon iconfont" @click="zoomIn"></div> |
| | | <div class="zoom-out icon iconfont" @click="zoomOut"></div> |
| | | </div> |
| | | <div class="range icon iconfont" @click="drawPolygon"></div> |
| | | <el-input v-model="nodeId" placeholder="请è¾å
¥å
容"></el-input> |
| | | <div class="save" v-if="showBtn" @click="savePoly">ä¿å</div> |
| | | <div class="cancel" v-if="showBtn" @click="resetMap">åæ¶</div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | import "ol/ol.css"; |
| | | import Feature from "ol/Feature"; |
| | | import Point from "ol/geom/Point"; |
| | | import VectorSource from "ol/source/Vector"; |
| | | import { Icon, Style, Fill, Stroke } from "ol/style"; |
| | | import { transform } from "ol/proj"; |
| | | import { Map, View } from "ol"; |
| | | import TileLayer from "ol/layer/Tile"; |
| | | import { Vector as VectorLayer } from "ol/layer"; |
| | | import OSM from "ol/source/OSM"; |
| | | import Draw from "ol/interaction/Draw"; |
| | | import { Modify, Snap } from "ol/interaction"; |
| | | import Polygon from "ol/geom/Polygon"; |
| | | |
| | | let myMap = {}; |
| | | let myVectorSource = {}; |
| | | let baseLayer = new TileLayer({ |
| | | source: new OSM({ |
| | | // url:'http://wprd0{1-4}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=8', |
| | | url: "http://wprd0{1-4}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=7", |
| | | crossOrigin: "anonymous", |
| | | // url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}' |
| | | }), |
| | | }); |
| | | let myDraw = {}; |
| | | let myModify = {}; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | showBtn: false, |
| | | nodeArr: [ |
| | | { data: [116.06157, 39.66157], id: 1, color: "绿" }, |
| | | { data: [116.06247, 39.66247], id: 2, color: "绿" }, |
| | | { data: [116.06337, 39.66337], id: 3, color: "绿" }, |
| | | { data: [116.06467, 39.66437], id: 4, color: "绿" }, |
| | | { data: [116.06517, 39.66517], id: 5, color: "红" }, |
| | | { data: [116.06627, 39.66627], id: 6, color: "红" }, |
| | | { data: [116.06787, 39.66787], id: 7, color: "红" }, |
| | | { data: [116.06897, 39.66897], id: 8, color: "红" }, |
| | | ], |
| | | nodeId: "", |
| | | iconArr: [], |
| | | rangeArr: [], |
| | | zoom: 15, |
| | | center: [116.06667, 39.66667], |
| | | polygonArr: [ |
| | | { |
| | | data: [ |
| | | [12919660.904416857, 4817401.4907109635], |
| | | [12921041.54824026, 4817277.28054], |
| | | [12920195.963614853, 4816775.662541878], |
| | | [12919493.698417485, 4816785.2171704145], |
| | | ], |
| | | id: "1", |
| | | }, |
| | | ], |
| | | polyFeature: [], |
| | | drawStore: [], |
| | | modifyStore: [], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.initMap(); |
| | | }, |
| | | methods: { |
| | | initMap() { |
| | | this.initPolygonArr(); |
| | | const vectorSource = new VectorSource({ |
| | | features: this.polyFeature, |
| | | }); |
| | | /* if(this.polygonArr.length>0){ |
| | | this.initPolygonArr() |
| | | console.log(this.polyFeature); |
| | | vectorSource.addFeature(this.polyFeature[0]) |
| | | } */ |
| | | myVectorSource = vectorSource; |
| | | this.initAllNode(); |
| | | |
| | | const vectorLayer = this.initLayer(vectorSource); |
| | | |
| | | const map = this.initBottomMap(vectorLayer); |
| | | |
| | | myMap = map; |
| | | /* map.getView().on('change:resolution', ()=> { |
| | | this.iconArr.forEach(item=>{ |
| | | let style = item.getStyle() |
| | | console.log(this.zoom); |
| | | style.getImage().setScale(this.zoom/15) |
| | | item.setStyle(style) |
| | | console.log(item); |
| | | }) |
| | | }) */ |
| | | }, |
| | | initNode([x, y], color) { |
| | | const iconFeature = new Feature({ |
| | | geometry: new Point(transform([x, y], "EPSG:4326", "EPSG:3857")), |
| | | }); |
| | | |
| | | const iconStyle = new Style({ |
| | | image: new Icon({ |
| | | size: [32, 32], |
| | | src: `/images/map/å®å
¨å¸½-${color}.png`, |
| | | }), |
| | | zIndex: 1, |
| | | }); |
| | | |
| | | iconFeature.setStyle(iconStyle); |
| | | this.iconArr.push(iconFeature); |
| | | return iconFeature; |
| | | }, |
| | | initAllNode() { |
| | | this.nodeArr.forEach((item) => { |
| | | const node = this.initNode(item.data, item.color); |
| | | node.set("id", item.id); |
| | | myVectorSource.addFeature(node); |
| | | }); |
| | | }, |
| | | initPolygonArr() { |
| | | this.polyFeature = []; |
| | | this.polygonArr.forEach((item) => { |
| | | const feature = new Feature({ geometry: new Polygon([item.data]) }); |
| | | feature.id = item.id; |
| | | this.polyFeature.push(feature); |
| | | }); |
| | | }, |
| | | initLayer(source) { |
| | | return new VectorLayer({ |
| | | source: source, |
| | | style: new Style({ |
| | | fill: new Fill({ |
| | | color: "rgba(255, 255, 255, 0.4)", |
| | | }), |
| | | stroke: new Stroke({ |
| | | color: "#F54336", |
| | | width: 2, |
| | | }), |
| | | }), |
| | | }); |
| | | }, |
| | | initBottomMap(vectorLayer) { |
| | | return new Map({ |
| | | target: "map-index", |
| | | layers: [baseLayer, vectorLayer], |
| | | view: new View({ |
| | | center: transform(this.center, "EPSG:4326", "EPSG:3857"), |
| | | zoom: this.zoom, |
| | | }), |
| | | }); |
| | | }, |
| | | zoomIn() { |
| | | const view = myMap.getView(); |
| | | this.zoom++; |
| | | view.setZoom(this.zoom); |
| | | }, |
| | | zoomOut() { |
| | | const view = myMap.getView(); |
| | | this.zoom--; |
| | | view.setZoom(this.zoom); |
| | | }, |
| | | location() { |
| | | const view = myMap.getView(); |
| | | view.setZoom(this.zoom); |
| | | view.setCenter( |
| | | transform([116.06667, 39.66667], "EPSG:4326", "EPSG:3857") |
| | | ); |
| | | }, |
| | | drawPolygon() { |
| | | this.showBtn = true; |
| | | const draw = new Draw({ |
| | | source: myVectorSource, |
| | | type: "Polygon", |
| | | }); |
| | | myDraw = draw; |
| | | draw.on("drawend", (event) => { |
| | | let id = |
| | | this.drawStore.length > 0 |
| | | ? +this.drawStore[this.drawStore.length - 1].id + 1 |
| | | : +this.polygonArr[this.polygonArr.length - 1].id + 1; |
| | | event.feature.id = id; |
| | | this.drawStore.push({ |
| | | id, |
| | | data: event.feature.getGeometry().getCoordinates()[0], |
| | | }); |
| | | }); |
| | | |
| | | const modify = new Modify({ source: myVectorSource }); |
| | | modify.addEventListener("modifyend", (event) => { |
| | | console.log(event.features); |
| | | const id = event.features.array_[0].id; |
| | | const data = event.features.array_[0].getGeometry().getCoordinates()[0]; |
| | | this.modifyStore.push({ id, data }); |
| | | }); |
| | | myModify = modify; |
| | | myMap.addInteraction(modify); |
| | | myMap.addInteraction(draw); |
| | | }, |
| | | resetMap() { |
| | | this.initPolygonArr(); |
| | | console.log(this.polyFeature); |
| | | const vectorSource = new VectorSource({ |
| | | features: this.polyFeature, |
| | | }); |
| | | /* if(this.polygonArr.length>0){ |
| | | this.initPolygonArr() |
| | | console.log(this.polyFeature); |
| | | vectorSource.addFeature(this.polyFeature[0]) |
| | | } */ |
| | | myVectorSource = vectorSource; |
| | | this.initAllNode(); |
| | | |
| | | const vectorLayer = this.initLayer(vectorSource); |
| | | myMap.setLayers([baseLayer, vectorLayer]); |
| | | myMap.removeInteraction(myDraw); |
| | | myMap.removeInteraction(myModify); |
| | | this.showBtn = false; |
| | | this.drawStore = []; |
| | | this.modifyStore = []; |
| | | }, |
| | | savePoly() { |
| | | myMap.removeInteraction(myDraw); |
| | | myMap.removeInteraction(myModify); |
| | | this.showBtn = false; |
| | | if (this.drawStore.length) { |
| | | this.polygonArr = [...this.polygonArr, ...this.drawStore]; |
| | | this.drawStore = []; |
| | | } |
| | | if (this.modifyStore.length) { |
| | | this.modifyStore.forEach((item) => { |
| | | this.polygonArr.forEach((item2) => { |
| | | if (item.id == item2.id) { |
| | | item2.data = item.data; |
| | | } |
| | | }); |
| | | }); |
| | | this.modifyStore = []; |
| | | } |
| | | }, |
| | | }, |
| | | watch: { |
| | | nodeId: { |
| | | handler(val) { |
| | | const arr = this.nodeArr.filter((item) => item.id == val); |
| | | if (this.rangeArr.length > 0) { |
| | | this.rangeArr.forEach((item) => { |
| | | myVectorSource.removeFeature(item); |
| | | }); |
| | | this.rangeArr = []; |
| | | } |
| | | |
| | | if (arr.length > 0) { |
| | | arr.forEach((item) => { |
| | | const rangeFeature = new Feature({ |
| | | geometry: new Point( |
| | | transform(item.data, "EPSG:4326", "EPSG:3857") |
| | | ), |
| | | name: "Null Island", |
| | | population: 4000, |
| | | rainfall: 500, |
| | | }); |
| | | |
| | | const iconStyle = new Style({ |
| | | image: new Icon({ |
| | | size: [64, 64], |
| | | src: `/images/map/èå´-${item.color}.png`, |
| | | }), |
| | | }); |
| | | |
| | | rangeFeature.setStyle(iconStyle); |
| | | myVectorSource.addFeature(rangeFeature); |
| | | this.rangeArr.push(rangeFeature); |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .map-index { |
| | | #map-index { |
| | | position: relative; |
| | | margin: 20px 0; |
| | | width: 1170px; |
| | | height: 396px; |
| | | border-radius: 15px; |
| | | background-color: skyblue |
| | | .control { |
| | | position: absolute; |
| | | display: flex; |
| | | flex-direction: column; |
| | | z-index: 1; |
| | | left: 25px; |
| | | bottom: 25px; |
| | | width: 30px; |
| | | height: 91px; |
| | | background: #ffffff; |
| | | box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25); |
| | | border-radius: 8px; |
| | | .location, |
| | | .zoom-in, |
| | | .zoom-out { |
| | | line-height: 30px; |
| | | font-size: 18px; |
| | | flex: 1; |
| | | cursor: pointer; |
| | | } |
| | | .location { |
| | | background: #11aa66; |
| | | border-radius: 8px 8px 0 0; |
| | | color: #fff; |
| | | } |
| | | } |
| | | .el-input { |
| | | position: absolute; |
| | | z-index: 1; |
| | | top: 15px; |
| | | left: 15px; |
| | | width: 205px; |
| | | height: 35px; |
| | | ::v-deep input { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | &:focus { |
| | | border-color: #11aa66 !important; |
| | | } |
| | | } |
| | | } |
| | | .range { |
| | | position: absolute; |
| | | left: 25px; |
| | | bottom: 126px; |
| | | width: 30px; |
| | | height: 30px; |
| | | background: #11aa66; |
| | | color: #fff; |
| | | border-radius: 8px; |
| | | cursor: pointer; |
| | | z-index: 1; |
| | | line-height: 30px; |
| | | } |
| | | .save { |
| | | position: absolute; |
| | | z-index: 3; |
| | | top: 15px; |
| | | right: 113px; |
| | | width: 87px; |
| | | height: 35px; |
| | | background: #11aa66; |
| | | border: 1px solid #11aa66; |
| | | border-radius: 8px; |
| | | color: #fff; |
| | | font-size: 12px; |
| | | line-height: 36px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .cancel { |
| | | position: absolute; |
| | | z-index: 3; |
| | | top: 15px; |
| | | right: 20px; |
| | | width: 87px; |
| | | height: 35px; |
| | | background: #fff; |
| | | border: 1px solid #11aa66; |
| | | border-radius: 8px; |
| | | color: #4f4f4f; |
| | | font-size: 12px; |
| | | line-height: 36px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | </style> |
| | | |
| | | <style> |
| | | .ol-zoom { |
| | | display: none !important; |
| | | } |
| | | </style> |
| | |
| | | time:"2021-09-21 12:23", |
| | | longitude:"23.2344", |
| | | latitude:"45.4455", |
| | | warn:"æªå¨çµåå´æ åºå" |
| | | warn:"æªå¨çµåå´æ åºå", |
| | | processed:false, |
| | | elec: 50.2 |
| | | },{ |
| | | code:"A100640819DA3B", |
| | | image:"/images/settings/background.png", |
| | |
| | | time:"2021-09-21 12:23", |
| | | longitude:"23.2344", |
| | | latitude:"45.4455", |
| | | warn:"æªå¨çµåå´æ åºå" |
| | | warn:"æªå¨çµåå´æ åºå", |
| | | processed:false, |
| | | elec: 10.2 |
| | | }, |
| | | { |
| | | code:"A100640819DA3B", |
| | |
| | | time:"2021-09-21 12:23", |
| | | longitude:"23.2344", |
| | | latitude:"45.4455", |
| | | warn:"æªå¨çµåå´æ åºå" |
| | | warn:"æªå¨çµåå´æ åºå", |
| | | processed:false, |
| | | elec: 50.2 |
| | | }, |
| | | { |
| | | code:"A100640819DA3B", |
| | |
| | | time:"2021-09-21 12:23", |
| | | longitude:"23.2344", |
| | | latitude:"45.4455", |
| | | warn:"æªå¨çµåå´æ åºå" |
| | | warn:"æªå¨çµåå´æ åºå", |
| | | processed:false, |
| | | elec: 50.2 |
| | | }, |
| | | { |
| | | code:"A100640819DA3B", |
| | |
| | | time:"2021-09-21 12:23", |
| | | longitude:"23.2344", |
| | | latitude:"45.4455", |
| | | warn:"æªå¨çµåå´æ åºå" |
| | | warn:"æªå¨çµåå´æ åºå", |
| | | processed:false, |
| | | elec: 50.2 |
| | | }, |
| | | { |
| | | code:"A100640819DA3B", |
| | |
| | | time:"2021-09-21 12:23", |
| | | longitude:"23.2344", |
| | | latitude:"45.4455", |
| | | warn:"æªå¨çµåå´æ åºå" |
| | | warn:"æªå¨çµåå´æ åºå", |
| | | processed:false, |
| | | elec: 50.2 |
| | | }, |
| | | { |
| | | code:"A100640819DA3B", |
| | |
| | | time:"2021-09-21 12:23", |
| | | longitude:"23.2344", |
| | | latitude:"45.4455", |
| | | warn:"æªå¨çµåå´æ åºå" |
| | | warn:"æªå¨çµåå´æ åºå", |
| | | processed:false, |
| | | elec: 50.2 |
| | | }, |
| | | { |
| | | code:"A100640819DA3B", |
| | |
| | | time:"2021-09-21 12:23", |
| | | longitude:"23.2344", |
| | | latitude:"45.4455", |
| | | warn:"æªå¨çµåå´æ åºå" |
| | | warn:"æªå¨çµåå´æ åºå", |
| | | processed:false, |
| | | elec: 50.2 |
| | | }, |
| | | { |
| | | code:"A100640819DA3B", |
| | |
| | | time:"2021-09-21 12:23", |
| | | longitude:"23.2344", |
| | | latitude:"45.4455", |
| | | warn:"æªå¨çµåå´æ åºå" |
| | | warn:"æªå¨çµåå´æ åºå", |
| | | processed:false, |
| | | elec: 50.2 |
| | | }, |
| | | { |
| | | code:"A100640819DA3B", |
| | |
| | | time:"2021-09-21 12:23", |
| | | longitude:"23.2344", |
| | | latitude:"45.4455", |
| | | warn:"æªå¨çµåå´æ åºå" |
| | | warn:"æªå¨çµåå´æ åºå", |
| | | processed:false, |
| | | elec: 50.2 |
| | | }] |
| | | } |
| | | }, |
| | |
| | | <template> |
| | | <div class="left-nav"> |
| | | <h1> |
| | | <img class="icon" :src="`${publicPath}images/shuohuang/railroad.png`" style="height: 40px;" /> |
| | | <span v-show="!isCollapse" style="padding-left: 6px;">æé»éè·¯æºè¾åå
¬å¸</span> |
| | | <img |
| | | class="icon" |
| | | :src="`${publicPath}images/shuohuang/railroad.png`" |
| | | style="height: 40px" |
| | | /> |
| | | <span v-show="!isCollapse" style="padding-left: 6px" |
| | | >æé»éè·¯æºè¾åå
¬å¸</span |
| | | > |
| | | </h1> |
| | | <el-menu |
| | | class="el-menu-vertical-demo" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | //import railroadImg from '/images/shuohuang/railroad.png'; |
| | | export default { |
| | | props: { |
| | | isCollapse: { |
| | | type: Boolean, |
| | | default: true |
| | | default: true, |
| | | }, |
| | | menuChange: { |
| | | type: Function |
| | | } |
| | | type: Function, |
| | | }, |
| | | }, |
| | | computed: { |
| | | isAdmin() { |
| | |
| | | data() { |
| | | return { |
| | | publicPath: process.env.BASE_URL, |
| | | activeIndex: 'guideIndex' |
| | | } |
| | | activeIndex: "guideIndex", |
| | | }; |
| | | }, |
| | | mounted() { |
| | | // if (this.isAdmin) { |
| | |
| | | // this.activeIndex = sessionStorage.getItem('leftNavAct'); |
| | | // } |
| | | // } |
| | | this.activeIndex = this.isAdmin ? 'guideIndex' : 'searchForVideoAnalyze'; |
| | | this.activeIndex = this.isAdmin ? "guideIndex" : "searchForVideoAnalyze"; |
| | | |
| | | this.$emit('menuChange', this.activeIndex); |
| | | this.$emit("menuChange", this.activeIndex); |
| | | }, |
| | | methods: { |
| | | handleSelect(index, indePath) { |
| | | this.activeIndex = index; |
| | | sessionStorage.setItem('leftNavAct', this.activeIndex); |
| | | this.$emit('menuChange', index); |
| | | sessionStorage.setItem("leftNavAct", this.activeIndex); |
| | | this.$emit("menuChange", index); |
| | | }, |
| | | handleOpen() { |
| | | |
| | | handleOpen() {}, |
| | | handleClose() {}, |
| | | }, |
| | | handleClose() { |
| | | |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | |
| | | </div> |
| | | <div class="container"> |
| | | <!-- é¦é¡µ --> |
| | | <GuideIndex ref="GuideIndex" v-if="actPage=='guideIndex'"></GuideIndex> |
| | | <searchForVideoAnalyze v-if="actPage=='searchForVideoAnalyze'"></searchForVideoAnalyze> |
| | | <GuideIndex |
| | | ref="GuideIndex" |
| | | v-if="actPage == 'guideIndex'" |
| | | ></GuideIndex> |
| | | <searchForVideoAnalyze |
| | | v-if="actPage == 'searchForVideoAnalyze'" |
| | | ></searchForVideoAnalyze> |
| | | <memberManage v-if="actPage=='memberManage'"></memberManage> |
| | | <taskManage v-if="actPage=='taskManage'"></taskManage> |
| | | <transferMemo v-if="actPage=='transferMemo'"></transferMemo> |
| | | <transferDeviceManage v-if="actPage=='transferDeviceManage'"></transferDeviceManage> |
| | | <transferDeviceManage |
| | | v-if="actPage == 'transferDeviceManage'" |
| | | ></transferDeviceManage> |
| | | <configManage v-if="actPage=='configManage'"></configManage> |
| | | <lkg v-if="actPage=='lkgManage'"></lkg> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import Lkg from '../components/lkgManage' |
| | | import TopNav from '../components/topNav'; |
| | | import LeftNav from '../components/leftNav'; |
| | | import GuideIndex from '../components/guideIndex'; |
| | | import TaskManage from '../components/taskManage'; |
| | | import TransferMemo from '../components/transferMemo'; |
| | | import ConfigManage from '../components/configManage'; |
| | | import MemberManage from '../components/memberManage'; |
| | | import TransferDeviceManage from '../components/transferDeviceManage'; |
| | | import SearchForVideoAnalyze from '../components/searchForVideoAnalyze'; |
| | | import Lkg from "../components/lkgManage"; |
| | | import TopNav from "../components/topNav"; |
| | | import LeftNav from "../components/leftNav"; |
| | | import GuideIndex from "../components/guideIndex"; |
| | | import TaskManage from "../components/taskManage"; |
| | | import TransferMemo from "../components/transferMemo"; |
| | | import ConfigManage from "../components/configManage"; |
| | | import MemberManage from "../components/memberManage"; |
| | | import TransferDeviceManage from "../components/transferDeviceManage"; |
| | | import SearchForVideoAnalyze from "../components/searchForVideoAnalyze"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | TransferMemo, |
| | | TransferDeviceManage, |
| | | ConfigManage, |
| | | GuideIndex |
| | | GuideIndex, |
| | | }, |
| | | data() { |
| | | return { |
| | | isCollapse: false, |
| | | actPage: 'guideIndex', |
| | | } |
| | | actPage: "guideIndex", |
| | | }; |
| | | }, |
| | | mounted() { |
| | | // this.actPage = 'guideIndex'; |
| | | }, |
| | | methods: { |
| | | markNav() { |
| | | sessionStorage.setItem('actPage', this.actPage); |
| | | sessionStorage.setItem("actPage", this.actPage); |
| | | this.menuChange(this.actPage); |
| | | }, |
| | | toggleCollapse() { |
| | |
| | | //éç¥å½åæ´»å¨é¡µtable(妿æ) doLayout |
| | | }, |
| | | menuChange(path) { |
| | | if (path=='guideIndex') { |
| | | if (path == "guideIndex") { |
| | | // this.$refs.GuideIndex.refreshShoubiNum() |
| | | } |
| | | if (path == 'taskscreen') { |
| | | if (path == "taskscreen") { |
| | | //window.location.href = window.location.href+'taskscreen/index.html' |
| | | window.open(window.location.href + 'taskscreen/index.html', '_blank') |
| | | } else if (path == 'hiddendangerscreen') { |
| | | window.open(window.location.href + "taskscreen/index.html", "_blank"); |
| | | } else if (path == "hiddendangerscreen") { |
| | | //window.location.href = window.location.href+'hiddendangerscreen/index.html' |
| | | window.open(window.location.href + 'hiddendangerscreen/index.html', '_blank') |
| | | window.open( |
| | | window.location.href + "hiddendangerscreen/index.html", |
| | | "_blank" |
| | | ); |
| | | } |
| | | this.actPage = path; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |