Browse Source

优化一些小问题

pull/11096/head
期贤 2 years ago
parent
commit
985b920a71
  1. 6
      src/pages/account/center/index.tsx
  2. 3
      src/pages/dashboard/analysis/components/IntroduceRow.tsx
  3. 2
      src/pages/dashboard/analysis/components/TopSearch.tsx
  4. 4
      src/pages/dashboard/monitor/index.tsx
  5. 23
      src/pages/dashboard/workplace/index.tsx
  6. 12
      src/services/ant-design-pro/api.ts

6
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) => (
<Col key={item.id} lg={24} xl={12}>
<Link to={item.href}>
<a href={item.href}>
<Avatar size="small" src={item.logo} />
{item.member}
</Link>
</a>
</Col>
))}
</Row>

3
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}
/>
</ChartCard>
@ -98,6 +98,7 @@ const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: Dat
<Column
xField="x"
yField="y"
padding={-20}
axis={false}
height={46}
data={visitData}

2
src/pages/dashboard/analysis/components/TopSearch.tsx

@ -117,6 +117,7 @@ const TopSearch = ({
shapeField="smooth"
height={45}
axis={false}
padding={-12}
style={{ fill: 'linear-gradient(-90deg, white 0%, #6294FA 100%)', fillOpacity: 0.4 }}
data={visitData2}
/>
@ -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}

4
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: {

23
src/pages/dashboard/workplace/index.tsx

@ -124,6 +124,7 @@ const Workplace: FC = () => {
</List.Item>
);
};
return (
<PageContainer
content={
@ -168,13 +169,13 @@ const Workplace: FC = () => {
title={
<div className={styles.cardTitle}>
<Avatar size="small" src={item.logo} />
<Link to={item.href}>{item.title}</Link>
<Link to={item.href || '/'}>{item.title}</Link>
</div>
}
description={item.description}
/>
<div className={styles.projectItemContent}>
<Link to={item.memberLink}>{item.member || ''}</Link>
<Link to={item.memberLink || '/'}>{item.member || ''}</Link>
{item.updatedAt && (
<span className={styles.datetime} title={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 = () => {
>
<div className={styles.members}>
<Row gutter={48}>
{projectNotice.map((item) => (
{projectNotice.map((item) => {
return (
<Col span={12} key={`members-item-${item.id}`}>
<Link to={item.href}>
<a>
<Avatar src={item.logo} size="small" />
<span className={styles.member}>{item.member}</span>
</Link>
<span className={styles.member}>{item.member.substring(0, 3)}</span>
</a>
</Col>
))}
);
})}
</Row>
</div>
</Card>

12
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.RuleListItem>('/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.RuleListItem>('/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<Record<string, any>>('/api/rule', {
method: 'POST',
data:{
data: {
method: 'delete',
...(options || {}),
}
},
});
}

Loading…
Cancel
Save