提交 6851eb63 作者: ZhangLingKun

功能:课程筛选修复

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