diff --git a/config/routes.ts b/config/routes.ts index 3e877d6..0acb6ee 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -173,7 +173,7 @@ export default [ { name: '课程类型管理', path: 'category', - // access: 'trainingClassesCategoryQuery', + access: 'trainingClassesCategoryQuery', component: './TrainingClasses/category', }, // { diff --git a/src/pages/TrainingClasses/category.tsx b/src/pages/TrainingClasses/category.tsx index 4036ea7..2ed261c 100644 --- a/src/pages/TrainingClasses/category.tsx +++ b/src/pages/TrainingClasses/category.tsx @@ -76,7 +76,7 @@ const TableList: React.FC = () => { const columns: ProColumns[] = [ { title: '课程类型', - dataIndex: 'PbcTrainingClassesType_Name', + dataIndex: 'pbcType', }, { title: '创建时间', @@ -90,7 +90,7 @@ const TableList: React.FC = () => { width: 180, render: (text, record) => ( - + - + { @@ -147,7 +147,7 @@ const TableList: React.FC = () => { > {searchText} , - + - ) : ( - - )} - + {/* + { + const success = await handleUpdateState(record.pbcId || 0, value ? 1 : 2); + + if (success) { + if (actionRef.current) { + actionRef.current.reload(); + } + } + }} + /> + */} + 编辑 ), }, @@ -180,17 +100,10 @@ const TableList: React.FC<{}> = () => { breadcrumb: {}, }} > - + columns={columns} actionRef={actionRef} - request={(param: any) => { - const queryParam = { - ...param, - startDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[0] : undefined, - endDate: param.pbcCreateAt && param.pbcCreateAt.length > 1 ? param.pbcCreateAt[1] + ' 23:59:59' : undefined - } - return fetchData(queryParam); - }} + request={fetchData} rowKey="pbcId" size="small" bordered @@ -205,7 +118,7 @@ const TableList: React.FC<{}> = () => { toolbar={{ actions: [ - + ] }}