<template>
    <div>
      <div class="map" @click="abc()">
          <!--<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"
          ></supermap>
          </div>
          <Header></Header>
          <Leftnav></Leftnav>
          <Rightnav></Rightnav>
          <Btmbutton></Btmbutton>
          <Jsmsdialog ref="Jsmsdialog"></Jsmsdialog>
        </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,
              }
          },
        components: {
            Header,
            Leftnav,
            Rightnav,
            Btmbutton,
            Jsmsdialog,
            supermap
        },
        methods: {
            /** 预览按钮操作 */
            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(){
                this.$refs.Jsmsdialog.outerVisible = true
                console.log('1111')
            }
        },
      }
      </script>
      <style>
          .map{
              position: fixed;
              z-index: 1;
              width: 100%;
              height: 100vh;
              left: 0px;
          }
          .map img{
              width: 100%;
              height: 100%;
          }
      </style>
