mapViewStore.activeBaseLayerKey,
+ (newKey) => {
+ if (newKey && layers.some(l => l.key === newKey)) {
+ activeKey.value = newKey;
+ }
+ }
+);
+
/**
* 判断图层管理中的基础底图(customBaseLayer)是否被选中
*/
diff --git a/frontend/src/components/SidePanelItem/index.vue b/frontend/src/components/SidePanelItem/index.vue
index e8dd8708..085b7300 100644
--- a/frontend/src/components/SidePanelItem/index.vue
+++ b/frontend/src/components/SidePanelItem/index.vue
@@ -974,7 +974,8 @@ onUnmounted(() => {
display: flex;
justify-content: space-between;
flex-direction: column;
-
+ background-color: #fff;
+ // box-shadow: 0 1px 2px #00000026;
.qgc_title {
width: 100%;
background-color: #e5edf3;
diff --git a/frontend/src/components/gis/gisUtils.ts b/frontend/src/components/gis/gisUtils.ts
index 2466a5fd..478f8d5b 100644
--- a/frontend/src/components/gis/gisUtils.ts
+++ b/frontend/src/components/gis/gisUtils.ts
@@ -10,6 +10,7 @@ import {
drawDotImg5,
offset5
} from '@/utils/GisUrlList';
+import { LAYOUT_GRID_SKELETONS } from '@/views/dianZhanZhuanTi/layoutGridSkeletons';
declare global {
interface Window {
__lyConfigs?: {
@@ -321,162 +322,82 @@ const getListByPosition = (data: any, position: string) =>
/**
* 设置地图组件位置
* @param layoutType - 布局类型
- * @param data - 布局数据
- * @param offset - 偏移量
+ * @param data - 布局数据({ type, data: BclDataItem[] })
+ * @param offset - 面板宽度 + padding + gap,默认 460(440px + 10px + 10px)
+ * @param bottomRowHeight - 底部行高度(如 '200px'),无底部模块时不传
*/
export const setMapLegendPos = (
layoutType: string,
data: any,
- offset = 456
+ offset = 460,
+ bottomRowHeight?: string
) => {
- const menuStateString = localStorage.getItem('menuState'); //处理澜沧江左侧菜单状态
+ const menuStateString = localStorage.getItem('menuState');
const menuState =
menuStateString !== null ? JSON.parse(menuStateString) : true;
const _theme = localStorage.getItem('ly-theme') || window.__lyConfigs?.theme;
- const leftEle = document.querySelector('#page-layout-left') as HTMLElement;
- const rightEle = document.querySelector('#page-layout-right') as HTMLElement;
- const bottomEle = document.querySelector(
- '#page-layout-bottom'
- ) as HTMLElement;
- const legend = document.querySelector('#qgc-legendtl') as HTMLElement; // 图例
- const filter = document.querySelector('#map-filter-container') as HTMLElement; // 全局表单
- const compassControl = document.querySelector(
- '#map-compassControl'
- ) as HTMLElement; // 全局表单
- const controller = document.querySelector('#map-controller') as HTMLElement; // 地图工具栏
- const monitor = document.querySelector('#map-monitor') as HTMLElement; // 地图工具栏
- const baselayer = document.querySelector('#map-baselayer') as HTMLElement; // 底图模式切换
- // const vd = document.querySelector('#vd_operate') as HTMLElement // 底部视频
- const left = [
- 'layout1',
- 'layout2',
- 'layout3',
- 'layout4',
- 'layout6',
- 'layout7',
- 'layout8',
- 'layout9',
- 'layout10',
- 'layout11',
- 'layout14',
- 'layout15',
- 'layout16',
- 'layout17'
- ]; // 左侧布局
- const right = [
- 'layout1',
- 'layout2',
- 'layout3',
- 'layout4',
- 'layout5',
- 'layout6',
- 'layout8',
- 'layout10',
- 'layout11',
- 'layout15',
- 'layout16',
- 'layout17'
- ]; // 右侧布局
- const bottom1 = [
- 'layout1',
- 'layout6',
- 'layout8',
- 'layout9',
- 'layout10',
- 'layout16'
- ]; // 三行底部布局
- const bottom2 = ['layout2', 'layout15']; // 四行底部布局
- const w = `${offset}px`;
- const l = `${_theme === 'ly-8' ? (menuState ? 643 : 510) : offset}px`;
- let b = `0px`;
- const le = ['layout17', 'layout10'].includes(layoutType) ? 0 : 1;
+
+ const legend = document.querySelector('#qgc-legendtl') as HTMLElement;
+ const filter = document.querySelector('#map-filter-container') as HTMLElement;
+ const compassControl = document.querySelector('#map-compassControl') as HTMLElement;
+ const controller = document.querySelector('#map-controller') as HTMLElement;
+ const monitor = document.querySelector('#map-monitor') as HTMLElement;
+ const baselayer = document.querySelector('#map-baselayer') as HTMLElement;
+
const leftList = getListByPosition(data, 'left');
const rightList = getListByPosition(data, 'right');
const bottomList = getListByPosition(data, 'bottom');
- let bottom = '0';
+
+ const hasLeft = leftList?.length > 0;
+ const hasRight = rightList?.length > 0;
+ const hasBottom = bottomList?.length > 0;
+
+ console.log('[图例] hasLeft:', hasLeft, 'hasBottom:', hasBottom, 'bottomRowHeight:', bottomRowHeight);
+
+ const w = `${offset}px`;
+ const l = `${_theme === 'ly-8' ? (menuState ? 643 : 510) : offset}px`;
+ let b = `0px`;
if (_theme === 'ly-8') {
- if (window.__mapMode === '3D') {
- b = `200px`;
- } else {
- b = `${menuState ? 200 : 50}px`;
+ b = window.__mapMode === '3D' ? '200px' : `${menuState ? 200 : 50}px`;
+ }
+
+ // 底部偏移
+ // px 值:直接 + padding(10px)
+ // fr 值:按占比算,如 3 行各 1fr = calc((100% - 40px) / 3 + 10px)
+ let bottomOffset = '12px';
+ if (hasBottom && bottomRowHeight) {
+ const pxMatch = bottomRowHeight.match(/^(\d+)px$/);
+ if (pxMatch) {
+ bottomOffset = `${parseInt(pxMatch[1]) + 10}px`;
+ } else if (bottomRowHeight.endsWith('fr')) {
+ const rows = (LAYOUT_GRID_SKELETONS[layoutType]?.gridTemplateRows || '').split(' ').filter(Boolean);
+ const n = rows.length; // 总行数
+ const gaps = (n - 1) * 10; // 行间距
+ bottomOffset = `calc((100% - 20px - ${gaps}px) / ${n} + 10px)`;
}
}
- if (bottomList?.length > 0) {
- if (bottom1.includes(layoutType)) {
- bottom = 'calc((100% - 16px) / 3 + 8px)';
- }
- if (bottom2.includes(layoutType)) {
- bottom = 'calc((100% - 24px) / 4 + 8px)';
- }
- } else {
- // 没有底部布局时,底部高度为
- bottom = '28px';
- }
-
- const rle = ['layout6'].includes(layoutType) || bottom != '28px' ? 0 : 1;
-
- const leftHide = leftEle?.classList?.contains('hide');
- const rightHide = rightEle?.classList?.contains('hide');
- const bottomHide = bottomEle?.classList?.contains('hide');
if (legend) {
- legend.style.left =
- !leftHide && left.includes(layoutType) && leftList?.length > le ? l : b;
- legend.style.bottom = bottomHide
- ? '0'
- : bottomList?.length > 0
- ? bottom
- : '12px';
+ legend.style.left = hasLeft ? `calc(${l} - 10px)` : b;
+ legend.style.bottom = bottomOffset;
}
if (filter) {
- if (layoutType === 'layout10') {
- filter.style.left =
- !leftHide && left.includes(layoutType) && leftList?.length > 1 ? l : b;
- } else {
- filter.style.left =
- !leftHide &&
- left.includes(layoutType) &&
- leftList?.length > 0 &&
- layoutType !== 'layout17'
- ? l
- : b;
- }
+ filter.style.left = hasLeft ? l : b;
}
if (compassControl) {
- if (layoutType === 'layout10') {
- compassControl.style.left =
- !leftHide && left.includes(layoutType) && leftList?.length > 1 ? l : b;
- } else {
- compassControl.style.left =
- !leftHide &&
- left.includes(layoutType) &&
- leftList?.length > 0 &&
- layoutType !== 'layout17'
- ? l
- : b;
- }
+ compassControl.style.left = hasLeft ? l : b;
}
if (controller) {
- controller.style.right =
- !rightHide && right.includes(layoutType) && rightList?.length > rle
- ? w
- : '0';
- controller.style.bottom = bottomHide ? '0' : bottom;
+ controller.style.right = hasRight ? w : '0';
+ controller.style.bottom = hasBottom ? `calc(${bottomOffset} + 10px)` : '0';
}
if (monitor) {
- monitor.style.right =
- !rightHide && right.includes(layoutType) && rightList?.length > rle
- ? w
- : '0';
- // monitor.style.bottom = bottomHide ? '0' : bottom
+ monitor.style.right = hasRight ? w : '0';
}
if (baselayer) {
- baselayer.style.right =
- !rightHide && right.includes(layoutType) && rightList?.length > rle
- ? `calc(${w} + 60px)`
- : '60px';
- baselayer.style.bottom = bottomHide ? '0' : bottom;
+ baselayer.style.right = hasRight ? `calc(${w} + 60px)` : '60px';
+ baselayer.style.bottom = hasBottom ? bottomOffset : '0';
}
};
diff --git a/frontend/src/components/gis/map.cesium.ts b/frontend/src/components/gis/map.cesium.ts
index 674bb8fc..fe38f63e 100644
--- a/frontend/src/components/gis/map.cesium.ts
+++ b/frontend/src/components/gis/map.cesium.ts
@@ -142,7 +142,7 @@ export class MapCesium implements MapInterface {
try {
this.containerId = container.id;
this.containerElement = container;
- const token = 'bearer fa8aa37c-1e52-4631-a699-625b4147ace8';
+ const token = 'bearer b734a443-2c8f-4f4a-8698-44828cc5f709';
this.viewer = new Cesium.Viewer(container, {
animation: false,
diff --git a/frontend/src/components/mapController/index.vue b/frontend/src/components/mapController/index.vue
index 4c0b1b1d..07b6b9eb 100644
--- a/frontend/src/components/mapController/index.vue
+++ b/frontend/src/components/mapController/index.vue
@@ -1,5 +1,5 @@
-
+
-
+
图例
diff --git a/frontend/src/modules/EnvironmentalQuality/index.vue b/frontend/src/modules/EnvironmentalQuality/index.vue
index 814a5bcc..560a28e7 100644
--- a/frontend/src/modules/EnvironmentalQuality/index.vue
+++ b/frontend/src/modules/EnvironmentalQuality/index.vue
@@ -30,7 +30,7 @@
+
+
diff --git a/frontend/src/views/dianZhanZhuanTi/components/DZShuiDianZhanSPJK.vue b/frontend/src/views/dianZhanZhuanTi/components/DZShuiDianZhanSPJK.vue
new file mode 100644
index 00000000..365c7fd0
--- /dev/null
+++ b/frontend/src/views/dianZhanZhuanTi/components/DZShuiDianZhanSPJK.vue
@@ -0,0 +1,498 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+ {{ item.vdnm || item.flnm }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/dianZhanZhuanTi/components/EcologicalFlow.vue b/frontend/src/views/dianZhanZhuanTi/components/EcologicalFlow.vue
new file mode 100644
index 00000000..7223b029
--- /dev/null
+++ b/frontend/src/views/dianZhanZhuanTi/components/EcologicalFlow.vue
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/dianZhanZhuanTi/components/PowerStationReleasetaStisticsDetail.vue b/frontend/src/views/dianZhanZhuanTi/components/PowerStationReleasetaStisticsDetail.vue
new file mode 100644
index 00000000..3270d813
--- /dev/null
+++ b/frontend/src/views/dianZhanZhuanTi/components/PowerStationReleasetaStisticsDetail.vue
@@ -0,0 +1,381 @@
+
+
+
+
+
+
+
diff --git a/frontend/src/views/dianZhanZhuanTi/components/ShuiDianZhanJieShao.vue b/frontend/src/views/dianZhanZhuanTi/components/ShuiDianZhanJieShao.vue
new file mode 100644
index 00000000..a1890eb3
--- /dev/null
+++ b/frontend/src/views/dianZhanZhuanTi/components/ShuiDianZhanJieShao.vue
@@ -0,0 +1,280 @@
+
+
+
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+
+
+ {{ currentDescription }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/dianZhanZhuanTi/components/ZXZWYYunXingShuJu.vue b/frontend/src/views/dianZhanZhuanTi/components/ZXZWYYunXingShuJu.vue
new file mode 100644
index 00000000..3d6cb373
--- /dev/null
+++ b/frontend/src/views/dianZhanZhuanTi/components/ZXZWYYunXingShuJu.vue
@@ -0,0 +1,464 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ showData.botanyName || ''
+ }}{{ showData.unitName ? `(${showData.unitName})` : '' }}
+
{{ showData.tamarixChinensis ?? '-' }}
+
![]()
+
{{ showData.tamarixChinensisLive ?? '-' }}
+
存活率
+
+
+
+
+
其他
+
{{ showData.other || 0 }}
+
![]()
+
{{ showData.otherLive ?? '-' }}
+
存活率
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/dianZhanZhuanTi/components/ZenZhiZhanYunXingDetailModal.vue b/frontend/src/views/dianZhanZhuanTi/components/ZenZhiZhanYunXingDetailModal.vue
new file mode 100644
index 00000000..094139f3
--- /dev/null
+++ b/frontend/src/views/dianZhanZhuanTi/components/ZenZhiZhanYunXingDetailModal.vue
@@ -0,0 +1,292 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看
+ 查看
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/dianZhanZhuanTi/components/ZenZhiZhanYunXingPG.vue b/frontend/src/views/dianZhanZhuanTi/components/ZenZhiZhanYunXingPG.vue
new file mode 100644
index 00000000..9d3189fd
--- /dev/null
+++ b/frontend/src/views/dianZhanZhuanTi/components/ZenZhiZhanYunXingPG.vue
@@ -0,0 +1,600 @@
+
+
+
+
+
+
+
+
+
+
+
+
![]()
+
+
+
![]()
+
+
+ STEP{{ index + 1 }}
+
+
+
+ {{ item.title }}
+ STEP{{ index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/dianZhanZhuanTi/components/arrowUpLg.svg b/frontend/src/views/dianZhanZhuanTi/components/arrowUpLg.svg
new file mode 100644
index 00000000..8ce71c6b
--- /dev/null
+++ b/frontend/src/views/dianZhanZhuanTi/components/arrowUpLg.svg
@@ -0,0 +1,32 @@
+
+
diff --git a/frontend/src/views/dianZhanZhuanTi/components/powerStationReleasetaStistics.vue b/frontend/src/views/dianZhanZhuanTi/components/powerStationReleasetaStistics.vue
new file mode 100644
index 00000000..ca80441b
--- /dev/null
+++ b/frontend/src/views/dianZhanZhuanTi/components/powerStationReleasetaStistics.vue
@@ -0,0 +1,445 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/dianZhanZhuanTi/dianZhanZhuanTi.vue b/frontend/src/views/dianZhanZhuanTi/dianZhanZhuanTi.vue
index 43e05025..989b6ef5 100644
--- a/frontend/src/views/dianZhanZhuanTi/dianZhanZhuanTi.vue
+++ b/frontend/src/views/dianZhanZhuanTi/dianZhanZhuanTi.vue
@@ -1,5 +1,381 @@
-
-
电站专题
+
-
\ No newline at end of file
+
+
+
+
+
diff --git a/frontend/src/views/dianZhanZhuanTi/layoutGridSkeletons.ts b/frontend/src/views/dianZhanZhuanTi/layoutGridSkeletons.ts
new file mode 100644
index 00000000..de246a5f
--- /dev/null
+++ b/frontend/src/views/dianZhanZhuanTi/layoutGridSkeletons.ts
@@ -0,0 +1,133 @@
+/**
+ * CSS Grid 布局骨架配置
+ *
+ * 每种布局只定义网格结构(行、列、区域划分),不指定具体模块。
+ * 具体模块由后端 bclData 动态决定,通过 position + per-position-index 映射到 grid-area 名。
+ *
+ * 区域命名规则:{position}-{areaIdx}
+ * areaIdx = 按 position 各自从 0 递增编号(非全局 index)
+ * 例如 left-0 = 左侧第 1 个模块,right-2 = 右侧第 3 个模块
+ *
+ * 相同区域名出现多次 = 合并单元格(如某侧只有 1 个模块时撑满多行)
+ * "." = 空白区域(透出底图)
+ */
+
+export interface GridSkeleton {
+ /** CSS grid-template-areas 字符串 */
+ gridTemplateAreas: string;
+ /** CSS grid-template-columns 字符串 */
+ gridTemplateColumns: string;
+ /** CSS grid-template-rows 字符串 */
+ gridTemplateRows: string;
+}
+
+export const LAYOUT_GRID_SKELETONS: Record
= {
+ // 左3右3加底
+ layout1: {
+ gridTemplateAreas:
+ '"left-0 . right-0" "left-1 . right-1" "left-2 bottom-0 right-2"',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr'
+ },
+ //左4右4加底
+ layout2: {
+ gridTemplateAreas:
+ '"left-0 . right-0" "left-1 . right-1" "left-2 . right-2" "left-3 bottom-0 right-3"',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr 1fr'
+ },
+ // 左三右三(无底部)
+ layout3: {
+ gridTemplateAreas:
+ '"left-0 . right-0" "left-1 . right-1" "left-2 . right-2"',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr'
+ },
+ //左4右4无底
+ layout4: {
+ gridTemplateAreas:
+ '"left-0 . right-0" "left-1 . right-1" "left-2 . right-2" "left-3 . right-3"',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr 1fr'
+ },
+
+ // 右二(无左侧、无底部)
+ layout5: {
+ gridTemplateAreas: '". . right-0" ". . right-1"',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr'
+ },
+ // 左2右1加底
+ layout6: {
+ gridTemplateAreas:
+ '"left-0 . right-0" "left-1 . right-0" "bottom-0 bottom-0 bottom-0"',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr'
+ },
+ //仅左3
+ layout7: {
+ gridTemplateAreas: '"left-0 . ." "left-1 . ." "left-2 . ."',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr'
+ },
+ //左2右3加底
+ layout8: {
+ gridTemplateAreas:
+ '"left-0 . right-0" "left-1 . right-1" "bottom-0 bottom-0 right-2"',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr'
+ },
+ //左3加底
+ layout9: {
+ gridTemplateAreas: '"left-0 . ." "left-1 . ." "left-2 bottom-0 bottom-0"',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr'
+ },
+
+ // 左二右二 + 底部(底部撑满全宽)
+ layout10: {
+ gridTemplateAreas:
+ '"left-0 . right-0" "left-1 . right-1" "bottom-0 bottom-0 bottom-0"',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr'
+ },
+ // 左3右1无底
+ layout11: {
+ gridTemplateAreas: '"left-0 . right-0" "left-1 . right-0" "left-2 . ."',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr'
+ },
+ //右一无底
+ layout12: {
+ gridTemplateAreas: '". . right-0" ". . right-0" ". . ." ". . ."',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr 1fr'
+ },
+ //右1(2/3高)无底
+ layout13: {
+ gridTemplateAreas: '". . right-0" ". . right-0" ". . ." ',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr '
+ },
+ //左一右一无底
+ layout14: {
+ gridTemplateAreas: '". left-0 . right-0" "left-0 . right-0" ". . ."',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr'
+ },
+ //左4右3满底
+ layout15: {
+ gridTemplateAreas:
+ ' "left-0 . right-0" "left-1 . right-1" "left-2 . right-2" "left-3 bottom-0 bottom-0"',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr'
+ },
+ //左(2/3+1/3)右3加底
+ layout16: {
+ gridTemplateAreas:
+ '"left-0 . right-0" "left-0 . right-1" "bottom-0 bottom-0 right-2" ',
+ gridTemplateColumns: '440px 1fr 440px',
+ gridTemplateRows: '1fr 1fr 1fr'
+ },
+ // TODO: 后续补充其余布局的骨架配置
+};
diff --git a/frontend/src/views/dianZhanZhuanTi/moduleMap.ts b/frontend/src/views/dianZhanZhuanTi/moduleMap.ts
new file mode 100644
index 00000000..387d699b
--- /dev/null
+++ b/frontend/src/views/dianZhanZhuanTi/moduleMap.ts
@@ -0,0 +1,120 @@
+import { defineAsyncComponent } from 'vue';
+
+/**
+ * 电站专题组件映射表
+ * key: 后端 bclData 中的 code 字段值
+ * value: Vue 异步组件(按需加载)
+ */
+export const moduleMap: Record = {
+ // === 已有 Vue 模块映射 ===
+
+ // 垂向水温变化
+ 'dianzhanZhuantiMod/DZChuiXiangShuiWenBianHua': defineAsyncComponent(
+ () => import('@/modules/chuixiangshuiwenChangeMod/index.vue')
+ ),
+
+ // 水质达标率
+ 'dianzhanZhuantiMod/DZShuiZhiDaBiaoLv': defineAsyncComponent(
+ () => import('@/modules/EnvironmentalQuality/index.vue')
+ ),
+
+ // 环保设施运行情况
+ 'dianzhanZhuantiMod/HuanBaoSheShiYunxingQK': defineAsyncComponent(
+ () => import('@/modules/huanbaoMod/index.vue')
+ ),
+
+ // 增殖站运行评估
+ 'dianzhanZhuantiMod/ZenZhiZhanYunXingPG': defineAsyncComponent(
+ () => import('./components/ZenZhiZhanYunXingPG.vue')
+ ),
+
+ // 水质监测趋势图 → 沿程水质变化
+ 'dianzhanZhuantiMod/DZShuiZhiJianCeQuShiTu': defineAsyncComponent(
+ () => import('@/modules/waterQuality/index.vue')
+ ),
+
+ // 监测点水温变化 → 水温监测
+ 'dianzhanZhuantiMod/JianCeDianShuiWenBianHua': defineAsyncComponent(
+ () => import('@/modules/qixidishuiwenbianhua/index.vue')
+ ),
+
+ // 水生生态监测 → 水生生态调查情况
+ 'dianzhanZhuantiMod/SSST_MONITOR': defineAsyncComponent(
+ () => import('@/modules/shuishengshengtaijiance/index.vue')
+ ),
+
+ // 陆生生态监测 → 陆生生态监测情况
+ 'dianzhanZhuantiMod/LSST_MONITOR': defineAsyncComponent(
+ () => import('@/modules/lushengshengtaijiance/index.vue')
+ ),
+
+ // 生态流量实时数据 → 生态流量达标情况
+ 'dianzhanZhuantiMod/EcologicalDataMod': defineAsyncComponent(
+ () => import('@/modules/shengtaidabiaoMod/index.vue')
+ ),
+
+ // 珍稀植物园运行数据
+ 'dianzhanZhuantiMod/ZXZWY_DATA': defineAsyncComponent(
+ () =>
+ import(
+ '@/modules/ZhenXiZhiWuYuanMod/ZhiWuYuanJianSheJiJieRuQingKuangBar/index.vue'
+ )
+ ),
+
+
+ // === 以下为需要新建的模块(临时占位) ===
+
+ // 水电站介绍(待实现)
+ 'dianzhanZhuantiMod/ShuiDianZhanJieShao': defineAsyncComponent(
+ () => import('./components/ShuiDianZhanJieShao.vue')
+ ),
+
+ // 社会投资扶贫就业(待实现)
+ 'dianzhanZhuantiMod/DZSheHuiTouZiFP': defineAsyncComponent(
+ () => import('./components/DZSheHuiTouZiFP.vue')
+ ),
+ // 水电站视频监控
+ 'dianzhanZhuantiMod/DZShuiDianZhanSPJK': defineAsyncComponent(
+ () => import('./components/DZShuiDianZhanSPJK.vue')
+ ),
+ // 电站放流统计
+ 'dianzhanZhuantiMod/powerStationReleasetaStistics': defineAsyncComponent(
+ () => import('./components/powerStationReleasetaStistics.vue')
+ ),
+ //生态流量数据分析
+ 'ecologicalDataMod': defineAsyncComponent(
+ () =>
+ import(
+ './components/EcologicalFlow.vue'
+ )
+ ),
+ //过鱼总量
+ 'liuyu/guoyuzongliang': defineAsyncComponent(
+ () =>
+ import(
+ '@/modules/GYZLLB/index.vue'
+ )
+ ),
+ //电站放流统计
+ 'liuyu/zengZhiFangLiu/powerStationReleasetaStistics': defineAsyncComponent(
+ () =>
+ import(
+ './components/powerStationReleasetaStistics.vue'
+ )
+ ),
+ //珍稀植物园运行数据
+ 'luSSTDiaoCha/ZXZWYYunXingShuJu': defineAsyncComponent(
+ () =>
+ import(
+ './components/ZXZWYYunXingShuJu.vue'
+ )
+ ),
+};
+
+
+/**
+ * 根据 code 获取对应组件
+ */
+export function getModuleComponent(code: string): any {
+ return moduleMap[code] || null;
+}
diff --git a/frontend/src/views/system/alertRules/components/ConfigManagement/ConfigManagementForm.vue b/frontend/src/views/system/alertRules/components/ConfigManagement/ConfigManagementForm.vue
index 4835ade9..a194ffde 100644
--- a/frontend/src/views/system/alertRules/components/ConfigManagement/ConfigManagementForm.vue
+++ b/frontend/src/views/system/alertRules/components/ConfigManagement/ConfigManagementForm.vue
@@ -1,9 +1,9 @@
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+ placeholder="请选择设施类型"
+ :options="riverOptions"
+ :filter-option="filterOption"
+ :disabled="isEdit"
+ @change="loadStaticRuleData"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
- {{ item.stnm }}
-
-
-
- 保存
-
-
-
-
-
-
- 新增一级节点
-
-
-
-
-
-
-
-
-
- {{ item.stnm }}
-
-
-
- 保存
-
-
-
-
-
-
-
-
-
{{ getNodeTitle(dataRef) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {{ item.ysName }}{{ unitSuffix }}:
+
+
+
-
-
-
-
-
- {{ item.stnm }}
-
-
-
- 保存
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
diff --git a/frontend/src/views/system/alertRules/components/ConfigManagement/ConfigManagementSearch.vue b/frontend/src/views/system/alertRules/components/ConfigManagement/ConfigManagementSearch.vue
index c10b93c8..89eae38a 100644
--- a/frontend/src/views/system/alertRules/components/ConfigManagement/ConfigManagementSearch.vue
+++ b/frontend/src/views/system/alertRules/components/ConfigManagement/ConfigManagementSearch.vue
@@ -9,8 +9,11 @@
@values-change="onValuesChange"
>
-
- 新增沿程配置
+
+
+
+ 新增预警配置
@@ -18,46 +21,51 @@
-
+
diff --git a/frontend/src/views/system/alertRules/components/ConfigManagement/index.vue b/frontend/src/views/system/alertRules/components/ConfigManagement/index.vue
index 6170d007..2f4ad3e4 100644
--- a/frontend/src/views/system/alertRules/components/ConfigManagement/index.vue
+++ b/frontend/src/views/system/alertRules/components/ConfigManagement/index.vue
@@ -1,9 +1,10 @@
-
+
- 预警配置管理
-
+ />
@@ -51,13 +54,11 @@ import ConfigManagementSearch from './ConfigManagementSearch.vue';
import ConfigManagementForm from './ConfigManagementForm.vue';
import { message, Modal } from 'ant-design-vue';
import {
- getAllConfigTree,
- deleteBaseWbsb,
- saveBaseWbsb
-} from '@/api/system/map/ConfigManagement';
+ bindGetKendoList,
+ warnruleAddOrUpdate,
+ warnruleBindDelete
+} from '@/api/system/alertRules';
-// 表格实例
-const basicTable = ref(null);
// 表格列配置
const columns = [
{
@@ -69,32 +70,24 @@ const columns = [
customRender: ({ text, record, index }) => index + 1
},
{
- title: '沿程配置名称',
- dataIndex: 'name',
- key: 'name',
- width: 150
+ title: '预警名称',
+ dataIndex: 'ruleName',
+ key: 'ruleName'
},
{
- title: '配置编码',
- key: 'code',
- dataIndex: 'code',
- width: 120
+ title: '预警类型',
+ dataIndex: 'ruleTypeName',
+ key: 'ruleTypeName'
},
{
- title: '所在河段',
- dataIndex: 'rvnm',
- key: 'rvnm',
- ellipsis: true
+ title: '规则类型',
+ dataIndex: 'ruleTypeName',
+ key: 'ruleTypeName'
},
{
title: '创建人',
- key: 'recordUser',
- dataIndex: 'recordUser'
- },
- {
- title: '创建时间',
- key: 'recordTime',
- dataIndex: 'recordTime',
+ key: 'recordUserName',
+ dataIndex: 'recordUserName',
width: 150
},
{
@@ -105,9 +98,8 @@ const columns = [
},
{
title: '备注',
- dataIndex: 'remark',
- key: 'remark',
- width: 360
+ key: 'description',
+ dataIndex: 'description'
},
{
title: '操作',
@@ -118,13 +110,15 @@ const columns = [
}
];
+// 表格实例
+const basicTable = ref(null);
// 搜索参数
const searchParams = ref({});
// 编辑弹窗数据
const currentRecord = ref(null);
const editModalVisible = ref(false);
-// 新增处理
+// 添加处理
const handleAdd = () => {
currentRecord.value = null;
editModalVisible.value = true;
@@ -144,11 +138,11 @@ const handleDelete = (record: any) => {
zIndex: 2002,
onOk: async () => {
try {
- let res = await deleteBaseWbsb([record.id]);
- message.success('删除成功');
+ let res: any = await warnruleBindDelete({ id: record.bindId });
+ if (res.code == 0) message.success('删除成功');
basicTable.value.refresh();
} catch (error) {
- message.error('删除失败');
+
return;
}
}
@@ -160,20 +154,26 @@ const onSearchFinish = (values: any) => {
const params = {
logic: 'and',
filters: [
- values.parentId
+ {
+ field: 'ruleCode',
+ operator: 'in',
+ dataType: 'string',
+ value: ['common', 'custom']
+ },
+ values.ruleName
? {
- field: 'parentId',
- operator: 'eq',
- dataType: 'string',
- value: values.parentId
- }
- : null,
- values.name
- ? {
- field: 'name',
+ field: 'ruleName',
operator: 'contains',
dataType: 'string',
- value: values.name
+ value: values.ruleName
+ }
+ : null,
+ values.ruleType
+ ? {
+ field: 'ruleType',
+ operator: 'contains',
+ dataType: 'string',
+ value: values.ruleType
}
: null
].filter(Boolean)
@@ -183,9 +183,11 @@ const onSearchFinish = (values: any) => {
// 重置
const handleReset = () => {
- basicTable.value.getList({
- logic: 'and',
- filters: []
+ nextTick(() => {
+ basicTable.value.getList({
+ logic: 'and',
+ filters: []
+ });
});
};
@@ -198,22 +200,25 @@ const editModalCancel = () => {
// 表单提交
const handleEditSubmit = async (values: any) => {
try {
- let res = await saveBaseWbsb({
- ...currentRecord.value,
- ...values
- });
- message.success(`保存成功`);
+ let res:any = await warnruleAddOrUpdate(values);
+ if(res.code == 0) message.success(`保存成功`);
editModalVisible.value = false;
basicTable.value.refresh();
} catch (error) {
- message.error(`保存失败`);
+
editModalVisible.value = false;
return;
}
};
-
+const riverOptions = ref([
+ { value: 'RZ_RULE', label: '水位' },
+ { value: 'QGC_RULE', label: '生态流量' },
+ { value: 'WT_RULE', label: '水温' },
+ { value: 'WQ_RULE', label: '水质' }
+]);
+const riverOptionsLoad = ref(false);
const initOption = () => {};
onMounted(() => {
initOption();
@@ -221,8 +226,22 @@ onMounted(() => {
diff --git a/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementForm.vue b/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementForm.vue
index 286aa218..b7a15c91 100644
--- a/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementForm.vue
+++ b/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementForm.vue
@@ -1,6 +1,6 @@
-
+
-
+
-
-
+
+
+ {{ item.ysName }}{{ unitSuffix }}:
+
+
@@ -80,10 +98,8 @@ import { ref, reactive, computed, watch } from 'vue';
import { message } from 'ant-design-vue';
import type { Rule } from 'ant-design-vue/es/form';
import dayjs from 'dayjs';
-import {
- dictGetRemoteDictValue,
- ruleysList
-} from '@/api/system/alertRules';
+import { getDictItemsByCode } from "@/api/dict";
+import { ruleysList } from '@/api/system/alertRules';
interface Props {
visible: boolean;
initialValues?: any | null;
@@ -115,7 +131,7 @@ const defaultFormData = reactive({
id: undefined,
ruleName: undefined,
ruleType: undefined,
- warnLevel: undefined,
+ lvl: undefined
});
const formData: any = reactive({ ...defaultFormData });
@@ -124,7 +140,7 @@ const rules: Record = {
{ required: true, message: '请输入倾斜影像名称', trigger: 'blur' }
],
ruleType: [{ required: true, message: '请输入所在河段', trigger: 'blur' }],
- warnLevel: [{ required: true, message: '请输入所属电站', trigger: 'blur' }],
+ lvl: [{ required: true, message: '请输入所属电站', trigger: 'blur' }],
url: [{ required: true, message: '请输入倾斜影像URL', trigger: 'blur' }],
location: [{ required: true, message: '请输入模型坐标', trigger: 'blur' }]
};
@@ -133,21 +149,47 @@ const isEdit = computed(() => !!props.initialValues);
// 是否为水质预警类型
const isWaterQuality = computed(() => {
- const selectedOption = props.riverOptions?.find(opt => opt.value === formData.ruleType);
+ const selectedOption = props.riverOptions?.find(
+ opt => opt.value === formData.ruleType
+ );
return selectedOption?.label === '水质';
});
+// 根据 ruleType 返回单位后缀
+const unitSuffix = computed(() => {
+ const unitMap: Record = {
+ RZ_RULE: 'm',
+ QGC_RULE: 'm³/s',
+ WQ_RULE: 'mg/L'
+ };
+ return unitMap[formData.ruleType] || '';
+});
+
const handleOk = async () => {
try {
await formRef.value.validate();
-
- const submitValues = {
- ...formData,
- captureDate: formData.captureDate
- ? dayjs(formData.captureDate).format('YYYY-MM-DD')
- : undefined
- };
+ const isRz = formData.ruleType === 'RZ_RULE';
+ const isWq = formData.ruleType === 'WQ_RULE';
+
+ const submitValues: any = {
+ ruleName: formData.ruleName,
+ ruleType: formData.ruleType,
+ ruleCode: 'common',
+ detail: [
+ {
+ ...(isWq ? { lvl: formData.lvl } : { warnLevel: activeTabKey.value }),
+ ysList: (detailData.value[activeTabKey.value] || []).map((item: any) => ({
+ ys: item.ys,
+ minVal: item.minVal,
+ maxVal: item.maxVal,
+ tbId: item.tbId,
+ ...(isRz ? { mark: item.mark } : {})
+ }))
+ }
+ ],
+ ...(formData.id ? { id: formData.id } : {})
+ };
emit('ok', submitValues);
} catch (error) {
console.error('Validate Failed:', error);
@@ -195,11 +237,13 @@ const filterOption = (inputValue: string, option: any) => {
};
const ennmOptions = ref([]);
const handleRiverSelect = async (value: any) => {
- let res: any = await dictGetRemoteDictValue({ dictCode: 'wwqtg' });
+ //
+ let res: any = await getDictItemsByCode({ dictCode: 'WWQTG' });
+ // debugger
if (res?.data?.length > 0) {
res.data.forEach((item: any) => {
- item.value = item.dictValue;
- item.label = item.dictMeaning;
+ item.value = item.itemCode;
+ item.label = item.dictName;
});
ennmOptions.value = res.data;
} else {
@@ -207,15 +251,27 @@ const handleRiverSelect = async (value: any) => {
}
};
-// 预警类型 → 预警等级字典编码映射
-const ruleTypeToDictCodeMap: Record = {
- '水位': 'RSVRFSR_WARN_LEVEL',
- '生态流量': 'EQMN_WARN_LEVEL',
- '水温': 'WTMN_WARN_LEVEL',
- '水质': 'WQLVL_WARN_LEVEL'
+// 静态预警等级数据(按 ruleType 值索引)
+const staticTabsData: Record = {
+ RZ_RULE: [
+ { key: '1', label: '一级预警' },
+ { key: '2', label: '二级预警' },
+ { key: '3', label: '三级预警' }
+ ],
+ QGC_RULE: [
+ { key: '1', label: '一级预警' },
+ { key: '2', label: '二级预警' }
+ ],
+ WT_RULE: [
+ { key: '1', label: '一级预警' },
+ { key: '2', label: '二级预警' },
+ { key: '3', label: '三级预警' }
+ ],
+ WQ_RULE: [
+ { key: '0', label: '通用预警' }
+ ]
};
-
// 预警等级标签页
const activeTabKey = ref('');
const warnLevelTabs = ref<{ key: string; label: string }[]>([]);
@@ -224,57 +280,103 @@ const warnLevelTabsLoading = ref(false);
// 要素详情数据
const detailData = ref>({});
-// 获取要素列表并初始化 detailData
-const fetchYsList = async () => {
- const res: any = await ruleysList({
- filter: {
- logic: 'and',
- filters: [
+// 根据 ruleType 加载静态 tabs + 动态 ysList
+const loadStaticRuleData = async () => {
+ const tabs = staticTabsData[formData.ruleType];
+ if (tabs) {
+ warnLevelTabs.value = tabs;
+ activeTabKey.value = tabs.length > 0 ? tabs[0].key : '';
+ warnLevelTabsLoading.value = true;
+
+ try {
+ const filters: any[] = [
{
field: 'ruleType',
operator: 'eq',
dataType: 'string',
value: formData.ruleType
}
- ]
+ ];
+ if (isEdit.value && formData.id) {
+ filters.push({
+ field: 'ruleId',
+ operator: 'eq',
+ dataType: 'string',
+ value: formData.id
+ });
+ }
+ const res: any = await ruleysList({
+ filter: {
+ logic: 'and',
+ filters
+ }
+ });
+ const list = res?.data || [];
+ // 编辑回显:根据 API 返回数据设置选中 tab / 水质等级
+ if (isEdit.value && list.length > 0) {
+ if (formData.ruleType === 'WQ_RULE') {
+ if (list[0].lvl != null) formData.lvl = list[0].lvl;
+ } else {
+ if (list[0].warnLevel != null) activeTabKey.value = String(list[0].warnLevel);
+ }
+ }
+ const details: Record = {};
+ // 仅当列表中存在 warnLevel 值时才按 warnLevel 过滤,否则全量展示
+ const hasWarnLevel = list.some((item: any) => item.warnLevel != null);
+ // 兜底:按 tbId 去重,生成空壳行(minVal/maxVal 置空),保证空 tab 行数与其他 tab 一致
+ const fallbackItems = (() => {
+ const seen = new Set();
+ return list
+ .filter((item: any) => {
+ if (seen.has(item.tbId)) return false;
+ seen.add(item.tbId);
+ return true;
+ })
+ .map((item: any) => ({ ...item, minVal: undefined, maxVal: undefined }));
+ })();
+ tabs.forEach(tab => {
+ const filtered = formData.ruleType === 'WQ_RULE'
+ ? list
+ : hasWarnLevel
+ ? list.filter((item: any) => String(item.warnLevel) === tab.key)
+ : list;
+ if (formData.ruleType === 'RZ_RULE') {
+ const template = filtered.length > 0 ? filtered : fallbackItems;
+ details[tab.key] = [];
+ // 编辑回显时仅当filtered有数据且带mark才直接使用,fallbackItems可能继承mark会导致空tab不拆分
+ const hasMark = filtered.length > 0 && filtered.some((item: any) => item.mark);
+ if (hasMark) {
+ template.forEach((item: any) => {
+ const ysName = item.ysName || (item.mark === 'low' ? '坝上水位' : '坝下水位');
+ details[tab.key].push({ ys: item.ys, ysName, tbId: item.tbId, minVal: item.minVal, maxVal: item.maxVal, mark: item.mark });
+ });
+ } else {
+ template.forEach((item: any) => {
+ details[tab.key].push({ ys: item.ys, ysName: '坝上水位', tbId: item.tbId, minVal: item.minVal, maxVal: item.maxVal, mark: 'low' });
+ details[tab.key].push({ ys: item.ys, ysName: '坝下水位', tbId: item.tbId, minVal: item.minVal, maxVal: item.maxVal, mark: 'high' });
+ });
+ }
+ } else {
+ const source = filtered.length > 0 ? filtered : fallbackItems;
+ details[tab.key] = source.map((item: any) => ({
+ ys: item.ys,
+ ysName: item.ysName,
+ tbId: item.tbId,
+ minVal: item.minVal,
+ maxVal: item.maxVal,
+ ...(item.mark ? { mark: item.mark } : {})
+ }));
+ }
+ });
+ detailData.value = details;
+ } catch {
+ detailData.value = {};
+ } finally {
+ warnLevelTabsLoading.value = false;
}
- });
- const list = res?.data?.data || [];
- const details: Record = {};
- warnLevelTabs.value.forEach(tab => {
- details[tab.key] = list.map((item: any) => ({
- ys: item.ys,
- ysName: item.ysName,
- tbId: item.tbId,
- minVal: null,
- maxVal: null
- }));
- });
- detailData.value = details;
-};
-
-const fetchWarnLevelTabs = async () => {
- warnLevelTabsLoading.value = true;
- try {
- const selectedOption = props.riverOptions?.find(opt => opt.value === formData.ruleType);
- const dictCode = selectedOption ? ruleTypeToDictCodeMap[selectedOption.label] : undefined;
- if (!dictCode) {
- warnLevelTabs.value = [];
- return;
- }
- const res: any = await dictGetRemoteDictValue({ dictCode });
- if (res?.data?.length > 0) {
- warnLevelTabs.value = res.data.map((item: any) => ({
- key: item.dictValue,
- label: item.dictMeaning
- }));
- activeTabKey.value = res.data[0].dictValue;
- } else {
- warnLevelTabs.value = [];
- }
- await fetchYsList();
- } finally {
- warnLevelTabsLoading.value = false;
+ } else {
+ warnLevelTabs.value = [];
+ detailData.value = {};
}
};
@@ -288,7 +390,7 @@ watch(
if (!props.initialValues && props.riverOptions?.length > 0) {
formData.ruleType = props.riverOptions[0].value;
}
- fetchWarnLevelTabs();
+ loadStaticRuleData();
}
},
{ immediate: false }
diff --git a/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementSearch.vue b/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementSearch.vue
index 59e923ee..8e4e1bc8 100644
--- a/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementSearch.vue
+++ b/frontend/src/views/system/alertRules/components/RulesManagement/LayerManagementSearch.vue
@@ -9,7 +9,7 @@
@values-change="onValuesChange"
>
-
+
新增预警
diff --git a/frontend/src/views/system/alertRules/components/RulesManagement/index.vue b/frontend/src/views/system/alertRules/components/RulesManagement/index.vue
index 7d18ad1a..4a0b07cb 100644
--- a/frontend/src/views/system/alertRules/components/RulesManagement/index.vue
+++ b/frontend/src/views/system/alertRules/components/RulesManagement/index.vue
@@ -55,8 +55,10 @@ import LayerManagementForm from './LayerManagementForm.vue';
import { message, Modal } from 'ant-design-vue';
import {
warnruleGetKendoList,
- dictGetRemoteDictValue
+ warnruleAddOrUpdate,
+ warnruleDelete
} from '@/api/system/alertRules';
+
// 表格列配置
const columns = [
{
@@ -69,23 +71,23 @@ const columns = [
},
{
title: '预警名称',
- dataIndex: 'stnm',
- key: 'stnm'
+ dataIndex: 'ruleName',
+ key: 'ruleName'
},
{
title: '预警类型',
- dataIndex: 'url',
- key: 'url'
+ dataIndex: 'ruleTypeName',
+ key: 'ruleTypeName'
},
{
title: '规则类型',
- dataIndex: 'hbrvcdName',
- key: 'hbrvcdName'
+ dataIndex: 'ruleTypeName',
+ key: 'ruleTypeName'
},
- {
+ {
title: '创建人',
- key: 'recordUser',
- dataIndex: 'recordUser',
+ key: 'recordUserName',
+ dataIndex: 'recordUserName',
width: 150
},
{
@@ -96,8 +98,8 @@ const columns = [
},
{
title: '备注',
- key: 'recordUser',
- dataIndex: 'recordUser'
+ key: 'description',
+ dataIndex: 'description'
},
{
title: '操作',
@@ -132,15 +134,14 @@ const handleEdit = (record: any) => {
const handleDelete = (record: any) => {
Modal.confirm({
title: '确认删除',
- content: '确定要删除选中的记录吗?',
+ content: '注意,删除此规则后,绑定他的预警配置将会同步删除,确定要删除选中的记录吗?',
zIndex: 2002,
onOk: async () => {
try {
- // let res = await deleteTiltPhoto({ id: record.id });
- message.success('删除成功');
+ let res:any = await warnruleDelete({ id: record.id });
+ if(res.code == 0) message.success('删除成功');
basicTable.value.refresh();
} catch (error) {
- message.error('删除失败');
return;
}
}
@@ -197,38 +198,25 @@ const editModalCancel = () => {
// 表单提交
const handleEditSubmit = async (values: any) => {
- // debugger
try {
- // let res = await saveTiltPhoto({
- // ...currentRecord.value,
- // ...values
- // });
- message.success(`保存成功`);
+ let res:any = await warnruleAddOrUpdate(values);
+ if(res.code == 0) message.success(`保存成功`);
editModalVisible.value = false;
basicTable.value.refresh();
} catch (error) {
- message.error(`保存失败`);
-
editModalVisible.value = false;
return;
}
};
-const riverOptions = ref([]);
+const riverOptions = ref([
+ { value: 'RZ_RULE', label: '水位' },
+ { value: 'QGC_RULE', label: '生态流量' },
+ { value: 'WT_RULE', label: '水温' },
+ { value: 'WQ_RULE', label: '水质' },
+]);
const riverOptionsLoad = ref(false);
-const initOption = () => {
- const params = {};
- riverOptionsLoad.value = true;
-
- dictGetRemoteDictValue({ dictCode: 'WARN_RULE_TYPE' }).then((res: any) => {
- res.data.forEach((item: any) => {
- item.value = item.dictValue;
- item.label = item.dictMeaning;
- });
- riverOptions.value = res.data;
- riverOptionsLoad.value = false;
- });
-};
+const initOption = () => {};
onMounted(() => {
initOption();
});
diff --git a/frontend/src/views/system/dict/index.vue b/frontend/src/views/system/dict/index.vue
index 6081c57d..669d2f87 100644
--- a/frontend/src/views/system/dict/index.vue
+++ b/frontend/src/views/system/dict/index.vue
@@ -5,7 +5,7 @@ export default {