fix(rotation): 修正报告图表操作列的索引错误
- 将操作列索引从第8列调整为第11列(索引10) - 保持不同操作对应的行背景色不变 - 修复因操作列索引错误导致的行着色问题
This commit is contained in:
@@ -581,13 +581,13 @@ def _plot_report_chart(
|
|||||||
|
|
||||||
# 数据行按操作着色
|
# 数据行按操作着色
|
||||||
for i in range(len(table_data)):
|
for i in range(len(table_data)):
|
||||||
action = table_data[i][7] # 操作列在第8列
|
action = table_data[i][10] # 操作列在第11列(索引10)
|
||||||
if action == "调入":
|
if action == "调入":
|
||||||
color = "#d4edda" # 绿色
|
color = "#d4edda" # 绿色
|
||||||
elif action == "调出":
|
elif action == "调出":
|
||||||
color = "#f8d7da" # 红色
|
color = "#f8d7da" # 红色
|
||||||
else:
|
else:
|
||||||
color = "#fff3cd" # 黄色
|
color = "#fff3cd" # 黄色(维持)
|
||||||
for j in range(len(col_labels)):
|
for j in range(len(col_labels)):
|
||||||
table[i + 1, j].set_facecolor(color)
|
table[i + 1, j].set_facecolor(color)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user