完全vue渲染列表的功能
去掉不必要的js函数定义 修改返回json的方式
This commit is contained in:
@@ -202,7 +202,7 @@ class OptionController extends DefaultController
|
||||
if (Request::method() == 'POST') {
|
||||
$rows = Option::where('parent_id', 0)->orderBy('sort', 'asc')->orderBy('id', 'asc')->get();
|
||||
$rows->prepend(['name' => '全部类别', 'id' => 0, 'parent_id' => 0]);
|
||||
return response()->json(['data' => $rows]);
|
||||
return ['data' => $rows];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ class RegionController extends DefaultController
|
||||
$row['text'] = $row['layer_space'].$row['name'];
|
||||
$json[] = $row;
|
||||
}
|
||||
return response()->json(['data' => $json]);
|
||||
return ['data' => $json];
|
||||
}
|
||||
return $this->render([
|
||||
'search' => $search,
|
||||
@@ -122,7 +122,7 @@ class RegionController extends DefaultController
|
||||
$model = Region::orderBy('id', 'asc');
|
||||
$rows = $model->get(['*', 'name as text']);
|
||||
array_nest($rows);
|
||||
return response()->json(['data' => $rows]);
|
||||
return ['data' => $rows];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,11 +15,6 @@
|
||||
|
||||
action.dialogType = 'dialog';
|
||||
|
||||
// 自定义搜索方法
|
||||
search.searchInit = function (e) {
|
||||
var self = this;
|
||||
}
|
||||
|
||||
var options = new agGridOptions();
|
||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||
gridDiv.style.height = getPanelHeight(48);
|
||||
|
||||
@@ -39,11 +39,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 自定义搜索方法
|
||||
search.searchInit = function (e) {
|
||||
var self = this;
|
||||
}
|
||||
|
||||
var options = new agGridOptions();
|
||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||
gridDiv.style.height = getPanelHeight(48);
|
||||
|
||||
@@ -15,11 +15,6 @@
|
||||
|
||||
action.dialogType = 'dialog';
|
||||
|
||||
// 自定义搜索方法
|
||||
search.searchInit = function (e) {
|
||||
var self = this;
|
||||
}
|
||||
|
||||
action.field = function(data) {
|
||||
var me = this;
|
||||
var grid = config.grid;
|
||||
|
||||
@@ -65,11 +65,6 @@ var config = gdoo.grids[table];
|
||||
var action = config.action;
|
||||
var search = config.search;
|
||||
(function ($) {
|
||||
|
||||
// 自定义搜索方法
|
||||
search.searchInit = function (e) {
|
||||
var self = this;
|
||||
}
|
||||
var height = getPanelHeight(98);
|
||||
var treeOptions = new agGridOptions();
|
||||
var gridDiv = document.querySelector("#{{$header['table']}}-tree");
|
||||
|
||||
@@ -65,11 +65,6 @@ var config = gdoo.grids[table];
|
||||
var action = config.action;
|
||||
var search = config.search;
|
||||
(function ($) {
|
||||
|
||||
// 自定义搜索方法
|
||||
search.searchInit = function (e) {
|
||||
var self = this;
|
||||
}
|
||||
var height = getPanelHeight(163);
|
||||
var treeOptions = new agGridOptions();
|
||||
var gridDiv = document.querySelector("#{{$header['table']}}-tree");
|
||||
|
||||
@@ -14,11 +14,6 @@
|
||||
var search = config.search;
|
||||
|
||||
action.dialogType = 'dialog';
|
||||
|
||||
// 自定义搜索方法
|
||||
search.searchInit = function (e) {
|
||||
var self = this;
|
||||
}
|
||||
|
||||
var options = new agGridOptions();
|
||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||
|
||||
@@ -14,11 +14,6 @@
|
||||
var search = config.search;
|
||||
|
||||
action.dialogType = 'dialog';
|
||||
|
||||
// 自定义搜索方法
|
||||
search.searchInit = function (e) {
|
||||
var self = this;
|
||||
}
|
||||
|
||||
var options = new agGridOptions();
|
||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||
|
||||
@@ -39,11 +39,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 自定义搜索方法
|
||||
search.searchInit = function (e) {
|
||||
var self = this;
|
||||
}
|
||||
|
||||
var options = new agGridOptions();
|
||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||
gridDiv.style.height = getPanelHeight(48);
|
||||
|
||||
@@ -15,11 +15,6 @@
|
||||
|
||||
action.dialogType = 'dialog';
|
||||
|
||||
// 自定义搜索方法
|
||||
search.searchInit = function (e) {
|
||||
var self = this;
|
||||
}
|
||||
|
||||
action.refresh = function() {
|
||||
var me = this;
|
||||
var loading = layer.msg('部件更新中...', {
|
||||
|
||||
Reference in New Issue
Block a user