diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue index 3c5ed9c..785f4c4 100644 --- a/src/layout/components/HeaderSys/index.vue +++ b/src/layout/components/HeaderSys/index.vue @@ -75,7 +75,7 @@ import bus from '@/utils/mitt'; import { ElMessageBox } from 'element-plus'; import usePermissionStore from '@/store/modules/permission'; - +import { getUserProfile } from '@/api/system/user'; const permissionStore = usePermissionStore(); const { proxy } = getCurrentInstance(); const dialogShow = ref(false); @@ -149,7 +149,7 @@ } /** 获取搜索数据列表 */ const getDataListA = async () => { - projectNoticeUserPage().then(response => { + projectNoticeUserPage({ noticeUserId: Userid.value }).then(response => { tableData.value = response.data; }); }; @@ -167,6 +167,12 @@ dialogNews.value = false; getDataListB(); } +const Userid = ref(''); +function getUser() { + getUserProfile().then(response => { + Userid.value = response.data.user.userId; + }); +} onMounted(() => { // 动态获取路由返回子菜单 permissionStore.sidebarRouters.map(item => { @@ -187,6 +193,7 @@ getDataListB(); }); getDataListB(); + getUser(); }); onBeforeUnmount(() => { bus.off('closeUserCenter'); diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue index 3c5ed9c..785f4c4 100644 --- a/src/layout/components/HeaderSys/index.vue +++ b/src/layout/components/HeaderSys/index.vue @@ -75,7 +75,7 @@ import bus from '@/utils/mitt'; import { ElMessageBox } from 'element-plus'; import usePermissionStore from '@/store/modules/permission'; - +import { getUserProfile } from '@/api/system/user'; const permissionStore = usePermissionStore(); const { proxy } = getCurrentInstance(); const dialogShow = ref(false); @@ -149,7 +149,7 @@ } /** 获取搜索数据列表 */ const getDataListA = async () => { - projectNoticeUserPage().then(response => { + projectNoticeUserPage({ noticeUserId: Userid.value }).then(response => { tableData.value = response.data; }); }; @@ -167,6 +167,12 @@ dialogNews.value = false; getDataListB(); } +const Userid = ref(''); +function getUser() { + getUserProfile().then(response => { + Userid.value = response.data.user.userId; + }); +} onMounted(() => { // 动态获取路由返回子菜单 permissionStore.sidebarRouters.map(item => { @@ -187,6 +193,7 @@ getDataListB(); }); getDataListB(); + getUser(); }); onBeforeUnmount(() => { bus.off('closeUserCenter'); diff --git a/src/views/floodSys/floodOneMap/tabRightWL.vue b/src/views/floodSys/floodOneMap/tabRightWL.vue index cc788a6..230e395 100644 --- a/src/views/floodSys/floodOneMap/tabRightWL.vue +++ b/src/views/floodSys/floodOneMap/tabRightWL.vue @@ -178,10 +178,9 @@
-
河道水位
+
河道水位1
- - +
{ +const getRealtimedRiver = async id => { tableDataLoading5.value = true; let params = { monitorTargetType: 'river', - orderBy: 'order_no desc', + belongType: 'river', + belongId: id, }; let res = await realtimeDataListByType(params); if (res && res.code == 200) { @@ -679,8 +680,18 @@ getSampleRiverSectionData(); } }; +const riverList = ref([]); +const riverListA = ref(''); +const checkRiverlist = async val => { + let res = await riverInfoNewlist(); + riverList.value = res.data; + riverListA.value = res.data[0].id; + console.log(riverListA.value, 'res123213'); +}; + // 河道横断面分析点击 const checkRiverP = async val => { + return getRealtimedRiver(val); riverTitle.value = val; showStationRiver.value = true; let lonlat; @@ -935,6 +946,7 @@ } else if (allData.currentIndex == 5) { riverTitle.value = ''; allData.centerSearchShow = false; + checkRiverlist(); getRealtimedRiver(); getSampleDateList(); let closeCommonPopup = false;