提交 7b351547 作者: 龚洪江

功能:飞手中心,实名认证权限添加

上级 bb8031a1
...@@ -16,6 +16,33 @@ export type listPublishPageType = InterItemFunction< ...@@ -16,6 +16,33 @@ export type listPublishPageType = InterItemFunction<
export type requirementsListType = InterFunction<any, { id: number; typeName: string }[]>; export type requirementsListType = InterFunction<any, { id: number; typeName: string }[]>;
//需求-强制删除 //需求-强制删除
export type deleteRequirementsType = InterFunction<{ requirementsInfoId: number }, any>; export type deleteRequirementsType = InterFunction<{ requirementsInfoId: number }, any>;
//需求-详情
export type backDetailPublishType = InterFunction<
{ id: number },
{
cityCode: number;
districtCode: number;
id: number;
latitude: number;
longitude: number;
orderNumber: string;
paramMoney: number;
provinceCode: number;
publishAccountId: number;
publishName: string;
publishPhone: number;
publisherNumber: string;
requireDescription: string;
requireUrl: string;
requirementTypeId: number;
solved: boolean;
taskAddress: string;
taskEndTime: string;
taskStartTime: string;
taskTitle: string;
requirementTypeName: string;
}
>;
// 查询招标快讯列表-分页 // 查询招标快讯列表-分页
export type releaseTenderNews = InterListFunction< export type releaseTenderNews = InterListFunction<
......
...@@ -18,6 +18,7 @@ import { ...@@ -18,6 +18,7 @@ import {
industryCaseDeleteDetails, industryCaseDeleteDetails,
deleteIndustryNewsType, deleteIndustryNewsType,
deleteRequirementsType, deleteRequirementsType,
backDetailPublishType,
} from '~/api/interface/resourceManageType'; } from '~/api/interface/resourceManageType';
import axios from '../request'; import axios from '../request';
...@@ -31,6 +32,9 @@ export class ResourceManageAPI { ...@@ -31,6 +32,9 @@ export class ResourceManageAPI {
//需求-强制删除 //需求-强制删除
static deleteRequirement: deleteRequirementsType = (params) => static deleteRequirement: deleteRequirementsType = (params) =>
axios.get('/release/requirements/deleteRequire', { params }); axios.get('/release/requirements/deleteRequire', { params });
//需求-详情
static getDetailPublish: backDetailPublishType = (params) =>
axios.get('/release/requirements/backDetailPublish', { params });
// 查询招标快讯列表-分页 // 查询招标快讯列表-分页
static releaseTenderNews: releaseTenderNews = (params) => static releaseTenderNews: releaseTenderNews = (params) =>
......
...@@ -33,8 +33,17 @@ const ServiceCategoryList = () => { ...@@ -33,8 +33,17 @@ const ServiceCategoryList = () => {
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
render: () => (
<>
<Button type='link'>新增子分类</Button>
<Button type='link'>编辑</Button>
<Button type='link'>删除</Button>
</>
),
}, },
]; ];
const [tableData, setTableData] = useState<any>([{ id: 1 }]);
const [addOrEditModalShow, setAddOrEditModalShow] = useState<boolean>(false); const [addOrEditModalShow, setAddOrEditModalShow] = useState<boolean>(false);
//新增分类弹窗 //新增分类弹窗
...@@ -62,7 +71,7 @@ const ServiceCategoryList = () => { ...@@ -62,7 +71,7 @@ const ServiceCategoryList = () => {
<Button icon={<ArrowUpOutlined />} style={{ marginRight: '10px' }} type='primary'></Button> <Button icon={<ArrowUpOutlined />} style={{ marginRight: '10px' }} type='primary'></Button>
<Button icon={<ArrowDownOutlined />} type='primary'></Button> <Button icon={<ArrowDownOutlined />} type='primary'></Button>
</div> </div>
<Table columns={tableColumns} bordered /> <Table columns={tableColumns} bordered rowKey='id' />
<AddOrEditModal <AddOrEditModal
open={addOrEditModalShow} open={addOrEditModalShow}
onOk={addOrEditModalOk} onOk={addOrEditModalOk}
......
...@@ -57,9 +57,19 @@ const CustomVerification = () => { ...@@ -57,9 +57,19 @@ const CustomVerification = () => {
width: '20%', width: '20%',
ellipsis: true, ellipsis: true,
render: (text: string, record) => ( render: (text: string, record) => (
<Button type='link' onClick={() => remarkModalShowClick(record)}> <div
onClick={() => remarkModalShowClick(record)}
style={{
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
width: '100%',
overflow: 'hidden',
cursor: 'pointer',
color: '#1677ff',
}}
>
{text || '--'} {text || '--'}
</Button> </div>
), ),
}, },
{ {
......
...@@ -73,6 +73,7 @@ const FlyerList = () => { ...@@ -73,6 +73,7 @@ const FlyerList = () => {
title: '能力认证', title: '能力认证',
align: 'center', align: 'center',
dataIndex: 'pilotAbility', dataIndex: 'pilotAbility',
width: '20%',
render: (text: flyerListType[0]['pilotAbility']) => render: (text: flyerListType[0]['pilotAbility']) =>
text ? text.map((v) => <Tag key={v.abilityId}>{v.abilityName}</Tag>) : '', text ? text.map((v) => <Tag key={v.abilityId}>{v.abilityName}</Tag>) : '',
}, },
...@@ -98,9 +99,19 @@ const FlyerList = () => { ...@@ -98,9 +99,19 @@ const FlyerList = () => {
width: '20%', width: '20%',
ellipsis: true, ellipsis: true,
render: (text: string, record) => ( render: (text: string, record) => (
<Button type='link' onClick={() => updateRemarkClick(record)}> <div
onClick={() => updateRemarkClick(record)}
style={{
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
width: '100%',
overflow: 'hidden',
cursor: 'pointer',
color: '#1677ff',
}}
>
{text || '--'} {text || '--'}
</Button> </div>
), ),
}, },
{ {
...@@ -224,7 +235,7 @@ const FlyerList = () => { ...@@ -224,7 +235,7 @@ const FlyerList = () => {
<SearchBox <SearchBox
search={searchColumns} search={searchColumns}
searchData={searchSuccess} searchData={searchSuccess}
sufFixBtn={ child={
<Button type='primary' onClick={toFlyerAuthDaily}> <Button type='primary' onClick={toFlyerAuthDaily}>
认证日志 认证日志
</Button> </Button>
......
import { useSearchParams } from 'react-router-dom';
import { ResourceManageAPI } from '~/api';
import { useEffect, useState } from 'react';
import { InterDataType } from '~/api/interface';
import { backDetailPublishType } from '~/api/interface/resourceManageType';
import { Button, Descriptions, Image } from 'antd';
import { useNavigate } from 'react-router-dom';
//需求详情返回类型
type detailType = InterDataType<backDetailPublishType>;
const GatherDetail = () => {
const navigate = useNavigate();
const [searchParams] = useSearchParams();
const [publishDetails, setPublishDetails] = useState<detailType>();
const getPublishDetail = (id: number) => {
ResourceManageAPI.getDetailPublish({ id }).then(({ result }) => {
setPublishDetails(result);
});
};
//返回
const backRoute = () => {
navigate(-1);
};
useEffect(() => {
getPublishDetail(Number(searchParams.get('id')));
}, []);
return (
<div className='gather-detail'>
<Descriptions
title='需求信息'
bordered
extra={
<Button type='primary' onClick={backRoute}>
返回
</Button>
}
>
<Descriptions.Item label='需求类型'>
{publishDetails?.requirementTypeName}
</Descriptions.Item>
<Descriptions.Item label='任务标题'>{publishDetails?.taskTitle}</Descriptions.Item>
<Descriptions.Item label='任务地址'>{publishDetails?.taskAddress}</Descriptions.Item>
<Descriptions.Item label='任务开始时间'>{publishDetails?.taskStartTime}</Descriptions.Item>
<Descriptions.Item label='任务结束时间'>{publishDetails?.taskEndTime}</Descriptions.Item>
<Descriptions.Item label='需求描述'>{publishDetails?.requireDescription}</Descriptions.Item>
<Descriptions.Item label='描述图片'>
<Image.PreviewGroup>
{publishDetails?.requireUrl
? JSON.parse(publishDetails?.requireUrl).map((url: string, index: number) => (
<Image src={url} width={50} key={index} />
))
: ''}
</Image.PreviewGroup>
</Descriptions.Item>
</Descriptions>
</div>
);
};
export default GatherDetail;
...@@ -6,12 +6,15 @@ import { ResourceManageAPI } from '~/api'; ...@@ -6,12 +6,15 @@ import { ResourceManageAPI } from '~/api';
import { InterDataType, InterReqType, PaginationProps } from '~/api/interface'; import { InterDataType, InterReqType, PaginationProps } from '~/api/interface';
import './index.scss'; import './index.scss';
import { listPublishPageType } from '~/api/interface/resourceManageType'; import { listPublishPageType } from '~/api/interface/resourceManageType';
import { useNavigate } from 'react-router-dom';
//需求列表返回类型 //需求列表返回类型
type requirementsType = InterDataType<listPublishPageType>['list']; type requirementsType = InterDataType<listPublishPageType>['list'];
type requirementsParameter = Omit<InterReqType<listPublishPageType>, 'pageSize' | 'pageNo'>; type requirementsParameter = Omit<InterReqType<listPublishPageType>, 'pageSize' | 'pageNo'>;
const RequirementsGathering = () => { const RequirementsGathering = () => {
const navigate = useNavigate();
const [searchColumnsData, setSearchColumnsData] = useState<searchColumns[]>([ const [searchColumnsData, setSearchColumnsData] = useState<searchColumns[]>([
{ {
label: '需求类型', label: '需求类型',
...@@ -63,7 +66,9 @@ const RequirementsGathering = () => { ...@@ -63,7 +66,9 @@ const RequirementsGathering = () => {
<Button type='link' danger onClick={() => deleteRequirements(record)}> <Button type='link' danger onClick={() => deleteRequirements(record)}>
强制删除 强制删除
</Button> </Button>
<Button type='link'>联系客户</Button> <Button type='link' onClick={() => toGatherDetail(record)}>
详情
</Button>
</> </>
), ),
}, },
...@@ -129,6 +134,11 @@ const RequirementsGathering = () => { ...@@ -129,6 +134,11 @@ const RequirementsGathering = () => {
}, },
}); });
}; };
//跳转需求详情
const toGatherDetail = (record: requirementsType[0]) => {
navigate({ pathname: '/resourceManage/gatherDetail', search: `id=${record.id}` });
};
useEffect(() => { useEffect(() => {
getRequirementsList(); getRequirementsList();
getRequirementsTypeList(); getRequirementsTypeList();
......
...@@ -20,13 +20,7 @@ export const authRouterList = async () => { ...@@ -20,13 +20,7 @@ export const authRouterList = async () => {
const getRouteList = (data: RouteObjectType[]) => { const getRouteList = (data: RouteObjectType[]) => {
return data.reduce((pre: RouteObjectType[], cur) => { return data.reduce((pre: RouteObjectType[], cur) => {
const Obj: RouteObjectType = { ...cur }; const Obj: RouteObjectType = { ...cur };
if ( if (ids.includes(Obj.meta.id) || Obj.meta.hidden) {
ids.includes(Obj.meta.id) ||
Obj.meta.hidden ||
['/customManage/customVerification', '/flyerCenter', '/flyerCenter/flyerList'].includes(
Obj.path as string,
)
) {
if (Obj.children) { if (Obj.children) {
Obj.children = [...getRouteList(Obj.children)]; Obj.children = [...getRouteList(Obj.children)];
} }
......
...@@ -66,9 +66,13 @@ const CustomVerificationDetailView = React.lazy( ...@@ -66,9 +66,13 @@ const CustomVerificationDetailView = React.lazy(
//资源管理 //资源管理
import MaterielManageView from '~/pages/resourceManage/materielManage'; import MaterielManageView from '~/pages/resourceManage/materielManage';
import MaterielManageDetail from '~/pages/resourceManage/materielManage/detail'; import MaterielManageDetail from '~/pages/resourceManage/materielManage/detail';
const RequirementsGatheringView = React.lazy( const GatheringListView = React.lazy(
() => import('~/pages/resourceManage/requirementsGathering'), () => import('~/pages/resourceManage/requirementsGathering/gatherList'),
); //需求收集 ); //需求收集列表
const GatherDetailView = React.lazy(
() => import('~/pages/resourceManage/requirementsGathering/gatherDetail'),
);
const TagManageView = React.lazy(() => import('~/pages/resourceManage/tagManage')); //标签管理 const TagManageView = React.lazy(() => import('~/pages/resourceManage/tagManage')); //标签管理
const IndustryNewsView = React.lazy(() => import('~/pages/resourceManage/industryNews')); const IndustryNewsView = React.lazy(() => import('~/pages/resourceManage/industryNews'));
//论坛管理 //论坛管理
...@@ -226,7 +230,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -226,7 +230,7 @@ export const routerList: Array<RouteObjectType> = [
element: withLoadingComponent(<CustomVerificationView />), element: withLoadingComponent(<CustomVerificationView />),
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
meta: { meta: {
id: 230, id: 260,
title: '实名认证', title: '实名认证',
icon: <SolutionOutlined />, icon: <SolutionOutlined />,
}, },
...@@ -288,6 +292,61 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -288,6 +292,61 @@ export const routerList: Array<RouteObjectType> = [
], ],
}, },
{ {
path: '/flyerCenter',
element: <LayoutView />,
errorElement: <ErrorPage />,
meta: {
id: 1800,
icon: <UserOutlined />,
title: '飞手中心',
},
children: [
{
path: '/flyerCenter/flyerList',
element: withLoadingComponent(<FlyerListView />),
errorElement: <ErrorPage />,
meta: {
id: 1810,
title: '飞手管理',
icon: <UserOutlined />,
},
},
{
path: '/flyerCenter/flyerAuthDaily',
element: withLoadingComponent(<FlyerAuthDailyView />),
errorElement: <ErrorPage />,
meta: {
id: 1815,
title: '认证日志',
hidden: true,
icon: <UserOutlined />,
},
},
{
path: '/flyerCenter/flyerDetail',
element: withLoadingComponent(<FlyerDetailsView />),
errorElement: <ErrorPage />,
meta: {
id: 1816,
title: '飞手详情',
hidden: true,
icon: <UserOutlined />,
},
},
{
path: '/flyerCenter/flyerApprove',
element: withLoadingComponent(<FlyerDetailsView />),
errorElement: <ErrorPage />,
meta: {
id: 1817,
title: '飞手审批',
hidden: true,
icon: <UserOutlined />,
},
},
],
},
{
path: '/resourceManage', path: '/resourceManage',
element: <LayoutView />, element: <LayoutView />,
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
...@@ -299,7 +358,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -299,7 +358,7 @@ export const routerList: Array<RouteObjectType> = [
children: [ children: [
{ {
path: '/resourceManage/requirementsGathering', path: '/resourceManage/requirementsGathering',
element: withLoadingComponent(<RequirementsGatheringView />), element: withLoadingComponent(<GatheringListView />),
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
meta: { meta: {
id: 410, id: 410,
...@@ -308,6 +367,17 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -308,6 +367,17 @@ export const routerList: Array<RouteObjectType> = [
}, },
}, },
{ {
path: '/resourceManage/gatherDetail',
element: withLoadingComponent(<GatherDetailView />),
errorElement: <ErrorPage />,
meta: {
id: 415,
title: '需求详情',
hidden: true,
icon: <MonitorOutlined />,
},
},
{
path: '/resourceManage/materielManage', path: '/resourceManage/materielManage',
element: withLoadingComponent(<MaterielManageView />), element: withLoadingComponent(<MaterielManageView />),
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
...@@ -1006,61 +1076,6 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -1006,61 +1076,6 @@ export const routerList: Array<RouteObjectType> = [
], ],
}, },
{ {
path: '/flyerCenter',
element: <LayoutView />,
errorElement: <ErrorPage />,
meta: {
id: 1500,
icon: <UserOutlined />,
title: '飞手中心',
},
children: [
{
path: '/flyerCenter/flyerList',
element: withLoadingComponent(<FlyerListView />),
errorElement: <ErrorPage />,
meta: {
id: 1510,
title: '飞手管理',
icon: <UserOutlined />,
},
},
{
path: '/flyerCenter/flyerAuthDaily',
element: withLoadingComponent(<FlyerAuthDailyView />),
errorElement: <ErrorPage />,
meta: {
id: 1520,
title: '认证日志',
hidden: true,
icon: <UserOutlined />,
},
},
{
path: '/flyerCenter/flyerDetail',
element: withLoadingComponent(<FlyerDetailsView />),
errorElement: <ErrorPage />,
meta: {
id: 1530,
title: '飞手详情',
hidden: true,
icon: <UserOutlined />,
},
},
{
path: '/flyerCenter/flyerApprove',
element: withLoadingComponent(<FlyerDetailsView />),
errorElement: <ErrorPage />,
meta: {
id: 1540,
title: '飞手审批',
hidden: true,
icon: <UserOutlined />,
},
},
],
},
{
path: '/systemManage', path: '/systemManage',
element: <LayoutView />, element: <LayoutView />,
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论