Commit 42462fe1 authored by Bill's avatar Bill

fix: 首页权限hook修改

parent 6d3e201c
...@@ -767,6 +767,11 @@ const MemberRoute: RouterChild = { ...@@ -767,6 +767,11 @@ const MemberRoute: RouterChild = {
path: '/memberCenter/memberAbility/memberWarning/tobeHandle', path: '/memberCenter/memberAbility/memberWarning/tobeHandle',
name: '待处理预警', name: '待处理预警',
component: '@/pages/member/memberWarning/tobeHandleWarning' component: '@/pages/member/memberWarning/tobeHandleWarning'
},
{
path: '/memberCenter/memberAbility/memberWarning/ruleSetting',
name: '预警规则设置',
component: '@/pages/member/memberWarning/ruleSetting'
} }
] ]
}, },
......
...@@ -5,7 +5,7 @@ import Authorize from '../Authorize'; ...@@ -5,7 +5,7 @@ import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import { GetReportMemberHomeGetAfterSaleTallyResponse } from '@/services/ReportApi'; import { GetReportMemberHomeGetAfterSaleTallyResponse } from '@/services/ReportApi';
import Layout from './layout'; import Layout from './layout';
import useGetAuth from '../../hooks/uesGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {}; interface Iprops {};
......
...@@ -10,7 +10,7 @@ import { getAuth } from '@/utils/auth'; ...@@ -10,7 +10,7 @@ import { getAuth } from '@/utils/auth';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import { GetTemplateWebMemberChannelWebFindCurrMemberChannelResponse } from '@/services/TemplateV2Api'; import { GetTemplateWebMemberChannelWebFindCurrMemberChannelResponse } from '@/services/TemplateV2Api';
import Layout from './layout'; import Layout from './layout';
import useGetAuth from '../../hooks/uesGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {} interface Iprops {}
const SHOP_CENTER = '/memberCenter/channelAbility/infoManage' const SHOP_CENTER = '/memberCenter/channelAbility/infoManage'
......
...@@ -3,9 +3,8 @@ import Layout, { IDataListProps } from './layout'; ...@@ -3,9 +3,8 @@ import Layout, { IDataListProps } from './layout';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { GetReportMemberHomeGetContractTallyResponse } from '@/services/ReportApi'; import { GetReportMemberHomeGetContractTallyResponse } from '@/services/ReportApi';
import styles from './center.less'
import { Link } from 'umi'; import { Link } from 'umi';
import useGetAuth from '../../hooks/uesGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
const { StaticsDataList, AlertTip } = Layout const { StaticsDataList, AlertTip } = Layout
......
...@@ -11,7 +11,7 @@ import { getAuth } from '@/utils/auth'; ...@@ -11,7 +11,7 @@ import { getAuth } from '@/utils/auth';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import Layout, { IDataListProps } from './layout'; import Layout, { IDataListProps } from './layout';
import { GetReportMemberHomeGetAccountTallyResponse } from '@/services/ReportApi'; import { GetReportMemberHomeGetAccountTallyResponse } from '@/services/ReportApi';
import useGetAuth from '../../hooks/uesGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {}; interface Iprops {};
const KEY_TO_TITLE = { const KEY_TO_TITLE = {
......
...@@ -12,7 +12,7 @@ import { getAuth } from '@/utils/auth'; ...@@ -12,7 +12,7 @@ import { getAuth } from '@/utils/auth';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import Layout from './layout'; import Layout from './layout';
import { GetReportMemberHomeGetLogisticsTallyResponse } from '@/services/ReportApi/id3280'; import { GetReportMemberHomeGetLogisticsTallyResponse } from '@/services/ReportApi/id3280';
import useGetAuth from '../../hooks/uesGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {}; interface Iprops {};
......
...@@ -5,7 +5,7 @@ import Layout, { IDataListProps } from './layout'; ...@@ -5,7 +5,7 @@ import Layout, { IDataListProps } from './layout';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import { GetReportMemberHomeGetMemberTallyResponse, GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api'; import { GetReportMemberHomeGetMemberTallyResponse, GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api';
import useGetAuth from '../../hooks/uesGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {}; interface Iprops {};
const { StaticsDataList } = Layout const { StaticsDataList } = Layout
......
...@@ -5,7 +5,7 @@ import Layout from './layout'; ...@@ -5,7 +5,7 @@ import Layout from './layout';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import { GetReportMemberHomeGetOrderTallyResponse, GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api'; import { GetReportMemberHomeGetOrderTallyResponse, GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api';
import useGetAuth from '../../hooks/uesGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {}; interface Iprops {};
const { StaticsDataList } = Layout const { StaticsDataList } = Layout
......
...@@ -5,7 +5,7 @@ import { Link } from 'umi' ...@@ -5,7 +5,7 @@ import { Link } from 'umi'
import Layout from './layout'; import Layout from './layout';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import useGetAuth from '../../hooks/uesGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
import { GetReportMemberHomeGetEnhanceTallyResponse } from '@/services/ReportV2Api'; import { GetReportMemberHomeGetEnhanceTallyResponse } from '@/services/ReportV2Api';
interface Iprops {}; interface Iprops {};
......
...@@ -6,7 +6,7 @@ import { Link } from 'umi'; ...@@ -6,7 +6,7 @@ import { Link } from 'umi';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import Layout from './layout'; import Layout from './layout';
import useGetAuth from '../../hooks/uesGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
import { GetReportMemberHomeGetCommodityTallyResponse } from '@/services/ReportV2Api'; import { GetReportMemberHomeGetCommodityTallyResponse } from '@/services/ReportV2Api';
interface Iprops {}; interface Iprops {};
......
...@@ -8,8 +8,7 @@ import useViewRequest from '../../hooks/useViewRequest'; ...@@ -8,8 +8,7 @@ import useViewRequest from '../../hooks/useViewRequest';
import { GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api'; import { GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api';
import { BellOutlined } from '@ant-design/icons'; import { BellOutlined } from '@ant-design/icons';
import {Button} from 'antd'; import {Button} from 'antd';
import { getAuth } from '@/utils/auth'; import useGetAuth from '../../hooks/useGetAuth';
import useGetAuth from '../../hooks/uesGetAuth';
interface Iprops {}; interface Iprops {};
const { StaticsDataList } = Layout const { StaticsDataList } = Layout
......
...@@ -8,7 +8,7 @@ import { PublicApi } from '@/services/api' ...@@ -8,7 +8,7 @@ import { PublicApi } from '@/services/api'
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import { GetReportMemberHomeGetSettleAccountTallyResponse } from '@/services/ReportApi'; import { GetReportMemberHomeGetSettleAccountTallyResponse } from '@/services/ReportApi';
import Layout from './layout'; import Layout from './layout';
import useGetAuth from '../../hooks/uesGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {}; interface Iprops {};
const KEY_TITLE = { const KEY_TITLE = {
......
...@@ -4,7 +4,7 @@ import { Link } from 'umi' ...@@ -4,7 +4,7 @@ import { Link } from 'umi'
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import Layout from './layout'; import Layout from './layout';
import useGetAuth from '../../hooks/uesGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
import { GetReportMemberHomeGetTradeTallyResponse } from '@/services/ReportV2Api'; import { GetReportMemberHomeGetTradeTallyResponse } from '@/services/ReportV2Api';
interface Iprops {}; interface Iprops {};
......
...@@ -42,7 +42,7 @@ const collection2Obj = <T, >(list: T[], name: string, isCover?: boolean) => { ...@@ -42,7 +42,7 @@ const collection2Obj = <T, >(list: T[], name: string, isCover?: boolean) => {
const useGetAuth = () => { const useGetAuth = () => {
const userAuth = getAuth(); const userAuth = getAuth();
const cacheAuth = useMemo(() => userAuth, [userAuth]); const cacheAuth = useMemo(() => userAuth, [userAuth]);
const urls = useMemo(() => cacheAuth.urls, []) const urls = useMemo(() => cacheAuth.urls, [cacheAuth])
const abilityUrls = useMemo(() => { const abilityUrls = useMemo(() => {
return { return {
......
...@@ -12,7 +12,7 @@ import { TradeCenter, FundCenter, ShopCenter, ProductCenter, SettlementCenter, ...@@ -12,7 +12,7 @@ import { TradeCenter, FundCenter, ShopCenter, ProductCenter, SettlementCenter,
import styles from './index.less' import styles from './index.less'
import { CompassFilled } from '@ant-design/icons'; import { CompassFilled } from '@ant-design/icons';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import useGetAuth from './hooks/uesGetAuth'; import useGetAuth from './hooks/useGetAuth';
const ComponentSelect = { const ComponentSelect = {
"会员中心": MemberCenter, "会员中心": 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 = { ...@@ -12,9 +12,9 @@ const querySchema: ISchema = {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '搜索', placeholder: '搜索会员名称',
align: 'flex-left', align: 'flex-left',
tip: '输入用户名进行搜索', tip: '输入会员名称进行搜索',
}, },
}, },
[FORM_FILTER_PATH]: { [FORM_FILTER_PATH]: {
...@@ -27,13 +27,39 @@ const querySchema: ISchema = { ...@@ -27,13 +27,39 @@ const querySchema: ISchema = {
columns: 6, columns: 6,
}, },
properties: { properties: {
summary: { handler: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '通知单摘要', placeholder: "处理热闹"
allowClear: true,
}, },
}, },
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: { submit: {
'x-component': 'Submit', 'x-component': 'Submit',
'x-component-props': { '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 React from 'react';
import { Card, Space, Button } from 'antd' import { Card, Space, Button } from 'antd'
import tobeHandleColumns from '../common/columns/tobeHandleColumns'; 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 useFetchList from '../../memberEvaluate/hooks/useFetchList';
import { PlusOutlined } from '@ant-design/icons';
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';
......
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