- 在 route.ts 中添加了新的路由项,路径为 'zhdpgl/yqzl/yqdl',名称为 '园区总览-园区电力'- 在 type.ts 中添加了 PaginationResponse 接口,用于处理分页响应数据 - 在 ssjk.vue 中删除了一行多余的代码
@@ -48,6 +48,12 @@ export const routeList:RouterType[] = [
icon: 'Location',
addr: 'zhdpgl/yqzl/yqaf'
},
+ {
+ path: 'zhdpgl/yqzl/yqdl',
+ name: '园区总览-园区电力',
+ icon: 'Location',
+ addr: 'zhdpgl/yqzl/yqdl'
+ },
// {
// path: 'zhdpgl/yqzl/yqxf',
// name: '园区总览-园区消防',
@@ -2,3 +2,16 @@ export interface BaseResponse {
code: number,
msg: string
}
+
+export interface PaginationResponse<T> {
+ countId: null | number;
+ current: number;
+ maxLimit: null | number;
+ optimizeCountSql: boolean;
+ orders: object[];
+ pages: number;
+ records: T[];
+ searchCount: boolean;
+ size: number;
+ total: number;
+}
@@ -75,7 +75,6 @@ const getData = async () => {
const paramsStr = new URLSearchParams(params as never).toString()
const res = await clientPost<ChannelInfoParams, ChannelInfoResponse>('/visualization/deviceInfo/getChannelPage?' + paramsStr)
-
if (res.code === 200) {
tableData.value = res.data.pageData
total.value = res.data.totalRows