任务【4411】:修改监督项目列表、增加审查项目列表
This commit is contained in:
@ -227,6 +227,11 @@ export default [
|
|||||||
name: 'Supervision',
|
name: 'Supervision',
|
||||||
path: '/Supervision',
|
path: '/Supervision',
|
||||||
component: './Project/ProjectManage/Supervision'
|
component: './Project/ProjectManage/Supervision'
|
||||||
|
},
|
||||||
|
{//审查人员 项目管理页
|
||||||
|
name: 'Examination',
|
||||||
|
path: '/Examination',
|
||||||
|
component: './Project/ProjectManage/Examination'
|
||||||
},
|
},
|
||||||
{//招标项目评审-评委
|
{//招标项目评审-评委
|
||||||
path: '/ExpertReview/Review',
|
path: '/ExpertReview/Review',
|
||||||
|
@ -0,0 +1,175 @@
|
|||||||
|
import { getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnum } from '@/utils/CommonUtils';
|
||||||
|
import { followUpAProjectManager, getDicData, setPurchaseCanOperate } from '@/utils/session';
|
||||||
|
import ProTable, { ProColumns } from '@ant-design/pro-table';
|
||||||
|
import { Button, Spin } from 'antd';
|
||||||
|
import React, { useState } from 'react';
|
||||||
|
import { useHistory } from 'umi';
|
||||||
|
import { getPage } from '../service';
|
||||||
|
|
||||||
|
interface ProjectManageProps {
|
||||||
|
projectName?: string | null,
|
||||||
|
bidMethodDict?: string | null,
|
||||||
|
current?: string | null
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 项目管理列表
|
||||||
|
* @param props
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
const ProjectManage: React.FC<ProjectManageProps> = (props) => {
|
||||||
|
const { projectName, bidMethodDict, current } = props
|
||||||
|
|
||||||
|
const [spin, spinSet] = useState<boolean>(false);
|
||||||
|
//查询分页数据
|
||||||
|
const [pageData, pageDataSet] = useState<any>({
|
||||||
|
pageNo: isNotEmpty(current) ? Number(current) : 1,
|
||||||
|
pageSize: 10
|
||||||
|
});
|
||||||
|
//项目列表参数
|
||||||
|
const [projectParams, setProjectParams] = useState<string>("");
|
||||||
|
//获取字典
|
||||||
|
const getDict: any = getDicData();
|
||||||
|
const dictData = JSON.parse(getDict);
|
||||||
|
//标的类型
|
||||||
|
const procurementTypeEntrust = 'procurement_type=entrust';
|
||||||
|
//采购方式
|
||||||
|
const procurementModeEntrust = 'procurement_mode=entrust';
|
||||||
|
const history = useHistory();
|
||||||
|
|
||||||
|
const columns: ProColumns<any>[] = [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
valueType: 'index',
|
||||||
|
width: 50,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '采购方式',
|
||||||
|
dataIndex: 'bidMethodDict',
|
||||||
|
width: '8%',
|
||||||
|
valueEnum: proTableValueEnum(dictData[procurementModeEntrust]),
|
||||||
|
initialValue: isNotEmpty(bidMethodDict) ? bidMethodDict : null ,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '项目名称',
|
||||||
|
dataIndex: 'projectName',
|
||||||
|
initialValue: isNotEmpty(projectName) ? projectName : null ,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '项目编号',
|
||||||
|
dataIndex: 'ebpProjectNumber',
|
||||||
|
search: false,
|
||||||
|
width: '10%',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '采购人',
|
||||||
|
dataIndex: 'tendereeOrgName',
|
||||||
|
search: false,
|
||||||
|
width: '15%',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '建档时间',
|
||||||
|
dataIndex: 'createDate',
|
||||||
|
search: false,
|
||||||
|
width: '10%',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '标的类型',
|
||||||
|
dataIndex: 'procurementType',
|
||||||
|
width: '8%',
|
||||||
|
search: false,
|
||||||
|
valueEnum: proTableValueEnum(dictData[procurementTypeEntrust]),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '所属区域',
|
||||||
|
dataIndex: 'regionDictName',
|
||||||
|
search: false,
|
||||||
|
width: '10%',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
valueType: 'option',
|
||||||
|
width: 150,
|
||||||
|
render: (_: any, record: any) =>
|
||||||
|
(
|
||||||
|
<>
|
||||||
|
<Button
|
||||||
|
key="followUpProject"
|
||||||
|
type="text"
|
||||||
|
onClick={() =>
|
||||||
|
followUpProject(record)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
项目跟进
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目跟进
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
const followUpProject = async (data: any) => {
|
||||||
|
data.returnURL = getReturnURL();
|
||||||
|
await followUpAProjectManager(data);
|
||||||
|
setPurchaseCanOperate();
|
||||||
|
history.push('/ProjectLayout/Manager/HomePageSectionList');
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取返回路径
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
const getReturnURL = () => {
|
||||||
|
let projectURLParams = JSON.parse(projectParams);
|
||||||
|
let params = `${'?current=' + projectURLParams.current}${isEmpty(projectURLParams.projectName) ? '' : '&projectName=' + projectURLParams.projectName}${isEmpty(projectURLParams.bidMethodDict) ? '' : '&bidMethodDict=' + projectURLParams.bidMethodDict}&tabs=projectList`;
|
||||||
|
return getUrlRelativePath() + params;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Spin spinning={spin}>
|
||||||
|
<div className="zjl-entrust confirm">
|
||||||
|
<ProTable
|
||||||
|
columns={columns}
|
||||||
|
options={false}
|
||||||
|
bordered={false}
|
||||||
|
size='small'
|
||||||
|
search={{ labelWidth: 'auto', span: 6 }}
|
||||||
|
loading={false}
|
||||||
|
request={async (params) => {
|
||||||
|
setProjectParams(JSON.stringify(params));
|
||||||
|
spinSet(true);
|
||||||
|
return await getPage({
|
||||||
|
...params,
|
||||||
|
basePageRequest: { pageNo: pageData.pageNo, pageSize: pageData.pageSize },
|
||||||
|
}).then((res) => {
|
||||||
|
const result = {
|
||||||
|
data: res.data.records,
|
||||||
|
total: res.data.total,
|
||||||
|
success: res.success,
|
||||||
|
pageSize: res.data.size,
|
||||||
|
current: res.data.current
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}).finally(() => {
|
||||||
|
isNotEmpty(window.location.search) && history.push(window.location.pathname);
|
||||||
|
spinSet(false);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pagination={{
|
||||||
|
defaultPageSize: 10,
|
||||||
|
defaultCurrent: isNotEmpty(current) ? Number(current) : 1 ,
|
||||||
|
size: "small",
|
||||||
|
showSizeChanger: false,
|
||||||
|
onChange: (page, pageSize) => pageDataSet({ pageNo: page, pageSize: pageSize }),
|
||||||
|
onShowSizeChange: (current, size) => pageDataSet({ pageNo: current, pageSize: size }),
|
||||||
|
}}
|
||||||
|
onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Spin>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default ProjectManage;
|
33
src/pages/Project/ProjectManage/Examination/index.tsx
Normal file
33
src/pages/Project/ProjectManage/Examination/index.tsx
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import { getURLInformation, getUrlParam } from '@/utils/CommonUtils';
|
||||||
|
import { Card } from 'antd';
|
||||||
|
import React from 'react';
|
||||||
|
import ProjectManage from './components/ProjectManage';
|
||||||
|
/**
|
||||||
|
* 监督项目管理
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
const Index: React.FC<{}> = () => {
|
||||||
|
//url项目名称
|
||||||
|
const projectName = getUrlParam("projectName");
|
||||||
|
//url采购方式
|
||||||
|
const bidMethodDict = getURLInformation("bidMethodDict");
|
||||||
|
//url分页信息
|
||||||
|
const current = getURLInformation("current");
|
||||||
|
//url标签信息
|
||||||
|
// const tabs = getURLInformation("tabs");
|
||||||
|
// //radio value
|
||||||
|
// const [mode, setMode] = useState<string>(isNotEmpty(tabs) ? String(tabs) : 'projectList');
|
||||||
|
|
||||||
|
// const handleModeChange = (e: any) => {
|
||||||
|
// const mode = e.target.value;
|
||||||
|
// setMode(mode);
|
||||||
|
// };
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card style={{ borderRadius: 6 }} bodyStyle={{ padding: '16px 24px 0px' }}>
|
||||||
|
<ProjectManage projectName={projectName} bidMethodDict={bidMethodDict} current={current} />
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default Index;
|
11
src/pages/Project/ProjectManage/Examination/service.ts
Normal file
11
src/pages/Project/ProjectManage/Examination/service.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
/**
|
||||||
|
* 查询数据并分页
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export async function getPage(params?: any) {
|
||||||
|
return request('/api/biz-service-ebtp-project/v1/projectRecord/examination/getPage', {
|
||||||
|
method: 'POST',
|
||||||
|
data: params,
|
||||||
|
});
|
||||||
|
}
|
@ -1,10 +1,10 @@
|
|||||||
import { getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnum } from '@/utils/CommonUtils';
|
import { getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnum } from '@/utils/CommonUtils';
|
||||||
import { followUpAProjectManager, getDicData, setPurchaseCanOperate } from '@/utils/session';
|
import { followUpAProjectManager, getDicData, setPurchaseCanOperate } from '@/utils/session';
|
||||||
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||||
import { Button, message, Popconfirm, Spin } from 'antd';
|
import { Button, message, Popconfirm, Spin, Space, Tag } from 'antd';
|
||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import { useHistory } from 'umi';
|
import { useHistory } from 'umi';
|
||||||
import { getFavoritesList, updateReadStatus } from '../service';
|
import { getFavoritesList, removePublic, toPublic, updateReadStatus } from '../service';
|
||||||
|
|
||||||
interface FavoritesListProps {
|
interface FavoritesListProps {
|
||||||
projectName?: string | null,
|
projectName?: string | null,
|
||||||
@ -35,14 +35,13 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
|
|||||||
const procurementTypeEntrust = 'procurement_type=entrust';
|
const procurementTypeEntrust = 'procurement_type=entrust';
|
||||||
//采购方式
|
//采购方式
|
||||||
const procurementModeEntrust = 'procurement_mode=entrust';
|
const procurementModeEntrust = 'procurement_mode=entrust';
|
||||||
|
//选中
|
||||||
|
const [selectedRows, setSelectedRows] = useState<any[]>([]);
|
||||||
|
|
||||||
|
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const ref = useRef<ActionType>();
|
const ref = useRef<ActionType>();
|
||||||
const columns: ProColumns<any>[] = [
|
const columns: ProColumns<any>[] = [
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
valueType: 'index',
|
|
||||||
width: 50,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '采购方式',
|
title: '采购方式',
|
||||||
dataIndex: 'bidMethodDict',
|
dataIndex: 'bidMethodDict',
|
||||||
@ -50,6 +49,27 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
|
|||||||
valueEnum: proTableValueEnum(dictData[procurementModeEntrust]),
|
valueEnum: proTableValueEnum(dictData[procurementModeEntrust]),
|
||||||
initialValue: tabs === 'favoritesList' ? isNotEmpty(bidMethodDict) ? bidMethodDict : null : null,
|
initialValue: tabs === 'favoritesList' ? isNotEmpty(bidMethodDict) ? bidMethodDict : null : null,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '项目阶段',
|
||||||
|
dataIndex: 'businessModule',
|
||||||
|
hideInTable: true,
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: proTableValueEnum(dictData['business_module=procurement_mode_1'])
|
||||||
|
// {
|
||||||
|
// 1: <Tag color={getTagColor(1)}>建档</Tag>,
|
||||||
|
// 2: <Tag color={getTagColor(2)}>资审招标</Tag>,
|
||||||
|
// 3: <Tag color={getTagColor(3)}>资审投标</Tag>,
|
||||||
|
// 4: <Tag color={getTagColor(4)}>资审开标</Tag>,
|
||||||
|
// 5: <Tag color={getTagColor(5)}>资审评标</Tag>,
|
||||||
|
// 6: <Tag color={getTagColor(6)}>资审定标</Tag>,
|
||||||
|
// 7: <Tag color={getTagColor(7)}>招标</Tag>,
|
||||||
|
// 8: <Tag color={getTagColor(8)}>投标</Tag>,
|
||||||
|
// 9: <Tag color={getTagColor(9)}>开标</Tag>,
|
||||||
|
// 10: <Tag color={getTagColor(10)}>评标</Tag>,
|
||||||
|
// 11: <Tag color={getTagColor(11)}>定标</Tag>,
|
||||||
|
// 12: <Tag color={getTagColor(12)}>归档</Tag>,
|
||||||
|
// }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '项目名称',
|
title: '项目名称',
|
||||||
dataIndex: 'projectName',
|
dataIndex: 'projectName',
|
||||||
@ -86,6 +106,20 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
|
|||||||
search: false,
|
search: false,
|
||||||
width: '10%',
|
width: '10%',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '公开状态',
|
||||||
|
dataIndex: 'isPublic',
|
||||||
|
width: '10%',
|
||||||
|
valueEnum: {
|
||||||
|
0: {
|
||||||
|
text: <Tag color='green'>未公开</Tag>
|
||||||
|
},
|
||||||
|
1: {
|
||||||
|
text: <Tag color='orange'>已公开</Tag>
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
valueType: 'option',
|
valueType: 'option',
|
||||||
@ -147,6 +181,31 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
|
|||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消公开
|
||||||
|
*/
|
||||||
|
const removePublicProject = async () => {
|
||||||
|
spinSet(true);
|
||||||
|
await removePublic(selectedRows).then(res => {
|
||||||
|
if (res?.code == 200) {
|
||||||
|
message.success('取消成功');
|
||||||
|
ref.current?.reload();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目公开
|
||||||
|
*/
|
||||||
|
const toPublicProject = async () => {
|
||||||
|
spinSet(true);
|
||||||
|
await toPublic(selectedRows).then(res => {
|
||||||
|
if (res?.code == 200) {
|
||||||
|
message.success('设置成功');
|
||||||
|
ref.current?.reload();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* 获取返回路径
|
* 获取返回路径
|
||||||
* @returns
|
* @returns
|
||||||
@ -191,13 +250,37 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
|
|||||||
}
|
}
|
||||||
pagination={{
|
pagination={{
|
||||||
defaultPageSize: 10,
|
defaultPageSize: 10,
|
||||||
|
pageSizeOptions: [10, 20, 30, 50],
|
||||||
defaultCurrent: tabs === 'favoritesList' ? isNotEmpty(current) ? Number(current) : 1 : 1,
|
defaultCurrent: tabs === 'favoritesList' ? isNotEmpty(current) ? Number(current) : 1 : 1,
|
||||||
size: "small",
|
size: "small",
|
||||||
showSizeChanger: false,
|
showSizeChanger: true,
|
||||||
onChange: (page, pageSize) => pageDataSet({ pageNo: page, pageSize: pageSize }),
|
onChange: (page, pageSize) => pageDataSet({ pageNo: page, pageSize: pageSize }),
|
||||||
onShowSizeChange: (current, size) => pageDataSet({ pageNo: current, pageSize: size }),
|
onShowSizeChange: (current, size) => pageDataSet({ pageNo: current, pageSize: size }),
|
||||||
}}
|
}}
|
||||||
onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }}
|
onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }}
|
||||||
|
rowKey={"id"}
|
||||||
|
rowSelection={{
|
||||||
|
selectedRowKeys: selectedRows,
|
||||||
|
onChange: (_, selectedRows) => setSelectedRows(_),
|
||||||
|
}}
|
||||||
|
tableAlertRender={({ selectedRowKeys, selectedRows, onCleanSelected }) => (
|
||||||
|
<Space size={24}>
|
||||||
|
<span>
|
||||||
|
已选 {selectedRowKeys.length} 项
|
||||||
|
<a style={{ marginLeft: 8 }} onClick={onCleanSelected}>
|
||||||
|
取消选择
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
tableAlertOptionRender={({ selectedRowKeys, selectedRows, onCleanSelected }) => {
|
||||||
|
return (
|
||||||
|
<Space size={16}>
|
||||||
|
<a onClick={() => { toPublicProject(); onCleanSelected() }}>公开项目</a>
|
||||||
|
<a onClick={() => { removePublicProject(); onCleanSelected() }}>取消公开</a>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Spin>
|
</Spin>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnum } from '@/utils/CommonUtils';
|
import { getUrlRelativePath, isEmpty, isNotEmpty, proTableValueEnum } from '@/utils/CommonUtils';
|
||||||
import { followUpAProjectManager, getDicData, setPurchaseCanOperate } from '@/utils/session';
|
import { followUpAProjectManager, getDicData, setPurchaseCanOperate } from '@/utils/session';
|
||||||
import ProTable, { ProColumns } from '@ant-design/pro-table';
|
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||||
import { Button, Spin } from 'antd';
|
import { Button, message, Space, Spin, Tag } from 'antd';
|
||||||
import React, { useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import { useHistory } from 'umi';
|
import { useHistory } from 'umi';
|
||||||
import { getPage } from '../service';
|
import { getPage, removePublic, toPublic } from '../service';
|
||||||
|
|
||||||
interface ProjectManageProps {
|
interface ProjectManageProps {
|
||||||
projectName?: string | null,
|
projectName?: string | null,
|
||||||
@ -35,14 +35,13 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
|
|||||||
const procurementTypeEntrust = 'procurement_type=entrust';
|
const procurementTypeEntrust = 'procurement_type=entrust';
|
||||||
//采购方式
|
//采购方式
|
||||||
const procurementModeEntrust = 'procurement_mode=entrust';
|
const procurementModeEntrust = 'procurement_mode=entrust';
|
||||||
const history = useHistory();
|
//选中
|
||||||
|
const [selectedRows, setSelectedRows] = useState<any[]>([]);
|
||||||
|
|
||||||
|
const history = useHistory();
|
||||||
|
const ref = useRef<ActionType>();
|
||||||
const columns: ProColumns<any>[] = [
|
const columns: ProColumns<any>[] = [
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
valueType: 'index',
|
|
||||||
width: 50,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '采购方式',
|
title: '采购方式',
|
||||||
dataIndex: 'bidMethodDict',
|
dataIndex: 'bidMethodDict',
|
||||||
@ -50,6 +49,13 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
|
|||||||
valueEnum: proTableValueEnum(dictData[procurementModeEntrust]),
|
valueEnum: proTableValueEnum(dictData[procurementModeEntrust]),
|
||||||
initialValue: tabs === 'projectList' ? isNotEmpty(bidMethodDict) ? bidMethodDict : null : null,
|
initialValue: tabs === 'projectList' ? isNotEmpty(bidMethodDict) ? bidMethodDict : null : null,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '项目阶段',
|
||||||
|
dataIndex: 'businessModule',
|
||||||
|
hideInTable: true,
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: proTableValueEnum(dictData['business_module=procurement_mode_1'])
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '项目名称',
|
title: '项目名称',
|
||||||
dataIndex: 'projectName',
|
dataIndex: 'projectName',
|
||||||
@ -86,6 +92,20 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
|
|||||||
search: false,
|
search: false,
|
||||||
width: '10%',
|
width: '10%',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '公开状态',
|
||||||
|
dataIndex: 'isPublic',
|
||||||
|
width: '10%',
|
||||||
|
valueEnum: {
|
||||||
|
0: {
|
||||||
|
text: <Tag color='green'>未公开</Tag>
|
||||||
|
},
|
||||||
|
1: {
|
||||||
|
text: <Tag color='orange'>已公开</Tag>
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
valueType: 'option',
|
valueType: 'option',
|
||||||
@ -127,7 +147,31 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
|
|||||||
let params = `${'?current=' + projectURLParams.current}${isEmpty(projectURLParams.projectName) ? '' : '&projectName=' + projectURLParams.projectName}${isEmpty(projectURLParams.bidMethodDict) ? '' : '&bidMethodDict=' + projectURLParams.bidMethodDict}&tabs=projectList`;
|
let params = `${'?current=' + projectURLParams.current}${isEmpty(projectURLParams.projectName) ? '' : '&projectName=' + projectURLParams.projectName}${isEmpty(projectURLParams.bidMethodDict) ? '' : '&bidMethodDict=' + projectURLParams.bidMethodDict}&tabs=projectList`;
|
||||||
return getUrlRelativePath() + params;
|
return getUrlRelativePath() + params;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 取消公开
|
||||||
|
*/
|
||||||
|
const removePublicProject = async () => {
|
||||||
|
spinSet(true);
|
||||||
|
await removePublic(selectedRows).then(res => {
|
||||||
|
if (res?.code == 200) {
|
||||||
|
message.success('取消成功');
|
||||||
|
ref.current?.reload();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目公开
|
||||||
|
*/
|
||||||
|
const toPublicProject = async () => {
|
||||||
|
spinSet(true);
|
||||||
|
await toPublic(selectedRows).then(res => {
|
||||||
|
if (res?.code == 200) {
|
||||||
|
message.success('设置成功');
|
||||||
|
ref.current?.reload();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<Spin spinning={spin}>
|
<Spin spinning={spin}>
|
||||||
<div className="zjl-entrust confirm">
|
<div className="zjl-entrust confirm">
|
||||||
@ -136,6 +180,7 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
|
|||||||
options={false}
|
options={false}
|
||||||
bordered={false}
|
bordered={false}
|
||||||
size='small'
|
size='small'
|
||||||
|
actionRef={ref}
|
||||||
search={{ labelWidth: 'auto', span: 6 }}
|
search={{ labelWidth: 'auto', span: 6 }}
|
||||||
loading={false}
|
loading={false}
|
||||||
request={async (params) => {
|
request={async (params) => {
|
||||||
@ -161,13 +206,37 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
|
|||||||
}
|
}
|
||||||
pagination={{
|
pagination={{
|
||||||
defaultPageSize: 10,
|
defaultPageSize: 10,
|
||||||
|
pageSizeOptions: [10, 20, 30, 50],
|
||||||
defaultCurrent: tabs === 'projectList' ? isNotEmpty(current) ? Number(current) : 1 : 1,
|
defaultCurrent: tabs === 'projectList' ? isNotEmpty(current) ? Number(current) : 1 : 1,
|
||||||
size: "small",
|
size: "small",
|
||||||
showSizeChanger: false,
|
showSizeChanger: true,
|
||||||
onChange: (page, pageSize) => pageDataSet({ pageNo: page, pageSize: pageSize }),
|
onChange: (page, pageSize) => pageDataSet({ pageNo: page, pageSize: pageSize }),
|
||||||
onShowSizeChange: (current, size) => pageDataSet({ pageNo: current, pageSize: size }),
|
onShowSizeChange: (current, size) => pageDataSet({ pageNo: current, pageSize: size }),
|
||||||
}}
|
}}
|
||||||
onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }}
|
onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }}
|
||||||
|
rowKey={"id"}
|
||||||
|
rowSelection={{
|
||||||
|
selectedRowKeys: selectedRows,
|
||||||
|
onChange: (_, selectedRows) => setSelectedRows(_),
|
||||||
|
}}
|
||||||
|
tableAlertRender={({ selectedRowKeys, selectedRows, onCleanSelected }) => (
|
||||||
|
<Space size={24}>
|
||||||
|
<span>
|
||||||
|
已选 {selectedRowKeys.length} 项
|
||||||
|
<a style={{ marginLeft: 8 }} onClick={onCleanSelected}>
|
||||||
|
取消选择
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
tableAlertOptionRender={({ selectedRowKeys, selectedRows, onCleanSelected }) => {
|
||||||
|
return (
|
||||||
|
<Space size={16}>
|
||||||
|
<a onClick={() => { toPublicProject(); onCleanSelected() }}>公开项目</a>
|
||||||
|
<a onClick={() => { removePublicProject(); onCleanSelected() }}>取消公开</a>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Spin>
|
</Spin>
|
||||||
|
@ -29,4 +29,27 @@ export async function updateReadStatus(params: any) {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: { ...params },
|
data: { ...params },
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 取消公开项目
|
||||||
|
* @param params
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export async function removePublic(params: any) {
|
||||||
|
return request('/api/biz-service-ebtp-project/v1/projectRecord/examination/private', {
|
||||||
|
method: 'POST',
|
||||||
|
data: params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公开项目
|
||||||
|
* @param params
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export async function toPublic(params: any) {
|
||||||
|
return request('/api/biz-service-ebtp-project/v1/projectRecord/examination/public', {
|
||||||
|
method: 'POST',
|
||||||
|
data: params,
|
||||||
|
});
|
||||||
}
|
}
|
Reference in New Issue
Block a user