修复已知错误
This commit is contained in:
1 parent
4bff47fd1c
commit
8902d3ffbd
3 files changed
+60
-4
No files matched your search
@@ -324,6 +324,7 @@ class Index extends AdminBase
|
||||
$sheet->setCellValue($colname [$i]. '3', '平均分');
|
||||
$i ++;
|
||||
$sheet->setCellValue($colname[$i] . '3', '总分');
|
||||
$left_i = $i;
|
||||
$sheet->mergeCells('A1:' . $colname[$i] . '1'); # 合并标题行
|
||||
$sheet->mergeCells('A2:' . $colname[$i] . '2'); # 合并时间行
|
||||
$col_null = 3; # 统计结果与成绩列表空两列
|
||||
@@ -340,6 +341,7 @@ class Index extends AdminBase
|
||||
$sheet->setCellValue($colname[$i] . $row, $value['title']);
|
||||
$i ++;
|
||||
}
|
||||
$right_i = $i;
|
||||
|
||||
// 循环写出成绩及个人信息
|
||||
$i = 0;
|
||||
@@ -396,14 +398,14 @@ class Index extends AdminBase
|
||||
],
|
||||
],
|
||||
];
|
||||
$sheet->getStyle('A3:'.$colname[$i] . ($row_temp - 1))->applyFromArray($styleArrayBK);
|
||||
$sheet->getStyle('A3:'.$colname[$left_i] . ($row_temp - 1))->applyFromArray($styleArrayBK);
|
||||
|
||||
$tj = new \app\chengji\model\Tongji;
|
||||
|
||||
$temp = $tj->tongjiSubject($chengjiinfo, $subject_id);
|
||||
|
||||
// 左侧开始列
|
||||
$i = $i + $col_null ;
|
||||
$i = $left_i + $col_null ;
|
||||
$col_r = $i;
|
||||
|
||||
// 循环写出统计结果
|
||||
|
||||
@@ -96,7 +96,8 @@ class Njtongji extends AdminBase
|
||||
|
||||
// 获取年级与学科
|
||||
$ksset = new \app\kaoshi\model\KaoshiSet;
|
||||
$list['set']['nianji'] = $ksset->srcGrade($kaoshi_id);
|
||||
$src['kaoshi_id'] = $kaoshi_id;
|
||||
$list['set']['nianji'] = $ksset->srcGrade($src);
|
||||
|
||||
// 模板赋值
|
||||
$this->view->assign('list', $list);
|
||||
@@ -144,6 +145,7 @@ class Njtongji extends AdminBase
|
||||
$sheet = $spreadsheet->getActiveSheet();
|
||||
$thistime = date("Y-m-d h:i:sa");
|
||||
|
||||
|
||||
// 设置文档属性
|
||||
$spreadsheet->getProperties()
|
||||
->setCreator("码蚁成绩管理系统") //作者
|
||||
@@ -230,7 +232,8 @@ class Njtongji extends AdminBase
|
||||
|
||||
$sheet->getStyle('A1')->getFont()->setBold(true)->setName('宋体')->setSize(20); # 修改标题字号
|
||||
$sheet->getDefaultRowDimension()->setRowHeight(35); # 设置行高
|
||||
$sheet->getRowDimension('3:4')->setRowHeight(25);
|
||||
$sheet->getRowDimension(3)->setRowHeight(25);;
|
||||
$sheet->getRowDimension(4)->setRowHeight(25);;
|
||||
$sheet->getDefaultColumnDimension()->setWidth(8.3); # 设置列宽
|
||||
$sheet->getColumnDimension('A')->setWidth(5);
|
||||
$sheet->getColumnDimension('B')->setWidth(10.5);
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class ChengjiBiaozhunfen extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$table = $this->table('chengji');
|
||||
$column = $table->hasColumn('biaozhunfen');
|
||||
if (!$column) {
|
||||
$table
|
||||
->addColumn('biaozhunfen','decimal',['precision'=>6,'scale'=>2,'default'=>Null,'null'=>false,'comment'=>'标准分'])
|
||||
->update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//版本退回
|
||||
public function down()
|
||||
{
|
||||
$table = $this->table('chengji');
|
||||
$column = $table->hasColumn('biaozhunfen');
|
||||
if ($column) {
|
||||
$table
|
||||
->removeColumn('biaozhunfen');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user