提交 657c23a4 作者: 龚洪江

Merge branch 'develop'

...@@ -14,4 +14,4 @@ patches: ...@@ -14,4 +14,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag: 2bc3f5681467023eaf7d732d8bffde2e434fe72a newTag: 843987a0ad1fd382895fe3cccbd37490f1b36f28
...@@ -17,6 +17,7 @@ const EditableCell: React.FC< ...@@ -17,6 +17,7 @@ const EditableCell: React.FC<
EditableCellProps & { EditableCellProps & {
selectOption?: { name: string; id: number }[]; selectOption?: { name: string; id: number }[];
uploadSuccess?: (record: any, result: any) => void; uploadSuccess?: (record: any, result: any) => void;
rules?: any;
} }
> = ({ > = ({
editing, editing,
...@@ -28,6 +29,7 @@ const EditableCell: React.FC< ...@@ -28,6 +29,7 @@ const EditableCell: React.FC<
selectOption, selectOption,
uploadSuccess, uploadSuccess,
children, children,
rules,
...restProps ...restProps
}) => { }) => {
const inputNode = () => { const inputNode = () => {
...@@ -60,32 +62,10 @@ const EditableCell: React.FC< ...@@ -60,32 +62,10 @@ const EditableCell: React.FC<
return <Input placeholder={`请输入${title}`} />; return <Input placeholder={`请输入${title}`} />;
} }
}; };
const getMessage = () => {
switch (inputType) {
case 'number':
case 'text':
return `请输入${title}`;
case 'select':
return `请选择${title}`;
case 'uploader':
return `请上传${title}`;
default:
return `请输入${title}`;
}
};
return ( return (
<td {...restProps}> <td {...restProps}>
{editing ? ( {editing ? (
<Form.Item <Form.Item name={dataIndex + record.id} style={{ margin: 0 }} rules={rules}>
name={dataIndex + record.id}
style={{ margin: 0 }}
rules={[
{
required: true,
message: getMessage(),
},
]}
>
{inputNode()} {inputNode()}
</Form.Item> </Form.Item>
) : ( ) : (
......
...@@ -88,12 +88,14 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({ ...@@ -88,12 +88,14 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({
align: 'center', align: 'center',
dataIndex: 'specName', dataIndex: 'specName',
editable: true, editable: true,
rules: [{ required: true, message: '请输入选项名称' }],
}, },
{ {
title: '料号', title: '料号',
align: 'center', align: 'center',
dataIndex: 'partNo', dataIndex: 'partNo',
editable: true, editable: true,
rules: [{ required: true, message: '请输入料号' }],
}, },
{ {
title: '操作', title: '操作',
...@@ -143,6 +145,7 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({ ...@@ -143,6 +145,7 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({
dataIndex: col.dataIndex, dataIndex: col.dataIndex,
title: col.title, title: col.title,
editing: true, editing: true,
rules: col.rules,
}), }),
}; };
}); });
......
...@@ -70,7 +70,7 @@ const RichText: React.FC<PropsType> = ({ ...@@ -70,7 +70,7 @@ const RichText: React.FC<PropsType> = ({
//富文本修改 //富文本修改
const richTextChange = (editor: IDomEditor) => { const richTextChange = (editor: IDomEditor) => {
if (onChange) { if (onChange) {
onChange(editor.getHtml() || ''); onChange(editor.isEmpty() ? '' : editor.getHtml());
} }
}; };
useEffect(() => { useEffect(() => {
......
...@@ -17,7 +17,7 @@ interface selfProps { ...@@ -17,7 +17,7 @@ interface selfProps {
//上传机构请求类型 //上传机构请求类型
type insertOrgParametersType = Omit<InterReqType<insertOrgType>, 'trainingProgramsVOS'>; type insertOrgParametersType = Omit<InterReqType<insertOrgType>, 'trainingProgramsVOS'>;
const BaseInfo: FC<selfProps> = forwardRef((props, ref) => { const BaseInfo: FC<selfProps> = forwardRef((_props, ref) => {
const [baseInfoForm] = Form.useForm<insertOrgParametersType>(); const [baseInfoForm] = Form.useForm<insertOrgParametersType>();
//地图地点选择 //地图地点选择
const [selectMapShow, setSelectMapShow] = useState<boolean>(false); const [selectMapShow, setSelectMapShow] = useState<boolean>(false);
...@@ -157,11 +157,7 @@ const BaseInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -157,11 +157,7 @@ const BaseInfo: FC<selfProps> = forwardRef((props, ref) => {
<UploadOutlined /> <UploadOutlined />
</Uploader> </Uploader>
</Form.Item> </Form.Item>
<Form.Item <Form.Item label='机构副图' name='auxiliaryPicture'>
label='机构副图'
name='auxiliaryPicture'
rules={[{ required: true, message: '请上传机构副图' }]}
>
<Uploader <Uploader
fileUpload fileUpload
listType='picture-card' listType='picture-card'
...@@ -206,7 +202,7 @@ const BaseInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -206,7 +202,7 @@ const BaseInfo: FC<selfProps> = forwardRef((props, ref) => {
name='name' name='name'
rules={[{ required: true, message: '请输入机构名称' }]} rules={[{ required: true, message: '请输入机构名称' }]}
> >
<Input placeholder='请输入机构名称' maxLength={30} /> <Input placeholder='请输入机构名称' maxLength={25} />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label='机构地区' label='机构地区'
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
font-weight: bold; font-weight: bold;
margin-bottom: 10px; margin-bottom: 10px;
line-height: 20px; line-height: 20px;
&:before{
content: '*';
color: red;
}
} }
&-rich{ &-rich{
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
font-weight: bold; font-weight: bold;
margin-bottom: 10px; margin-bottom: 10px;
line-height: 20px; line-height: 20px;
&:before{
content: '*';
color: red;
}
} }
&-table{ &-table{
......
...@@ -32,7 +32,7 @@ interface selfProps { ...@@ -32,7 +32,7 @@ interface selfProps {
ref: any; ref: any;
} }
const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { const SkuInfo: FC<selfProps> = forwardRef((_props, ref) => {
const [skuForm] = Form.useForm<any>(); const [skuForm] = Form.useForm<any>();
//机型下拉列表 //机型下拉列表
const [modelsList, setModelsList] = useState<modelsListType>([]); const [modelsList, setModelsList] = useState<modelsListType>([]);
...@@ -41,11 +41,25 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -41,11 +41,25 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => {
//执照类型列表 //执照类型列表
const [typeList, setTypeList] = useState<typeListType>([]); const [typeList, setTypeList] = useState<typeListType>([]);
//价格正则
const priceValidator = (_rule: any, value: any) => {
const reg = /^\d+(\.\d{1,2})?$/;
if (reg.test(value)) {
if (value < 0 || value > 100000) {
return Promise.reject(new Error('价格大于0且小于10万'));
}
} else {
return Promise.reject(new Error('价格为数字且保留小数点后两位'));
}
return Promise.resolve();
};
const defaultColumns: (ColumnTypes[number] & { const defaultColumns: (ColumnTypes[number] & {
editable?: boolean; editable?: boolean;
dataIndex?: string; dataIndex?: string;
selectOption?: { name: string; id: number }[]; selectOption?: { name: string; id: number }[];
inputType?: string; inputType?: string;
rules?: any;
})[] = [ })[] = [
{ {
title: '序号', title: '序号',
...@@ -60,6 +74,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -60,6 +74,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => {
width: '10%', width: '10%',
inputType: 'uploader', inputType: 'uploader',
editable: true, editable: true,
rules: [{ required: true, message: '请上传培训主图' }],
}, },
{ {
title: '培训机型', title: '培训机型',
...@@ -69,6 +84,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -69,6 +84,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => {
inputType: 'select', inputType: 'select',
width: '15%', width: '15%',
selectOption: modelsList, selectOption: modelsList,
rules: [{ required: true, message: '请选择培训机型' }],
}, },
{ {
title: '培训等级', title: '培训等级',
...@@ -78,6 +94,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -78,6 +94,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => {
inputType: 'select', inputType: 'select',
width: '15%', width: '15%',
selectOption: gradeList, selectOption: gradeList,
rules: [{ required: true, message: '请选择培训等级' }],
}, },
{ {
title: '培训类型', title: '培训类型',
...@@ -87,6 +104,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -87,6 +104,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => {
inputType: 'select', inputType: 'select',
width: '15%', width: '15%',
selectOption: typeList, selectOption: typeList,
rules: [{ required: true, message: '请选择培训类型' }],
}, },
{ {
title: '培训价格', title: '培训价格',
...@@ -94,6 +112,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -94,6 +112,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => {
editable: true, editable: true,
dataIndex: 'price', dataIndex: 'price',
width: '12%', width: '12%',
rules: [{ required: true, validator: priceValidator }],
}, },
{ {
title: '操作', title: '操作',
...@@ -142,6 +161,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -142,6 +161,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => {
selectOption: col.selectOption, selectOption: col.selectOption,
inputType: col.inputType, inputType: col.inputType,
uploadSuccess: col.inputType === 'uploader' ? uploadSuccess : undefined, uploadSuccess: col.inputType === 'uploader' ? uploadSuccess : undefined,
rules: col.rules,
}), }),
}; };
}); });
...@@ -211,6 +231,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => { ...@@ -211,6 +231,7 @@ const SkuInfo: FC<selfProps> = forwardRef((props, ref) => {
setTypeList(result || []); setTypeList(result || []);
}); });
}; };
useEffect(() => { useEffect(() => {
getLicenceModelsList(); getLicenceModelsList();
getLicenceGradeList(); getLicenceGradeList();
......
...@@ -43,6 +43,9 @@ const AddOrEditInstitution = () => { ...@@ -43,6 +43,9 @@ const AddOrEditInstitution = () => {
skuRef.current.getForm().validateFields(), skuRef.current.getForm().validateFields(),
]) ])
.then((value) => { .then((value) => {
if (!introduceInfo) {
return message.warning('机构介绍不能为空');
}
const skuReqData = skuRef.current.getTableData().map((v: tableDataType) => { const skuReqData = skuRef.current.getTableData().map((v: tableDataType) => {
return Object.getOwnPropertyNames(v).reduce((pre: any, cur: string) => { return Object.getOwnPropertyNames(v).reduce((pre: any, cur: string) => {
if (Object.getOwnPropertyNames(value[1]).includes(cur + v.id)) { if (Object.getOwnPropertyNames(value[1]).includes(cur + v.id)) {
...@@ -94,7 +97,7 @@ const AddOrEditInstitution = () => { ...@@ -94,7 +97,7 @@ const AddOrEditInstitution = () => {
if (institutionDetail) { if (institutionDetail) {
baseRef.current.getForm().setFieldsValue({ baseRef.current.getForm().setFieldsValue({
mainImage: institutionDetail.mainImage, mainImage: institutionDetail.mainImage,
auxiliaryPicture: institutionDetail.auxiliaryPicture, auxiliaryPicture: institutionDetail.auxiliaryPicture || undefined,
video: institutionDetail.video, video: institutionDetail.video,
name: institutionDetail.name, name: institutionDetail.name,
region: institutionDetail.region, region: institutionDetail.region,
...@@ -117,21 +120,25 @@ const AddOrEditInstitution = () => { ...@@ -117,21 +120,25 @@ const AddOrEditInstitution = () => {
}, },
]); ]);
baseRef.current.getDefaultDataEvent().setSubImgList( baseRef.current.getDefaultDataEvent().setSubImgList(
institutionDetail.auxiliaryPicture.split(',').map((v: string) => ({ institutionDetail.auxiliaryPicture?.split(',').map((v: string) => ({
id: Math.random(), id: Math.random(),
uid: Math.random(), uid: Math.random(),
url: v, url: v,
name: 'auxiliaryPicture', name: 'auxiliaryPicture',
})), })) || [],
); );
baseRef.current.getDefaultDataEvent().setVideoList([ baseRef.current.getDefaultDataEvent().setVideoList(
institutionDetail.video
? [
{ {
id: Math.random(), id: Math.random(),
uid: Math.random(), uid: Math.random(),
url: institutionDetail.video, url: institutionDetail.video,
name: 'video', name: 'video',
}, },
]); ]
: [],
);
const programsList = institutionDetail.programsDOList.map((v) => ({ const programsList = institutionDetail.programsDOList.map((v) => ({
...v, ...v,
fileList: [ fileList: [
......
import SearchBox, { searchColumns } from '~/components/search-box'; import SearchBox, { searchColumns } from '~/components/search-box';
import { Button, message, Modal, Table, Tag } from 'antd'; import { Button, message, Modal, Table } from 'antd';
import { ColumnsType } from 'antd/es/table'; import { ColumnsType } from 'antd/es/table';
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import { PilotTrainAPI } from '~/api'; import { PilotTrainAPI } from '~/api';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { InterDataType, PaginationProps } from '~/api/interface'; import { InterDataType, InterReqType, PaginationProps } from '~/api/interface';
import { listOrgPageType } from '~/api/interface/pilotTrainType'; import {
licenceGradeListType,
licenceModelsListType,
licenceTypeListType,
listOrgPageType,
} from '~/api/interface/pilotTrainType';
import { filterObjAttr } from '~/utils';
//机构列表返回类型 //机构列表返回类型
type institutionListType = InterDataType<listOrgPageType>['list']; type institutionListType = InterDataType<listOrgPageType>['list'];
//机型下拉返回类型
type modelsListType = InterDataType<licenceModelsListType>;
//等级下拉返回类型
type gradeListType = InterDataType<licenceGradeListType>;
//执照类型返回类型
type typeListType = InterDataType<licenceTypeListType>;
//机构列表请求参数类型
type listOrgPageParametersType = InterReqType<listOrgPageType>;
const InstitutionsList = () => { const InstitutionsList = () => {
const navigate = useNavigate(); const navigate = useNavigate();
//培训类型下拉 //机型下拉列表
const [modelsList, setModelsList] = useState<modelsListType>([]);
//等级下拉列表
const [gradeList, setGradeList] = useState<gradeListType>([]);
//执照类型列表
const [typeList, setTypeList] = useState<typeListType>([]);
const search: searchColumns[] = [ const search: searchColumns[] = [
{ label: '机构名称', name: '', placeholder: '请输入机构名称', type: 'input' }, { label: '机构名称', name: 'name', placeholder: '请输入机构名称', type: 'input' },
{ label: '培训类型', name: '', placeholder: '请选择培训类型', type: 'select', options: [] }, {
{ label: '选择日期', name: '', placeholder: '请选择日期', type: 'rangePicker', options: [] }, label: '培训等级',
name: 'gradeId',
placeholder: '请选择培训等级',
type: 'select',
options: gradeList,
},
{
label: '培训机型',
name: 'modelsId',
placeholder: '请选择培训机型',
type: 'select',
options: modelsList,
},
{
label: '培训类型',
name: 'typeId',
placeholder: '请选择培训类型',
type: 'select',
options: typeList,
},
{
label: '选择日期',
name: 'time',
placeholder: '请选择日期',
type: 'rangePicker',
options: [],
},
]; ];
const tableColumns: ColumnsType<institutionListType[0]> = [ const tableColumns: ColumnsType<institutionListType[0]> = [
{ {
...@@ -36,7 +80,11 @@ const InstitutionsList = () => { ...@@ -36,7 +80,11 @@ const InstitutionsList = () => {
title: '培训类型', title: '培训类型',
align: 'center', align: 'center',
render: (_text: string, record) => render: (_text: string, record) =>
record.programsDOList.map((v) => <Tag key={v.id}>{v.typeName}</Tag>), record.programsDOList[0].gradeName +
'/' +
record.programsDOList[0].modelsName +
'/' +
record.programsDOList[0].typeName,
width: '20%', width: '20%',
}, },
{ {
...@@ -65,25 +113,28 @@ const InstitutionsList = () => { ...@@ -65,25 +113,28 @@ const InstitutionsList = () => {
pageSize: 10, pageSize: 10,
totalCount: 0, totalCount: 0,
}); });
const [query, setQuery] = useState<listOrgPageParametersType>();
const toAddInstitutions = () => { const toAddInstitutions = () => {
navigate('/pilotTraining/institutionsList/add'); navigate('/pilotTraining/institutionsList/add');
}; };
//机构列表 //机构列表
const getListOrgPage = () => { const getListOrgPage = (query?: listOrgPageParametersType) => {
PilotTrainAPI.getListOrgPage({ pageNo: pagination.pageNo, pageSize: pagination.pageSize }).then( PilotTrainAPI.getListOrgPage({
({ result }) => { pageNo: pagination.pageNo,
pageSize: pagination.pageSize,
...query,
}).then(({ result }) => {
setTableData(result.list || []); setTableData(result.list || []);
pagination.totalCount = result.totalCount; pagination.totalCount = result.totalCount;
setPagination(pagination); setPagination(pagination);
}, });
);
}; };
//分页-监听 //分页-监听
const paginationChange = (pageNo: number, pageSize: number) => { const paginationChange = (pageNo: number, pageSize: number) => {
pagination.pageNo = pageNo; pagination.pageNo = pageNo;
pagination.pageSize = pageSize; pagination.pageSize = pageSize;
getListOrgPage(); getListOrgPage(query);
}; };
//机构删除 //机构删除
const deleteInstitutionsClick = (record: institutionListType[0]) => { const deleteInstitutionsClick = (record: institutionListType[0]) => {
...@@ -107,8 +158,42 @@ const InstitutionsList = () => { ...@@ -107,8 +158,42 @@ const InstitutionsList = () => {
const editInstitutionsClick = (record: institutionListType[0]) => { const editInstitutionsClick = (record: institutionListType[0]) => {
navigate({ pathname: '/pilotTraining/institutionsList/edit', search: `id=${record.id}` }); navigate({ pathname: '/pilotTraining/institutionsList/edit', search: `id=${record.id}` });
}; };
//培训机型下拉
const getLicenceModelsList = () => {
PilotTrainAPI.getLicenceModelsList().then(({ result }) => {
setModelsList(result || []);
});
};
//培训等级下拉
const getLicenceGradeList = () => {
PilotTrainAPI.getLicenceGradeList().then(({ result }) => {
setGradeList(result || []);
});
};
//培训类型下拉
const getLicenceTypeList = () => {
PilotTrainAPI.getLicenceTypeList().then(({ result }) => {
setTypeList(result || []);
});
};
//筛选
const searchSuccess = (value: any) => {
const req = {
...filterObjAttr(value, ['time']),
startTime: value.startTime ? value.startTime.split(' ')[0] : undefined,
endTime: value.endTime ? value.endTime.split(' ')[0] : undefined,
};
setQuery(req);
pagination.pageNo = 1;
pagination.pageSize = 10;
getListOrgPage(req);
};
useEffect(() => { useEffect(() => {
getListOrgPage(); getListOrgPage();
getLicenceModelsList();
getLicenceGradeList();
getLicenceTypeList();
}, []); }, []);
return ( return (
<div className='institutions-list'> <div className='institutions-list'>
...@@ -119,11 +204,13 @@ const InstitutionsList = () => { ...@@ -119,11 +204,13 @@ const InstitutionsList = () => {
新增 新增
</Button> </Button>
} }
searchData={searchSuccess}
/> />
<Table <Table
bordered bordered
columns={tableColumns} columns={tableColumns}
dataSource={tableData} dataSource={tableData}
rowKey='id'
pagination={{ pagination={{
total: pagination.totalCount, total: pagination.totalCount,
pageSize: pagination.pageSize, pageSize: pagination.pageSize,
......
...@@ -22,7 +22,7 @@ export const authRouterList = async () => { ...@@ -22,7 +22,7 @@ export const authRouterList = async () => {
const getRouteList = (data: RouteObjectType[]) => { const getRouteList = (data: RouteObjectType[]) => {
return data.reduce((pre: RouteObjectType[], cur) => { return data.reduce((pre: RouteObjectType[], cur) => {
const Obj: RouteObjectType = { ...cur }; const Obj: RouteObjectType = { ...cur };
if (ids.includes(Obj.meta.id) || Obj.meta.hidden || Obj.path?.includes('pilotTraining')) { if (ids.includes(Obj.meta.id) || Obj.meta.hidden) {
if (Obj.children) { if (Obj.children) {
Obj.children = [...getRouteList(Obj.children)]; Obj.children = [...getRouteList(Obj.children)];
} }
......
...@@ -33,6 +33,7 @@ import { ...@@ -33,6 +33,7 @@ import {
ReadOutlined, ReadOutlined,
ThunderboltOutlined, ThunderboltOutlined,
BankOutlined, BankOutlined,
VerifiedOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore // @ts-ignore
...@@ -102,14 +103,14 @@ const CategoryDetail = React.lazy(() => import('~/pages/categoryManage/category/ ...@@ -102,14 +103,14 @@ const CategoryDetail = React.lazy(() => import('~/pages/categoryManage/category/
// 目录管理 // 目录管理
const DirectoryManage = React.lazy(() => import('~/pages/categoryManage/directoryManage')); const DirectoryManage = React.lazy(() => import('~/pages/categoryManage/directoryManage'));
// //飞手培训 //飞手培训
// const InstitutionsListView = React.lazy( const InstitutionsListView = React.lazy(
// () => import('~/pages/pilotTraining/ licensureExamination/institutionsList'), () => import('~/pages/pilotTraining/ licensureExamination/institutionsList'),
// ); );
// //机构上传 //机构上传
// const AddInstitutionsView = React.lazy( const AddInstitutionsView = React.lazy(
// () => import('~/pages/pilotTraining/ licensureExamination/addOrEditInstitution'), () => import('~/pages/pilotTraining/ licensureExamination/addOrEditInstitution'),
// ); );
// 系统管理 // 系统管理
import AccountManageView from '~/pages/systemManage/accountManage'; import AccountManageView from '~/pages/systemManage/accountManage';
...@@ -895,50 +896,50 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -895,50 +896,50 @@ export const routerList: Array<RouteObjectType> = [
// }, // },
// ], // ],
// }, // },
// { {
// path: '/pilotTraining', path: '/pilotTraining',
// element: <LayoutView />, element: <LayoutView />,
// errorElement: <ErrorPage />, errorElement: <ErrorPage />,
// meta: { meta: {
// id: 1500, id: 1600,
// icon: <BankOutlined />, icon: <BankOutlined />,
// title: '飞手培训', title: '飞手培训',
// }, },
// children: [ children: [
// { {
// path: '/pilotTraining/institutionsList', path: '/pilotTraining/institutionsList',
// element: withLoadingComponent(<InstitutionsListView />), element: withLoadingComponent(<InstitutionsListView />),
// errorElement: <ErrorPage />, errorElement: <ErrorPage />,
// meta: { meta: {
// id: 1510, id: 1610,
// title: '执照考试', title: '执照考试',
// icon: <VerifiedOutlined />, icon: <VerifiedOutlined />,
// }, },
// }, },
// { {
// path: '/pilotTraining/institutionsList/add', path: '/pilotTraining/institutionsList/add',
// element: withLoadingComponent(<AddInstitutionsView />), element: withLoadingComponent(<AddInstitutionsView />),
// errorElement: <ErrorPage />, errorElement: <ErrorPage />,
// meta: { meta: {
// id: 1520, id: 1520,
// title: '机构上传', title: '机构上传',
// icon: <UserOutlined />, icon: <UserOutlined />,
// hidden: true, hidden: true,
// }, },
// }, },
// { {
// path: '/pilotTraining/institutionsList/edit', path: '/pilotTraining/institutionsList/edit',
// element: withLoadingComponent(<AddInstitutionsView />), element: withLoadingComponent(<AddInstitutionsView />),
// errorElement: <ErrorPage />, errorElement: <ErrorPage />,
// meta: { meta: {
// id: 1530, id: 1530,
// title: '机构编辑', title: '机构编辑',
// icon: <UserOutlined />, icon: <UserOutlined />,
// hidden: true, hidden: true,
// }, },
// }, },
// ], ],
// }, },
{ {
path: '/systemManage', path: '/systemManage',
element: <LayoutView />, element: <LayoutView />,
......
// 不能输入数字,其他可输入 // 不能输入数字,其他可输入
export const exceptNumber = (val: any) => { export const exceptNumber = (val: any) => {
val.target.value = val.target.value.replace(/1?(\d|([1-9]\d+))(.\d+)?$/g, '').replace(/\s/g, ''); val.target.value = val.target.value.replace(/1?(\d|([1-9]\d+))(.\d+)?$/g, '').replace(/\s/g, '');
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论