浏览代码

feat: 水位变幅策略管理

hum 1 年之前
父节点
当前提交
9360a0d340

+ 4 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/BerthingService.java

@@ -54,4 +54,8 @@ public interface BerthingService {
     boolean addFloatPrint(BerthingFloatDTO berthingFloatDTO);
 
     Page<BerthingFloatConfig> queryFloatPrint(FloatPointQuery floatPointQuery);
+
+    BerthingFloatConfig queryStopWaterById(Long id);
+
+    boolean deleteStopWaterById(Long id);
 }

+ 10 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BerthingServiceImpl.java

@@ -396,5 +396,15 @@ public class BerthingServiceImpl implements BerthingService {
 
     }
 
+    @Override
+    public BerthingFloatConfig queryStopWaterById(Long id) {
+        return berthingFloatConfigMapper.queryById(id);
+    }
+
+    @Override
+    public boolean deleteStopWaterById(Long id) {
+        berthingFloatConfigMapper.deleteById(id);
+        return true;
+    }
 
 }

+ 1 - 0
ruoyi-system/src/main/resources/mapper/BerthingFloatConfigMapper.xml

@@ -38,6 +38,7 @@ float_id, id, site_id, planid, create_time, status, is_del, wlevel, timespan, wl
                 and a.site_id = #{floatPointQuery.siteId}
             </if>
         </where>
+        order by a.wlevel desc
     </select>
 
     <!--统计总行数-->

+ 30 - 0
ruoyi-ui/src/api/site/berthing.js

@@ -107,3 +107,33 @@ export function deletePlainTime(id) {
     method: 'delete',
   })
 }
+
+export function getPlainWater(id) {
+  return request({
+    url: `/berthing/stopWater/${id}`,
+    method: 'get'
+  })
+}
+
+export function listPlainWater(query) {
+  return request({
+    url: '/berthing/queryFloatPrint',
+    method: 'post',
+    data: query
+  })
+}
+
+export function savePlainWater(data) {
+  return request({
+    url: '/berthing/addFloatPrint',
+    method: 'post',
+    data: data
+  })
+}
+
+export function deletePlainWater(id) {
+  return request({
+    url: `/berthing/stopWater/${id}`,
+    method: 'delete',
+  })
+}

+ 9 - 2
ruoyi-ui/src/views/site/plain-point/index.vue

@@ -7,7 +7,7 @@
           <el-row :gutter="30">
             <el-col :span="6">
               <el-form-item label="选择站点">
-                <el-select v-model="siteId" placeholder="请选择站点" @change="getList">
+                <el-select v-model="siteId" placeholder="请选择站点" @change="handleSiteChange">
                   <el-option
                     v-for="item in siteList"
                     :key="item.siteId"
@@ -44,7 +44,7 @@
     </div>
     <div class="hum-page-title" style="margin-top: 30px">断面图</div>
     <div class="hum-page-section">
-      <ChartList :plain="plain" />
+      <ChartList ref="chart" :plain="plain" />
     </div>
   </div>
 </template>
@@ -123,6 +123,13 @@ export default {
         this.plain.sections = JSON.parse(positions) || [];
       })
     },
+    handleSiteChange(siteId) {
+      this.siteId = siteId;
+      this.$refs.chart.chart.clear();
+      this.getList();
+      this.loadConfig();
+      this.loadSection();
+    },
     handleAdd() {
       this.$router.push(`/site/plain/point/add?siteId=${this.siteId}`);
     },

+ 9 - 2
ruoyi-ui/src/views/site/plain-time/index.vue

@@ -7,7 +7,7 @@
           <el-row :gutter="30">
             <el-col :span="6">
               <el-form-item label="选择站点">
-                <el-select v-model="siteId" placeholder="请选择站点" @change="getList">
+                <el-select v-model="siteId" placeholder="请选择站点" @change="handleSiteChange">
                   <el-option
                     v-for="item in siteList"
                     :key="item.siteId"
@@ -55,7 +55,7 @@
     </div>
     <div class="hum-page-title" style="margin-top: 30px">断面图</div>
     <div class="hum-page-section">
