|
|
|
@ -5,7 +5,7 @@ import { Button, message, Input, Drawer, Modal, Col, Row, Space, Upload, Select
|
|
|
|
|
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
|
|
|
|
|
import type { ProColumns, ActionType } from '@ant-design/pro-table';
|
|
|
|
|
import ProTable from '@ant-design/pro-table';
|
|
|
|
|
import { BetaSchemaForm, ModalForm, ProFormText, ProFormTextArea } from '@ant-design/pro-form';
|
|
|
|
|
import { BetaSchemaForm, ModalForm, ProFormInstance, ProFormText, ProFormTextArea } from '@ant-design/pro-form';
|
|
|
|
|
import type { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
|
|
|
|
import ProDescriptions from '@ant-design/pro-descriptions';
|
|
|
|
|
import type { FormValueType } from './components/UpdateForm';
|
|
|
|
@ -89,6 +89,8 @@ const CourseList: React.FC = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const actionRef = useRef<ActionType>();
|
|
|
|
|
const formRef = useRef<ProFormInstance>();
|
|
|
|
|
|
|
|
|
|
const [currentRow, setCurrentRow] = useState<TableListItem>();
|
|
|
|
|
const [selectedRowsState, setSelectedRows] = useState<TableListItem[]>([]);
|
|
|
|
|
|
|
|
|
@ -146,12 +148,16 @@ const CourseList: React.FC = () => {
|
|
|
|
|
dependencies: ['city_id'],
|
|
|
|
|
request: async (params) => {
|
|
|
|
|
console.log(params, 'params::::');
|
|
|
|
|
console.log(formRef, 'formRef::::');
|
|
|
|
|
console.log(formRef.current?.getFieldsValue(['district_id']));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const data = await getAsyncOrgTree({
|
|
|
|
|
org_id: params.city_id,
|
|
|
|
|
org_type: 2,
|
|
|
|
|
get_next: 1
|
|
|
|
|
}).then();
|
|
|
|
|
formRef.current?.setFieldsValue({district_id:{}})
|
|
|
|
|
const option = []
|
|
|
|
|
|
|
|
|
|
data?.map((e, i) => {
|
|
|
|
@ -301,6 +307,7 @@ const CourseList: React.FC = () => {
|
|
|
|
|
<ProTable<TableListItem, TableListPagination>
|
|
|
|
|
headerTitle={false}
|
|
|
|
|
actionRef={actionRef}
|
|
|
|
|
formRef={formRef}
|
|
|
|
|
rowKey="course_id"
|
|
|
|
|
options={false}
|
|
|
|
|
search={{
|
|
|
|
|