From 86a3bf670a40559a8e72021925435492667f40d0 Mon Sep 17 00:00:00 2001 From: chenzeping <ChenZeping02609@163.com> Date: 星期二, 20 四月 2021 13:51:47 +0800 Subject: [PATCH] 图表部分修改 --- src/components/BaseNav/PublicBounced/common/echarts/EChartsDate.vue | 330 ++++--- src/components/LayerController/logic/WasteGas.js | 10 /dev/null | 3 src/components/BaseNav/WasteWater/RealData.vue | 1534 ++++++++++++++++++++++--------------- src/components/BaseNav/WasteWater/WasteWaterIndex.vue | 133 ++ src/components/LayerController/logic/WasteWater.js | 34 src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue | 250 +++-- src/components/LayerController/logic/WasteSolid.js | 34 src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js | 4 src/Sgis.js | 8 src/components/BaseNav/WasteWater/PublicTabs.vue | 43 11 files changed, 1,379 insertions(+), 1,004 deletions(-) diff --git a/src/Sgis.js b/src/Sgis.js index d46bfc2..fda9cf2 100644 --- a/src/Sgis.js +++ b/src/Sgis.js @@ -1,6 +1,4 @@ - // 鍒濆鍖栨樉绀� - import MapConfig from '@/conf/MapConfig' import '@components/plugin/PathDashFlow' // 娴佸姩绾垮浘 import DownLoad from '@components/plugin/DownLoad' @@ -18,6 +16,10 @@ import '@components/plugin/pulse/Pulse.css' // marker 澶栧湀娉� css import BasemapHelper from '@components/helpers/BasemapHelper' import VectorLayerHelper from '@components/helpers/VectorLayerHelper' + +// import eventBus from '@/eventBus' +import eventBus from './eventBus' + let map = null const L = window.L const initMap = (div, mapOption) => { @@ -32,6 +34,8 @@ console.log(event, a, b) }) + eventBus.$emit('map-obj', map) + window.map = map window.L = L diff --git a/src/components/BaseNav/PublicBounced/common/echarts/EChartsDate.vue b/src/components/BaseNav/PublicBounced/common/echarts/EChartsDate.vue index 438dcd0..6cde22c 100644 --- a/src/components/BaseNav/PublicBounced/common/echarts/EChartsDate.vue +++ b/src/components/BaseNav/PublicBounced/common/echarts/EChartsDate.vue @@ -1,51 +1,51 @@ <!-- 鏃ユ暟鎹� --> <template> <div id="Tab"> -<public-data-standard :dataStandard = "dataStandard"></public-data-standard> + <public-data-standard :dataStandard="dataStandard"></public-data-standard> <div class="form-echrts"> <div class="from-search"> <div class="pickerMon"> <div class="pickerData"> <span> 寮�濮嬫椂闂�:</span> <span class="pickerTable"> - <el-date-picker type="datetime" v-model="formInline.timeStart"></el-date-picker> + <el-date-picker type="datetime" v-model="formInline.timeStart"></el-date-picker> </span> </div> <div class="pickerData"> - <span >缁撴潫鏃堕棿:</span> + <span>缁撴潫鏃堕棿:</span> <span class="pickerTable"> - <el-date-picker type="datetime" v-model="formInline.timeEnd"></el-date-picker> + <el-date-picker type="datetime" v-model="formInline.timeEnd"></el-date-picker> </span> </div> </div> -<!-- <div>--> -<!-- 閲囨牱鐐规暟:--> -<!-- <el-select v-model="formInline.region" placeholder="50">--> -<!-- <el-option label="0" value="0"></el-option>--> -<!-- <el-option label="25" value="25"></el-option>--> -<!-- <el-option label="50" value="50"></el-option>--> -<!-- <el-option label="75" value="75"></el-option>--> -<!-- <el-option label="100" value="100"></el-option>--> -<!-- </el-select>--> -<!-- </div>--> - <div class="detailbtn hover-bottom" @click="onSubmit">鏌ヨ</div> - <div class="detailbtn hover-bottom" @click="dialogVisible = true" >鏄庣粏琛�</div> + <!-- <div>--> + <!-- 閲囨牱鐐规暟:--> + <!-- <el-select v-model="formInline.region" placeholder="50">--> + <!-- <el-option label="0" value="0"></el-option>--> + <!-- <el-option label="25" value="25"></el-option>--> + <!-- <el-option label="50" value="50"></el-option>--> + <!-- <el-option label="75" value="75"></el-option>--> + <!-- <el-option label="100" value="100"></el-option>--> + <!-- </el-select>--> + <!-- </div>--> + <div class="detailbtn hover-bottom" @click="onSubmit">鏌ヨ</div> + <div class="detailbtn hover-bottom" @click="dialogVisible = true">鏄庣粏琛�</div> </div> <div style="width:5rem;height:1.5rem;" id="echarts" ref="main"> </div> </div> -<!-- <!– 鏄庣粏寮规 –>--> -<!-- <el-dialog :visible.sync="dialogVisible"--> -<!-- :append-to-body="true"--> -<!-- :title="this.$attrs.value==='feiqi'?this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName:this.$attrs.getWasteWaterMonitoringDetails[0].OnLineMonEmissPointName"--> -<!-- width="68%"--> -<!-- center--> -<!-- v-dialogDrag--> -<!-- >--> -<!-- <div class="el-dialog-div" style="height: 500px">--> -<!-- <public-detailed-list v-bind="$attrs"></public-detailed-list>--> -<!-- </div>--> -<!-- </el-dialog>--> + <!-- <!– 鏄庣粏寮规 –>--> + <!-- <el-dialog :visible.sync="dialogVisible"--> + <!-- :append-to-body="true"--> + <!-- :title="this.$attrs.value==='feiqi'?this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName:this.$attrs.getWasteWaterMonitoringDetails[0].OnLineMonEmissPointName"--> + <!-- width="68%"--> + <!-- center--> + <!-- v-dialogDrag--> + <!-- >--> + <!-- <div class="el-dialog-div" style="height: 500px">--> + <!-- <public-detailed-list v-bind="$attrs"></public-detailed-list>--> + <!-- </div>--> + <!-- </el-dialog>--> </div> </template> @@ -74,20 +74,44 @@ }, info: this.series, dataStandard: [{ - current: { name: '姘哀鍖栫墿1', val: 29.93 }, - standard: { name: '鏍囧噯', val: 100 } + current: { + name: '姘哀鍖栫墿1', + val: 29.93 + }, + standard: { + name: '鏍囧噯', + val: 100 + } }, { - current: { name: '浜屾哀鍖栫~', val: 17.34 }, - standard: { name: '鏍囧噯', val: 50 } + current: { + name: '浜屾哀鍖栫~', + val: 17.34 + }, + standard: { + name: '鏍囧噯', + val: 50 + } }, { - current: { name: '鐑熷皹', val: 6.93 }, - standard: { name: '鏍囧噯', val: 30 } + current: { + name: '鐑熷皹', + val: 6.93 + }, + standard: { + name: '鏍囧噯', + val: 30 + } }, { - current: { name: '搴熸皵娴侀噺', val: 120343.18 }, - standard: { name: '', val: null } + current: { + name: '搴熸皵娴侀噺', + val: 120343.18 + }, + standard: { + name: '', + val: null + } } ], JsonDayCharts: { @@ -136,8 +160,20 @@ ], xdata: ['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鏃�'], ydatas: [ - { name: '姘哀鍖栫墿', data: ['40.01', '44.38', '44.71', '40.43', '42.79', '46.00', '52.66', '48.75', '45.75', '49.24', '54.22', '52.25', '53.34', '65.72', '60.01', '54.20', '48.37', '45.56', '42.58', '40.96', '45.14', '49.31', '54.21', '57.89', '51.18', '60.21', '57.76', '60.33', '48.34', '45.66', '53.38'], zdcbcolor: 'red', zxcolor: '#00B0F0', bzz: 100 }, - { name: '浜屾哀鍖栫~', data: ['9.22', '8.07', '8.69', '9.16', '6.25', '5.78', '15.91', '3232992.75', '11.34', '13.63', '14.13', '11.47', '8.48', '9.46', '7.85', '5.91', '4.64', '4.77', '6.99', '5.82', '5.59', '5.30', '6.62', '9.00', '13.35', '2.68', '1.89', '0.70', '3.68', '6.25', '5.14'], zdcbcolor: 'red', zxcolor: '#fff21c', bzz: 50 }, + { + name: '姘哀鍖栫墿', + data: ['40.01', '44.38', '44.71', '40.43', '42.79', '46.00', '52.66', '48.75', '45.75', '49.24', '54.22', '52.25', '53.34', '65.72', '60.01', '54.20', '48.37', '45.56', '42.58', '40.96', '45.14', '49.31', '54.21', '57.89', '51.18', '60.21', '57.76', '60.33', '48.34', '45.66', '53.38'], + zdcbcolor: 'red', + zxcolor: '#00B0F0', + bzz: 100 + }, + { + name: '浜屾哀鍖栫~', + data: ['9.22', '8.07', '8.69', '9.16', '6.25', '5.78', '15.91', '3232992.75', '11.34', '13.63', '14.13', '11.47', '8.48', '9.46', '7.85', '5.91', '4.64', '4.77', '6.99', '5.82', '5.59', '5.30', '6.62', '9.00', '13.35', '2.68', '1.89', '0.70', '3.68', '6.25', '5.14'], + zdcbcolor: 'red', + zxcolor: '#fff21c', + bzz: 50 + }, { name: '搴熸皵娴侀噺', data: ['2827518.25', '2763525.75', '2776435.50', '2742003.50', '2856001.75', '2890287.00', '2832898.25', '2803715.50', '2513925.75', '2753303.50', '2749836.00', '2786188.50', '2738838.00', '2733660.25', '2815521.25', '2830217.25', '2798918.00', '2803543.50', '2770175.25', '2823321.25', '2856329.25', '2801588.00', '2798103.50', '2766343.00', '2750489.50', '2697786.25', '2796775.50', '2808028.50', '2813561.75', '2757129.25', '2720755.50'], @@ -145,7 +181,13 @@ zxcolor: '#9ACD32', bzz: null }, - { name: '鐑熷皹', data: ['3.88', '3.48', '3.85', '3.99', '3.99', '4.48', '3.96', '3.36', '2.79', '4.65', '4.70', '5.08', '4.55', '4.90', '4.43', '3.10', '2.64', '2.84', '2.63', '2.69', '2.56', '2.32', '2.51', '3.29', '3.40', '3.06', '2.94', '2.90', '2.80', '3.07', '4.55'], zdcbcolor: 'red', zxcolor: '#f48183', bzz: 30 } + { + name: '鐑熷皹', + data: ['3.88', '3.48', '3.85', '3.99', '3.99', '4.48', '3.96', '3.36', '2.79', '4.65', '4.70', '5.08', '4.55', '4.90', '4.43', '3.10', '2.64', '2.84', '2.63', '2.69', '2.56', '2.32', '2.51', '3.29', '3.40', '3.06', '2.94', '2.90', '2.80', '3.07', '4.55'], + zdcbcolor: 'red', + zxcolor: '#f48183', + bzz: 30 + } ], yname: ' 娴撳害(mg/m鲁)', // id:'mychartDay', @@ -213,17 +255,17 @@ itemStyle: { normal: { color: function (c) { // 鏍规嵁value 鏄剧ず涓嶅悓鐨勬姌鐐归鑹� - // var biaozhuiz - // for (var i = 0; i < exhbzzList.length; i++) { - // if (exhbzzList[i].name == c.seriesName) { - // biaozhuiz = exhbzzList[i].bzhui - // } - // } - // if (c.value > 999999999999) { - // return zdcbcolor - // } else { - // return '#33c95f' - // } + // var biaozhuiz + // for (var i = 0; i < exhbzzList.length; i++) { + // if (exhbzzList[i].name == c.seriesName) { + // biaozhuiz = exhbzzList[i].bzhui + // } + // } + // if (c.value > 999999999999) { + // return zdcbcolor + // } else { + // return '#33c95f' + // } }, lineStyle: { // 鎶樼嚎鐨勯鑹� color: ydatas[i].zxcolor, @@ -247,19 +289,19 @@ itemStyle: { normal: { color: function (c) { // 鏍规嵁value 鏄剧ず涓嶅悓鐨勬姌鐐归鑹� - // var biaozhuiz - // for (var i = 0; i < exhbzzList.length; i++) { - // if (exhbzzList[i].name == c.seriesName) { - // biaozhuiz = exhbzzList[i].bzhui - // } - // } - // if (c.value > biaozhuiz) { - // return zdcbcolor - // } else if (c.value > biaozhuiz * 0.9) { - // return '#FFA500' - // } else { - // return '#33c95f' - // } + // var biaozhuiz + // for (var i = 0; i < exhbzzList.length; i++) { + // if (exhbzzList[i].name == c.seriesName) { + // biaozhuiz = exhbzzList[i].bzhui + // } + // } + // if (c.value > biaozhuiz) { + // return zdcbcolor + // } else if (c.value > biaozhuiz * 0.9) { + // return '#FFA500' + // } else { + // return '#33c95f' + // } }, lineStyle: { // 鎶樼嚎鐨勯鑹� color: ydatas[i].zxcolor, @@ -501,15 +543,15 @@ // }) /** - * 瑙e喅mychartDay.on('click',function(){...})浜嬩欢閲嶅瑙﹀彂鐨勯棶棰� - * Date: 20200720 - */ + * 瑙e喅mychartDay.on('click',function(){...})浜嬩欢閲嶅瑙﹀彂鐨勯棶棰� + * Date: 20200720 + */ this.mychartDay.off('click') /** - * 鍥炬爣鐐瑰嚮浜嬩欢 - * 20190426 add - * */ + * 鍥炬爣鐐瑰嚮浜嬩欢 + * 20190426 add + * */ // this.mychartDay.on('click', function (params) { // // 鑾峰彇褰撳墠鏃堕棿锛屽皬鏃� // var nowHours = new Date().Format('hh') @@ -707,73 +749,89 @@ </script> <style scoped lang="less"> - .form-echrts { - width: 100%; - border-top: 1px solid #396d83; - //margin: 10px 10px 10px 10px; - .from-search{ - display: flex; - padding:0.02rem; - >div{margin-left: 10px} - .pickerMon{ - display: flex; - >div:first-child { - margin-right: 10px; - } - .pickerData{ - flex: 1; - display: flex; - >span{line-height: 22px} - .pickerTable { - margin-left: 3px; - } - } - } - /deep/.el-date-editor--datetime{ - width: 100%; - } - /deep/.el-input__inner{ - position: relative; - width:1rem; - background-color: #2e4967; - color: #fff; - font-size: 0.08rem; - height: 0.15rem; - padding: 0; - border:none; - text-align: center; - z-index: 9999; - //padding-left:20px ; - //padding: 0!important; - } - /deep/.el-input__icon{ - display: block; - width:1rem; - height: 0.15rem; - line-height: 0.15rem; - cursor: pointer; - font-size: 0; - } +.form-echrts { + width: 100%; + border-top: 1px solid #396d83; + //margin: 10px 10px 10px 10px; + .from-search { + display: flex; + padding: 0.02rem; - input::-webkit-calendar-picker-indicator { - opacity: 100; - } - .detailbtn{ - background-color:#2e4967; - text-align: center; - padding: 0 7px; - height: 0.15rem; - line-height: 0.15rem; - border-radius: 4px; - margin-right: 6px; - } - } - .el-dialog-div { - overflow: auto; - } - #echarts { - margin: 0; - padding: 0; - } + > div { + margin-left: 10px } + + .pickerMon { + display: flex; + + > div:first-child { + margin-right: 10px; + } + + .pickerData { + flex: 1; + display: flex; + + > span { + line-height: 22px + } + + .pickerTable { + margin-left: 3px; + } + } + } + + /deep/ .el-date-editor--datetime { + width: 100%; + } + + /deep/ .el-input__inner { + position: relative; + width: 1rem; + background-color: #2e4967; + color: #fff; + font-size: 0.08rem; + height: 0.15rem; + padding: 0; + border: none; + text-align: center; + z-index: 9999; + //padding-left:20px ; + //padding: 0!important; + } + + /deep/ .el-input__icon { + display: block; + width: 1rem; + height: 0.15rem; + line-height: 0.15rem; + cursor: pointer; + font-size: 0; + } + + input::-webkit-calendar-picker-indicator { + opacity: 100; + } + + .detailbtn { + background-color: #2e4967; + text-align: center; + padding: 0 7px; + height: 0.15rem; + line-height: 0.15rem; + border-radius: 4px; + margin-right: 6px; + } + } + + .el-dialog-div { + overflow: auto; + } + + #echarts { + margin: 0; + padding: 0; + } +} </style> diff --git a/src/components/BaseNav/WasteWater/PublicTabs.vue b/src/components/BaseNav/WasteWater/PublicTabs.vue index fbf6c13..4b5b9b1 100644 --- a/src/components/BaseNav/WasteWater/PublicTabs.vue +++ b/src/components/BaseNav/WasteWater/PublicTabs.vue @@ -7,13 +7,13 @@ <div class="main"> <div class="main-matter"> <div> - <ul v-for="(item,index) in setWasteWater" :key="index"> - <li>鐩戞祴鐐瑰悕绉�:{{ item.Name }}</li> - <li>鐢熶骇鍗曚綅:{{ item.porltName }}</li> - <li>鎺掓斁绫诲瀷鍚嶇О:{{ item.MonTypeName }}</li> - <li>鎺掓斁鍘诲悜:{{ item.EmissDirecti }}</li> - <li>鎺у埗绾у埆鍚嶇О:{{ item.ContrLevelShowName }}</li> - <li>鍐�/澶栨帓鏀惧彛:{{ item.OrOutPortName }}</li> + <ul> + <li>鐩戞祴鐐瑰悕绉�:{{ storagePlaceId.Name }}</li> + <li>鐢熶骇鍗曚綅:{{ storagePlaceId.porltName }}</li> + <li>鎺掓斁绫诲瀷鍚嶇О:{{ storagePlaceId.MonTypeName }}</li> + <li>鎺掓斁鍘诲悜:{{ storagePlaceId.EmissDirecti }}</li> + <li>鎺у埗绾у埆鍚嶇О:{{ storagePlaceId.ContrLevelShowName }}</li> + <li>鍐�/澶栨帓鏀惧彛:{{ storagePlaceId.OrOutPortName }}</li> </ul> </div> </div> @@ -22,34 +22,13 @@ </template> <script> -import mapApi from '../../../api/mapApi' +// import mapApi from '../../../api/mapApi' + export default { name: 'WaterTabs', + props: ['storagePlaceId'], data () { - return { - setWasteWater: [] - } - }, - mounted () { - // this.$nextTick(() => { - // this.refsDataTabs() - // }) - }, - methods: { - async refsDataTabs (data) { - // 鍩烘湰淇℃伅 鍜� 璇︾粏淇℃伅 灞曠ず鏁版嵁鎵�闇�鍙傛暟 - // const EpsGisMonPointId = { - // EpsGisMonPointId: data - // } - // 鍩烘湰淇℃伅 tabs - const result = await mapApi.getWasteWater() - // for (var i = 0; i < result.length; i++) { - // if (result[i].Name === data.title) { - // } - // } - this.setWasteWater = result.Result.DataInfo - // return result - } + return {} } } </script> diff --git a/src/components/BaseNav/WasteWater/RealData.vue b/src/components/BaseNav/WasteWater/RealData.vue index fffd525..c96fd27 100644 --- a/src/components/BaseNav/WasteWater/RealData.vue +++ b/src/components/BaseNav/WasteWater/RealData.vue @@ -1,34 +1,24 @@ -<!-- 搴熸按瀹炴椂鏁版嵁 --> <template> <div id="Tab"> - <div class="animation"> - <div class="infomation"> - <span class="grid-content">COD : <i style="color: #e8ee0b">11.24385</i> 鏍囧噯 : <i style="color: #fff">50</i></span> - <span class="grid-content">姘哀 :<i style="color: #e8ee0b">0.1889014</i> 鏍囧噯 : <i style="color: #fff">30</i></span> - <span class="grid-content">鎬荤7 : <i style="color: #e8ee0b">0.03812287</i> 鏍囧噯 : <i style="color: #fff">5</i></span> - <span class="grid-content">搴熸按娴侀噺 : <i style="color: #e8ee0b">32.16287</i></span> - </div> - </div> + <PublicDataStandard :dataStandard="dataStandard"></PublicDataStandard> <div class="form-echrts"> <div class="from-search"> <div class="pickerMon"> <div class="pickerData"> <span> 寮�濮嬫椂闂�:</span> <span class="pickerTable"> - <el-date-picker type="datetime" v-model="formInline.timeStart"> - </el-date-picker> + <el-date-picker type="datetime" v-model="formInline.timeStart"></el-date-picker> </span> </div> <div class="pickerData"> - <span >缁撴潫鏃堕棿:</span> + <span>缁撴潫鏃堕棿:</span> <span class="pickerTable"> - <el-date-picker type="datetime" v-model="formInline.timeEnd"> - </el-date-picker> + <el-date-picker type="datetime" v-model="formInline.timeEnd"></el-date-picker> </span> </div> </div> <div> - 閲囨牱鐐规暟: + <span>閲囨牱鐐规暟:</span> <el-select v-model="formInline.region" placeholder="50"> <el-option label="0" value="0"></el-option> <el-option label="25" value="25"></el-option> @@ -37,353 +27,650 @@ <el-option label="100" value="100"></el-option> </el-select> </div> - <div class="detailbtn" @click="onSubmit">鏌ヨ</div> + <div class="detailbtn" @click="onSubmit">鏌ヨ</div> </div> - <div class="boxChart"> - <div style="width: 5rem;height: 1.5rem;" id="popChart" ref="main"></div> - </div> + <div style="width:5rem;height:2rem;" ref="echarts"></div> </div> </div> </template> <script> + +import PublicDataStandard from '@/components/BaseNav/PublicDataStandard' +import mapApi from '@/api/mapApi' import 'dayjs/locale/es' import dayjs from 'dayjs' export default { name: 'ECharts', + components: { + PublicDataStandard + }, data () { return { - value1: '', - value2: '', - watchData: [], - dialogVisible: false, - myChar: null, - RealTimeChart: null, - value: '', - days: dayjs(new Date()).format('YYYYMMDDHHmmss'), + // tab鏍忎紶閫掓帴鏀舵暟鎹� + dataStandard: [ + { + current: { + name: '姘哀鍖栫墿1', + val: 29.93 + }, + standard: { + name: '鏍囧噯', + val: 100 + } + }, + { + current: { + name: '浜屾哀鍖栫~', + val: 17.34 + }, + standard: { + name: '鏍囧噯', + val: 50 + } + }, + { + current: { + name: '鐑熷皹', + val: 6.93 + }, + standard: { + name: '鏍囧噯', + val: 30 + } + }, + { + current: { + name: '搴熸皵娴侀噺', + val: 120 + }, + standard: { + name: '', + val: null + } + }], + + // echarts鐨勬暟鎹缃� + myChart: null, + + // 寮�濮� /缁撴潫 鏃堕棿 鍜岄噰鏍风偣鍊肩殑缁戝畾鍊兼暟鎹� formInline: { region: '', - timeStart: '2021-04-13 12:47:18', - timeEnd: '2021-04-13 12:52:18' + timeStart: '', + timeEnd: '' }, - JsonRealWasteWater: { - id: 'mycharteff_second ', - title: 'COD', - legend: [ - { - icon: 'image://../assets/imgs/legend/NOX.png', - itemHeight: 5, - itemWidth: 20, - name: '姘ㄦ爱', - textStyle: { color: '#ccc' } - }, - { - icon: 'image://../assets/imgs/legend/YanChen.png', - itemHeight: 5, - itemWidth: 20, - name: '鎬荤7', - textStyle: { color: '#ccc' } - }, - { - icon: 'image://../assets/imgs/legend/SO2.png', - itemHeight: 5, - itemWidth: 20, - name: '鎬绘爱', - textStyle: { color: '#ccc' } - }, - { - icon: 'image://../assets/imgs/legend/NOX.png', - itemHeight: 5, - itemWidth: 20, - name: 'COD', - textStyle: { color: '#ccc' } - }, - { - icon: 'image://../assets/imgs/legend/VOCs.png', - itemHeight: 5, - itemWidth: 20, - name: '搴熸按娴侀噺', - textStyle: { color: '#ccc' } - } - ], - ydatas: [ - { - name: '姘哀', - data: [{ name: '姘哀', value: ['2021/04/13 12:47:18', 0.1900156] }, - { name: '姘哀', value: ['2021/04/13 12:47:33', 0.1902795] }, - { name: '姘哀', value: ['2021/04/13 12:47:48', 0.1892689] }, - { name: '姘哀', value: ['2021/04/13 12:48:03', 0.1882582] }, - { name: '姘哀', value: ['2021/04/13 12:48:18', 0.1882284] }, - { name: '姘哀', value: ['2021/04/13 12:48:33', 0.1886617] }, - { name: '姘哀', value: ['2021/04/13 12:48:48', 0.1873395] }, - { name: '姘哀', value: ['2021/04/13 12:49:03', 0.1866319] }, - { name: '姘哀', value: ['2021/04/13 12:49:18', 0.1895212] }, - { name: '姘哀', value: ['2021/04/13 12:49:33', 0.1898232] }, - { name: '姘哀', value: ['2021/04/13 12:49:48', 0.1880916] }, - { name: '姘哀', value: ['2021/04/13 12:50:03', 0.1883546] }, - { name: '姘哀', value: ['2021/04/13 12:50:18', 0.1907846] }, - { name: '姘哀', value: ['2021/04/13 12:50:33', 0.1887416] }, - { name: '姘哀', value: ['2021/04/13 12:50:48', 0.1873472] }, - { name: '姘哀', value: ['2021/04/13 12:51:03', 0.1886214] }, - { name: '姘哀', value: ['2021/04/13 12:51:18', 0.1891896] }, - { name: '姘哀', value: ['2021/04/13 12:51:33', 0.1891176] }, - { name: '姘哀', value: ['2021/04/13 12:51:48', 0.1890455] }, - { name: '姘哀', value: ['2021/04/13 12:52:03', 0.1889734] }, - { name: '姘哀', value: ['2021/04/13 12:52:18', 0.1889014] }], - zdcbcolor: 'red', - zxcolor: '#00B0F0', - bzz: 3 - }, - { - name: '鎬荤7', - data: [{ name: '鎬荤7', value: ['2021/04/13 12:47:18', 0.03813388] }, - { name: '鎬荤7', value: ['2021/04/13 12:47:33', 0.03813333] }, - { name: '鎬荤7', value: ['2021/04/13 12:47:48', 0.03813278] }, - { name: '鎬荤7', value: ['2021/04/13 12:48:03', 0.03813223] }, - { name: '鎬荤7', value: ['2021/04/13 12:48:18', 0.03813168] }, - { name: '鎬荤7', value: ['2021/04/13 12:48:33', 0.03813113] }, - { name: '鎬荤7', value: ['2021/04/13 12:48:48', 0.03813057] }, - { name: '鎬荤7', value: ['2021/04/13 12:49:03', 0.03813003] }, - { name: '鎬荤7', value: ['2021/04/13 12:49:18', 0.03812947] }, - { name: '鎬荤7', value: ['2021/04/13 12:49:33', 0.03812892] }, - { name: '鎬荤7', value: ['2021/04/13 12:49:48', 0.03812837] }, - { name: '鎬荤7', value: ['2021/04/13 12:50:03', 0.03812782] }, - { name: '鎬荤7', value: ['2021/04/13 12:50:18', 0.03812727] }, - { name: '鎬荤7', value: ['2021/04/13 12:50:33', 0.03812672] }, - { name: '鎬荤7', value: ['2021/04/13 12:50:48', 0.03812617] }, - { name: '鎬荤7', value: ['2021/04/13 12:51:03', 0.03812562] }, - { name: '鎬荤7', value: ['2021/04/13 12:51:18', 0.03812507] }, - { name: '鎬荤7', value: ['2021/04/13 12:51:33', 0.03812452] }, - { name: '鎬荤7', value: ['2021/04/13 12:51:48', 0.03812397] }, - { name: '鎬荤7', value: ['2021/04/13 12:52:03', 0.03812342] }, - { name: '鎬荤7', value: ['2021/04/13 12:52:18', 0.03812287] }], - zdcbcolor: 'red', - zxcolor: '#f48183', - bzz: 0.3 - }, - { - name: '鎬绘爱', - data: [{ name: '鎬绘爱', value: ['2021/04/13 12:47:18', 2.779342] }, - { name: '鎬绘爱', value: ['2021/04/13 12:47:33', 2.779337] }, - { name: '鎬绘爱', value: ['2021/04/13 12:47:48', 2.779331] }, - { name: '鎬绘爱', value: ['2021/04/13 12:48:03', 2.779823] }, - { name: '鎬绘爱', value: ['2021/04/13 12:48:18', 2.779321] }, - { name: '鎬绘爱', value: ['2021/04/13 12:48:33', 2.779344] }, - { name: '鎬绘爱', value: ['2021/04/13 12:48:48', 2.779452] }, - { name: '鎬绘爱', value: ['2021/04/13 12:49:03', 2.779224] }, - { name: '鎬绘爱', value: ['2021/04/13 12:49:18', 2.779133] }, - { name: '鎬绘爱', value: ['2021/04/13 12:49:33', 2.779445] }, - { name: '鎬绘爱', value: ['2021/04/13 12:49:48', 2.779743] }, - { name: '鎬绘爱', value: ['2021/04/13 12:50:03', 2.779332] }, - { name: '鎬绘爱', value: ['2021/04/13 12:50:18', 2.779562] }, - { name: '鎬绘爱', value: ['2021/04/13 12:50:33', 2.779560] }, - { name: '鎬绘爱', value: ['2021/04/13 12:50:48', 2.779534] }, - { name: '鎬绘爱', value: ['2021/04/13 12:51:03', 2.779412] }, - { name: '鎬绘爱', value: ['2021/04/13 12:51:18', 2.779673] }, - { name: '鎬绘爱', value: ['2021/04/13 12:51:33', 2.779452] }, - { name: '鎬绘爱', value: ['2021/04/13 12:51:48', 2.779397] }, - { name: '鎬绘爱', value: ['2021/04/13 12:52:03', 2.779342] }, - { name: '鎬绘爱', value: ['2021/04/13 12:52:18', 2.779287] }], - zdcbcolor: 'red', - zxcolor: '#e0ffff', - bzz: 15 - }, - { - name: '搴熸按娴侀噺', - data: [{ name: '搴熸按娴侀噺', value: ['2021/04/13 12:47:18', 31.63029] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:47:33', 31.9791] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:47:48', 31.92095] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:48:03', 32.05784] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:48:18', 32.01669] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:48:33', 32.39344] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:48:48', 32.66452] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:49:03', 32.45224] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:49:18', 32.42133] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:49:33', 32.88445] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:49:48', 32.36743] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:50:03', 32.83332] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:50:18', 32.15562] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:50:33', 32.61560] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:50:48', 32.89534] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:51:03', 32.72412] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:51:18', 32.48673] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:51:33', 32.03452] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:51:48', 32.93397] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:52:03', 32.84342] }, - { name: '搴熸按娴侀噺', value: ['2021/04/13 12:52:18', 32.16287] }], - zdcbcolor: 'red', - zxcolor: '#9ACD32', - bzz: null - }, - { - name: 'COD', - data: [{ name: 'COD', value: ['2021/04/13 12:47:18', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:47:33', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:47:48', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:48:03', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:48:18', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:48:33', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:48:48', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:49:03', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:49:18', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:49:33', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:49:48', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:50:03', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:50:18', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:50:33', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:50:48', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:51:03', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:51:18', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:51:33', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:51:48', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:52:03', 11.24385] }, - { name: 'COD', value: ['2021/04/13 12:52:18', 11.24385] }], - zdcbcolor: 'red', - zxcolor: '#fff21c', - bzz: 35 - } - ], - yname: ' 娴撳害(mg/l)' + + // echarts鐨刼ptions鏁版嵁浼犲叆 + echartsOptions: { + legend: [], + ydatas: [], + yname: ' 娴撳害(mg/m鲁)' }, + JSONTimeData: { id: 21, - unionTagCodeList: ['TJIP45.rl3AT25035', 'TJIP45.rl3AT25033', 'TJIP45.rl3FT35032', 'TJIP45.rl3AT25034'] - }, - res: [{ UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 36.02153, ReadTime: '2021/04/14 03:59:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 35.7473, ReadTime: '2021/04/14 03:59:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 35.56014, ReadTime: '2021/04/14 04:00:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 35.59335, ReadTime: '2021/04/14 04:00:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 34.49617, ReadTime: '2021/04/14 04:00:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 34.33835, ReadTime: '2021/04/14 04:00:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 34.93116, ReadTime: '2021/04/14 04:01:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 35.831, ReadTime: '2021/04/14 04:01:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 36.67476, ReadTime: '2021/04/14 04:01:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 38.04687, ReadTime: '2021/04/14 04:01:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 37.78848, ReadTime: '2021/04/14 04:02:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 38.03456, ReadTime: '2021/04/14 04:02:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 37.81089, ReadTime: '2021/04/14 04:02:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 39.28693, ReadTime: '2021/04/14 04:02:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 39.79956, ReadTime: '2021/04/14 04:03:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 40.11547, ReadTime: '2021/04/14 04:03:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 40.72007, ReadTime: '2021/04/14 04:03:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 43.11903, ReadTime: '2021/04/14 04:03:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 44.28426, ReadTime: '2021/04/14 04:04:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 45.07601, ReadTime: '2021/04/14 04:04:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25035', TagValue: 43.81406, ReadTime: '2021/04/14 04:04:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.312585, ReadTime: '2021/04/14 03:59:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.507234, ReadTime: '2021/04/14 03:59:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.383248, ReadTime: '2021/04/14 04:00:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.385284, ReadTime: '2021/04/14 04:00:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.719143, ReadTime: '2021/04/14 04:00:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.730373, ReadTime: '2021/04/14 04:00:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.602137, ReadTime: '2021/04/14 04:01:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.459584, ReadTime: '2021/04/14 04:01:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.313675, ReadTime: '2021/04/14 04:01:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.305554, ReadTime: '2021/04/14 04:01:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.911544, ReadTime: '2021/04/14 04:02:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.744454, ReadTime: '2021/04/14 04:02:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.267665, ReadTime: '2021/04/14 04:02:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.606314, ReadTime: '2021/04/14 04:02:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.599967, ReadTime: '2021/04/14 04:03:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 1.939136, ReadTime: '2021/04/14 04:03:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.03244, ReadTime: '2021/04/14 04:03:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.183742, ReadTime: '2021/04/14 04:03:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.323384, ReadTime: '2021/04/14 04:04:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.403428, ReadTime: '2021/04/14 04:04:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25033', TagValue: 2.347282, ReadTime: '2021/04/14 04:04:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.018858, ReadTime: '2021/04/14 03:59:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.020605, ReadTime: '2021/04/14 03:59:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.047671, ReadTime: '2021/04/14 04:00:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.020306, ReadTime: '2021/04/14 04:00:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.054744, ReadTime: '2021/04/14 04:00:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.027292, ReadTime: '2021/04/14 04:00:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.026794, ReadTime: '2021/04/14 04:01:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.03381, ReadTime: '2021/04/14 04:01:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.041131, ReadTime: '2021/04/14 04:01:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.02754, ReadTime: '2021/04/14 04:01:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 4.998859, ReadTime: '2021/04/14 04:02:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.014368, ReadTime: '2021/04/14 04:02:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.019042, ReadTime: '2021/04/14 04:02:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.046045, ReadTime: '2021/04/14 04:02:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.024141, ReadTime: '2021/04/14 04:03:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.016951, ReadTime: '2021/04/14 04:03:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.01229, ReadTime: '2021/04/14 04:03:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.00666, ReadTime: '2021/04/14 04:03:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 5.005168, ReadTime: '2021/04/14 04:04:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 4.99309, ReadTime: '2021/04/14 04:04:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3FT35032', TagValue: 4.983859, ReadTime: '2021/04/14 04:04:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.128864, ReadTime: '2021/04/14 03:59:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.096089, ReadTime: '2021/04/14 03:59:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.13711, ReadTime: '2021/04/14 04:00:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.191255, ReadTime: '2021/04/14 04:00:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.159299, ReadTime: '2021/04/14 04:00:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.089755, ReadTime: '2021/04/14 04:00:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.098142, ReadTime: '2021/04/14 04:01:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.084317, ReadTime: '2021/04/14 04:01:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.040828, ReadTime: '2021/04/14 04:01:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.066903, ReadTime: '2021/04/14 04:01:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.12027, ReadTime: '2021/04/14 04:02:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.075927, ReadTime: '2021/04/14 04:02:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.062984, ReadTime: '2021/04/14 04:02:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.190477, ReadTime: '2021/04/14 04:02:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.192902, ReadTime: '2021/04/14 04:03:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.061741, ReadTime: '2021/04/14 04:03:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 0.991724, ReadTime: '2021/04/14 04:03:30', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.006655, ReadTime: '2021/04/14 04:03:45', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.044971, ReadTime: '2021/04/14 04:04:00', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.077099, ReadTime: '2021/04/14 04:04:15', ErrorMessage: null }, - { UnionTagCode: 'TJIP45.rl3AT25034', TagValue: 1.131417, ReadTime: '2021/04/14 04:04:30', ErrorMessage: null }], - startTime: '', - endTime: '', - step: '' + unionTagCodeList: [] + } } }, mounted () { - this.formInline.timeEnd = dayjs().format('YYYY-MM-DD HH:mm:ss') - this.formInline.timeStart = dayjs().subtract(1, 'minute').format('YYYY-MM-DD HH:mm:ss') - // console.log(this.formInline.timeStart) - // console.log(this.JsonRealWasteWater.ydatas[0].data[0].value[0]) - }, - updated () { - this.DrawRealTimeDateChart() + this.$nextTick(() => { + this.initEchartsData() + }) }, methods: { - onSubmit () { - this.DrawRealTimeDateChart() + // 鍒濆鍖栨暟鎹幏鍙杄charts鐨刼ptions鏁版嵁 + async initEchartsData () { + // 鐢ㄤ簬鎺ュ彛鏁版嵁璇锋眰鐨勫弬鏁� 寮�濮�/缁撴潫鏃堕棿 || 鍙�夋嫨鏌ヨ鐨勫紑濮�/缁撴潫鏃堕棿 + this.formInline.timeEnd = dayjs().format('YYYY-MM-DD HH:mm:ss') + this.formInline.timeStart = dayjs().subtract(3, 'minute').format('YYYY-MM-DD HH:mm:ss') + const data = { + $tagCodeList: 'TJIP45.y2h508CEMS01NOX,CTJIP45.y2h508CEMS01SO2,CTJIP45.y2h508CEMS01F,CTJIP45.y2h508CEMS01PM', + $startTime: this.formInline.timeEnd, + $endTime: this.formInline.timeStart, + $step: 15 + } + const result = (await mapApi.DataItems(data)).data + console.log(result) + + // this.hash(result) + // this.hashtime(result) + // this.dealwithData(result) + this.DrawEXHRealTimeDateChart() + this.myChart.hideLoading() }, - // 鐢诲簾姘存姌绾垮浘--瀹炴椂鏁版嵁 - DrawRealTimeDateChart () { - var legend = this.JsonRealWasteWater.legend - var ydatas = this.JsonRealWasteWater.ydatas - var yname = this.JsonRealWasteWater.yname - this.RealTimeChart = this.$echarts.init(this.$refs.main) - var serLists = [] - for (var i = 0; i < ydatas.length; i++) { - // var zdcbcolor = ydatas[i].zdcbcolor + // 鏁版嵁澶勭悊 + dealwithData (result) { + // 澶勭悊鏁版嵁寮�濮� + const d = result + // const nameList = [] // 瀛樻斁鍥句緥 + + let data // 鏁版嵁绫诲瀷// var data={name:'',value:[now1.getFullYear(), now1.getMonth() + 1, now1.getDate().join('/'),value]} + // const datalist // 瀛樻斁data鐨勬暟缁� + // const bzh = [] + for (let i = 0; i < d.length; i++) { + const name = d[i].UnionTagCode + const newdate = d[i].ReadTime + data = { + name: name, + value: [newdate, d[i].TagValue] + } + console.log(data) + // for (var k = 0; k < RealTimeDataList.length; k++) { + // if (RealTimeDataList[k].name == name) { + // RealTimeDataList[k].data.push(data) + // } + // } + } + }, + // hash (result) { + // // const hash = [] + // // for (let i = 0; i < result.length; i++) { + // // if (hash.indexOf(result[i].UnionTagCode) === -1) { + // // hash.push(result[i].UnionTagCode) + // // } + // // } + // // console.log(hash) + // // this.JSONTimeData.unionTagCodeList = hash + // // var lengList = [] + // var lengList = result + // var objTemp + // + // for (var l = 0; l < lengList.length; l++) { + // var obj + // var iconurl + // if (lengList[l] == 'COD') { + // iconurl = 'image://../assets/imgs/legend/SO2.png' + // } else if (nameList[l] == '姘ㄦ爱') { + // iconurl = 'image://../assets/imgs/legend/NOX.png' + // } else if (nameList[l] == '鎬荤7') { + // iconurl = 'image://../assets/imgs/legend/YanChen.png' + // } else if (nameList[l] == '鎬绘爱') { + // iconurl = 'image://../assets/imgs/legend/zongdan.png' + // } else { + // iconurl = 'image://../assets/imgs/legend/VOCs.png' + // } + // + // if (nameList[l] == '搴熸按' || nameList[l] == '搴熸按娴侀噺') { // 灏嗗簾姘存祦閲忔帓鍒版暟缁勬渶鍚� + // objTemp = { + // name: nameList[l], + // icon: iconurl, + // textStyle: { + // color: '#ccc' + // }, + // itemWidth: 20, + // itemHeight: 5 + // } + // } else { + // obj = { + // name: nameList[l], + // icon: iconurl, + // textStyle: { + // color: '#ccc' + // }, + // itemWidth: 20, + // itemHeight: 5 + // } + // lengList.push(obj) + // } + // } + // lengList.push(objTemp) + // }, + hashtime (result) { + const hashtime = [] + for (let i = 0; i < result.length; i++) { + if (hashtime.indexOf(result[i].ReadTime) === -1) { + hashtime.push(result[i].ReadTime) + } + } + console.log(hashtime) + }, + DrawEXHRealTimeDateChart () { + // 璧嬪�肩殑鏁版嵁 + // var legend = this.echartsOptions.legend + // var ydatas = this.echartsOptions.ydatas + const yname = this.echartsOptions.yname + const ydatas = [ + { + name: '姘哀鍖栫墿', + zdcbcolor: '#00B0F0', + zxcolor: '#00B0F0', + bzz: 50, + data: [{ + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:18:19', 39.51431] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:18:34', 38.76508] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:18:49', 37.57471] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:19:04', 36.3796] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:19:19', 36.10718] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:19:34', 35.81126] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:19:49', 35.9184] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:20:04', 36.08839] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:20:19', 36.3718] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:20:34', 36.8966] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:20:49', 37.3998] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:21:04', 37.11937] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:21:19', 36.12424] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:21:34', 34.99567] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:21:49', 34.48063] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:22:04', 34.62222] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:22:19', 34.84583] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:22:34', 35.80923] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:22:49', 35.93465] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:23:04', 35.78891] + }, + { + name: '姘哀鍖栫墿', + value: ['2021/04/13 09:23:19', 35.54268] + }] + }, + { + name: '浜屾哀鍖栫~', + data: [{ + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:18:19', 5.112573] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:18:34', 4.578955] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:18:49', 4.869465] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:19:04', 5.270735] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:19:19', 5.355475] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:19:34', 5.242907] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:19:49', 5.230558] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:20:04', 5.262951] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:20:19', 5.268744] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:20:34', 5.159671] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:20:49', 4.955352] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:21:04', 5.110546] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:21:19', 5.235723] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:21:34', 5.443502] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:21:49', 5.708939] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:22:04', 5.882327] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:22:19', 6.017494] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:22:34', 5.410021] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:22:49', 5.379694] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:23:04', 5.551433] + }, + { + name: '浜屾哀鍖栫~', + value: ['2021/04/13 09:23:19', 5.819743] + }], + zdcbcolor: 'red', + zxcolor: '#fff21c', + bzz: 50 + }, + { + name: '搴熸皵娴侀噺', + data: [{ + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:18:19', 5.012617] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:18:34', 4.992213] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:18:49', 5.026886] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:19:04', 5.052861] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:19:19', 5.038826] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:19:34', 5.062339] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:19:49', 5.071915] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:20:04', 5.053693] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:20:19', 5.03562] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:20:34', 5.043983] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:20:49', 5.059231] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:21:04', 5.042176] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:21:19', 5.028253] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:21:34', 5.024891] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:21:49', 5.01542] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:22:04', 5.025787] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:22:19', 5.038269] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:22:34', 5.01441] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:22:49', 5.010105] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:23:04', 5.012341] + }, + { + name: '搴熸皵娴侀噺', + value: ['2021/04/13 09:23:19', 4.996146] + }], + zdcbcolor: 'red', + zxcolor: '#9ACD32', + bzz: null + }, + { + name: '鐑熷皹', + data: [{ + name: '鐑熷皹', + value: [['2021/04/13 09:18:19', 0.8297127]] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:18:34', 0.8347292] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:18:49', 0.9218481] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:19:04', 0.913429] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:19:19', 0.9026684] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:19:34', 0.8060119] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:19:49', 0.781314] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:20:04', 0.8958074] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:20:19', 0.9093901] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:20:34', 0.8743498] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:20:49', 0.9024854] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:21:04', 0.9456897] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:21:19', 0.9747347] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:21:34', 0.9200308] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:21:49', 0.8987293] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:22:04', 0.8613345] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:22:19', 0.8747463] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:22:34', 0.8883187] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:22:49', 0.881333] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:23:04', 0.9142911] + }, + { + name: '鐑熷皹', + value: ['2021/04/13 09:23:19', 0.9569058] + }], + zdcbcolor: 'red', + zxcolor: '#f48183', + bzz: 10 + }] + // const legend = [ + // // data: 'legend' + // { + // name: '姘哀鍖栫墿', + // icon: 'image://../assets/imgs/legend/NOX.png', + // textStyle: { color: '#ccc' }, + // itemWidth: 20, + // itemHeight: 15 + // }, + // { + // icon: 'image://../assets/imgs/legend/SO2.png', + // itemHeight: 5, + // itemWidth: 20, + // name: '浜屾哀鍖栫~', + // textStyle: { + // color: '#CCC' + // } + // }, + // { + // icon: 'image://../assets/imgs/legend/YanChen.png', + // itemHeight: 5, + // itemWidth: 20, + // name: '鐑熷皹', + // textStyle: { color: '#ccc' } + // }, + // { + // icon: 'image://../assets/imgs/legend/VOCs.png', + // itemHeight: 5, + // itemWidth: 20, + // name: '搴熸皵娴侀噺', + // textStyle: { color: '#ccc' } + // } + // ] + // const iconlist = ['image://../assets/imgs/legend/NOX.png', 'image://../assets/imgs/legend/VOCs.png'] + // { + // icon: 'image://../assets/imgs/legend/NOX.png' + // }, { + // icon: 'image://../assets/imgs/legend/SO2.png' + // }, { + // icon: 'image://../assets/imgs/legend/YanChen.png' + // }, + // { + // icon: 'image://../assets/imgs/legend/VOCs.png' + // }] + + // 鍒濆鍖杄charts + this.myChart = this.$echarts.init(this.$refs.echarts) + + // echarts鐨剆eries鏁版嵁 + const serLists = [] + // for (var j = 0; j < ydatas.length; j++) { + // var len = ydatas[j].data.length + // for (var k = 0; k < len; k++) { + // var it = ydatas[j].data[k] + // var it2 = parseFloat(it).toFixed(2) + // ydatas[j].data[k] = it2 + // } + // } + for (let i = 0; i < ydatas.length; i++) { var bz = ydatas[i].bzz var obj if (bz) { obj = { name: ydatas[i].name, - // symbol:'circle', // 鎶樼偣褰㈢姸 - // symbolSize: 3, //澶у皬 - smooth: true, // 鐩寸嚎 锛宼rue 涓烘洸绾� + smooth: true, itemStyle: { normal: { color: function (c) { // 鏍规嵁value 鏄剧ず涓嶅悓鐨勬姌鐐归鑹� // var biaozhuiz - // for (var i = 0; i < bzzList.length; i++) { - // if (bzzList[i].name == c.seriesName) { - // biaozhuiz = bzzList[i].bzhui + // for (var i = 0; i < exhbzzList.length; i++) { + // if (exhbzzList[i].name == c.seriesName) { + // biaozhuiz = exhbzzList[i].bzhui // } // } // if (c.value[1] > biaozhuiz) { // return zdcbcolor // } else if (c.value[1] > biaozhuiz * 0.9) { // return '#FFA500' - // } - // { + // } else { // return '#33c95f' // } }, @@ -396,7 +683,6 @@ show: false } } - }, type: 'line', data: ydatas[i].data, @@ -416,17 +702,13 @@ type: 'dashed', width: 2 } - } - ] + }] } } } else { obj = { name: ydatas[i].name, - // symbol:'circle', // 鎶樼偣褰㈢姸 - // symbolSize: 3, //澶у皬 - smooth: true, // 鐩寸嚎 锛宼rue 涓烘洸绾� - yAxisIndex: 1, + smooth: true, itemStyle: { normal: { color: function (c) { // 鏍规嵁value 鏄剧ず涓嶅悓鐨勬姌鐐归鑹� @@ -441,24 +723,18 @@ show: false } } - }, type: 'line', data: ydatas[i].data } } - if (ydatas[i].name === '搴熸皵娴侀噺' || ydatas[i].name === '搴熸皵') { obj.yAxisIndex = 1 } serLists.push(obj) } - - var option = { - /* title: { - text: title, - }, */ - tooltip: { // 鎻愮ず妗� + const option = { + tooltip: { trigger: 'axis', axisPointer: { type: 'cross', @@ -476,45 +752,48 @@ var value = params[i].value[1] // var valueFliter = this.formatter(value) var maker = params[i].marker - var colo = '' - switch (seriesName) { - case 'COD': - colo = '#fff21c' - break - case '姘ㄦ爱': - colo = '#00B0F0' - break - case '鎬荤7': - colo = '#f48183' - break - case '鎬绘爱': - colo = '#e0ffff' - break - default: - colo = '#9ACD32' - break + if (seriesName === '浜屾哀鍖栫~') { + maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#fff21c;"></span>' + } else if (seriesName === '姘哀鍖栫墿') { + maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#00B0F0;"></span>' + } else if (seriesName === '鐑熷皹') { + maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#f48183;"></span>' + } else if (seriesName === '娓╁害') { + maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#F206FF;"></span>' + } else { + maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#4ec99c;"></span>' } - maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + colo + ';"></span>' s += maker + seriesName + ':' + value + '<br />' } return s } }, - toolbox: { // 鎵撳嵃绛夊伐鍏� + toolbox: { show: false, feature: { saveAsImage: {} } }, - grid: { // 缃戞牸 - top: '20%', - left: '7%', - bottom: '15%', - right: '5%' + grid: { + top: '20%' }, - legend: { - data: legend - }, + // legend: { + // data: legend + // }, + legend: [ + { + // icon: iconlist.map(item => { + // return item + // }), + icon: 'image://../assets/imgs/legend/VOCs.png', + itemHeight: 20, + itemWidth: 30, + textStyle: { color: '#ccc' }, + data: ydatas.map(item => { + return item.name + }) + } + ], dataZoom: [{ type: 'inside', start: 0, @@ -533,39 +812,38 @@ shadowOffsetY: 2 } }], - xAxis: { // x 杞磋缃� + xAxis: { type: 'time', boundaryGap: false, - axisLabel: { // x杞村叏閮ㄦ樉绀� - // rotate: 30, + axisLabel: { margin: 6, interval: 0, textStyle: { color: '#fff' } }, - splitLine: { // 缃戞牸鍨傜洿绾夸负 铏氱嚎 + splitLine: { show: true, lineStyle: { type: 'dashed' } }, - axisTick: { // x 杞村埢搴︽樉绀� + axisTick: { show: false }, axisLine: { lineStyle: { color: '#FFFFFF', - width: 1// 杩欓噷鏄负浜嗙獊鍑烘樉绀哄姞涓婄殑 + width: 1 } } - // data: xdata }, yAxis: [{ type: 'value', name: yname, max: function (value) { - return parseInt(value.max + 30) + var ma = value.max > 100 ? value.max : 100 + return parseInt(ma) }, axisLabel: { formatter: '{value}', @@ -578,16 +856,16 @@ }, splitLine: { show: false - }, // y杞� 缃戞牸绾夸笉鏄剧ず, + }, axisLine: { lineStyle: { color: '#FFFFFF', - width: 1// 杩欓噷鏄负浜嗙獊鍑烘樉绀哄姞涓婄殑 + width: 1 } } }, { type: 'value', - name: '娴侀噺(m鲁/d)', + name: '搴熸皵娴侀噺(m3/h)', axisLabel: { formatter: '{value}', textStyle: { @@ -599,302 +877,294 @@ }, splitLine: { show: false - }, // y杞� 缃戞牸绾夸笉鏄剧ず, - // inverse: true, - // nameLocation: 'start', - // max:500, + }, axisLine: { lineStyle: { color: '#FFFFFF', - width: 1// 杩欓噷鏄负浜嗙獊鍑烘樉绀哄姞涓婄殑 + width: 1 } } }], series: serLists } - this.RealTimeChart.setOption(option) - /* RealTimeChart.on('legendselectchanged', function (params) { - // console.log(params); - var StdVal = null - var op = { yAxis: {} } - if (params.selected.COD) { - if (bzzList && bzzList.length > 0) { - for (let i = 0; i < bzzList.length; i++) { - if (bzzList[i].name == 'COD') { - StdVal = bzzList[i].bzhui - } - } - } + this.myChart.setOption(option) + window.addEventListener('resize', this.myChart.resize) + // 鏄剧ず鍔犺浇鍔ㄧ敾 + this.myChart.showLoading() + // this.IntervalEXHRealTimeDate() - op.yAxis.max = function (value) { - var ma - if (value.max < StdVal) { - ma = StdVal - } else { - ma = Math.ceil(value.max) - } - return ma - } - } else if (params.selected['鎬绘爱']) { - if (bzzList && bzzList.length > 0) { - for (let i = 0; i < bzzList.length; i++) { - if (bzzList[i].name == '鎬绘爱') { - StdVal = bzzList[i].bzhui - } - } - } - op.yAxis.max = function (value) { - var ma - if (value.max < StdVal) { - ma = StdVal - } else { - ma = Math.ceil(value.max) - } - return ma - } - } else if (params.selected['姘ㄦ爱']) { - if (bzzList && bzzList.length > 0) { - for (let i = 0; i < bzzList.length; i++) { - if (bzzList[i].name == '姘ㄦ爱') { - StdVal = bzzList[i].bzhui - } - } - } - op.yAxis.max = function (value) { - var ma - if (value.max < StdVal) { - ma = StdVal - } else { - ma = Math.ceil(value.max) - } - return ma - } - } else if (params.selected['鎬荤7']) { - if (bzzList && bzzList.length > 0) { - for (let i = 0; i < bzzList.length; i++) { - if (bzzList[i].name == '鎬荤7') { - StdVal = bzzList[i].bzhui - } - } - } - op.yAxis.max = function (value) { - var ma - if (value.max < StdVal) { - ma = StdVal - } else { - ma = Math.ceil(value.max) - } - return ma - } - } - RealTimeChart.setOption(op) - }) */ + // this.myChart.on('legendselectchanged', function (params) { + // var StdVal = null + // var op = { yAxis: {} } + // var max_val_list = [] // 鎵�鏈夋樉绀烘姌绾跨殑鏍囧噯鍊� + // if (exhbzzList && exhbzzList.length > 0) { + // $.each(exhbzzList, function (index, item) { + // params.selected[item.name] ? max_val_list.push(item.bzhui) : '' + // if (item.name === params.name) { + // item.name === 'VOCs' ? StdVal = 20 : StdVal = item.bzhui + // } + // }) + // } + // max_val_list = max_val_list.sort(function (a, b) { return a - b }) // 鎺掑簭 + // op.yAxis.max = function (value) { + // var ma = value.max < StdVal ? StdVal : Math.ceil(value.max) + // max_val_list ? ma = max_val_list[max_val_list.length - 1] : ''// 閫夋嫨鏈�澶у�� + // return ma + // } + // myChart.setOption(op) + // }) + // myChart.on('click', function (params) { + // var nowDate = new Date().Format() + // }) }, - getRtdb15s (unionTagCodeList, startTime, endTime, step, res) { - if (res.length > 0) { - // 澶勭悊鏁版嵁寮�濮� - var d = res - var nameList = [] // 瀛樻斁鍥句緥 - - var data // 鏁版嵁绫诲瀷// var data={name:'',value:[now1.getFullYear(), now1.getMonth() + 1, now1.getDate().join('/'),value]} - var datalist // 瀛樻斁data鐨勬暟缁� - // var bzh = [] - for (var i = 0; i < d.length; i++) { - if (d[i].ErrorMessage != null) { - continue - } - - // var name = CFG.DATA_REALTIME_TAGCODETABLE[d[i].UnionTagCode].TagName - - if (nameList.length === 0) { - nameList.push(name) - var newdate = new Date(d[i].ReadTime) - data = { - name: name, - value: [newdate, d[i].TagValue] - } - - datalist = { - name: name, - data: [data] - } - - this.RealTimeDataList.push(datalist) - } else if (nameList.indexOf(name) < 0) { - nameList.push(name) - // bzh.push(d[i].StdValue); - - // var newdate = new Date(d[i].ReadTime) - - data = { - name: name, - value: [newdate, d[i].TagValue] - } - datalist = { - name: name, - data: [data] - } - this.RealTimeDataList.push(datalist) - } else if (i === d.length - 1) { - if (nameList.indexOf(name) < 0) { - nameList.push(name) - // bzh.push(d[i].StdValue); - - // var newdate = new Date(d[i].ReadTime) - - data = { - name: name, - value: [newdate, d[i].TagValue] - } - datalist = { - name: name, - data: [data] - } - // RealTimeDataList.push(datalist) - } else { - // var newdate = new Date(d[i].ReadTime) - data = { - name: name, - value: [newdate, d[i].TagValue] - } - for (var k = 0; k < this.RealTimeDataList.length; k++) { - if (this.RealTimeDataList[k].name === name) { - this.RealTimeDataList[k].data.push(data) - } - } - } - } else { - const newdate = new Date(d[i].ReadTime) - data = { - name: name, - value: [newdate, d[i].TagValue] - } - for (let k = 0; k < this.RealTimeDataList.length; k++) { - if (this.RealTimeDataList[k].name === name) { - this.RealTimeDataList[k].data.push(data) - } - } - } - } - - // var divid = 'mycharteff_second' - // var title = name - var lengList = [] - var objTemp - - for (var l = 0; l < nameList.length; l++) { - var obj - var iconurl - if (nameList[l] === 'COD') { - iconurl = 'image://../assets/imgs/legend/SO2.png' - } else if (nameList[l] === '姘ㄦ爱') { - iconurl = 'image://../assets/imgs/legend/NOX.png' - } else if (nameList[l] === '鎬荤7') { - iconurl = 'image://../assets/imgs/legend/YanChen.png' - } else if (nameList[l] === '鎬绘爱') { - iconurl = 'image://../assets/imgs/legend/zongdan.png' - } else { - iconurl = 'image://../assets/imgs/legend/VOCs.png' - } - - if (nameList[l] === '搴熸按' || nameList[l] === '搴熸按娴侀噺') { // 灏嗗簾姘存祦閲忔帓鍒版暟缁勬渶鍚� - objTemp = { - name: nameList[l], - icon: iconurl, - textStyle: { - color: '#ccc' - }, - itemWidth: 20, - itemHeight: 5 - } - } else { - obj = { - name: nameList[l], - icon: iconurl, - textStyle: { - color: '#ccc' - }, - itemWidth: 20, - itemHeight: 5 - } - lengList.push(obj) - } - } - lengList.push(objTemp) - - this.DrawRealTimeDateChart(this.JsonRealWasteWater.id, this.JsonRealWasteWater.title, this.JsonRealWasteWater.legend, this.JsonRealWasteWater.ydatas, this.JsonRealWasteWater.yname) - } - }, - // 瀹炴椂鏁版嵁璋冪敤閽╁瓙鍑芥暟 - IntervalRealTimeDate (id, unionTagCodeList, BBZMAPPING) { - // 瀹氭椂鍣ㄥ嚱鏁� - this.interValHander = setInterval(function () { - // $('.RealTime').empty() - this.startTime = dayjs().subtract(5, 'minute').format('YYYY-MM-DD HH:mm:ss') - this.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') - this.step = '15' - // this.getRtdb15s(this.unionTagCodeList, this.startTime, this.endTime, this.step, this.res) - // PreQueryTime=endTime; - this.DrawRealTimeDateChart(this.JsonRealWasteWater.id, this.JsonRealWasteWater.title, this.JsonRealWasteWater.legend, this.JsonRealWasteWater.ydatas, this.JsonRealWasteWater.yname) - this.IntervalRealTimeDate(this.JSONTimeData.id, this.JSONTimeData.unionTagCodeList, this.BBZMAPPING) - }, 15000) + // 鐐瑰嚮鏌ヨ鎸夐挳鍔熻兘 + onSubmit () { + this.DrawEXHRealTimeDateChart() + this.myChart.hideLoading() } + // getRtdbFormat (res) { + // var data = res.collection.items + // var dataArray = [] + // for (var i = 0; i < data.length; i++) { + // var dataFormat = { + // UnionTagCode: data[i].data[0].value, + // TagValue: parseFloat(data[i].data[1].value), + // ReadTime: data[i].data[3].value, + // ErrorMessage: data[i].data[5].value + // } + // dataArray.push(dataFormat) + // } + // return dataArray + // }, + // 1.鍧愭爣杞村疄鐜�,鐢诲疄鏃舵暟鎹� + // getRtdb15s (unionTagCodeList, startTime, endTime, step, res) { + // if (this.res.length > 0) { + // // 澶勭悊鏁版嵁寮�濮� + // var d = res + // var nameList = [] // 瀛樻斁鍥句緥 + // + // var data // 鏁版嵁绫诲瀷// var data={name:'',value:[now1.getFullYear(), now1.getMonth() + 1, now1.getDate().join('/'),value]} + // var datalist // 瀛樻斁data鐨勬暟缁� + // // var bzh = [] + // for (var i = 0; i < d.length; i++) { + // if (d[i].ErrorMessage != null) { + // continue + // } + // // var name = CFG.DATA_REALTIME_TAGCODETABLE[d[i].UnionTagCode].TagName + // + // if (nameList.length === 0) { + // nameList.push(name) + // + // var newdate = new Date(this.res.ReadTime) + // data = { + // name: name, + // value: [newdate, this.res.TagValue] + // } + // + // datalist = { + // name: name, + // data: [data] + // } + // + // this.EXHRealTimeDataList.push(datalist) + // } else if (nameList.indexOf(name) < 0) { + // nameList.push(name) + // + // // var newdate = new Date(d[i].ReadTime) + // + // data = { + // name: name, + // value: [newdate, d[i].TagValue] + // } + // datalist = { + // name: name, + // data: [data] + // } + // this.EXHRealTimeDataList.push(datalist) + // } else if (i === d.length - 1) { + // if (nameList.indexOf(name) < 0) { + // nameList.push(name) + // + // // var newdate = new Date(d[i].ReadTime) + // + // data = { + // name: name, + // value: [newdate, d[i].TagValue] + // } + // datalist = { + // name: name, + // data: [data] + // } + // // EXHRealTimeDataList.push(datalist) + // } else { + // // var newdate = new Date(d[i].ReadTime) + // data = { + // name: name, + // value: [newdate, d[i].TagValue] + // } + // for (var k = 0; k < this.EXHRealTimeDataList.length; k++) { + // if (this.EXHRealTimeDataList[k].name === name) { + // this.EXHRealTimeDataList[k].data.push(data) + // } + // } + // } + // } else { + // const newdate = new Date(d[i].ReadTime) + // data = { + // name: name, + // value: [newdate, d[i].TagValue] + // } + // for (let k = 0; k < this.EXHRealTimeDataList.length; k++) { + // if (this.EXHRealTimeDataList[k].name === name) { + // this.EXHRealTimeDataList[k].data.push(data) + // } + // } + // } + // } + // + // // var divid = 'mychart_ss' + // // var title = name + // var lengList = [] + // var objTemp + // + // for (var l = 0; l < nameList.length; l++) { + // var obj + // var iconurl + // if (nameList[l] === '浜屾哀鍖栫~') { + // iconurl = 'image://../assets/imgs/legend/SO2.png' + // } else if (nameList[l] === '姘哀鍖栫墿') { + // iconurl = 'image://../assets/imgs/legend/NOX.png' + // } else if (nameList[l] === '鐑熷皹') { + // iconurl = 'image://../assets/imgs/legend/YanChen.png' + // } else if (nameList[l] === '闈炵敳鐑锋�荤儍') { + // iconurl = 'image://../assets/imgs/legend/grn.png' + // } else if (nameList[l] === '娓╁害') { + // iconurl = 'image://../assets/imgs/legend/WenDu.png' + // } else { + // iconurl = 'image://../assets/imgs/legend/VOCs.png' + // } + // + // if (nameList[l] === '搴熸皵' || nameList[l] === '搴熸皵娴侀噺') { // 灏嗗簾姘旀祦閲忔帓鍒版暟缁勬渶鍚� + // objTemp = { + // name: nameList[l], + // icon: iconurl, + // textStyle: { + // color: '#ccc' + // }, + // itemWidth: 20, + // itemHeight: 5 + // } + // } else { + // obj = { + // name: nameList[l], + // icon: iconurl, + // textStyle: { + // color: '#ccc' + // }, + // itemWidth: 20, + // itemHeight: 5 + // } + // lengList.push(obj) + // } + // } + // lengList.push(objTemp) + // + // this.DrawEXHRealTimeDateChart(this.echartsOptions.id, this.echartsOptions.title, this.echartsOptions.legend, this.echartsOptions.ydatas, this.echartsOptions.yname) + // } + // }, + // 閽╁瓙璋冪敤瀹炴椂 + // IntervalEXHRealTimeDate () { + // // 瀹氭椂鍣ㄥ嚱鏁� + // this.DrawEXHRealTimeDateChart() + // setInterval(function () { + // // $('.RealTime').empty() + // this.startTime = dayjs().subtract(5, 'minute').format('YYYY-MM-DD HH:mm:ss') + // this.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') + // this.step = '15' + // // this.getRtdb15s(this.unionTagCodeList, this.startTime, this.endTime, this.step, this.res) + // // PreQueryTime=endTime; + // }, 1500) + // } + } } </script> <style scoped lang="less"> -.grid-content{ +.grid-content { font-size: 8px; background-color: #2e4967; text-align: center; border-radius: 2px; margin-right: 10px; - padding:0 10px + padding: 0 10px; + + > i { + color: #ffffff; + } } -.infomation { - padding: 5px 10px; + +.animation { + //width: 600px; + //height: 0.06rem; + .infomation { + padding: 5px 10px; + } } .form-echrts { width: 100%; border-top: 1px solid #396d83; //margin: 10px 10px 10px 10px; - .from-search{ + .from-search { display: flex; - padding:5px; - >div{margin-left: 10px} - .pickerMon{ + padding: 5px; + + > div { + margin-left: 10px + } + + .pickerMon { display: flex; - >div:first-child { + + > div:first-child { margin-right: 10px; } - .pickerData{ + + .pickerData { flex: 1; display: flex; - >span{line-height: 22px} + + > span { + line-height: 22px + } + .pickerTable { margin-left: 3px; } } } - /deep/.el-date-editor--datetime{ + + /deep/ .el-date-editor--datetime { width: 100%; } - /deep/.el-input__inner{ + + /deep/ .el-input__inner { position: relative; - width:140px; + width: 140px; background-color: #2e4967; - color: #ffffff; + color: #fff; font-size: 12px; height: 24px; padding: 0; - border-color:#00fff6; + border-color: #00fff6; text-align: center; + z-index: 9999; //padding-left:20px ; //padding: 0!important; } - /deep/.el-input__icon{ + + /deep/ .el-input__icon { display: block; width: 140px; height: 22px; @@ -902,32 +1172,31 @@ cursor: pointer; font-size: 0; } - .echatsInput{ + + .echatsInput { color: #00ffff; background-color: #2e4967; border: none; border-radius: 6px; width: 80px; height: 22px; - text-align: center; } + input::-webkit-calendar-picker-indicator { opacity: 100; } - .detailbtn{ - background-color:#2e4967; + + .detailbtn { + background-color: #2e4967; text-align: center; padding: 0 7px; - line-height: 24px; + line-height: 20px; border-radius: 4px; margin-right: 6px; } - .detailbtn:hover{ - box-shadow: 0 0 0.03rem #fff700 !important; - color:#fff700 !important; - cursor: pointer; - } + } + .el-dialog-div { //height: 50vh!important; overflow: auto; @@ -937,6 +1206,9 @@ #echarts { margin: 0; padding: 0; + //height: 3rem; + //border: 1px solid #396d83; + //margin: 10px 10px 10px 10px; } } </style> diff --git a/src/components/BaseNav/WasteWater/WasteWaterIndex.vue b/src/components/BaseNav/WasteWater/WasteWaterIndex.vue index 6140e1e..030c173 100644 --- a/src/components/BaseNav/WasteWater/WasteWaterIndex.vue +++ b/src/components/BaseNav/WasteWater/WasteWaterIndex.vue @@ -1,29 +1,28 @@ <template> <public-sector> <template v-slot:tabs> - <public-tabs ></public-tabs> + <public-tabs :storagePlaceId="storagePlaceId"></public-tabs> </template> - <template v-slot:table> - <div class="win"> - <div class="border_corner border_corner_left_top"></div> - <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 :class="active==0?'hover':''" @click='tabTaggle("RealData",0)'>瀹炴椂鏁版嵁</li> - <li :class="active==1?'hover':''" @click='tabTaggle("HourData",1)'>灏忔椂鏁版嵁</li> - <li :class="active==2?'hover':''" @click='tabTaggle("DayData",2)'>鏃ユ暟鎹�</li> - <li :class="active==3?'hover':''" @click='tabTaggle("Detail",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="Echats"></component> + <template v-slot:publicPart> + <div class="publicPart"> + <span></span> + <span></span> + <span></span> + <span></span> + <el-tabs v-model="activeName" @tab-click="handleClick"> + <el-tab-pane label="瀹炴椂鏁版嵁" name="first"> + <RealData></RealData> + </el-tab-pane> + <el-tab-pane label="灏忔椂鏁板眳" name="second"> + <HourData></HourData> + </el-tab-pane> + <el-tab-pane label="鏃ユ暟鎹�" name="third"> + <DayData></DayData> + </el-tab-pane> + <el-tab-pane label="浜哄伐鐩戞祴鏁版嵁" name="fourth"> + <Detail></Detail> + </el-tab-pane> + </el-tabs> </div> </template> <template v-slot:video> @@ -34,10 +33,9 @@ <script> -// import '@/utils/dragBoxes' import PublicTabs from './PublicTabs' import PublicVideo from '../PublicVideo' -import PublicSector from '..//PublicSector' +import PublicSector from '../PublicSector' // 鍥捐〃缁勪欢 import RealData from './RealData' import HourData from './HourData' @@ -46,7 +44,7 @@ export default { name: 'WasteWaterIndex', - props: ['EpsGisMonPointId'], + props: ['storagePlaceId'], components: { PublicSector, PublicTabs, @@ -56,13 +54,9 @@ DayData, Detail }, - mounted () { - this.$nextTick(() => { - this.refsData() - }) - }, data () { return { + activeName: 'first', currentTab: RealData, active: '0', displayContentTable: '', @@ -73,7 +67,15 @@ } } }, + mounted () { + this.$nextTick(() => { + this.refsData() + }) + }, methods: { + handleClick (tab, event) { + console.log(tab, event) + }, refsData () { // 璇锋眰鏁版嵁闇�瑕佹惡甯︾殑鍙傛暟 // const data = this.EpsGisMonPointId @@ -132,9 +134,60 @@ } } } + +.publicPart { + position: relative; + margin-bottom: 0.1rem; + background-color: @background-color; + font-size: 0.06rem; + font-weight: normal; + padding: 0.04rem 0; + border: 1px solid #396d83; +} + +.publicPart span:nth-child(1) { + position: absolute; + left: -2px; + top: -2px; + padding: 6px; + border-style: solid; + border-color: #02a6b5; + border-width: 2px 0 0 2px; +} + +.publicPart span:nth-child(2) { + position: absolute; + right: -2px; + top: -2px; + padding: 6px; + border-style: solid; + border-color: #02a6b5; + border-width: 2px 2px 0 0; +} + +.publicPart span:nth-child(3) { + position: absolute; + right: -2px; + bottom: -2px; + padding: 6px; + border-style: solid; + border-color: #02a6b5; + border-width: 0 2px 2px 0; +} + +.publicPart span:nth-child(4) { + position: absolute; + left: -2px; + bottom: -2px; + padding: 6px; + border-style: solid; + border-color: #02a6b5; + border-width: 0 0 2px 2px; +} + .win { position: relative; - background:@background-color; + background: @background-color; border: 0.8px solid #396d83; } @@ -178,39 +231,43 @@ .tab { display: flex; border-bottom: 1px solid #396d83; - padding:0.02rem 0.04rem; + padding: 0.02rem 0.04rem; } .tab li { background-color: #243a55; - line-height:0.15rem; + line-height: 0.15rem; height: 0.15rem; text-align: center; border-radius: 5px; margin-right: 0.04rem; - padding:0 0.04rem; + padding: 0 0.04rem; } + .tab li.hover, .tab li:hover { background-color: #0e639e; color: #fff; cursor: pointer; } -.legend{ + +.legend { position: absolute; - top:0.05rem; + top: 0.05rem; right: 0; display: flex; justify-items: center; } + .legend i { display: block; width: 0.2rem; height: 0.09rem; - margin:0 0.1rem 0 0.05rem; + margin: 0 0.1rem 0 0.05rem; border-radius: 0.02rem; } -.legend span{ + +.legend span { line-height: 0.09rem; height: 0.09rem; font-size: 0.06rem; diff --git a/src/components/LayerController/logic/WasteGas.js b/src/components/LayerController/logic/WasteGas.js index 60bf0ef..549d885 100644 --- a/src/components/LayerController/logic/WasteGas.js +++ b/src/components/LayerController/logic/WasteGas.js @@ -59,9 +59,9 @@ this.clickListener = async (e) => { // console.log(e) this.animalService.pulseEffect(e.latlng) - const dataValue = { - StoragePlaceId: e.layer.options.test.StoragePlaceId - } + // const dataValue = { + // StoragePlaceId: e.layer.options.test.StoragePlaceId + // } // console.log(e.layer.options.test.EpsGisMonPointId) const title = e.layer.options.test.Name const res = e.layer.options.test @@ -83,8 +83,8 @@ // console.log(ManualData) // const Mondata = await mapApi.getWasteGasMonData(GasOnlinedata) // // console.log(Mondata) - const result = await mapApi.getWasteGasDetails(dataValue) - console.log(result.Result.DataInfo) + // const result = await mapApi.getWasteGasDetails(dataValue) + // console.log(result.Result.DataInfo) // const PublicBounced = window.Vue.extend(publicBounced) // const instance = new PublicBounced() // // console.log(e.layer.options.test) diff --git a/src/components/LayerController/logic/WasteSolid.js b/src/components/LayerController/logic/WasteSolid.js index b0866e7..bba786a 100644 --- a/src/components/LayerController/logic/WasteSolid.js +++ b/src/components/LayerController/logic/WasteSolid.js @@ -52,8 +52,20 @@ this.clickListener = (e) => { // 鐐瑰嚮marker鐨刾ulse()鍏夋尝 this.animalService.pulseEffect(e.latlng) - /* 鐐瑰嚮鏁版嵁鐨勬帴鍙h姹� */ - this.requestSolidWasteData(e).then(e) + // 寮规鏍囬 + const title = e.layer.options.totransferData.Name + window.$layer.open({ + content: { + content: WasteSolidIndex, // 缁勪欢 + parent: this, // 鐖剁粍浠� + data: { // 浼犻�掔殑鍙傛暟 + storagePlaceId: e.layer.options.totransferData.StoragePlaceId + } + }, + title: title // 鏍囬 + }) + /* flyTo()寮瑰嚭妗嗗钩绉讳簨浠� */ + this.setPanTo(e.latlng, 300) } // 涓嶅悓绫诲瀷鍥剧墖灏佽 @@ -65,24 +77,6 @@ effectOfChange = setting } return effectOfChange - } - - // 鏍规嵁鐐瑰嚮涓嶅悓鏁版嵁 杩涜鎺ュ彛鐨勬暟鎹姹� - this.requestSolidWasteData = async (e) => { - // 寮规鏍囬 - const title = e.layer.options.totransferData.Name - /* flyTo()寮瑰嚭妗嗗钩绉讳簨浠� */ - this.setPanTo(e.latlng, 300) - window.$layer.open({ - content: { - content: WasteSolidIndex, // 缁勪欢 - parent: this, // 鐖剁粍浠� - data: { // 浼犻�掔殑鍙傛暟 - storagePlaceId: e.layer.options.totransferData.StoragePlaceId - } - }, - title: title // 鏍囬 - }) } // flayTo() 寮规鐨勫彲婊戝姩浜嬩欢 diff --git a/src/components/LayerController/logic/WasteWater.js b/src/components/LayerController/logic/WasteWater.js index 2e1205e..0305114 100644 --- a/src/components/LayerController/logic/WasteWater.js +++ b/src/components/LayerController/logic/WasteWater.js @@ -56,9 +56,21 @@ this.clickListener = (e) => { // 鐐瑰嚮marker鐨刾ulse()鍏夋尝 this.animalService.pulseEffect(e.latlng) - /* 鐐瑰嚮鏁版嵁鐨勬帴鍙h姹� */ - this.requestWasteWaterData(e).then(e) - console.log() + // 寮规鏍囬 + const title = e.layer.options.totransferData.Name + const res = e.layer.options.totransferData + window.$layer.open({ + content: { + content: WasteWaterIndex, // 缁勪欢 + parent: this, // 鐖剁粍浠� + data: { // 浼犻�掔殑鍙傛暟 + // info: this.info + storagePlaceId: res + } + }, + title: title // 鏍囬 + }) + this.setPanTo(e.latlng, 150) } this.requestWasteWaterData = async (e) => { // 鍩烘湰淇℃伅 鍜� 璇︾粏淇℃伅 灞曠ず鏁版嵁鎵�闇�鍙傛暟 @@ -66,8 +78,8 @@ // StoragePlaceId: e.layer.options.test.StoragePlaceId // } // 寮规鏍囬 - const title = e.layer.options.totransferData.Name - console.log(e.layer.options) + // const title = e.layer.options.totransferData.Name + // console.log(e.layer.options) // 鍩烘湰淇℃伅 tabs // const resultBasic = await mapApi.getWasteWater(dataValue) // 鍥捐〃淇℃伅灞曠ず echarts @@ -88,18 +100,6 @@ // // 閫氳繃鏂规硶 鍚戠粦瀹氬脊妗嗕紶閫掓暟鎹� // instance.setData(title, resultBasic.Result.DataInfo, resultDetailed.Result.DataInfo, 'gufei') /* flyTo()寮瑰嚭妗嗗钩绉讳簨浠� */ - this.setPanTo(e.latlng, 150) - window.$layer.open({ - content: { - content: WasteWaterIndex, // 缁勪欢 - parent: this, // 鐖剁粍浠� - data: { // 浼犻�掔殑鍙傛暟 - info: this.info - // storagePlaceId: e.layer.options.totransferData.StoragePlaceId - } - }, - title: title // 鏍囬 - }) } // 鏍规嵁杩斿洖鍊肩殑涓嶅悓鏍囪涓嶅悓鍥剧墖 diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js index ebd24e8..be2a119 100644 --- a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js +++ b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js @@ -1,6 +1,5 @@ import L from 'leaflet' -// import eventBus from "@/components/leaflet/app/eventBus" -import eventBus from '@components/panel/topicSearch/SewersSelect/AnalysisChoose/eventBus' +import eventBus from '@/eventBus' class DrawLine { constructor (map) { @@ -49,7 +48,6 @@ destory () { if (this.polyline) { this.map.removeLayer(this.polyline) } - if (this.marker) { this.marker.remove() } this.points = [] this.layers.clearLayers() diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/eventBus.js b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/eventBus.js deleted file mode 100644 index 8853b4d..0000000 --- a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/eventBus.js +++ /dev/null @@ -1,3 +0,0 @@ -import Vue from 'vue' - -export default new Vue() diff --git a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue index e5fd270..9b4a92f 100644 --- a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue +++ b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue @@ -162,11 +162,9 @@ <el-card shadow="hover"> <span class="clearfixs">鍙戠敓鐖嗚鐨勭娈�</span> <el-table - ref="singleTable" highlight-current-row :data="bgPipeLine" - style="width: 100%" size="mini"> <el-table-column prop="lineloopna" @@ -362,6 +360,7 @@ width="180"> </el-table-column> <el-table-column + class-name="fixed-table" fixed="right" label="鍥捐〃鏌ョ湅" > @@ -387,65 +386,72 @@ <script> -// import eventBus from './AnalysisChoose/eventBus' -// import DrawLine from './AnalysisChoose/DrawLine' - -// import api from "../api" +import eventBus from '../../../../eventBus' +import DrawLine from './AnalysisChoose/DrawLine' // import main from "../leaflet/app/main" - import mapApi from '@/api/mapApi' export default { name: 'SewersAnalysis', data () { return { - activeName: 'first', // 鍦板浘鐐瑰嚮绫诲瀷 first杩為�氭�х偣鍑� second鐖嗙鐐瑰嚮 third娴佸悜鐐瑰嚮 fourth妯柇闈� + // 鍦板浘鐐瑰嚮绫诲瀷 first杩為�氭�х偣鍑� second鐖嗙鐐瑰嚮 third娴佸悜鐐瑰嚮 fourth妯柇闈� + activeName: 'first', measure: null, map: null, - tableData: [], - tableDataLiuxiang: [], myChart: null, myChartShow: false, flowPipeLine: null, - - // 杩為�氭�� - linkType: 1, // 1 杩為�氭�ц捣濮嬬娈� 0 杩為�氭�х粨鏉熺娈� 鐢ㄦ潵鍒ゆ柇鏄偣鍑讳簡璧峰 杩樻槸缁撴潫绠℃ - // 璧峰绠℃琛ㄦ牸鏁版嵁 - tableDataLinkStart: [], - // 缁撴潫绠℃琛ㄦ牸鏁版嵁 - tableDataLinkEnd: [], - // 杩為�氭�у垎鏋愮粨鏋滆〃鏍� - tableDataLinkResult: [], currentSelectStart: null, currentSelectEnd: null, currentSelectStartLine: null, currentSelectEndLine: null, currentSelectResultLine: null, - currentResultLine: null, - currentLinkIsTrue: '', linkPipeline: [], - lxTableDataResult: [], - - bgPipeLine: [], - bgFm: [], bgPoint: null, bgMarker: null, + hdmParam: null, - hdmParam: null + // 杩為�氭�� // 1 杩為�氭�ц捣濮嬬娈� 0 杩為�氭�х粨鏉熺娈� 鐢ㄦ潵鍒ゆ柇鏄偣鍑讳簡璧峰 杩樻槸缁撴潫绠℃ + linkType: 1, + // 杩為�氭�� 璧峰绠℃ 琛ㄦ牸鏁版嵁 + tableDataLinkStart: [], + // 杩為�氭�� 缁撴潫绠℃ 琛ㄦ牸鏁版嵁 + tableDataLinkEnd: [], + // 杩為�氭�� 鍒嗘瀽缁撴灉 灞曠ず => 杩為�� || 涓嶈繛閫� + currentLinkIsTrue: '', + // 杩為�氭�� 鍒嗘瀽缁撴灉 琛ㄦ牸鏁版嵁 + tableDataLinkResult: [], + + // 鐖嗙 鍙戠敓鐖嗚鐨勭娈� table琛ㄦ牸鏁版嵁 + bgPipeLine: [], + // 鐖嗙 闇�瑕佸叧闂殑闃�闂� table琛ㄦ牸鏁版嵁 + bgFm: [], + + // 娴佸悜 閫夋嫨鐨勭娈� 鐨則able琛ㄦ牸鏁版嵁 + tableDataLiuxiang: [], + // 娴佸悜 鍒嗘瀽缁撴灉 鐨則able琛ㄦ牸鏁版嵁 + lxTableDataResult: [], + + // 妯柇闈� 绠$嚎鏌ヨ缁撴灉 鐨則able琛ㄦ牸鏁版嵁 + tableData: [] } }, mounted () { - this.$nextTick(() => { - this.map = window.map - // this.myChart = this.$echarts.init(document.getElementById('echarts_box')) - // eventBus.$on('draw-hdm-line', (points) => { - // this.getHdmPoint(points) - // }) + // this.myChart = this.$echarts.init(document.getElementById('echarts_box')) + // 鍏ㄥ眬map浼犻�� || this.map = window.map + this.map = window.map + eventBus.$on('map-obj', (mapObj) => { + this.map = mapObj + }) + // 浣跨敤 DrwLine鏂规硶 + eventBus.$on('draw-hdm-line', (points) => { + this.getHdmPoint(points) }) }, methods: { @@ -474,7 +480,7 @@ this.map.off('click', this.selectClick) const point = [e.latlng.lng, e.latlng.lat] console.log(point) - // this.getPipeLine(point) + this.getPipeLine(point) }, // 杩為�氭�� ===> 鍦板浘鐐瑰嚮璧峰绠℃ @@ -489,6 +495,7 @@ this.linkType = 0 this.selectPipeLine() }, + // 杩為�氭�� 璧峰绠℃ table鍒楄〃鏁版嵁 閫夋嫨鏁版嵁浜嬩欢 鐨勭偣鍑讳簨浠� linkSelectStart (e) { console.log('閫夋嫨璧峰绠℃') console.log(e) @@ -506,6 +513,7 @@ // }).addTo(this.map) // this.map.panInsideBounds(this.currentSelectStartLine.getBounds()) }, + // 杩為�氭�� 缁撴潫绠℃ table鍒楄〃鏁版嵁 閫夋嫨鏁版嵁浜嬩欢 鐨勭偣鍑讳簨浠� linkSelectEnd (e) { console.log('閫夋嫨缁撴潫绠℃') console.log(e) @@ -524,6 +532,7 @@ // }).addTo(this.map) // this.map.panInsideBounds(this.currentSelectEndLine.getBounds()) }, + // 杩為�氭�� 鍒嗘瀽缁撴灉table鍒楄〃鏁版嵁閫夋嫨鐐瑰嚮浜嬩欢 linkResultSelect (e) { console.log('杩為�氭�у垎鏋愮粨鏋滃垪琛ㄧ偣鍑�') console.log(e) @@ -601,7 +610,7 @@ // this.linkPipeline.push(line) // }) }, - // 杩為�氭�ч儴鍒嗙殑娓呴櫎鍔熻兘 + // 杩為�氭�х殑娓呴櫎鍔熻兘 linkClear () { if (this.currentSelectStartLine != null) { this.currentSelectStartLine.remove() @@ -618,65 +627,6 @@ if (this.bgMarker != null) { this.bgMarker.remove() this.bgMarker = null - } - }, - - // 娴佸悜鍒嗘瀽缁撴灉table鍒楄〃鏁版嵁鐐瑰嚮 - lxResultSelect (e) { - console.log('杩為�氭�у垎鏋愮粨鏋滃垪琛ㄧ偣鍑�') - console.log(e) - - // const geom = JSON.parse(e.geomText) - // if (this.currentSelectResultLine != null) { - // this.currentSelectResultLine.remove() - // this.currentSelectResultLine = null - // } - // this.currentSelectResultLine = L.geoJSON(geom, { - // style: function (feature) { - // return { color: 'rgba(0,250,255,.6)' } - // } - // }).addTo(this.map) - // this.map.panInsideBounds(this.currentSelectResultLine.getBounds()) - }, - // 鐐瑰嚮鏄剧ず娴佸悜 table鍒楄〃鏁版嵁 - async lxQuery (e) { - console.log(e) - this.clearLinkPipe() - // const param = { - // lineNodeID: e.startpoint - // } - // const res = await api.findFlowDirection(param) - - // this.lxTableDataResult = res.data - // const linkPipe = [] - // res.data.forEach((itm, idx) => { - // const geom = JSON.parse(itm.geomText) - // const points = [] - // geom.coordinates.forEach((it, id) => { - // points.push(it.reverse()) - // }) - // - // linkPipe.push(points) - // }) - - // linkPipe.forEach((itm, idx) => { - // // const param1 = { - // // points: itm, - // // option: { - // // dashArray: '15 15', - // // dashSpeed: -30, - // // color: '#ffff00' - // // } - // // } - // // const line = main.createFlowLine(param1) - // // this.linkPipeline.push(line) - // }) - }, - // 娓呴櫎娴佸悜 - clearLX () { - if (this.flowPipeLine != null) { - this.flowPipeLine.remove() - this.flowPipeLine = null } }, @@ -764,14 +714,76 @@ // marker.addTo(this.map) this.map.flyTo(point, 16) }, + + // 娴佸悜鍒嗘瀽缁撴灉table鍒楄〃鏁版嵁鐐瑰嚮 + lxResultSelect (e) { + console.log('杩為�氭�у垎鏋愮粨鏋滃垪琛ㄧ偣鍑�') + console.log(e) + + // const geom = JSON.parse(e.geomText) + // if (this.currentSelectResultLine != null) { + // this.currentSelectResultLine.remove() + // this.currentSelectResultLine = null + // } + // this.currentSelectResultLine = L.geoJSON(geom, { + // style: function (feature) { + // return { color: 'rgba(0,250,255,.6)' } + // } + // }).addTo(this.map) + // this.map.panInsideBounds(this.currentSelectResultLine.getBounds()) + }, + // 鐐瑰嚮鏄剧ず娴佸悜 table鍒楄〃鏁版嵁 + async lxQuery (e) { + console.log(e) + this.clearLinkPipe() + // const param = { + // lineNodeID: e.startpoint + // } + // const res = await api.findFlowDirection(param) + + // this.lxTableDataResult = res.data + // const linkPipe = [] + // res.data.forEach((itm, idx) => { + // const geom = JSON.parse(itm.geomText) + // const points = [] + // geom.coordinates.forEach((it, id) => { + // points.push(it.reverse()) + // }) + // + // linkPipe.push(points) + // }) + + // linkPipe.forEach((itm, idx) => { + // // const param1 = { + // // points: itm, + // // option: { + // // dashArray: '15 15', + // // dashSpeed: -30, + // // color: '#ffff00' + // // } + // // } + // // const line = main.createFlowLine(param1) + // // this.linkPipeline.push(line) + // }) + }, + // 娓呴櫎娴佸悜 + clearLX () { + if (this.flowPipeLine != null) { + this.flowPipeLine.remove() + this.flowPipeLine = null + } + }, + // 娴佸悜鏁版嵁璇锋眰 async getPipeLine (point) { - // const param = { - // x: point[0], - // y: point[1], - // radius: 3 - // } + const param = { + x: point[0], + y: point[1], + radius: 3 + } + console.log(param) + // 鏍规嵁鍙傛暟璇锋眰鎺ュ彛鏁版嵁 // const res = await api.getPipeline(param) // 3 娴佸悜 @@ -812,6 +824,7 @@ // this.flowPipeLine = main.createFlowLine(param) }, + // 娓呮鍒嗘瀽缁撴灉 clearLinkPipe () { if (this.linkPipeline.length > 0) { this.linkPipeline.forEach((itm, idx) => { @@ -820,6 +833,7 @@ } this.linkPipeline = [] }, + // 閫嗘祦鍚戞樉绀� lxHandleClick2 (e) { console.log('閫嗘祦鍚戞樉绀�') console.log(e) @@ -836,6 +850,15 @@ // } // this.flowPipeLine = main.createFlowLine(param) }, + // 妯柇闈㈢粯鍒剁嚎娈� + drawLine () { + console.log('drawLine') + if (this.measure === null) { + this.measure = new DrawLine(this.map) + } + this.measure.destory() + this.measure.init() + }, // 妯柇闈㈡暟鎹姹� async getHdmPoint (line) { console.log('妯柇闈㈢殑缁樺埗绾�') @@ -847,11 +870,20 @@ y2: line[1].lat } }, - // 妯柇闈㈤�夋嫨鍚� 鍥捐〃灞曠ず + // 妯柇闈㈡暟鎹姹� + async jdmQuery () { + if (this.hdmParam == null) { + this.$message('璇峰厛鍦ㄥ湴鍥句笂缁樺埗鎴柇绾�') + return false + } + // 宸茬粯鍒剁嚎鍥� 杩涜缁樺埗妯柇闈㈡暟鎹垎鏋� + // const res = await api.getCrossSection(this.hdmParam) + // console.log(res) + }, + // 妯柇闈㈢粯鍒跺畬鎴愬悗 杩涜妯柇闈㈡暟鎹垎鏋� 杩涜鍥捐〃灞曠ず async selectRow (e) { console.log(e) // 3. 浣跨敤鍒氭寚瀹氱殑閰嶇疆椤瑰拰鏁版嵁锛屾樉绀哄浘琛� - const option = { xAxis: { type: 'category', @@ -865,26 +897,10 @@ type: 'line' }] } - this.myChartShow = true this.myChart.setOption(option) }, - drawLine () { - console.log('drawLine') - // if (this.measure === null) { - // this.measure = new DrawLine(this.map) - // } - this.measure.destory() - this.measure.init() - }, - async jdmQuery () { - // if (this.hdmParam == null) { - // this.$message('璇峰厛鍦ㄥ湴鍥句笂缁樺埗鎴柇绾�') - // return - // } - // const res = await api.getCrossSection(this.hdmParam) - // console.log(res) - }, + // 妯柇闈㈡竻闄� jdmClear () { this.hdmParam = null if (this.measure != null) { -- Gitblit v1.8.0