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
33991e37
Commit
33991e37
authored
Dec 16, 2021
by
赵宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
b0929bfc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
apps/view_attract/view.py
+13
-4
No files found.
apps/view_attract/view.py
View file @
33991e37
...
...
@@ -57,7 +57,8 @@ def menu():
'陵川县'
:
'陵川县'
,
'阳城县'
:
'阳城县'
,
'泽州县'
:
'泽州县'
,
'城区'
:
'城区'
'城区'
:
'城区'
,
'晋城经济技术开发区'
:
'晋城经济技术开发区'
}
if
not
district
or
district
==
'晋城市'
:
...
...
@@ -101,7 +102,7 @@ def menu():
# 2. 左上角获取经济指标数据
jjzb_data
=
get_jjzb
(
district
)
# 3. 产业
机
构分布饼状图数据统计
# 3. 产业
结
构分布饼状图数据统计
count_all
=
company
.
count
()
if
count_all
==
0
:
count_all
=
1
...
...
@@ -154,7 +155,7 @@ def project():
project_map
=
[]
industry_money
=
[]
industry_nums
=
[]
list1
=
[
"晋城市"
,
"沁水县"
,
"高平市"
,
"陵川县"
,
"阳城县"
,
"泽州县"
,
"城区"
]
list1
=
[
"晋城市"
,
"沁水县"
,
"高平市"
,
"陵川县"
,
"阳城县"
,
"泽州县"
,
"城区"
,
"晋城经济技术开发区"
]
# 晋城市,点击区县之前默认数据
if
not
district
or
district
==
'晋城市'
:
...
...
@@ -361,9 +362,14 @@ def policy_details():
_id2
=
int
(
_id
)
-
1
if
_id2
<
1
:
_id2
=
''
policy_len
=
InduPolicy
.
query
.
count
()
if
_id1
>
policy_len
:
_id1
=
''
policy
=
InduPolicy
.
query
.
get
(
_id
)
policy1
=
InduPolicy
.
query
.
get
(
str
(
_id1
))
policy2
=
InduPolicy
.
query
.
get
(
str
(
_id2
))
if
policy
:
data
=
{
"name"
:
policy
.
name
,
# 政策名
"file"
:
policy
.
file
if
policy
.
file
else
"-"
,
# 本地文件位置
"category"
:
policy
.
category
if
policy
.
category
else
"-"
,
# 政策类型
...
...
@@ -376,6 +382,8 @@ def policy_details():
"last"
:
[
policy2
.
name
,
_id1
]
if
policy2
else
""
,
"next"
:
[
policy1
.
name
,
_id2
]
if
policy1
else
""
}
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"查找成功"
,
data
=
data
)
else
:
pass
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"数据库错误"
)
...
...
@@ -388,6 +396,7 @@ def showListb():
type
=
req_dic
.
get
(
"type"
)
# 12345678 (500强-上市-规模-专精特新-高新-科技中小-瞪羚-独角兽)
district
=
req_dic
.
get
(
"district"
)
page
=
req_dic
.
get
(
"page"
)
per_page
=
req_dic
.
get
(
"per_page"
)
if
not
all
([
type
,
district
]):
return
jsonify
(
code
=
RET
.
PARAMERR
,
msg
=
"参数错误"
)
...
...
@@ -428,7 +437,7 @@ def showListb():
if
type
==
8
:
company
=
company
.
filter_by
(
unicorn
=
1
)
size
=
company
.
count
()
company
=
company
.
paginate
(
page
,
per_page
=
4
)
.
items
company
=
company
.
paginate
(
page
,
per_page
=
int
(
per_page
)
)
.
items
data
=
[{
"id"
:
i
.
id
,
"name"
:
i
.
company_name
,
...
...
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