|
|
|
@ -10,7 +10,7 @@ import type { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
|
|
|
|
import ProDescriptions from '@ant-design/pro-descriptions';
|
|
|
|
|
import type { FormValueType } from './components/UpdateForm';
|
|
|
|
|
import UpdateForm from './components/UpdateForm';
|
|
|
|
|
import { saveCertificate, removeCertificate, queryCertificateList } from '../service';
|
|
|
|
|
import { saveCertificate, getExaminationPersonApplyList, getAsyncOrgTree } from '../service';
|
|
|
|
|
import type { TableListItem, TableListPagination } from '../data';
|
|
|
|
|
import type { DataItem } from '@antv/data-set/lib/transform/tag-cloud';
|
|
|
|
|
|
|
|
|
@ -106,7 +106,66 @@ const CourseList: React.FC = () => {
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
hideInTable: false,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
hideInSearch: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '市',
|
|
|
|
|
dataIndex: 'city_id',
|
|
|
|
|
valueType: 'select',
|
|
|
|
|
hideInTable: false,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
hideInSearch: false,
|
|
|
|
|
request: async () => {
|
|
|
|
|
const data = await getAsyncOrgTree({
|
|
|
|
|
org_id: 100025,
|
|
|
|
|
org_type: 1,
|
|
|
|
|
get_next: 1
|
|
|
|
|
}).then();
|
|
|
|
|
const option = []
|
|
|
|
|
|
|
|
|
|
data?.map((e, i) => {
|
|
|
|
|
console.log(e, i);
|
|
|
|
|
|
|
|
|
|
option.push({ label: e.name, value: e.id })
|
|
|
|
|
})
|
|
|
|
|
console.log('city:', data);
|
|
|
|
|
|
|
|
|
|
// for (let i = 0; i < Items.length; i++) {
|
|
|
|
|
// tags.push({ label: Items[i].tag_name, value: Items[i].tag_id })
|
|
|
|
|
// }
|
|
|
|
|
return option;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '区',
|
|
|
|
|
dataIndex: 'district_id',
|
|
|
|
|
valueType: 'select',
|
|
|
|
|
hideInTable: false,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
hideInSearch: false,
|
|
|
|
|
dependencies: ['city_id'],
|
|
|
|
|
request: async (params) => {
|
|
|
|
|
console.log(params, 'params::::');
|
|
|
|
|
|
|
|
|
|
const data = await getAsyncOrgTree({
|
|
|
|
|
org_id: params.city_id,
|
|
|
|
|
org_type: 2,
|
|
|
|
|
get_next: 1
|
|
|
|
|
}).then();
|
|
|
|
|
const option = []
|
|
|
|
|
|
|
|
|
|
data?.map((e, i) => {
|
|
|
|
|
console.log(e, i);
|
|
|
|
|
|
|
|
|
|
option.push({ label: e.name, value: e.id })
|
|
|
|
|
})
|
|
|
|
|
console.log('area:', data);
|
|
|
|
|
|
|
|
|
|
// for (let i = 0; i < Items.length; i++) {
|
|
|
|
|
// tags.push({ label: Items[i].tag_name, value: Items[i].tag_id })
|
|
|
|
|
// }
|
|
|
|
|
return option;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '创建日期',
|
|
|
|
@ -259,20 +318,24 @@ const CourseList: React.FC = () => {
|
|
|
|
|
// </Button>,
|
|
|
|
|
// ]}
|
|
|
|
|
request={async (value) => {
|
|
|
|
|
console.log(value, 'form value')
|
|
|
|
|
const { create_time } = value;
|
|
|
|
|
if (create_time) {
|
|
|
|
|
value.start_time = create_time[0]
|
|
|
|
|
value.end_time = create_time[1]
|
|
|
|
|
}
|
|
|
|
|
const _data = await queryCertificateList();
|
|
|
|
|
// console.log(value, 'form value')
|
|
|
|
|
// const { create_time } = value;
|
|
|
|
|
// if (create_time) {
|
|
|
|
|
// value.start_time = create_time[0]
|
|
|
|
|
// value.end_time = create_time[1]
|
|
|
|
|
// }
|
|
|
|
|
// const _data = await getExaminationPersonApplyList({
|
|
|
|
|
// ...value,
|
|
|
|
|
// page_number: value.current,
|
|
|
|
|
// page_size: value.pageSize
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
current: _data?.pageNumber,
|
|
|
|
|
data: _data?.table_List,
|
|
|
|
|
pageSize: _data?.pageSize,
|
|
|
|
|
total: _data?.totalRow || 0,
|
|
|
|
|
};
|
|
|
|
|
// return {
|
|
|
|
|
// current: _data?.pageNumber,
|
|
|
|
|
// data: _data?.table_List,
|
|
|
|
|
// pageSize: _data?.pageSize,
|
|
|
|
|
// total: _data?.totalRow || 0,
|
|
|
|
|
// };
|
|
|
|
|
}}
|
|
|
|
|
// dataSource={list}
|
|
|
|
|
columns={columns}
|
|
|
|
@ -350,9 +413,18 @@ const CourseList: React.FC = () => {
|
|
|
|
|
>
|
|
|
|
|
<BetaSchemaForm<DataItem>
|
|
|
|
|
layout="horizontal"
|
|
|
|
|
// form={schemaForm}
|
|
|
|
|
layoutType="Form"
|
|
|
|
|
labelCol={{ span: 8 }}
|
|
|
|
|
wrapperCol={{ span: 12 }}
|
|
|
|
|
// onValuesChange={(values: any) => {
|
|
|
|
|
// console.log('values:', values);
|
|
|
|
|
// const { city_id } = values
|
|
|
|
|
// if (city_id) {
|
|
|
|
|
// schemaForm.setFieldsValue({ district_id: "" })
|
|
|
|
|
// }
|
|
|
|
|
// }}
|
|
|
|
|
|
|
|
|
|
onFinish={async (values: any) => {
|
|
|
|
|
// 表单处理
|
|
|
|
|
console.log('columns:', columns);
|