提交 7b351547 作者: 龚洪江

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

上级 bb8031a1
......@@ -16,6 +16,33 @@ export type listPublishPageType = InterItemFunction<
export type requirementsListType = InterFunction<any, { id: number; typeName: string }[]>;
//需求-强制删除
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<
......
......@@ -18,6 +18,7 @@ import {
industryCaseDeleteDetails,
deleteIndustryNewsType,
deleteRequirementsType,
backDetailPublishType,
} from '~/api/interface/resourceManageType';
import axios from '../request';
......@@ -31,6 +32,9 @@ export class ResourceManageAPI {
//需求-强制删除
static deleteRequirement: deleteRequirementsType = (params) =>
axios.get('/release/requirements/deleteRequire', { params });
//需求-详情
static getDetailPublish: backDetailPublishType = (params) =>
axios.get('/release/requirements/backDetailPublish', { params });
// 查询招标快讯列表-分页
static releaseTenderNews: releaseTenderNews = (params) =>
......
......@@ -33,8 +33,17 @@ const ServiceCategoryList = () => {
{
title: '操作',
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);
//新增分类弹窗
......@@ -62,7 +71,7 @@ const ServiceCategoryList = () => {
<Button icon={<ArrowUpOutlined />} style={{ marginRight: '10px' }} type='primary'></Button>
<Button icon={<ArrowDownOutlined />} type='primary'></Button>
</div>
<Table columns={tableColumns} bordered />
<Table columns={tableColumns} bordered rowKey='id' />
<AddOrEditModal
open={addOrEditModalShow}
onOk={addOrEditModalOk}
......
......@@ -57,9 +57,19 @@ const CustomVerification = () => {
width: '20%',
ellipsis: true,
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 || '--'}
</Button>
</div>
),
},
{
......
......@@ -73,6 +73,7 @@ const FlyerList = () => {
title: '能力认证',
align: 'center',
dataIndex: 'pilotAbility',
width: '20%',
render: (text: flyerListType[0]['pilotAbility']) =>
text ? text.map((v) => <Tag key={v.abilityId}>{v.abilityName}</Tag>) : '',
},
......@@ -98,9 +99,19 @@ const FlyerList = () => {
width: '20%',
ellipsis: true,
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 || '--'}
</Button>
</div>
),
},
{
......@@ -224,7 +235,7 @@ const FlyerList = () => {
<SearchBox
search={searchColumns}
searchData={searchSuccess}
sufFixBtn={
child={
<Button type='primary' onClick={toFlyerAuthDaily}>
认证日志
</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';
import { InterDataType, InterReqType, PaginationProps } from '~/api/interface';
import './index.scss';
import { listPublishPageType } from '~/api/interface/resourceManageType';
import { useNavigate } from 'react-router-dom';
//需求列表返回类型
type requirementsType = InterDataType<listPublishPageType>['list'];
type requirementsParameter = Omit<InterReqType<listPublishPageType>, 'pageSize' | 'pageNo'>;
const RequirementsGathering = () => {
const navigate = useNavigate();
const [searchColumnsData, setSearchColumnsData] = useState<searchColumns[]>([
{
label: '需求类型',
......@@ -63,7 +66,9 @@ const RequirementsGathering = () => {
<Button type='link' danger onClick={() => deleteRequirements(record)}>
强制删除
</Button>
<Button type='link'>联系客户</Button>
<Button type='link' onClick={() => toGatherDetail(record)}>
详情
</Button>
</>
),
},
......@@ -129,6 +134,11 @@ const RequirementsGathering = () => {
},
});
};
//跳转需求详情
const toGatherDetail = (record: requirementsType[0]) => {
navigate({ pathname: '/resourceManage/gatherDetail', search: `id=${record.id}` });
};
useEffect(() => {
getRequirementsList();
getRequirementsTypeList();
......
......@@ -20,13 +20,7 @@ export const authRouterList = async () => {
const getRouteList = (data: RouteObjectType[]) => {
return data.reduce((pre: RouteObjectType[], cur) => {
const Obj: RouteObjectType = { ...cur };
if (
ids.includes(Obj.meta.id) ||
Obj.meta.hidden ||
['/customManage/customVerification', '/flyerCenter', '/flyerCenter/flyerList'].includes(
Obj.path as string,
)
) {
if (ids.includes(Obj.meta.id) || Obj.meta.hidden) {
if (Obj.children) {
Obj.children = [...getRouteList(Obj.children)];
}
......
......@@ -66,9 +66,13 @@ const CustomVerificationDetailView = React.lazy(
//资源管理
import MaterielManageView from '~/pages/resourceManage/materielManage';
import MaterielManageDetail from '~/pages/resourceManage/materielManage/detail';
const RequirementsGatheringView = React.lazy(
() => import('~/pages/resourceManage/requirementsGathering'),
); //需求收集
const GatheringListView = React.lazy(
() => import('~/pages/resourceManage/requirementsGathering/gatherList'),
); //需求收集列表
const GatherDetailView = React.lazy(
() => import('~/pages/resourceManage/requirementsGathering/gatherDetail'),
);
const TagManageView = React.lazy(() => import('~/pages/resourceManage/tagManage')); //标签管理
const IndustryNewsView = React.lazy(() => import('~/pages/resourceManage/industryNews'));
//论坛管理
......@@ -226,7 +230,7 @@ export const routerList: Array<RouteObjectType> = [
element: withLoadingComponent(<CustomVerificationView />),
errorElement: <ErrorPage />,
meta: {
id: 230,
id: 260,
title: '实名认证',
icon: <SolutionOutlined />,
},
......@@ -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',
element: <LayoutView />,
errorElement: <ErrorPage />,
......@@ -299,7 +358,7 @@ export const routerList: Array<RouteObjectType> = [
children: [
{
path: '/resourceManage/requirementsGathering',
element: withLoadingComponent(<RequirementsGatheringView />),
element: withLoadingComponent(<GatheringListView />),
errorElement: <ErrorPage />,
meta: {
id: 410,
......@@ -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',
element: withLoadingComponent(<MaterielManageView />),
errorElement: <ErrorPage />,
......@@ -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',
element: <LayoutView />,
errorElement: <ErrorPage />,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论