去掉无用的模板文件
封装ajax提示方法
This commit is contained in:
@@ -37,6 +37,7 @@ class ModelController extends DefaultController
|
||||
], 'model');
|
||||
|
||||
$header['cols'] = [
|
||||
/*
|
||||
'checkbox' => [
|
||||
'width' => 40,
|
||||
'suppressSizeToFit' => true,
|
||||
@@ -70,6 +71,7 @@ class ModelController extends DefaultController
|
||||
'form_type' => 'text',
|
||||
'width' => 100,
|
||||
],
|
||||
*/
|
||||
'user' => [
|
||||
'field' => 'table',
|
||||
'headerName' => '表名',
|
||||
@@ -128,6 +130,13 @@ class ModelController extends DefaultController
|
||||
'filter' => false,
|
||||
],
|
||||
];
|
||||
|
||||
$header['buttons'] = [
|
||||
['name' => '删除', 'icon' => 'fa-remove', 'action' => 'delete', 'display' => $this->access['delete']],
|
||||
['name' => '导出', 'icon' => 'fa-share', 'action' => 'export', 'display' => 1],
|
||||
];
|
||||
|
||||
$header['search_form'] = $search;
|
||||
$query = $search['query'];
|
||||
|
||||
if (Request::method() == 'POST') {
|
||||
@@ -149,19 +158,12 @@ class ModelController extends DefaultController
|
||||
$items = $rows->items();
|
||||
array_nest($items);
|
||||
$rows->items($items);
|
||||
|
||||
return $rows;
|
||||
|
||||
$ret = $rows->toArray();
|
||||
$ret['header'] = Grid::getColumns($header);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
$header['buttons'] = [
|
||||
['name' => '删除', 'icon' => 'fa-remove', 'action' => 'delete', 'display' => $this->access['delete']],
|
||||
['name' => '导出', 'icon' => 'fa-share', 'action' => 'export', 'display' => 1],
|
||||
];
|
||||
|
||||
$header['search_form'] = $search;
|
||||
$header['js'] = Grid::js($header);
|
||||
|
||||
// 配置权限
|
||||
return $this->display([
|
||||
'header' => $header,
|
||||
]);
|
||||
|
||||
@@ -107,6 +107,19 @@ class ModuleController extends DefaultController
|
||||
'filter' => false,
|
||||
],
|
||||
];
|
||||
|
||||
$header['buttons'] = [
|
||||
['name' => '删除', 'icon' => 'fa-remove', 'action' => 'delete', 'display' => $this->access['delete']],
|
||||
['name' => '导出', 'icon' => 'fa-share', 'action' => 'export', 'display' => 1],
|
||||
];
|
||||
|
||||
$header['left_buttons'] = [
|
||||
['name' => '更新', 'color' => 'default', 'icon' => 'fa-refresh', 'action' => 'refresh', 'display' => 1],
|
||||
['name' => '安装', 'color' => 'default', 'icon' => 'fa-cloud-download', 'action' => 'install', 'display' => 1],
|
||||
['name' => '打包', 'color' => 'default', 'icon' => 'fa-cube', 'action' => 'package', 'display' => 1],
|
||||
];
|
||||
|
||||
$header['search_form'] = $search;
|
||||
$query = $search['query'];
|
||||
|
||||
if (Request::method() == 'POST') {
|
||||
@@ -126,23 +139,11 @@ class ModuleController extends DefaultController
|
||||
}
|
||||
return $row;
|
||||
});
|
||||
return $rows->toJson();
|
||||
$ret = $rows->toArray();
|
||||
$ret['header'] = Grid::getColumns($header);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
$header['buttons'] = [
|
||||
['name' => '删除', 'icon' => 'fa-remove', 'action' => 'delete', 'display' => $this->access['delete']],
|
||||
['name' => '导出', 'icon' => 'fa-share', 'action' => 'export', 'display' => 1],
|
||||
];
|
||||
|
||||
$header['left_buttons'] = [
|
||||
['name' => '更新', 'color' => 'default', 'icon' => 'fa-refresh', 'action' => 'refresh', 'display' => 1],
|
||||
['name' => '安装', 'color' => 'default', 'icon' => 'fa-cloud-download', 'action' => 'install', 'display' => 1],
|
||||
['name' => '打包', 'color' => 'default', 'icon' => 'fa-cube', 'action' => 'package', 'display' => 1],
|
||||
];
|
||||
|
||||
$header['search_form'] = $search;
|
||||
$header['js'] = Grid::js($header);
|
||||
|
||||
return $this->display([
|
||||
'header' => $header,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user