From 2f752de3640a74ea9d546715040ec164b682ebd5 Mon Sep 17 00:00:00 2001 From: guoyue Date: Tue, 27 Sep 2022 09:28:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A5=BF=E6=B5=B7=E5=B2=B8=EF=BC=9A=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E8=AE=BE=E6=96=BD--=E8=A7=86=E9=A2=91=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E5=A2=9E=E5=8A=A0=E6=B0=B4=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/infrastructurePage.vue | 108 +++++++++++++++++++- 1 file changed, 104 insertions(+), 4 deletions(-) diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue index 822b67c6..9f8cb6ce 100644 --- a/front/src/views/home/infrastructurePage.vue +++ b/front/src/views/home/infrastructurePage.vue @@ -358,6 +358,10 @@
+
{{userInfo.usernameShow}}
+
{{userInfo.realNameShow}}
+
{{userInfo.usernameShow}}
+
{{userInfo.realNameShow}}
@@ -384,6 +388,8 @@ + + @@ -392,6 +398,10 @@
+
{{userInfo.usernameShow}}
+
{{userInfo.realNameShow}}
+
{{userInfo.usernameShow}}
+
{{userInfo.realNameShow}}

@@ -399,6 +409,7 @@
+
@@ -438,6 +449,10 @@ import { computed, } from 'vue' +import { + getUser, + getUserInfo, +} from '@/api/home' import { getCameraByParentId, getStreamByChannelCode, @@ -607,6 +622,8 @@ if (props.searchValue) { mapSearchParam.value.cameraName = props.searchValue } onMounted(() => { + handleUser() + if (jcssType.value) { tabClick(0, jcssType.value) if (jcssType.value == '视频资源') { @@ -691,9 +708,9 @@ if (whoShow1.value.itShowXiHaiAn) { // 单个预览,当前点击数据 const rowClickData = ref(null) -// 打开视频预览 todo1 +// 打开视频预览 const openVideo = (id, item) => { - if(item) { + if (item) { rowClickData.value = item; } console.log('打开视频', id) @@ -1611,8 +1628,6 @@ const onSelectChange = (record, selected, selectedRows, nativeEvent) => { ) } console.log('已选中======================>', selectedList.value) - // selectedList.value = selectedRows - // allClick.value = selectedRowKeys } const onSelectAll = (selected, selectedRows, changeRows) => { if (selected) { @@ -1677,6 +1692,23 @@ const videoShowMsg = (index) => { } message.warning(msg) } + +// 获取用户信息 todo +const userInfo = ref(null) +const handleUser = () => { + getUser().then(res => { + console.log('res-----获取用户信息------->', res); + if (res.data.code != 0) { + return message.warning(res.data.msg) + } + userInfo.value = res.data.data || {} + userInfo.value.usernameShow = '西海岸能力超市' + (userInfo.value.deptName || '') + (userInfo.value.username || ''); + userInfo.value.realNameShow = '西海岸能力超市' + (userInfo.value.deptName || '') + (userInfo.value.realName || ''); + }).catch(err => { + message.warning(err) + console.log('err----获取用户信息-------->', err); + }) +}