Commit 21f0b80c authored by Bill's avatar Bill

fix: 修改考评接口

parent e084f2c5
export default { export default {
// '/api/member': { '/api/member': {
// 'target': 'http://10.0.0.12:8100', 'target': 'http://10.0.0.12:8100',
// 'changeOrigin': true, 'changeOrigin': true,
// 'pathRewrite': { '^/api/member': '/member' }, 'pathRewrite': { '^/api/member': '/member' },
// }, },
'/api': { '/api': {
'target': process.env.BACK_GATEWAY || 'http://10.0.0.10:8100/', 'target': process.env.BACK_GATEWAY || 'http://10.0.0.10:8100/',
'changeOrigin': true, 'changeOrigin': true,
......
...@@ -58,13 +58,13 @@ const memberCenterRoute = { ...@@ -58,13 +58,13 @@ const memberCenterRoute = {
noMargin: true, noMargin: true,
name: '修改个人信息' name: '修改个人信息'
}, },
// { {
// path: `/memberCenter/home`, path: `/memberCenter/home`,
// name: 'home', name: 'home',
// icon: 'home', icon: 'home',
// key: 'home', key: 'home',
// component: '@/pages/home', component: '@/pages/home',
// }, },
// ShopRoute, // ShopRoute,
// CommodityRoute, // CommodityRoute,
// srm开发临时使用... // srm开发临时使用...
...@@ -75,9 +75,9 @@ const memberCenterRoute = { ...@@ -75,9 +75,9 @@ const memberCenterRoute = {
// contracRoute, // contracRoute,
//... //...
// AuthConfigRoute, // AuthConfigRoute,
// MemberRoute, MemberRoute,
// HandlingRoute, HandlingRoute,
...asyncRoutes, // ...asyncRoutes,
{ {
path: '/memberCenter/noAuth', path: '/memberCenter/noAuth',
auth: false, auth: false,
......
...@@ -477,7 +477,8 @@ const MemberRoute: RouterChild = { ...@@ -477,7 +477,8 @@ const MemberRoute: RouterChild = {
{ {
path: '/memberCenter/memberAbility/profile/suggestion/add', path: '/memberCenter/memberAbility/profile/suggestion/add',
name: '新增会员反馈', name: '新增会员反馈',
component: "@/pages/member/memberQuery/suggest/add" component: "@/pages/member/memberQuery/suggest/add",
hideInMenu: true,
}, },
{ {
path: '/memberCenter/memberAbility/profile/suggestion/detail', path: '/memberCenter/memberAbility/profile/suggestion/detail',
......
...@@ -2,23 +2,20 @@ import React, { useMemo } from 'react'; ...@@ -2,23 +2,20 @@ import React, { useMemo } from 'react';
import { Spin, Card, Steps, Table, Progress, Button } from 'antd'; import { Spin, Card, Steps, Table, Progress, Button } from 'antd';
import AnchorPage from '@/layouts/AnchorPage'; import AnchorPage from '@/layouts/AnchorPage';
import theme from '../../../../../config/lingxi.theme.config'; import theme from '../../../../../config/lingxi.theme.config';
import { projectColumns, recordColumn } from '../../memberEvaluate/columns/detail'; import { projectColumns } from '../../memberEvaluate/columns/detail';
import CustomizeColumn from '@/components/CustomizeColumn'; import CustomizeColumn from '@/components/CustomizeColumn';
import AuditProcess from '@/components/AuditProcess';
import useGetDetailCommon from '../../memberEvaluate/hooks/useGetDetailCommon'; import useGetDetailCommon from '../../memberEvaluate/hooks/useGetDetailCommon';
import { usePageStatus } from '@/hooks/usePageStatus'; import { usePageStatus } from '@/hooks/usePageStatus';
import useInitialValue from '../../common/hooks/useInitialValue'; import useInitialValue from '../../common/hooks/useInitialValue';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { GetMemberAppraisalSummaryGetResponse } from '@/services/MemberV2Api'; import { GetMemberAppraisalSummaryGetResponse } from '@/services/MemberV2Api';
import { findLastIndexFlowState } from '@/utils';
import FlowRecords from '@/components/FlowRecords';
const EvaluateDetail = () => { const EvaluateDetail = () => {
const { id } = usePageStatus(); const { id } = usePageStatus();
const params = useMemo(() => { return id ? { id: id.toString() } : null }, [id]); const params = useMemo(() => { return id ? { id: id.toString() } : null }, [id]);
const { loading, initialValue }= useInitialValue<GetMemberAppraisalSummaryGetResponse, { id: string }>(PublicApi.getMemberAppraisalSummaryGet, params) const { loading, initialValue }= useInitialValue<GetMemberAppraisalSummaryGetResponse, { id: string }>(PublicApi.getMemberAppraisalResultGet, params)
const { anchorHeader, basicInfoList, evaluateResultColumn } = useGetDetailCommon({blackList: ['result'], initialValue: initialValue}) const { anchorHeader, basicInfoList, evaluateResultColumn } = useGetDetailCommon({blackList: ['process', 'record'], initialValue: initialValue})
return ( return (
<Spin spinning={loading}> <Spin spinning={loading}>
...@@ -27,35 +24,14 @@ const EvaluateDetail = () => { ...@@ -27,35 +24,14 @@ const EvaluateDetail = () => {
anchors={anchorHeader} anchors={anchorHeader}
// extra={headExtra && headExtra(detailInfo, returnAddress, exchangeAddress)} // extra={headExtra && headExtra(detailInfo, returnAddress, exchangeAddress)}
> >
<AuditProcess
innerVerifySteps={
initialValue && initialValue.verifySteps ?
initialValue.verifySteps.map(item => ({
step: item.step,
stepName: item.stepName,
roleName: item.roleName,
status: initialValue?.currentStep > item.step ? 'finish' : 'wait',
})) :
[]
}
innerVerifyCurrent={findLastIndexFlowState(initialValue?.verifySteps)}
id="progress"
/>
<div style={{ margin: `${theme["@margin-md"]} 0` }}> <div style={{ margin: `${theme["@margin-md"]} 0` }}>
<CustomizeColumn id="detail" data={basicInfoList} title="基本信息" column={3} /> <CustomizeColumn id="detail" data={basicInfoList} title="基本信息" column={3} />
</div> </div>
<Card title="考评项目" id="project" style={{ margin: `${theme["@margin-md"]} 0` }}> <Card title="考评项目" id="project" style={{ margin: `${theme["@margin-md"]} 0` }}>
<Table columns={projectColumns} rowKey="id" dataSource={initialValue?.items}></Table> <Table columns={projectColumns} rowKey="id" dataSource={initialValue?.items}></Table>
</Card> </Card>
<div style={{ margin: `${theme["@margin-md"]} 0` }}> <div style={{ margin: `${theme["@margin-md"]} 0` }} id="result" >
<CustomizeColumn id="result" data={evaluateResultColumn} title="考评结果" /> <CustomizeColumn data={evaluateResultColumn} title="考评结果" />
</div>
<div id="record">
<FlowRecords
innerRowkey="id"
innerColumns={recordColumn as any}
innerDataSource={initialValue?.history}
/>
</div> </div>
</AnchorPage> </AnchorPage>
</Spin> </Spin>
......
...@@ -16,7 +16,7 @@ interface Iprops {}; ...@@ -16,7 +16,7 @@ interface Iprops {};
const List: React.FC<Iprops> = (props: Iprops) => { const List: React.FC<Iprops> = (props: Iprops) => {
const { fetchListData } = useFetchList(); const { fetchListData } = useFetchList();
const handleFetch = async (params) => { const handleFetch = async (params) => {
const result = fetchListData(PublicApi.getMemberAppraisalSummaryPage, params); const result = fetchListData(PublicApi.getMemberAppraisalResultPage, params);
return result return result
} }
......
...@@ -13,13 +13,13 @@ import FormilyCountryPhone from '../../complaintsAndSuggests/components/CountryP ...@@ -13,13 +13,13 @@ import FormilyCountryPhone from '../../complaintsAndSuggests/components/CountryP
import FormilyCustomizeRadioButton from '../../complaintsAndSuggests/components/CustomizeRadioButton/FormilyCustomizeRadioButton'; import FormilyCustomizeRadioButton from '../../complaintsAndSuggests/components/CustomizeRadioButton/FormilyCustomizeRadioButton';
import useModal from '../../memberEvaluate/hooks/useModal'; import useModal from '../../memberEvaluate/hooks/useModal';
import TableModal from '../../components/TableModal'; import TableModal from '../../components/TableModal';
import { memberColumns } from '../../memberInspection/common/columns/memberColumns'; import { memberColumns } from './common/columns/memberColumn';
import { userColumns } from '../../memberInspection/common/columns/userColumns'; import { userColumns } from '../../memberInspection/common/columns/userColumns';
import { memberSchema, userSchema } from '../../memberInspection/common/schema/add' import { memberSchema, userSchema } from '../../memberInspection/common/schema/add'
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'; import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { GetMemberInspectMembersRequest, GetMemberInspectMembersResponse, GetMemberInspectUsersRequest, GetMemberInspectUsersResponse } from '@/services/MemberV2Api'; import { GetMemberComplaintSubMembersResponse, GetMemberInspectMembersRequest, GetMemberInspectMembersResponse, GetMemberInspectUsersRequest, GetMemberInspectUsersResponse } from '@/services/MemberV2Api';
import { usePageStatus } from '@/hooks/usePageStatus'; import { usePageStatus } from '@/hooks/usePageStatus';
import useInitialValue from '../../common/hooks/useInitialValue'; import useInitialValue from '../../common/hooks/useInitialValue';
...@@ -132,18 +132,18 @@ const SuggestAdd = () => { ...@@ -132,18 +132,18 @@ const SuggestAdd = () => {
} }
const handleFetchData = useCallback(async (params: GetMemberInspectMembersRequest) => { const handleFetchData = useCallback(async (params: GetMemberInspectMembersRequest) => {
const { data, code } = await PublicApi.getMemberInspectMembers(params); const { data, code } = await PublicApi.getMemberComplaintSubMembers(params);
if (code === 1000) { if (code === 1000) {
return data; return data;
} }
return DEFAULT_RETURN_DATA return DEFAULT_RETURN_DATA
}, []) }, [])
const handleOnOk = (selectRowKeys: string[] | number[], selectRowRecord: GetMemberInspectMembersResponse["data"] ) => { const handleOnOk = (selectRowKeys: string[] | number[], selectRowRecord: GetMemberComplaintSubMembersResponse["data"] ) => {
const target = selectRowRecord[0]; const target = selectRowRecord[0];
formActions.setFieldValue('memberName', target.name) formActions.setFieldValue('memberName', target?.upperName)
formActions.setFieldValue('memberId', target.subMemberId); formActions.setFieldValue('memberId', target?.memberId);
formActions.setFieldValue('roleId', target.subRoleId); formActions.setFieldValue('roleId', target?.roleId);
setMemberModalValue(selectRowRecord) setMemberModalValue(selectRowRecord)
toggle(false) toggle(false)
...@@ -230,7 +230,7 @@ const SuggestAdd = () => { ...@@ -230,7 +230,7 @@ const SuggestAdd = () => {
onOk={handleOnOk} onOk={handleOnOk}
fetchData={handleFetchData} fetchData={handleFetchData}
tableProps={{ tableProps={{
rowKey: (record) => `${record.subMemberId}_${record.subRoleId}`, rowKey: (record) => `${record.memberId}_${record.roleId}`,
}} }}
mode={"radio"} mode={"radio"}
value={memberModalValue} value={memberModalValue}
......
import { ColumnsType } from 'antd/es/table';
export const memberColumns: ColumnsType<any> = [
{
title: '会员ID',
dataIndex: 'memberId',
},
{
title: '会员名称',
dataIndex: 'upperName',
},
{
title: '会员类型',
dataIndex: 'memberTypeName',
},
{
title: '会员角色',
dataIndex: 'roleName',
},
{
title: '会员等级',
dataIndex: 'levelTag',
},
]
...@@ -120,8 +120,8 @@ class ApiRequest { ...@@ -120,8 +120,8 @@ class ApiRequest {
baseRequest<IRequestSuccess<T>>(url, options).then(res => { baseRequest<IRequestSuccess<T>>(url, options).then(res => {
// 登录验证 // 登录验证
if (res.code === 1101) { if (res.code === 1101) {
removeAuth() // removeAuth()
window.location.replace(`/user/login?redirect=${btoa(encodeURIComponent(String(window.location)))}`) // window.location.replace(`/user/login?redirect=${btoa(encodeURIComponent(String(window.location)))}`)
message.destroy() message.destroy()
message.error(res.message) message.error(res.message)
reject(res) reject(res)
......
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