diff --git a/src/components/SharedFilesModel/index.tsx b/src/components/SharedFilesModel/index.tsx index 1c3f443..44bb73b 100644 --- a/src/components/SharedFilesModel/index.tsx +++ b/src/components/SharedFilesModel/index.tsx @@ -7,14 +7,14 @@ import { VerticalAlignBottomOutlined } from '@ant-design/icons'; import { Button, Input, message, Modal, Pagination, Progress, Table } from 'antd'; -import { forwardRef, useEffect, useImperativeHandle, useState } from "react"; +import { forwardRef, useEffect, useImperativeHandle, useState, useRef } from "react"; import { DeleteRoomFile, GetRoomFile, GetRoomFileDwUrl, GetRoomUpFileurl, GetRoomUserItem, PostRoomFile } from '@/api/Meeting'; import axios from 'axios'; import { useLocation } from 'react-router-dom'; import { storage } from '@/utils'; +import StupWizard from '../StupWizard'; const fs = require('fs').promises; const { exec } = require('child_process'); - const { Column } = Table const SharedFilesModel = forwardRef((props: any, ref: any) => { @@ -29,6 +29,7 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => { getRoomFile() } })) + const stupWizardRef = useRef(); const { state } = useLocation(); const [selectedRowKeys, setSelectedRowKeys] = useState([]); const [roomUserItem, setRoomUserItem] = useState({}) @@ -311,7 +312,11 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => { } } catch (error: any) { if (error.code === 'ENOENT') { - message.error('文件夹不存在!') + message.error({ + content:
文件夹不存在 { + stupWizardRef.current.changeModal(4) + }}>前往设置
, + }) return } else { message.error(error) @@ -324,7 +329,6 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => { }) } }) - }} /> {/* */} @@ -345,6 +349,7 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => { + ) }) diff --git a/src/components/StupWizard/index.tsx b/src/components/StupWizard/index.tsx index d7ba541..f6a7b82 100644 --- a/src/components/StupWizard/index.tsx +++ b/src/components/StupWizard/index.tsx @@ -11,7 +11,7 @@ const fs = require('fs').promises; const { exec } = require('child_process'); const StupWizard = forwardRef((props: any, ref: any) => { useImperativeHandle(ref, () => ({ - changeModal: () => { + changeModal: (index: number = 0) => { if (location.hash.indexOf('/meeting') === -1) { agora.init() } @@ -19,7 +19,7 @@ const StupWizard = forwardRef((props: any, ref: any) => { res.forEach((item: any) => { item.active = false }); - res[0].active = true; + res[index].active = true; return res }) setIsStupWizard(true) diff --git a/src/page/Home/User/index.tsx b/src/page/Home/User/index.tsx index d4326c4..22534fc 100644 --- a/src/page/Home/User/index.tsx +++ b/src/page/Home/User/index.tsx @@ -1,5 +1,5 @@ import styles from '@/page/Home/User/index.module.scss' -import { useEffect, useState } from "react"; +import { useEffect, useState, useRef } from "react"; import Operation from '@/components/Operation'; import { Button, Input, Table, Pagination, Modal, message, Select } from "antd"; import { ExclamationCircleFilled, SearchOutlined } from '@ant-design/icons'; @@ -7,11 +7,13 @@ import { GetUserList, PostUser, PutUser, DeleteUser, PutUserPwd, GetRoleDpList, import * as CryptoJS from 'crypto-js'; import ImageUrl from '@/utils/package/imageUrl'; import { storage } from '@/utils'; +import StupWizard from '@/components/StupWizard'; const { Column } = Table const { confirm } = Modal; const { exec } = require('child_process'); const fs = require('fs').promises; const User: React.FC = () => { + const stupWizardRef = useRef(); const [selectedRowKeys, setSelectedRowKeys] = useState([]); const [isCreateUser, setIsCreateUser] = useState(false); const [list, setList] = useState({ @@ -105,7 +107,11 @@ const User: React.FC = () => { }) } catch (error: any) { if (error.code === 'ENOENT') { - message.error('文件夹不存在!') + message.error({ + content:
文件夹不存在 { + stupWizardRef.current.changeModal(4) + }}>前往设置
+ }) return } else { message.error(error) @@ -507,6 +513,7 @@ const User: React.FC = () => { + ) } diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 1f019ec..c9a0a40 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -1018,7 +1018,11 @@ const Meeting: React.FC = () => { }) } catch (error: any) { if (error.code === 'ENOENT') { - message.error('文件夹不存在!') + message.error({ + content:
文件夹不存在 { + stupWizardRef.current.changeModal(3) + }}>前往设置
+ }) return } else { message.error(error) diff --git a/src/utils/styles/App.scss b/src/utils/styles/App.scss index 9aafaca..1ca5229 100644 --- a/src/utils/styles/App.scss +++ b/src/utils/styles/App.scss @@ -375,4 +375,9 @@ $pagination-hover-background-color: #5575F2; } } } +} + +// ant-message +.ant-message { + -webkit-app-region: no-drag; } \ No newline at end of file