feat(testing): 增加质检报告独立编辑与详情页面,不再使用弹窗

这个提交包含在:
wikiboss
2026-11-02 14:19:14 +08:00
父节点 6f877be41a
当前提交 43da3cc0ee
共有 38 个文件被更改,包括 2371 次插入 和 301 次删除

查看文件

@@ -60,6 +60,7 @@ class Admin extends Backend
}
$this->view->assign('groupdata', $groupdata);
$this->view->assign('canSetGranarySites', $this->auth->isSuperAdmin());
$this->assignconfig("admin", ['id' => $this->auth->id]);
}
@@ -122,6 +123,18 @@ class Admin extends Backend
if ($this->request->isPost()) {
$this->token();
$params = $this->request->post("row/a");
if ($params) {
if ($this->auth->isSuperAdmin()) {
$scope = isset($params['granary_sites']) ? $params['granary_sites'] : 'all';
if (!in_array($scope, ['all', 'center', 'xishui', 'none'], true)) $this->error('无效库区权限');
$params['granary_sites'] = $scope;
} elseif ($this->request->action() === 'add') {
$ownScope = Db::name('admin')->where('id', $this->auth->id)->value('granary_sites');
$params['granary_sites'] = $ownScope ?: 'none';
} else {
unset($params['granary_sites']);
}
}
if ($params) {
Db::startTrans();
try {
@@ -175,6 +188,18 @@ class Admin extends Backend
if ($this->request->isPost()) {
$this->token();
$params = $this->request->post("row/a");
if ($params) {
if ($this->auth->isSuperAdmin()) {
$scope = isset($params['granary_sites']) ? $params['granary_sites'] : 'all';
if (!in_array($scope, ['all', 'center', 'xishui', 'none'], true)) $this->error('无效库区权限');
$params['granary_sites'] = $scope;
} elseif ($this->request->action() === 'add') {
$ownScope = Db::name('admin')->where('id', $this->auth->id)->value('granary_sites');
$params['granary_sites'] = $ownScope ?: 'none';
} else {
unset($params['granary_sites']);
}
}
if ($params) {
Db::startTrans();
try {