Commit 21f0b80c authored by Bill's avatar Bill

fix: 修改考评接口

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