123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745 |
- <template>
- <div>
- <!--<div class="map" @click="abc()">-->
- <div class="map">
- <!--<img src="../assets/images/yj-mapbg.png"/>-->
- <!--<img src="../assets/images/cjms_camera/water_1.jpg"/>-->
- <!-- 地图 -->
- <!--<supermapDialog ref="supermapDialog"-->
- <!--style="position: absolute; top:0;left: 0;"-->
- <!--:mapDiv="'forestWarmSuperMap'"-->
- <!--/>-->
- <supermap ref="supermap" style="width: 100%;height: 100vh;"
- class="indexSupermapClass" :mapDiv="'forestMap'"
- :dynamicPlotting="false"
- :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"
- @abc="abc"></supermap>
- </div>
- <Header></Header>
- <Leftnav></Leftnav>
- <Rightnav></Rightnav>
- <Btmbutton></Btmbutton>
- <Jsmsdialog ref="Jsmsdialog"></Jsmsdialog>
- <!--<div class="yj-topnav-div" title="地图信息"><i class="iconfont yj-icon-centerdata-t-firecontrol-other-linkage-force"></i></div>-->
- <div class="yj-topnav">
- <el-checkbox-group v-model="checkList" @change="eventPoints_byType(checkList)">
- <el-checkbox label="shelter">避难场所</el-checkbox>
- <el-checkbox label="rescueSupplies">救援物资库</el-checkbox>
- <el-checkbox label="rescueTeam">救援队伍</el-checkbox>
- <el-checkbox label="camera">视联网</el-checkbox>
- </el-checkbox-group>
- <a><i class="iconfont yj-icon-nav"></i>普查结果</a>
- <a><i class="iconfont yj-icon-zhiban"></i>值班信息</a>
- </div>
- </div>
- </template>
- <script>
- import '../assets/iconfont/iconfont.css'
- import Header from '../components/Header.vue'
- import Leftnav from '../components/Leftnav.vue'
- import Rightnav from '../components/Rightnav.vue'
- import Btmbutton from '../components/Btmbutton.vue'
- import Jsmsdialog from '../components/Jsmsdialog.vue'
- import supermap from '@/components/supermap' //超图
- export default {
- name: 'App',
- data() {
- return {
- mapToolShowBH:false,
- checkList: []
- }
- },
- components: {
- Header,
- Leftnav,
- Rightnav,
- Btmbutton,
- Jsmsdialog,
- supermap
- },
- created() {
- this.eventPoints("event_point");
- },
- methods: {
- //事件落点
- eventPoints(type){
- let pointList = [];
- pointList.push({
- name:"白石村火情",
- contacts:"张洁玲",
- phone:"13500805931",
- longitude:129.416,
- latitude:42.908
- });
- pointList.push({
- name:"延河路火情",
- contacts:"王建军",
- phone:"13664407655",
- longitude:129.46,
- latitude:42.888
- });
- pointList.push({
- name:"兴安村火情",
- contacts:"蔡雨虹",
- phone:"15754320117",
- longitude:129.496,
- latitude:42.935
- });
- pointList.push({
- name:"小白石村火情",
- contacts:"吕国琴",
- phone:"15044076332",
- longitude:129.426,
- latitude:42.929
- });
- pointList.push({
- name:"上东沟火情",
- contacts:"吴明月",
- phone:"15044076332",
- longitude:129.396,
- latitude:42.935
- });
- var markersList = []
- for (let i = 0; i < pointList.length; i++) {
- let markersMap = {
- lng: 124.59,
- lat: 43.02,
- icon: 'marker',
- bindPopupHtml: '',
- click: 'abc',
- parameter: pointList[i],
- keepBindPopup: false,
- isAggregation: true
- }
- markersMap.icon = 'sj-icon-map-' + type.replaceAll("_", "-");
- markersMap.lng = pointList[i].longitude;
- markersMap.lat = pointList[i].latitude;
- markersMap.bindPopupHtml = '<div class="map-tip">' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>资源名称:' + pointList[i].name + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>经纬度:' + pointList[i].longitude +','+ pointList[i].latitude + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>联系人:' + (pointList[i].contacts ? pointList[i].contacts : "") + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>电话:' + (pointList[i].phone ? pointList[i].phone : "") + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '</div>'
- markersList.push(markersMap)
- // let icon = new window.L.Icon({
- // iconUrl: iconList[markersList[i].icon],
- // iconSize: [48, 48],
- // iconAnchor: [24, 40],
- // popupAnchor: [-3, -40],
- // shadowSize: [41, 41]
- // })
- // let markerClick = window.L.marker([markersList[i].lat, markersList[i].lng], {
- // icon: markersMap.icon
- // })
- // markerClick.on('click', function() {
- // let clickName = markersList[i].click
- // this.$emit(clickName, markersList[i].parameter)
- // })
- }
- setTimeout(() => {
- // this.$refs.supermap.setMarkers(markersList);
- this.$refs.supermap.setMarkersByType(markersList, type);
- }, 3000)
- },
- //避难场所 落点
- eventPoints_byType(checkList){
- console.log("checkList=",checkList)
- this.$refs.supermap.clearM(true);
- for (let i = 0; i < checkList.length; i++) {
- let type = checkList[i];
- if(type == "shelter"){
- this.eventPoints_shelter(type);
- }else if(type == "rescueSupplies"){
- this.eventPoints_rescueSupplies(type);
- }else if(type == "rescueTeam"){
- this.eventPoints_rescueTeam(type);
- }else if(type == "camera"){
- this.eventPoints_camera(type);
- }
- }
- },
- //避难场所 落点
- eventPoints_shelter(type){
- console.log(666)
- let pointList = [];
- pointList.push({
- name:"白石村避难所",
- contacts:"张洁玲",
- phone:"13500805931",
- longitude:129.416,
- latitude:42.918
- });
- pointList.push({
- name:"延河路避难所",
- contacts:"王建军",
- phone:"13664407655",
- longitude:129.47,
- latitude:42.898
- });
- pointList.push({
- name:"兴安村避难所",
- contacts:"蔡雨虹",
- phone:"15754320117",
- longitude:129.506,
- latitude:42.945
- });
- pointList.push({
- name:"小白石村避难所",
- contacts:"吕国琴",
- phone:"15044076332",
- longitude:129.436,
- latitude:42.939
- });
- pointList.push({
- name:"上东沟避难所",
- contacts:"吴明月",
- phone:"15044076332",
- longitude:129.406,
- latitude:42.945
- });
- var markersList = []
- for (let i = 0; i < pointList.length; i++) {
- let markersMap = {
- lng: 124.59,
- lat: 43.02,
- icon: 'marker',
- bindPopupHtml: '',
- click: '',
- parameter: pointList[i],
- keepBindPopup: false,
- isAggregation: true
- }
- markersMap.icon = 'sj-icon-map-' + type.replaceAll("_", "-");
- markersMap.lng = pointList[i].longitude;
- markersMap.lat = pointList[i].latitude;
- markersMap.bindPopupHtml = '<div class="map-tip">' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>资源名称:' + pointList[i].name + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>经纬度:' + pointList[i].longitude +','+ pointList[i].latitude + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>联系人:' + (pointList[i].contacts ? pointList[i].contacts : "") + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>电话:' + (pointList[i].phone ? pointList[i].phone : "") + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '</div>'
- markersList.push(markersMap)
- // let icon = new window.L.Icon({
- // iconUrl: iconList[markersList[i].icon],
- // iconSize: [48, 48],
- // iconAnchor: [24, 40],
- // popupAnchor: [-3, -40],
- // shadowSize: [41, 41]
- // })
- // let markerClick = window.L.marker([markersList[i].lat, markersList[i].lng], {
- // icon: markersMap.icon
- // })
- // markerClick.on('click', function() {
- // let clickName = markersList[i].click
- // this.$emit(clickName, markersList[i].parameter)
- // })
- }
- setTimeout(() => {
- // this.$refs.supermap.clearM(false);
- this.$refs.supermap.setMarkers(markersList);
- // this.$refs.supermap.setMarkersByType(markersList, type);
- }, 500)
- },
- //救援物资库 落点
- eventPoints_rescueSupplies(type){
- console.log(777)
- let pointList = [];
- pointList.push({
- name:"白石村救援物资库",
- contacts:"张洁玲",
- phone:"13500805931",
- longitude:129.406,
- latitude:42.898
- });
- pointList.push({
- name:"延河路救援物资库",
- contacts:"王建军",
- phone:"13664407655",
- longitude:129.45,
- latitude:42.878
- });
- pointList.push({
- name:"兴安村救援物资库",
- contacts:"蔡雨虹",
- phone:"15754320117",
- longitude:129.486,
- latitude:42.925
- });
- pointList.push({
- name:"小白石村救援物资库",
- contacts:"吕国琴",
- phone:"15044076332",
- longitude:129.416,
- latitude:42.919
- });
- pointList.push({
- name:"上东沟救援物资库",
- contacts:"吴明月",
- phone:"15044076332",
- longitude:129.386,
- latitude:42.925
- });
- var markersList = []
- for (let i = 0; i < pointList.length; i++) {
- let markersMap = {
- lng: 124.59,
- lat: 43.02,
- icon: 'marker',
- bindPopupHtml: '',
- click: 'abc',
- parameter: pointList[i],
- keepBindPopup: false,
- isAggregation: true
- }
- markersMap.icon = 'sj-icon-map-' + type.replaceAll("_", "-");
- markersMap.lng = pointList[i].longitude;
- markersMap.lat = pointList[i].latitude;
- markersMap.bindPopupHtml = '<div class="map-tip">' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>资源名称:' + pointList[i].name + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>经纬度:' + pointList[i].longitude +','+ pointList[i].latitude + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>联系人:' + (pointList[i].contacts ? pointList[i].contacts : "") + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>电话:' + (pointList[i].phone ? pointList[i].phone : "") + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '</div>'
- markersList.push(markersMap)
- // let icon = new window.L.Icon({
- // iconUrl: iconList[markersList[i].icon],
- // iconSize: [48, 48],
- // iconAnchor: [24, 40],
- // popupAnchor: [-3, -40],
- // shadowSize: [41, 41]
- // })
- // let markerClick = window.L.marker([markersList[i].lat, markersList[i].lng], {
- // icon: markersMap.icon
- // })
- // markerClick.on('click', function() {
- // let clickName = markersList[i].click
- // this.$emit(clickName, markersList[i].parameter)
- // })
- }
- setTimeout(() => {
- // this.$refs.supermap.clearM(false);
- this.$refs.supermap.setMarkers(markersList);
- // this.$refs.supermap.setMarkersByType(markersList, type);
- }, 500)
- },
- //救援队伍 落点
- eventPoints_rescueTeam(type){
- console.log(888)
- let pointList = [];
- pointList.push({
- name:"白石村救援队伍",
- contacts:"张洁玲",
- phone:"13500805931",
- longitude:129.426,
- latitude:42.898
- });
- pointList.push({
- name:"延河路救援队伍",
- contacts:"王建军",
- phone:"13664407655",
- longitude:129.47,
- latitude:42.878
- });
- pointList.push({
- name:"兴安村救援队伍",
- contacts:"蔡雨虹",
- phone:"15754320117",
- longitude:129.506,
- latitude:42.925
- });
- pointList.push({
- name:"小白石村救援队伍",
- contacts:"吕国琴",
- phone:"15044076332",
- longitude:129.436,
- latitude:42.919
- });
- pointList.push({
- name:"上东沟救援队伍",
- contacts:"吴明月",
- phone:"15044076332",
- longitude:129.406,
- latitude:42.925
- });
- var markersList = []
- for (let i = 0; i < pointList.length; i++) {
- let markersMap = {
- lng: 124.59,
- lat: 43.02,
- icon: 'marker',
- bindPopupHtml: '',
- click: 'abc',
- parameter: pointList[i],
- keepBindPopup: false,
- isAggregation: true
- }
- markersMap.icon = 'sj-icon-map-' + type.replaceAll("_", "-");
- markersMap.lng = pointList[i].longitude;
- markersMap.lat = pointList[i].latitude;
- markersMap.bindPopupHtml = '<div class="map-tip">' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>资源名称:' + pointList[i].name + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>经纬度:' + pointList[i].longitude +','+ pointList[i].latitude + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>联系人:' + (pointList[i].contacts ? pointList[i].contacts : "") + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>电话:' + (pointList[i].phone ? pointList[i].phone : "") + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '</div>'
- markersList.push(markersMap)
- // let icon = new window.L.Icon({
- // iconUrl: iconList[markersList[i].icon],
- // iconSize: [48, 48],
- // iconAnchor: [24, 40],
- // popupAnchor: [-3, -40],
- // shadowSize: [41, 41]
- // })
- // let markerClick = window.L.marker([markersList[i].lat, markersList[i].lng], {
- // icon: markersMap.icon
- // })
- // markerClick.on('click', function() {
- // let clickName = markersList[i].click
- // this.$emit(clickName, markersList[i].parameter)
- // })
- }
- setTimeout(() => {
- // this.$refs.supermap.clearM(false);
- this.$refs.supermap.setMarkers(markersList);
- // this.$refs.supermap.setMarkersByType(markersList, type);
- }, 500)
- },
- //视联网 落点
- eventPoints_camera(type){
- console.log(999)
- let pointList = [];
- pointList.push({
- name:"白石村摄像头",
- contacts:"张洁玲",
- phone:"13500805931",
- longitude:129.406,
- latitude:42.918
- });
- pointList.push({
- name:"延河路摄像头",
- contacts:"王建军",
- phone:"13664407655",
- longitude:129.45,
- latitude:42.898
- });
- pointList.push({
- name:"兴安村摄像头",
- contacts:"蔡雨虹",
- phone:"15754320117",
- longitude:129.486,
- latitude:42.945
- });
- pointList.push({
- name:"小白石村摄像头",
- contacts:"吕国琴",
- phone:"15044076332",
- longitude:129.416,
- latitude:42.939
- });
- pointList.push({
- name:"上东沟摄像头",
- contacts:"吴明月",
- phone:"15044076332",
- longitude:129.386,
- latitude:42.945
- });
- var markersList = []
- for (let i = 0; i < pointList.length; i++) {
- let markersMap = {
- lng: 124.59,
- lat: 43.02,
- icon: 'marker',
- bindPopupHtml: '',
- click: 'abc',
- parameter: pointList[i],
- keepBindPopup: false,
- isAggregation: true
- }
- markersMap.icon = 'sj-icon-map-' + type.replaceAll("_", "-");
- markersMap.lng = pointList[i].longitude;
- markersMap.lat = pointList[i].latitude;
- markersMap.bindPopupHtml = '<div class="map-tip">' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>资源名称:' + pointList[i].name + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>经纬度:' + pointList[i].longitude +','+ pointList[i].latitude + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>联系人:' + (pointList[i].contacts ? pointList[i].contacts : "") + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '<span>' +
- ' <div class="d-l-con">' +
- ' <div class="d-l-l-text">' +
- ' <h4>电话:' + (pointList[i].phone ? pointList[i].phone : "") + '</h4>' +
- ' </div>' +
- ' </div>' +
- ' </span>' +
- '</div>'
- markersList.push(markersMap)
- // let icon = new window.L.Icon({
- // iconUrl: iconList[markersList[i].icon],
- // iconSize: [48, 48],
- // iconAnchor: [24, 40],
- // popupAnchor: [-3, -40],
- // shadowSize: [41, 41]
- // })
- // let markerClick = window.L.marker([markersList[i].lat, markersList[i].lng], {
- // icon: markersMap.icon
- // })
- // markerClick.on('click', function() {
- // let clickName = markersList[i].click
- // this.$emit(clickName, markersList[i].parameter)
- // })
- }
- setTimeout(() => {
- // this.$refs.supermap.clearM(false);
- this.$refs.supermap.setMarkers(markersList);
- // this.$refs.supermap.setMarkersByType(markersList, type);
- }, 500)
- },
- /** 预览按钮操作 */
- preview(cameraParam) {
- this.showTVWall(cameraParam.code, cameraParam.name);
- },
- /* 电视墙替换开始 */
- showTVWall(channelCode, channelName) {
- let tvListJson = [
- {
- "switchTab": "2",
- "treeLabels": [
- {
- "id": null,
- "labelCode": "999",
- "labelName": "电视墙",
- "cameraType": null,
- "parentLabelCode": ""
- },
- {
- "id": "spcamera00010",
- "labelCode": channelCode,
- "labelName": channelName,
- "cameraType": "1",
- "parentLabelCode": "999"
- }
- ],
- "labelChannels": [
- {
- "labelCode": channelCode,
- "channelDates": [
- {
- "channelCode": channelCode,
- "channelName": channelName,
- "channelSn": null,
- "cameraType": "1",
- "online": "1",
- "cameraCode": "1"
- }
- ]
- }
- ]
- }
- ]
- this.$refs.TVWall.showTVWall(tvListJson, [{
- "channelId": channelCode
- }]);
- this.$refs.bottomMenu.showMeasure = false;
- this.$refs.bottomMenu.showChild = false;
- this.$refs.bottomMenu.showBanChild = false;
- this.$refs.bottomMenu.showChangChild = false;
- },
- abc(point){
- this.$refs.Jsmsdialog.outerVisible = true
- this.$refs.Jsmsdialog.setPoint(point);
- console.log('1111')
- }
- },
- }
- </script>
- <style>
- .map{
- position: fixed;
- z-index: 1;
- width: 100%;
- height: 100vh;
- left: 0px;
- }
- .map img{
- width: 100%;
- height: 100%;
- }
- .yj-topnav-div{
- position: fixed;
- top:85px;
- right: 400px;
- width: 60px;
- height: 60px;
- /*background: url("../assets/images/yj-topnavbg.png") no-repeat center;*/
- background-size: 100% 100%;
- border-radius: 50%;
- z-index: 99;
- }
- .yj-topnav-div i{
- color: #fff;
- font-size: 40px;
- line-height: 57px;
- cursor: pointer;
- }
- .yj-topnav{
- position: fixed;
- top:85px;
- transform: translateX(-50%);
- z-index: 2;
- display: flex;
- flex-direction: row;
- /*background: url("../assets/images/yj-topnavbg.png") no-repeat center;*/
- background-size: 100% 100%;
- padding: 12px 20px;
- left: 50%;
- align-items: center;
- font-size: 12px;
- color: #fff;
- }
- .yj-topnav a{
- display: block;
- /*background:#08388c;*/
- background: url("../assets/images/yj-topnavbg1-on.png") no-repeat center;
- background-size: 100% 100%;
- color: #fff;
- /*padding: 5px 15px;*/
- /*border-radius: 50px;*/
- margin-right: 15px;
- font-size: 14px;
- width: 120px;
- height: 42px;
- line-height: 42px;
- }
- .yj-topnav a:hover{
- color: #0bf3f7;
- }
- .yj-topnav a i{
- margin-right: 6px;
- }
- </style>
|