Commit 42462fe1 authored by Bill's avatar Bill

fix: 首页权限hook修改

parent 6d3e201c
......@@ -767,6 +767,11 @@ const MemberRoute: RouterChild = {
path: '/memberCenter/memberAbility/memberWarning/tobeHandle',
name: '待处理预警',
component: '@/pages/member/memberWarning/tobeHandleWarning'
},
{
path: '/memberCenter/memberAbility/memberWarning/ruleSetting',
name: '预警规则设置',
component: '@/pages/member/memberWarning/ruleSetting'
}
]
},
......
......@@ -5,7 +5,7 @@ import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest';
import { GetReportMemberHomeGetAfterSaleTallyResponse } from '@/services/ReportApi';
import Layout from './layout';
import useGetAuth from '../../hooks/uesGetAuth';
import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {};
......
......@@ -10,7 +10,7 @@ import { getAuth } from '@/utils/auth';
import useViewRequest from '../../hooks/useViewRequest';
import { GetTemplateWebMemberChannelWebFindCurrMemberChannelResponse } from '@/services/TemplateV2Api';
import Layout from './layout';
import useGetAuth from '../../hooks/uesGetAuth';
import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {}
const SHOP_CENTER = '/memberCenter/channelAbility/infoManage'
......
......@@ -3,9 +3,8 @@ import Layout, { IDataListProps } from './layout';
import useViewRequest from '../../hooks/useViewRequest';
import { PublicApi } from '@/services/api';
import { GetReportMemberHomeGetContractTallyResponse } from '@/services/ReportApi';
import styles from './center.less'
import { Link } from 'umi';
import useGetAuth from '../../hooks/uesGetAuth';
import useGetAuth from '../../hooks/useGetAuth';
import Authorize from '../Authorize';
const { StaticsDataList, AlertTip } = Layout
......
......@@ -11,7 +11,7 @@ import { getAuth } from '@/utils/auth';
import useViewRequest from '../../hooks/useViewRequest';
import Layout, { IDataListProps } from './layout';
import { GetReportMemberHomeGetAccountTallyResponse } from '@/services/ReportApi';
import useGetAuth from '../../hooks/uesGetAuth';
import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {};
const KEY_TO_TITLE = {
......
......@@ -12,7 +12,7 @@ import { getAuth } from '@/utils/auth';
import useViewRequest from '../../hooks/useViewRequest';
import Layout from './layout';
import { GetReportMemberHomeGetLogisticsTallyResponse } from '@/services/ReportApi/id3280';
import useGetAuth from '../../hooks/uesGetAuth';
import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {};
......
......@@ -5,7 +5,7 @@ import Layout, { IDataListProps } from './layout';
import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest';
import { GetReportMemberHomeGetMemberTallyResponse, GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api';
import useGetAuth from '../../hooks/uesGetAuth';
import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {};
const { StaticsDataList } = Layout
......
......@@ -5,7 +5,7 @@ import Layout from './layout';
import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest';
import { GetReportMemberHomeGetOrderTallyResponse, GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api';
import useGetAuth from '../../hooks/uesGetAuth';
import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {};
const { StaticsDataList } = Layout
......
......@@ -5,7 +5,7 @@ import { Link } from 'umi'
import Layout from './layout';
import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest';
import useGetAuth from '../../hooks/uesGetAuth';
import useGetAuth from '../../hooks/useGetAuth';
import { GetReportMemberHomeGetEnhanceTallyResponse } from '@/services/ReportV2Api';
interface Iprops {};
......
......@@ -6,7 +6,7 @@ import { Link } from 'umi';
import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest';
import Layout from './layout';
import useGetAuth from '../../hooks/uesGetAuth';
import useGetAuth from '../../hooks/useGetAuth';
import { GetReportMemberHomeGetCommodityTallyResponse } from '@/services/ReportV2Api';
interface Iprops {};
......
......@@ -8,8 +8,7 @@ import useViewRequest from '../../hooks/useViewRequest';
import { GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api';
import { BellOutlined } from '@ant-design/icons';
import {Button} from 'antd';
import { getAuth } from '@/utils/auth';
import useGetAuth from '../../hooks/uesGetAuth';
import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {};
const { StaticsDataList } = Layout
......
......@@ -8,7 +8,7 @@ import { PublicApi } from '@/services/api'
import useViewRequest from '../../hooks/useViewRequest';
import { GetReportMemberHomeGetSettleAccountTallyResponse } from '@/services/ReportApi';
import Layout from './layout';
import useGetAuth from '../../hooks/uesGetAuth';
import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {};
const KEY_TITLE = {
......
......@@ -4,7 +4,7 @@ import { Link } from 'umi'
import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest';
import Layout from './layout';
import useGetAuth from '../../hooks/uesGetAuth';
import useGetAuth from '../../hooks/useGetAuth';
import { GetReportMemberHomeGetTradeTallyResponse } from '@/services/ReportV2Api';
interface Iprops {};
......
......@@ -42,7 +42,7 @@ const collection2Obj = <T, >(list: T[], name: string, isCover?: boolean) => {
const useGetAuth = () => {
const userAuth = getAuth();
const cacheAuth = useMemo(() => userAuth, [userAuth]);
const urls = useMemo(() => cacheAuth.urls, [])
const urls = useMemo(() => cacheAuth.urls, [cacheAuth])
const abilityUrls = useMemo(() => {
return {
......
......@@ -12,7 +12,7 @@ import { TradeCenter, FundCenter, ShopCenter, ProductCenter, SettlementCenter,
import styles from './index.less'
import { CompassFilled } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import useGetAuth from './hooks/uesGetAuth';
import useGetAuth from './hooks/useGetAuth';
const ComponentSelect = {
"会员中心": MemberCenter,
......
import { ColumnsType } from 'antd/es/table';
/**
* 列表页column
*/
const listColumns: ColumnsType<any> = [
{
title: '序号',
dataIndex: 'no',
},
{
title: '预警条件',
dataIndex: 'memberName',
},
{
title: '预警提示语',
dataIndex: 'project',
},
{
title: '预警提示语',
dataIndex: 'notice',
},
]
export default listColumns;
......@@ -12,9 +12,9 @@ const querySchema: ISchema = {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
placeholder: '搜索会员名称',
align: 'flex-left',
tip: '输入用户名进行搜索',
tip: '输入会员名称进行搜索',
},
},
[FORM_FILTER_PATH]: {
......@@ -27,13 +27,39 @@ const querySchema: ISchema = {
columns: 6,
},
properties: {
summary: {
handler: {
type: 'string',
'x-component-props': {
placeholder: '通知单摘要',
allowClear: true,
placeholder: "处理热闹"
},
},
project: {
type: "string",
enum: [],
'x-component-props': {
placeholder: "预警项目"
},
},
level: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '预警级别'
},
},
rangeDate: {
type: 'daterange',
'x-component-props': {
placeholder: ["预警开始日期", "预警截止日期"]
}
},
handleDate: {
type: 'daterange',
'x-component-props': {
placeholder: ["处理开始日期", "处理截止日期"]
}
},
submit: {
'x-component': 'Submit',
'x-component-props': {
......
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ISchema } from '@formily/antd';
const querySchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索会员名称',
align: 'flex-left',
tip: '输入会员名称进行搜索',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
full: true,
autoRow: true,
columns: 6,
},
properties: {
project: {
type: "string",
enum: [],
'x-component-props': {
placeholder: "预警项目"
},
},
level: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '预警级别'
},
},
rangeDate: {
type: 'daterange',
'x-component-props': {
placeholder: ["预警开始日期", "预警截止日期"]
}
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
export default querySchema
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Input, Select, Table } from 'antd';
import ruleColumns from '../common/columns/ruleColumns';
import { PublicApi } from '@/services/api';
import { ColumnsType } from 'antd/es/table';
import { useDebounceFn } from '@umijs/hooks';
const AllQuery = () => {
const [dataSource, setDataSource] = useState([]);
const [page, setPage] = useState<number>(1);
const [pageSize, setPageSize] = useState<number>(10);
const handleSetValue = (params: { dataIndex: string, value: string, index: number }) => {
const { index, dataIndex, value } = params;
}
const columns = useMemo<ColumnsType<any>>(() => {
return [
{
title: '序号',
dataIndex: 'no',
},
{
title: '预警条件',
dataIndex: 'memberName',
},
{
title: '预警提示语',
dataIndex: 'project',
},
{
title: '预警提示语',
dataIndex: 'notice',
},
{
title: '预警值',
dataIndex: 'value',
render: (text, record, index) => {
return <Input value={text} onChange={(e) => handleSetValue({ dataIndex: 'value', value: e.target.value, index: index})}/>
}
},
{
title: '预警值',
dataIndex: 'value',
render: (text, record) => {
return <Select value={text} />
}
}
]
}, [])
return (
<PageHeaderWrapper
title={'预警规则设置'}
>
<Card>
<Table
columns={columns}
dataSource={dataSource}
></Table>
</Card>
</PageHeaderWrapper>
)
}
export default AllQuery
import React from 'react';
import { Card, Space, Button } from 'antd'
import tobeHandleColumns from '../common/columns/tobeHandleColumns';
import querySchema from '../common/schema/querySchema';
import querySchema from '../common/schema/tobeHandleQuerySchema';
import useFetchList from '../../memberEvaluate/hooks/useFetchList';
import { PlusOutlined } from '@ant-design/icons';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { PublicApi } from '@/services/api';
......
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