From bed3a5fd547a75988f99c24c0a43d29db29d2d49 Mon Sep 17 00:00:00 2001 From: wangqi <magical1908@outlook.com> Date: 星期五, 09 四月 2021 10:48:27 +0800 Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop --- src/assets/css/map/map-panel-style.less | 9 ++++ src/components/BaseNav/PublicBounced/GasComponents/Echarts.vue | 59 +++++++++++++++++++---------- src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue | 5 -- src/components/BaseNav/PublicBounced/GasComponents/PublicTabs.vue | 4 +- src/components/BaseNav/PublicBounced/PublicBounced.vue | 2 5 files changed, 50 insertions(+), 29 deletions(-) diff --git a/src/assets/css/map/map-panel-style.less b/src/assets/css/map/map-panel-style.less index 48fc68b..46bf141 100644 --- a/src/assets/css/map/map-panel-style.less +++ b/src/assets/css/map/map-panel-style.less @@ -364,6 +364,13 @@ .el-table tbody tr:hover>td { background-color:#28304d !important; } +//淇敼琛ㄦ牸楂樺害 +.el-table td { + padding: 0!important; + height: 30px; + line-height: 30px; + font-size: 0.01rem !important; +} /***********************************************鍔ㄧ敾鏁堟灉************/ .transition{ transition: all .5s; @@ -411,5 +418,5 @@ } .el-tabs__header .is-top { - + } diff --git a/src/components/BaseNav/PublicBounced/GasComponents/Echarts.vue b/src/components/BaseNav/PublicBounced/GasComponents/Echarts.vue index 3ac2e52..ad97760 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/Echarts.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/Echarts.vue @@ -1,5 +1,5 @@ <template> - <div style="width:100%;height:2rem;" ref="echarts"></div> + <div style="width:100%;height:2rem;margin-top: 0.3rem" ref="echarts"></div> </template> <script> @@ -13,25 +13,18 @@ data () { return { myChart: [], - dataDate: [], + result: [], + days: dayjs(new Date()).format('YYYYMMDDHHmmss'), value: '', seriesData: [], - aseries: '', - result: [], - days: dayjs(new Date()).format('YYYYMMDDHHmmss') + aseries: '' } }, methods: { - drawChart (result) { - // const result = this.result + drawChart () { this.myChart = this.$echarts.init(this.$refs.echarts) - // setInterval(function () { - // }, 3000) const option = { - title: { - text: '鎶樼嚎鍥惧爢鍙�' - }, tooltip: { trigger: 'axis' }, @@ -39,7 +32,7 @@ data: ['閭欢钀ラ攢', '鑱旂洘骞垮憡', '瑙嗛骞垮憡', '鐩存帴璁块棶', '鎼滅储寮曟搸'] }, grid: { - containLabel: true + containLabel: false }, toolbox: { feature: { @@ -51,17 +44,22 @@ xAxis: { type: 'category', boundaryGap: false, - // data: seriesData, + splitLine: { + show: false + }, + // data: this.seriesData, data: ['鍛ㄤ竴', '鍛ㄤ簩', '鍛ㄤ笁', '鍛ㄥ洓', '鍛ㄤ簲', '鍛ㄥ叚', '鍛ㄦ棩'], axisLine: { lineStyle: { color: '#FFFFFF', - width: 1 + // width: 1 + show: false } } }, yAxis: { type: 'value', + boundaryGap: [0, '100%'], axisLine: { lineStyle: { color: '#FFFFFF', @@ -71,10 +69,11 @@ }, series: [ { - name: '閭欢钀ラ攢', + name: '妯℃嫙鏁版嵁', type: 'line', - stack: '鎬婚噺', - data: [120, 132, 101, 134, 90, 230, 210] + // showSymbol: false, + // hoverAnimation: false, + data: this.seriesData }, { name: '鑱旂洘骞垮憡', @@ -114,6 +113,23 @@ } const result = await mapApi.DataItems(data) this.result = result.data + for (let i = 0; i < result.length; i++) { + // // console.log(result[i]) + + // const seriesData = [] + const aseries = [] + // let nameData = '' + + this.seriesData.push(result[i].ReadTime) + aseries.push(result[i].TagValue) + // nameData = result[i].UnionTagCode + this.aseries = result[i].UnionTagCode + } + this.myChart.setOption({ + series: [{ + data: this.seriesData + }] + }) }, // 鏁版嵁鐨勮姹� requestEcharts () { @@ -130,18 +146,18 @@ for (let i = 0; i < result.length; i++) { // // console.log(result[i]) - const seriesData = [] + // const seriesData = [] const aseries = [] // let nameData = '' - seriesData.push(result[i].ReadTime) + this.seriesData.push(result[i].ReadTime) aseries.push(result[i].TagValue) // nameData = result[i].UnionTagCode this.aseries = result[i].UnionTagCode } this.myChart.setOption({ series: [{ - data: data + data: this.seriesData }] }) }, 3000) @@ -151,6 +167,7 @@ this.$nextTick(() => { this.requestEcharts() this.drawChart() + this.echartsData() }) } } diff --git a/src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue b/src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue index fed1e41..65558af 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue @@ -7,8 +7,7 @@ <div class="border_corner border_corner_right_bottom"></div> <div class="main"> <div class="main-table"> - <el-table :data="listData" style="width: 100%" stripe='stripe' - tooltip-effect="dark" :row-class-name="tableRowClassName"> + <el-table :data="listData" style="width: 100%" height="200px" :row-class-name="tableRowClassName"> <el-table-column v-for="(item, index) in listLabel" :key="index" :prop="item.prop" :label="item.label"></el-table-column> </el-table> @@ -84,8 +83,6 @@ .win { position: relative; background-color: rgba(33, 41, 69, 0.9); - //width: 6rem; - height: 1.5rem; } .main { diff --git a/src/components/BaseNav/PublicBounced/GasComponents/PublicTabs.vue b/src/components/BaseNav/PublicBounced/GasComponents/PublicTabs.vue index 817aed1..3df30bb 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/PublicTabs.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/PublicTabs.vue @@ -87,7 +87,7 @@ .main-matter { font-size: 13px; font-weight: normal; - padding: 0px 6px; + padding: 0 6px; border: 1px solid #396d83; .row-item-one { @@ -128,7 +128,7 @@ align-items: center; justify-content: space-around; flex-wrap: wrap; - line-height: 35px; + line-height: 30px; li { text-align: center; diff --git a/src/components/BaseNav/PublicBounced/PublicBounced.vue b/src/components/BaseNav/PublicBounced/PublicBounced.vue index d3e18d3..5a43649 100644 --- a/src/components/BaseNav/PublicBounced/PublicBounced.vue +++ b/src/components/BaseNav/PublicBounced/PublicBounced.vue @@ -39,7 +39,7 @@ export default { name: 'PublicBounced', components: { - // Echarts + // Echarts, PublicTabs, PublicTable, PublicChart, -- Gitblit v1.8.0