diff --git a/config/router.config.ts b/config/router.config.ts index 495beb8..2d88327 100644 --- a/config/router.config.ts +++ b/config/router.config.ts @@ -43,6 +43,11 @@ export default [ // path: '/Calendar', // component: './MainPage/ProjectManager/components/CalendarForm', // }, + //视频播放-视频播放列表(暂时用) + { + path: '/ElecEvaluation/Monitor/videoplay', + component: './ElecEvaluation/Monitor/RoomDetail/videoplay', + }, //富文本组件 // { // path: '/editor', diff --git a/public/Weboffice4Path.html b/public/Weboffice4Path.html index 94164a5..b7319f6 100644 --- a/public/Weboffice4Path.html +++ b/public/Weboffice4Path.html @@ -59,7 +59,7 @@ + onload="path=getQueryString('path');fileName=decodeURI(getQueryString('fileName'));fileType=getQueryString('fileType');init(path);"> + charset="utf-8"> diff --git a/src/pages/userformal/login/index.tsx b/src/pages/userformal/login/index.tsx index 6f4ed66..4ba4663 100644 --- a/src/pages/userformal/login/index.tsx +++ b/src/pages/userformal/login/index.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState, useRef } from 'react'; import { Form, Button, Input, Row, Col, Modal, Spin, message, Tabs } from 'antd'; import { UserOutlined, LockOutlined, SafetyCertificateOutlined } from '@ant-design/icons'; import './style.less'; -import { changePass } from './service'; +import { changePass, showFaceTab } from './service'; import logo from '@/images/login/logoPic.png'; import { refreshTokenApi, ZjfakeAccountLogin, ZjfakeFaceLogin } from '@/services/login'; import { history } from 'umi'; @@ -40,6 +40,7 @@ const Index: React.FC<{}> = () => { const { TabPane } = Tabs; const [submitLoading, setSubmitLoading] = useState(false); const [faceLoginDisable, setFaceLoginDisable] = useState(false); + const [faceLoginShow, setFaceLoginShow] = useState(false); const lv = useRef(); const [timerShow, setTimeShow] = useState(false); const [itemShow, setItemShow] = useState(false); @@ -496,6 +497,11 @@ const Index: React.FC<{}> = () => { } return false; } + //是否显示人脸登录 + const showFaceLogin = async () => { + const res = await showFaceTab(); + setFaceLoginShow(res?.data === 1); + } useEffect(() => { @@ -505,6 +511,7 @@ const Index: React.FC<{}> = () => { if (!allowedToFaceLogin()) { setFaceLoginDisable(true); } + showFaceLogin(); }, []); useEffect(() => { @@ -592,49 +599,51 @@ const Index: React.FC<{}> = () => { - {/* -
- + + - - } - placeholder="请输入用户名" - /> - - - - {!whetherIE.current ? () : ()} - - - - - -
-
*/} - {/* 加载摄像头 */} - {/* */} - {/* */} - {/* onClick={() => {hanleFaceSubmit(null, null);}} */} + + + } + placeholder="请输入用户名" + /> + + + + {!whetherIE.current ? () : ()} + + + + + + + + {/* 加载摄像头 */} + + + {/* onClick={() => {hanleFaceSubmit(null, null);}} */} + } diff --git a/src/pages/userformal/login/service.ts b/src/pages/userformal/login/service.ts index 48828ed..88f7353 100644 --- a/src/pages/userformal/login/service.ts +++ b/src/pages/userformal/login/service.ts @@ -17,11 +17,19 @@ export async function changePass(params: any) { */ export async function rgbToBase64(params: any) { const _body = JSON.stringify({//post请求参数 - type: 'pixel', + type: 'pixel', rgb: params.image }); return request('/api/core-service-ebtp-userinfo/outer/v1/ebtp/face/rgbArray2Base64', { method: 'post', - body:_body, + body: _body, }); +} + +/** + * 是否显示人脸识别tab + * @param params + */ +export async function showFaceTab() { + return request('/api/biz-service-ebtp-extend//v1/BizFuncSwitchConfig/bizfuncswitchconfig/getFaceRecognitionFlag'); } \ No newline at end of file diff --git a/src/pages/webOffice/weboffice0609.tsx b/src/pages/webOffice/weboffice0609.tsx index e613f7b..2a29c07 100644 --- a/src/pages/webOffice/weboffice0609.tsx +++ b/src/pages/webOffice/weboffice0609.tsx @@ -2,7 +2,7 @@ * @Author: zhoujianlong * @Date: 2021-06-09 15:29:07 * @Last Modified by: zhoujianlong - * @Last Modified time: 2022-06-24 23:26:28 + * @Last Modified time: 2023-06-21 16:36:57 */ import { Button, Modal } from 'antd'; import { LoadingOutlined } from '@ant-design/icons'; @@ -259,7 +259,7 @@ const WebOffice0609: React.FC = (props) => { } openUrl += `.html?readonly=${readOnly}&DocfileCode=${docFileCode_}&PDFfileCode=${pdfFileCode_}&HTMLfileCode=${htmlFileCode_}&savePDF=${savePDF}&saveHTML=${saveHTML}&varNtkoGUID=${window.ntkoBrowser.thisNTKOGUID}`; if (fileName != '') { - const format = fileName.replace(/\//g, "-") //格式化文件名称 + const format = encodeURI(encodeURI(fileName.replace(/\//g, "-"))) //格式化文件名称 openUrl += `&fileName=${format}` } window.ntkoBrowser.openWindow(openUrl); diff --git a/src/utils/ExtendUpload/index.tsx b/src/utils/ExtendUpload/index.tsx index 3ca96fc..3e4571b 100644 --- a/src/utils/ExtendUpload/index.tsx +++ b/src/utils/ExtendUpload/index.tsx @@ -103,9 +103,13 @@ const ExtendUpload: React.FC = (props) => { } message.success("删除成功"); } else if (file.status === 'done') { - message.success("上传成功"); + if (file?.response?.success) { + message.success("上传成功"); + } else { + message.warn(file.response.message); + } } else if (file.status === 'error') { - message.error("上传失败,请重新上传"); + message.error("上传服务错误,请稍后再试"); } //重新获取文件列表并确认是否返回文件id fileListById(returnValue)