You've already forked guangan
41 lines
1.0 KiB
PHP
41 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace plugin\inspection;
|
|
|
|
|
|
use think\admin\Plugin;
|
|
use think\facade\View;
|
|
|
|
class Service extends Plugin
|
|
{
|
|
protected $appName = '巡检管理';
|
|
protected $appCode = 'inspection';
|
|
protected $package = 'jerryyan/think-plugs-inspection';
|
|
|
|
public static function register(): void
|
|
{
|
|
View::assign("_GENDER", [
|
|
'1' => '女',
|
|
'0' => '男'
|
|
]);
|
|
}
|
|
|
|
public static function menu(): array
|
|
{
|
|
$code = app(static::class)->appCode;
|
|
return [
|
|
[
|
|
'name' => '巡检人员',
|
|
'subs' => [
|
|
['name' => '人员列表', 'icon' => 'layui-icon layui-icon-template-1', 'node' => "{$code}/staff/index"],
|
|
]
|
|
],
|
|
[
|
|
'name' => '巡检管理',
|
|
'subs' => [
|
|
['name' => '巡检记录', 'icon' => 'layui-icon layui-icon-template-1', 'node' => "{$code}/record/index"],
|
|
]
|
|
],
|
|
];
|
|
}
|
|
} |