edit
This commit is contained in:
@ -62,7 +62,7 @@ export class BusinessInterceptor implements HttpInterceptor {
|
|||||||
const header: any = {
|
const header: any = {
|
||||||
appId: this.envSrv.env.appId,
|
appId: this.envSrv.env.appId,
|
||||||
tenantId: this.envSrv.env.tenantId,
|
tenantId: this.envSrv.env.tenantId,
|
||||||
enterpriseId: '0',
|
enterpriseId: this.envSrv.env.enterpriseId,
|
||||||
...position
|
...position
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Inject, Injectable } from '@angular/core';
|
import { Inject, Injectable } from '@angular/core';
|
||||||
|
import { cacheConf } from '@conf/cache.conf';
|
||||||
|
import { sysConf } from '@conf/sys.conf';
|
||||||
import { ACLService } from '@delon/acl';
|
import { ACLService } from '@delon/acl';
|
||||||
import { MenuService, SettingsService, TitleService, _HttpClient } from '@delon/theme';
|
import { MenuService, SettingsService, TitleService, _HttpClient } from '@delon/theme';
|
||||||
import { AmapService, EAUserService } from '@shared';
|
import { AmapService, EACacheService, EAUserService } from '@shared';
|
||||||
import { NzSafeAny } from 'ng-zorro-antd/core/types';
|
import { NzSafeAny } from 'ng-zorro-antd/core/types';
|
||||||
import { NzIconService } from 'ng-zorro-antd/icon';
|
import { NzIconService } from 'ng-zorro-antd/icon';
|
||||||
import { Observable, zip } from 'rxjs';
|
import { Observable, zip } from 'rxjs';
|
||||||
@ -27,6 +29,7 @@ export class StartupService {
|
|||||||
private httpClient: _HttpClient,
|
private httpClient: _HttpClient,
|
||||||
private userSrv: EAUserService,
|
private userSrv: EAUserService,
|
||||||
private amapService: AmapService,
|
private amapService: AmapService,
|
||||||
|
public cacheSrv: EACacheService,
|
||||||
private coreSrv: CoreService
|
private coreSrv: CoreService
|
||||||
) {
|
) {
|
||||||
iconSrv.addIcon(...ICONS_AUTO, ...ICONS);
|
iconSrv.addIcon(...ICONS_AUTO, ...ICONS);
|
||||||
@ -83,6 +86,11 @@ export class StartupService {
|
|||||||
this.settingService.setApp(appData);
|
this.settingService.setApp(appData);
|
||||||
// 用户信息:包括姓名、头像、邮箱地址
|
// 用户信息:包括姓名、头像、邮箱地址
|
||||||
this.settingService.setUser(userData);
|
this.settingService.setUser(userData);
|
||||||
|
this.cacheSrv.set(cacheConf.env, {
|
||||||
|
appId: sysConf.appId,
|
||||||
|
tenantId: userData?.tenantId || sysConf.tenantId,
|
||||||
|
enterpriseId: userData?.enterpriseId || sysConf.enterpriseId
|
||||||
|
});
|
||||||
// ACL:设置权限为全量
|
// ACL:设置权限为全量
|
||||||
this.aclService.setFull(true);
|
this.aclService.setFull(true);
|
||||||
// 初始化菜单
|
// 初始化菜单
|
||||||
|
|||||||
@ -0,0 +1,166 @@
|
|||||||
|
<nz-card>
|
||||||
|
<div nz-row [nzGutter]="8">
|
||||||
|
<div nz-col nzSpan="4">
|
||||||
|
<ul nz-menu nzMode="inline" class="card-height">
|
||||||
|
<li nz-menu-item [nzSelected]="idx === 0" (click)="changeType(idx)"
|
||||||
|
*ngFor="let item of tabs; let idx = index">
|
||||||
|
{{ item.name }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div nz-col nzSpan="20" style="overflow: scroll">
|
||||||
|
<nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab===0 || selectedTab===1">
|
||||||
|
<h2 style="font-weight: 800;">货主提现设置</h2>
|
||||||
|
<div nz-row nzGutter="8">
|
||||||
|
<div nz-col nzSpan="24" se-container [labelWidth]="100">
|
||||||
|
<se label="提现审核">
|
||||||
|
<nz-radio-group [(ngModel)]="formDate.isAudit">
|
||||||
|
<label nz-radio [nzValue]="false" class="ml-xl">关闭</label>
|
||||||
|
<label nz-radio [nzValue]="true" class="ml-xl">开启</label>
|
||||||
|
</nz-radio-group>
|
||||||
|
</se>
|
||||||
|
<se label="审核时间" style="margin-bottom: 0;">
|
||||||
|
<nz-radio-group [(ngModel)]="formDate.isEveryDay">
|
||||||
|
<label nz-radio [nzValue]="false" class="ml-xl block-radio">全天</label>
|
||||||
|
<label nz-radio [nzValue]="true" class="ml-xl block-radio">自定义</label>
|
||||||
|
</nz-radio-group>
|
||||||
|
</se>
|
||||||
|
<se [col]="1">
|
||||||
|
<nz-radio-group [(ngModel)]="formDate.isEveryWeek">
|
||||||
|
<label nz-radio [nzValue]="false" class="ml-xxl block-radio">
|
||||||
|
<div class="d-flex">
|
||||||
|
每天
|
||||||
|
<div class="ml-md" style="cursor:default">
|
||||||
|
<p style="color: #1890ff;cursor: pointer;">添加时间段</p>
|
||||||
|
<div class="mb-md">
|
||||||
|
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="开始时间"></nz-time-picker>
|
||||||
|
--
|
||||||
|
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="结束时间"></nz-time-picker>
|
||||||
|
<label style="color: #1890ff;cursor: pointer;" class="ml-md">删除</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
<label nz-radio [nzValue]="true" class="ml-xxl block-radio mt-md">
|
||||||
|
<div class="d-flex">
|
||||||
|
每周
|
||||||
|
<div class="ml-md" style="cursor:default">
|
||||||
|
<p style="color: #1890ff;cursor: pointer;">添加星期</p>
|
||||||
|
<div class="mb-md">
|
||||||
|
<nz-checkbox-group [(ngModel)]="checkOptionsOne"></nz-checkbox-group>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="mb-md">
|
||||||
|
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="开始时间">
|
||||||
|
</nz-time-picker>
|
||||||
|
--
|
||||||
|
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="结束时间">
|
||||||
|
</nz-time-picker>
|
||||||
|
<label style="color: #1890ff;cursor: pointer;"
|
||||||
|
class="ml-md">删除</label>
|
||||||
|
</div>
|
||||||
|
<p style="color: #1890ff;cursor: pointer;"> 添加时间段</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</nz-radio-group>
|
||||||
|
</se>
|
||||||
|
<se label="提现限额">
|
||||||
|
<div class="d-flex align-items-center ml-xl mb-md">
|
||||||
|
<label nz-checkbox>每日最多可提现</label>
|
||||||
|
<nz-input-group nzAddOnAfter="元" style="width: 150px;">
|
||||||
|
<input type="number" nz-input placeholder="请输入" />
|
||||||
|
</nz-input-group>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex align-items-center ml-xl">
|
||||||
|
<label nz-checkbox>每月最多可提现</label>
|
||||||
|
<nz-input-group nzAddOnAfter="元" style="width: 150px;">
|
||||||
|
<input type="number" nz-input placeholder="请输入" />
|
||||||
|
</nz-input-group>
|
||||||
|
</div>
|
||||||
|
</se>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nz-card>
|
||||||
|
|
||||||
|
<nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab===2">
|
||||||
|
<h2 style="font-weight: 800;">路桥发票设置</h2>
|
||||||
|
<div nz-row nzGutter="8">
|
||||||
|
<div nz-col nzSpan="24" se-container [labelWidth]="100">
|
||||||
|
<se label="发票申请" style="margin-bottom: 0;">
|
||||||
|
<nz-radio-group [(ngModel)]="formDate.isAudit">
|
||||||
|
<label nz-radio [nzValue]="false" class="ml-xl">手动申请</label>
|
||||||
|
<label nz-radio [nzValue]="true" class="ml-xl">自动申请</label>
|
||||||
|
</nz-radio-group>
|
||||||
|
</se>
|
||||||
|
<se>
|
||||||
|
<p class="ml-xl" style="color: #7e7c7c;">开启自动申请后,运单完成卸货后会自动根据运单信息申请ETC发票。</p>
|
||||||
|
</se>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nz-card>
|
||||||
|
|
||||||
|
<nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab===3">
|
||||||
|
<h2 style="font-weight: 800;">风险单监控</h2>
|
||||||
|
<div nz-row nzGutter="8">
|
||||||
|
<div nz-col nzSpan="24" se-container [labelWidth]="180">
|
||||||
|
<se [col]="1" label="早/晚于计划出发时间" style="margin-bottom: 8px;">
|
||||||
|
<nz-radio-group [(ngModel)]="formDate.isAudit">
|
||||||
|
<label nz-radio [nzValue]="false" class="ml-xl mt-sm">不限定</label>
|
||||||
|
<label nz-radio [nzValue]="true" class="ml-xl mt-sm">范围外报异常</label>
|
||||||
|
</nz-radio-group>
|
||||||
|
<nz-input-group nzAddOnAfter="小时" style="width: 200px;">
|
||||||
|
<input type="number" nz-input placeholder="请输入允许时间差" />
|
||||||
|
</nz-input-group>
|
||||||
|
</se>
|
||||||
|
<se [col]="1">
|
||||||
|
<p class="ml-xl" style="color: #7e7c7c;">当前时间与计划时间对比,允许如上合理范围内执行不报异常,差异在范围外则报异常</p>
|
||||||
|
</se>
|
||||||
|
<se [col]="1" label="早/晚于计划到达时间" style="margin-bottom: 8px;">
|
||||||
|
<nz-radio-group [(ngModel)]="formDate.isAudit">
|
||||||
|
<label nz-radio [nzValue]="false" class="ml-xl mt-sm">不限定</label>
|
||||||
|
<label nz-radio [nzValue]="true" class="ml-xl mt-sm">范围外报异常</label>
|
||||||
|
</nz-radio-group>
|
||||||
|
<nz-input-group nzAddOnAfter="小时" style="width: 200px;">
|
||||||
|
<input type="number" nz-input placeholder="请输入允许时间差" />
|
||||||
|
</nz-input-group>
|
||||||
|
</se>
|
||||||
|
<se [col]="1">
|
||||||
|
<p class="ml-xl" style="color: #7e7c7c;">当前时间与计划时间对比,允许如上合理范围内执行不报异常,差异在范围外则报异常</p>
|
||||||
|
</se>
|
||||||
|
<se [col]="1" label="损耗量" style="margin-bottom: 8px;">
|
||||||
|
<nz-radio-group [(ngModel)]="formDate.isAudit">
|
||||||
|
<label nz-radio [nzValue]="false" class="ml-xl mt-sm">不限定</label>
|
||||||
|
<label nz-radio [nzValue]="true" class="ml-xl mt-sm">范围外报异常</label>
|
||||||
|
</nz-radio-group>
|
||||||
|
<nz-input-group nzAddOnAfter="%" style="width: 200px;">
|
||||||
|
<input type="number" nz-input placeholder="请输入允许时间差" />
|
||||||
|
</nz-input-group>
|
||||||
|
</se>
|
||||||
|
<se [col]="1">
|
||||||
|
<p class="ml-xl" style="color: #7e7c7c;">签收量与装运量对比,允许如上合理范围内损耗不报异常,差异在范围外则报异常</p>
|
||||||
|
</se>
|
||||||
|
<se [col]="1" label="装货/卸货地距离范围" style="margin-bottom: 8px;">
|
||||||
|
<nz-radio-group [(ngModel)]="formDate.isAudit">
|
||||||
|
<label nz-radio [nzValue]="false" class="ml-xl mt-sm">不限定</label>
|
||||||
|
<label nz-radio [nzValue]="true" class="ml-xl mt-sm">范围外报异常</label>
|
||||||
|
</nz-radio-group>
|
||||||
|
<nz-input-group nzAddOnAfter="KM" style="width: 200px;">
|
||||||
|
<input type="number" nz-input placeholder="请输入允许时间差" />
|
||||||
|
</nz-input-group>
|
||||||
|
</se>
|
||||||
|
<se [col]="1">
|
||||||
|
<p class="ml-xl" style="color: #7e7c7c;">装货地和发货地、签收地和收货地距离对比,允许如上合理范围内执行不报异常,差异在范围外则报异常</p>
|
||||||
|
</se>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nz-card>
|
||||||
|
|
||||||
|
<div class="mb-md save-btn">
|
||||||
|
<button class="ml-lg" nz-button nzSize="large" nzType="primary">保存</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nz-card>
|
||||||
@ -13,73 +13,24 @@
|
|||||||
<nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab===0 || selectedTab===1">
|
<nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab===0 || selectedTab===1">
|
||||||
<h2 style="font-weight: 800;">货主提现设置</h2>
|
<h2 style="font-weight: 800;">货主提现设置</h2>
|
||||||
<div nz-row nzGutter="8">
|
<div nz-row nzGutter="8">
|
||||||
<div nz-col nzSpan="24" se-container [labelWidth]="100">
|
<div nz-col nzSpan="24" se-container [labelWidth]="250">
|
||||||
<se label="提现审核">
|
<se [label]="item.name" *ngFor="let item of configList">
|
||||||
<nz-radio-group [(ngModel)]="formDate.isAudit">
|
<ng-container [ngSwitch]="item.itemValue?.type">
|
||||||
<label nz-radio [nzValue]="false" class="ml-xl">关闭</label>
|
<ng-container *ngSwitchCase="'radio'">
|
||||||
<label nz-radio [nzValue]="true" class="ml-xl">开启</label>
|
<nz-radio-group [(ngModel)]="item.itemValue.data">
|
||||||
</nz-radio-group>
|
<label nz-radio [nzValue]="false"
|
||||||
</se>
|
class="ml-xl">{{item.itemValue.falseLable}}</label>
|
||||||
<se label="审核时间" style="margin-bottom: 0;">
|
<label nz-radio [nzValue]="true"
|
||||||
<nz-radio-group [(ngModel)]="formDate.isEveryDay">
|
class="ml-xl">{{item.itemValue.trueLable}}</label>
|
||||||
<label nz-radio [nzValue]="false" class="ml-xl block-radio">全天</label>
|
</nz-radio-group>
|
||||||
<label nz-radio [nzValue]="true" class="ml-xl block-radio">自定义</label>
|
</ng-container>
|
||||||
</nz-radio-group>
|
<ng-container *ngSwitchCase="'input'">
|
||||||
</se>
|
<nz-input-group [nzAddOnAfter]="item.itemValue.afterLable" style="width: 150px;" class="ml-md">
|
||||||
<se [col]="1">
|
<input type="number" nz-input [(ngModel)]="item.itemValue.data"
|
||||||
<nz-radio-group [(ngModel)]="formDate.isEveryWeek">
|
placeholder="请输入" />
|
||||||
<label nz-radio [nzValue]="false" class="ml-xxl block-radio">
|
</nz-input-group>
|
||||||
<div class="d-flex">
|
</ng-container>
|
||||||
每天
|
</ng-container>
|
||||||
<div class="ml-md" style="cursor:default">
|
|
||||||
<p style="color: #1890ff;cursor: pointer;">添加时间段</p>
|
|
||||||
<div class="mb-md">
|
|
||||||
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="开始时间"></nz-time-picker>
|
|
||||||
--
|
|
||||||
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="结束时间"></nz-time-picker>
|
|
||||||
<label style="color: #1890ff;cursor: pointer;" class="ml-md">删除</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</label>
|
|
||||||
<label nz-radio [nzValue]="true" class="ml-xxl block-radio mt-md">
|
|
||||||
<div class="d-flex">
|
|
||||||
每周
|
|
||||||
<div class="ml-md" style="cursor:default">
|
|
||||||
<p style="color: #1890ff;cursor: pointer;">添加星期</p>
|
|
||||||
<div class="mb-md">
|
|
||||||
<nz-checkbox-group [(ngModel)]="checkOptionsOne"></nz-checkbox-group>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div class="mb-md">
|
|
||||||
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="开始时间">
|
|
||||||
</nz-time-picker>
|
|
||||||
--
|
|
||||||
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="结束时间">
|
|
||||||
</nz-time-picker>
|
|
||||||
<label style="color: #1890ff;cursor: pointer;"
|
|
||||||
class="ml-md">删除</label>
|
|
||||||
</div>
|
|
||||||
<p style="color: #1890ff;cursor: pointer;"> 添加时间段</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</label>
|
|
||||||
</nz-radio-group>
|
|
||||||
</se>
|
|
||||||
<se label="提现限额">
|
|
||||||
<div class="d-flex align-items-center ml-xl mb-md">
|
|
||||||
<label nz-checkbox>每日最多可提现</label>
|
|
||||||
<nz-input-group nzAddOnAfter="元" style="width: 150px;">
|
|
||||||
<input type="number" nz-input placeholder="请输入" />
|
|
||||||
</nz-input-group>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center ml-xl">
|
|
||||||
<label nz-checkbox>每月最多可提现</label>
|
|
||||||
<nz-input-group nzAddOnAfter="元" style="width: 150px;">
|
|
||||||
<input type="number" nz-input placeholder="请输入" />
|
|
||||||
</nz-input-group>
|
|
||||||
</div>
|
|
||||||
</se>
|
</se>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -39,13 +39,71 @@ export class BasicSettingComponent implements OnInit {
|
|||||||
{ label: '周日', value: '周日' }
|
{ label: '周日', value: '周日' }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
configList: any = [
|
||||||
|
{
|
||||||
|
configId: '1475393700370898945',
|
||||||
|
itemKey: 'goods.name.config.type.3.3',
|
||||||
|
itemType: 1,
|
||||||
|
itemValue: '{"data":false,"type":"radio","trueLable":"开启","falseLable":"关闭"}',
|
||||||
|
name: '货主是否可以设置车队长',
|
||||||
|
parentId: '0',
|
||||||
|
remark: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
configId: '1475393700370898945',
|
||||||
|
itemKey: 'goods.name.config.type.3.4',
|
||||||
|
itemType: 1,
|
||||||
|
itemValue: '{"data":false,"type":"radio","trueLable":"开启","falseLable":"关闭"}',
|
||||||
|
name: '货主企业四要素校验开关',
|
||||||
|
parentId: '0',
|
||||||
|
remark: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
configId: '1475393700370898945',
|
||||||
|
itemKey: 'goods.name.config.type.3.5',
|
||||||
|
itemType: 1,
|
||||||
|
itemValue: '{"data":false,"type":"radio","trueLable":"开启","falseLable":"关闭"}',
|
||||||
|
name: '货主提现功能开关',
|
||||||
|
parentId: '0',
|
||||||
|
remark: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
configId: '1475393700370898945',
|
||||||
|
itemKey: 'goods.name.config.type.3.5',
|
||||||
|
itemType: 1,
|
||||||
|
itemValue: '{"data":"","type":"input","afterLable":"%"}',
|
||||||
|
name: '货主费率配置',
|
||||||
|
parentId: '0',
|
||||||
|
remark: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
configId: '1475393700370898945',
|
||||||
|
itemKey: 'goods.name.config.type.3.5',
|
||||||
|
itemType: 1,
|
||||||
|
itemValue: '{"data":"5","type":"input","afterLable":"次"}',
|
||||||
|
name: '单个用户每天最大发送短信次数',
|
||||||
|
parentId: '0',
|
||||||
|
remark: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
configId: '1475393700370898945',
|
||||||
|
itemKey: 'goods.name.config.type.3.5',
|
||||||
|
itemType: 1,
|
||||||
|
itemValue: '{"data":true,"type":"radio","trueLable":"开启","falseLable":"关闭","isCustom":true}',
|
||||||
|
name: '合同单权限',
|
||||||
|
parentId: '0',
|
||||||
|
remark: ''
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
constructor(private service: SystemService) {}
|
constructor(private service: SystemService) {}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {
|
||||||
|
this.configList = this.configList.map((item: any) => ({ ...item, itemValue: JSON.parse(item.itemValue) }));
|
||||||
|
}
|
||||||
|
|
||||||
changeType(type: number): void {
|
changeType(type: number): void {
|
||||||
this.selectedTab = type;
|
this.selectedTab = type;
|
||||||
console.log(type);
|
console.log(type);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { BaseService } from '../core/base.service';
|
|||||||
import { EACacheService } from './../core/cache.service';
|
import { EACacheService } from './../core/cache.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class EAEnvironmentService extends BaseService {
|
export class EAEnvironmentService extends BaseService {
|
||||||
constructor(public injector: Injector, private eaCacheSrv: EACacheService) {
|
constructor(public injector: Injector, private eaCacheSrv: EACacheService) {
|
||||||
@ -15,12 +15,13 @@ export class EAEnvironmentService extends BaseService {
|
|||||||
/**
|
/**
|
||||||
* 环境信息
|
* 环境信息
|
||||||
*/
|
*/
|
||||||
public get env(): { appId: string; tenantId: string } {
|
public get env(): { appId: string; tenantId: string; enterpriseId: string } {
|
||||||
const cacheEnv: any = this.eaCacheSrv.get(cacheConf.env);
|
const cacheEnv: any = this.eaCacheSrv.get(cacheConf.env);
|
||||||
// 附加环境变量
|
// 附加环境变量
|
||||||
const env: { appId: string; tenantId: string } = {
|
const env: { appId: string; tenantId: string; enterpriseId: string } = {
|
||||||
appId: cacheEnv?.appId || sysConf.appId,
|
appId: cacheEnv?.appId || sysConf.appId,
|
||||||
tenantId: cacheEnv?.tenantId || sysConf.tenantId,
|
tenantId: cacheEnv?.tenantId || sysConf.tenantId,
|
||||||
|
enterpriseId: cacheEnv?.enterpriseId || sysConf.enterpriseId
|
||||||
};
|
};
|
||||||
return env;
|
return env;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,6 +135,11 @@ export class EAUserService extends BaseService {
|
|||||||
*/
|
*/
|
||||||
async loadUserInfo() {
|
async loadUserInfo() {
|
||||||
return this.asyncRequest(this.$api_get_user_by_token).then(res => {
|
return this.asyncRequest(this.$api_get_user_by_token).then(res => {
|
||||||
|
this.cacheSrv.set(cacheConf.env, {
|
||||||
|
appId: sysConf.appId,
|
||||||
|
tenantId: res?.tenantId || sysConf.tenantId,
|
||||||
|
enterpriseId: res?.enterpriseId || sysConf.enterpriseId
|
||||||
|
});
|
||||||
this.cacheSrv.set(cacheConf.user, res);
|
this.cacheSrv.set(cacheConf.user, res);
|
||||||
this.settings.setUser(res);
|
this.settings.setUser(res);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -12,6 +12,10 @@ export const sysConf = {
|
|||||||
* 租户ID
|
* 租户ID
|
||||||
*/
|
*/
|
||||||
tenantId: `1`,
|
tenantId: `1`,
|
||||||
|
/**
|
||||||
|
* 企业ID
|
||||||
|
*/
|
||||||
|
enterpriseId: `0`,
|
||||||
/**
|
/**
|
||||||
* 登录路径
|
* 登录路径
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user