作者 何书鹏
1 个管道 的构建 通过 耗费 4 秒

合并分支 'heshupeng' 到 'master'

培训课程列表调整



查看合并请求 !265
... ... @@ -52,12 +52,14 @@ class Classes extends Backend
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$total = $this->model
->with(['study'])
->where('study_id',$this->request->request('study_id'))
->where($where)
->order($sort, $order)
->count();
$list = $this->model
->with(['study'])
->where('study_id',$this->request->request('study_id'))
->where($where)
->order($sort, $order)
->limit($offset, $limit)
... ... @@ -80,6 +82,7 @@ class Classes extends Backend
*/
public function add()
{
$study_id = $this->request->request('study_id');
if ($this->request->isPost()) {
$params = $this->request->post("row/a");
if ($params) {
... ... @@ -93,6 +96,9 @@ class Classes extends Backend
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
$params[$this->dataLimitField] = $this->auth->id;
}
$params['study_id'] = $study_id;
$result = false;
Db::startTrans();
try {
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<!--<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Study_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-study_id" data-rule="required" data-source="study/index" data-field="examname" class="form-control selectpage" name="row[study_id]" type="text" value="">
</div>
</div>
</div>-->
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('状态')}:</label>
<div class="col-xs-12 col-sm-8">
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<!--<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Study_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-study_id" data-rule="required" data-source="study/index" data-field="examname" class="form-control selectpage" name="row[study_id]" type="text" value="{$row.study_id|htmlentities}">
</div>
</div>
</div>-->
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('状态')}:</label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -6,7 +6,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
Table.api.init({
extend: {
index_url: 'classes/index' + location.search,
add_url: 'classes/add',
add_url: 'classes/add' + location.search,
edit_url: 'classes/edit',
del_url: 'classes/del',
multi_url: 'classes/multi',
... ...
... ... @@ -11,6 +11,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
del_url: 'study/del',
multi_url: 'study/multi',
pass_list_url: 'study/pass_list',
class_list_url: 'classes/index',
table: 'study',
}
});
... ... @@ -63,6 +64,15 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
url: $.fn.bootstrapTable.defaults.extend.pass_list_url+'/type/2',
extend: "data-area='[\"90%\",\"95%\"]'",
},
{
name: 'class_list',
text: __('培训课程列表'),
title: __('培训课程列表'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
url: $.fn.bootstrapTable.defaults.extend.class_list_url+'?study_id={id}',
extend: "data-area='[\"90%\",\"95%\"]'",
},
], formatter: Table.api.formatter.operate}
]
]
... ...