派生自 wuyushui/SewerAndRainNetwork

wangqi
2021-04-08 6a5c681cfad3b2fb1d5d52b7646f0baec6afabc5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<template>
    <div class="enterprise-panel">
        <div class="enterprise-function" @click="showWarnDialog()">
            <el-tooltip :popper-class="'map-tooltip'" effect="dark" content="预报警" placement="left">
                <div :class='["iconBtn",warnVisible ? "active-button" : ""]'>
                   <img src="@/assets/images/map-pages/icon/map/warn.png" alt="" class="icon">
                    <!--<span class="icon-name">预报警</span>-->
                </div>
            </el-tooltip>
        </div>
        <div class="enterprise-function" @click="showStatisDialog()">
            <el-tooltip :popper-class="'map-tooltip'" effect="dark" content="指标" placement="bottom">
                <div :class='["iconBtn",companyVisible ? "active-button" : ""]'>
                    <img src="@/assets/images/map-pages/icon/map/company.png" alt="" class="icon">
    <!--                <span class="icon-name">指标</span>-->
                </div>
            </el-tooltip>
        </div>
        <Dialog ref="warnDialog" title="企业预警报警分类统计" >
            <warn></warn>
        </Dialog>
        <Dialog ref="indexStatisticsDialog" title="企业指标分类统计">
            <index-statistics></index-statistics>
        </Dialog>
    </div>
</template>
 
<script>
import Dialog from '../../views/popup/Dialog'
import Warn from './components/Warn'
import IndexStatistics from './components/IndexStatistics'
export default {
  name: 'Enterprise',
  components: {
    Dialog,
    Warn,
    IndexStatistics
  },
  data () {
    return {
      comp: Warn,
      warnVisible: false,
      companyVisible: false
    }
  },
  methods: {
    // 图标 控制内容的展示与隐藏
    show () {
      this.legendControl = !this.legendControl
    },
    showWarnDialog () {
      this.$refs.warnDialog.show()
      this.warnVisible = true
    },
    showStatisDialog () {
      this.$refs.indexStatisticsDialog.show()
      this.companyVisible = true
    }
  },
  mounted () {
    const that = this
    this.$nextTick(() => {
      this.$refs.warnDialog.$on('closeDialog', () => {
        that.warnVisible = false
      })
      this.$refs.indexStatisticsDialog.$on('closeDialog', () => {
        that.companyVisible = false
      })
    })
  }
}
</script>
 
<style lang="less" scoped>
.enterprise-panel{
    position: absolute;
    right: 0.14583rem;
    top:0.11979rem;
    z-index: 1000;
    display: flex;
    .enterprise-function:not(:first-child){
        margin-left: 0.05rem;
    }
}
</style>