| | |
| | | <div class="title"> |
| | | {{ layerData.layerName }} |
| | | </div> |
| | | <div |
| | | :id="`myEcharts${chartsId}`" |
| | | :style="{ width: width, height: height }" |
| | | ></div> |
| | | <div id="myEcharts" :style="{ width: width, height: height }"></div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { |
| | |
| | | width: String, |
| | | height: String, |
| | | layerData: Object, |
| | | chartsId: String, |
| | | }); |
| | | let myEcharts = echarts; |
| | | let seriesData = ref([]); |
| | |
| | | type: "line", |
| | | smooth: true, |
| | | symbol: "none", //取消折点圆圈 |
| | | itemStyle: { |
| | | normal: { |
| | | label: { |
| | | label: { |
| | | show: false, |
| | | position: "top", |
| | | formatter: "{c}", |
| | | }, |
| | | }, |
| | | }, |
| | | }); |
| | |
| | | type: "line", |
| | | smooth: true, |
| | | symbol: "none", //取消折点圆圈 |
| | | itemStyle: { |
| | | normal: { |
| | | label: { |
| | | label: { |
| | | show: false, |
| | | position: "top", |
| | | formatter: "{c}", |
| | | }, |
| | | }, |
| | | }, |
| | | }); |
| | |
| | | } |
| | | function initChart() { |
| | | let chart = myEcharts.init( |
| | | document.getElementById(`myEcharts${props.chartsId}`), |
| | | document.getElementById(`myEcharts`), |
| | | "purple-passion" |
| | | ); |
| | | chart.setOption({ |
| | |
| | | type: "line", |
| | | smooth: true, |
| | | symbol: "none", //取消折点圆圈 |
| | | itemStyle: { |
| | | normal: { |
| | | label: { |
| | | label: { |
| | | show: false, |
| | | position: "top", |
| | | formatter: "{c}", |
| | | }, |
| | | }, |
| | | }, |
| | | }); |
| | |
| | | :width="'100%'" |
| | | :height="'260px'" |
| | | :layerData="layerData" |
| | | :chartsId="0" |
| | | ></Bar-graph> |
| | | <div class="select"> |
| | | <el-select |
| | |
| | | const selectPolyline = async (res) => { |
| | | layerArr.value = []; |
| | | const dt = await selectByPolyline(res); |
| | | console.log(dt); |
| | | |
| | | dt.result.forEach((e) => { |
| | | e.points.forEach((element) => { |
| | | element = keepThreeNum(element); |
| | | element.vals.forEach((v) => { |
| | | v = keepThreeNum(v); |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | layeroptions.value = dt.result; |
| | | layerArr.value.push(dt.result[0]); |
| | | chartIsshow.value = true; |