import Header from '@/components/header/index.vue';
import Tabs from '@/components/tabs/index.vue';

import Left11 from './comps/left/top/1/index.vue';
import Left21 from './comps/left/middle/1/index.vue';
import Left31 from './comps/left/bottom/1/index.vue';
import Right11 from './comps/right/top/1/index.vue';
import Right21 from './comps/right/middle/1/index.vue';
import Right31 from './comps/right/bottom/1/index.vue';

import Left12 from './comps/left/top/2/index.vue';
import Left22 from './comps/left/middle/2/index.vue';
import Left32 from './comps/left/bottom/2/index.vue';
import Right12 from './comps/right/top/2/index.vue';
import Right22 from './comps/right/middle/2/index.vue';
import Right32 from './comps/right/bottom/2/index.vue';
import Bottom1 from './comps/buttom/1/index.vue';
import GisMap from '@/components/gis-map/index.vue';
import MainGis from './main-gis/index.vue';

import { comps } from './data.js'

import AssetDetails from './asset-details/index.vue';

export default {
  components: {
    GisMap,
    MainGis,
    Header,
    Tabs,
    Left11,
    Left21,
    Left31,
    Right11,
    Right21,
    Right31,
    Left12,
    Left22,
    Left32,
    Right12,
    Right22,
    Right32,
    AssetDetails,
    Bottom1
  },
  data () {
    return {
      comps,
      tabData: [
        {
          id: '1',
          name: '资源分析'
        },
        {
          id: '2',
          name: '预警分析'
        }
      ],
      tab: '1',
      dialogImageUrl: '',
      dialogVisible: false,
      showDetail: false,
      permanentDetail: {},
      permanentType: '1'
    };
  },
  computed: {
    currentComp: function () {
      return this.comps[this.tab]
    }
  },
  created () {
  },
  mounted () {
  },
  methods: {
    tabChange (info) {
      this.tab = info.id;
    },
    openImage (url) {
      console.log(url)
      this.dialogImageUrl = url;
      this.dialogVisible = true;
    },
    clickDetail (val, type) {
      console.log(val + 111111111)
      this.permanentDetail = val;
      this.permanentType = type;
      this.showDetail = true;
    }
  }
};
