From 985b920a71f6eebe307b394bcd72745d66a3a839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=9F=E8=B4=A4?= Date: Fri, 8 Dec 2023 23:17:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=80=E4=BA=9B=E5=B0=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/account/center/index.tsx | 6 ++-- .../analysis/components/IntroduceRow.tsx | 3 +- .../analysis/components/TopSearch.tsx | 2 ++ src/pages/dashboard/monitor/index.tsx | 4 +-- src/pages/dashboard/workplace/index.tsx | 29 ++++++++++--------- src/services/ant-design-pro/api.ts | 12 ++++---- 6 files changed, 31 insertions(+), 25 deletions(-) diff --git a/src/pages/account/center/index.tsx b/src/pages/account/center/index.tsx index f7d77339..3c111c12 100644 --- a/src/pages/account/center/index.tsx +++ b/src/pages/account/center/index.tsx @@ -1,6 +1,6 @@ import { ClusterOutlined, ContactsOutlined, HomeOutlined, PlusOutlined } from '@ant-design/icons'; import { GridContent } from '@ant-design/pro-components'; -import { Link, useRequest } from '@umijs/max'; +import { useRequest } from '@umijs/max'; import { Avatar, Card, Col, Divider, Input, InputRef, Row, Tag } from 'antd'; import React, { useRef, useState } from 'react'; import useStyles from './Center.style'; @@ -226,10 +226,10 @@ const Center: React.FC = () => { {currentUser.notice && currentUser.notice.map((item) => ( - + {item.member} - + ))} diff --git a/src/pages/dashboard/analysis/components/IntroduceRow.tsx b/src/pages/dashboard/analysis/components/IntroduceRow.tsx index 5a070e77..a56ecf3a 100644 --- a/src/pages/dashboard/analysis/components/IntroduceRow.tsx +++ b/src/pages/dashboard/analysis/components/IntroduceRow.tsx @@ -76,7 +76,7 @@ const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: Dat fillOpacity: 0.6, width: '100%', }} - padding={[0, 0, 0, 0]} + padding={-20} data={visitData} /> @@ -98,6 +98,7 @@ const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: Dat @@ -151,6 +152,7 @@ const TopSearch = ({ yField="y" shapeField="smooth" height={45} + padding={-12} style={{ fill: 'linear-gradient(-90deg, white 0%, #6294FA 100%)', fillOpacity: 0.4 }} data={visitData2} axis={false} diff --git a/src/pages/dashboard/monitor/index.tsx b/src/pages/dashboard/monitor/index.tsx index e41d470c..4cbe4a88 100644 --- a/src/pages/dashboard/monitor/index.tsx +++ b/src/pages/dashboard/monitor/index.tsx @@ -90,9 +90,9 @@ const Monitor: FC = () => { thresholds: [20, 40, 60, 80, 100], } as any } - padding={[0, 0, 0, 0]} + padding={-16} style={{ - textContent: () => `优`, + textContent: () => '优', }} meta={{ color: { diff --git a/src/pages/dashboard/workplace/index.tsx b/src/pages/dashboard/workplace/index.tsx index c511785a..f317b342 100644 --- a/src/pages/dashboard/workplace/index.tsx +++ b/src/pages/dashboard/workplace/index.tsx @@ -124,6 +124,7 @@ const Workplace: FC = () => { ); }; + return ( { title={
- {item.title} + {item.title}
} description={item.description} />
- {item.member || ''} + {item.member || ''} {item.updatedAt && ( {dayjs(item.updatedAt).fromNow()} @@ -234,13 +235,13 @@ const Workplace: FC = () => { shapeField="smooth" area={{ style: { - fillOpacity: 0.4 - } + fillOpacity: 0.4, + }, }} axis={{ y: { gridStrokeOpacity: 0.5, - } + }, }} legend={{ color: { @@ -262,14 +263,16 @@ const Workplace: FC = () => { >
- {projectNotice.map((item) => ( - - - - {item.member} - - - ))} + {projectNotice.map((item) => { + return ( + + + + {item.member.substring(0, 3)} + + + ); + })}
diff --git a/src/services/ant-design-pro/api.ts b/src/services/ant-design-pro/api.ts index b42bdfcf..7f9d4a4f 100644 --- a/src/services/ant-design-pro/api.ts +++ b/src/services/ant-design-pro/api.ts @@ -64,10 +64,10 @@ export async function rule( export async function updateRule(options?: { [key: string]: any }) { return request('/api/rule', { method: 'POST', - data:{ + data: { method: 'update', ...(options || {}), - } + }, }); } @@ -75,10 +75,10 @@ export async function updateRule(options?: { [key: string]: any }) { export async function addRule(options?: { [key: string]: any }) { return request('/api/rule', { method: 'POST', - data:{ + data: { method: 'post', ...(options || {}), - } + }, }); } @@ -86,9 +86,9 @@ export async function addRule(options?: { [key: string]: any }) { export async function removeRule(options?: { [key: string]: any }) { return request>('/api/rule', { method: 'POST', - data:{ + data: { method: 'delete', ...(options || {}), - } + }, }); }