Commit 4b8cc198 by 赵宇

fix

parent 7cd75823
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment