yangjie #45

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

View File

@ -6,7 +6,7 @@ import {
SearchOutlined, SearchOutlined,
VerticalAlignBottomOutlined VerticalAlignBottomOutlined
} from '@ant-design/icons'; } from '@ant-design/icons';
import { Button, Input, message, Modal, Pagination, Progress, Table } from 'antd'; import { Button, Input, message, Modal, Pagination, Popconfirm, Progress, Table } from 'antd';
import { forwardRef, useEffect, useImperativeHandle, useState, useRef } from "react"; import { forwardRef, useEffect, useImperativeHandle, useState, useRef } from "react";
import { DeleteRoomFile, GetRoomFile, GetRoomFileDwUrl, GetRoomUpFileurl, GetRoomUserItem, PostRoomFile } from '@/api/Meeting'; import { DeleteRoomFile, GetRoomFile, GetRoomFileDwUrl, GetRoomUpFileurl, GetRoomUserItem, PostRoomFile } from '@/api/Meeting';
import axios from 'axios'; import axios from 'axios';
@ -129,10 +129,14 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
}) })
} }
}} /> }} />
{roomUserItem && role.ID.includes(roomUserItem.roleId) || roomUserItem.isRoomManager ? <ProfileOutlined title={showRowSelection ? '取消框选' : '显示框选'} onClick={() => { {roomUserItem && (role.ID.includes(roomUserItem.roleId) || roomUserItem.isRoomManager) && fileList.data.length ? <ProfileOutlined title={showRowSelection ? '取消框选' : '显示框选'} onClick={() => {
setShowRowSelection(!showRowSelection) setShowRowSelection(!showRowSelection)
}} style={{ color: showRowSelection ? '#5575F2' : 'white' }} /> : null} }} style={{ color: showRowSelection ? '#5575F2' : 'white' }} /> : null}
{showRowSelection ? <DeleteOutlined title='删除' onClick={() => { {showRowSelection && fileList.data.length && selectedRowKeys.length ?
<Popconfirm
title="提示"
description="确认删除吗?"
onConfirm={() => {
if (selectedRowKeys.length) { if (selectedRowKeys.length) {
DeleteRoomFile(selectedRowKeys).then(res => { DeleteRoomFile(selectedRowKeys).then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -150,8 +154,16 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
} else { } else {
message.error('请选择文件!') message.error('请选择文件!')
} }
}} /> : null} }}
<Button type="primary" style={{ backgroundColor: '#31353A' }} onCancel={() => {
}}
okText="确认"
cancelText="取消"
>
<DeleteOutlined title='删除' />
</Popconfirm> : null}
{roomUserItem && role.ID.includes(roomUserItem.roleId) || roomUserItem.isRoomManager ? <Button type="primary" style={{ backgroundColor: '#31353A' }}
onClick={() => { onClick={() => {
if (isUpFile) { if (isUpFile) {
message.error('文件上传中,请稍后上传。') message.error('文件上传中,请稍后上传。')
@ -211,7 +223,7 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
}; };
file.click(); file.click();
}} }}
></Button> ></Button> : null}
</div> </div>
</div> </div>
<div> <div>
@ -341,7 +353,7 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => {
...fileList, ...fileList,
pageIndex: e pageIndex: e
}) })
}} pageSize={fileList.pageSize} current={fileList.pageIndex} hideOnSinglePage={true} showSizeChanger={false}/> }} pageSize={fileList.pageSize} current={fileList.pageIndex} hideOnSinglePage={true} showSizeChanger={false} />
</div> </div>
</div> </div>
</div> </div>