派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-26 08271621c9a7096cc29a3cfeeb67b772b13a4dfd
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<template>
    <div class="summary-sheets">
        <el-tooltip :popper-class="'map-tooltip'" effect="dark" content="报表" placement="left">
            <div :class='["iconBtn",selectGroup ? "active-button" : ""]' @click="subtopicBtn">
                <i class="el-icon-tickets icon"></i>
            </div>
        </el-tooltip>
        <transition name="animationChange">
            <div class="subtopic" v-show="selectGroup">
                <el-tooltip :popper-class="'map-tooltip'" effect="dark" content="统计表" placement="bottom">
                    <div :class='["iconBtn",summaryVisible ? "active-button" : ""]' @click="closeBtn">
                        <!--  -->
                        <i class="icon iconfont iconbiaoge2"></i>
                        <!--<span class="icon-name">统计表</span>-->
                    </div>
                </el-tooltip>
                <el-tooltip :popper-class="'map-tooltip'" effect="dark" content="指标" placement="bottom">
                    <div :class='["iconBtn",companyVisible ? "active-button" : ""]' @click="showStatisDialog()">
                        <!-- <img src="@/assets/images/map-pages/icon/map/company.png" alt="" class="icon"> -->
                        <i class="el-icon-office-building icon"></i>
                    </div>
                </el-tooltip>
                <el-tooltip :popper-class="'map-tooltip'" effect="dark" content="预报警" placement="bottom">
                    <div :class='["iconBtn",warnVisible ? "active-button" : ""]' @click="showWarnDialog()">
                        <i class="icon iconfont iconbaojing01"></i>
                        <!--<span class="icon-name">预报警</span>-->
                    </div>
                </el-tooltip>
            </div>
        </transition>
        <Dialog ref="summarySheets" title="报表" class="baoBiao">
            <tab-handover></tab-handover>
        </Dialog>
        <Dialog ref="warnDialog" title="预报警">
            <warn></warn>
        </Dialog>
        <Dialog ref="indexStatisticsDialog" title="企业指标分类统计">
            <index-statistics></index-statistics>
        </Dialog>
    </div>
</template>
 
<script>
import tabHandover from '@components/table/components/tabHandover'
// import Dialog from '@views/popup/Dialog'
import Dialog from '../../views/popup/Dialog'
import Warn from './components/Warn'
import IndexStatistics from './components/IndexStatistics'
 
// import '@/components/base-page/SolidWaste/directive/dir'
// import '@/components/plugin/DialogDrag'
 
import bus from '@/eventBus'
 
export default {
  name: 'summary-sheet.vue',
  components: {
    tabHandover,
    Dialog,
    Warn,
    IndexStatistics
    // Dialog
  },
  data () {
    return {
      summaryVisible: false,
      dialogShow: false,
      comp: Warn,
      warnVisible: false,
      companyVisible: false,
      selectGroup: false
    }
  },
  mounted () {
    const that = this
    // 监听是否点击了当前图标按钮
    bus.$on('changeState', function (state) {
      if (state.num !== 2 && state.type) {
        that.selectGroup = false
      }
    })
    // 外部调用 与报警弹框
    bus.$on('forecastWarningDetails', function (state) {
      that.showWarnDialog()
    })
    // 子组件事件控制当前变量
    this.$nextTick(() => {
      this.$refs.summarySheets.$on('closeDialog', () => {
        that.summaryVisible = false
      })
      this.$refs.warnDialog.$on('closeDialog', () => {
        that.warnVisible = false
      })
      this.$refs.indexStatisticsDialog.$on('closeDialog', () => {
        that.companyVisible = false
      })
    })
  },
  methods: {
    closeBtn () {
      this.$refs.summarySheets.show()
      this.summaryVisible = true
    },
    showWarnDialog () {
      this.$refs.warnDialog.show()
      this.warnVisible = true
    },
    showStatisDialog () {
      this.$refs.indexStatisticsDialog.show()
      this.companyVisible = true
    },
    subtopicBtn () {
      this.selectGroup = !this.selectGroup
      const state = {
        type: this.selectGroup,
        num: 2
      }
      bus.$emit('changeState', state)
    }
  }
}
</script>
 
<style lang="less">
    .summary-sheets {
        position: absolute;
        display: inline-flex;
        overflow: hidden;
        top: 0.42979rem;
        left: 0.14583rem;
        /*width: 850px;*/
        /*height: 265px;*/
        z-index: 500;
 
        .subtopic {
            display: inline-flex;
 
            .iconBtn {
                margin-left: 0.03rem;
                border-color: #00fff6;
                color: #00fff6;
            }
 
            .iconBtn.active-button {
                //border-color:#00fff6 !important;
                //color:#00fff6 !important;
            }
        }
 
        .dialog {
            //width: 800px;
            //height: 300px;
            position: absolute;
            top: 15%;
            left: 3rem;
        }
 
        .animationChange-enter-active, .animationChange-leave-active {
            transition: all 0.5s;
        }
 
        .animationChange-enter, .animationChange-leave-to {
            opacity: 0;
            transform: translateX(-100px);
        }
 
        /*color: #fff;*/
 
        .el-icon-c-scale-to-original {
            width: 30px;
            height: 30px;
            font-size: 30px;
        }
 
        .el-dialog.el-dialog--center {
            left: 0.5rem;
            top: 0.73979rem;
        }
 
    }
</style>