Compare commits
3 Commits
dfe21d432d
...
f5244f3e66
Author | SHA1 | Date | |
---|---|---|---|
f5244f3e66 | |||
5369d3051e | |||
ab19e7a9ba |
15
Doc/config-in-network
Normal file
15
Doc/config-in-network
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[core]
|
||||||
|
repositoryformatversion = 0
|
||||||
|
filemode = false
|
||||||
|
bare = false
|
||||||
|
logallrefupdates = true
|
||||||
|
symlinks = false
|
||||||
|
ignorecase = true
|
||||||
|
[remote "origin"]
|
||||||
|
url = http://10.10.14.176:3000/huanghai/YunNanProject.git
|
||||||
|
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||||
|
[branch "main"]
|
||||||
|
remote = origin
|
||||||
|
merge = refs/heads/main
|
||||||
|
vscode-merge-base = origin/main
|
||||||
|
vscode-merge-base = origin/main
|
15
Doc/config-out-network
Normal file
15
Doc/config-out-network
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[core]
|
||||||
|
repositoryformatversion = 0
|
||||||
|
filemode = false
|
||||||
|
bare = false
|
||||||
|
logallrefupdates = true
|
||||||
|
symlinks = false
|
||||||
|
ignorecase = true
|
||||||
|
[remote "origin"]
|
||||||
|
url = http://www.hzkjai.com:27010/huanghai/YunNanProject.git
|
||||||
|
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||||
|
[branch "main"]
|
||||||
|
remote = origin
|
||||||
|
merge = refs/heads/main
|
||||||
|
vscode-merge-base = origin/main
|
||||||
|
vscode-merge-base = origin/main
|
@@ -51,6 +51,10 @@ class RuYuanZaiYuanModel:
|
|||||||
# 计算总和作为总入园数,而非使用文件中的total字段
|
# 计算总和作为总入园数,而非使用文件中的total字段
|
||||||
calculated_total = enroll_data.get("urban", 0) + enroll_data.get("town", 0) + enroll_data.get("rural", 0)
|
calculated_total = enroll_data.get("urban", 0) + enroll_data.get("town", 0) + enroll_data.get("rural", 0)
|
||||||
total_enroll.append(calculated_total / 10000) # 转换为万人
|
total_enroll.append(calculated_total / 10000) # 转换为万人
|
||||||
|
# print(f"{year}年城区入园数: {enroll_data.get('urban', 0)}")
|
||||||
|
# print(f"{year}年镇区入园数: {enroll_data.get('town', 0)}")
|
||||||
|
# print(f"{year}年乡村入园数: {enroll_data.get('rural', 0)}")
|
||||||
|
# print(f"{year}年入园数: {calculated_total}")
|
||||||
|
|
||||||
# 构建ECharts配置
|
# 构建ECharts配置
|
||||||
option = {
|
option = {
|
||||||
@@ -105,28 +109,17 @@ class RuYuanZaiYuanModel:
|
|||||||
"type": "value",
|
"type": "value",
|
||||||
"name": "总入园数",
|
"name": "总入园数",
|
||||||
"min": 0,
|
"min": 0,
|
||||||
"max": "auto",
|
"max": 140, # 增加最大值以留出更多空间
|
||||||
"interval": "auto", # 自动计算间隔
|
"interval": 20,
|
||||||
"position": "right", # 显示在右侧
|
"position": "right",
|
||||||
|
"nameLocation": "end", # 将名称放在轴末端
|
||||||
|
"nameGap": 30, # 增加名称与轴的间距
|
||||||
"axisLabel": {
|
"axisLabel": {
|
||||||
"formatter": "{value} 万人", # 确保数值格式正确
|
"formatter": "{value} 万人",
|
||||||
"color": "#ee6666"
|
"color": "#ee6666"
|
||||||
},
|
},
|
||||||
"axisLine": {"show": True, "lineStyle": {"color": "#ee6666"}},
|
"axisLine": {"show": True, "lineStyle": {"color": "#ee6666"}},
|
||||||
"axisTick": {"show": True},
|
"axisTick": {"show": True},
|
||||||
"color": "#333"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "value",
|
|
||||||
"name": "总入园数",
|
|
||||||
"min": 0,
|
|
||||||
"max": "auto", # 修改为自动适应数据最大值
|
|
||||||
"interval": 8,
|
|
||||||
"axisLabel": {
|
|
||||||
"formatter": "{value} 万人",
|
|
||||||
"color": "#333"
|
|
||||||
},
|
|
||||||
"axisLine": {"lineStyle": {"color": "#333"}},
|
|
||||||
"splitLine": {"show": False}
|
"splitLine": {"show": False}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -177,7 +170,7 @@ class RuYuanZaiYuanModel:
|
|||||||
],
|
],
|
||||||
"grid": {
|
"grid": {
|
||||||
"left": "3%",
|
"left": "3%",
|
||||||
"right": "4%",
|
"right": "8%", # 增加右侧边距
|
||||||
"bottom": "3%",
|
"bottom": "3%",
|
||||||
"containLabel": True
|
"containLabel": True
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
4
Start.py
4
Start.py
@@ -16,5 +16,5 @@ app.include_router(bigscreen_router)
|
|||||||
|
|
||||||
# 主程序入口
|
# 主程序入口
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# 启动 FastAPI 应用,监听 8100 端口
|
# 启动 FastAPI 应用,监听 8200 端口
|
||||||
uvicorn.run(app, host="0.0.0.0", port=8100)
|
uvicorn.run(app, host="0.0.0.0", port=8200)
|
@@ -1,6 +1,6 @@
|
|||||||
@echo off
|
@echo off
|
||||||
del /q "d:\dsWork\dsProject\.git\config"
|
del /q "d:\dsWork\YunNanProject\.git\config"
|
||||||
copy "d:\dsWork\dsProject\Doc\config-in-network" "d:\dsWork\dsProject\.git\config"
|
copy "d:\dsWork\YunNanProject\Doc\config-in-network" "d:\dsWork\YunNanProject\.git\config"
|
||||||
|
|
||||||
git config --global core.autocrlf false
|
git config --global core.autocrlf false
|
||||||
git add -A .
|
git add -A .
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
@echo off
|
@echo off
|
||||||
del /q "d:\dsWork\dsProject\.git\config"
|
del /q "d:\dsWork\YunNanProject\.git\config"
|
||||||
copy "d:\dsWork\dsProject\Doc\config-out-network" "d:\dsWork\dsProject\.git\config"
|
copy "d:\dsWork\YunNanProject\Doc\config-out-network" "d:\dsWork\YunNanProject\.git\config"
|
||||||
|
|
||||||
git config --global core.autocrlf false
|
git config --global core.autocrlf false
|
||||||
git add -A .
|
git add -A .
|
||||||
|
Reference in New Issue
Block a user