Fix: 仓库管理页显示网站名称 #9
|
|
@ -15,6 +15,7 @@ import {
|
||||||
} from '@ant-design/pro-components';
|
} from '@ant-design/pro-components';
|
||||||
import { App, Button, Divider, Popconfirm } from 'antd';
|
import { App, Button, Divider, Popconfirm } from 'antd';
|
||||||
import { useRef, useState } from 'react';
|
import { useRef, useState } from 'react';
|
||||||
|
import { sitecontrollerAll } from '@/servers/api/site';
|
||||||
|
|
||||||
const ListPage: React.FC = () => {
|
const ListPage: React.FC = () => {
|
||||||
const actionRef = useRef<ActionType>();
|
const actionRef = useRef<ActionType>();
|
||||||
|
|
@ -44,7 +45,15 @@ const ListPage: React.FC = () => {
|
||||||
{
|
{
|
||||||
title: '网站',
|
title: '网站',
|
||||||
dataIndex: 'siteId',
|
dataIndex: 'siteId',
|
||||||
|
valueType: 'select',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
request: async () => {
|
||||||
|
const { data = [] } = await sitecontrollerAll();
|
||||||
|
return data.map((item) => ({
|
||||||
|
label: item.siteName,
|
||||||
|
value: item.id,
|
||||||
|
}));
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '订单号',
|
title: '订单号',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue