feat: 修改首页

This commit is contained in:
2025-10-21 12:37:44 +08:00
parent 84ddcac0ac
commit cf12bc56cd
5 changed files with 14 additions and 9 deletions
+5 -2
View File
@@ -19,9 +19,12 @@
"Bash(npm run start:*)", "Bash(npm run start:*)",
"Bash(npm start)", "Bash(npm start)",
"Bash(npm run build:*)", "Bash(npm run build:*)",
"Bash(dir:*)" "Bash(dir:*)",
"Bash(git add:*)",
"Bash(git commit -m \"$(cat <<''EOF''\nfix: 修复首页分账计算模块显示问题\n\n- 显示被隐藏的分账计算模块(移除 display: ''none'')\n- 调整 platformSharePercent 状态变量定义顺序\n- 优化 Slider 组件:\n - 设置标记文字颜色为深灰色 (#666),避免看不清\n - 添加 tooltip 提示框,拖动时显示当前百分比\n - 设置 tooltip 背景为深色,文字为白色,确保清晰可见\n- 移除重复的 90% 标记,只保留 0%、50%、100%\n\n🤖 Generated with Claude Code\n\nCo-Authored-By: Claude <noreply@anthropic.com>\nEOF\n)\")",
"Bash(git commit:*)"
], ],
"deny": [], "deny": [],
"ask": [] "ask": []
} }
} }
+1 -1
View File
@@ -12,7 +12,7 @@
"build:pre": "cross-env NODE_OPTIONS=--openssl-legacy-provider REACT_APP_ENV=pre API_PREFIX=http://119.45.169.13:9900 umi build", "build:pre": "cross-env NODE_OPTIONS=--openssl-legacy-provider REACT_APP_ENV=pre API_PREFIX=http://119.45.169.13:9900 umi build",
"build:prod": "cross-env NODE_OPTIONS=--openssl-legacy-provider REACT_APP_ENV=prod umi build", "build:prod": "cross-env NODE_OPTIONS=--openssl-legacy-provider REACT_APP_ENV=prod umi build",
"build:test:mgnt": "cross-env NODE_OPTIONS=--openssl-legacy-provider REACT_APP_ENV=test APP_BASE=/mgnt API_PREFIX=https://local.goflytec.com:9999 umi build", "build:test:mgnt": "cross-env NODE_OPTIONS=--openssl-legacy-provider REACT_APP_ENV=test APP_BASE=/mgnt API_PREFIX=https://local.goflytec.com:9999 umi build",
"build:pre:mgnt": "cross-env NODE_OPTIONS=--openssl-legacy-provider REACT_APP_ENV=pre APP_BASE=/mgnt API_PREFIX=https://local.goflytec.com:9900 umi build", "build:pre:mgnt": "cross-env NODE_OPTIONS=--openssl-legacy-provider REACT_APP_ENV=pre APP_BASE=/mgnt API_PREFIX=https://local.goflytec.com umi build",
"build:prod:mgnt": "cross-env NODE_OPTIONS=--openssl-legacy-provider REACT_APP_ENV=prod APP_BASE=/mgnt umi build", "build:prod:mgnt": "cross-env NODE_OPTIONS=--openssl-legacy-provider REACT_APP_ENV=prod APP_BASE=/mgnt umi build",
"lint": "eslint --ext .ts,.tsx src", "lint": "eslint --ext .ts,.tsx src",
"tsc": "tsc --noEmit" "tsc": "tsc --noEmit"
@@ -90,9 +90,10 @@ const TenantScopeFilter: React.FC<Props> = ({ onChanged, useSwitchTenant = false
showSearch showSearch
loading={loading} loading={loading}
treeNodeFilterProp="title" treeNodeFilterProp="title"
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }} // 为避免被父容器(如卡片、图表)裁剪,提升弹层层级并挂载到 body
dropdownStyle={{ maxHeight: 400, overflow: 'auto', zIndex: 9999 as any }}
dropdownMatchSelectWidth dropdownMatchSelectWidth
getPopupContainer={(trigger) => (trigger?.parentElement as HTMLElement) || document.body} getPopupContainer={() => document.body}
placeholder="选择租户(含子租户)" placeholder="选择租户(含子租户)"
value={tenantId} value={tenantId}
onChange={(val) => setTenantId(val)} onChange={(val) => setTenantId(val)}
@@ -100,7 +100,9 @@ const TenantSelector: React.FC<TenantSelectorProps> = ({
showSearch showSearch
treeNodeFilterProp='title' treeNodeFilterProp='title'
loading={loading} loading={loading}
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }} // 为避免被父容器(如卡片、图表)裁剪,提升弹层层级并挂载到 body
dropdownStyle={{ maxHeight: 400, overflow: 'auto', zIndex: 9999 as any }}
getPopupContainer={() => document.body}
placeholder='选择租户(含子租户)' placeholder='选择租户(含子租户)'
treeData={toTreeData(tree)} treeData={toTreeData(tree)}
allowClear allowClear
@@ -116,4 +118,3 @@ const TenantSelector: React.FC<TenantSelectorProps> = ({
}; };
export default TenantSelector; export default TenantSelector;
+2 -2
View File
@@ -1,4 +1,4 @@
import React, { useEffect, useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
import { Card, Space, Typography, Row, Col, Button, message, DatePicker, Segmented, List, Tag, Statistic, Grid, Slider, InputNumber } from 'antd'; import { Card, Space, Typography, Row, Col, Button, message, DatePicker, Segmented, List, Tag, Statistic, Grid, Slider, InputNumber } from 'antd';
import { ReloadOutlined } from '@ant-design/icons'; import { ReloadOutlined } from '@ant-design/icons';
import { Line, Pie } from '@ant-design/plots'; import { Line, Pie } from '@ant-design/plots';
@@ -333,7 +333,7 @@ const Welcome: React.FC = () => {
<Statistic value={netIncomeYuan} precision={2} valueStyle={{ fontWeight: 600, whiteSpace: 'nowrap' }} /> <Statistic value={netIncomeYuan} precision={2} valueStyle={{ fontWeight: 600, whiteSpace: 'nowrap' }} />
</Col> </Col>
</Row> </Row>
</Space> </Space>
</Card> </Card>
</Col> </Col>