Administrator 2 éve
szülő
commit
569fec57e8

+ 0 - 1
src/views/Map3d/Map3DMain.vue

@@ -46,7 +46,6 @@
 	import printmap from './components/printmap.vue';
 	import dialogEdit from "./components/drawEdit.vue";
 	import queryResult from "./components/queryResult.vue";
-	import RightHeading from "./components/RightHeading.vue";
 	import ggsbtj from "./components/ggsbtj.vue";
 	import ysltj from "./components/ysltj.vue";
 	import sbyxjc from "./components/sbyxjc.vue"

+ 0 - 294
src/views/Map3d/components/EchartsLine.vue

@@ -1,294 +0,0 @@
-<template>
-  <div class="echarts-line" :id="ids"></div>
-</template>
-
-<script>
-import * as echarts from 'echarts'
-
-export default {
-  props: {
-    legendChecked: {
-      // 图例
-      default: true
-    },
-    ids: {
-      // id
-      type: String,
-      default: 'echartsline'
-    },
-    fontColor: {
-      // 字体颜色
-      type: String,
-      default: '#89949F'
-    },
-    yLine: {
-      // x轴分割线
-      default: false
-    },
-    chartData: {
-      // echarts·数据
-      default: function () {
-        return []
-      }
-    },
-    // Y轴单位
-    Yunit: {
-      type: Boolean,
-      default: true
-    },
-    theme: {
-      default: function () {
-        return ['#3da4fe', '#23cef2', '#65b664', '#00FDCB']
-      }
-    }
-  },
-  watch: {
-    chartData: {
-      // 深度监听,可监听到对象、数组的变化
-      handler() {
-        this.$nextTick(() => {
-          if (this.chartData && this.chartData.length > 0) {
-            this.dataValue(this.chartData)
-          }
-        })
-      },
-      deep: true, // 深度监听,可监听到对象、数组的变化
-      immediate: true // 立刻执行
-    }
-  },
-  data() {
-    return {}
-  },
-  mounted() {},
-  methods: {
-    dataValue(newVal) {
-      if (newVal && newVal.length > 0) {
-        const seriesConfig = []
-        const Yconfig = []
-        const unit = []
-        for (let i = 0; i < newVal.length; i++) {
-          if (newVal[i].areaStyle) {
-            const obj = {
-              type: 'line',
-              name: newVal[i].name,
-              data: newVal[i].yData,
-              smooth: newVal[i].smooth ? newVal[i].smooth : false,
-              showSymbol: newVal[i].showSymbol ? newVal[i].showSymbol : false,
-              lineStyle: {
-                color: newVal[i].lineColor
-              },
-              areaStyle: {
-                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-                  {
-                    offset: 0,
-                    color: newVal[i].areaColor
-                  },
-                  {
-                    offset: 1,
-                    color: 'rgba(0,0,0,0)'
-                  }
-                ])
-              }
-            }
-            if (i === 1) {
-              obj.yAxisIndex = 1
-            }
-            seriesConfig.push(obj)
-            if (this.Yunit) {
-              Yconfig.push({
-                type: 'value',
-                name:
-                    (newVal.length > 1 ? newVal[i].name : '单位') +
-                    ':' +
-                    newVal[i].unit,
-                nameTextStyle: {
-                  fontSize: 12,
-                  color: this.fontColor
-                },
-                splitNumber: 5,
-                axisTick: {
-                  show: false
-                },
-                splitLine: {
-                  show: this.yLine,
-                  lineStyle: {
-                    color: 'rgba(153, 153, 153, 0.3)'
-                  }
-                },
-                axisLine: {
-                  show: false
-                },
-                axisLabel: {
-                  color: this.fontColor,
-                  fontSize: 12
-                }
-              })
-            } else {
-              Yconfig.push({
-                type: 'value',
-                nameTextStyle: {
-                  fontSize: 12,
-                  color: this.fontColor
-                },
-                splitNumber: 5,
-                axisTick: {
-                  show: false
-                },
-                splitLine: {
-                  show: this.yLine,
-                  lineStyle: {
-                    color: 'rgba(153, 153, 153, 0.3)'
-                  }
-                },
-                axisLine: {
-                  show: false
-                },
-                axisLabel: {
-                  color: this.fontColor,
-                  fontSize: 12
-                }
-              })
-              Yconfig[0].name = '(m³/s)'
-            }
-
-            unit.push(newVal[i].unit)
-          } else {
-            seriesConfig.push({
-              type: 'line',
-              name: newVal[i].name,
-              data: newVal[i].yData,
-              smooth: newVal[i].smooth ? newVal[i].smooth : false,
-              symbolSize: newVal[i].showSymbol ? newVal[i].showSymbol : false,
-              lineStyle: {
-                color: newVal[i].lineColor
-              }
-            })
-            Yconfig.push({
-              type: 'value',
-              name: newVal[i].name + ':' + newVal[i].unit,
-              nameTextStyle: {
-                fontSize: 12,
-                color: this.fontColor
-              },
-              splitNumber: 5,
-              axisTick: {
-                show: false
-              },
-              splitLine: {
-                show: this.yLine,
-                lineStyle: {
-                  color: '#e5e5e5'
-                }
-              },
-              axisLine: {
-                show: false
-              },
-              axisLabel: {
-                color: this.fontColor,
-                fontSize: 12
-              }
-            })
-            unit.push(newVal[i].unit)
-          }
-        }
-        this.setEcharts(seriesConfig, Yconfig, newVal[0].xData, unit)
-      }
-    },
-    setEcharts(series, Yconfig, dataAxis, unit) {
-      let legend = []
-      if (this.legendChecked) {
-        legend = this.chartData.map((data, i) => {
-          return {
-            name: data.name,
-            icon: 'roundRect',
-            itemStyle: series[i].lineStyle
-          }
-        })
-      } else {
-        legend = []
-      }
-      const myChart = echarts.init(document.getElementById(this.ids))
-      const option = {
-        color: this.theme,
-        tooltip: {
-          trigger: 'axis',
-          formatter: function (data) {
-            if (!data.length) return
-            if (data.length > 1) {
-              let html = ''
-              html = `<div class="toolTips"><div style="font-size: 12px;color: #fff">${data[0].axisValue}</div>`
-              for (let i = 0; i < data.length; i++) {
-                html += `<div style="font-size: 12px;color: #fff">${series[i].name}: ${data[i].value} ${unit[i]}</div>`
-              }
-              html += '</div>'
-              return html
-            } else {
-              return `<div class="toolTips"><div style="font-size: 12px;color: #fff">${data[0].axisValue}: ${data[0].value} ${unit[0]}</div></div>`
-            }
-          },
-          backgroundColor: '#487892',
-          borderWidth: 0,
-          padding: [3, 5],
-          axisPointer: {
-            lineStyle: {
-              color: '#299acb'
-            }
-          }
-        },
-        legend: {
-          top: 0,
-          right: 'center',
-          width: 240,
-          data: legend,
-          itemWidth: 15,
-          itemHeight: 5,
-          show: true,
-          selectedMode: false,
-          textStyle: {
-            color: this.fontColor
-          }
-        },
-        xAxis: {
-          type: 'category',
-          data: dataAxis,
-          boundaryGap: false,
-          axisTick: {
-            show: true,
-            inside: true
-          },
-          splitLine: {
-            show: false
-          },
-          axisLine: {
-            lineStyle: {
-              color: 'rgba(135,142,148,0.5)'
-            }
-          },
-          axisLabel: {
-            color: this.fontColor,
-            fontSize: 12
-          }
-        },
-        yAxis: Yconfig,
-        grid: {
-          left: 20,
-          right: 35,
-          top: this.legendChecked ? 30 : 30,
-          bottom: 0,
-          containLabel: true
-        },
-        series: series
-      }
-      myChart.clear()
-      myChart.setOption(option, true)
-    }
-  }
-}
-</script>
-
-<style scoped lang="scss">
-.echarts-line {
-  width: 80%;
-  height: 80%;
-}
-</style>

