瀏覽代碼

no message

Administrator 2 年之前
父節點
當前提交
d293414800

+ 14 - 14
src/views/Main/components/ZhHeader.vue

@@ -18,7 +18,7 @@
 		name: "ZhHeader",
 		data() {
 			return {
-				yztTitle: false,
+				yztTitle: true,
 				sqTitle: true,
 				ggTitle: true,
 				ywTitle: true
@@ -62,8 +62,8 @@
 	$fullsize: calc(100% - 0px);
 
 	.header {
-		width: $fullsize;
-		height: $fullsize;
+		width: 1920rem;
+		height: 90rem;
 		background: url(src/assets/images/logo2.png) no-repeat;
 		background-repeat: no-repeat;
 		background-size: contain;
@@ -73,7 +73,7 @@
 
 	.YztTitle {
 		left: 10%;
-		top: 4%;
+		top: 50%;
 		width: 246rem;
 		height: 54rem;
 		background: url(src/assets/images/yztTitie.png) no-repeat;
@@ -83,7 +83,7 @@
 
 	.YztXzTitle {
 		left: 10%;
-		top: 4%;
+		top: 50%;
 		width: 246rem;
 		height: 54rem;
 		background: url(src/assets/images/yztXzTitie.png) no-repeat;
@@ -93,7 +93,7 @@
 
 	.SqTitle {
 		left: 23%;
-		top: 4%;
+		top: 50%;
 		width: 246rem;
 		height: 54rem;
 		background: url(src/assets/images/sqTitle.png) no-repeat;
@@ -103,7 +103,7 @@
 
 	.SqXzTitle {
 		left: 23%;
-		top: 4%;
+		top: 50%;
 		width: 246rem;
 		height: 54rem;
 		background: url(src/assets/images/sqXzTitle.png) no-repeat;
@@ -112,8 +112,8 @@
 	}
 
 	.GgTitle {
-		left: 67%;
-		top: 4%;
+		left: 65%;
+		top: 50%;
 		width: 246rem;
 		height: 54rem;
 		background: url(src/assets/images/ggTitle.png) no-repeat;
@@ -122,8 +122,8 @@
 	}
 
 	.GgXzTitle {
-		left: 67%;
-		top: 4%;
+		left: 65%;
+		top: 50%;
 		width: 246rem;
 		height: 54rem;
 		background: url(src/assets/images/ggXzTitle.png) no-repeat;
@@ -132,8 +132,8 @@
 	}
 
 	.YwTitle {
-		left: 80%;
-		top: 4%;
+		left: 78%;
+		top: 50%;
 		width: 246rem;
 		height: 54rem;
 		background: url(src/assets/images/ywTitle.png) no-repeat;
@@ -143,7 +143,7 @@
 
 	.YwXzTitle {
 		left: 80%;
-		top: 4%;
+		top: 50%;
 		width: 246rem;
 		height: 54rem;
 		background: url(src/assets/images/ywXzTitle.png) no-repeat;

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

@@ -46,6 +46,7 @@
 	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 {
 		provide
 	} from "vue";
@@ -168,6 +169,9 @@
 			<jt-popup :showfooter='isshowfooter' animationClass="fadein-left" height="400rem" width="800rem" title="信息展示" ref="refQueryResultPopup" :isEmit="true" @closeJTPopup="closeQueryResult">
 				<queryResult ref="refQueryResult" />
 			</jt-popup>
+			
+			<RightHeading></RightHeading>
+			
 
 			<!-- <video id="trailer" style="display: none;"  autoplay loop crossorigin controls>
 				<source src="@/assets/dataFile/jt.mp4" type="video/mp4">

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

@@ -0,0 +1,294 @@
+<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>

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

@@ -0,0 +1,185 @@
+<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>