From f15a5d3f0677988a9f61bb646b32ab3217d09858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=93=9C=E5=93=A5?= Date: Sat, 10 Jul 2021 23:31:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E5=A4=87?= =?UTF-8?q?=E4=BB=BD=E3=80=81=E6=80=BB=E5=88=86=E4=BB=AA=E8=A1=A8=E3=80=81?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=88=90=E7=BB=A9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chengji/controller/Index.php | 2 +- app/luru/view/index/onlineedit.html | 7 ++++++- app/tools/controller/OneStudentChengji.php | 2 +- app/tools/model/OneStudentChengji.php | 1 + vendor/wamkj/thinkphp6.0-databackup/src/Backup.php | 6 ++++-- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/chengji/controller/Index.php b/app/chengji/controller/Index.php index f4d52d3e..cea531a9 100755 --- a/app/chengji/controller/Index.php +++ b/app/chengji/controller/Index.php @@ -354,12 +354,12 @@ class Index extends AdminBase if(isset($value[$val['lieming'] . 'defen'])) { $sheet->setCellValue($colname[$i] . $row_temp, $value[$val['lieming'] . 'defen']); + $i++; foreach ($tjxm_left as $tjxml_k => $tjxml_v) { $sheet->setCellValue($colname[$i] . $row_temp, $value[$val['lieming'] . $tjxml_v['biaoshi']]); $i++; } } - $i++; } $sheet->setCellValue($colname[$i] . $row_temp, $value['avg']); $i++; diff --git a/app/luru/view/index/onlineedit.html b/app/luru/view/index/onlineedit.html index 396444d9..6ac28776 100644 --- a/app/luru/view/index/onlineedit.html +++ b/app/luru/view/index/onlineedit.html @@ -24,8 +24,13 @@ {block name="table"}
- Enter 换下一行 Shift+Eenter 移动到上一行
+
+ 键盘操作提示 +
+ Enter 换下一行 Shift+Eenter 移动到上一行
Tab 移动移动到下一列 Shift+Tab 移动到下一列 +
+
{/block} {block name="myjs"} diff --git a/app/tools/controller/OneStudentChengji.php b/app/tools/controller/OneStudentChengji.php index b4e0e88e..fbcce965 100755 --- a/app/tools/controller/OneStudentChengji.php +++ b/app/tools/controller/OneStudentChengji.php @@ -67,7 +67,7 @@ class OneStudentChengji extends BaseController // 获取学生成绩 $stucj = new STUCJ; $data = $stucj->yiBiao($src); - + return json($data); } diff --git a/app/tools/model/OneStudentChengji.php b/app/tools/model/OneStudentChengji.php index 76d5e10b..909daca8 100755 --- a/app/tools/model/OneStudentChengji.php +++ b/app/tools/model/OneStudentChengji.php @@ -335,6 +335,7 @@ class OneStudentChengji extends BaseModel $src['kaoshi_id'] = $khInfo->kaoshi_id; $src['ruxuenian'] = $khInfo->ruxuenian; $src['banji_id'] = $khInfo->banji_id; + $src['auth']['check'] = false; $data = $cj->search($src); $data = sortArrByManyField($data, 'sum', SORT_DESC); $data = array_column($data, 'sum', 'id'); diff --git a/vendor/wamkj/thinkphp6.0-databackup/src/Backup.php b/vendor/wamkj/thinkphp6.0-databackup/src/Backup.php index 03f629be..0f6ca946 100644 --- a/vendor/wamkj/thinkphp6.0-databackup/src/Backup.php +++ b/vendor/wamkj/thinkphp6.0-databackup/src/Backup.php @@ -2,6 +2,7 @@ namespace wamkj\thinkphp; use think\facade\Db; use think\facade\Config; +use think\facade\Env; class Backup { /** @@ -62,7 +63,7 @@ class Backup public function setDbConn($dbconfig=[]) { if (empty($dbconfig)) { - $this->dbconfig = Config::get('database'); + $this->dbconfig = Env::get('database'); }else{ $this->dbconfig=$dbconfig; } @@ -304,7 +305,8 @@ class Backup $result = $db->query("SELECT * FROM `{$table}` LIMIT {$start}, 1000"); foreach ($result as $row) { $row = array_map('addslashes', $row); - $sql = "INSERT INTO `{$table}` VALUES ('" . str_replace(array("\r","\n"),array('\r','\n'),implode("', '", $row)) . "');\n"; + $row = str_replace(array("''","\n"), array('null','\n'), "'".implode("', '", $row)."'"); + $sql = "INSERT INTO `{$table}` VALUES (" . $row . ");\n"; if(false === $this->write($sql)){ return false; }