Commit 4b6d3fe9 by dong

fix20230201

parent 46920b0b
......@@ -11,7 +11,7 @@ class Common(object):
CarrierLand.upload_time > time1 if time1 else text(''),
CarrierLand.upload_time < time2 if time2 else text(''),
CarrierLand.land_nature == land_nature if land_nature else text(''),
CarrierLand.district_name == district_name if district_name != '晋城市' else text(''),
CarrierLand.district_name == district_name if district_name else text(''),
CarrierLand.upload_time > upload_time if upload_time else text(''),
).all()
return area_obj_list
......@@ -23,7 +23,7 @@ class Common(object):
CarrierFactory.upload_time > time1 if time1 else text(''),
CarrierFactory.upload_time < time2 if time2 else text(''),
CarrierFactory.audit_status == 1,
CarrierFactory.district_name == district_name if district_name != '晋城市' else text(''),
CarrierFactory.district_name == district_name if district_name else text(''),
).all()
return area_obj_list
......@@ -33,7 +33,7 @@ class Common(object):
CarrierFactory.upload_time > time1 if time1 else text(''),
CarrierFactory.upload_time < time2 if time2 else text(''),
CarrierFactory.audit_status == 1,
CarrierFactory.district_name == district_name if district_name != '晋城市' else text(''),
CarrierFactory.district_name == district_name if district_name else text(''),
CarrierFactory.upload_time > upload_time if upload_time else text('')
).all()
return empty_area_obj_list
......@@ -44,7 +44,7 @@ class Common(object):
CarrierBuild.upload_time > time1 if time1 else text(''),
CarrierBuild.upload_time < time2 if time2 else text(''),
CarrierBuild.audit_status == 1,
CarrierBuild.district_name == district_name if district_name != '晋城市' else text(''),
CarrierBuild.district_name == district_name if district_name else text(''),
).all()
return area_obj_list
......@@ -54,7 +54,7 @@ class Common(object):
CarrierBuild.upload_time > time1 if time1 else text(''),
CarrierBuild.upload_time < time2 if time2 else text(''),
CarrierBuild.audit_status == 1,
CarrierBuild.district_name == district_name if district_name != '晋城市' else text(''),
CarrierBuild.district_name == district_name if district_name else text(''),
CarrierBuild.upload_time > upload_time if upload_time else text('')
).all()
return empty_area_obj_list
......@@ -11,7 +11,6 @@ from apps.view_choose import api_address
from apps.view_choose.common import Common
from apps.util import verify_token
from apps.view_choose.choose_view import get_district_name
"""产业地图页面"""
......@@ -21,10 +20,10 @@ from apps.view_choose.choose_view import get_district_name
def show_area():
req_dic = request.get_json()
district_name = req_dic['district_name']
token = request.headers['token']
# if not district_name:
district_name = get_district_name(token)
# district_name = get_district_name(token, district_name)
area_data = []
# 今年的1月1号
......@@ -249,7 +248,7 @@ def month_rate():
token = request.headers['token']
district_name = get_district_name(token)
# district_name = get_district_name(token, district_name)
com = Common()
data_list = []
......
......@@ -274,6 +274,7 @@ def login_bypwd():
# 验证手机号与密码
try:
user = User.query.filter_by(mobile=mobile, flag=2).first()
district_name = user.district_name
except Exception as e:
current_app.logger.error(e)
return jsonify(code=RET.DATAERR, msg="获取用户信息失败")
......@@ -316,6 +317,7 @@ def login_bypwd():
data={"msg": "登录成功",
"token": token,
"flag": user.flag,
"district_name": district_name,
"page_permission_list": page_permission_list,
"fun_permission_list": fun_permission_list})
......
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