优化了文件不存在 可以点击前往设置
This commit is contained in:
parent
41c111ec66
commit
90a0a5f0d0
|
|
@ -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<any>();
|
||||
const { state } = useLocation();
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||
const [roomUserItem, setRoomUserItem] = useState<any>({})
|
||||
|
|
@ -311,7 +312,11 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
|
|||
}
|
||||
} catch (error: any) {
|
||||
if (error.code === 'ENOENT') {
|
||||
message.error('文件夹不存在!')
|
||||
message.error({
|
||||
content: <div>文件夹不存在 <span style={{ color: '#606fc7', cursor: 'pointer' }} onClick={() => {
|
||||
stupWizardRef.current.changeModal(4)
|
||||
}}>前往设置</span></div>,
|
||||
})
|
||||
return
|
||||
} else {
|
||||
message.error(error)
|
||||
|
|
@ -324,7 +329,6 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
|
|||
})
|
||||
}
|
||||
})
|
||||
|
||||
}} />
|
||||
{/* <FolderOutlined title='文件' style={{ color: '#FFA000', cursor: 'pointer', marginLeft: '10px' }} /> */}
|
||||
</>
|
||||
|
|
@ -345,6 +349,7 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
|
|||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
<StupWizard ref={stupWizardRef} />
|
||||
</>
|
||||
)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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<any>();
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||
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: <div>文件夹不存在 <span style={{ color: '#606fc7', cursor: 'pointer' }} onClick={() => {
|
||||
stupWizardRef.current.changeModal(4)
|
||||
}}>前往设置</span></div>
|
||||
})
|
||||
return
|
||||
} else {
|
||||
message.error(error)
|
||||
|
|
@ -507,6 +513,7 @@ const User: React.FC = () => {
|
|||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
<StupWizard ref={stupWizardRef} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1018,7 +1018,11 @@ const Meeting: React.FC = () => {
|
|||
})
|
||||
} catch (error: any) {
|
||||
if (error.code === 'ENOENT') {
|
||||
message.error('文件夹不存在!')
|
||||
message.error({
|
||||
content: <div>文件夹不存在 <span style={{ color: '#606fc7', cursor: 'pointer' }} onClick={() => {
|
||||
stupWizardRef.current.changeModal(3)
|
||||
}}>前往设置</span></div>
|
||||
})
|
||||
return
|
||||
} else {
|
||||
message.error(error)
|
||||
|
|
|
|||
|
|
@ -376,3 +376,8 @@ $pagination-hover-background-color: #5575F2;
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ant-message
|
||||
.ant-message {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
Loading…
Reference in New Issue