修改基础管理中的基础内容

This commit is contained in:
meimei
2025-04-18 14:22:17 +08:00
parent b6a947ba0b
commit 0a83799b2d
18 changed files with 98 additions and 47 deletions

View File

@@ -34,4 +34,38 @@ class Firmbigcategory extends Backend
*/
/**
* 查看
*/
public function index()
{
//当前是否为关联查询
$this->relationSearch = true;
//设置过滤方法
$this->request->filter(['strip_tags', 'trim']);
if ($this->request->isAjax()) {
//如果发送的来源是Selectpage则转发到Selectpage
if ($this->request->request('keyField')) {
return $this->selectpage();
}
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$list = $this->model
->with(['firm'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('firm')->visible(['name']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}