|
@@ -271,6 +271,7 @@ async def delete_dict_type(
|
|
|
|
|
|
@router.get('/data/list')
|
|
|
async def get_dict_data_by_type(
|
|
|
+dictLabel:str = Query(None),
|
|
|
dictType: str = Query(None, max_length=100),
|
|
|
pageNum: int = Query(1, gt=0),
|
|
|
pageSize: int = Query(10, gt=0),
|
|
@@ -287,6 +288,8 @@ async def get_dict_data_by_type(
|
|
|
# if dictType:
|
|
|
query = query.filter(SysDictData.dict_type==f'{dictType}')
|
|
|
query = query.filter(SysDictData.del_flag != '2')
|
|
|
+ if dictLabel:
|
|
|
+ query = query.filter(SysDictData.dict_label.like(f'%{dictLabel}%'))
|
|
|
|
|
|
# 计算总记录数
|
|
|
total_count = query.count()
|