Commit c42416a3 by 赵宇

fix

parent c8eb0d0f
...@@ -35,7 +35,7 @@ def get_all_enterprise(): ...@@ -35,7 +35,7 @@ def get_all_enterprise():
data = {"data": [{"id": enterprise.id, data = {"data": [{"id": enterprise.id,
"company": enterprise.company_name, # 企业名 "company": enterprise.company_name, # 企业名
"area": enterprise.city + enterprise.district, "area": enterprise.city + enterprise.district,
"createtime": enterprise.build_date, "createtime": (enterprise.build_date).strftime("%Y-%m-%d %H:%M:%S"),
"legal": enterprise.legal, "legal": enterprise.legal,
"capital": enterprise.capital, "capital": enterprise.capital,
"entype": enterprise.entype, "entype": enterprise.entype,
......
...@@ -525,14 +525,14 @@ def company_detail(): ...@@ -525,14 +525,14 @@ def company_detail():
supplier = CompanySupplier.query.filter_by(company_id=id).all() supplier = CompanySupplier.query.filter_by(company_id=id).all()
if company: if company:
data = {"select1_info": {"id": company.id, data = {"select1_info": {"id": company.id,
"company_name": company.company_name, # 企业名 "name": company.company_name, # 企业名
"telephone": company.telephone if company.telephone else "", # 电话 "telephone": company.telephone if company.telephone else "", # 电话
"web_site": company.web_site if company.web_site else "", # 网址 "web_site": company.web_site if company.web_site else "", # 网址
"email": company.email if company.email else "", # 邮箱 "email": company.email if company.email else "", # 邮箱
"address": company.address if company.address else "", # 地址 "address": company.address if company.address else "", # 地址
"jwd": {"lng": company.lng if company.lng else "", # 经度 "jwd": {"lng": company.lng if company.lng else "", # 经度
"lat": company.lat if company.lat else ""}, # 维度 "lat": company.lat if company.lat else ""}, # 维度
"company_info": company.company_info if company.company_info else "", # 企业信息 "info": company.company_info if company.company_info else "", # 企业信息
"business_scope": company.business_scope if company.business_scope else "", "business_scope": company.business_scope if company.business_scope else "",
# 经营范围 # 经营范围
# "high_new": "高新技术企业" if company.high_new else "", # 高新技术企业 # "high_new": "高新技术企业" if company.high_new else "", # 高新技术企业
...@@ -657,7 +657,7 @@ def company_detail(): ...@@ -657,7 +657,7 @@ def company_detail():
}, },
# 供应链地图封装 # 供应链地图封装
"select6_info": { "select6_info": {
"company_data": {"company_name": company.company_name, "company_data": {"name": company.company_name,
"company_lat": company.lat, "company_lat": company.lat,
"company_lng": company.lng, "company_lng": company.lng,
"supplier": [{"supplier_name": i.supplier_name, 'lat': i.lat, 'lng': i.lng} "supplier": [{"supplier_name": i.supplier_name, 'lat': i.lat, 'lng': i.lng}
...@@ -715,14 +715,14 @@ def enterprise_detail(): ...@@ -715,14 +715,14 @@ def enterprise_detail():
supplier = EnterpriseSupplier.query.filter_by(company_id=id).all() supplier = EnterpriseSupplier.query.filter_by(company_id=id).all()
if enterprise: if enterprise:
data = {"select1_info": {"id": enterprise.id, data = {"select1_info": {"id": enterprise.id,
"enterprise_name": enterprise.company_name, # 企业名 "name": enterprise.company_name, # 企业名
"telephone": enterprise.telephone if enterprise.telephone else "", # 电话 "telephone": enterprise.telephone if enterprise.telephone else "", # 电话
"web_site": enterprise.web_site if enterprise.web_site else "", # 网址 "web_site": enterprise.web_site if enterprise.web_site else "", # 网址
"email": enterprise.email if enterprise.email else "", # 邮箱 "email": enterprise.email if enterprise.email else "", # 邮箱
"address": enterprise.address if enterprise.address else "", # 地址 "address": enterprise.address if enterprise.address else "", # 地址
"jwd": {"lng": enterprise.lng if enterprise.lng else "", # 经度 "jwd": {"lng": enterprise.lng if enterprise.lng else "", # 经度
"lat": enterprise.lat if enterprise.lat else ""}, # 维度 "lat": enterprise.lat if enterprise.lat else ""}, # 维度
"enterprise_info": enterprise.company_info if enterprise.company_info else "", # 企业信息 "info": enterprise.company_info if enterprise.company_info else "", # 企业信息
"business_scope": enterprise.business_scope if enterprise.business_scope else "", "business_scope": enterprise.business_scope if enterprise.business_scope else "",
# 经营范围 # 经营范围
# "high_new": "高新技术企业" if enterprise.high_new else "", # 高新技术企业 # "high_new": "高新技术企业" if enterprise.high_new else "", # 高新技术企业
...@@ -845,7 +845,7 @@ def enterprise_detail(): ...@@ -845,7 +845,7 @@ def enterprise_detail():
}, },
# 供应链地图封装 # 供应链地图封装
"select6_info": { "select6_info": {
"company_data": {"company_name": enterprise.company_name, "company_data": {"name": enterprise.company_name,
"company_lat": enterprise.lat, "company_lat": enterprise.lat,
"company_lng": enterprise.lng, "company_lng": enterprise.lng,
"supplier": [{"supplier_name": i.supplier_name, 'lat': i.lat, 'lng': i.lng} "supplier": [{"supplier_name": i.supplier_name, 'lat': i.lat, 'lng': i.lng}
......
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