You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
1 year ago
|
/*
|
||
|
* @Author: donghao donghao@supervision.ltd
|
||
|
* @Date: 2024-04-25 15:45:17
|
||
|
* @LastEditors: donghao donghao@supervision.ltd
|
||
|
* @LastEditTime: 2024-04-28 17:15:19
|
||
|
* @FilePath: \general-ai-platform-web\mock\device.ts
|
||
|
* @Description: mock设备数据
|
||
|
*/
|
||
|
import { mockGetDeviceListByGroup } from './pools/deviceData';
|
||
|
|
||
|
import { successMockApiProps } from './typing';
|
||
|
import { fetchCurrPageByList } from './utils/apiMock';
|
||
|
|
||
|
export default {
|
||
|
// 设备列表
|
||
|
'GET /api/device/listByGroup': async (req: Request, res: Response) => {
|
||
|
const { page, pageSize } = req.query;
|
||
|
const resData: successMockApiProps = {
|
||
|
...fetchCurrPageByList({
|
||
|
...mockGetDeviceListByGroup,
|
||
|
data: { ...mockGetDeviceListByGroup.data, page, pageSize: pageSize || 10 },
|
||
|
}),
|
||
|
};
|
||
|
res.json(resData);
|
||
|
},
|
||
|
// // 设备分类
|
||
|
// 'GET /api/dict/deviceType': async (req: Request, res: Response) => {
|
||
|
// const resData: successMockApiProps = {
|
||
|
// ...fetchMockSuccessFullByOther(mockGetDeviceTypeDictData),
|
||
|
// };
|
||
|
// res.json(resData);
|
||
|
// },
|
||
|
};
|