Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
U
unify_api2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chaonan
unify_api2
Commits
958fbd03
Commit
958fbd03
authored
Jul 16, 2024
by
ZZH
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uplus add vpp-uside、vpp-agg 2024-07-16
parent
15317d6c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
8 deletions
+97
-8
constants.py
unify_api/constants.py
+92
-6
current_user_info.py
unify_api/modules/users/views/current_user_info.py
+5
-2
No files found.
unify_api/constants.py
View file @
958fbd03
...
...
@@ -394,7 +394,7 @@ PRODUCT_INFOS = {
"url"
:
SETTING
.
m_andianu_url
,
"img_url"
:
f
"{SETTING.download_img_url}/image/m-andianu.png"
,
"info"
:
"掌握项目安全状态,量化管理用电风险,降本增效有据可依。"
,
"sort_num"
:
21
"sort_num"
:
42
},
4
:
{
"name"
:
"识电U+"
,
...
...
@@ -408,7 +408,7 @@ PRODUCT_INFOS = {
"url"
:
SETTING
.
m_zhidianu_url
,
"img_url"
:
f
"{SETTING.download_img_url}/image/m-zhidianu.png"
,
"info"
:
"了解电力用户,洞悉用户特征,挖掘需求、服务业务。"
,
"sort_num"
:
11
"sort_num"
:
43
},
6
:
{
"name"
:
"智电U+"
,
...
...
@@ -418,10 +418,10 @@ PRODUCT_INFOS = {
"sort_num"
:
40
},
7
:
{
"name"
:
"
识电U新版
"
,
"name"
:
"
综合能源低碳数字化园区指挥管理平台
"
,
"url"
:
SETTING
.
comp_energy_url
,
"img_url"
:
f
"{SETTING.download_img_url}/image/new-shidianu.png"
,
"sort_num"
:
3
1
"sort_num"
:
4
1
},
8
:
{
"name"
:
"扬尘生态环境管理"
,
...
...
@@ -442,7 +442,7 @@ PRODUCT_INFOS = {
"url"
:
SETTING
.
anshiu_url
,
"img_url"
:
f
"{SETTING.download_img_url}/image/anshiu.png"
,
"info"
:
"电气安全精细监控,用电风险瞬间捕捉,电气事故无所遁形。"
,
"sort_num"
:
32
"sort_num"
:
44
},
13
:
{
"name"
:
"清科优能官方网站管理平台"
,
...
...
@@ -450,7 +450,57 @@ PRODUCT_INFOS = {
"img_url"
:
"https://cdn.ucyber.cn/images/ucloud/qkadmin.png"
,
"info"
:
"文章管理、SEO优化、数据管理"
,
"sort_num"
:
99
},
14
:
{
"name"
:
"电气安全运维"
,
"url"
:
SETTING
.
ele_safe_opt_url
,
"img_url"
:
f
"{SETTING.download_img_url}/image/anshiu.png"
,
"info"
:
""
,
"sort_num"
:
31
},
15
:
{
"name"
:
"能碳资源评估"
,
"url"
:
SETTING
.
energy_carbon_url
,
"img_url"
:
f
"{SETTING.download_img_url}/image/anshiu.png"
,
"info"
:
""
,
"sort_num"
:
32
},
16
:
{
"name"
:
"碳排双控能源管理"
,
"url"
:
SETTING
.
carbon_emis_url
,
"img_url"
:
f
"{SETTING.download_img_url}/image/anshiu.png"
,
"info"
:
""
,
"sort_num"
:
33
},
17
:
{
"name"
:
"微电网运行管理"
,
"url"
:
SETTING
.
microgrid_opt_url
,
"img_url"
:
f
"{SETTING.download_img_url}/image/anshiu.png"
,
"info"
:
""
,
"sort_num"
:
34
},
18
:
{
"name"
:
"虚拟电厂运营管理"
,
"url"
:
SETTING
.
vpp_uside_gd_url
,
"img_url"
:
f
"{SETTING.download_img_url}/image/anshiu.png"
,
"info"
:
""
,
"sort_num"
:
35
},
19
:
{
"name"
:
"虚拟电厂用户侧管理平台"
,
"url"
:
SETTING
.
vpp_uside_sz_url
,
"img_url"
:
f
"{SETTING.download_img_url}/image/anshiu.png"
,
"info"
:
""
,
"sort_num"
:
36
},
20
:
{
"name"
:
"虚拟电厂负荷聚合商管理平台"
,
"url"
:
SETTING
.
vpp_agg_url
,
"img_url"
:
f
"{SETTING.download_img_url}/image/anshiu.png"
,
"info"
:
""
,
"sort_num"
:
37
}
}
# 项目目录/home/ubuntu/data/code/unify_api
BASE_PRJ_DIR
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
...
...
@@ -802,7 +852,43 @@ PRODUCT_NAME = {
"zh_CN"
:
"清科优能官方网站管理平台"
,
"en_US"
:
"Amber Optimal Official Website Management Platform"
,
"de_DE"
:
"offizielle Webseit-Management-Plattform von Qingke"
}
},
14
:
{
"zh_CN"
:
"电气安全运维"
,
"en_US"
:
"Electrical safety operation and maintenance"
,
"de_DE"
:
"Betrieb und Wartung der elektrischen Sicherheit"
},
15
:
{
"zh_CN"
:
"能碳资源评估"
,
"en_US"
:
"Energy and carbon resource assessment"
,
"de_DE"
:
"Energie- und Kohlenstoffressourcenbewertung"
},
16
:
{
"zh_CN"
:
"碳排双控能源管理"
,
"en_US"
:
"Carbon emission management"
,
"de_DE"
:
"Verwaltung der Kohlenstoffemissionen"
},
17
:
{
"zh_CN"
:
"微电网运行管理"
,
"en_US"
:
"Operation management of microgrids"
,
"de_DE"
:
"Betrieb und Management von Mikronetzen"
},
18
:
{
"zh_CN"
:
"虚拟电厂运营管理"
,
"en_US"
:
"Operation and management of virtual power plants"
,
"de_DE"
:
"Betrieb und Verwaltung von virtuellen Kraftwerken"
},
19
:
{
"zh_CN"
:
"虚拟电厂用户侧管理平台"
,
"en_US"
:
"Virtual power plant user-side management platform"
,
"de_DE"
:
"Benutzerseitige Verwaltungsplattform für virtuelle Kraftwerke"
},
20
:
{
"zh_CN"
:
"虚拟电厂负荷聚合商管理平台"
,
"en_US"
:
"Virtual power plant load aggregator management platform"
,
"de_DE"
:
"Plattform zur Verwaltung virtueller Kraftwerkslastaggregatoren"
},
}
LOG_IN_TIPS
=
{
...
...
unify_api/modules/users/views/current_user_info.py
View file @
958fbd03
...
...
@@ -73,9 +73,12 @@ async def get_user_info(request) -> UserInfoResponse:
product_list
.
append
(
d_prod_info
)
if
product_list
:
d_prod_info
=
load_product_info
(
7
,
lang
)
for
prod_id
in
[
7
,
19
,
10
]:
d_prod_info
=
load_product_info
(
prod_id
,
lang
)
product_list
.
append
(
d_prod_info
)
product_list
=
sorted
(
product_list
,
key
=
lambda
x
:
x
[
"sort_num"
])
# 4. 查询zhiweiu权限, 默认普通用户
zhiweiu_auth
=
user_info
.
get
(
"zhiweiu_auth"
)
if
not
zhiweiu_auth
and
zhiweiu_auth
!=
0
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment