feat: 增加会议上传超时配置并优化分页选项
- 在 `meeting.ts` 中添加 `MEETING_UPLOAD_FLOW_TIMEOUT` 配置,并应用于 `createMeeting` 和 `uploadMeeting` 请求 - 在 `AppPagination` 组件中增加 `8` 作为分页选项之一 - 优化 `Meetings.tsx` 和 `MeetingDetail.tsx` 的导入和状态初始化逻辑dev_na
parent
0960e625f9
commit
d4424a157b
|
|
@ -1,6 +1,8 @@
|
|||
import http from "../http";
|
||||
import axios from "axios";
|
||||
|
||||
const MEETING_UPLOAD_FLOW_TIMEOUT = 600000;
|
||||
|
||||
export interface MeetingVO {
|
||||
id: number;
|
||||
tenantId: number;
|
||||
|
|
@ -103,7 +105,10 @@ export const getMeetingPage = (params: {
|
|||
export const createMeeting = (data: CreateMeetingCommand) => {
|
||||
return http.post<{ code: string; data: MeetingVO; msg: string }>(
|
||||
"/api/biz/meeting",
|
||||
data
|
||||
data,
|
||||
{
|
||||
timeout: MEETING_UPLOAD_FLOW_TIMEOUT
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -329,9 +334,9 @@ export const uploadAudio = (file: File, onUploadProgress?: (progressEvent: any)
|
|||
return http.post<{ code: string; data: string; msg: string }>(
|
||||
"/api/biz/meeting/upload",
|
||||
formData,
|
||||
{
|
||||
{
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
timeout: 300000, // 5 minutes timeout for large audio files
|
||||
timeout: MEETING_UPLOAD_FLOW_TIMEOUT,
|
||||
onUploadProgress
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export default function AppPagination(props: AppPaginationProps) {
|
|||
showSizeChanger
|
||||
showQuickJumper
|
||||
showTotal={(total) => t('common.total', { total })}
|
||||
pageSizeOptions={['10', '20', '50', '100']}
|
||||
pageSizeOptions={['8','10', '20', '50', '100']}
|
||||
size="default"
|
||||
{...props}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -1233,7 +1233,7 @@ const MeetingDetail: React.FC = () => {
|
|||
placement="bottomRight"
|
||||
overlayClassName="meeting-share-popover"
|
||||
>
|
||||
<Button size="small" icon={<QrcodeOutlined />}>
|
||||
<Button icon={<QrcodeOutlined />}>
|
||||
二维码
|
||||
</Button>
|
||||
</Popover>
|
||||
|
|
|
|||
|
|
@ -1,28 +1,58 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import { Card, Button, Input, Space, Tag, Popconfirm, Typography, Row, Col, List, Badge, Empty, Skeleton, Tooltip, Radio, Pagination, Progress, Drawer, Form, DatePicker, Upload, Avatar, Divider, Switch, Select, Modal, App } from 'antd';
|
||||
import {
|
||||
PlusOutlined, DeleteOutlined, SearchOutlined, CheckCircleOutlined,
|
||||
LoadingOutlined, UserOutlined, CalendarOutlined, PlayCircleOutlined,
|
||||
TeamOutlined, ClockCircleOutlined, EditOutlined, RightOutlined,
|
||||
SyncOutlined, InfoCircleOutlined, CloudUploadOutlined, SettingOutlined,
|
||||
QuestionCircleOutlined, FileTextOutlined, CheckOutlined, RocketOutlined,
|
||||
AudioOutlined, PauseCircleOutlined
|
||||
import {
|
||||
CalendarOutlined,
|
||||
DeleteOutlined,
|
||||
EditOutlined,
|
||||
InfoCircleOutlined,
|
||||
PauseCircleOutlined,
|
||||
PlusOutlined,
|
||||
RightOutlined,
|
||||
SearchOutlined,
|
||||
SyncOutlined,
|
||||
TeamOutlined,
|
||||
UserOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { useNavigate, useSearchParams } from 'react-router-dom';
|
||||
import { usePermission } from '../../hooks/usePermission';
|
||||
import { getMeetingPage, deleteMeeting, MeetingVO, getMeetingProgress, MeetingProgress, createMeeting, updateMeetingParticipants, getRealtimeMeetingSessionStatus, getRealtimeMeetingSessionStatuses, RealtimeMeetingSessionStatus } from '../../api/business/meeting';
|
||||
import { getAiModelPage, getAiModelDefault, AiModelVO } from '../../api/business/aimodel';
|
||||
import { getPromptPage, PromptTemplateVO } from '../../api/business/prompt';
|
||||
import { getHotWordPage, HotWordVO } from '../../api/business/hotword';
|
||||
import { listUsers } from '../../api';
|
||||
import { SysUser } from '../../types';
|
||||
import AppPagination from '../../components/shared/AppPagination';
|
||||
import {
|
||||
App,
|
||||
Avatar,
|
||||
Button,
|
||||
Card,
|
||||
Empty,
|
||||
Form,
|
||||
Input,
|
||||
List,
|
||||
Modal,
|
||||
Popconfirm,
|
||||
Radio,
|
||||
Select,
|
||||
Skeleton,
|
||||
Space,
|
||||
Tag,
|
||||
Tooltip,
|
||||
Typography
|
||||
} from 'antd';
|
||||
import dayjs from 'dayjs';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {useTranslation} from 'react-i18next';
|
||||
import {useNavigate, useSearchParams} from 'react-router-dom';
|
||||
import {listUsers} from '../../api';
|
||||
import {
|
||||
deleteMeeting,
|
||||
getMeetingPage,
|
||||
getMeetingProgress,
|
||||
getRealtimeMeetingSessionStatus,
|
||||
getRealtimeMeetingSessionStatuses,
|
||||
MeetingProgress,
|
||||
MeetingVO,
|
||||
RealtimeMeetingSessionStatus,
|
||||
updateMeetingParticipants
|
||||
} from '../../api/business/meeting';
|
||||
import {MeetingCreateDrawer, MeetingCreateType} from '../../components/business/MeetingCreateDrawer';
|
||||
import AppPagination from '../../components/shared/AppPagination';
|
||||
import {usePermission} from '../../hooks/usePermission';
|
||||
import {SysUser} from '../../types';
|
||||
|
||||
const { Text, Title } = Typography;
|
||||
const { Option } = Select;
|
||||
import { MeetingCreateDrawer, MeetingCreateType } from '../../components/business/MeetingCreateDrawer';
|
||||
const PAUSED_DISPLAY_STATUS = 5;
|
||||
|
||||
const applyRealtimeSessionStatus = (item: MeetingVO, sessionStatus?: RealtimeMeetingSessionStatus): MeetingVO => {
|
||||
|
|
@ -226,7 +256,7 @@ const Meetings: React.FC = () => {
|
|||
const [data, setData] = useState<MeetingVO[]>([]);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [current, setCurrent] = useState(1);
|
||||
const [size, setSize] = useState(10);
|
||||
const [size, setSize] = useState(8);
|
||||
const [searchTitle, setSearchTitle] = useState('');
|
||||
const [viewType, setViewType] = useState<'all' | 'created' | 'involved'>('all');
|
||||
const [createDrawerVisible, setCreateDrawerVisible] = useState(false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue