3 files modified
1 files added
| | |
| | | overflow: hidden; |
| | | /* border: solid 1px springgreen; */ |
| | | } |
| | | |
| | | .dingwei{ |
| | | position: fixed; |
| | | width: 38px; |
| | | height: 38px; |
| | | top: 100px; |
| | | right: 0; |
| | | z-index: 10000; |
| | | background-color: #fff; |
| | | border-radius: 20px; |
| | | opacity: 0.8; |
| | | border: 1px solid gray; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | #seedata { |
| | | position: fixed; |
| | | bottom: 0; |
| | |
| | | move: null,//存放移动实例 |
| | | |
| | | seedata: '', |
| | | |
| | | nowPosition: '', |
| | | }, |
| | | methods: { |
| | | getDataList() { |
| | |
| | | var that = this, |
| | | center = [data[0].wd, data[0].jd], |
| | | url = `/api/blade-jfpts/alarm/alarm/APP-getAlarm?id=${data[0].id}`; |
| | | this.nowPosition = center; |
| | | axios.post(url).then((res) => { |
| | | // console.log(res) |
| | | if(res.data.data.length != 0){ |
| | | if (res.data.data.length != 0) { |
| | | var dat = res.data.data[0]; |
| | | for(var key in dat){ |
| | | if(dat[key] == null || dat[key] == ''){ |
| | | for (var key in dat) { |
| | | if (dat[key] == null || dat[key] == '') { |
| | | dat[key] = '暂无' |
| | | } |
| | | } |
| | | this.seedata = dat; |
| | | |
| | | }else{ |
| | | |
| | | } else { |
| | | this.seedata = data[0]; |
| | | } |
| | | // console.log(this.seedata, 1524545453) |
| | |
| | | }, |
| | | handleClick(tab, event) { |
| | | // console.log(tab, event); |
| | | }, |
| | | |
| | | locationMap() { |
| | | this.map.setView(this.nowPosition, 12); |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | mounted() { |
| | | this.getDataList(); |
| | | }, |
| | | wacth:{ |
| | | } |
| | | }) |
| | |
| | | |
| | | <body> |
| | | <div id="mapVue"> |
| | | <div class="dingwei" @click="locationMap"> |
| | | <img style="width: 80%;height: 80%;" src="./img/dingwei.png" alt=""> |
| | | </div> |
| | | <div id="map"></div> |
| | | <div id="seedata"> |
| | | <div class="title"> |