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);
+ })
+}