提交 6851eb63 作者: ZhangLingKun

功能:课程筛选修复

上级 a5eeddff
...@@ -4,6 +4,7 @@ export type queryCurriculumInfoListType = InterListFunction< ...@@ -4,6 +4,7 @@ export type queryCurriculumInfoListType = InterListFunction<
{ {
curriculumName?: string; curriculumName?: string;
flightSkillsId?: number; flightSkillsId?: number;
categoriesId?: number;
licenseId?: number; licenseId?: number;
regionId?: number; regionId?: number;
}, },
......
...@@ -82,7 +82,12 @@ const Index: React.FC<propsType> = (props) => { ...@@ -82,7 +82,12 @@ const Index: React.FC<propsType> = (props) => {
data.endTime = data[k][1]; data.endTime = data[k][1];
} }
}); });
props.searchData(data); // 过滤为空项
const obj = Object.fromEntries(
// 过滤为空项
Object.entries(data).filter((i) => i[1] !== '' && i[1] !== undefined && i[1] !== null),
);
props.searchData(obj);
}; };
useImperativeHandle(props.baseRef, () => ({ useImperativeHandle(props.baseRef, () => ({
getForm: () => form, getForm: () => form,
...@@ -175,11 +180,6 @@ const Index: React.FC<propsType> = (props) => { ...@@ -175,11 +180,6 @@ const Index: React.FC<propsType> = (props) => {
changeOnSelect changeOnSelect
placeholder={item.placeholder} placeholder={item.placeholder}
options={item.options} options={item.options}
fieldNames={{
label: 'name',
value: 'id',
children: 'childNodes',
}}
style={{ width: item.width ? `${item.width}px` : '180px' }} style={{ width: item.width ? `${item.width}px` : '180px' }}
/> />
) : ( ) : (
......
...@@ -186,22 +186,24 @@ const CourseManageView = () => { ...@@ -186,22 +186,24 @@ const CourseManageView = () => {
search={[ search={[
{ {
label: '课程名称', label: '课程名称',
name: 'keyword', name: 'curriculumName',
type: 'input', type: 'input',
placeholder: '请输入课程名称', placeholder: '请输入课程名称',
}, },
{ {
label: '课程类型', label: '课程类型',
name: 'companyAuthStatus', name: 'categoriesId',
type: 'Select', type: 'Cascader',
placeholder: '请选择是否认证', placeholder: '请选择课程类型',
options: [ options: curriculumSkillList,
{ value: 0, label: '未认证' },
{ value: 1, label: '已认证' },
],
}, },
]} ]}
searchData={onFinish} searchData={(e: any) => {
onFinish({
...e,
categoriesId: e.categoriesId?.at(-1),
});
}}
child={ child={
<> <>
<Button <Button
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论