-
-
+
-
+
+
+
diff --git a/app/kaoshi/view/luru_fengong/index.html b/app/kaoshi/view/luru_fengong/index.html
index 71788a57..4513bcbc 100644
--- a/app/kaoshi/view/luru_fengong/index.html
+++ b/app/kaoshi/view/luru_fengong/index.html
@@ -74,6 +74,7 @@ layui.use(['table', 'mytable', 'canyuKaoshi'], function() {
field: 'admin_id',
title: '教师',
sort: true,
+ fixed: 'left',
templet: function(d) {
var str = '';
if (d.fgAdmin) {
diff --git a/app/kaoshi/view/tongji_xiangmu/index.html b/app/kaoshi/view/tongji_xiangmu/index.html
index d9fee0a1..1a390a4c 100755
--- a/app/kaoshi/view/tongji_xiangmu/index.html
+++ b/app/kaoshi/view/tongji_xiangmu/index.html
@@ -56,10 +56,11 @@
// 提交搜索条件后重载表格
- layui.use(['table', 'mytable', 'createInput'], function(){
+ layui.use(['table', 'mytable', 'createInput', 'form'], function(){
var table = layui.table
,mytable = layui.mytable
- ,cInput = layui.createInput;
+ ,cInput = layui.createInput
+ ,form = layui.form;
cInput.categorySelect('category_id', 122);;
@@ -93,7 +94,7 @@
mytable.delAll(checkStatus, '/kaoshi/tjxm/delete', 'mytable');
break;
case 'add':
- mytable.add('新建项目', '/kaoshi/tjxm/create', '600', '300', false);
+ xadmin.open('新建项目', '/kaoshi/tjxm/create', '600', '300', false);
break;
};
});
@@ -108,7 +109,7 @@
mytable.del(obj, "/kaoshi/tjxm/delete");
break;
case 'edit':// 编辑
- mytable.add('编辑项目', '/kaoshi/tjxm/edit/' + obj.data.id, '600', '300', false);
+ xadmin.open('编辑项目', '/kaoshi/tjxm/edit/' + obj.data.id, '600', '300', false);
break;
};
});
diff --git a/app/student/controller/Index.php b/app/student/controller/Index.php
index d3e28d5e..92b7faf3 100755
--- a/app/student/controller/Index.php
+++ b/app/student/controller/Index.php
@@ -578,12 +578,15 @@ class Index extends AdminBase
{
// 声明结果数组
$data = array();
- $str = input("post.str");
+ $str = input("post.searchval");
$banji_id = input("post.banji_id");
$kaoshi = input("post.kaoshi");
+ $src = array();
+
// 判断是否存在数据,如果没有数据则返回。
if(strlen($str) <= 0){
+ $data = reSetObject($data, $src);
return json($data);
}
@@ -610,7 +613,17 @@ class Index extends AdminBase
)
->append(['age'])
->select();
- return json($list);
+
+ foreach ($list as $key => $value) {
+ $data[] = [
+ 'id' => $value->id
+ ,'xingming' => $value->xingming
+ ];
+ }
+
+ $data = reSetArray($data, $src);
+
+ return json($data);
}
diff --git a/app/student/view/index/index.html b/app/student/view/index/index.html
index 3f5960ac..654b268e 100755
--- a/app/student/view/index/index.html
+++ b/app/student/view/index/index.html
@@ -88,12 +88,13 @@ layui.use(['table', 'mytable', 'createInput', 'form'], function() {
options.cols = [
[ //表头
{ type: 'checkbox', fixed: 'left' },
- { field: 'xingming', title: '姓名', sort: true },
- { field: 'sex', title: '性别', sort: true },
+ { field: 'xingming', title: '姓名', minWidth:100, sort: true, fixed: 'left' },
+ { field: 'sex', title: '性别', sort: true, minWidth:100 },
{
field: "shengri",
title: '周岁',
sort: true,
+ minWidth:100,
templet: function(d) {
return d.age;
}
@@ -110,8 +111,8 @@ layui.use(['table', 'mytable', 'createInput', 'form'], function() {
return str;
}
},
- { field: 'status', title: '是否参加考试', templet: '#kaoshi', sort: true },
- { field: 'status', title: '状态', templet: '#status', sort: true },
+ { field: 'status', title: '是否参加考试', templet: '#kaoshi', minWidth:80, sort: true },
+ { field: 'status', title: '状态', templet: '#status', minWidth:80, sort: true },
{ field: 'id', title: '操作', toolbar: '#barDemo', minWidth: 180 }
]
];
diff --git a/app/system/view/back_up/index.html b/app/system/view/back_up/index.html
index c84fd1b7..75fdfbfc 100755
--- a/app/system/view/back_up/index.html
+++ b/app/system/view/back_up/index.html
@@ -40,12 +40,12 @@ layui.use(['table', 'backUp', 'form'], function() {
options.cols = [
[ //表头
{ field: 'time', type: 'checkbox', fixed: 'left' },
- { field: 'ltime', title: '时间', sort: true, minWidth: 100 },
+ { field: 'ltime', title: '时间', sort: true, minWidth: 100, fixed: 'left'},
{ field: 'juan', title: '卷数', sort: true, minWidth: 100 },
{ field: 'yasuo', title: '压缩', sort: true, minWidth: 100 },
{ field: 'lsize', title: '文件大小', minWidth: 100, sort: true },
{ field: 'status', title: '状态', minWidth: 100, sort: true },
- { field: 'id', title: '操作', toolbar: '#barDemo', minWidth: 90 }
+ { field: 'id', title: '操作', toolbar: '#barDemo', minWidth: 90, fixed: 'right'}
]
];
diff --git a/app/system/view/category/index.html b/app/system/view/category/index.html
index 18df66aa..9eeb88b1 100755
--- a/app/system/view/category/index.html
+++ b/app/system/view/category/index.html
@@ -94,7 +94,7 @@ layui.use(['table', 'mytable', 'createInput', 'form'], function() {
}
},
{ field: 'status', title: '状态', templet: '#status', sort: true },
- { field: 'id', title: '操作', toolbar: '#barDemo', minWidth: 140 }
+ { field: 'id', title: '操作', toolbar: '#barDemo', minWidth: 80, fixed: 'right'}
]
];
diff --git a/app/system/view/fields/index.html b/app/system/view/fields/index.html
index 6160f296..b34a4490 100755
--- a/app/system/view/fields/index.html
+++ b/app/system/view/fields/index.html
@@ -92,7 +92,7 @@ layui.use(['table', 'mytable', 'form'], function() {
}
},
{ field: 'update_time', title: '上传时间', minWidth: 160, sort: true },
- { field: 'id', title: '操作', toolbar: '#barDemo', minWidth: 90 }
+ { field: 'id', title: '操作', toolbar: '#barDemo', minWidth: 90, fixed: 'right' }
]
];
diff --git a/public/static/x-admin2.2/js/canyuKaoshi.js b/public/static/x-admin2.2/js/canyuKaoshi.js
index e0d640f6..926a9f11 100644
--- a/public/static/x-admin2.2/js/canyuKaoshi.js
+++ b/public/static/x-admin2.2/js/canyuKaoshi.js
@@ -102,6 +102,38 @@ layui.define(['table', 'form', 'upload'], function(exports) {
},
+ // 参与本次考试班级
+ banjiSelect: function(myid, data, value= '', hasNull = true){
+ $.ajax({
+ url: '/kaoshi/kscy/class',
+ type: 'POST',
+ data: data,
+ success: function(result) {
+ $('#' + myid).children().remove();
+ if (hasNull == true) {
+ str = '
';
+ } else {
+ str = '';
+ }
+ temp = "";
+ $(result.data).each(function(i, el) {
+ if (value != '' && value == el.id) {
+ temp = '
';
+ } else {
+ temp = '
';
+ }
+ str = str + temp;
+ });
+ $('#' + myid).append(str);
+ form.render('select');
+ },
+ error: function(result) {
+ layer.msg('数据扔半道啦。', function() {});
+ },
+ });
+ },
+
+
// 已经参与本次考试班级
banjiCheckbox: function(myid, data,hasAll = true){
$.ajax({
diff --git a/public/static/x-admin2.2/js/createInput.js b/public/static/x-admin2.2/js/createInput.js
index 3159330b..b828cf0f 100644
--- a/public/static/x-admin2.2/js/createInput.js
+++ b/public/static/x-admin2.2/js/createInput.js
@@ -124,7 +124,6 @@ layui.extend({
{
layui.each(myPid, function(i, el){
this.checked = check;
- // editPid(el, check);
})
}
}
@@ -172,11 +171,15 @@ layui.extend({
},
// 查询老师
- searchTeacher: function(id, radio = false) {
- school_id = $('#' + id).attr('school_id');
+ searchTeacher: function(id, radio = false, name = '') {
+ if(name == '')
+ {
+ name = id;
+ }
+ var school_id = '';
x = xmSelect.render({
el: '#' + id,
- name: id,
+ name: name,
autoRow: true,
toolbar: { show: true },
filterable: true,
@@ -189,7 +192,7 @@ layui.extend({
name: 'xingming',
value: 'id',
},
- height: '25px',
+ // height: '25px',
size: 'mini',
radio: radio,
showCount: 8,
@@ -234,6 +237,75 @@ layui.extend({
},
+ // 查询老师
+ searchStudent: function(id, radio = false, name = '') {
+ if(name == '')
+ {
+ name = id;
+ }
+ var banji_id = '';
+ x = xmSelect.render({
+ el: '#' + id,
+ name: name,
+ autoRow: true,
+ toolbar: { show: true },
+ filterable: true,
+ remoteSearch: true,
+ tips: '请选择教师',
+ theme: {
+ color: '#1cbbb4',
+ },
+ prop: {
+ name: 'xingming',
+ value: 'id',
+ },
+ // height: '25px',
+ size: 'mini',
+ radio: radio,
+ showCount: 8,
+ repeat: false,
+ model: {
+ label: {
+ type: 'text',
+ //使用字符串拼接的方式
+ text: {
+ //左边拼接的字符
+ left: '【',
+ //右边拼接的字符
+ right: '】',
+ //中间的分隔符
+ separator: ',',
+ },
+ }
+ },
+ remoteMethod: function(val, cb, show) {
+
+ //这里如果val为空, 则不触发搜索
+ if (!val) {
+ return cb([]);
+ }
+
+ $.ajax({
+ url: '/student/index/srcstudent',
+ type: 'POST',
+ data: {
+ searchval: val,
+ banji_id: 1,
+ kaoshi:1
+ },
+ success: function(result) {
+ cb(result.data);
+ },
+ error: function(result) {
+ layer.msg('数据扔半道啦。', function() {});
+ },
+ });
+ },
+ })
+ return x;
+ },
+
+
// 载入搜索框中已经保存的教师
loadTeacher: function(obj, url, data) {
$.ajax({
@@ -382,7 +454,7 @@ layui.extend({
// 创建班级checkbox
- banjiCheckbox: function(myid, data, value, hasAll = true) {
+ banjiCheckbox: function(myid, data, value='', hasAll = true) {
$.ajax({
url: '/teach/banji/mybanji',
type: 'POST',
@@ -414,7 +486,7 @@ layui.extend({
// 创建班级checkbox
- banjiSelect: function(myid, data, value, hasAll = true) {
+ banjiSelect: function(myid, data, value='', hasAll = true) {
$.ajax({
url: '/teach/banji/mybanji',
type: 'POST',
@@ -446,7 +518,7 @@ layui.extend({
// 创建年级的Select
- nanjiSelect: function(myid, data, value, hasNull = true) {
+ nanjiSelect: function(myid, data, value='', hasNull = true) {
$.ajax({
url: '/teach/banji/njlist',
type: 'POST',