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
b71458e1
Commit
b71458e1
authored
Feb 14, 2022
by
赵宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
ddc1d2dc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
18 deletions
+30
-18
apps/view_index/view.py
+30
-18
No files found.
apps/view_index/view.py
View file @
b71458e1
...
...
@@ -97,14 +97,24 @@ def menu():
dengl
=
company
.
filter_by
(
dengl
=
"1"
)
.
count
()
# 瞪羚
dujs
=
company
.
filter_by
(
unicorn
=
"1"
)
.
count
()
# 独角兽
table_dic
=
{
"t_c5"
:
t_c5
,
# 500强企业
tbe_sjmy
=
company
.
filter_by
(
tbe_sjmy
=
"1"
)
.
count
()
# 省级民营科技企业
zjtg_gjjxjr
=
company
.
filter_by
(
zjtg_gjjxjr
=
"1"
)
.
count
()
# 国家级专精特新小巨人企业
zjtg_sjxjr
=
company
.
filter_by
(
zjtg_sjxjr
=
"1"
)
.
count
()
# 省级专精特新小巨人企业
table_dic
=
{
# "t_c5": t_c5, # 500强企业
"ssqy"
:
ssqy
,
# 上市企业
"gmys"
:
gmys
,
# 规模以上企业
"zjtx"
:
zjtx
,
# 专精特新企业
"gxjs"
:
gxjs
,
# 高新技术企业
"kjzx"
:
kjzx
,
# 科技型中小企业
"dengl"
:
dengl
,
# 瞪羚企业
"dujs"
:
dujs
}
# 独角兽企业
# "dengl": dengl, # 瞪羚企业
# "dujs": dujs, # 独角兽企业
"tbe_sjmy"
:
tbe_sjmy
,
# 省级民营科技企业
"zjtg_gjjxjr"
:
zjtg_gjjxjr
,
# 国家级专精特新小巨人企业
"zjtg_sjxjr"
:
zjtg_sjxjr
# 省级专精特新小巨人企业
}
# 2. 左上角获取经济指标数据
jjzb_data
=
get_jjzb
(
district
)
...
...
@@ -120,25 +130,25 @@ def menu():
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
)
#
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
#
qt = 100 - ctys - gjd - mcq - wlky - xdfw - szjj
# 产业结构分布
indu_dic
=
[
{
"
per"
:
ctys
,
"name"
:
"传统优势产业集群"
,
"count
"
:
count_ctys
},
# {百分比,value}
{
"
per"
:
gjd
,
"name"
:
"光机电产业集群"
,
"count
"
:
count_gjd
},
{
"
per"
:
mcq
,
"name"
:
"煤层气产业集群"
,
"count
"
:
count_mcq
},
{
"
per"
:
wlky
,
"name"
:
"文旅康养产业集群"
,
"count
"
:
count_wlky
},
{
"
per"
:
xdfw
,
"name"
:
"现代服务业产业集群"
,
"count
"
:
count_xdfw
},
{
"
per"
:
szjj
,
"name"
:
"数字经济产业集群"
,
"count
"
:
count_szjj
},
{
"
per"
:
qt
,
"name"
:
"其他"
,
"count
"
:
count_qt
},
{
"
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
},
]
# TODO 4.五大千亿级产业集群
...
...
@@ -188,7 +198,9 @@ def project():
i
=
0
for
project
in
project_list
:
i
+=
1
if
i
>
6
:
print
(
i
)
print
(
i
)
if
i
>
7
:
pass
else
:
industry_money
.
append
({
"name"
:
project
.
type
,
...
...
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