feat: manage venue booth templates in job fair admin
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled

This commit is contained in:
2026-07-22 17:06:13 +08:00
parent 48325cefa4
commit 9d1dfe962f
6 changed files with 491 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
import { useAccess, useModel } from '@umijs/max';
import { Button, message, Modal } from 'antd';
import { ActionType, PageContainer, ProColumns, ProTable } from '@ant-design/pro-components';
import { DeleteOutlined, FormOutlined, PlusOutlined } from '@ant-design/icons';
import { ApartmentOutlined, DeleteOutlined, FormOutlined, PlusOutlined } from '@ant-design/icons';
import {
addVenueInfo,
addVenueInfoDictOption,
@@ -19,6 +19,7 @@ import type {
import { getCmsLineList } from '@/services/area/subway';
import { getDictSelectOption, getDictValueEnum } from '@/services/system/dict';
import EditModal from './components/EditModal';
import VenueBoothMapModal from './components/VenueBoothMapModal';
const VENUE_TYPE_DICT = 'venue_info_type';
@@ -28,6 +29,7 @@ const VenueInfoList: React.FC = () => {
const actionRef = useRef<ActionType>();
const [modalVisible, setModalVisible] = useState(false);
const [currentRow, setCurrentRow] = useState<VenueInfoItem>();
const [templateVenue, setTemplateVenue] = useState<VenueInfoItem>();
const [venueTypeValueEnum, setVenueTypeValueEnum] = useState<Record<string, any>>({});
const [venueTypeOptions, setVenueTypeOptions] = useState<any[]>([]);
const [lineOptions, setLineOptions] = useState<any[]>([]);
@@ -153,9 +155,19 @@ const VenueInfoList: React.FC = () => {
{
title: '操作',
valueType: 'option',
width: 140,
width: 220,
fixed: 'right',
render: (_, record) => [
<Button
key="booths"
type="link"
size="small"
icon={<ApartmentOutlined />}
hidden={!access.hasPerms('cms:venueInfo:edit')}
onClick={() => setTemplateVenue(record)}
>
</Button>,
<Button
key="edit"
type="link"
@@ -240,6 +252,12 @@ const VenueInfoList: React.FC = () => {
}
}}
/>
<VenueBoothMapModal
open={!!templateVenue}
venue={templateVenue}
onCancel={() => setTemplateVenue(undefined)}
onSaved={() => actionRef.current?.reload()}
/>
</PageContainer>
);
};