+ 0 - 183
src/views/Map3d/components/RightHeading.vue

@@ -1,183 +0,0 @@
-<template>
-  <div class="container">
-    <div class="echartsLine">
-      <div class="mt-4">
-
-      </div>
-      <div class="mt-5">
-
-      </div>
-      <div class="mt-6">
-
-      </div>
-
-    </div>
-
-
-  </div>
-</template>
-
-<script>
-import EchartsLine from "./EchartsLine.vue";
-
-export default {
-  name: "RightHeading",
-  components: {EchartsLine},
-  data() {
-    return {
-      data1: [
-        {
-          "lineColor": "#2f63db",
-          "areaStyle": true,
-          "smooth": true,
-          "areaColor": "rgba(0,253,203,0.5)",
-          "xData": [
-            "03-10 18:00",
-            "03-10 19:00",
-            "03-10 20:00",
-            "03-10 21:00",
-            "03-10 22:00",
-            "03-10 23:00",
-            "03-11 00:00",
-            "03-11 01:00",
-            "03-11 02:00",
-            "03-11 03:00",
-            "03-11 04:00",
-            "03-11 05:00",
-            "03-11 06:00",
-            "03-11 07:00",
-            "03-11 08:00",
-            "03-11 09:00",
-            "03-11 10:00",
-            "03-11 11:00",
-            "03-11 12:00",
-            "03-11 13:00",
-            "03-11 14:00",
-            "03-11 15:00",
-            "03-11 16:00",
-            "03-11 17:00"
-          ],
-          "yData": [
-            "2925.51",
-            "2925.51",
-            "2925.50",
-            "2925.49",
-            "2925.48",
-            "2925.47",
-            "2925.46",
-            "2925.45",
-            "2925.47",
-            "2925.49",
-            "2925.53",
-            "2925.58",
-            "2925.62",
-            "2925.65",
-            "2925.67",
-            "2925.67",
-            "2925.66",
-            "2925.65",
-            "2925.63",
-            "2925.61",
-            "2925.58",
-            "2925.57",
-            "2925.55",
-            "2925.55"
-          ],
-          "name": "水位",
-          "unit": "m"
-        },
-        {
-          "lineColor": "#cf954b",
-          "areaStyle": true,
-          "smooth": true,
-          "areaColor": "rgba(0,229,255,0.5)",
-          "xData": [
-            "03-10 18:00",
-            "03-10 19:00",
-            "03-10 20:00",
-            "03-10 21:00",
-            "03-10 22:00",
-            "03-10 23:00",
-            "03-11 00:00",
-            "03-11 01:00",
-            "03-11 02:00",
-            "03-11 03:00",
-            "03-11 04:00",
-            "03-11 05:00",
-            "03-11 06:00",
-            "03-11 07:00",
-            "03-11 08:00",
-            "03-11 09:00",
-            "03-11 10:00",
-            "03-11 11:00",
-            "03-11 12:00",
-            "03-11 13:00",
-            "03-11 14:00",
-            "03-11 15:00",
-            "03-11 16:00",
-            "03-11 17:00"
-          ],
-          "yData": [
-            345,
-            345,
-            341,
-            337,
-            333,
-            329,
-            325,
-            321,
-            329,
-            337,
-            353,
-            374,
-            392,
-            406,
-            415,
-            415,
-            410,
-            406,
-            396,
-            387,
-            374,
-            370,
-            362,
-            362
-          ],
-          "name": "流量",
-          "unit": "m³/s"
-        }
-      ]
-    }
-  }
-}
-</script>
-
-<style scoped>
-
-.mt-4 {
-  height: 250rem;
-  background-color: blue;
-  width: 100%;
-  position: relative;
-  top: 10%;
-
-}
-.mt-5 {
-  height: 250rem;
-  background-color:yellow;
-  width: 100%;
-  position: relative;
-
-}
-
-.container {
-  right: 0%;
-  height: 85%;
-  width: 20%;
-  background-color: red;
-  position: absolute;
-  top: 10%;
-  transition: opacity .5s;
-
-}
-</style>