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
4b8cc198
Commit
4b8cc198
authored
Dec 31, 2021
by
赵宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
7cd75823
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
apps/atlas/view_graph.py
+9
-4
No files found.
apps/atlas/view_graph.py
View file @
4b8cc198
...
@@ -268,10 +268,15 @@ def industry_resource():
...
@@ -268,10 +268,15 @@ def industry_resource():
def
get_data
(
name
,
industry_level
,
select_flag
,
page
,
perpage
):
def
get_data
(
name
,
industry_level
,
select_flag
,
page
,
perpage
):
try
:
try
:
if
select_flag
in
[
1
,
2
]:
# 当选择行政区/园区时
if
select_flag
in
[
1
,
2
]:
# 当选择行政区/园区时
if
industry_level
==
1
:
# 当选择的是父产业时
if
select_flag
==
1
and
industry_level
==
1
:
# 当选择的是父产业的行政区时
induzone
=
Induzone
.
query
.
filter
(
Induzone
.
navigator
.
like
(
"
%
{}
%
"
.
format
(
name
)))
induzone
=
Induzone
.
query
.
filter
(
Induzone
.
cate
.
like
(
'行政区'
),
Induzone
.
navigator
.
like
(
"
%
{}
%
"
.
format
(
name
)))
else
:
# 当选择的是子产业时
elif
select_flag
==
1
and
industry_level
==
2
:
# 当选择的是子产业的行政区时
induzone
=
Induzone
.
query
.
filter
(
Induzone
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)))
induzone
=
Induzone
.
query
.
filter
(
Induzone
.
cate
.
like
(
'行政区'
),
Induzone
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)))
elif
select_flag
==
2
and
industry_level
==
1
:
# 当选择的是父产业的园区时
induzone
=
Induzone
.
query
.
filter
(
Induzone
.
cate
.
like
(
'产业园区'
),
Induzone
.
navigator
.
like
(
"
%
{}
%
"
.
format
(
name
)))
elif
select_flag
==
2
and
industry_level
==
2
:
# 当选择的是父产业的园区时
induzone
=
Induzone
.
query
.
filter
(
Induzone
.
cate
.
like
(
'产业园区'
),
Induzone
.
navigat
.
like
(
"
%
{}
%
"
.
format
(
name
)))
size
=
induzone
.
count
()
# 分页总数
size
=
induzone
.
count
()
# 分页总数
induzone
=
induzone
.
paginate
(
page
,
perpage
)
.
items
induzone
=
induzone
.
paginate
(
page
,
perpage
)
.
items
...
...
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