From 424711f3c64eb98d3097512fd0e8ee73e927f0eb Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Fri, 2 Sep 2022 10:40:26 +0800 Subject: [PATCH] =?UTF-8?q?9.2=20=E5=A2=9E=E5=8A=A0=E7=94=B5=E5=AD=90?= =?UTF-8?q?=E8=AF=84=E6=A0=87=E5=AE=A4=E8=8F=9C=E5=8D=95icon,=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=9B=9E=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ElecBidEvaluation/ScreenVideoPlay.tsx | 2 +- src/layouts/BasicLayout.tsx | 107 +++++------------- .../ProjectMonitorRoom/style.less | 2 +- 3 files changed, 33 insertions(+), 78 deletions(-) diff --git a/src/components/ElecBidEvaluation/ScreenVideoPlay.tsx b/src/components/ElecBidEvaluation/ScreenVideoPlay.tsx index d6d0ed0..22a9450 100644 --- a/src/components/ElecBidEvaluation/ScreenVideoPlay.tsx +++ b/src/components/ElecBidEvaluation/ScreenVideoPlay.tsx @@ -197,7 +197,7 @@ const ScreenVideoPlay: React.FC = (props) => { var cameraIndexCode = caremaCode; //获取输入的监控点编号值,必填 var startTimeStamp = new Date(startTime?.replace('-', '/').replace('-', '/')).getTime(); //回放开始时间戳,必填 var endTimeStamp = new Date(endTime?.replace('-', '/').replace('-', '/')).getTime(); //回放结束时间戳,必填 - var recordLocation = 0; //录像存储位置:0-中心存储,1-设备存储 + var recordLocation = 1; //录像存储位置:0-中心存储,1-设备存储 var transMode = 1; //传输协议:0-UDP,1-TCP var gpuMode = 0; //是否启用GPU硬解,0-不启用,1-启用 var wndId = -1; //播放窗口序号(在2x2以上布局下可指定播放窗口) diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx index 78ab70c..6e75ec1 100644 --- a/src/layouts/BasicLayout.tsx +++ b/src/layouts/BasicLayout.tsx @@ -29,68 +29,33 @@ import { WalletOutlined, AppstoreOutlined, ShopOutlined, + FundProjectionScreenOutlined, + PlaySquareOutlined, + BankOutlined, + IdcardOutlined, } from '@ant-design/icons'; -import { getAuthority } from '@/utils/authority'; -import { JumpToOutside } from '@/utils/CommonUtils'; -const menuImgList = [ - { - key: 'HomeOutlined', - value: - }, - { - key: 'ContactsOutlined', - value: - }, - { - key: 'DesktopOutlined', - value: - }, - { - key: 'NotificationOutlined', - value: - }, - { - key: 'BookOutlined', - value: - }, - { - key: 'ProfileOutlined', - value: - }, - { - key: 'CommentOutlined', - value: - }, - { - key: 'MacCommandOutlined', - value: - }, - { - key: 'ProjectOutlined', - value: - }, - { - key: 'PartitionOutlined', - value: - }, - { - key: 'PayCircleOutlined', - value: - }, - { - key: 'WalletOutlined', - value: - }, - { - key: 'AppstoreOutlined', - value: - }, - { - key: 'ShopOutlined', - value: - }, -] +const menuIconMap = { + "HomeOutlined": , + "ContactsOutlined": , + "DesktopOutlined": , + "NotificationOutlined": , + "BookOutlined": , + "ProfileOutlined": , + "CommentOutlined": , + "MacCommandOutlined": , + "ProjectOutlined": , + "PartitionOutlined": , + "PayCircleOutlined": , + "WalletOutlined": , + "AppstoreOutlined": , + "ShopOutlined": , + "FundProjectionScreenOutlined": , + "PlaySquareOutlined": , + "BankOutlined": , + "IdcardOutlined": , +} + const noMatch = ( = (props) => { } }, []); - function menuICon(menuData: any) { - if (menuData != undefined && menuData != null && menuData.length > 0) { - let data: any[] = [...menuData] - let arr3 = data.map((item: any) => { - menuImgList.forEach((item3: any) => { - if (item.icon == item3.key) { - item.icon = item3.value - } - }) - return item - }) - return arr3 - } else { - return [] - } - } + const menuICon = (menus: any[]): any[] => + menus && menus.map(({ icon, ...item }) => ({ + ...item, + icon: icon && menuIconMap[icon as string], + })); + const handleMenuCollapse = (payload: boolean): void => { if (dispatch) { dispatch({ diff --git a/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/style.less b/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/style.less index b2b51a5..986f451 100644 --- a/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/style.less +++ b/src/pages/ElecEvaluation/MonitorScreen/ProjectMonitorRoom/style.less @@ -56,7 +56,7 @@ .screen-flex-center; flex: 1; color: #facd91; - justify-content: flex-start; + justify-content: center; } }