学生列表、单项添加完成

This commit is contained in:
小松树 committed 2019-04-16 16:17:07 +08:00
1 parent 084de85efe
commit 8a07dcbed1
11 files changed
+313 -568

No files matched your search

+1 -1
View File
@@ -23,7 +23,6 @@
<div class="x-body">
{block name="form"}{/block}
</div>
{block name="myjs"}{/block}
<script>
layui.use(['form'], function(){
var form = layui.form;
@@ -67,5 +66,6 @@
</script>
{block name="myjs"}{/block}
</body>
</html>
+2 -2
View File
@@ -394,14 +394,14 @@ class Index extends Base
// 下载表格模板
public function download()
{
$download = new \think\response\Download('TeacherInfo.xlsx');
$download = new \think\response\Download('uploads\teacher\TeacherInfo.xlsx');
return $download->name('TeacherInfo.xlsx');
}
// 下载表格VBA代码
public function downloadVba()
{
$download = new \think\response\Download('jiaoShiXingMingVBA.bas');
$download = new \think\response\Download('uploads\teacher\jiaoShiXingMingVBA.bas');
return $download->name('TeacherVBA');
}
+18 -3
View File
@@ -78,7 +78,7 @@ class Student extends Base
$list['set'] = array(
'webtitle'=>'添加学生',
'butname'=>'添加',
'formpost'=>'POOST',
'formpost'=>'POST',
'url'=>'/student',
);
@@ -137,6 +137,10 @@ class Student extends Base
// 获取学生信息
$list['data'] = STU::field('id,xingming,sex,shenfenzhenghao,shengri,banji,school,status')
->with(['stuBanji'=>function($query){
$query->field('id,ruxuenian,paixu');
}
])
->find($id);
// 设置页面标题
@@ -144,7 +148,7 @@ class Student extends Base
'webtitle'=>'编辑学生',
'butname'=>'修改',
'formpost'=>'PUT',
'url'=>'/sutdent/'.$id,
'url'=>'/student/'.$id,
);
// 模板赋值
@@ -231,6 +235,17 @@ class Student extends Base
// 批量添加
public function createAll()
{
// 设置页面标题
$list['set'] = array(
'webtitle'=>'批量上传学生信息',
'butname'=>'批传',
'formpost'=>'POST',
'url'=>'/student/createall',
);
// 模板赋值
$this->assign('list',$list);
// 渲染
return $this->fetch();
}
@@ -362,7 +377,7 @@ class Student extends Base
// 下载表格模板
public function download()
{
$download = new \think\response\Download('student_template.xlsx');
$download = new \think\response\Download('uploads\student\student_template.xlsx');
return $download->name('student_template.xlsx');
}
Loaded 3 of 11 files, more files were not shown because too many files have changed in this diff. Show more