Commit 79f9affe authored by XieZhiXiong's avatar XieZhiXiong

feat: 处理paas平台勾选开启多租户业务展示逻辑

parent df76b62b
/*
* @Description: Saas列表查询条件 effects
*/
import { FormEffectHooks } from '@formily/antd';
import { useLinkageUtils } from '@/utils/formEffectUtils';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import BASE_CONFIG from '@/../config/base.config.json';
const {
onFormInit$,
} = FormEffectHooks;
export const useQueryComingEffects = (context, actions) => {
const {
setFieldState,
} = actions;
const linkage = useLinkageUtils();
onFormInit$().subscribe(() => {
if (BASE_CONFIG.global.siteInfo.enableMultiTenancy) {
setFieldState('name', (state) => {
state.props['x-component-props'].advanced = false;
});
linkage.hide(`${FORM_FILTER_PATH}.*`);
}
});
}
\ No newline at end of file
......@@ -6,10 +6,12 @@
* @Description:
*/
import { FormEffectHooks, FormPath, ISchemaFormActions, ISchemaFormAsyncActions } from '@formily/antd';
import BASE_CONFIG from '@/../config/base.config.json';
const {
onFieldValueChange$,
onFieldInputChange$,
onFormInit$,
} = FormEffectHooks;
export const useBusinessEffects = (context, actions: (ISchemaFormActions | ISchemaFormAsyncActions)) => {
......@@ -29,4 +31,13 @@ export const useBusinessEffects = (context, actions: (ISchemaFormActions | ISche
// 清空
setFieldValue('configIds', []);
});
onFormInit$().subscribe(() => {
// 【PAAS-站点管理】有勾选【SAAS多租户部署】,隐藏【平台注册资料】tab页
if (BASE_CONFIG.global.siteInfo.enableMultiTenancy) {
setFieldState('tabs', state => {
state.props['x-component-props'].hiddenKeys = ['tab-3'];
});
}
});
}
\ No newline at end of file
......@@ -10,6 +10,7 @@ import { useIntl } from 'umi';
import { Row, Col, Spin } from 'antd';
import { usePageStatus } from '@/hooks/usePageStatus';
import { getMemberAbilityMaintenanceDetailAppraisalPage, getMemberAbilityMaintenanceDetailInspectPage, getMemberAbilityMaintenanceDetailRecord, GetMemberAbilityMaintenanceDetailRecordResponse, getMemberAbilityMaintenanceDetailRectifyPage } from '@/services/MemberV2Api';
import BASE_CONFIG from '@/../config/base.config.json';
import { EditableColumns } from '@/components/PolymericTable/interface';
import AnchorPage from '@/components/AnchorPage';
import MemberDocCategory from '../../components/MemberDocCategory';
......@@ -312,15 +313,17 @@ const MemberArchiveInfo = () => {
</Col>
{/* 整改信息 */}
<Col span={24}>
<AnchorPage.Item itemKey="rectifyInfo">
<MemberDocTableList<RectifyListItemType>
title={intl.formatMessage({ id: 'member.management.maintain.detail.archivalInfo.rectify' })}
columns={RectifyColumns}
fetchList={getRectifyList}
/>
</AnchorPage.Item>
</Col>
{!BASE_CONFIG.global.siteInfo.enableMultiTenancy && (
<Col span={24}>
<AnchorPage.Item itemKey="rectifyInfo">
<MemberDocTableList<RectifyListItemType>
title={intl.formatMessage({ id: 'member.management.maintain.detail.archivalInfo.rectify' })}
columns={RectifyColumns}
fetchList={getRectifyList}
/>
</AnchorPage.Item>
</Col>
)}
</Row>
</Spin>
);
......
......@@ -18,8 +18,10 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { getMemberDepositClassifyPage, getMemberDepositPageConditions } from '@/services/MemberV2Api';
import useSpliceArray from '@/hooks/useSpliceArray';
import BASE_CONFIG from '@/../config/base.config.json';
import comingSchema from '../common/schames/comingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn';
import { useQueryComingEffects } from '../common/effects/useQueryComingEffects';
const formActions = createFormActions();
......@@ -109,10 +111,13 @@ const MemberPrComingClassify: React.FC<{}> = props => {
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
if (!BASE_CONFIG.global.siteInfo.enableMultiTenancy) {
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
}
useQueryComingEffects($, actions);
}}
schema={comingSchema}
/>
......
......@@ -18,8 +18,10 @@ import { getMemberDepositInspectPage, getMemberDepositPageConditions } from '@/s
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import useSpliceArray from '@/hooks/useSpliceArray';
import BASE_CONFIG from '@/../config/base.config.json';
import comingSchema from '../common/schames/comingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn';
import { useQueryComingEffects } from '../common/effects/useQueryComingEffects';
const formActions = createFormActions();
......@@ -109,10 +111,13 @@ const MemberPrComingInvestigate: React.FC<{}> = props => {
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
if (!BASE_CONFIG.global.siteInfo.enableMultiTenancy) {
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
}
useQueryComingEffects($, actions);
}}
schema={comingSchema}
/>
......
......@@ -19,8 +19,10 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { getMemberModifyGradeOnePage, getMemberModifyPageConditions, postMemberModifyGradeOneBatch } from '@/services/MemberV2Api';
import useSpliceArray from '@/hooks/useSpliceArray';
import BASE_CONFIG from '@/../config/base.config.json';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyChangeColumn from '../common/columns/verifyChangeColumn';
import { useQueryComingEffects } from '../common/effects/useQueryComingEffects';
const { confirm } = Modal;
......@@ -160,10 +162,13 @@ const MemberPrVerifyChange1: React.FC<{}> = props => {
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
if (!BASE_CONFIG.global.siteInfo.enableMultiTenancy) {
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
}
useQueryComingEffects($, actions);
}}
schema={verifyComingSchema}
/>
......
......@@ -19,8 +19,10 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { getMemberModifyGradeTwoPage, postMemberModifyGradeTwoBatch, getMemberModifyPageConditions } from '@/services/MemberV2Api';
import useSpliceArray from '@/hooks/useSpliceArray';
import BASE_CONFIG from '@/../config/base.config.json';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyChangeColumn from '../common/columns/verifyChangeColumn';
import { useQueryComingEffects } from '../common/effects/useQueryComingEffects';
const { confirm } = Modal;
......@@ -160,10 +162,13 @@ const MemberPrVerifyChange2: React.FC<{}> = props => {
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
if (!BASE_CONFIG.global.siteInfo.enableMultiTenancy) {
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
}
useQueryComingEffects($, actions);
}}
schema={verifyComingSchema}
/>
......
......@@ -19,8 +19,10 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { getMemberModifyConfirmPage, getMemberModifyPageConditions, postMemberModifyConfirmBatch } from '@/services/MemberV2Api';
import useSpliceArray from '@/hooks/useSpliceArray';
import BASE_CONFIG from '@/../config/base.config.json';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyChangeColumn from '../common/columns/verifyChangeColumn';
import { useQueryComingEffects } from '../common/effects/useQueryComingEffects';
const { confirm } = Modal;
......@@ -160,10 +162,13 @@ const MemberPrVerifyChangeConfrim: React.FC<{}> = props => {
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
if (!BASE_CONFIG.global.siteInfo.enableMultiTenancy) {
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
}
useQueryComingEffects($, actions);
}}
schema={verifyComingSchema}
/>
......
......@@ -19,8 +19,10 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { getMemberDepositGradeOnePage, postMemberDepositGradeOneBatch, getMemberDepositPageConditions } from '@/services/MemberV2Api';
import useSpliceArray from '@/hooks/useSpliceArray';
import BASE_CONFIG from '@/../config/base.config.json';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn';
import { useQueryComingEffects } from '../common/effects/useQueryComingEffects';
const { confirm } = Modal;
......@@ -162,10 +164,13 @@ const MemberPrVerifyComing1: React.FC<{}> = props => {
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
if (!BASE_CONFIG.global.siteInfo.enableMultiTenancy) {
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
}
useQueryComingEffects($, actions);
}}
schema={verifyComingSchema}
/>
......
......@@ -19,8 +19,10 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { getMemberDepositGradeTwoPage, postMemberDepositGradeTwoBatch, getMemberDepositPageConditions } from '@/services/MemberV2Api';
import useSpliceArray from '@/hooks/useSpliceArray';
import BASE_CONFIG from '@/../config/base.config.json';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn';
import { useQueryComingEffects } from '../common/effects/useQueryComingEffects';
const { confirm } = Modal;
......@@ -162,10 +164,13 @@ const MemberPrVerifyComing2: React.FC<{}> = props => {
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
if (!BASE_CONFIG.global.siteInfo.enableMultiTenancy) {
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
}
useQueryComingEffects($, actions);
}}
schema={verifyComingSchema}
/>
......
......@@ -19,8 +19,10 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { getMemberDepositConfirmPage, getMemberDepositPageConditions, postMemberDepositConfirmBatch } from '@/services/MemberV2Api';
import useSpliceArray from '@/hooks/useSpliceArray';
import BASE_CONFIG from '@/../config/base.config.json';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn';
import { useQueryComingEffects } from '../common/effects/useQueryComingEffects';
const { confirm } = Modal;
......@@ -162,10 +164,13 @@ const MemberPrVerifyComingConfirm: React.FC<{}> = props => {
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
if (!BASE_CONFIG.global.siteInfo.enableMultiTenancy) {
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
}
useQueryComingEffects($, actions);
}}
schema={verifyComingSchema}
/>
......
......@@ -19,8 +19,10 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { getMemberDepositVerifyPage, postMemberDepositVerifyBatch, getMemberDepositPageConditions } from '@/services/MemberV2Api';
import useSpliceArray from '@/hooks/useSpliceArray';
import BASE_CONFIG from '@/../config/base.config.json';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn';
import { useQueryComingEffects } from '../common/effects/useQueryComingEffects';
const { confirm } = Modal;
......@@ -162,10 +164,13 @@ const MemberPrVerifyComingData: React.FC<{}> = props => {
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
if (!BASE_CONFIG.global.siteInfo.enableMultiTenancy) {
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
}
useQueryComingEffects($, actions);
}}
schema={verifyComingSchema}
/>
......
......@@ -19,8 +19,10 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { getMemberDepositPageConditions, getMemberDepositQualifyPage, postMemberDepositQualifyBatch } from '@/services/MemberV2Api';
import useSpliceArray from '@/hooks/useSpliceArray';
import BASE_CONFIG from '@/../config/base.config.json';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn';
import { useQueryComingEffects } from '../common/effects/useQueryComingEffects';
const { confirm } = Modal;
......@@ -162,10 +164,13 @@ const memberPrVerifyComingQualifications: React.FC<{}> = props => {
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
if (!BASE_CONFIG.global.siteInfo.enableMultiTenancy) {
useAsyncInitSelect(
['memberTypeId', 'roleId', 'source'],
fetchSearchItems,
);
}
useQueryComingEffects($, actions);
}}
schema={verifyComingSchema}
/>
......
......@@ -10,6 +10,7 @@ import { useIntl } from 'umi';
import { Row, Col, Spin } from 'antd';
import { usePageStatus } from '@/hooks/usePageStatus';
import { getMemberAbilityInfoDetailAppraisalPage, getMemberAbilityInfoDetailArchives, GetMemberAbilityInfoDetailArchivesResponse, getMemberAbilityInfoDetailRectifyPage, getMemberAbilityMaintenanceDetailInspectPage } from '@/services/MemberV2Api';
import BASE_CONFIG from '@/../config/base.config.json';
import { EditableColumns } from '@/components/PolymericTable/interface';
import AnchorPage from '@/components/AnchorPage';
import MemberDocIncomingInfo from '../../components/MemberDocIncomingInfo';
......@@ -284,15 +285,17 @@ const MemberArchiveInfo = () => {
</Col>
{/* 整改信息 */}
<Col span={24}>
<AnchorPage.Item itemKey="rectifyInfo">
<MemberDocTableList<RectifyListItemType>
title={intl.formatMessage({ id: 'member.memberQuery.detailed.archiveInfo.RectifyColumns' })}
columns={RectifyColumns}
fetchList={getRectifyList}
/>
</AnchorPage.Item>
</Col>
{!BASE_CONFIG.global.siteInfo.enableMultiTenancy && (
<Col span={24}>
<AnchorPage.Item itemKey="rectifyInfo">
<MemberDocTableList<RectifyListItemType>
title={intl.formatMessage({ id: 'member.memberQuery.detailed.archiveInfo.RectifyColumns' })}
columns={RectifyColumns}
fetchList={getRectifyList}
/>
</AnchorPage.Item>
</Col>
)}
</Row>
</Spin>
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment