修改前端
This commit is contained in:
1 parent
4bfbe964b0
commit
482feb06db
29 files changed
+597
-642
No files matched your search
@@ -58,9 +58,7 @@ layui.use(['table', 'mytable', 'form'], function() {
|
||||
options.cols = [
|
||||
[ //表头
|
||||
{ type: 'checkbox', fixed: 'left' },
|
||||
{ field: 'status', title: '状态', templet: '#status', sort: true },
|
||||
{ field: 'id', title: '操作', toolbar: '#barDemo', minWidth: 140 },
|
||||
{ field: 'xingming', title: '姓名', sort: true, minWidth: 80 },
|
||||
{ field: 'xingming', title: '姓名', sort: true, minWidth: 80, fixed: 'left' },
|
||||
{ field: 'sex', title: '性别', minWidth: 100, sort: true },
|
||||
{ field: "shengri", title: '生日', minWidth: 100, sort: true },
|
||||
{ field: 'username', title: '帐号', sort: true },
|
||||
@@ -96,6 +94,8 @@ layui.use(['table', 'mytable', 'form'], function() {
|
||||
{ field: 'denglucishu', title: '登录次数', minWidth: 100, sort: true },
|
||||
{ field: 'thistime', title: '最后登录时间', minWidth: 180, sort: true },
|
||||
{ field: 'ip', title: '最后登录地址', minWidth: 130, sort: true },
|
||||
{ field: 'status', title: '状态', templet: '#status', sort: true },
|
||||
{ field: 'id', title: '操作', toolbar: '#barDemo', minWidth: 140 },
|
||||
]
|
||||
];
|
||||
|
||||
|
||||
@@ -515,11 +515,8 @@ class Bjtongji extends AdminBase
|
||||
$list['data'] = $btj->where('kaoshi_id', $info->kaoshi_id)
|
||||
->where('banji_id', $info->banji_id)
|
||||
->where('subject_id', '>', 0)
|
||||
->field('id, teacher_id, kaoshi_id, banji_id, subject_id')
|
||||
->field('id, kaoshi_id, banji_id, subject_id')
|
||||
->with([
|
||||
'bjTeacher' => function ($query) {
|
||||
$query->field('id, xingming');
|
||||
},
|
||||
'bjSubject' => function ($query) {
|
||||
$query ->field('id, title, jiancheng');
|
||||
}
|
||||
@@ -564,10 +561,13 @@ class Bjtongji extends AdminBase
|
||||
// 整理数据
|
||||
$list = array();
|
||||
foreach ($src['id'] as $key => $value) {
|
||||
$list[$key] = [
|
||||
'id' => $value
|
||||
,'teacher_id' => $src['teacher_id'][$key]
|
||||
];
|
||||
if(strlen($src['teacher_id'][$key]) > 0)
|
||||
{
|
||||
$list[$key] = [
|
||||
'id' => $value
|
||||
,'teacher_id' => $src['teacher_id'][$key]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$btj = new BTJ;
|
||||
@@ -586,7 +586,11 @@ class Bjtongji extends AdminBase
|
||||
{
|
||||
$list['data']['kaoshi_id'] = $kaoshi_id;
|
||||
$sbj = new \app\teach\model\Subject;
|
||||
$list['data']['subject_id'] = $sbj->kaoshi();
|
||||
$src = [
|
||||
'kaoshi' => 1
|
||||
,'status' => 1
|
||||
];
|
||||
// $list['data']['subject_id'] = $sbj->search($src);
|
||||
// halt($list);
|
||||
// 设置页面标题
|
||||
$list['set'] = array(
|
||||
@@ -610,28 +614,36 @@ class Bjtongji extends AdminBase
|
||||
$src = $this->request
|
||||
->only([
|
||||
'teacher_id' => ''
|
||||
,'id' => array()
|
||||
,'banji_id' => array()
|
||||
,'subject_id' => ''
|
||||
,'kaoshi_id' => ''
|
||||
], 'POST');
|
||||
|
||||
|
||||
// 验证表单数据
|
||||
$validate = new \app\chengji\validate\RenKe;
|
||||
$result = $validate->scene('edit')->check($src);
|
||||
$result = $validate->scene('editteacher')->check($src);
|
||||
$msg = $validate->getError();
|
||||
if(!$result){
|
||||
return json(['msg'=>$msg,'val'=>0]);;
|
||||
}
|
||||
|
||||
// 整理数据
|
||||
$list = array();
|
||||
foreach ($src['id'] as $key => $value) {
|
||||
$list[$key] = [
|
||||
'id' => $value
|
||||
,'teacher_id' => $src['teacher_id']
|
||||
$btj = new BTJ;
|
||||
foreach ($src['banji_id'] as $key => $value) {
|
||||
$map = [
|
||||
['kaoshi_id', '=', $src['kaoshi_id']],
|
||||
['banji_id', '=', $value],
|
||||
['subject_id', '=', $src['subject_id']],
|
||||
];
|
||||
$btjInfo = $btj->where([ $map ])->find();
|
||||
if($btjInfo)
|
||||
{
|
||||
$btjInfo->teacher_id = $src['teacher_id'];
|
||||
$data = $btjInfo->save();
|
||||
}
|
||||
}
|
||||
|
||||
$btj = new BTJ;
|
||||
$data = $btj->saveAll($list);
|
||||
$data ? $data = ['msg' => '设置成功', 'val' => 1]
|
||||
: $data = ['msg' => '数据处理错误', 'val' => 0];
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ class Index extends AdminBase
|
||||
|
||||
|
||||
// 删除单人单科成绩
|
||||
public function delete($id)
|
||||
public function delete()
|
||||
{
|
||||
// 整理数据
|
||||
$id = request()->delete('id');
|
||||
|
||||
Loaded 3 of 29 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user