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 http from "../http";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
|
const MEETING_UPLOAD_FLOW_TIMEOUT = 600000;
|
||||||
|
|
||||||
export interface MeetingVO {
|
export interface MeetingVO {
|
||||||
id: number;
|
id: number;
|
||||||
tenantId: number;
|
tenantId: number;
|
||||||
|
|
@ -103,7 +105,10 @@ export const getMeetingPage = (params: {
|
||||||
export const createMeeting = (data: CreateMeetingCommand) => {
|
export const createMeeting = (data: CreateMeetingCommand) => {
|
||||||
return http.post<{ code: string; data: MeetingVO; msg: string }>(
|
return http.post<{ code: string; data: MeetingVO; msg: string }>(
|
||||||
"/api/biz/meeting",
|
"/api/biz/meeting",
|
||||||
data
|
data,
|
||||||
|
{
|
||||||
|
timeout: MEETING_UPLOAD_FLOW_TIMEOUT
|
||||||
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -331,7 +336,7 @@ export const uploadAudio = (file: File, onUploadProgress?: (progressEvent: any)
|
||||||
formData,
|
formData,
|
||||||
{
|
{
|
||||||
headers: { "Content-Type": "multipart/form-data" },
|
headers: { "Content-Type": "multipart/form-data" },
|
||||||
timeout: 300000, // 5 minutes timeout for large audio files
|
timeout: MEETING_UPLOAD_FLOW_TIMEOUT,
|
||||||
onUploadProgress
|
onUploadProgress
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ export default function AppPagination(props: AppPaginationProps) {
|
||||||
showSizeChanger
|
showSizeChanger
|
||||||
showQuickJumper
|
showQuickJumper
|
||||||
showTotal={(total) => t('common.total', { total })}
|
showTotal={(total) => t('common.total', { total })}
|
||||||
pageSizeOptions={['10', '20', '50', '100']}
|
pageSizeOptions={['8','10', '20', '50', '100']}
|
||||||
size="default"
|
size="default"
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -1233,7 +1233,7 @@ const MeetingDetail: React.FC = () => {
|
||||||
placement="bottomRight"
|
placement="bottomRight"
|
||||||
overlayClassName="meeting-share-popover"
|
overlayClassName="meeting-share-popover"
|
||||||
>
|
>
|
||||||
<Button size="small" icon={<QrcodeOutlined />}>
|
<Button icon={<QrcodeOutlined />}>
|
||||||
二维码
|
二维码
|
||||||
</Button>
|
</Button>
|
||||||
</Popover>
|
</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 {
|
import {
|
||||||
PlusOutlined, DeleteOutlined, SearchOutlined, CheckCircleOutlined,
|
CalendarOutlined,
|
||||||
LoadingOutlined, UserOutlined, CalendarOutlined, PlayCircleOutlined,
|
DeleteOutlined,
|
||||||
TeamOutlined, ClockCircleOutlined, EditOutlined, RightOutlined,
|
EditOutlined,
|
||||||
SyncOutlined, InfoCircleOutlined, CloudUploadOutlined, SettingOutlined,
|
InfoCircleOutlined,
|
||||||
QuestionCircleOutlined, FileTextOutlined, CheckOutlined, RocketOutlined,
|
PauseCircleOutlined,
|
||||||
AudioOutlined, PauseCircleOutlined
|
PlusOutlined,
|
||||||
|
RightOutlined,
|
||||||
|
SearchOutlined,
|
||||||
|
SyncOutlined,
|
||||||
|
TeamOutlined,
|
||||||
|
UserOutlined
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { useNavigate, useSearchParams } from 'react-router-dom';
|
import {
|
||||||
import { usePermission } from '../../hooks/usePermission';
|
App,
|
||||||
import { getMeetingPage, deleteMeeting, MeetingVO, getMeetingProgress, MeetingProgress, createMeeting, updateMeetingParticipants, getRealtimeMeetingSessionStatus, getRealtimeMeetingSessionStatuses, RealtimeMeetingSessionStatus } from '../../api/business/meeting';
|
Avatar,
|
||||||
import { getAiModelPage, getAiModelDefault, AiModelVO } from '../../api/business/aimodel';
|
Button,
|
||||||
import { getPromptPage, PromptTemplateVO } from '../../api/business/prompt';
|
Card,
|
||||||
import { getHotWordPage, HotWordVO } from '../../api/business/hotword';
|
Empty,
|
||||||
import { listUsers } from '../../api';
|
Form,
|
||||||
import { SysUser } from '../../types';
|
Input,
|
||||||
import AppPagination from '../../components/shared/AppPagination';
|
List,
|
||||||
|
Modal,
|
||||||
|
Popconfirm,
|
||||||
|
Radio,
|
||||||
|
Select,
|
||||||
|
Skeleton,
|
||||||
|
Space,
|
||||||
|
Tag,
|
||||||
|
Tooltip,
|
||||||
|
Typography
|
||||||
|
} from 'antd';
|
||||||
import dayjs from 'dayjs';
|
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 { Text, Title } = Typography;
|
||||||
const { Option } = Select;
|
const { Option } = Select;
|
||||||
import { MeetingCreateDrawer, MeetingCreateType } from '../../components/business/MeetingCreateDrawer';
|
|
||||||
const PAUSED_DISPLAY_STATUS = 5;
|
const PAUSED_DISPLAY_STATUS = 5;
|
||||||
|
|
||||||
const applyRealtimeSessionStatus = (item: MeetingVO, sessionStatus?: RealtimeMeetingSessionStatus): MeetingVO => {
|
const applyRealtimeSessionStatus = (item: MeetingVO, sessionStatus?: RealtimeMeetingSessionStatus): MeetingVO => {
|
||||||
|
|
@ -226,7 +256,7 @@ const Meetings: React.FC = () => {
|
||||||
const [data, setData] = useState<MeetingVO[]>([]);
|
const [data, setData] = useState<MeetingVO[]>([]);
|
||||||
const [total, setTotal] = useState(0);
|
const [total, setTotal] = useState(0);
|
||||||
const [current, setCurrent] = useState(1);
|
const [current, setCurrent] = useState(1);
|
||||||
const [size, setSize] = useState(10);
|
const [size, setSize] = useState(8);
|
||||||
const [searchTitle, setSearchTitle] = useState('');
|
const [searchTitle, setSearchTitle] = useState('');
|
||||||
const [viewType, setViewType] = useState<'all' | 'created' | 'involved'>('all');
|
const [viewType, setViewType] = useState<'all' | 'created' | 'involved'>('all');
|
||||||
const [createDrawerVisible, setCreateDrawerVisible] = useState(false);
|
const [createDrawerVisible, setCreateDrawerVisible] = useState(false);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue