diff --git a/app/api/controller/TeacherScheduleTimeController.php b/app/api/controller/TeacherScheduleTimeController.php index 4528a24..241f665 100644 --- a/app/api/controller/TeacherScheduleTimeController.php +++ b/app/api/controller/TeacherScheduleTimeController.php @@ -114,7 +114,8 @@ class TeacherScheduleTimeController extends BaseController 'column_text_offset_arr' => [100, 70, 120, 140,140, 120, 120, 120, 180],//表头文字左偏移量 'row_text_offset_arr' => [50, 100, 140, 160, 140, 140, 140, 140, 140],//数据列文字左偏移量 ]; - $base['img_width'] = $base['filed_id_width'] + $base['filed_name_width'] + $base['filed_data_width'] * 5 + $base['border'] * 2;//图片宽度 + + $base['img_width'] = $base['filed_id_width'] + $base['filed_name_width'] + $base['filed_data_width'] * (count($base['table_header']) - 2) + $base['border'] * 2;//图片宽度 $base['img_height'] = $params['row'] * $base['row_hight'] + $base['border'] * 2 + $base['title_height'];//图片高度 $border_top = $base['border'] + $base['title_height'];//表格顶部高度 $border_bottom = $base['img_height'] - $base['border'];//表格底部高度