flat:商圈优化,导出文件优化2

This commit is contained in:
Apcallover
2025-10-30 10:54:08 +08:00
parent de7cf14248
commit 203b7d4ef7
4 changed files with 140 additions and 91 deletions

View File

@@ -10,7 +10,13 @@ import {
} from '@/services/Management/list';
import { Button, FormInstance, message, Modal, Switch } from 'antd';
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
import { AlignLeftOutlined, BarChartOutlined, DeleteOutlined, FormOutlined, PlusOutlined } from '@ant-design/icons';
import {
AlignLeftOutlined,
BarChartOutlined,
DeleteOutlined,
FormOutlined,
PlusOutlined,
} from '@ant-design/icons';
import EditManageRow from './edit';
import { getDictValueEnum } from '@/services/system/dict';
import DictTag from '@/components/DictTag';
@@ -100,16 +106,16 @@ function ManagementList() {
align: 'center',
},
{
title: '最大最小薪资',
title: '最小薪资',
dataIndex: 'minSalary',
valueType: 'text',
align: 'center',
},
{
title: '最大薪资',
dataIndex: 'maxSalary',
valueType: 'text',
hideInSearch: true,
align: 'center',
render: (_, record) => (
<>
{record.minSalary}-{record.maxSalary}
</>
),
},
{
title: '单位名称',
@@ -179,72 +185,72 @@ function ManagementList() {
width: 300,
render: (jobId, record) => [
<div key="first-row" style={{ marginBottom: 8, display: 'flex', justifyContent: 'center' }}>
<Button
type="link"
size="small"
key="view"
icon={<AlignLeftOutlined />}
hidden={!access.hasPerms('area:business:List.view')}
onClick={() => {
setCurrentRow(record);
setModalVisible(true);
setMode('view'); // 新增状态控制模式
}}
>
</Button>
<Button
type="link"
size="small"
key="edit"
icon={<BarChartOutlined />}
hidden={!access.hasPerms('area:business:List.update')}
onClick={() => history.push(`/management/see-matching/index/${record.jobId}`)}
>
</Button>
<Button
type="link"
size="small"
key="view"
icon={<AlignLeftOutlined />}
hidden={!access.hasPerms('area:business:List.view')}
onClick={() => {
setCurrentRow(record);
setModalVisible(true);
setMode('view'); // 新增状态控制模式
}}
>
</Button>
<Button
type="link"
size="small"
key="edit"
icon={<BarChartOutlined />}
hidden={!access.hasPerms('area:business:List.update')}
onClick={() => history.push(`/management/see-matching/index/${record.jobId}`)}
>
</Button>
</div>,
<div key="second-row" style={{ display: 'flex', justifyContent: 'space-evenly'}}>
<Button
type="link"
size="small"
key="edit"
icon={<FormOutlined />}
hidden={!access.hasPerms('area:business:List.update')}
onClick={() => {
setModalVisible(true);
setCurrentRow(record);
}}
>
</Button>
<Button
type="link"
size="small"
danger
key="batchRemove"
icon={<DeleteOutlined />}
hidden={!access.hasPerms('area:subway:List')}
onClick={async () => {
Modal.confirm({
title: '删除',
content: '确定删除该项吗?',
okText: '确认',
cancelText: '取消',
onOk: async () => {
const success = await handleRemoveOne(jobId as string);
if (success) {
if (actionRef.current) {
actionRef.current.reload();
<div key="second-row" style={{ display: 'flex', justifyContent: 'space-evenly' }}>
<Button
type="link"
size="small"
key="edit"
icon={<FormOutlined />}
hidden={!access.hasPerms('area:business:List.update')}
onClick={() => {
setModalVisible(true);
setCurrentRow(record);
}}
>
</Button>
<Button
type="link"
size="small"
danger
key="batchRemove"
icon={<DeleteOutlined />}
hidden={!access.hasPerms('area:subway:List')}
onClick={async () => {
Modal.confirm({
title: '删除',
content: '确定删除该项吗?',
okText: '确认',
cancelText: '取消',
onOk: async () => {
const success = await handleRemoveOne(jobId as string);
if (success) {
if (actionRef.current) {
actionRef.current.reload();
}
}
}
},
});
}}
>
</Button>
</div>
},
});
}}
>
</Button>
</div>,
],
},
];