-      <ChartList :plain="plain" />
+      <ChartList ref="chart" :plain="plain" />
     </div>
   </div>
 </template>
@@ -134,6 +134,13 @@ export default {
         this.plain.sections = JSON.parse(positions) || [];
       })
     },
+    handleSiteChange(siteId) {
+      this.siteId = siteId;
+      this.$refs.chart.chart.clear();
+      this.getList();
+      this.loadConfig();
+      this.loadSection();
+    },
     handleAdd() {
       this.$router.push(`/site/plain/time/add?siteId=${this.siteId}`);
     },

+ 206 - 0
ruoyi-ui/src/views/site/plain-water/add.vue

@@ -0,0 +1,206 @@
+<template>
+  <div class="hum-page-container">
+    <div class="hum-page-title">测流设置</div>
+    <el-form :model="form" :rules="rules" size="large" ref="form" label-position="top">
+      <div class="hum-page-form">
+        <el-row :gutter="30">
+          <el-col :span="6">
+            <el-form-item label="当前站点" prop="siteId">
+              <el-input
+                v-model="form.siteName"
+                disabled
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="策略编号" prop="planid">
+              <el-input
+                v-model="form.planid"
+                placeholder="请输入策略编号"
+                clearable
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="起测水位" prop="wlevel">
+              <el-input-number
+                placeholder="请输入起测水位"
+                v-model="form.wlevel"
+                @change="wlevel => plain.wlevel = wlevel"
+                :precision="2"
+                :step="0.1"
+                :min="plain.wlevelmin"
+                :max="plain.wlevelmax" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="水位变幅" prop="wlevelchange">
+              <el-input-number
+                placeholder="请输入水位变幅"
+                v-model="form.wlevelchange"
+                :precision="2"
+                :step="0.1"
+                :min="0" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="时间间隔(分钟)" prop="timespan">
+              <el-input-number
+                placeholder="请输入时间间隔"
+                v-model="form.timespan"
+                :precision="2"
+                :step="0.1"
+                :min="0" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </div>
+    </el-form>
+    <div class="hum-page-title" style="margin-top: 30px">断面图</div>
+    <div class="hum-page-section">
+      <SectionChart :plain="plain" />
+    </div>
+    <div class="hum-page-form-action">
+      <el-button @click="$router.back()">取消</el-button>
+      <el-button type="primary" @click="submitForm" :loading="loading">保存</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getSite, getConfig } from '@/api/site/site'
+import { savePlainWater, getSiteSection, getPlainWater } from '@/api/site/berthing'
+import SectionChart from './chart';
+
+export default {
+  components: {
+    SectionChart,
+  },
+  data() {
+    return {
+      floatId: 0,
+      siteId: 0,
+      site: {},
+      loading: false,
+      plain: {
+        sections: [],
+        wlevelmax: 0,
+        wlevelmin: 0,
+        wlevel: 0,
+      },
+      form: {
+        floatId: '',
+        id: '',
+        berthingId: '',
+        siteId: '',
+        siteName: '',
+        type: '',
+        planid: '',
+        wlevel: '',
+        timespan: '',
+        wlevelchange: '',
+      },
+      rules: {
+        planid: [
+          {required: true, message: "策略编号不能为空", trigger: "blur"}
+        ],
+        wlevel: [
+          {required: true, message: "起测水位不能为空", trigger: "blur"}
+        ],
+        timespan: [
+          {required: true, message: "时间间隔不能为空", trigger: "blur"}
+        ],
+        wlevelchange: [
+          {required: true, message: "水位变幅不能为空", trigger: "blur"}
+        ],
+      },
+    }
+  },
+  computed: {
+    title() {
+      return this.floatId ? '编辑水位变幅策略' : '新增水位变幅策略';
+    }
+  },
+  methods: {
+    loadPlainWater() {
+      getPlainWater(this.floatId).then((res) => {
+        const { floatId, planid, siteId, wlevel, wlevelchange, timespan } = res.data || {};
+
+        this.plain.wlevel = wlevel;
+
+        this.form.floatId = floatId;
+        this.form.planid = planid;
+        this.form.wlevelchange = wlevelchange;
+        this.form.timespan = timespan;
+
+        this.siteId = siteId;
+        this.loadSite();
+        this.loadSection();
+        this.loadConfig();
+      })
+    },
+    loadSection() {
+      getSiteSection(this.siteId).then((res) => {
+        const { positions, berthingId } = res.data || {};
+        this.form.berthingId = berthingId;
+        this.plain.sections = JSON.parse(positions) || [];
+      })
+    },
+    loadConfig() {
+      getConfig(this.siteId).then((res) => {
+        const { wlevelmax, wlevelmin, type } = res.data || {};
+        this.plain.wlevelmax = wlevelmax;
+        this.plain.wlevelmin = wlevelmin;
+        this.form.wlevel = this.plain.wlevel;
+        this.form.type = type;
+      })
+    },
+    loadSite() {
+      getSite(this.siteId).then((res) => {
+        const site = res.data || {};
+        this.form.id = this.id;
+        this.form.siteId = this.siteId;
+        this.form.siteName = site.siteName;
+        this.site = site;
+      })
+    },
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (!valid) {
+          return;
+        }
+        this.loading = true;
+        const data = {
+          ...this.form,
+          wlevelmax: this.plain.wlevelmax,
+          wlevelmin: this.plain.wlevelmin,
+        }
+        savePlainWater(data).then(response => {
+          this.$modal.msgSuccess(this.floatId ? "编辑成功" : "新增成功");
+          this.$router.back();
+        }).finally(() => {
+          this.loading = false;
+        });
+      });
+    },
+  },
+  mounted() {
+    this.floatId = this.$route.params.id;
+    this.siteId = this.$route.query.siteId;
+    if (this.siteId) {
+      this.loadSite();
+      this.loadSection();
+      this.loadConfig();
+    }
+    if (this.floatId) {
+      this.loadPlainWater()
+    }
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.el-input-number {
+  width: 100%;
+}
+</style>

+ 223 - 0
ruoyi-ui/src/views/site/plain-water/chart-list.vue

@@ -0,0 +1,223 @@
+<template>
+  <div ref="chart" class="chart" :style="{height: '400px', width: '100%'}" />
+</template>
+
+<script>
+import * as echarts from "echarts";
+require('echarts/theme/macarons') // echarts theme
+import resize from '@/utils/resize'
+
+export default {
+  mixins: [resize],
+  props: {
+    plain: Object,
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.chart = echarts.init(this.$refs.chart, 'macarons');
+    })
+  },
+  beforeDestroy() {
+    if (!this.chart) {
+      return
+    }
+    this.chart.dispose()
+    this.chart = null
+  },
+  watch: {
+    plain: {
+      handler(value) {
+        this.setOptions(value)
+      },
+      deep: true,
+      immediate: true,
+    }
+  },
+  methods: {
+    setOptions(plain) {
+      if (!this.chart) {
+        return;
+      }
+      const { sections, wlevelmax, wlevelmin, list } = plain;
+      const xAxisData = sections.map(({ x }) => x);
+      const seriesData = sections.map(({ y }) => y);
+      const options = {
+        xAxis: {
+          name: '起点距',
+          boundaryGap: false,
+          data: xAxisData,
+          type: 'category',
+          axisLine: {
+            lineStyle: {
+              color: '#FF8500'
+            }
+          },
+          axisTick: {
+            lineStyle: {
+              color: '#8D99A4'
+            }
+          },
+          axisLabel: {
+            color: '#54606C'
+          },
+          nameTextStyle: {
+            color: '#54606C'
+          }
+        },
+        yAxis: [
+          {
+            name: '高程(m)',
+            triggerEvent: true,
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: '#FF8500'
+              }
+            },
+            axisTick: {
+              show: true,
+              lineStyle: {
+                color: '#8D99A4'
+              }
+            },
+            axisLabel: {
+              color: '#54606C'
+            },
+            nameTextStyle: {
+              color: '#54606C'
+            },
+            min: function (value) {
+              return Math.round(value.min - (value.max - value.min) * 0.1);
+            },
+            max: function (value) {
+              return Math.round(value.max + (value.max - value.min) * 0.1);
+            },
+          },
+          {
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: '#FF8500'
+              }
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+          },
+        ],
+        grid: {
+          left: 50,
+          right: 50,
+          bottom: 40,
+          top: 40,
+          containLabel: true
+        },
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'cross'
+          },
+          padding: [5, 10]
+        },
+        series: [{
+          name: '高程',
+          itemStyle: {
+            normal: {
+              color: '#FF8500',
+              lineStyle: {
+                color: '#FF8500',
+                width: 2
+              }
+            }
+          },
+          areaStyle: {
+            color: '#FF8500',
+            opacity: 0.5
+          },
+          smooth: false,
+          symbol: 'none',
+          type: 'line',
+          data: seriesData,
+          animations: false,
+          markLine: {
+            symbol: 'none',
+            silent: true,
+            lineStyle: { normal: { type: 'dashed' } },
+            label: { position: 'start' },
+            data: [
+              {
+                yAxis: wlevelmax,
+                lineStyle: { width: 1, color: 'red' },
+                name: '最高水位',
+                label: {
+                  formatter: '{b}'
+                }
+              },
+              {
+                yAxis: wlevelmin,
+                lineStyle: { width: 1, color: 'red' },
+                name: '最低水位',
+                label: {
+                  formatter: '{b}'
+                }
+              },
+            ]
+          },
+        }]
+      };
+      list.forEach((plain, index) => {
+        const themes = [
+          '#2ec7c9',
+          '#b6a2de',
+          '#5ab1ef',
+          '#d87a80',
+          '#8d98b3',
+          '#97b552',
+          '#95706d',
+          '#dc69aa',
+          '#07a2a4',
+          '#9a7fd1',
+        ]
+        const { wlevel, planid } = plain;
+        options.series.push({
+          name: `策略编号(${planid})`,
+          symbol: 'none',
+          itemStyle: {
+            normal: {
+              color: themes[index],
+              lineStyle: {
+                width: 0
+              }
+            }
+          },
+          data: new Array(seriesData.length).fill(wlevel),
+          type: 'line',
+          markLine: {
+            symbol: 'none',
+            silent: true,
+            lineStyle: {
+              color: themes[index],
+            },
+            label: { position: 'start' },
+            data: [{
+              yAxis: wlevel,
+              name: `策略编号(${planid})`,
+              label: {
+                formatter: '{b}'
+              }
+            }],
+          },
+        });
+      })
+      this.chart.setOption(options);
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 204 - 0
ruoyi-ui/src/views/site/plain-water/chart.vue

@@ -0,0 +1,204 @@
+<template>
+  <div ref="chart" class="chart" :style="{height: '400px', width: '100%'}" />
+</template>
+
+<script>
+import * as echarts from "echarts";
+require('echarts/theme/macarons') // echarts theme
+import resize from '@/utils/resize'
+
+export default {
+  mixins: [resize],
+  props: {
+    plain: Object,
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.chart = echarts.init(this.$refs.chart, 'macarons');
+    })
+  },
+  beforeDestroy() {
+    if (!this.chart) {
+      return
+    }
+    this.chart.dispose()
+    this.chart = null
+  },
+  watch: {
+    plain: {
+      handler(value) {
+        this.setOptions(value)
+      },
+      deep: true,
+      immediate: true,
+    }
+  },
+  methods: {
+    setOptions(plain) {
+      if (!this.chart) {
+        return;
+      }
+      const { sections, wlevelmax, wlevelmin, wlevel } = plain;
+      const xAxisData = sections.map(({ x }) => x);
+      const seriesData = sections.map(({ y }) => y);
+      const options = {
+        xAxis: {
+          name: '起点距',
+          boundaryGap: false,
+          data: xAxisData,
+          type: 'category',
+          axisLine: {
+            lineStyle: {
+              color: '#FF8500'
+            }
+          },
+          axisTick: {
+            lineStyle: {
+              color: '#8D99A4'
+            }
+          },
+          axisLabel: {
+            color: '#54606C'
+          },
+          nameTextStyle: {
+            color: '#54606C'
+          }
+        },
+        yAxis: [
+          {
+            name: '高程(m)',
+            triggerEvent: true,
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: '#FF8500'
+              }
+            },
+            axisTick: {
+              show: true,
+              lineStyle: {
+                color: '#8D99A4'
+              }
+            },
+            axisLabel: {
+              color: '#54606C'
+            },
+            nameTextStyle: {
+              color: '#54606C'
+            },
+            min: function (value) {
+              return Math.round(value.min - (value.max - value.min) * 0.1);
+            },
+            max: function (value) {
+              return Math.round(value.max + (value.max - value.min) * 0.1);
+            },
+          },
+          {
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: '#FF8500'
+              }
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+          },
+        ],
+        grid: {
+          left: 50,
+          right: 50,
+          bottom: 40,
+          top: 40,
+          containLabel: true
+        },
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'cross'
+          },
+          padding: [5, 10]
+        },
+        series: [{
+          name: '高程',
+          itemStyle: {
+            normal: {
+              color: '#FF8500',
+              lineStyle: {
+                color: '#FF8500',
+                width: 2
+              }
+            }
+          },
+          areaStyle: {
+            color: '#FF8500',
+            opacity: 0.5
+          },
+          smooth: false,
+          symbol: 'none',
+          type: 'line',
+          data: seriesData,
+          animations: false,
+          markLine: {
+            symbol: 'none',
+            silent: true,
+            lineStyle: { normal: { type: 'dashed' } },
+            label: { position: 'start' },
+            data: [
+              {
+                yAxis: wlevelmax,
+                lineStyle: { width: 1, color: 'red' },
+                name: '最高水位',
+                label: {
+                  formatter: '{b}'
+                }
+              },
+              {
+                yAxis: wlevelmin,
+                lineStyle: { width: 1, color: 'red' },
+                name: '最低水位',
+                label: {
+                  formatter: '{b}'
+                }
+              },
+            ]
+          },
+        }]
+      };
+      if (wlevel > wlevelmin && wlevel < wlevelmax) {
+        options.series.push({
+          name: '起测水位',
+          symbol: 'none',
+          silent: true,
+          lineStyle: {
+            width: 0,
+          },
+          data: new Array(seriesData.length).fill(wlevel),
+          type: 'line',
+          markLine: {
+            symbol: 'none',
+            silent: true,
+            lineStyle: { normal: { type: 'dashed' } },
+            label: { position: 'start' },
+            data: [{
+              name: '起测水位',
+              yAxis: wlevel,
+              label: {
+                formatter: '{b}'
+              }
+            }],
+          },
+        });
+      }
+      this.chart.setOption(options);
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 156 - 0
ruoyi-ui/src/views/site/plain-water/index.vue

