// import Vue from 'vue'
// import showDialog from './showDialog.js';

// Vue.use(showDialog)

export const checkVisual = {
  methods: {
    //查看可视化
    checkVisual(Scenario, eventId, eventName) {
      this.$showDialog({
          Scenario:Scenario,
          eventId:eventId,
          eventName:eventName
      },true);
    },
  }
}

export const openVisual = {
  methods: {
    //查看可视化
    checkVisual({ Scenario, eventId, eventName }) {
      if (Scenario && Scenario.length > 0) {
        var visuals = {
          Scenario: Scenario,
          eventId: eventId,
          eventName: eventName
        }
        if (eventId) {
          this.$router.push({
            path: '/eventVisual',
            query: {
              visuals: JSON.stringify(visuals)
            }
          })
          return false
        }
        this.$refs.visualDialog.open(visuals)
      } else {
        this.$message.error('该事件下没有应用场景')
      }

    },

  }
}