diff --git a/proxy.conf.js b/proxy.conf.js index 1f212dc6..89d93e1f 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -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 0d009572..39753b5a 100644 --- a/src/app/core/guards/auth.guard.ts +++ b/src/app/core/guards/auth.guard.ts @@ -59,25 +59,25 @@ export class AuthGuard extends ACLGuard { private handle(route: ActivatedRouteSnapshot, state: RouterStateSnapshot, type: 1 | 2, router?: string): Observable { if (!router) { - if (type === 1) { - return super.canActivate(route, state); - } else { - return super.canActivateChild(route, state); - } + return type === 1 ? super.canActivate(route, state) : super.canActivateChild(route, state); } - // console.log(route, state, type, router); - - return this.baseService.request('/api/mdc/cuc/functionButton/getUserFunctionButton', { link: router }).pipe( + return this.baseService.request('/api/mdc/cuc/enterpriseProject/getUserDefaultEnterpriseProject').pipe( switchMap(res => { - if (res) { + if (res.enterpriseIdentity) { + // 超级管理员赋值全量权限 + this.srv1.setFull(true); + return of(true); + } else { + // 如果不是超级管理员 获取权限 + return this.baseService.request('/api/mdc/cuc/functionButton/getUserFunctionButton', { link: router }); + } + }), + switchMap(res => { + if (res?.abilities) { this.srv1.setAbility(res.abilities || []); this.menuService.resume(); } - if (type === 1) { - return super.canActivate(route, state); - } else { - return super.canActivateChild(route, state); - } + return type === 1 ? super.canActivate(route, state) : super.canActivateChild(route, state); }) ); } @@ -86,7 +86,7 @@ export class AuthGuard extends ACLGuard { * 根据参数拼接原始路由 * @param params 参数 * @param route 实际路由 - * @returns + * @returns */ private settingRoute(params: any, route: string) { let _route = route; diff --git a/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.ts b/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.ts index b121a2a4..d7231f1a 100644 --- a/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.ts +++ b/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.ts @@ -63,7 +63,6 @@ export class InvoiceDetailComponent implements OnInit { loadInvoiceHeader(id: string) { this.service.request(this.service.$api_get_invoice_header_detail, { id }).subscribe(res => { - console.log(res); if (res) { this.headerInfo = res; } @@ -71,7 +70,6 @@ export class InvoiceDetailComponent implements OnInit { } loadRoutes(expressno: string) { this.service.request(this.service.$api_get_express_routes, expressno).subscribe(res => { - console.log(res); if (res) { res.routes = res.routes.map((route: any) => ({ time: route.acceptTime, value: route.remark + route.acceptAddress, color: 'gray' })); this.routesInfo = res; @@ -83,8 +81,6 @@ export class InvoiceDetailComponent implements OnInit { } saveInvoices() { - console.log(this.invoiceST._data); - this.isEdit = false; } @@ -215,7 +211,7 @@ export class InvoiceDetailComponent implements OnInit { { title: '费用号', index: 'feeHId' }, { title: '订单号', index: 'billHId' }, { title: '订单日期', index: 'createTime', type: 'date' }, - { title: '计费日期', index: 'callNo', type: 'date' }, + { title: '计费日期', index: 'feeDate', type: 'date' }, { title: '税率', index: 'vatrate' }, { title: '申请金额',