diff --git a/application/chengji/model/Tongji.php b/application/chengji/model/Tongji.php index 3b2d4a6c..d1327afd 100644 --- a/application/chengji/model/Tongji.php +++ b/application/chengji/model/Tongji.php @@ -29,6 +29,10 @@ class Tongji extends Model } ]) ->select(); + if($khlist->isEmpty()) + { + return $data = array(); + } // 获取参考学科 $ks = new \app\kaoshi\model\Kaoshi; @@ -39,6 +43,10 @@ class Tongji extends Model } ]) ->find(); + if($ksinfo->ks_subject->isEmpty()) + { + return $data = array(); + } $xk = array(); foreach ($ksinfo->ks_subject as $key => $value) { $xk[$value->subjectid] = $value->lieming; diff --git a/application/kaoshi/model/Kaohao.php b/application/kaoshi/model/Kaohao.php index a5c29709..ab725aa5 100644 --- a/application/kaoshi/model/Kaohao.php +++ b/application/kaoshi/model/Kaohao.php @@ -113,6 +113,10 @@ class Kaohao extends Base } ]) ->select(); + if($khlist->isEmpty()) + { + return $data = array(); + } // 获取参考学科 @@ -124,12 +128,15 @@ class Kaohao extends Base } ]) ->find(); + if($ksinfo->ks_subject->isEmpty()) + { + return $data = array(); + } $xk = array(); foreach ($ksinfo->ks_subject as $key => $value) { $xk[$value->subjectid] = $value->lieming; } - // 整理数据 $data = array(); foreach ($khlist as $key => $value) { diff --git a/application/keti/controller/KetiInfo.php b/application/keti/controller/KetiInfo.php index 2d054c4d..af77eb7d 100644 --- a/application/keti/controller/KetiInfo.php +++ b/application/keti/controller/KetiInfo.php @@ -34,11 +34,12 @@ class KetiInfo extends Base * @param int $id * @return \think\Response */ - public function ketiList($ketice,$title) + public function ketiList($ketice) { + $kt = new \app\keti\model\Keti; // 设置要给模板赋值的信息 - $list['webtitle'] = $title.' 列表'; + $list['webtitle'] = $kt->where('id',$ketice)->value('title').' 列表'; $list['ketice'] = $ketice; // 模板赋值 diff --git a/application/keti/view/index/index.html b/application/keti/view/index/index.html index dc90f83d..10b25a2e 100644 --- a/application/keti/view/index/index.html +++ b/application/keti/view/index/index.html @@ -113,7 +113,7 @@ var tr = obj.tr; //获得当前行 tr 的DOM对象 switch(layEvent){ case 'detail':// 查看 - parent.x_admin_add_to_tab(obj.data.title + ' 列表','/ktlist/'+obj.data.id+'/'+obj.data.title,true); + parent.x_admin_add_to_tab(obj.data.title + ' 列表','/ktlist/'+obj.data.id,true); break; case 'del':// 删除 cjgl.del(obj,"/kt"); diff --git a/application/rongyu/controller/JsRongyuInfo.php b/application/rongyu/controller/JsRongyuInfo.php index 279999f4..dbbbd013 100644 --- a/application/rongyu/controller/JsRongyuInfo.php +++ b/application/rongyu/controller/JsRongyuInfo.php @@ -40,9 +40,9 @@ class JsRongyuInfo extends Base public function rongyuList($rongyuce) { // 荣誉数据模型 - $ry = + $ry = new \app\rongyu\model\JsRongyu; // 设置要给模板赋值的信息 - $list['webtitle'] = $title . ' 荣誉'; + $list['webtitle'] = $ry->where('id',$rongyuce)->value('title') . ' 荣誉'; $list['rongyuce'] = $rongyuce; // 模板赋值 diff --git a/application/rongyu/view/js_rongyu/index.html b/application/rongyu/view/js_rongyu/index.html index 3ee79605..60f4647d 100644 --- a/application/rongyu/view/js_rongyu/index.html +++ b/application/rongyu/view/js_rongyu/index.html @@ -114,7 +114,7 @@ console.log(obj.data.title); switch(layEvent){ case 'detail':// 查看 - parent.x_admin_add_to_tab(obj.data.title + ' 列表','rylist/'+obj.data.id+'/'+obj.data.title,true); + parent.x_admin_add_to_tab(obj.data.title + ' 列表','rylist/'+obj.data.id,true); break; case 'del':// 删除 cjgl.del(obj,"/jsry"); diff --git a/route/keti.php b/route/keti.php index 753ba470..b2f1d371 100644 --- a/route/keti.php +++ b/route/keti.php @@ -14,7 +14,7 @@ Route::resource('kt','keti/Index'); Route::resource('ktinfo','keti/KetiInfo'); // 课题册中课题列表 -Route::get('ktlist/:ketice/:title','keti/KetiInfo/ketilist'); +Route::get('ktlist/:ketice','keti/KetiInfo/ketilist'); Route::get('ktout/:ketice','keti/KetiInfo/outXlsx'); // 结题编辑 Route::get('ktjt/:id/edit','keti/KetiInfo/jieTi'); diff --git a/route/rongyu.php b/route/rongyu.php index de91f94e..b183e248 100644 --- a/route/rongyu.php +++ b/route/rongyu.php @@ -16,7 +16,7 @@ Route::resource('jsryinfo','rongyu/JsRongyuInfo'); Route::get('dwry/createall','rongyu/DwRongyu/createAll'); Route::post('dwry/createall','rongyu/DwRongyu/saveall'); // 荣誉册中荣誉信息列表 -Route::get('rylist/:rongyuce/:title','rongyu/JsRongyuInfo/rongyuList'); +Route::get('rylist/:rongyuce','rongyu/JsRongyuInfo/rongyuList'); Route::get('ryout/:rongyuce','rongyu/JsRongyuInfo/outXlsx'); Route::get('jsryinfoadd/:rongyuce','rongyu/JsRongyuInfo/create');