Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mancheng
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mancheng
Commits
36a59248
Commit
36a59248
authored
Dec 11, 2022
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20221211
parent
c92a3d60
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
25 deletions
+31
-25
apps/view_index/view.py
+31
-25
No files found.
apps/view_index/view.py
View file @
36a59248
...
...
@@ -144,33 +144,39 @@ def menu():
count_all
=
company
.
count
()
if
count_all
==
0
:
count_all
=
1
count_
ctys
=
company
.
filter_by
(
f_type
=
1
)
.
count
()
# 传统优势产业集群
count_gjd
=
company
.
filter_by
(
f_type
=
2
)
.
count
()
# 光机电
产业集群
count_mcq
=
company
.
filter_by
(
f_type
=
3
)
.
count
()
# 煤层气产业集群
count_
wlky
=
company
.
filter_by
(
f_type
=
4
)
.
count
()
# 文旅康养产业集群
count_
xdfw
=
company
.
filter_by
(
f_type
=
5
)
.
count
()
# 现代服务业产业集群
count_
szjj
=
company
.
filter_by
(
f_type
=
6
)
.
count
()
# 数字经济产业集群
count_
qt
=
count_all
-
count_mcq
-
count_gjd
-
count_wlky
-
count_xdfw
-
count_szjj
# ctys = int(count_ctys / count_all * 100)
# gjd = int(count_gjd / count_all * 100)
# mcq = int(count_mcq / count_all * 100)
# wlky = int(count_wlky / count_all * 100)
# xdfw = int(count_xdfw / count_all * 100)
# szjj = int(count_szjj / count_all * 100)
# xdfu = int(count_xdfu / count_all * 100)
# qt = 100 - mcq - gjd - mtmhg - gtzz - qyly - xdfu
# qt = 100 - ctys - gjd - mcq - wlky - xdfw - szjj
count_
gt
=
company
.
filter_by
(
f_type
=
1
)
.
count
()
# 钢铁
count_gjd
=
company
.
filter_by
(
f_type
=
2
)
.
count
()
# 光机电
count_mcq
=
company
.
filter_by
(
f_type
=
7
)
.
count
()
# 煤层气
count_
zbzz
=
company
.
filter_by
(
f_type
=
8
)
.
count
()
# 装备制造
count_
zz
=
company
.
filter_by
(
f_type
=
9
)
.
count
()
# 铸造
count_
mhg
=
company
.
filter_by
(
f_type
=
10
)
.
count
()
# 煤化工
count_
xcl
=
company
.
filter_by
(
f_type
=
11
)
.
count
()
# 新材料
count_lsjc
=
company
.
filter_by
(
f_type
=
12
)
.
count
()
# 绿色建材
count_yy
=
company
.
filter_by
(
f_type
=
13
)
.
count
()
# 医药
count_smfz
=
company
.
filter_by
(
f_type
=
14
)
.
count
()
# 丝麻纺织服装
count_xdfwy
=
company
.
filter_by
(
f_type
=
15
)
.
count
()
# 现代服务业
count_szjj
=
company
.
filter_by
(
f_type
=
16
)
.
count
()
# 数字经济
count_whly
=
company
.
filter_by
(
f_type
=
17
)
.
count
()
# 文化旅游
count_qt
=
count_all
-
count_gt
-
count_gjd
-
count_mcq
-
count_zbzz
-
\
count_zz
-
count_mhg
-
count_xcl
-
count_lsjc
-
count_yy
-
\
count_smfz
-
count_xdfwy
-
count_szjj
-
count_whly
# 产业结构分布
indu_dic
=
[
{
"name"
:
"传统优势产业集群"
,
"value"
:
count_ctys
},
# {百分比,value}
{
"name"
:
"光机电产业集群"
,
"value"
:
count_gjd
},
{
"name"
:
"煤层气产业集群"
,
"value"
:
count_mcq
},
{
"name"
:
"文旅康养产业集群"
,
"value"
:
count_wlky
},
{
"name"
:
"现代服务业产业集群"
,
"value"
:
count_xdfw
},
{
"name"
:
"数字经济产业集群"
,
"value"
:
count_szjj
},
{
"name"
:
"其他"
,
"value"
:
count_qt
},
{
"name"
:
"钢铁"
,
"value"
:
count_gt
},
# {百分比,value}
{
"name"
:
"光机电"
,
"value"
:
count_gjd
},
{
"name"
:
"煤层气"
,
"value"
:
count_mcq
},
{
"name"
:
"装备制造"
,
"value"
:
count_zbzz
},
{
"name"
:
"铸造"
,
"value"
:
count_zz
},
{
"name"
:
"煤化工"
,
"value"
:
count_mhg
},
{
"name"
:
"新材料"
,
"value"
:
count_xcl
},
{
"name"
:
"绿色建材"
,
"value"
:
count_lsjc
},
{
"name"
:
"医药"
,
"value"
:
count_yy
},
{
"name"
:
"丝麻纺织服装"
,
"value"
:
count_smfz
},
{
"name"
:
"现代服务业"
,
"value"
:
count_xdfwy
},
{
"name"
:
"数字经济"
,
"value"
:
count_szjj
},
{
"name"
:
"文化旅游"
,
"value"
:
count_whly
}
]
# TODO 4.五大千亿级产业集群
...
...
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