修整IP管理页面的表格
This commit is contained in:
@@ -118,6 +118,7 @@ export default function ChannelPage() {
|
|||||||
const onFilter = handleSubmit(() => {
|
const onFilter = handleSubmit(() => {
|
||||||
table.pagination.onPageChange(1)
|
table.pagination.onPageChange(1)
|
||||||
})
|
})
|
||||||
|
console.log(table, "table")
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
@@ -291,56 +292,63 @@ export default function ChannelPage() {
|
|||||||
accessorFn: row => row.user?.phone || "-",
|
accessorFn: row => row.user?.phone || "-",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: "套餐号",
|
header: "套餐号/提取编号",
|
||||||
accessorKey: "resource.resource_no",
|
accessorKey: "resource.resource_no",
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const resource_no = row.original.resource?.resource_no
|
const resource_no = row.original.resource?.resource_no
|
||||||
|
const batchNo = row.original.batch_no
|
||||||
const type = row.original.resource?.type
|
const type = row.original.resource?.type
|
||||||
return (
|
return (
|
||||||
<Link
|
<div className="flex flex-col font-mono text-xs">
|
||||||
href={`./resources?resource_no=${resource_no}&type=${type}`}
|
<span>
|
||||||
target="_blank"
|
套餐号  :
|
||||||
rel="noopener noreferrer"
|
<Link
|
||||||
className="text-blue-600"
|
href={`./resources?resource_no=${resource_no}&type=${type}`}
|
||||||
>
|
target="_blank"
|
||||||
{resource_no}
|
rel="noopener noreferrer"
|
||||||
</Link>
|
className="text-blue-600"
|
||||||
|
>
|
||||||
|
{resource_no}
|
||||||
|
</Link>
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
提取编号:
|
||||||
|
<Link
|
||||||
|
href={`./batch?batch_no=${batchNo}`}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="text-blue-600"
|
||||||
|
>
|
||||||
|
{batchNo}
|
||||||
|
</Link>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: "提取编号",
|
header: "网关",
|
||||||
accessorKey: "batch_no",
|
accessorKey: "host",
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const batchNo = row.original.batch_no
|
|
||||||
return (
|
return (
|
||||||
<Link
|
<span>
|
||||||
href={`./batch?batch_no=${batchNo}`}
|
{row.original.host}:{row.original.port}
|
||||||
target="_blank"
|
</span>
|
||||||
rel="noopener noreferrer"
|
|
||||||
className="text-blue-600"
|
|
||||||
>
|
|
||||||
{batchNo}
|
|
||||||
</Link>
|
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: "节点",
|
header: "节点",
|
||||||
accessorFn: row => row.ip || row.edge_ref || row.edge_id,
|
accessorFn: row => row.edge_ref || row.ip || row.edge_id,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: "自动配置",
|
header: "地区",
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const prov = row.original.filter_prov
|
const prov = row.original.filter_prov
|
||||||
const city = row.original.filter_city
|
const city = row.original.filter_city
|
||||||
const isp = row.original.filter_isp
|
|
||||||
const parts = []
|
const parts = []
|
||||||
if (prov && prov !== "all") parts.push(prov)
|
if (prov && prov !== "all") parts.push(prov)
|
||||||
if (city && city !== "all") parts.push(city)
|
if (city && city !== "all") parts.push(city)
|
||||||
if (isp && isp !== "all") {
|
|
||||||
parts.push(ispMap[Number(isp)] || isp)
|
|
||||||
}
|
|
||||||
return (
|
return (
|
||||||
<div className="text-sm">
|
<div className="text-sm">
|
||||||
{parts.length > 0 ? parts.join(" / ") : "不限"}
|
{parts.length > 0 ? parts.join(" / ") : "不限"}
|
||||||
@@ -349,14 +357,11 @@ export default function ChannelPage() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: "网关地址",
|
header: "运营商",
|
||||||
accessorKey: "host",
|
// accessorFn: row => row.filter_isp || "",
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
return (
|
const isp = row.original.filter_isp
|
||||||
<span>
|
return ispMap[Number(isp)] || isp
|
||||||
{row.original.host}:{row.original.port}
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user