hello'}} />
+//
+//
+// /dsideal_yy/html/down/Syzx/{uuid?.substr(0,2)}/{uuid}.jpg
+// /dsideal_yy/html/down/Material/BC/BCFFEA09-9660-9D40-8D11-EF7D7110F7A2.jpg
+// 获取文件详情(下载url,播放url) /dsideal_yy/wkds/getwkdsInfo
+//
+//
{
+// const {media: {track:[General, Video, Audio]}} = await getInfo(file)
+// console.log('General:', General)
+// console.log('Video:', Video)
+// console.log('Video:', Video.format) // AVC
+// console.log('Audio:', Audio.format) // AAC
+// /*
+// console.log('info:', media)
+// console.log('track[0]:', media.track[0])
+// console.log('track[1]:', media.track[1])
+// console.log('track[2]:', media.track[2])*/
+// }}
+// data={
+// {
+// name: '4.jpg',
+// chunk: 0,
+// chunks: 1,
+// key: 'down/Material/BC/BCFFEA09-9660-9D40-8D11-EF7D7110F7A2.jpg'
+// }
+// }
+// >
+//
+//
+//
+//
-
{
- // setCurrentRow(undefined); // 设置当前行
- handleModalVisible(false);
- }}
- footer={null}
- centered
- >
+// {
+// // setCurrentRow(undefined); // 设置当前行
+// handleModalVisible(false);
+// }}
+// footer={null}
+// centered
+// >
-
- column={2}
- /* title={currentRow?.name} */
- dataSource={currentRow}
- /*
- request={async () => ({
- data: currentRow || {},
- })}*/
- params={{
- id: currentRow?.id,
- }}
- columns={
- columns.slice(0, columns.length - 1) as ProDescriptionsItemProps[]
- }
- />
+//
+// column={2}
+// /* title={currentRow?.name} */
+// dataSource={currentRow}
+// /*
+// request={async () => ({
+// data: currentRow || {},
+// })}*/
+// params={{
+// id: currentRow?.id,
+// }}
+// columns={
+// columns.slice(0, columns.length - 1) as ProDescriptionsItemProps[]
+// }
+// />
-
-
- Delete
-
- {/*
-
-*/}
- {
- }}>
- A
- B
- C
- D
-
- {}}>rrrrr
+//
+//
+// Delete
+//
+// {/*
+//
+// */}
+//
{
+// }}>
+// A
+// B
+// C
+// D
+//
+//
{}}>rrrrr
-
{formatSeconds(timeData)}
- >
- )
-};
+//
{formatSeconds(timeData)}
+// >
+// )
+// };
diff --git a/admin/src/pages/examination/certificate/index.tsx b/admin/src/pages/examination/certificate/index.tsx
index 7560d2a..2934c9e 100644
--- a/admin/src/pages/examination/certificate/index.tsx
+++ b/admin/src/pages/examination/certificate/index.tsx
@@ -119,14 +119,16 @@ const CourseList: React.FC = () => {
renderText: (val: string) => `${val}`,
},
{
- title: '报名开始日期',
+ title: '报名日期',
dataIndex: 'apply_start_time',
valueType: 'text',
sorter: false,
hideInTable: false,
hideInForm: false,
hideInSearch: true,
- renderText: (val: string) => `${val}`,
+ render: (dom, entity) => {
+ return entity.apply_start_time + " - " + entity.apply_end_time
+ },
},
{
title: '考试时间',
@@ -136,6 +138,7 @@ const CourseList: React.FC = () => {
hideInTable: false,
hideInForm: false,
hideInSearch: false,
+ colSize: 2,
render: (dom, entity) => {
return entity.examination_start_time + " - " + entity.examination_end_time
},
@@ -176,6 +179,9 @@ const CourseList: React.FC = () => {
valueType: 'text',
hideInForm: false,
hideInSearch: false,
+ fieldProps: {
+ allowClear: false
+ },
renderFormItem: (_, { type, defaultRender, formItemProps, fieldProps, ...rest }, form) => {
if (type === 'form') {
return null;
@@ -185,6 +191,7 @@ const CourseList: React.FC = () => {
return (
// value 和 onchange 会通过 form 自动注入。
@@ -205,18 +212,36 @@ const CourseList: React.FC = () => {
valueType: 'option',
render: (_dom: any, record: React.SetStateAction
) => [
- {
history.push('/examination/certificate/person/' + record.examination_id + "/" + record.accreditation_status + "/" + encodeURIComponent(record.examination_name))
}}
+ disabled={record.status_type === 4 ? false : true}
+ >
+ 查看名单{record.status_type}
+ ,
+ ,
-
导出名单
- ,
+ ,
],
},
];
@@ -231,6 +256,7 @@ const CourseList: React.FC = () => {
options={false}
search={{
labelWidth: 120,
+ defaultCollapsed: false
}}
// toolBarRender={() => [
// ,
- {
handleRemove([{ key: record?.examination_id }], record); // 调用批量删除函数(如果接口不支持批量需要在service中处理)
setSelectedRows([]);
@@ -370,6 +380,7 @@ const ExaminationList: React.FC = () => {
options={false}
search={{
labelWidth: 120,
+ defaultCollapsed: false
}}
toolBarRender={() => [
{
delete params.course_time
delete params.examination_time
- await handleUpdate(params);
- handleCreateModalVisible(false);
- schemaForm.resetFields()
+ const success = await handleUpdate(params);
+
+ if (success) {
+ if (actionRef.current) {
+ actionRef.current.reload();
+ handleCreateModalVisible(false);
+ schemaForm.resetFields()
+ }
+ }
}}
diff --git a/admin/src/pages/examination/registration/index.tsx b/admin/src/pages/examination/registration/index.tsx
index 86b1fef..d9e0673 100644
--- a/admin/src/pages/examination/registration/index.tsx
+++ b/admin/src/pages/examination/registration/index.tsx
@@ -139,6 +139,9 @@ const RegistrationList: React.FC = () => {
hideInTable: false,
hideInForm: false,
hideInSearch: false,
+ fieldProps: {
+ allowClear: false
+ },
colSize: 1,
request: async (params) => {
@@ -148,7 +151,7 @@ const RegistrationList: React.FC = () => {
get_next: 1
});
console.log('queryCourseListByTag...', Items)
- const courses = [{ label: "全部", value: "0" }]
+ const courses = [{ label: "全部", value: 0 }]
for (let i = 0; i < Items?.length; i++) {
courses.push({ label: Items[i]?.name, value: Items[i]?.id })
}
@@ -164,9 +167,12 @@ const RegistrationList: React.FC = () => {
hideInTable: false,
hideInForm: false,
hideInSearch: false,
+ fieldProps: {
+ allowClear: false
+ },
dependencies: ['city_name'],
request: async (params) => {
- const courses = [{ label: "全部", value: "0" }]
+ const courses = [{ label: "全部", value: 0 }]
if (params.city_name) {
console.log(params, 'params')
@@ -271,7 +277,7 @@ const RegistrationList: React.FC = () => {
};
}}
// dataSource={list}
- columns={getInitialValues(columns, { city_name: cityId, area_name: areaId })}
+ columns={getInitialValues(columns, { city_name: 0, district_name: 0 })}
// rowSelection={{
// onChange: (_, selectedRows) => {
// setSelectedRows(selectedRows);
diff --git a/admin/src/pages/examinationrules/attestation/index.tsx b/admin/src/pages/examinationrules/attestation/index.tsx
index 43bd05e..c90d54e 100644
--- a/admin/src/pages/examinationrules/attestation/index.tsx
+++ b/admin/src/pages/examinationrules/attestation/index.tsx
@@ -64,7 +64,7 @@ const handleUpdate = async (fields: FormValueType, currentRow?: TableListItem) =
*
* @param selectedRows
*/
- const handleRemove = async (selectedRows: TableListItem[], currentRow) => {
+const handleRemove = async (selectedRows: TableListItem[], currentRow) => {
const hide = message.loading('正在删除');
if (!selectedRows) return true;
@@ -159,7 +159,7 @@ const ExaminationRules: React.FC = () => {
},
},
{
- title: '创建日期',
+ title: '创建时间',
dataIndex: 'create_time',
valueType: 'dateRange',
sorter: false,
@@ -229,7 +229,7 @@ const ExaminationRules: React.FC = () => {
,
{
+ onClick={() => {
handleRemove([{ key: record?.id }], record); // 调用批量删除函数(如果接口不支持批量需要在service中处理)
setSelectedRows([]);
actionRef.current?.reloadAndRest?.();
diff --git a/admin/src/pages/examinationrules/normal/index.tsx b/admin/src/pages/examinationrules/normal/index.tsx
index 867a9ef..2ba0cc0 100644
--- a/admin/src/pages/examinationrules/normal/index.tsx
+++ b/admin/src/pages/examinationrules/normal/index.tsx
@@ -44,9 +44,9 @@ const handleRemove = async (selectedRows: TableListItem[], currentRow) => {
*
* @param fields
*/
- const handleUpdate = async (fields: FormValueType, currentRow?: TableListItem) => {
+const handleUpdate = async (fields: FormValueType, currentRow?: TableListItem) => {
const hide = message.loading('正在配置');
- console.log('fields',fields)
+ console.log('fields', fields)
try {
await updateRules({
...currentRow,
@@ -93,7 +93,7 @@ const ExaminationRules: React.FC = () => {
hideInSearch: true,
},
{
- title: '考试时长',
+ title: '考试时间',
dataIndex: 'examination_time',
valueType: 'text',
sorter: false,
@@ -133,7 +133,7 @@ const ExaminationRules: React.FC = () => {
},
},
{
- title: '创建日期',
+ title: '创建时间',
dataIndex: 'create_time',
valueType: 'dateRange',
sorter: false,
@@ -186,20 +186,20 @@ const ExaminationRules: React.FC = () => {
onClick={() => {
history.push('/examinationrules/normal/step/' + record.id)
}}
- style={{padding: '0 2px 0 0'}}
+ style={{ padding: '0 2px 0 0' }}
>
编辑
- ,
+ ,
{
+ onClick={() => {
handleRemove([{ key: record?.id }], record); // 调用批量删除函数(如果接口不支持批量需要在service中处理)
setSelectedRows([]);
actionRef.current?.reloadAndRest?.();
}}
- style={{padding: '0 2px 0 0'}}
- >
+ style={{ padding: '0 2px 0 0' }}
+ >
删除
,
{
onClick={async () => {
//history.push(`/examination/option/registration/${record.examination_id}`);
//setCurrentRow(record);
- console.log('record', {...record, b_use: !record.b_use})
- await handleUpdate({b_use: record?.b_use === 0 ? 1 : 0}, record);
+ console.log('record', { ...record, b_use: !record.b_use })
+ await handleUpdate({ b_use: record?.b_use === 0 ? 1 : 0 }, record);
actionRef.current?.reloadAndRest?.();
}}
>
diff --git a/web/src/pages/dashboard/workplace/index.tsx b/web/src/pages/dashboard/workplace/index.tsx
index 05358e8..341e9c4 100644
--- a/web/src/pages/dashboard/workplace/index.tsx
+++ b/web/src/pages/dashboard/workplace/index.tsx
@@ -7,7 +7,7 @@ import { PageContainer } from '@ant-design/pro-layout';
import moment from 'moment';
import EditableLinkGroup from './components/EditableLinkGroup';
import styles from './style.less';
-import type { ActivitiesType, CurrentUser } from './data.d';
+import ProTable from '@ant-design/pro-table';
import { personLastLearning, personLearningDayStatistics, getPersonExaminationList, getExaminationList } from './service';
import cookie from 'react-cookies';
import OfflineData from './components/OfflineData';
@@ -212,7 +212,7 @@ const Workplace: FC = () => {
() => getPersonExaminationList(
{
identity_id: cookie.load('identity_id'),
- person_id: cookie.load('person_id')
+ person_id: cookie.load('person_id'),
}), {
formatResult: (result) => {
return result.table_List;
@@ -286,17 +286,48 @@ const Workplace: FC = () => {
bordered={false}
bodyStyle={{ padding: 0 }}
>
-
+
-
+
{
+ const { create_time } = value;
+ if (create_time) {
+ value.start_time = create_time[0]
+ value.end_time = create_time[1]
+ }
+ console.log('form _data', value)
+ delete value.create_time
+ const _data = await getPersonExaminationList(
+ {
+ ...value,
+ identity_id: cookie.load('identity_id'),
+ person_id: cookie.load('person_id'),
+ });
+ return {
+ current: _data?.pageNumber,
+ data: _data?.table_List,
+ pageSize: _data?.pageSize,
+ total: _data?.totalRow || 0,
+ };
+ }}
+ columns={certificateColumns}
+ rowKey="id"
+ />
+ {/* */}
diff --git a/web/src/pages/mockExamination/chapterErrorListPaper.tsx b/web/src/pages/mockExamination/chapterErrorListPaper.tsx
index 2a30b3c..ba80327 100644
--- a/web/src/pages/mockExamination/chapterErrorListPaper.tsx
+++ b/web/src/pages/mockExamination/chapterErrorListPaper.tsx
@@ -105,7 +105,7 @@ const CardList = () => {
setLastBtnShow(questionNowNum == 1 ? true : false)
setNextBtnShow(questionNowNum == questionNum ? true : false)
- }, [questionNowNum])
+ }, [questionNowNum, questionNum])
const content = (
diff --git a/web/src/pages/mockExamination/chapterListPaper.tsx b/web/src/pages/mockExamination/chapterListPaper.tsx
index 7984dbb..dc4211e 100644
--- a/web/src/pages/mockExamination/chapterListPaper.tsx
+++ b/web/src/pages/mockExamination/chapterListPaper.tsx
@@ -138,7 +138,7 @@ const CardList = () => {
useEffect(() => {
setLastBtnShow(questionNowNum == 1 ? true : false)
setNextBtnShow(questionNowNum == questionNum ? true : false)
- }, [questionNowNum])
+ }, [questionNowNum, questionNum])
const content = (
diff --git a/web/src/pages/mockExamination/paper/index.tsx b/web/src/pages/mockExamination/paper/index.tsx
index e5c697f..c8dac28 100644
--- a/web/src/pages/mockExamination/paper/index.tsx
+++ b/web/src/pages/mockExamination/paper/index.tsx
@@ -86,7 +86,7 @@ const CardList = () => {
const [lastBtnShow, setLastBtnShow] = useState(true)
- const [nextBtnShow, setNextBtnShow] = useState(false)
+ const [nextBtnShow, setNextBtnShow] = useState(true)
// 当前题号
const [questionNowNum, setQuestionNowNum] = useState(0)
@@ -236,10 +236,10 @@ const CardList = () => {
}, [questionNow]);
useEffect(() => {
- console.log(questionNowNum, questionNum);
+ console.log(questionNowNum, questionNum, 'questionNowNum');
setLastBtnShow(questionNowNum == 1 ? true : false)
setNextBtnShow(questionNowNum == questionNum ? true : false)
- }, [questionNowNum])
+ }, [questionNowNum, questionNum])
const content = (