diff --git a/proxy.conf.js b/proxy.conf.js index 4175a8d9..89d93e1f 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-18 09:51:21 * @LastEditors : Shiming - * @LastEditTime : 2022-01-26 16:26:27 + * @LastEditTime : 2022-01-26 17:45:55 * @FilePath : \\tms-obc-web\\proxy.conf.js * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -20,7 +20,7 @@ module.exports = { // } '//api': { target: { - host: 'tms-api-test.eascs.com', + host: 'tms-api-dev.eascs.com', protocol: 'https:', port: 443 }, diff --git a/src/app/core/guards/auth.guard.ts b/src/app/core/guards/auth.guard.ts index eb319233..8fa924fc 100644 --- a/src/app/core/guards/auth.guard.ts +++ b/src/app/core/guards/auth.guard.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-25 16:03:45 * @LastEditors : Shiming - * @LastEditTime : 2022-01-25 19:12:23 + * @LastEditTime : 2022-01-26 18:04:46 * @FilePath : \\tms-obc-web\\src\\app\\core\\guards\\auth.guard.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -56,10 +56,17 @@ export class AuthGuard implements CanActivate, CanActivateChild { return this.baseService.request('/api/mdc/cuc/functionButton/getUserFunctionButton', { link: route }).pipe( switchMap(res => { if (res) { - this.srv.setAbility(res.permissionsCodeList || []); - this.menuService.resume(); + console.log('666') + console.log(res) + // this.srv.setAbility(res.abilities || []); + // this.menuService.resume(); + this.baseService.request('/api/mdc/cuc/enterpriseProject/getUserDefaultEnterpriseProject').subscribe((res: any) => { + if(!res.enterpriseIdentity){ + this.srv.setAbility(res.abilities || []); + this.menuService.resume(); + } + }) } - return of(true); }) ); diff --git a/src/app/routes/sys-setting/components/basic-setting/basic-setting.component.ts b/src/app/routes/sys-setting/components/basic-setting/basic-setting.component.ts index 25cc3383..53e0217f 100644 --- a/src/app/routes/sys-setting/components/basic-setting/basic-setting.component.ts +++ b/src/app/routes/sys-setting/components/basic-setting/basic-setting.component.ts @@ -1,3 +1,13 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-01-25 13:10:49 + * @LastEditors : Shiming + * @LastEditTime : 2022-01-26 17:45:11 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\components\\basic-setting\\basic-setting.component.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ import { Component, OnInit, ViewChild } from '@angular/core'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; import { dateTimePickerUtil } from '@delon/util'; @@ -24,8 +34,8 @@ export class BasicSettingComponent implements OnInit { if (res?.length > 0) { const typeData = res.find(config => config.configFullKey === 'sys.config'); if (typeData) { - this.tabs = typeData.children; - this.selectedTab = typeData.children[0]; + this.tabs = typeData?.children; + this.selectedTab = typeData?.children?.[0]; this.getConfigList(this.selectedTab); } } @@ -34,7 +44,7 @@ export class BasicSettingComponent implements OnInit { getConfigList(selectedTab: any) { this.selectedTab = selectedTab; - this.service.request(this.service.$api_get_config_by_parent_id, { id: selectedTab.id }).subscribe((res: Array) => { + this.service.request(this.service.$api_get_config_by_parent_id, { id: selectedTab?.id }).subscribe((res: Array) => { if (res?.length > 0) { res = res.map(item => ({ ...item, diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html index 3c96e278..102ca0cd 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html @@ -1,5 +1,5 @@ - +