| | |
| | | <div class="border_corner border_corner_left_bottom"></div> |
| | | <div class="border_corner border_corner_right_bottom"></div> |
| | | <ul class="tab"> |
| | | <li @click='tabTaggle("ECharts")'>实时数据</li> |
| | | <li @click='tabTaggle("Echarts")'>实时数据</li> |
| | | <li @click='tabTaggle("EChartsHour")'>小时数据</li> |
| | | <li @click='tabTaggle("ECharts")'>日数据</li> |
| | | <li @click='tabTaggle("EChartsDate")'>日数据</li> |
| | | <li @click='tabTaggle("ECharts")'>人工数据</li> |
| | | </ul> |
| | | <div class="legend" > |
| | | <span >正常</span> |
| | | <i style=" background: #4ec99c;"></i> |
| | | <span >预警</span> |
| | | <i style=" background: red;"></i> |
| | | <span >超标</span> |
| | | <i style=" background: orange;"></i> |
| | | </div> |
| | | <component :is="currentTab" v-bind="$attrs"></component> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import EChartsHour from './EChartsHour' |
| | | import EChartsDate from './EChartsDate' |
| | | |
| | | export default { |
| | | name: 'PublicChart', |
| | | components: { |
| | | EChartsHour |
| | | EChartsHour, |
| | | EChartsDate |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | methods: { |
| | | tabTaggle (taggleMenu) { |
| | | this.currentTab = taggleMenu |
| | | debugger |
| | | // debugger |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | .win { |
| | | position: relative; |
| | | margin-bottom: 13px; |
| | | /*margin-bottom: 13px;*/ |
| | | background-color: rgba(33, 41, 69, 0.9); |
| | | border: 0.8px solid #396d83; |
| | | height: 1.5rem; |
| | | /*height: 1.5rem;*/ |
| | | } |
| | | |
| | | .border_corner { |
| | |
| | | .tab { |
| | | display: flex; |
| | | border-bottom: 1px solid #396d83; |
| | | margin-bottom: 10px; |
| | | padding:5px 10px |
| | | } |
| | | |
| | | li { |
| | | .tab li { |
| | | background-color: #243a55; |
| | | margin: 10px 10px 2px 10px; |
| | | /*padding: 5px 10px;*/ |
| | | width: 90px; |
| | | height: 25px; |
| | | line-height: 25px; |
| | | text-align: center; |
| | | border-radius: 5px; |
| | | margin-right: 10px; |
| | | padding:0 15px |
| | | } |
| | | |
| | | ul li:hover { |
| | | .tab li:hover { |
| | | background-color: #0e639e; |
| | | color: #682000; |
| | | cursor: pointer; |
| | | } |
| | | .legend{ |
| | | position: absolute; |
| | | top:10px; |
| | | right: 0; |
| | | display: flex; |
| | | justify-items: center; |
| | | } |
| | | .legend i { |
| | | display: block; |
| | | width: 35px; |
| | | height: 15px; |
| | | margin:0 10px 0 3px; |
| | | border-radius: 3px; |
| | | } |
| | | .legend span{ |
| | | line-height: 15px; |
| | | } |
| | | |
| | | </style> |