完全vue渲染列表的功能

去掉不必要的js函数定义
修改返回json的方式
This commit is contained in:
2021-03-15 06:12:12 +08:00
parent d795809fb3
commit 975be7cc91
135 changed files with 402 additions and 792 deletions
@@ -106,10 +106,7 @@ class CategoryController extends DefaultController
$model->select($header['select']);
$rows = $model->paginate($query['limit']);
$items = Grid::dataFilters($rows, $header, function($item) {
return $item;
});
return response()->json($items);
return Grid::dataFilters($rows, $header);
}
return $this->render([
@@ -106,10 +106,7 @@ class LocationController extends DefaultController
$model->select($header['select']);
$rows = $model->paginate($query['limit']);
$items = Grid::dataFilters($rows, $header, function($item) {
return $item;
});
return response()->json($items);
return Grid::dataFilters($rows, $header);
}
return $this->render([
@@ -145,10 +142,7 @@ class LocationController extends DefaultController
$model->select($header['select']);
$rows = $model->paginate($query['limit']);
$items = Grid::dataFilters($rows, $header, function($item) {
return $item;
});
return response()->json($items);
return Grid::dataFilters($rows, $header);
}
return $this->render([
@@ -167,7 +161,7 @@ class LocationController extends DefaultController
->where('warehouse_location.warehouse_id', $warehouse_id)
->where('warehouse_location.status', 1)
->orderBy('warehouse_location.sort', 'asc');
return response()->json($model->get());
return $model->get();
}
}
@@ -106,10 +106,7 @@ class TypeController extends DefaultController
$model->select($header['select']);
$rows = $model->paginate($query['limit']);
$items = Grid::dataFilters($rows, $header, function($item) {
return $item;
});
return response()->json($items);
return Grid::dataFilters($rows, $header);
}
return $this->render([
@@ -113,11 +113,10 @@ class WarehouseController extends DefaultController
$locations[$_location['warehouse_id']][] = $_location;
}
$items = Grid::dataFilters($rows, $header, function($item) use($locations) {
return Grid::dataFilters($rows, $header, function($item) use($locations) {
$item['pos'] = (array)$locations[$item['id']];
return $item;
});
return response()->json($items);
}
return $this->render([
@@ -14,11 +14,6 @@
var search = config.search;
action.dialogType = 'layer';
// 自定义搜索方法
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 = 'layer';
// 自定义搜索方法
search.searchInit = function (e) {
var self = this;
}
var options = new agGridOptions();
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
@@ -12,11 +12,6 @@
var config = gdoo.grids[table];
var action = config.action;
var search = config.search;
// 自定义搜索方法
search.searchInit = function (e) {
var self = this;
}
var options = new agGridOptions();
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
@@ -15,11 +15,6 @@
action.dialogType = 'layer';
// 自定义搜索方法
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 = 'layer';
// 自定义搜索方法
search.searchInit = function (e) {
var self = this;
}
var options = new agGridOptions();
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
gridDiv.style.height = getPanelHeight(48);
@@ -14,11 +14,6 @@
var search = config.search;
action.dialogType = 'layer';
// 自定义搜索方法
search.searchInit = function (e) {
var self = this;
}
var options = new agGridOptions();
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
@@ -12,11 +12,6 @@
var config = gdoo.grids[table];
var action = config.action;
var search = config.search;
// 自定义搜索方法
search.searchInit = function (e) {
var self = this;
}
var options = new agGridOptions();
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
@@ -14,11 +14,6 @@
var search = config.search;
action.dialogType = 'layer';
// 自定义搜索方法
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 = 'layer';
// 自定义搜索方法
search.searchInit = function (e) {
var self = this;
}
var options = new agGridOptions();
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
@@ -15,11 +15,6 @@
action.dialogType = 'layer';
// 自定义搜索方法
search.searchInit = function (e) {
var self = this;
}
var options = new agGridOptions();
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
gridDiv.style.height = getPanelHeight(48);
@@ -14,11 +14,6 @@
var search = config.search;
action.dialogType = 'layer';
// 自定义搜索方法
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 = 'layer';
// 自定义搜索方法
search.searchInit = function (e) {
var self = this;
}
var options = new agGridOptions();
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
@@ -12,11 +12,6 @@
var config = gdoo.grids[table];
var action = config.action;
var search = config.search;
// 自定义搜索方法
search.searchInit = function (e) {
var self = this;
}
var options = new agGridOptions();
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
@@ -13,11 +13,6 @@
var action = config.action;
var search = config.search;
// 自定义搜索方法
search.searchInit = function (e) {
var self = this;
}
var options = new agGridOptions();
var gridDiv = document.querySelector("#{{$header['table']}}-grid");
gridDiv.style.height = getPanelHeight(48);