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 @@