diff --git a/app/keti/controller/KetiInfo.php b/app/keti/controller/KetiInfo.php
index 49fdb6d1..7709d57a 100755
--- a/app/keti/controller/KetiInfo.php
+++ b/app/keti/controller/KetiInfo.php
@@ -501,7 +501,6 @@ class KetiInfo extends AdminBase
$cy = new \app\keti\model\KetiCanyu;
$list = $cy->searchCanyu($src);
- halt($list->toArray());
$data = array();
foreach ($list as $key => $value) {
if($value->teacher)
@@ -515,11 +514,9 @@ class KetiInfo extends AdminBase
}
$src['all'] = true;
- $cnt = $sch->search($src)->count();
+ $cnt = $cy->searchCanyu($src)->count();
$data = reset_data($data, $cnt);
- $data = reSetArray($data, $src);
-
return json($data);
}
diff --git a/app/keti/view/jieti/jie_ti.html b/app/keti/view/jieti/jie_ti.html
index ec6b7865..78a9ad49 100644
--- a/app/keti/view/jieti/jie_ti.html
+++ b/app/keti/view/jieti/jie_ti.html
@@ -46,7 +46,7 @@
-
@@ -102,8 +102,10 @@ layui.use(['laydate', 'mytable', 'createInput'], function() {
cInput.uploadPic('upload', "/rongyu/danwei/upload", '课题', 'keti\\jieti', 'jtpic');
+
+
// 搜索教师
- xmselectzc = cInput.searchTeacher('teachers');
+ xmselectzc = cInput.searchTeacher('teacher_id');
xmselectcy = cInput.searchTeacher('canyu_id');
xmselectkt = cInput.searchKeti('srclx');
diff --git a/app/keti/view/jieti/list.html b/app/keti/view/jieti/list.html
index e8789c9a..2b46227b 100644
--- a/app/keti/view/jieti/list.html
+++ b/app/keti/view/jieti/list.html
@@ -103,7 +103,7 @@ layui.use(['table', 'mytable', 'createInput', 'form'], function() {
}
}
cnt = d.ktCy.length;
- str = str + '(' + cnt + ')';
+ str = str + '(共' + cnt + '人)';
}
return str;
}
diff --git a/app/keti/view/keti_info/jie_ti.html b/app/keti/view/keti_info/jie_ti.html
index be57e67e..f05486d2 100755
--- a/app/keti/view/keti_info/jie_ti.html
+++ b/app/keti/view/keti_info/jie_ti.html
@@ -85,8 +85,7 @@ layui.use(['laydate', 'mytable', 'createInput'], function() {
//执行一个laydate实例
laydate.render({
- elem: '#jtshijian' //指定元素
- ,
+ elem: '#jtshijian', //指定元素
trigger: 'click' //采用click弹出
});
@@ -103,9 +102,7 @@ layui.use(['laydate', 'mytable', 'createInput'], function() {
ketiinfo_id: "{$list.data.id}",
category_id: 11901
}
- cInput.loadTeacher(xmselectzc, '/keti/info/srccy', data);
- data.category_id = 11902;
- cInput.loadTeacher(xmselectcy, '/keti/info/srccy', data);
+
}
// 图片放大
diff --git a/app/rongyu/controller/JsRongyuInfo.php b/app/rongyu/controller/JsRongyuInfo.php
index ed48468f..262521c7 100755
--- a/app/rongyu/controller/JsRongyuInfo.php
+++ b/app/rongyu/controller/JsRongyuInfo.php
@@ -539,7 +539,7 @@ class JsRongyuInfo extends AdminBase
'str' => ''
,'rongyu_id' => ''
,'category_id' => ''
- ,'field' => 'serid'
+ ,'field' => 'id'
,'order' => 'asc'
], 'POST');
@@ -557,7 +557,9 @@ class JsRongyuInfo extends AdminBase
];
}
}
- $data = reSetArray($data, $src);
+ $src['all'] = true;
+ $cnt = $cy->searchCanyu($src)->count();
+ $data = reset_data($data, $cnt);
return json($data);
}
diff --git a/app/rongyu/model/JsRongyuCanyu.php b/app/rongyu/model/JsRongyuCanyu.php
index ea13408b..00f4bc8d 100755
--- a/app/rongyu/model/JsRongyuCanyu.php
+++ b/app/rongyu/model/JsRongyuCanyu.php
@@ -37,6 +37,11 @@ class JsRongyuCanyu extends BaseModel
$src = [
'rongyu_id' => ''
,'category_id' => ''
+ ,'page' => 1
+ ,'limit' => 10
+ ,'field' => 'id'
+ ,'order' => 'desc'
+ ,'all' => false
];
$src = array_cover($srcfrom, $src);
@@ -58,6 +63,11 @@ class JsRongyuCanyu extends BaseModel
},
]
)
+ ->when($src['all'] == false, function ($query) use($src) {
+ $query
+ ->page($src['page'], $src['limit']);
+ })
+ ->order([$src['field'] => $src['order']])
->select();
return $list;
}
diff --git a/public/static/x-admin2.2/js/createInput.js b/public/static/x-admin2.2/js/createInput.js
index 6e158a63..644b3726 100644
--- a/public/static/x-admin2.2/js/createInput.js
+++ b/public/static/x-admin2.2/js/createInput.js
@@ -255,7 +255,11 @@ layui.extend({
searchval: val,
},
success: function(result) {
- cb(result.data);
+ if (result.data.length > 0) {
+ cb(result.data);
+ } else {
+ return cb([]);
+ }
},
error: function(result) {
layer.msg('数据扔半道啦。', function() {});
@@ -322,7 +326,11 @@ layui.extend({
banji_id: $($('#' + id)[0]).attr('banji_id'),
},
success: function(result) {
- cb(result.data);
+ if (result.data.length > 0) {
+ cb(result.data);
+ } else {
+ return cb([]);
+ }
},
error: function(result) {
layer.msg('数据扔半道啦。', function() {});
@@ -341,8 +349,13 @@ layui.extend({
type: 'POST',
data: data,
success: function(result) {
+ if (result.data.length > 0) {
+ data = result.data;
+ } else {
+ data = [];
+ }
obj.update({
- data: result.data
+ data:data
})
},
error: function(result) {
@@ -404,7 +417,11 @@ layui.extend({
searchval: val,
},
success: function(result) {
- cb(result.data)
+ if (result.data.length > 0) {
+ cb(result.data);
+ } else {
+ return cb([]);
+ }
},
error: function(result) {
layer.msg('数据扔半道啦。', function() {});