From cf2200ecaa2c1fd2ab66ebebfab52bc55a03de28 Mon Sep 17 00:00:00 2001
From: xialiang <1818147@qq.com>
Date: Thu, 10 Mar 2022 15:03:45 +0800
Subject: [PATCH] bug
---
admin/src/components/Footer/index.tsx | 34 ++--------
admin/src/pages/examination/option/index.tsx | 68 ++++++-------------
admin/src/pages/examination/service.ts | 2 +-
admin/src/pages/history/analysis/service.ts | 2 +-
admin/src/pages/training/option/index.tsx | 60 ++++++----------
web/src/components/Footer/index.tsx | 34 ++--------
.../mockExamination/chapterErrorListPaper.tsx | 28 +++++++-
.../mockExamination/chapterListPaper.tsx | 25 ++++++-
web/src/pages/mockExamination/paper/index.tsx | 41 ++++++++---
9 files changed, 138 insertions(+), 156 deletions(-)
diff --git a/admin/src/components/Footer/index.tsx b/admin/src/components/Footer/index.tsx
index ad1be5a..b39ab5f 100644
--- a/admin/src/components/Footer/index.tsx
+++ b/admin/src/components/Footer/index.tsx
@@ -1,32 +1,10 @@
-import { DefaultFooter } from '@ant-design/pro-layout';
-
export default () => {
- const defaultMessage = '东北师大理想软件股份有限公司';
- const currentYear = new Date().getFullYear();
return (
- ,
- href: 'https://github.com/ant-design/ant-design-pro',
- blankTarget: true,
- },
- {
- key: 'Ant Design',
- title: 'Ant Design',
- href: 'https://ant.design',
- blankTarget: true,
- },*/
- ]}
- />
+
+ 教育部数字化学习支撑技术工程研究中心 东北师大理想软件股份有限公司 < br />
+ 吉公网安备22010202000105号 吉ICP备13001399号-2 增值电信业务经营许可证 吉B2-20150068
+
);
};
diff --git a/admin/src/pages/examination/option/index.tsx b/admin/src/pages/examination/option/index.tsx
index 0b44417..463b734 100644
--- a/admin/src/pages/examination/option/index.tsx
+++ b/admin/src/pages/examination/option/index.tsx
@@ -95,6 +95,9 @@ const ExaminationList: React.FC = () => {
hideInTable: false,
hideInForm: false,
hideInSearch: false,
+ fieldProps: {
+ maxLength: 64
+ },
formItemProps: {
rules: [
{
@@ -145,8 +148,8 @@ const ExaminationList: React.FC = () => {
{
title: '创建时间',
dataIndex: 'create_time',
- valueType: 'dateTimeRange',
- hideInTable: true,
+ valueType: 'dateTime',
+ hideInTable: false,
hideInForm: true,
hideInSearch: false,
},
@@ -215,6 +218,9 @@ const ExaminationList: React.FC = () => {
hideInSearch: true,
hideInTable: true,
renderText: (val: string) => `${val}`,
+ fieldProps: {
+ maxLength: 3
+ },
formItemProps: {
rules: [
{
@@ -298,7 +304,7 @@ const ExaminationList: React.FC = () => {
>
{record.b_use == 1 ? 已发布 : 发布}
@@ -317,22 +323,20 @@ const ExaminationList: React.FC = () => {
record.apply_time = [record.apply_start_time, record.apply_end_time]
setCurrentRow(record);
}}
- style={{padding:'0 2px 0 0'}}
+ style={{ padding: '0 2px 0 0' }}
>
编辑
,
- ,
+ 删除
+
+ ,
{
@@ -340,7 +344,7 @@ const ExaminationList: React.FC = () => {
//setCurrentRow(record);
}}
>
- 名单
+ 查看名单
,
],
},
@@ -485,11 +489,11 @@ const ExaminationList: React.FC = () => {
{
+ schemaForm.resetFields()
handleCreateModalVisible(false);
}}
footer={null}
@@ -530,40 +534,10 @@ const ExaminationList: React.FC = () => {
await handleUpdate(params);
handleCreateModalVisible(false);
- actionRef.current?.reloadAndRest?.();
- }}
+ schemaForm.resetFields()
+ }}
- /*
- onFinish={async (values: any) => {
- // 表单处理
- console.log('columns:', columns);
- console.log('values:', values);
-
- // if (params.id) {
- // fileds = { ...fileds, id: params.id }
- // }
- // console.log(fileds, 'fileds', params);
- // // return false
- const res = await updateExamination({
- ...values,
- apply_end_time: values.apply_time[0],
- apply_start_time: values.apply_time[1],
- course_end_time: values.course_time[0],
- course_start_time: values.course_time[0],
- examination_start_time: values.examination_time[0],
- examination_end_time: values.examination_time[0],
- });
- console.log(res, 'resresresres');
-
- // // await waitTime(2000);
- // return true;
-
-
-
- }}
-
- */
submitter={{
render: (props, doms) => (
@@ -574,8 +548,6 @@ const ExaminationList: React.FC = () => {
),
}}
- // action = ''
- title="新建"
columns={columns}
/>
diff --git a/admin/src/pages/examination/service.ts b/admin/src/pages/examination/service.ts
index 1bdbe8d..6edd433 100644
--- a/admin/src/pages/examination/service.ts
+++ b/admin/src/pages/examination/service.ts
@@ -196,7 +196,7 @@ export async function getAsyncOrgTree(params: {
page_size: number;
//count: number;
}): Promise<{ data: { list: CardListItemDataType[] } }> {
- return request('dsideal_yy/org/getAsyncOrgTree', {
+ return request('/dsideal_yy/org/getAsyncOrgTree', {
params,
});
}
diff --git a/admin/src/pages/history/analysis/service.ts b/admin/src/pages/history/analysis/service.ts
index 646688c..a84f896 100644
--- a/admin/src/pages/history/analysis/service.ts
+++ b/admin/src/pages/history/analysis/service.ts
@@ -45,7 +45,7 @@ export async function getAsyncOrgTree(params: {
page_size: number;
//count: number;
}): Promise<{ data: { list: CardListItemDataType[] } }> {
- return request('dsideal_yy/org/getAsyncOrgTree', {
+ return request('/dsideal_yy/org/getAsyncOrgTree', {
params,
});
}
diff --git a/admin/src/pages/training/option/index.tsx b/admin/src/pages/training/option/index.tsx
index b1e62c0..d9e145a 100644
--- a/admin/src/pages/training/option/index.tsx
+++ b/admin/src/pages/training/option/index.tsx
@@ -1,5 +1,5 @@
import { PlusOutlined } from '@ant-design/icons';
-import { Button, message, Input, Drawer, Row, Col, Space, Modal } from 'antd';
+import { Button, message, Input, Drawer, Row, Col, Space, Modal, Popconfirm } from 'antd';
import React, { useState, useRef } from 'react';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import type { ProColumns, ActionType } from '@ant-design/pro-table';
@@ -283,36 +283,25 @@ const TableList: React.FC = () => {
key="update"
onClick={() => {
handleUpdateModalVisible(true);
- // const _record = JSON.parse(JSON.stringify(record))
- // const idsArr = _record?.org_ids?.split(",")
- // const orgName = _record.org_names != "" ? _record.org_names.split(",") : ""
- // const idsData = []
- // if (_record?.org_ids != false) {
- // idsArr.map((e, i) => {
- // idsData.push({
- // label: orgName[i], value: Number(e)
- // })
- // })
-
- // }
- // _record.org_names = idsData
- // _record.date_time = [_record.start_time, _record.end_time]
- // console.log("2323", _record);
-
setCurrentRow(record);
}}
>
编辑
,
- {
+
+
+
+ {
handleRemove([{ key: record?.train_id }]); // 调用批量删除函数(如果接口不支持批量需要在service中处理)
setSelectedRows([]);
actionRef.current?.reloadAndRest?.();
- }}>
- 删除
- ,
+ }}
+ >
+ 删除
+
+
+
],
},
];
@@ -393,7 +382,7 @@ const TableList: React.FC = () => {
>