yangjie #45

Merged
yangqiang merged 19 commits from yangjie into master 2024-12-18 13:52:10 +08:00
1 changed files with 28 additions and 3 deletions
Showing only changes of commit bc78d3a692 - Show all commits

View File

@ -100,10 +100,10 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
</div> </div>
<div style={{ color: 'white' }}> <div style={{ color: 'white' }}>
<Input <Input
placeholder="搜索" placeholder="请输入文件名"
style={{ width: '200px' }} style={{ width: '200px' }}
prefix={<SearchOutlined style={{ color: 'white' }} />} prefix={<SearchOutlined style={{ color: 'white' }} />}
onChange={(e) => { onPressEnter={(e: any) => {
if (fileList.pageIndex === 1) { if (fileList.pageIndex === 1) {
setFileList({ setFileList({
...fileList, ...fileList,
@ -116,8 +116,30 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
pageIndex: 1 pageIndex: 1
}) })
} }
}} }}
onBlur={(e) => {
if (fileList.pageIndex === 1) {
setFileList({
...fileList,
keyword: e.target.value,
})
} else {
setFileList({
...fileList,
keyword: e.target.value,
pageIndex: 1
})
}
}}
suffix={
<span
style={{ color: '#47D3D0', cursor: 'pointer' }}
onClick={() => {
getRoomFile()
}}
>
</span>
}
/> />
<ReloadOutlined title='刷新' onClick={() => { <ReloadOutlined title='刷新' onClick={() => {
if (fileList.pageIndex === 1) { if (fileList.pageIndex === 1) {
@ -273,6 +295,7 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
<VerticalAlignBottomOutlined title='下载' <VerticalAlignBottomOutlined title='下载'
style={{ color: '#5575F2', cursor: 'pointer' }} style={{ color: '#5575F2', cursor: 'pointer' }}
onClick={async () => { onClick={async () => {
storage.setItem('loading', true)
GetRoomFileDwUrl(item.fileUrl, item.id).then(res => { GetRoomFileDwUrl(item.fileUrl, item.id).then(res => {
if (res.code === 200) { if (res.code === 200) {
axios({ axios({
@ -341,6 +364,8 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
}, 2000) }, 2000)
}) })
} }
}).finally(() => {
storage.setItem('loading', false)
}) })
}} /> }} />
{/* <FolderOutlined title='文件' style={{ color: '#FFA000', cursor: 'pointer', marginLeft: '10px' }} /> */} {/* <FolderOutlined title='文件' style={{ color: '#FFA000', cursor: 'pointer', marginLeft: '10px' }} /> */}