- 模型去掉 defaultSoftDelete=0,避免 ThinkPHP 软删过滤导致新增记录"隐形" - 菜单 paths 改相对路径并新增「自录数据统计」目录,迁移已有菜单 - Lists/Overview 补部门关联、支持按部门筛选 - 数据权限改由 self_input_stats_view_all_roles 白名单 + DataScope 控制, 编辑/删除完全交给按钮权限校验(移除"仅本人可改"硬限制) - 新增 /stats.self_input/mediaSourceOptions 接口,统计页/账户消耗页/录入弹窗 共用 useMediaSourceOptions + MediaSourceSelect,去重动态加载 Co-authored-by: Cursor <cursoragent@cursor.com>
29 lines
704 B
PHP
29 lines
704 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace app\adminapi\controller\stats;
|
|
|
|
use app\adminapi\controller\BaseAdminController;
|
|
use app\adminapi\logic\stats\SelfInputLogic;
|
|
|
|
class SelfInputController extends BaseAdminController
|
|
{
|
|
public function overview()
|
|
{
|
|
$result = SelfInputLogic::overview($this->request->get(), $this->adminId, $this->adminInfo);
|
|
|
|
return $this->data($result);
|
|
}
|
|
|
|
/**
|
|
* 自媒体来源下拉:从已录入业绩/账户消耗去重提取(随录入动态变化)
|
|
*/
|
|
public function mediaSourceOptions()
|
|
{
|
|
$list = SelfInputLogic::mediaSourceOptions($this->adminId, $this->adminInfo);
|
|
|
|
return $this->data($list);
|
|
}
|
|
}
|