@@ -0,0 +1,156 @@
+<template>
+  <div class="hum-page-container">
+    <div class="hum-page-title">水位变幅策略管理</div>
+    <div class="hum-page-section">
+      <div class="hum-page-search">
+        <el-form :model="queryParams" size="large" ref="queryForm" label-position="top">
+          <el-row :gutter="30">
+            <el-col :span="6">
+              <el-form-item label="选择站点">
+                <el-select v-model="siteId" placeholder="请选择站点" @change="handleSiteChange">
+                  <el-option
+                    v-for="item in siteList"
+                    :key="item.siteId"
+                    :label="item.siteName"
+                    :value="item.siteId">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item class="hum-page-search-action">
+                <el-button type="primary" @click="handleQuery">查询</el-button>
+                <el-button @click="resetQuery">重置</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div class="hum-page-action">
+        <el-button type="primary" @click="handleAdd">新增策略</el-button>
+      </div>
+      <el-table v-loading="loading" :data="list" border>
+        <el-table-column label="站码" prop="id" />
+        <el-table-column label="站点名称" prop="siteName" />
+        <el-table-column label="策略编号" prop="planid" />
+        <el-table-column label="起测水位" prop="wlevel" />
+        <el-table-column label="水位变幅" prop="wlevelchange" />
+        <el-table-column label="时间间隔(分钟)" prop="timespan" />
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">编辑</el-button>
+            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <div class="hum-page-title" style="margin-top: 30px">断面图</div>
+    <div class="hum-page-section">
+      <ChartList ref="chart" :plain="plain" />
+    </div>
+  </div>
+</template>
+
+<script>
+import { getConfig, listSite } from "@/api/site/site";
+import { deletePlainWater, getSiteSection, listPlainWater } from "@/api/site/berthing";
+import ChartList from './chart-list';
+
+export default {
+  components: {
+    ChartList
+  },
+  data() {
+    return {
+      siteId: '',
+      siteList: [],
+      plain: {
+        wlevelmax: 0,
+        wlevelmin: 0,
+        list: [],
+        sections: [],
+      },
+      queryParams: {
+        page: 1,
+        size: 1000,
+      },
+      loading: true,
+      total: 0,
+      list: []
+    }
+  },
+  created() {
+    this.init();
+  },
+  methods: {
+    handleQuery() {
+      this.getList()
+    },
+    resetQuery() {},
+    init() {
+      this.loading = true;
+      listSite({ page: 1, size: 1000 }).then(response => {
+          this.siteList = response.data.records || [];
+          if (this.siteList.length > 0) {
+            this.siteId = this.siteList[0].siteId;
+            this.getList();
+            this.loadConfig();
+            this.loadSection();
+          }
+        }
+      ).catch(() => {
+        this.loading = false;
+      });
+    },
+    getList() {
+      this.loading = true;
+      listPlainWater({ ...this.queryParams, siteId: this.siteId }).then(response => {
+          this.list = response.data.records || [];
+          this.total = response.data.total;
+          this.plain.list = response.data.records || [];
+          this.loading = false;
+        }
+      );
+    },
+    loadConfig() {
+      getConfig(this.siteId).then((res) => {
+        const { wlevelmax, wlevelmin } = res.data || {};
+        this.plain.wlevelmax = wlevelmax;
+        this.plain.wlevelmin = wlevelmin;
+        console.log(res);
+      })
+    },
+    loadSection() {
+      getSiteSection(this.siteId).then((res) => {
+        const { positions } = res.data || {};
+        this.plain.sections = JSON.parse(positions) || [];
+      })
+    },
+    handleSiteChange(siteId) {
+      this.siteId = siteId;
+      this.$refs.chart.chart.clear();
+      this.getList();
+      this.loadConfig();
+      this.loadSection();
+    },
+    handleAdd() {
+      this.$router.push(`/site/plain/water/add?siteId=${this.siteId}`);
+    },
+    handleUpdate(plain) {
+      this.$router.push(`/site/plain/water/edit/${plain.floatId}`);
+    },
+    handleDelete(plain) {
+      this.$modal.confirm('是否确认删除策略编号为"' + plain.planid + '"的数据项?').then(function() {
+        return deletePlainWater(plain.floatId);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 10 - 0
waterAffairs-admin/src/main/java/com/ruoyi/web/controller/tool/BerthingController.java

@@ -149,6 +149,16 @@ public class BerthingController {
         return R.ok(berthingService.queryFloatPrint(floatPointQuery));
     }
 
+    @GetMapping(value = "/stopWater/{id}")
+    @ApiOperation("查询水位变幅策略")
+    public R<BerthingFloatConfig> queryStopWaterById(@PathVariable("id") Long id) {
+        return R.ok(berthingService.queryStopWaterById(id));
+    }
 
+    @DeleteMapping(value = "/stopWater/{id}")
+    @ApiOperation("删除水位变幅策略")
+    public R<Boolean> deleteStopWaterById(@PathVariable("id") Long id) {
+        return R.ok(berthingService.deleteStopWaterById(id));
+    }
 
 }