Merge branch '20230421-监督管理项目跟进后返回查询条件为空' into 'master'

【生产】4.21版本同步到Master

See merge request eshop/fe_service_ebtp_frontend!214
This commit is contained in:
jl-zhoujl2
2023-04-23 00:45:15 +00:00
3 changed files with 24 additions and 12 deletions

View File

@ -9,6 +9,8 @@ import { getFavoritesList, removePublic, toPublic, updateReadStatus } from '../s
interface FavoritesListProps { interface FavoritesListProps {
projectName?: string | null, projectName?: string | null,
bidMethodDict?: string | null, bidMethodDict?: string | null,
businessModule?: string | null,
isPublic?: string | null,
current?: string | null, current?: string | null,
tabs: string | null, tabs: string | null,
} }
@ -18,7 +20,7 @@ interface FavoritesListProps {
* @returns * @returns
*/ */
const FavoritesList: React.FC<FavoritesListProps> = (props) => { const FavoritesList: React.FC<FavoritesListProps> = (props) => {
const { projectName, bidMethodDict, current, tabs } = props const { projectName, bidMethodDict, current, businessModule, isPublic, tabs } = props
const [spin, spinSet] = useState<boolean>(false); const [spin, spinSet] = useState<boolean>(false);
//查询分页数据 //查询分页数据
@ -54,7 +56,8 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
dataIndex: 'businessModule', dataIndex: 'businessModule',
hideInTable: true, hideInTable: true,
valueType: 'select', valueType: 'select',
valueEnum: proTableValueEnum(dictData['business_module=procurement_mode_1']) valueEnum: proTableValueEnum(dictData['business_module=procurement_mode_1']),
initialValue: tabs === 'favoritesList' ? isNotEmpty(businessModule) ? businessModule : null : null,
// { // {
// 1: <Tag color={getTagColor(1)}>建档</Tag>, // 1: <Tag color={getTagColor(1)}>建档</Tag>,
// 2: <Tag color={getTagColor(2)}>资审招标</Tag>, // 2: <Tag color={getTagColor(2)}>资审招标</Tag>,
@ -117,7 +120,8 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
1: { 1: {
text: <Tag color='orange'></Tag> text: <Tag color='orange'></Tag>
}, },
} },
initialValue: tabs === 'favoritesList' ? isNotEmpty(isPublic) ? isPublic : null : null,
}, },
{ {
@ -214,7 +218,7 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
*/ */
const getReturnURL = () => { const getReturnURL = () => {
let projectURLParams = JSON.parse(projectParams); let projectURLParams = JSON.parse(projectParams);
let params = `${'?current=' + projectURLParams.current}${isEmpty(projectURLParams.projectName) ? '' : '&projectName=' + projectURLParams.projectName}${isEmpty(projectURLParams.bidMethodDict) ? '' : '&bidMethodDict=' + projectURLParams.bidMethodDict}&tabs=favoritesList`; let params = `${'?current=' + projectURLParams.current}${isEmpty(projectURLParams.projectName) ? '' : '&projectName=' + projectURLParams.projectName}${isEmpty(projectURLParams.bidMethodDict) ? '' : '&bidMethodDict=' + projectURLParams.bidMethodDict}${isEmpty(projectURLParams.businessModule) ? '' : '&businessModule=' + projectURLParams.businessModule}${isEmpty(projectURLParams.isPublic) ? '' : '&isPublic=' + projectURLParams.isPublic}&tabs=favoritesList`;
return getUrlRelativePath() + params; return getUrlRelativePath() + params;
} }
@ -227,7 +231,7 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
bordered={false} bordered={false}
size='small' size='small'
actionRef={ref} actionRef={ref}
search={{ labelWidth: 'auto', span: 6 }} search={{ labelWidth: 'auto', span: 6, defaultCollapsed: !(tabs === 'favoritesList' && isNotEmpty(isPublic)) }}
loading={false} loading={false}
request={async (params) => { request={async (params) => {
setProjectParams(JSON.stringify(params)); setProjectParams(JSON.stringify(params));

View File

@ -10,6 +10,8 @@ interface ProjectManageProps {
projectName?: string | null, projectName?: string | null,
bidMethodDict?: string | null, bidMethodDict?: string | null,
current?: string | null, current?: string | null,
businessModule?: string | null,
isPublic?: string | null,
tabs: string | null, tabs: string | null,
} }
/** /**
@ -18,7 +20,7 @@ interface ProjectManageProps {
* @returns * @returns
*/ */
const ProjectManage: React.FC<ProjectManageProps> = (props) => { const ProjectManage: React.FC<ProjectManageProps> = (props) => {
const { projectName, bidMethodDict, current, tabs } = props const { projectName, bidMethodDict, current, businessModule, isPublic, tabs } = props
const [spin, spinSet] = useState<boolean>(false); const [spin, spinSet] = useState<boolean>(false);
//查询分页数据 //查询分页数据
@ -54,7 +56,8 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
dataIndex: 'businessModule', dataIndex: 'businessModule',
hideInTable: true, hideInTable: true,
valueType: 'select', valueType: 'select',
valueEnum: proTableValueEnum(dictData['business_module=procurement_mode_1']) valueEnum: proTableValueEnum(dictData['business_module=procurement_mode_1']),
initialValue: tabs === 'projectList' ? isNotEmpty(businessModule) ? businessModule : null : null,
}, },
{ {
title: '项目名称', title: '项目名称',
@ -103,7 +106,8 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
1: { 1: {
text: <Tag color='orange'></Tag> text: <Tag color='orange'></Tag>
}, },
} },
initialValue: tabs === 'projectList' ? isNotEmpty(isPublic) ? isPublic : null : null,
}, },
{ {
@ -144,7 +148,7 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
*/ */
const getReturnURL = () => { const getReturnURL = () => {
let projectURLParams = JSON.parse(projectParams); let projectURLParams = JSON.parse(projectParams);
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}${isEmpty(projectURLParams.businessModule) ? '' : '&businessModule=' + projectURLParams.businessModule}${isEmpty(projectURLParams.isPublic) ? '' : '&isPublic=' + projectURLParams.isPublic}&tabs=projectList`;
return getUrlRelativePath() + params; return getUrlRelativePath() + params;
} }
/** /**
@ -181,7 +185,7 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
bordered={false} bordered={false}
size='small' size='small'
actionRef={ref} actionRef={ref}
search={{ labelWidth: 'auto', span: 6 }} search={{ labelWidth: 'auto', span: 6, defaultCollapsed: !(tabs === 'projectList' && isNotEmpty(isPublic)) }}
loading={false} loading={false}
request={async (params) => { request={async (params) => {
setProjectParams(JSON.stringify(params)); setProjectParams(JSON.stringify(params));

View File

@ -12,6 +12,10 @@ const Index: React.FC<{}> = () => {
const projectName = getUrlParam("projectName"); const projectName = getUrlParam("projectName");
//url采购方式 //url采购方式
const bidMethodDict = getURLInformation("bidMethodDict"); const bidMethodDict = getURLInformation("bidMethodDict");
//url项目阶段
const businessModule = getURLInformation("businessModule");
//url状态
const isPublic = getURLInformation("isPublic");
//url分页信息 //url分页信息
const current = getURLInformation("current"); const current = getURLInformation("current");
//url标签信息 //url标签信息
@ -32,9 +36,9 @@ const Index: React.FC<{}> = () => {
</Radio.Group> </Radio.Group>
{ {
mode === 'projectList' ? ( mode === 'projectList' ? (
<ProjectManage projectName={projectName} bidMethodDict={bidMethodDict} current={current} tabs={tabs} /> <ProjectManage projectName={projectName} bidMethodDict={bidMethodDict} current={current} businessModule={businessModule} isPublic={isPublic} tabs={tabs} />
) : ( ) : (
<FavoritesList projectName={projectName} bidMethodDict={bidMethodDict} current={current} tabs={tabs} /> <FavoritesList projectName={projectName} bidMethodDict={bidMethodDict} current={current} businessModule={businessModule} isPublic={isPublic} tabs={tabs} />
) )
} }
</Card> </Card>