Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit. On branch develop Your branch is up to date with 'goflyapp/develop'. Changes to be committed: modified: zlt-business/order-center/src/main/resources/application.yml modified: zlt-gateway/sc-gateway/src/main/resources/application.yml modified: zlt-web/react-web/src/main/frontend/src/pages/device/Device/index.tsx modified: zlt-web/react-web/src/main/frontend/src/pages/orders/Qrcode/index.tsx modified: zlt-web/react-web/src/main/frontend/src/services/device/api.ts Changes not staged for commit: modified: zlt-web/react-web/src/main/frontend/config/config.ts modified: zlt-web/react-web/src/main/frontend/package.json modified: zlt-web/react-web/src/main/frontend/src/app.tsx
This commit is contained in:
@@ -65,7 +65,7 @@ tencent:
|
|||||||
play-domain: goflytec.com
|
play-domain: goflytec.com
|
||||||
app-name: live
|
app-name: live
|
||||||
key: 06b20e5b7d637c1128fa1b48ea91a13e
|
key: 06b20e5b7d637c1128fa1b48ea91a13e
|
||||||
expire-seconds: 3600
|
expire-seconds: 3600000
|
||||||
file:
|
file:
|
||||||
oss-url: goflyapp.oss-cn-beijing.aliyuncs.com
|
oss-url: goflyapp.oss-cn-beijing.aliyuncs.com
|
||||||
cdn-url: cdn.goflytec.com
|
cdn-url: cdn.goflytec.com
|
||||||
|
|||||||
@@ -144,7 +144,8 @@ zlt:
|
|||||||
/api-order/wechat/**,
|
/api-order/wechat/**,
|
||||||
/api-order/home/carousel/app,
|
/api-order/home/carousel/app,
|
||||||
/api-order/device/status,
|
/api-order/device/status,
|
||||||
/api-order/token/callback
|
/api-order/token/callback,
|
||||||
|
/api-order/live/stream-urls
|
||||||
auth:
|
auth:
|
||||||
urlPermission:
|
urlPermission:
|
||||||
#是否开启url级别权限
|
#是否开启url级别权限
|
||||||
|
|||||||
@@ -272,7 +272,20 @@ const TableList: React.FC = () => {
|
|||||||
rowKey="deviceSn"
|
rowKey="deviceSn"
|
||||||
headerTitle="设备管理"
|
headerTitle="设备管理"
|
||||||
actionRef={actionRef}
|
actionRef={actionRef}
|
||||||
request={device}
|
request={async (params, sorter, filter) => {
|
||||||
|
const res = await device({
|
||||||
|
page: params.current,
|
||||||
|
limit: params.pageSize,
|
||||||
|
searchKey: params.searchKey,
|
||||||
|
searchValue: params.searchValue,
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
data: res.data || [],
|
||||||
|
success: res.resp_code === 0,
|
||||||
|
total: res.count || 0,
|
||||||
|
};
|
||||||
|
}}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
search={false}
|
search={false}
|
||||||
params={searchParams}
|
params={searchParams}
|
||||||
|
|||||||
@@ -191,8 +191,8 @@ const TableList: React.FC = () => {
|
|||||||
const fetchDeviceList = useCallback(async () => {
|
const fetchDeviceList = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
const result = await device({
|
const result = await device({
|
||||||
current: 1,
|
page: 1,
|
||||||
pageSize: 100,
|
limit: 100,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (result?.data) {
|
if (result?.data) {
|
||||||
|
|||||||
@@ -29,32 +29,16 @@ export async function deleteWayline(id: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取设备列表
|
// 获取设备列表
|
||||||
export async function device(params?: { [key: string]: any }) {
|
export async function device(params: {
|
||||||
const { current, pageSize, ...rest } = params ?? {};
|
page?: number;
|
||||||
try {
|
limit?: number;
|
||||||
const result = await request<API.Result<DEVICE.Device[]>>('/api-device/device', {
|
searchKey?: string;
|
||||||
method: 'GET',
|
searchValue?: string;
|
||||||
params: {
|
}) {
|
||||||
page: current,
|
return request('/api-device/device', {
|
||||||
limit: pageSize,
|
method: 'GET',
|
||||||
...rest,
|
params,
|
||||||
},
|
});
|
||||||
});
|
|
||||||
|
|
||||||
// 根据实际返回的数据结构进行处理
|
|
||||||
return {
|
|
||||||
data: result.data || [], // 直接使用返回的数组
|
|
||||||
success: result.resp_code === 0,
|
|
||||||
total: result.count || 0, // 使用返回的count作为总数
|
|
||||||
};
|
|
||||||
} catch (error) {
|
|
||||||
console.error('获取设备列表失败:', error);
|
|
||||||
return {
|
|
||||||
data: [],
|
|
||||||
success: false,
|
|
||||||
total: 0,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增或更新设备
|
// 新增或更新设备
|
||||||
|
|||||||
Reference in New Issue
Block a user