flat:商圈优化,导出文件优化
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
import React, {Fragment, useRef, useState, useEffect} from "react";
|
||||
import { useIntl, FormattedMessage, useAccess, history } from '@umijs/max';
|
||||
import {delCmsJobIds, getCmsJobList} from "@/services/Management/list";
|
||||
import { Dropdown, FormInstance, Space, Button, message, Modal } from 'antd';
|
||||
import { ActionType, FooterToolbar, PageContainer, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||
import { PlusOutlined, DeleteOutlined, FormOutlined, DownOutlined, EditOutlined } from '@ant-design/icons';
|
||||
import EditCompanyListRow from './edit'
|
||||
import React, { Fragment, useEffect, useRef, useState } from 'react';
|
||||
import { FormattedMessage, useAccess } from '@umijs/max';
|
||||
import { Button, FormInstance, message, Modal } from 'antd';
|
||||
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||
import { DeleteOutlined, FormOutlined, PlusOutlined } from '@ant-design/icons';
|
||||
import EditCompanyListRow from './edit';
|
||||
import {
|
||||
addCmsFairList,
|
||||
delCmsFairList,
|
||||
exportCmsFairList,
|
||||
getCmsFairId,
|
||||
getCmsFairList,
|
||||
putCmsFairList,
|
||||
getCmsFairId, getCmstitilelist
|
||||
} from "@/services/jobfair/list";
|
||||
import {getDictValueEnum} from "@/services/system/dict";
|
||||
import DictTag from "@/components/DictTag";
|
||||
} from '@/services/jobfair/list';
|
||||
import { getDictValueEnum } from '@/services/system/dict';
|
||||
import DictTag from '@/components/DictTag';
|
||||
|
||||
const handleRemoveOne = async (jobFairId: string) => {
|
||||
const hide = message.loading('正在删除');
|
||||
@@ -55,20 +54,17 @@ function ManagementList() {
|
||||
const formTableRef = useRef<FormInstance>();
|
||||
const actionRef = useRef<ActionType>();
|
||||
|
||||
const [currentRow, setCurrentRow] = useState<API.JobFairList.JobFairListRows>()
|
||||
const [modalVisible, setModalVisible] = useState<boolean>(false)
|
||||
const [jobFairType, setJobFairTypeEnum] = useState<any>([])
|
||||
const [currentRow, setCurrentRow] = useState<API.JobFairList.JobFairListRows>();
|
||||
const [modalVisible, setModalVisible] = useState<boolean>(false);
|
||||
const [jobFairType, setJobFairTypeEnum] = useState<any>([]);
|
||||
|
||||
useEffect(() => {
|
||||
getDictValueEnum('job_fair_type', true).then((data) => {
|
||||
setJobFairTypeEnum(data)
|
||||
setJobFairTypeEnum(data);
|
||||
});
|
||||
|
||||
}, []);
|
||||
|
||||
const editSubmit = () => {
|
||||
|
||||
}
|
||||
const editSubmit = () => {};
|
||||
|
||||
const columns: ProColumns<API.JobFairList.JobFairListRows>[] = [
|
||||
{
|
||||
@@ -84,7 +80,7 @@ function ManagementList() {
|
||||
align: 'center',
|
||||
valueEnum: jobFairType,
|
||||
render: (_, record) => {
|
||||
return (<DictTag enums={jobFairType} value={record.jobFairType} />);
|
||||
return <DictTag enums={jobFairType} value={record.jobFairType} />;
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -105,10 +101,10 @@ function ManagementList() {
|
||||
type="link"
|
||||
size="small"
|
||||
key="edit"
|
||||
icon={<FormOutlined/>}
|
||||
icon={<FormOutlined />}
|
||||
hidden={!access.hasPerms('area:business:List.update')}
|
||||
onClick={async () => {
|
||||
let resData = await getCmsFairId(jobFairId as string)
|
||||
let resData = await getCmsFairId(jobFairId as string);
|
||||
setModalVisible(true);
|
||||
setCurrentRow(resData.data);
|
||||
}}
|
||||
@@ -120,7 +116,7 @@ function ManagementList() {
|
||||
size="small"
|
||||
danger
|
||||
key="batchRemove"
|
||||
icon ={<DeleteOutlined/>}
|
||||
icon={<DeleteOutlined />}
|
||||
hidden={!access.hasPerms('area:subway:List')}
|
||||
onClick={async () => {
|
||||
Modal.confirm({
|
||||
@@ -140,10 +136,10 @@ function ManagementList() {
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
]
|
||||
}
|
||||
]
|
||||
</Button>,
|
||||
],
|
||||
},
|
||||
];
|
||||
return (
|
||||
<Fragment>
|
||||
<div style={{ width: '100%', float: 'right' }}>
|
||||
@@ -166,17 +162,17 @@ function ManagementList() {
|
||||
})
|
||||
}
|
||||
toolBarRender={() => [
|
||||
<Button
|
||||
type="primary"
|
||||
key="add"
|
||||
hidden={!access.hasPerms('manage:List:add')}
|
||||
onClick={async () => {
|
||||
setCurrentRow(undefined);
|
||||
setModalVisible(true);
|
||||
}}
|
||||
>
|
||||
<PlusOutlined /> 新建
|
||||
</Button>,
|
||||
// <Button
|
||||
// type="primary"
|
||||
// key="add"
|
||||
// hidden={!access.hasPerms('manage:List:add')}
|
||||
// onClick={async () => {
|
||||
// setCurrentRow(undefined);
|
||||
// setModalVisible(true);
|
||||
// }}
|
||||
// >
|
||||
// <PlusOutlined /> 新建
|
||||
// </Button>,
|
||||
<Button
|
||||
type="primary"
|
||||
key="export"
|
||||
@@ -197,17 +193,17 @@ function ManagementList() {
|
||||
onSubmit={async (values) => {
|
||||
let resData;
|
||||
if (values.jobFairId) {
|
||||
resData = await putCmsFairList(values)
|
||||
resData = await putCmsFairList(values);
|
||||
} else {
|
||||
resData = await addCmsFairList(values)
|
||||
resData = await addCmsFairList(values);
|
||||
}
|
||||
if (resData.code === 200) {
|
||||
setModalVisible(false);
|
||||
setCurrentRow(undefined);
|
||||
if(values.jobFairId) {
|
||||
message.success('修改成功')
|
||||
if (values.jobFairId) {
|
||||
message.success('修改成功');
|
||||
} else {
|
||||
message.success('新增成功')
|
||||
message.success('新增成功');
|
||||
}
|
||||
if (actionRef.current) {
|
||||
actionRef.current.reload();
|
||||
@@ -222,6 +218,7 @@ function ManagementList() {
|
||||
values={currentRow}
|
||||
></EditCompanyListRow>
|
||||
</Fragment>
|
||||
)
|
||||
);
|
||||
}
|
||||
export default ManagementList
|
||||
|
||||
export default ManagementList;
|
||||
|
||||
Reference in New Issue
Block a user