diff --git a/src/app/routes/menu-manager/components/index/index.component.ts b/src/app/routes/menu-manager/components/index/index.component.ts
index 5f5efc8a..5c41d4fb 100644
--- a/src/app/routes/menu-manager/components/index/index.component.ts
+++ b/src/app/routes/menu-manager/components/index/index.component.ts
@@ -97,18 +97,32 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
nzTitle: '删除确认',
nzContent: `是否确认删除?`,
nzOnOk: () => {
- this.deleteMenuByAppID(type === 0 ? 'A48F72F0A304427F921794BAD86B3522' : this.envSrv.env.appId);
+ this.getMenuByAppID(type === 0 ? 'A48F72F0A304427F921794BAD86B3522' : this.envSrv.env.appId);
}
});
}
- deleteMenuByAppID(appId: string) {
+ getMenuByAppID(appId: string) {
this.service.request(this.service.$api_get_one, { appId }, 'POST', false).subscribe(res => {
console.log(res);
-
if (res) {
- this.menus = res;
+ const menus = res.data;
+ if (res.data?.length > 0) {
+ this.deleteMenuByAppID(res.data);
+ } else {
+ this.service.msgSrv.success('菜单已清空');
+ }
}
});
}
+
+ deleteMenuByAppID(arr: Array) {
+ let ids: any[] = arr?.map(item => item.id) || [];
+ arr.forEach(item => {
+ if (item.children?.length > 0) {
+ this.deleteMenuByAppID(item.children);
+ }
+ });
+ this.service.request(this.service.$api_del_many, ids).subscribe(res => {});
+ }
}
diff --git a/src/app/routes/menu-manager/services/menu-manager.service.ts b/src/app/routes/menu-manager/services/menu-manager.service.ts
index 3e23c3dd..e1a9a85e 100644
--- a/src/app/routes/menu-manager/services/menu-manager.service.ts
+++ b/src/app/routes/menu-manager/services/menu-manager.service.ts
@@ -15,7 +15,7 @@ export class MenuManagerService extends BaseService {
$api_get_one = `/api/mdc/cuc/functionInfo/getAllFunctionInfoByAppId?_allow_badcode=true`;
// 删除多个菜单
- $api_del_many = `/scm/cuc/cuc/functionInfo/deletebatchFunctionInfo`;
+ $api_del_many = `/api/mdc/cuc/functionInfo/deletebatchFunctionInfo`;
constructor(public injector: Injector) {
super(injector);
diff --git a/src/app/routes/usercenter/components/driver/driver.component.html b/src/app/routes/usercenter/components/driver/driver.component.html
index 230034ae..7ed408f9 100644
--- a/src/app/routes/usercenter/components/driver/driver.component.html
+++ b/src/app/routes/usercenter/components/driver/driver.component.html
@@ -21,8 +21,8 @@
-
-
+
+
diff --git a/src/app/routes/usercenter/components/driver/driver.component.ts b/src/app/routes/usercenter/components/driver/driver.component.ts
index be48eb18..48ef1590 100644
--- a/src/app/routes/usercenter/components/driver/driver.component.ts
+++ b/src/app/routes/usercenter/components/driver/driver.component.ts
@@ -22,7 +22,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
promoterModal!: any;
promotersTelephone = '';
- resourceStatus: any = 0;
+ resourceStatus: any = 10;
constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
/**
@@ -30,7 +30,8 @@ export class UserCenterComponentsDriverComponent implements OnInit {
*/
get reqParams() {
const params: any = {
- ...(this.sf && this.sf.value)
+ ...(this.sf && this.sf.value),
+ auditStatus: this.resourceStatus
};
if (this.sf?.value.effectiveDate) {
Object.assign(params, {
@@ -55,7 +56,9 @@ export class UserCenterComponentsDriverComponent implements OnInit {
selectChange(e: any) {
this.resourceStatus = e;
- this.st.load();
+ setTimeout(() => {
+ this.st.load();
+ }, 200);
}
addPromoter(item?: any) {
diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json
index 89329db4..4c7e0fcf 100644
--- a/src/assets/mocks/menu-data.json
+++ b/src/assets/mocks/menu-data.json
@@ -3,7 +3,7 @@
"data": {
"menu": [
{
- "text": "样例",
+ "text": "主导航",
"hideInBreadcrumb": true,
"children": [
{
diff --git a/src/assets/mocks/platform/tms-obc-web.json b/src/assets/mocks/platform/tms-obc-web.json
index c533d478..cc63fb4a 100644
--- a/src/assets/mocks/platform/tms-obc-web.json
+++ b/src/assets/mocks/platform/tms-obc-web.json
@@ -1,7 +1,7 @@
{
"menu": [
{
- "text": "样例",
+ "text": "主导航",
"hideInBreadcrumb": true,
"children": [
{