修复路口对比页面bug
This commit is contained in:
parent
363c132a17
commit
9cc25e4944
|
|
@ -104,7 +104,7 @@ def parse_comp_inroad_delay_infos(inroad_delay_infos, comp_inroad_delay_infos):
|
||||||
'speed': '-' if item_data['speed'] == '-' or comp_data['speed'] == '-' else round(item_data['speed'] - comp_data['speed'], 2),
|
'speed': '-' if item_data['speed'] == '-' or comp_data['speed'] == '-' else round(item_data['speed'] - comp_data['speed'], 2),
|
||||||
'move_speed': '-' if item_data['move_speed'] == '-' or comp_data['move_speed'] == '-' else round(item_data['move_speed'] - comp_data['move_speed'], 2),
|
'move_speed': '-' if item_data['move_speed'] == '-' or comp_data['move_speed'] == '-' else round(item_data['move_speed'] - comp_data['move_speed'], 2),
|
||||||
'stop_times_color': '-' if item_data['stop_times'] == '-' or comp_data['stop_times'] == '-' else calc_index_color(item_data['stop_times'], comp_data['stop_times'], 'stop_times'),
|
'stop_times_color': '-' if item_data['stop_times'] == '-' or comp_data['stop_times'] == '-' else calc_index_color(item_data['stop_times'], comp_data['stop_times'], 'stop_times'),
|
||||||
'high_park_percent_color': '-' if item_data['high_park_percent'] == '-' or comp_data['high_park_percent'] == '-' else calc_index_color(float(item_data['high_park_percent'].replace('%', '')), float(comp_data['high_park_percent'].replace('%', '')), 'high_park_percent'),
|
'high_park_percent_color': '-' if '-' in item_data['high_park_percent'] or '-' in comp_data['high_park_percent'] else calc_index_color(float(item_data['high_park_percent'].replace('%', '')), float(comp_data['high_park_percent'].replace('%', '')), 'high_park_percent'),
|
||||||
'imbalance_index_color': '-' if item_data['imbalance_index'] == '-' or comp_data['imbalance_index'] == '-' else calc_index_color(item_data['imbalance_index'], comp_data['imbalance_index'], 'imbalance_index'),
|
'imbalance_index_color': '-' if item_data['imbalance_index'] == '-' or comp_data['imbalance_index'] == '-' else calc_index_color(item_data['imbalance_index'], comp_data['imbalance_index'], 'imbalance_index'),
|
||||||
'park_time_color': '-' if item_data['park_time'] == '-' or comp_data['park_time'] == '-' else calc_index_color(item_data['park_time'], comp_data['park_time'], 'park_time'),
|
'park_time_color': '-' if item_data['park_time'] == '-' or comp_data['park_time'] == '-' else calc_index_color(item_data['park_time'], comp_data['park_time'], 'park_time'),
|
||||||
'delay_time_color': '-' if item_data['delay_time'] == '-' or comp_data['delay_time'] == '-' else calc_index_color(item_data['delay_time'], comp_data['delay_time'], 'delay_time'),
|
'delay_time_color': '-' if item_data['delay_time'] == '-' or comp_data['delay_time'] == '-' else calc_index_color(item_data['delay_time'], comp_data['delay_time'], 'delay_time'),
|
||||||
|
|
@ -146,7 +146,7 @@ def parse_comp_inroad_delay_infos(inroad_delay_infos, comp_inroad_delay_infos):
|
||||||
'speed': '-' if flow_comp_data['speed'] == '-' or flow_item_data['speed'] == '-' else round(flow_comp_data['speed'] - flow_item_data['speed'], 2),
|
'speed': '-' if flow_comp_data['speed'] == '-' or flow_item_data['speed'] == '-' else round(flow_comp_data['speed'] - flow_item_data['speed'], 2),
|
||||||
'move_speed': '-' if flow_comp_data['move_speed'] == '-' or flow_item_data['move_speed'] == '-' else round(flow_comp_data['move_speed'] - flow_item_data['move_speed'], 2),
|
'move_speed': '-' if flow_comp_data['move_speed'] == '-' or flow_item_data['move_speed'] == '-' else round(flow_comp_data['move_speed'] - flow_item_data['move_speed'], 2),
|
||||||
'stop_times_color': '-' if flow_item_data['stop_times'] == '-' or flow_comp_data['stop_times'] == '-' else calc_index_color(flow_item_data['stop_times'], flow_comp_data['stop_times'], 'stop_times'),
|
'stop_times_color': '-' if flow_item_data['stop_times'] == '-' or flow_comp_data['stop_times'] == '-' else calc_index_color(flow_item_data['stop_times'], flow_comp_data['stop_times'], 'stop_times'),
|
||||||
'high_park_percent_color': '-' if flow_item_data['high_park_percent'] == '-' or flow_comp_data['high_park_percent'] == '-' else calc_index_color(float(flow_item_data['high_park_percent'].replace('%', '')), float(comp_data['high_park_percent'].replace('%', '')), 'high_park_percent'),
|
'high_park_percent_color': '-' if '-' in item_data['high_park_percent'] or '-' in comp_data['high_park_percent'] else calc_index_color(float(flow_item_data['high_park_percent'].replace('%', '')), float(comp_data['high_park_percent'].replace('%', '')), 'high_park_percent'),
|
||||||
'park_time_color': '-' if flow_item_data['park_time'] == '-' or flow_comp_data['park_time'] == '-' else calc_index_color(flow_item_data['park_time'], flow_comp_data['park_time'], 'park_time'),
|
'park_time_color': '-' if flow_item_data['park_time'] == '-' or flow_comp_data['park_time'] == '-' else calc_index_color(flow_item_data['park_time'], flow_comp_data['park_time'], 'park_time'),
|
||||||
'delay_time_color': '-' if flow_item_data['delay_time'] == '-' or flow_comp_data['delay_time'] == '-' else calc_index_color(flow_item_data['delay_time'], flow_comp_data['delay_time'], 'delay_time'),
|
'delay_time_color': '-' if flow_item_data['delay_time'] == '-' or flow_comp_data['delay_time'] == '-' else calc_index_color(flow_item_data['delay_time'], flow_comp_data['delay_time'], 'delay_time'),
|
||||||
'speed_color': '-' if flow_item_data['speed'] == '-' or flow_comp_data['speed'] == '-' else calc_index_color(flow_item_data['speed'], flow_comp_data['speed'], 'speed'),
|
'speed_color': '-' if flow_item_data['speed'] == '-' or flow_comp_data['speed'] == '-' else calc_index_color(flow_item_data['speed'], flow_comp_data['speed'], 'speed'),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue