diff --git a/boot/platform/src/main/resources/application-local.yml b/boot/platform/src/main/resources/application-local.yml
index 229da568..14544836 100644
--- a/boot/platform/src/main/resources/application-local.yml
+++ b/boot/platform/src/main/resources/application-local.yml
@@ -23,7 +23,7 @@ spring:
max-acquire-time: 5s
validation-query: "select version()"
sql.init:
- mode: never
+ mode: always
platform: postgres
encoding: utf-8
data.redis:
diff --git a/boot/platform/src/main/resources/data-postgres.sql b/boot/platform/src/main/resources/data-postgres.sql
index 0fd51f46..32e9e5ed 100644
--- a/boot/platform/src/main/resources/data-postgres.sql
+++ b/boot/platform/src/main/resources/data-postgres.sql
@@ -27,4 +27,13 @@ values ('1000', 'FOLDER', 'ROLE_FOLDER_SYSTEM', 'System manager', '', 'U1000', '
insert into se_menus(code, pcode, type, authority, name, path, creator, updater, extend)
values ('1001', '1000', 'MENU', 'ROLE_MENU_SYSTEM_MENUS', 'MENUS', '/system/menus', 'U1000', 'U1000', '{
"icons": "menu-2"
+}');
+insert into se_menus(code, type, authority, name, path, creator, updater, extend)
+values ('1002', 'FOLDER', 'ROLE_FOLDER_SYSTEM1', 'System manager1', '', 'U1000', 'U1000', '{
+ "icons": "settings"
+}');
+
+insert into se_menus(code, pcode, type, authority, name, path, creator, updater, extend)
+values ('1003', '1002', 'MENU', 'ROLE_MENU_SYSTEM_MENUS!', 'MENUS1', '/system/menus', 'U1000', 'U1000', '{
+ "icons": "menu-2"
}');
\ No newline at end of file
diff --git a/ui/web/src/app/app.component.html b/ui/web/src/app/app.component.html
index c95d6432..645a9b7b 100644
--- a/ui/web/src/app/app.component.html
+++ b/ui/web/src/app/app.component.html
@@ -1,5 +1,5 @@
-
+
diff --git a/ui/web/src/app/app.component.ts b/ui/web/src/app/app.component.ts
index 68a065f5..a235f5a5 100644
--- a/ui/web/src/app/app.component.ts
+++ b/ui/web/src/app/app.component.ts
@@ -1,21 +1,26 @@
-import {Component, OnInit} from '@angular/core';
+import {AfterContentInit, Component, OnInit} from '@angular/core';
import {LoadingService} from "./core/loading.service";
+import {Observable, of} from "rxjs";
@Component({
- selector: 'app-root',
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.scss']
+ selector: 'app-root',
+ templateUrl: './app.component.html',
+ styleUrls: ['./app.component.scss']
})
-export class AppComponent implements OnInit {
+export class AppComponent implements OnInit, AfterContentInit {
- loadingShow: boolean;
+ loadingShow$: Observable = of(false);
- constructor(private loading: LoadingService) {
- this.loadingShow = false;
- }
+ constructor(private loading: LoadingService) {
+ this.loadingShow$ = of(false);
+ }
- ngOnInit(): void {
- this.loading.progress$.subscribe(res => this.loadingShow = res);
- }
+ ngOnInit(): void {
+ //this.loadingShow$ = this.loading.progress$;
+ }
+
+ ngAfterContentInit(): void {
+ this.loadingShow$ = this.loading.progress$;
+ }
}
diff --git a/ui/web/src/app/core/http-interceptors/handle-error.interceptor.ts b/ui/web/src/app/core/http-interceptors/handle-error.interceptor.ts
index 5e95275d..8b50beca 100644
--- a/ui/web/src/app/core/http-interceptors/handle-error.interceptor.ts
+++ b/ui/web/src/app/core/http-interceptors/handle-error.interceptor.ts
@@ -13,7 +13,7 @@ export class HandleErrorInterceptor implements HttpInterceptor {
}
intercept(request: HttpRequest, next: HttpHandler): Observable> {
- return next.handle(request).pipe(timeout({each: 10000}),
+ return next.handle(request).pipe(timeout({first: 30_000, each: 10_000}),
catchError(err => this.handleError(err)));
}
diff --git a/ui/web/src/app/core/interfaces/menu.ts b/ui/web/src/app/core/interfaces/menu.ts
new file mode 100644
index 00000000..dc5dcf36
--- /dev/null
+++ b/ui/web/src/app/core/interfaces/menu.ts
@@ -0,0 +1,45 @@
+export interface Menu {
+ id?: number;
+ code?: string;
+ pcode?: string;
+ tenantCode?: string;
+ type?: MenuType;
+ authority?: string;
+ name?: string;
+ path?: string;
+ sort?: number;
+ extend?: any;
+ creator?: UserAuditor;
+ updater?: UserAuditor;
+ createdTime?: Date;
+ updatedTime?: Date;
+ getPermissions?: Permission[];
+ getIcons?: string;
+ children?: Menu[]
+}
+
+export interface UserAuditor {
+ code: string;
+ username: string;
+ name?: string;
+}
+
+export enum MenuType {
+ FOLDER = "FOLDER",
+ MENU = "MENU",
+}
+
+export enum HttpMethod {
+ GET = "GET",
+ POST = "POST",
+ PUT = "PUT",
+ DELETE = "DELETE",
+ ALL = "ALL",
+}
+
+export interface Permission {
+ method: HttpMethod;
+ name: string;
+ path: string;
+ authority: string;
+}
diff --git a/ui/web/src/app/core/menus.service.spec.ts b/ui/web/src/app/core/menus.service.spec.ts
new file mode 100644
index 00000000..b79f199a
--- /dev/null
+++ b/ui/web/src/app/core/menus.service.spec.ts
@@ -0,0 +1,16 @@
+import {TestBed} from '@angular/core/testing';
+
+import {MenusService} from './menus.service';
+
+describe('MenusService', () => {
+ let service: MenusService;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({});
+ service = TestBed.inject(MenusService);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/ui/web/src/app/core/menus.service.ts b/ui/web/src/app/core/menus.service.ts
new file mode 100644
index 00000000..8f13fa3a
--- /dev/null
+++ b/ui/web/src/app/core/menus.service.ts
@@ -0,0 +1,32 @@
+import {Injectable} from '@angular/core';
+import {HttpClient, HttpParams} from "@angular/common/http";
+import {delay, from, map, mergeMap, Observable, retry, switchMap, toArray} from "rxjs";
+import {Menu} from "./interfaces/menu";
+
+@Injectable({
+ providedIn: 'root'
+})
+export class MenusService {
+
+ constructor(private http: HttpClient) {
+ }
+
+ getMenus(request: Menu): Observable