Commit 36a59248 by dong

fix20221211

parent c92a3d60
...@@ -144,33 +144,39 @@ def menu(): ...@@ -144,33 +144,39 @@ def menu():
count_all = company.count() count_all = company.count()
if count_all == 0: if count_all == 0:
count_all = 1 count_all = 1
count_ctys = company.filter_by(f_type=1).count() # 传统优势产业集群 count_gt = company.filter_by(f_type=1).count() # 钢铁
count_gjd = company.filter_by(f_type=2).count() # 光机电产业集群 count_gjd = company.filter_by(f_type=2).count() # 光机电
count_mcq = company.filter_by(f_type=3).count() # 煤层气产业集群 count_mcq = company.filter_by(f_type=7).count() # 煤层气
count_wlky = company.filter_by(f_type=4).count() # 文旅康养产业集群 count_zbzz = company.filter_by(f_type=8).count() # 装备制造
count_xdfw = company.filter_by(f_type=5).count() # 现代服务业产业集群 count_zz = company.filter_by(f_type=9).count() # 铸造
count_szjj = company.filter_by(f_type=6).count() # 数字经济产业集群 count_mhg = company.filter_by(f_type=10).count() # 煤化工
count_qt = count_all - count_mcq - count_gjd - count_wlky - count_xdfw - count_szjj count_xcl = company.filter_by(f_type=11).count() # 新材料
count_lsjc = company.filter_by(f_type=12).count() # 绿色建材
# ctys = int(count_ctys / count_all * 100) count_yy = company.filter_by(f_type=13).count() # 医药
# gjd = int(count_gjd / count_all * 100) count_smfz = company.filter_by(f_type=14).count() # 丝麻纺织服装
# mcq = int(count_mcq / count_all * 100) count_xdfwy = company.filter_by(f_type=15).count() # 现代服务业
# wlky = int(count_wlky / count_all * 100) count_szjj = company.filter_by(f_type=16).count() # 数字经济
# xdfw = int(count_xdfw / count_all * 100) count_whly = company.filter_by(f_type=17).count() # 文化旅游
# szjj = int(count_szjj / count_all * 100)
count_qt = count_all - count_gt - count_gjd - count_mcq - count_zbzz - \
# xdfu = int(count_xdfu / count_all * 100) count_zz - count_mhg - count_xcl - count_lsjc - count_yy - \
# qt = 100 - mcq - gjd - mtmhg - gtzz - qyly - xdfu count_smfz - count_xdfwy - count_szjj - count_whly
# qt = 100 - ctys - gjd - mcq - wlky - xdfw - szjj
# 产业结构分布 # 产业结构分布
indu_dic = [ indu_dic = [
{"name": "传统优势产业集群", "value": count_ctys}, # {百分比,value} {"name": "钢铁", "value": count_gt}, # {百分比,value}
{"name": "光机电产业集群", "value": count_gjd}, {"name": "光机电", "value": count_gjd},
{"name": "煤层气产业集群", "value": count_mcq}, {"name": "煤层气", "value": count_mcq},
{"name": "文旅康养产业集群", "value": count_wlky}, {"name": "装备制造", "value": count_zbzz},
{"name": "现代服务业产业集群", "value": count_xdfw}, {"name": "铸造", "value": count_zz},
{"name": "数字经济产业集群", "value": count_szjj}, {"name": "煤化工", "value": count_mhg},
{"name": "其他", "value": count_qt}, {"name": "新材料", "value": count_xcl},
{"name": "绿色建材", "value": count_lsjc},
{"name": "医药", "value": count_yy},
{"name": "丝麻纺织服装", "value": count_smfz},
{"name": "现代服务业", "value": count_xdfwy},
{"name": "数字经济", "value": count_szjj},
{"name": "文化旅游", "value": count_whly}
] ]
# TODO 4.五大千亿级产业集群 # TODO 4.五大千亿级产业集群
......
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