浏览代码

Merge branch 'master' of http://192.168.2.21:11666/chenlong/xx_sw_dp

chc 1 年之前
父节点
当前提交
759e82bcfc

+ 1 - 0
src/assets/icons/direction-icon.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="20" height="40" viewBox="0 0 20 40"><g><path d="M0,0L20,0L20,3L3,3L3,8L20,8L20,11L3,11L3,16L20,16L20,19L3,19L3,40L0,40L0,0Z" fill-rule="evenodd" fill="#006EDC" fill-opacity="1"/></g></svg>

+ 12 - 2
src/components/Dialog/mapDialog.vue

@@ -657,8 +657,18 @@ function echarts1() {
           color: '#fff',
         },
         formatter: function (value) {
-          return value + "";
-        }
+          if (tableTitle.value.indexOf('水位') != -1) {
+            return value.toFixed(2);
+          } else if (tableTitle.value.indexOf('流量') != -1) {
+            if(value<100){
+              return value.toPrecision(3)
+            }else{
+              return Number(value.toPrecision(3))
+            }
+          } else {
+            return value.toFixed(1);
+          }
+        },
       },
       splitLine: {
         //网格线

+ 27 - 26
src/views/hydrology/components/regimen.vue

@@ -141,22 +141,21 @@ function tablsOnChange(e) {
 let activeEcharts = ref('1');
 let regimenTitle = ref('水位流量过程线');
 function waterLevel(max, min) {
-  let maxValue = Math.ceil(max);
-  let minValue = Math.floor(min);
+  let maxValue = max;
+  let minValue = min;
   let interval = 0;
-  console.log((max - min) / 5);
   if ((max - min) / 5 <= 0.2) {
     interval = 0.2;
-    maxValue = Math.floor(maxValue);
-    maxValue = Math.ceil(maxValue);
+    maxValue = maxValue;
+    maxValue = maxValue;
   } else if ((max - min) / 5 <= 0.5) {
     interval = 0.5;
-    maxValue = Math.floor(maxValue);
-    maxValue = Math.ceil(maxValue);
+    maxValue = maxValue;
+    maxValue = maxValue;
   } else if ((max - min) / 5 <= 1) {
     interval = 0.5;
-    maxValue = Math.floor(maxValue);
-    maxValue = Math.ceil(maxValue);
+    maxValue = maxValue;
+    maxValue =maxValue;
   } else {
     // 获取余数
     minValue = minValue - (5 - ((maxValue - minValue) % 5));
@@ -312,9 +311,10 @@ function echarts1() {
           color: 'rgba(255, 255, 255, 0.8)', //颜色
         },
         scale: true,
-        interval: liuliang2.interval, // 步长
-        min: liuliang2.minValue,
-        max: liuliang2.maxValue,
+        alignTicks: true,
+        // interval: liuliang2.interval, // 步长
+        // min: liuliang2.minValue,
+        // max: liuliang2.maxValue,
       },
       {
         type: 'value',
@@ -345,9 +345,10 @@ function echarts1() {
           padding: [0, 0, 0, 30],
         },
         scale: true,
-        interval: shuiwei.interval, // 步长
-        min: shuiwei.minValue,
-        max: shuiwei.maxValue,
+        alignTicks: true,
+        // interval: shuiwei.interval, // 步长
+        // min: shuiwei.minValue,
+        // max: shuiwei.maxValue,
       },
     ],
     series: [
@@ -470,9 +471,9 @@ function echarts2() {
         padding: [0, 0, 0, 30],
       },
       scale: true,
-      interval: liuliang2.interval, // 步长
-      min: liuliang2.minValue,
-      max: liuliang2.maxValue,
+      //interval: liuliang2.interval, // 步长
+      //min: liuliang2.minValue,
+      //max: liuliang2.maxValue,
     },
 
     series: [
@@ -511,14 +512,14 @@ function circulateData() {
     circulateArr = regimenData.regimen.st_waterz;
   }
   // 判断类型
-  circulateFn = setInterval(async () => {
-    setActiveFn(circulateArr[circulateNum]);
-    if (circulateNum == circulateArr.length - 1) {
-      circulateNum = 0;
-    } else {
-      circulateNum += 1;
-    }
-  }, VITE_GLOB_UPDATE_TIME);
+  // circulateFn = setInterval(async () => {
+  //   setActiveFn(circulateArr[circulateNum]);
+  //   if (circulateNum == circulateArr.length - 1) {
+  //     circulateNum = 0;
+  //   } else {
+  //     circulateNum += 1;
+  //   }
+  // }, VITE_GLOB_UPDATE_TIME);
 }
 // 这里是获取数据
 async function setActiveEcharts(item) {

+ 23 - 14
src/views/meteorological/components/monitorEcharts.vue

@@ -127,7 +127,7 @@ function echarts1() {
         formatter: function (val) {
           var strs = val.split(''); //字符串数组
           var str = '';
-          for (var i = 0, s; (s = strs[i++]); ) {
+          for (var i = 0, s; (s = strs[i++]);) {
             //遍历字符串数组
             if (i > 5 && i < 17) {
               str += s;
@@ -157,7 +157,7 @@ function echarts1() {
             margin: 15,
           },
           formatter: function (value) {
-            return value + '';
+            return value.toFixed(1);
           },
           // formatter: '{value} %'//y轴的每一个刻度值后面加上‘%’号
         },
@@ -170,7 +170,7 @@ function echarts1() {
         //单位的样式设置
         nameTextStyle: {
           color: 'rgba(255, 255, 255, 0.8)', //颜色
-          padding: [15, 20, 15, -700],
+          padding: [15, 25, 15, -700],
         },
         scale: true,
       },
@@ -211,7 +211,7 @@ function echarts2() {
               风速(m/s):${params[0].data}
             </div>
             <div>
-              风向:${props.windDirection.data[params[0].dataIndex]?setWd(props.windDirection.data[params[0].dataIndex]):'-'}
+              风向:${props.windDirection.data[params[0].dataIndex] ? setWd(props.windDirection.data[params[0].dataIndex]) : '-'}
             </div>
           </div>`;
       },
@@ -256,7 +256,7 @@ function echarts2() {
         formatter: function (val) {
           var strs = val.split(''); //字符串数组
           var str = '';
-          for (var i = 0, s; (s = strs[i++]); ) {
+          for (var i = 0, s; (s = strs[i++]);) {
             //遍历字符串数组
             if (i > 5 && i < 17) {
               str += s;
@@ -279,7 +279,7 @@ function echarts2() {
             margin: 15,
           },
           formatter: function (value) {
-            return value + '';
+            return value.toFixed(1);
           },
           // formatter: '{value} %'//y轴的每一个刻度值后面加上‘%’号
         },
@@ -330,8 +330,8 @@ function echarts2() {
         data: props.windSpeeCharts.data,
         type: 'line',
         smooth: true,
-        symbol: 'image://' + imgangle,
-        symbolSize: 30,
+        symbol: 'path://M0,0L20,0L20,3L3,3L3,8L20,8L20,11L3,11L3,16L20,16L20,19L3,19L3,40L0,40L0,0Z',
+        symbolSize: 18,
         symbolRotate: (value, params) => {
           return props.windDirection.data[params.dataIndex] * -1;
         },
@@ -458,6 +458,7 @@ let activeKey = ref('1');
   height: 40px;
   width: 169px;
 }
+
 ::v-deep(.total222 .ant-tabs-nav > div > div:nth-child(2).ant-tabs-tab-active) {
   // background: url('../../assets/images/sjx1.png') no-repeat 42px 9px;
   // background: url('../../../assets/images/tab.png') no-repeat;
@@ -468,6 +469,7 @@ let activeKey = ref('1');
   // line-height: 42px;
   // margin-left: -6px;
 }
+
 // ::v-deep(.total222 .ant-tabs-nav > div > div:nth-child(2).ant-tabs-tab-active span) {
 //   position: relative;
 //   // top: 10px !important;
@@ -481,41 +483,47 @@ let activeKey = ref('1');
   margin: 0;
   width: 149px;
 }
+
 ::v-deep(.total222 .ant-tabs-nav .ant-tabs-tab span) {
   position: relative;
   top: -4px;
   color: #377dff;
 }
+
 ::v-deep(.total222 .ant-tabs-nav .ant-tabs-tab-active span) {
   color: #c9d1d9 !important;
 }
+
 ::v-deep(.ant-tabs-top-bar) {
   margin-bottom: 0px !important;
 }
+
 ::v-deep(.ant-tabs-ink-bar) {
   visibility: hidden;
 }
 
-::v-deep(
-    .ant-tabs-top > .ant-tabs-nav::before,
-    .ant-tabs-bottom > .ant-tabs-nav::before,
-    .ant-tabs-top > div > .ant-tabs-nav::before,
-    .ant-tabs-bottom > div > .ant-tabs-nav::before
-  ) {
+::v-deep(.ant-tabs-top > .ant-tabs-nav::before,
+  .ant-tabs-bottom > .ant-tabs-nav::before,
+  .ant-tabs-top > div > .ant-tabs-nav::before,
+  .ant-tabs-bottom > div > .ant-tabs-nav::before) {
   border-bottom: 0px;
 }
+
 ::v-deep(.ant-tabs) {
   color: #fff;
 }
+
 ::v-deep(.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn) {
   color: #ffe75c;
 }
+
 ::v-deep(.ant-tabs-tab) {
   // font-size: 18px;
   // font-weight: bold;
   font-size: 16px;
   font-weight: normal !important;
 }
+
 ::v-deep(.ant-tabs-bar) {
   border-bottom: 0px solid #303030 !important;
 }
@@ -528,6 +536,7 @@ let activeKey = ref('1');
   padding-top: 3px;
   margin: 0 auto;
 }
+
 // 修改组件样式结束
 .none-data {
   width: 150px;

+ 24 - 20
src/views/meteorological/components/weatherForecast.vue

@@ -65,22 +65,22 @@ let erd = elementResizeDetectorMaker(); //创建实例
 let activeKey = ref<Number>(0);
 let zooms = ref('')
 eventBus.on('weatherReset', (e) => {
-    // setEcharts();
-    if (e == 'calc(100% - 500px)') {
-      setBox(1)
-    }
-    if(e == '900') {
-      setBox(2)
-    }
-    if(e != 'calc(100% - 500px)' && e != '900') {
-      setBox(3)
-    }
-    if(e == 'calc(100% - 500px)' || e == '900') {
-      zooms.value = document.getElementsByClassName("ant-modal")[0].style.zoom
-      setTimeout(() => {
-        chart.resize();
-      }, 400);
-    }
+  // setEcharts();
+  if (e == 'calc(100% - 500px)') {
+    setBox(1)
+  }
+  if (e == '900') {
+    setBox(2)
+  }
+  if (e != 'calc(100% - 500px)' && e != '900') {
+    setBox(3)
+  }
+  if (e == 'calc(100% - 500px)' || e == '900') {
+    zooms.value = document.getElementsByClassName("ant-modal")[0].style.zoom
+    setTimeout(() => {
+      chart.resize();
+    }, 400);
+  }
 });
 let boxHeight = ref(900);
 // eventBus.on('progressHeight', (height) => {
@@ -223,7 +223,9 @@ function echarts1() {
             color: '#fff',
             margin: 15,
           },
-          // formatter: '{value} %'//y轴的每一个刻度值后面加上‘%’号
+          formatter: function (value) {
+            return value.toFixed(1);
+          },
         },
         splitLine: {
           //网格线
@@ -247,7 +249,9 @@ function echarts1() {
             color: '#fff',
             margin: 15,
           },
-          // formatter: '{value} %'//y轴的每一个刻度值后面加上‘%’号
+          formatter: function (value) {
+            return value.toFixed(1);
+          },
         },
         splitLine: {
           //网格线
@@ -402,10 +406,10 @@ const setBox = (type) => {
   setTimeout(() => {
     setEcharts();
     echarts1();
-    if(type == 3){
+    if (type == 3) {
       zooms.value = document.getElementsByClassName("ant-modal")[0].style.zoom
     }
-    
+
   }, 0);
 }
 // 图表方法结束

+ 5 - 2
src/views/prediction/components/predictionA.vue

@@ -191,10 +191,10 @@ function echarts1() {
         },
         scale: true,
         min: function (value) {
-          return value.min - value.min * 0.1;
+          return value.min - value.min * 0.01;
         },
         max: function (value) {
-          return value.max + value.max * 0.1;
+          return value.max + value.max * 0.01;
         }
       },
     ],
@@ -245,6 +245,9 @@ function echarts1() {
         data: props.predictionData.qf,
         xAxisIndex: 1,
         yAxisIndex: 1,
+        lineStyle: {
+            type: 'dashed' // 设置为虚线
+        }
       },
     ],
   };

+ 2 - 2
src/views/weatherHome/components/alarm.vue

@@ -53,7 +53,7 @@
                 <div>
                   <!-- <img src="../../../assets/images/weatheHome/icon-5514.png" /> -->
                   <span :style="{
-        'color': item.level_name
+        'color': item.level_color
       }">{{ item.title }}</span>
                   <span>{{ item.time }}</span>
                 </div>
@@ -122,7 +122,7 @@
               <span>{{ item.time }}</span>
               <span>{{ item.warn_msg }}</span>
               <span>
-                <span :style="{ backgroundColor: item.level_name }"></span>
+                <span :style="{ backgroundColor: item.level_color }"></span>
               </span>
             </li>
             <div v-if="dalogList.length == 0" style="text-align: center;">

+ 0 - 1
src/views/weatherHome/components/stationStatistics.vue

@@ -294,7 +294,6 @@ function isOkFn(type) {
       background-clip: text;
       text-fill-color: transparent;
       display: inline-block;
-      min-width: 95px;
     }
 
     span {