Jelajahi Sumber

Merge branch 'master' of http://39.98.38.2:13000/dumingliang/sh-model-platform

Hua 1 bulan lalu
induk
melakukan
03f7ab62f5

+ 2 - 2
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/SCSSFMController.java

@@ -39,7 +39,7 @@ public class SCSSFMController extends BaseController {
         stationParams.put("userName", "shfbc");
 
         String stationResponseString = OkHttpUtils.executeRequest(
-                "http://49.4.2.185:2111/RiverStrongAPI2.0/StormSurgeForecast/StormSurge/BaseInfo/GetForecastStationInfos",
+                "http://169.97.234.19:2111/RiverStrongAPI2.0/StormSurgeForecast/StormSurge/BaseInfo/GetForecastStationInfos",
                 "GET",
                 stationParams,
                 null,
@@ -50,7 +50,7 @@ public class SCSSFMController extends BaseController {
         List<Map<String, Object>> stationList = (List<Map<String, Object>>) JSONPath.eval(stationResponseObj, "$.data");
 
         String responseString = OkHttpUtils.executeRequest(
-                "http://49.4.2.185:2111/RiverStrongAPI2.0/StormSurgeForecast/StormSurge/Calculate/GetCalResultsByStation",
+                "http://169.97.234.19:2111/RiverStrongAPI2.0/StormSurgeForecast/StormSurge/Calculate/GetCalResultsByStation",
                 "POST",
                 null,
                 JsonUtils.objectToJson(params),

+ 4 - 1
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/PtServiceMonitorMapper.java

@@ -1,10 +1,13 @@
 package com.ruoyi.interfaces.mapper;
 
+import com.ruoyi.common.annotation.DataSource;
+import com.ruoyi.common.enums.DataSourceType;
+
 import java.util.List;
 import java.util.Map;
 
 
-
+@DataSource(DataSourceType.SLAVE)
 public interface PtServiceMonitorMapper {
 
     List<Map<String, Object>> viewNumByCity();

+ 4 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/ServerMonitorService.java

@@ -19,6 +19,10 @@ public class ServerMonitorService {
             Optional.of(json)
                     .map(o -> JsonUtils.jsonToPojo(o, JSONObject.class))
                     .map(o -> o.getJSONObject("data"))
+                    .map(o -> {
+                        o.getJSONObject("system").put("primary_ip", server.split(":")[1].replaceAll("/", ""));
+                        return o;
+                    })
                     .ifPresent(result::add);
         }));
         return result;

+ 1 - 1
ruoyi-ui/src/views/map/components/map.vue

@@ -1324,7 +1324,7 @@ watch(() => props.config, async (config) => {
   if (config) {
     // 渲染配置
     // 1. 跳转中心点
-    // toCenter(config.center, config.zoom);
+    toCenter(config.center, config.zoom);
     // 渲染图层
     await loadLayers(config.layers);
   }

+ 1 - 1
ruoyi-ui/src/views/map/hooks/popupContent.js

@@ -151,7 +151,7 @@ async function loadPopupChartByHPJ(properties) {
         "url": "http://localhost:8081/hpj_api/swzz/SWZZ_MODE_DD_SOLUTION/MODE_BDMS_PREDICTSel",
         "method": "POST",
         "body": [
-            {"id": 1, "key": "SOLUTIONID", "value": "20251101102203557131", "type": "", "title": ""},
+            {"id": 1, "key": "SOLUTIONID", "value": "20251203101329185168", "type": "", "title": ""},
             {"id": 2, "key": "STCD", "value": properties['测站编码'], "type": "", "title": ""},
         ],
         "headers": [

+ 7 - 7
ruoyi-ui/src/views/map/index.vue

@@ -121,8 +121,8 @@ const maps = {
     ]
   },
   "26": {
-    zoom: 11,
-    center: [121.52720881780915, 31.297834087410234],
+    zoom: 11.88,
+    center: [121.55256966639084, 31.31062241723985],
     layers: [
       {
         id: 'weather-stations',
@@ -211,8 +211,8 @@ const maps = {
     ]
   },
   "27": {
-    zoom: 10,
-    center: [121.49574023547144, 31.084153451834073],
+    zoom: 11.11,
+    center: [121.5060272448065, 31.140056454529834],
     layers: [
       {
         id: 'weather-stations',
@@ -307,8 +307,8 @@ const maps = {
     ]
   },
   "29": {
-    zoom: 11,
-    center: [121.52720881780915, 31.297834087410234],
+    zoom: 13.82,
+    center: [121.53935402005882, 31.364348593001697],
     layers: [
       {
         id: 'weather-stations',
@@ -427,7 +427,7 @@ const maps = {
                 },
                 style: {
                   fill: {color: '#eabc5f'},
-                   stroke: {color: '#E19F1A', width: 2}
+                  stroke: {color: '#E19F1A', width: 2}
                 }
               },
               {

+ 77 - 64
ruoyi-ui/src/views/monitor/service/index.vue

@@ -88,7 +88,7 @@
             <el-tag type="danger" effect="dark" size="small">{{ alarmTableData.length }}</el-tag>
           </div>
         </template>
-        <el-table stripe :data="alarmTableData"  height="100%">
+        <el-table stripe :data="alarmTableData" height="100%">
           <el-table-column align="center" width="120" prop="tm" label="报警时间">
             <template #default="scope">
               {{ scope.row.alertTime ? scope.row.alertTime.substring(5, 16) : '' }}
@@ -170,6 +170,7 @@ import GwEchart from "@/components/chart/GwEchart.vue";
 import {listUser} from "@/api/system/user.js";
 import {parseTime} from "@/utils/ruoyi.js";
 import {getAlarmList} from "@/api/service/alarm.js";
+import {snailJobLine} from "@/api/service/timing.js";
 
 const statisticData = ref([
   {name: '模型总数', value: 0, color: '#477ACF'},
@@ -207,10 +208,12 @@ const dateTypeOptions = ref([
   {label: '近一个月', value: '4'},
   {label: '全部', value: '5'},
 ])
-const task = ref('1')
+const task = ref('MONTH')
 const taskOptions = ref([
-  {label: '日执行量', value: '1'},
-  {label: '月执行量', value: '2'},
+  {label: '今日', value: 'DAY'},
+  {label: '最近一周', value: 'WEEK'},
+  {label: '最近一月', value: 'MONTH'},
+  {label: '全年', value: 'YEAR'},
 ])
 const bt1Ref = ref(null)
 const echartMapData = ref([])
@@ -321,8 +324,8 @@ function initChartTop2() {
         top: '90%',
         left: 'center',
         textStyle: {
-        fontSize: 12 // 提示框字体大小
-      }
+          fontSize: 12 // 提示框字体大小
+        }
       },
       series: [
         {
@@ -493,8 +496,8 @@ function initChartTop11() {
       legend: {
         selectedMode: false,
         textStyle: {
-        fontSize: 12 // 提示框字体大小
-      }
+          fontSize: 12 // 提示框字体大小
+        }
       },
       tooltip: {
         trigger: 'item'
@@ -511,7 +514,8 @@ function initChartTop11() {
         axisLabel: {
           interval: 0,
           fontSize: 14,
-          rotate: 10 // 设置标签旋转45度
+          rotate: 10, // 设置标签旋转45度
+          formatter: (params) => Math.round(params * 100) + '%'
         },
       },
       xAxis: {
@@ -609,62 +613,71 @@ function initChartBottom2() {
 }
 
 function initChartTop5() {
-  const option = {
-    legend: {
-      textStyle: {
-        fontSize: 12 // 提示框字体大小
-      }
-    },
-    grid: {
-      left: '5%',
-      right: '5%',
-      bottom: '10%',
-      top: '15%',
-      containLabel: true
-    },
-    tooltip: {
-      trigger: 'axis',
-      showContent: false
-    },
-    dataset: {
-      source: [
-        ['模型', '09-07', '09-08', '09-09', '09-10', '09-11', '09-12'],
-        ['上海沿海风暴潮预报模型', 56.5, 82.1, 88.7, 70.1, 53.4, 85.1],
-        ['马斯京根法', 51.1, 51.4, 55.1, 53.3, 73.8, 68.7],
-        ['三水源新安江产流模型', 40.1, 62.2, 69.5, 36.4, 45.2, 32.5],
-        ['上海市中心城区排水系统模型', 25.2, 37.1, 41.2, 18, 33.9, 49.1]
-      ]
-    },
-    xAxis: {type: 'category'},
-    yAxis: {gridIndex: 0},
-    series: [
-      {
-        type: 'line',
-        smooth: true,
-        seriesLayoutBy: 'row',
-        emphasis: {focus: 'series'}
+  snailJobLine({type: task.value}).then(res => {
+    const chartData = res.data
+    const option = {
+      color: ['#2dbea2', '#f56c6c', '#b686d4', '#e6a23c'],
+      legend: {
+        textStyle: {
+          fontSize: 12 // 提示框字体大小
+        }
       },
-      {
-        type: 'line',
-        smooth: true,
-        seriesLayoutBy: 'row',
-        emphasis: {focus: 'series'}
+      grid: {
+        left: '5%',
+        right: '5%',
+        bottom: '10%',
+        top: '15%',
+        containLabel: true
       },
-      {
-        type: 'line',
-        smooth: true,
-        seriesLayoutBy: 'row',
-        emphasis: {focus: 'series'}
+      // tooltip: {
+      //   trigger: 'axis'
+      // },
+      tooltip: {
+        trigger: "item",
+        // formatter: "{a} <br/>{b} : {c}"
       },
-      {
-        type: 'line',
-        smooth: true,
-        seriesLayoutBy: 'row',
-        emphasis: {focus: 'series'}
-      }
-    ]
-  };
-  top5Ref.value.loadChart(option);
+      xAxis: {
+        type: 'category',
+        data: chartData.map(item => item.createDt)
+      },
+      yAxis: {gridIndex: 0},
+      series: [
+        {
+          type: 'line',
+          name: '成功',
+          smooth: true,
+          seriesLayoutBy: 'row',
+          emphasis: {focus: 'series'},
+          data: chartData.map(item => item.success)
+        },
+        {
+          type: 'line',
+          name: '失败',
+          smooth: true,
+          seriesLayoutBy: 'row',
+          emphasis: {focus: 'series'},
+          data: chartData.map(item => item.failNum)
+        },
+        {
+          type: 'line',
+          name: '停止',
+          smooth: true,
+          seriesLayoutBy: 'row',
+          emphasis: {focus: 'series'},
+          data: chartData.map(item => item.stop)
+        },
+        {
+          type: 'line',
+          name: '取消',
+          smooth: true,
+          seriesLayoutBy: 'row',
+          emphasis: {focus: 'series'},
+          data: chartData.map(item => item.cancel)
+        }
+      ]
+    };
+    top5Ref.value.loadChart(option);
+  })
 }
 
 function initVisitNumberChart(name, data) {
@@ -698,14 +711,14 @@ function initVisitNumberChart(name, data) {
       type: 'value',
       boundaryGap: [0, 0.01],
       axisLabel: {
-          fontSize: 14, // x轴标签字体大小
+        fontSize: 14, // x轴标签字体大小
       },
     },
     yAxis: {
       type: 'category',
       data: yAxisData,
       axisLabel: {
-          fontSize: 14, // x轴标签字体大小
+        fontSize: 14, // x轴标签字体大小
       },
     },
     series: [

+ 19 - 13
ruoyi-ui/src/views/monitor/taskMonitor/index.vue

@@ -129,44 +129,50 @@ function initChartTop5() {
         top: '15%',
         containLabel: true
       },
+      // tooltip: {
+      //   trigger: 'axis'
+      // },
       tooltip: {
-        trigger: 'axis'
+        trigger: "item",
+        // formatter: "{a} <br/>{b} : {c}"
       },
-      dataset: {
-        source: [
-          ['时间', ...chartData.map(item => item.createDt)],
-          ['成功', ...chartData.map(item => item.success)],
-          ['失败', ...chartData.map(item => item.failNum)],
-          ['停止', ...chartData.map(item => item.stop)],
-          ['取消', ...chartData.map(item => item.cancel)],
-        ]
+      xAxis: {
+        type: 'category',
+        data: chartData.map(item => item.createDt)
       },
-      xAxis: {type: 'category'},
       yAxis: {gridIndex: 0},
       series: [
         {
           type: 'line',
+          name: '成功',
           smooth: true,
           seriesLayoutBy: 'row',
           emphasis: {focus: 'series'},
+          data: chartData.map(item => item.success)
         },
         {
           type: 'line',
+          name: '失败',
           smooth: true,
           seriesLayoutBy: 'row',
-          emphasis: {focus: 'series'}
+          emphasis: {focus: 'series'},
+          data: chartData.map(item => item.failNum)
         },
         {
           type: 'line',
+          name: '停止',
           smooth: true,
           seriesLayoutBy: 'row',
-          emphasis: {focus: 'series'}
+          emphasis: {focus: 'series'},
+          data: chartData.map(item => item.stop)
         },
         {
           type: 'line',
+          name: '取消',
           smooth: true,
           seriesLayoutBy: 'row',
-          emphasis: {focus: 'series'}
+          emphasis: {focus: 'series'},
+          data: chartData.map(item => item.cancel)
         }
       ]
     };