From a19ce43fb54c9d5e3aeb237ca3b2ca2f2abe0ba8 Mon Sep 17 00:00:00 2001 From: zhangshuaibao <15731629597@163.com> Date: 星期三, 14 四月 2021 10:38:08 +0800 Subject: [PATCH] 废水图标完善 --- src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue | 203 ++++++++++++++++++++++++++++++++------------------ 1 files changed, 129 insertions(+), 74 deletions(-) diff --git a/src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue b/src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue index db99764..e4d0a61 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue @@ -4,100 +4,155 @@ <div class="border_corner border_corner_right_top"></div> <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("ECharts")'>鏈堟暟鎹�</li> - <li @click='tabTaggle("ECharts")'>浜哄伐鏁版嵁</li> + <ul class="tab" v-if="this.$attrs.value === 'feiqi'"> + <li :class="active==0?'hover':''" @click='tabTaggle("ECharts",0)'>瀹炴椂鏁版嵁</li> + <li :class="active==1?'hover':''" @click='tabTaggle("EChartsHour",1)'>灏忔椂鏁版嵁</li> + <li :class="active==2?'hover':''" @click='tabTaggle("EChartsDate",2)'>鏃ユ暟鎹�</li> + <li :class="active==3?'hover':''" @click='tabTaggle("EChartsTable",3)'>浜哄伐鏁版嵁</li> </ul> - <component :is="currentTab"></component> + <ul class="tab" v-else> + <li :class="active==0?'hover':''" @click='tabTaggle("EChartsRealWasteWater",0)'>瀹炴椂鏁版嵁</li> + <li :class="active==1?'hover':''" @click='tabTaggle("EChartsHourWasteWater",1)'>灏忔椂鏁版嵁</li> + <li :class="active==2?'hover':''" @click='tabTaggle("EChartsDateWasteWater",2)'>鏃ユ暟鎹�</li> + <li :class="active==3?'hover':''" @click='tabTaggle("EChartsWasteWaterTable",3)'>浜哄伐鏁版嵁</li> + </ul> + <div class="legend" > + <span >姝e父</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" ref="Echatrs"></component> </div> </template> <script> -import ECharts from './ECharts' +import ECharts from './Echarts' +import EChartsHour from './EChartsHour' +import EChartsDate from './EChartsDate' +import EChartsTable from './EChartsTable' + +import EChartsRealWasteWater from './EChartsRealWasteWater' +import EChartsHourWasteWater from './EChartsHourWasteWater' +import EChartsDateWasteWater from './EChartsDateWasteWater' +import EChartsWasteWaterTable from './EChartsWasteWaterTable' export default { name: 'PublicChart', components: { - ECharts + EChartsHour, + EChartsDate, + ECharts, + EChartsTable, + EChartsHourWasteWater, + EChartsDateWasteWater, + EChartsRealWasteWater, + EChartsWasteWaterTable + }, + mounted () { + this.$refs.Echatrs.CreateChart() }, data () { return { - currentTab: 'ECharts' + currentTab: 'EChartsHour', + active: '1' } }, methods: { - tabTaggle (taggleMenu) { + tabTaggle (taggleMenu, num) { this.currentTab = taggleMenu + this.active = num + // debugger } } } </script> -<style scoped> - *{ - margin: 0; - padding: 0; - list-style: none; - } - .win { - position: relative; - margin-bottom: 13px; - background-color: rgba(33, 41, 69,0.9); - border: 0.8px solid #396d83; - } - .border_corner{ - z-index: 999; - position: absolute; - width: 10px; - height: 10px; - background: rgba(0,0,0,0); - border: 1.5px solid #47d5ea; - } - .border_corner_left_top{ - top: 0; - left: 0; - border-right: none; - border-bottom: none; - } - .border_corner_right_top{ - top: 0; - right: 0; - border-left: none; - border-bottom: none; - } - .border_corner_left_bottom{ - bottom: 0; - left: 0; - border-right: none; - border-top: none; - } - .border_corner_right_bottom{ - bottom: 0; - right: 0; - border-left: none; - border-top: none; - } - .tab{ - display: flex; - border-bottom: 1px solid #396d83; - margin-bottom: 10px; - } - 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; - } - ul li:hover{ - background-color: #0e639e; - color: #682000; - cursor: pointer; - } +<style scoped lang="less"> +.win { + position: relative; + /*margin-bottom: 13px;*/ + background:@background-color; + border: 0.8px solid #396d83; + /*height: 1.5rem;*/ +} + +.border_corner { + z-index: 999; + position: absolute; + width: 10px; + height: 10px; + background: rgba(0, 0, 0, 0); + border: 1.5px solid #47d5ea; +} + +.border_corner_left_top { + top: 0; + left: 0; + border-right: none; + border-bottom: none; +} + +.border_corner_right_top { + top: 0; + right: 0; + border-left: none; + border-bottom: none; +} + +.border_corner_left_bottom { + bottom: 0; + left: 0; + border-right: none; + border-top: none; +} + +.border_corner_right_bottom { + bottom: 0; + right: 0; + border-left: none; + border-top: none; +} + +.tab { + display: flex; + border-bottom: 1px solid #396d83; + padding:5px 10px +} + +.tab li { + background-color: #243a55; + line-height: 25px; + text-align: center; + border-radius: 5px; + margin-right: 10px; + padding:0 15px +} +.tab li.hover, +.tab li:hover { + background-color: #0e639e; + color: #fff; + 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> -- Gitblit v1.8.0