|
|
@ -1,5 +1,5 @@ |
|
|
|
import React, { useState, useEffect, useMemo } from "react"; |
|
|
|
import { message } from "antd"; |
|
|
|
import { message as Message, Button } from "antd"; |
|
|
|
import { utils } from "@/config/common"; |
|
|
|
import ajax from "@/services"; |
|
|
|
import { TableModule } from "@/components"; |
|
|
@ -85,15 +85,15 @@ function PileMonitor() { |
|
|
|
dataIndex: "charge_status_text", |
|
|
|
key: "charge_status_text", |
|
|
|
align: "center", |
|
|
|
// render: (val, record) => { |
|
|
|
// return ( |
|
|
|
// <span |
|
|
|
// className={`custom-table-cell-span gun-status__${record?.muzzle_type}`} |
|
|
|
// > |
|
|
|
// {val} |
|
|
|
// </span> |
|
|
|
// ); |
|
|
|
// }, |
|
|
|
render: (val, record) => { |
|
|
|
return ( |
|
|
|
<span |
|
|
|
className={`custom-table-cell-span gun-status__${record?.charge_status}`} |
|
|
|
> |
|
|
|
{val} |
|
|
|
</span> |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "地锁状态", |
|
|
@ -119,8 +119,7 @@ function PileMonitor() { |
|
|
|
key: "operation", |
|
|
|
align: "center", |
|
|
|
render: (_, record) => { |
|
|
|
return <></>; |
|
|
|
// return <Button type="primary">操作</Button>; |
|
|
|
return <Button type="primary">操作</Button>; |
|
|
|
}, |
|
|
|
}, |
|
|
|
]; // 表头 |
|
|
@ -135,14 +134,13 @@ function PileMonitor() { |
|
|
|
setTableData(res?.data?.list ?? []); |
|
|
|
setTotal(res?.data?.total ?? 0); |
|
|
|
} else { |
|
|
|
message.error(res.message); |
|
|
|
Message.error(res.message); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.error(err); |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
}); |
|
|
|
.finally(() => {}); |
|
|
|
} |
|
|
|
|
|
|
|
// 获取统计数据 |
|
|
@ -153,7 +151,7 @@ function PileMonitor() { |
|
|
|
if (res.status === 20000) { |
|
|
|
setStatsData(res.data ?? {}); |
|
|
|
} else { |
|
|
|
message.error(res.message); |
|
|
|
Message.error(res.message); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|