format
This commit is contained in:
parent
dc0d6d5b48
commit
29054c6188
@ -38,7 +38,7 @@ export const knowledgeKeyApi = {
|
||||
},
|
||||
validDataSet: () => {
|
||||
return client.get('/knowledge/dataset/validDataSet', {});
|
||||
}
|
||||
},
|
||||
|
||||
// // 获取知识库密钥
|
||||
// getKnowledgeKey: () => {
|
||||
|
||||
@ -3,7 +3,6 @@ import client from './internal/httpClient';
|
||||
|
||||
export function textbookList(page: number, size: number, title: string) {
|
||||
return client.get('/backend/v1/jc/textbook/index', {
|
||||
// return client.get('/backend/v1/course/index', {
|
||||
page: page,
|
||||
size: size,
|
||||
title: title,
|
||||
|
||||
@ -185,4 +185,4 @@ const ExamAdministrationDetails = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default ExamAdministrationDetails
|
||||
export default ExamAdministrationDetails;
|
||||
|
||||
@ -329,7 +329,8 @@ const ExamAdministrationPage = () => {
|
||||
}*/
|
||||
// 根据不同操作类型,调用对应的后端批量接口
|
||||
switch (currentOperation) {
|
||||
case 'resetExam': { // 批量重置接口:传递 examIds
|
||||
case 'resetExam': {
|
||||
// 批量重置接口:传递 examIds
|
||||
const resResetExam = (await updateList(ids ?? [], '3', '')) as UpdateListResponse;
|
||||
if (resResetExam?.code === 0) {
|
||||
message.success(`成功重置 ${data.records.length} 名学生的考试状态`);
|
||||
|
||||
@ -369,7 +369,12 @@ const DictionaryDetailPage = () => {
|
||||
<Button onClick={enterFullscreen}>放大</Button>
|
||||
</div>
|
||||
<div className={styles.iframeContainer}>
|
||||
<iframe ref={iframeRef} src={accessUrl} className={styles.iframe} title="数字孪生程序" />
|
||||
<iframe
|
||||
ref={iframeRef}
|
||||
src={accessUrl}
|
||||
className={styles.iframe}
|
||||
title="数字孪生程序"
|
||||
/>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
@ -472,7 +477,7 @@ const DictionaryDetailPage = () => {
|
||||
right: 4,
|
||||
bottom: 4,
|
||||
borderRadius: 8,
|
||||
overflow: 'hidden'
|
||||
overflow: 'hidden',
|
||||
}}
|
||||
onError={(error) => handleVideoError(error, item)}
|
||||
onReady={() => handleVideoReady(item)}
|
||||
@ -491,7 +496,7 @@ const DictionaryDetailPage = () => {
|
||||
justifyContent: 'center',
|
||||
backgroundColor: '#f0f0f0',
|
||||
color: '#666',
|
||||
borderRadius: 8
|
||||
borderRadius: 8,
|
||||
}}
|
||||
>
|
||||
视频无法加载
|
||||
@ -511,7 +516,7 @@ const DictionaryDetailPage = () => {
|
||||
justifyContent: 'center',
|
||||
backgroundColor: '#f0f0f0',
|
||||
color: '#666',
|
||||
borderRadius: 8
|
||||
borderRadius: 8,
|
||||
}}
|
||||
>
|
||||
无视频源
|
||||
|
||||
@ -38,7 +38,7 @@ import defaultThumb2 from '../../assets/thumb/thumb2.png';
|
||||
import defaultThumb3 from '../../assets/thumb/thumb3.png';
|
||||
import { FileUploader } from '../../compenents/uploadFile';
|
||||
import { TreeAttachments } from '../offline-course/compenents/attachments';
|
||||
import {getResourceUrl} from "../../api/resource";
|
||||
import { getResourceUrl } from '../../api/resource';
|
||||
|
||||
//搜索框
|
||||
type SearchProps = GetProps<typeof Input.Search>;
|
||||
@ -356,7 +356,7 @@ const Experiment = () => {
|
||||
}
|
||||
// 修复拼写错误并添加空值判断
|
||||
if (res.data.labCourseImage) {
|
||||
getImageUrl(res.data.labCourseImage)
|
||||
getImageUrl(res.data.labCourseImage);
|
||||
}
|
||||
setSelectedId(res.data.id);
|
||||
// 打开弹窗
|
||||
|
||||
@ -11,7 +11,6 @@ const HomePage = () => {
|
||||
return (
|
||||
<>
|
||||
<div className={styles['layout-wrap']}>
|
||||
|
||||
<div className={styles['left-menu']}>
|
||||
<LeftMenu />
|
||||
</div>
|
||||
|
||||
@ -81,8 +81,7 @@ const formatDate = (value?: string | number | null): string => {
|
||||
return '';
|
||||
}
|
||||
|
||||
const date =
|
||||
value.toString().length === 10 ? new Date(value * 1000) : new Date(value);
|
||||
const date = value.toString().length === 10 ? new Date(value * 1000) : new Date(value);
|
||||
if (Number.isNaN(date.getTime())) {
|
||||
return '';
|
||||
}
|
||||
@ -106,8 +105,7 @@ const normalizeListResponse = (payload: any) => {
|
||||
root?.items,
|
||||
Array.isArray(root) ? root : null,
|
||||
];
|
||||
const list =
|
||||
listCandidates.find((candidate) => Array.isArray(candidate)) ?? [];
|
||||
const list = listCandidates.find((candidate) => Array.isArray(candidate)) ?? [];
|
||||
|
||||
const total =
|
||||
root?.total ??
|
||||
@ -155,9 +153,7 @@ const ResourceLibraryReviewPage = () => {
|
||||
});
|
||||
|
||||
const [growthTrend, setGrowthTrend] = useState<GrowthRecord[]>([]);
|
||||
const [distributionData, setDistributionData] = useState<
|
||||
{ value: number; name: string }[]
|
||||
>([]);
|
||||
const [distributionData, setDistributionData] = useState<{ value: number; name: string }[]>([]);
|
||||
|
||||
const [modalVisible, setModalVisible] = useState(false);
|
||||
const [selectedQuestion, setSelectedQuestion] = useState<QuestionRecord | null>(null);
|
||||
@ -320,9 +316,7 @@ const ResourceLibraryReviewPage = () => {
|
||||
});
|
||||
const filtered =
|
||||
kmType !== undefined
|
||||
? normalizedList.filter(
|
||||
(item) => Number(item?.kmType) === Number(kmType)
|
||||
)
|
||||
? normalizedList.filter((item) => Number(item?.kmType) === Number(kmType))
|
||||
: normalizedList;
|
||||
setQuestionList(filtered);
|
||||
if (kmType !== undefined && filtered.length !== list.length) {
|
||||
@ -486,15 +480,10 @@ const ResourceLibraryReviewPage = () => {
|
||||
<div
|
||||
className={styles['htr-stat-trend']}
|
||||
style={{
|
||||
color:
|
||||
statistics.kmTypeReviewGrowthRate >= 0 ? '#52c41a' : '#ff4d4f',
|
||||
color: statistics.kmTypeReviewGrowthRate >= 0 ? '#52c41a' : '#ff4d4f',
|
||||
}}
|
||||
>
|
||||
{statistics.kmTypeReviewGrowthRate >= 0 ? (
|
||||
<RiseOutlined />
|
||||
) : (
|
||||
<FallOutlined />
|
||||
)}
|
||||
{statistics.kmTypeReviewGrowthRate >= 0 ? <RiseOutlined /> : <FallOutlined />}
|
||||
<span>
|
||||
{statistics.kmTypeReviewGrowthRate >= 0 ? '较昨日增长' : '较昨日下降'}{' '}
|
||||
{Math.abs(statistics.kmTypeReviewGrowthRate)}%
|
||||
@ -568,8 +557,7 @@ const ResourceLibraryReviewPage = () => {
|
||||
<div
|
||||
className={styles['htr-stat-trend']}
|
||||
style={{
|
||||
color:
|
||||
statistics.kmQueryDuplicateRateGrowth >= 0 ? '#52c41a' : '#ff4d4f',
|
||||
color: statistics.kmQueryDuplicateRateGrowth >= 0 ? '#52c41a' : '#ff4d4f',
|
||||
}}
|
||||
>
|
||||
{statistics.kmQueryDuplicateRateGrowth >= 0 ? (
|
||||
@ -636,7 +624,9 @@ const ResourceLibraryReviewPage = () => {
|
||||
<Button
|
||||
type="primary"
|
||||
icon={<SearchOutlined />}
|
||||
onClick={() => fetchQuestionList(1, searchKeyword, statusFilter, experimentTypeFilter)}
|
||||
onClick={() =>
|
||||
fetchQuestionList(1, searchKeyword, statusFilter, experimentTypeFilter)
|
||||
}
|
||||
>
|
||||
搜索
|
||||
</Button>
|
||||
@ -819,12 +809,7 @@ const ResourceLibraryReviewPage = () => {
|
||||
>
|
||||
拒绝
|
||||
</Button>,
|
||||
<Button
|
||||
key="submit"
|
||||
type="primary"
|
||||
onClick={handleModalOk}
|
||||
loading={modalSubmitting}
|
||||
>
|
||||
<Button key="submit" type="primary" onClick={handleModalOk} loading={modalSubmitting}>
|
||||
通过并加入知识库
|
||||
</Button>,
|
||||
]}
|
||||
@ -845,7 +830,9 @@ const ResourceLibraryReviewPage = () => {
|
||||
<div className={styles['htr-modal-info-item']}>
|
||||
<Text strong>提问人</Text>
|
||||
<Space>
|
||||
<Avatar>{selectedQuestion.kmUser ? selectedQuestion.kmUser.charAt(0) : ''}</Avatar>
|
||||
<Avatar>
|
||||
{selectedQuestion.kmUser ? selectedQuestion.kmUser.charAt(0) : ''}
|
||||
</Avatar>
|
||||
<div>{selectedQuestion.kmUser || '匿名用户'}</div>
|
||||
</Space>
|
||||
</div>
|
||||
@ -915,4 +902,3 @@ const ResourceLibraryReviewPage = () => {
|
||||
};
|
||||
|
||||
export default ResourceLibraryReviewPage;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user