更新后端接口
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
namespace Modules\Account\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Services\Auth\MenuService;
|
||||
|
||||
class AccountDatabaseSeeder extends Seeder
|
||||
{
|
||||
@@ -17,6 +18,36 @@ class AccountDatabaseSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// $this->call([]);
|
||||
$this->addAccountMenu();
|
||||
}
|
||||
/**
|
||||
* @title 记账模块菜单导入
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addAccountMenu(){
|
||||
$menuService = app(MenuService::class);
|
||||
|
||||
$menuService->importMenu([
|
||||
['title' => '账单', 'name' => 'account', 'path' => '/account', 'component' => 'account', 'type' => 'menu', 'children' => [
|
||||
['title' => '账单管理', 'name' => 'account.lists', 'path' => '/account/lists', 'component' => 'account/lists', 'type' => 'menu', 'children' => [
|
||||
['title' => '查看账单', 'name' => 'account.bill.view', 'path' => '', 'component' => '', 'type' => 'button'],
|
||||
['title' => '添加账单', 'name' => 'account.bill.add', 'path' => '', 'component' => '', 'type' => 'button'],
|
||||
['title' => '编辑账单', 'name' => 'account.bill.edit', 'path' => '', 'component' => '', 'type' => 'button'],
|
||||
['title' => '删除账单', 'name' => 'account.bill.delete', 'path' => '', 'component' => '', 'type' => 'button'],
|
||||
]
|
||||
],
|
||||
['title' => '家庭管理', 'name' => 'account.family', 'path' => '/account/family', 'component' => 'account/family', 'type' => 'menu', 'children' => [
|
||||
['title' => '查看家庭', 'name' => 'account.family.view', 'path' => '', 'component' => '', 'type' => 'button'],
|
||||
['title' => '添加家庭', 'name' => 'account.family.add', 'path' => '', 'component' => '', 'type' => 'button'],
|
||||
['title' => '编辑家庭', 'name' => 'account.family.edit', 'path' => '', 'component' => '', 'type' => 'button'],
|
||||
['title' => '删除家庭', 'name' => 'account.family.delete', 'path' => '', 'component' => '', 'type' => 'button'],
|
||||
['title' => '管理成员', 'name' => 'account.family.manage', 'path' => '', 'component' => '', 'type' => 'button'],
|
||||
]],
|
||||
['title' => '统计报表', 'name' => 'account.statistics', 'path' => '/account/statistics', 'component' => 'account/statistics', 'type' => 'menu', 'children' => [
|
||||
['title' => '查看统计', 'name' => 'account.statistics.view', 'path' => '', 'component' => '', 'type' => 'button'],
|
||||
['title' => '导出报表', 'name' => 'account.statistics.export', 'path' => '', 'component' => '', 'type' => 'button'],
|
||||
]],
|
||||
]]], 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user