Commit 7a889ebb authored by XieZhiXiong's avatar XieZhiXiong

chore: 修改 columns

parent 82be5b43
......@@ -39,13 +39,11 @@ const columns = (target = '/memberCenter/memberAbility/manage/memberPrSubmit/det
},
{
title: '会员类型',
filters: [],
dataIndex: 'memberTypeName',
align: 'center',
},
{
title: '会员角色',
filters: [],
dataIndex: 'roleName',
align: 'center',
},
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-26 10:26:20
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-04 14:21:24
* @LastEditTime: 2021-07-07 17:28:10
* @Description: 待审核会员变更(一级)
*/
import React, { useState, useRef } from 'react';
......@@ -20,7 +20,7 @@ import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { PublicApi } from '@/services/api';
import useSpliceArray from '@/hooks/useSpliceArray';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn';
import verifyChangeColumn from '../common/columns/verifyChangeColumn';
const { confirm } = Modal;
......@@ -34,7 +34,7 @@ const MemberPrVerifyChange1: React.FC<{}> = props => {
history.push(`/memberCenter/memberAbility/manage/memberPrVerifyChange1/verify?validateId=${record.validateId}`);
};
const defaultColumns = verifyComingColumn('/memberCenter/memberAbility/manage/memberPrVerifyChange1/detail').concat([
const defaultColumns = verifyChangeColumn('/memberCenter/memberAbility/manage/memberPrVerifyChange1/detail').concat([
{
title: '操作',
dataIndex: 'option',
......@@ -119,21 +119,6 @@ const MemberPrVerifyChange1: React.FC<{}> = props => {
roles = [],
} = data;
const memberTypeIndex = columns.findIndex((item) => item.dataIndex === 'memberTypeName');
const roleIndex = columns.findIndex((item) => item.dataIndex === 'roleName');
if (memberTypeIndex) {
columnsHandle.replace(memberTypeIndex, {
...columns[memberTypeIndex],
filters: memberTypes.map(item => ({ text: item.memberTypeName, value: item.memberTypeId })),
});
}
if (roleIndex) {
columnsHandle.replace(roleIndex, {
...columns[roleIndex],
filters: roles.map(item => ({ text: item.roleName, value: item.roleId })),
});
}
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
......
......@@ -20,7 +20,7 @@ import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { PublicApi } from '@/services/api';
import useSpliceArray from '@/hooks/useSpliceArray';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn';
import verifyChangeColumn from '../common/columns/verifyChangeColumn';
const { confirm } = Modal;
......@@ -34,7 +34,7 @@ const MemberPrVerifyChange2: React.FC<{}> = props => {
history.push(`/memberCenter/memberAbility/manage/memberPrVerifyChange2/verify?validateId=${record.validateId}`);
};
const defaultColumns = verifyComingColumn('/memberCenter/memberAbility/manage/memberPrVerifyChange2/detail').concat([
const defaultColumns = verifyChangeColumn('/memberCenter/memberAbility/manage/memberPrVerifyChange2/detail').concat([
{
title: '操作',
dataIndex: 'option',
......@@ -119,21 +119,6 @@ const MemberPrVerifyChange2: React.FC<{}> = props => {
roles = [],
} = data;
const memberTypeIndex = columns.findIndex((item) => item.dataIndex === 'memberTypeName');
const roleIndex = columns.findIndex((item) => item.dataIndex === 'roleName');
if (memberTypeIndex) {
columnsHandle.replace(memberTypeIndex, {
...columns[memberTypeIndex],
filters: memberTypes.map(item => ({ text: item.memberTypeName, value: item.memberTypeId })),
});
}
if (roleIndex) {
columnsHandle.replace(roleIndex, {
...columns[roleIndex],
filters: roles.map(item => ({ text: item.roleName, value: item.roleId })),
});
}
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
......
......@@ -20,7 +20,7 @@ import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { PublicApi } from '@/services/api';
import useSpliceArray from '@/hooks/useSpliceArray';
import verifyComingSchema from '../common/schames/verifyComingSchema';
import verifyComingColumn from '../common/columns/verifyComingColumn';
import verifyChangeColumn from '../common/columns/verifyChangeColumn';
const { confirm } = Modal;
......@@ -34,7 +34,7 @@ const MemberPrVerifyChangeConfrim: React.FC<{}> = props => {
history.push(`/memberCenter/memberAbility/manage/memberPrVerifyChangeConfirm/verify?validateId=${record.validateId}`);
};
const defaultColumns = verifyComingColumn('/memberCenter/memberAbility/manage/memberPrVerifyChangeConfirm/detail').concat([
const defaultColumns = verifyChangeColumn('/memberCenter/memberAbility/manage/memberPrVerifyChangeConfirm/detail').concat([
{
title: '操作',
dataIndex: 'option',
......@@ -119,21 +119,6 @@ const MemberPrVerifyChangeConfrim: React.FC<{}> = props => {
roles = [],
} = data;
const memberTypeIndex = columns.findIndex((item) => item.dataIndex === 'memberTypeName');
const roleIndex = columns.findIndex((item) => item.dataIndex === 'roleName');
if (memberTypeIndex) {
columnsHandle.replace(memberTypeIndex, {
...columns[memberTypeIndex],
filters: memberTypes.map(item => ({ text: item.memberTypeName, value: item.memberTypeId })),
});
}
if (roleIndex) {
columnsHandle.replace(roleIndex, {
...columns[roleIndex],
filters: roles.map(item => ({ text: item.roleName, value: item.roleId })),
});
}
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
......
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