Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -41,7 +41,8 @@ const APPINIT_PROVIDES = [
|
|||||||
deps: [StartupService],
|
deps: [StartupService],
|
||||||
multi: true
|
multi: true
|
||||||
},
|
},
|
||||||
{ provide: DEFAULT_CURRENCY_CODE, useValue: '¥' }
|
{ provide: DEFAULT_CURRENCY_CODE, useValue: '¥' },
|
||||||
|
AuthGuard
|
||||||
];
|
];
|
||||||
// #endregion
|
// #endregion
|
||||||
|
|
||||||
@ -53,6 +54,7 @@ import { RoutesModule } from './routes/routes.module';
|
|||||||
import { SharedModule } from './shared/shared.module';
|
import { SharedModule } from './shared/shared.module';
|
||||||
import { STWidgetModule } from './shared/widget/st-widget.module';
|
import { STWidgetModule } from './shared/widget/st-widget.module';
|
||||||
import { registerLocaleData } from '@angular/common';
|
import { registerLocaleData } from '@angular/common';
|
||||||
|
import { AuthGuard } from './core/guards/auth.guard';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [AppComponent],
|
declarations: [AppComponent],
|
||||||
|
|||||||
@ -1,55 +1,51 @@
|
|||||||
import { Inject, Injectable, Injector } from '@angular/core';
|
import { Inject, Injectable, Injector } from '@angular/core';
|
||||||
import {
|
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot } from '@angular/router';
|
||||||
ActivatedRouteSnapshot,
|
|
||||||
CanActivate,
|
|
||||||
CanActivateChild,
|
|
||||||
CanLoad,
|
|
||||||
Route,
|
|
||||||
Router,
|
|
||||||
RouterStateSnapshot,
|
|
||||||
UrlSegment,
|
|
||||||
UrlTree
|
|
||||||
} from '@angular/router';
|
|
||||||
import { sysConf } from '@conf/sys.conf';
|
|
||||||
import { CoreService } from '@core';
|
|
||||||
import { ACLGuard, ACLService } from '@delon/acl';
|
import { ACLGuard, ACLService } from '@delon/acl';
|
||||||
import { EAUserService } from '@shared';
|
import { MenuService } from '@delon/theme';
|
||||||
|
import { BaseService, EAUserService } from '@shared';
|
||||||
import { Observable, of } from 'rxjs';
|
import { Observable, of } from 'rxjs';
|
||||||
|
import { map } from 'rxjs/operators';
|
||||||
|
|
||||||
const auths = ['YUNLI-CART-SEARCH', 'YUNLI-CART-DAOCHU', 'YUNLI-CART-DETAIL'];
|
const auths = ['YUNLI-CART-SEARCH', 'YUNLI-CART-DAOC1HU', 'YUNLI-CART-DETAIL', 'YUNLI-CART-AUDIT-SEARCH'];
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AuthGuard implements CanActivate, CanActivateChild, CanLoad {
|
export class AuthGuard implements CanActivate, CanActivateChild {
|
||||||
constructor(srv: ACLService, router: Router, private eaUserSrv: CoreService, private router2: Router, private inject: Injector) {}
|
constructor(private srv: ACLService, private baseService: BaseService, private menuService: MenuService) {}
|
||||||
canLoad(route: Route, segments: UrlSegment[]): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree> {
|
|
||||||
console.log(route);
|
|
||||||
|
|
||||||
throw true;
|
|
||||||
}
|
|
||||||
|
|
||||||
canActivate(route: ActivatedRouteSnapshot, _state: RouterStateSnapshot | null): Observable<boolean> {
|
canActivate(route: ActivatedRouteSnapshot, _state: RouterStateSnapshot | null): Observable<boolean> {
|
||||||
const canOpen = this.eaUserSrv.loginStatus;
|
if (Object.keys(route.params)?.length > 0 || !route.routeConfig?.path) {
|
||||||
if (!canOpen) {
|
return this.handle();
|
||||||
this.router2.navigate([sysConf.login_url], {
|
} else {
|
||||||
queryParams: {
|
return this.handle(_state?.url);
|
||||||
returnUrl: _state?.url
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return of(!canOpen);
|
|
||||||
}
|
}
|
||||||
return of(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
|
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
|
||||||
const canOpen = this.eaUserSrv.loginStatus;
|
return this.handle(this.settingRoute(childRoute.params, state.url));
|
||||||
if (!canOpen) {
|
}
|
||||||
this.router2.navigate([sysConf.login_url], {
|
|
||||||
queryParams: {
|
private handle(route?: string): Observable<boolean> {
|
||||||
returnUrl: state?.url
|
if (!route) {
|
||||||
}
|
return of(true);
|
||||||
});
|
|
||||||
return of(!canOpen);
|
|
||||||
}
|
}
|
||||||
return of(true);
|
console.log(route);
|
||||||
|
|
||||||
|
return this.baseService.request('/api/mdc/cuc/functionButton/getPermissionsCodeoByLink', { link: route }).pipe(
|
||||||
|
map(_ => {
|
||||||
|
this.srv.setAbility(auths);
|
||||||
|
this.menuService.resume();
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private settingRoute(params: any, route: string) {
|
||||||
|
let _route = route;
|
||||||
|
for (const key of Object.keys(params)) {
|
||||||
|
if (_route.indexOf(params[key]) > -1) {
|
||||||
|
_route = _route.replace(params[key], ':id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _route;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,10 +11,16 @@ import { environment } from '@env/environment';
|
|||||||
// #region NG-ALAIN Config
|
// #region NG-ALAIN Config
|
||||||
|
|
||||||
const alainConfig: AlainConfig = {
|
const alainConfig: AlainConfig = {
|
||||||
st: { modal: { size: 'lg' } },
|
st: {
|
||||||
|
req: { method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' } },
|
||||||
|
res: { reName: { list: 'data.records', total: 'data.total' } },
|
||||||
|
page: { show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] },
|
||||||
|
modal: { size: 'lg' }
|
||||||
|
},
|
||||||
sf: { button: { search: '查询' } },
|
sf: { button: { search: '查询' } },
|
||||||
pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true },
|
pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true },
|
||||||
auth: { login_url: '/dashboard' }
|
auth: { login_url: '/passport/login' },
|
||||||
|
acl: { guard_url: '/' }
|
||||||
};
|
};
|
||||||
|
|
||||||
const alainModules = [AlainThemeModule.forRoot(), DelonACLModule.forRoot()];
|
const alainModules = [AlainThemeModule.forRoot(), DelonACLModule.forRoot()];
|
||||||
|
|||||||
@ -13,16 +13,8 @@
|
|||||||
<div nz-row nzGutter="8">
|
<div nz-row nzGutter="8">
|
||||||
<!-- 查询字段小于或等于3个时,不显示伸缩按钮 -->
|
<!-- 查询字段小于或等于3个时,不显示伸缩按钮 -->
|
||||||
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
|
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
|
||||||
<sf
|
<sf #sf [schema]="schema" [ui]="ui" [mode]="'search'" [disabled]="!sf?.valid" [loading]="service.http.loading"
|
||||||
#sf
|
(formSubmit)="st?.load(1)" (formReset)="resetSF()"></sf>
|
||||||
[schema]="schema"
|
|
||||||
[ui]="ui"
|
|
||||||
[mode]="'search'"
|
|
||||||
[disabled]="!sf?.valid"
|
|
||||||
[loading]="service.http.loading"
|
|
||||||
(formSubmit)="st?.load(1)"
|
|
||||||
(formReset)="resetSF()"
|
|
||||||
></sf>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 查询字段大于3个时,根据展开状态调整布局 -->
|
<!-- 查询字段大于3个时,根据展开状态调整布局 -->
|
||||||
@ -37,7 +29,8 @@
|
|||||||
</sf>
|
</sf>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
|
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
|
||||||
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
|
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
|
||||||
|
(click)="st?.load(1)">查询</button>
|
||||||
<button nz-button (click)="resetSF()">重置</button>
|
<button nz-button (click)="resetSF()">重置</button>
|
||||||
<button nz-button nzType="link" (click)="expandToggle()">
|
<button nz-button nzType="link" (click)="expandToggle()">
|
||||||
{{ !_$expand ? '展开' : '收起' }}
|
{{ !_$expand ? '展开' : '收起' }}
|
||||||
@ -50,26 +43,13 @@
|
|||||||
|
|
||||||
<nz-card class="content-box" nzBordered>
|
<nz-card class="content-box" nzBordered>
|
||||||
<div style="position: relative">
|
<div style="position: relative">
|
||||||
<nz-alert
|
<nz-alert nzType="info" [nzMessage]="'当前共' + st?.total + '行记录,已选择' + selectedRows.length + '项'" nzShowIcon
|
||||||
nzType="info"
|
[ngStyle]="{ margin: '0 0 1rem 0' }">
|
||||||
[nzMessage]="'当前共' + st?.total + '行记录,已选择' + selectedRows.length + '项'"
|
|
||||||
nzShowIcon
|
|
||||||
[ngStyle]="{ margin: '0 0 1rem 0' }"
|
|
||||||
>
|
|
||||||
</nz-alert>
|
</nz-alert>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<st
|
<st #st [data]="service.$api_listDetailed_page" [columns]="columns" [req]="{ params: reqParams }"
|
||||||
#st
|
[loading]="service.http.loading" [scroll]="{ x: '1200px', y: '370px' }" (change)="stChange($event)">
|
||||||
[data]="service.$api_listDetailed_page"
|
|
||||||
[columns]="columns"
|
|
||||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
|
||||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
|
||||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
|
||||||
[loading]="service.http.loading"
|
|
||||||
[scroll]="{ x: '1200px', y: '370px' }"
|
|
||||||
(change)="stChange($event)"
|
|
||||||
>
|
|
||||||
<ng-template st-row="contractCode" let-item let-index="index">
|
<ng-template st-row="contractCode" let-item let-index="index">
|
||||||
<a [routerLink]="'/contract-management/index/detail/' + item.id">{{ item?.contractCode }}</a>
|
<a [routerLink]="'/contract-management/index/detail/' + item.id">{{ item?.contractCode }}</a>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
@ -80,13 +60,9 @@
|
|||||||
<div nz-row nzGutter="8">
|
<div nz-row nzGutter="8">
|
||||||
<div nz-col nzSpan="24" se-container [labelWidth]="80">
|
<div nz-col nzSpan="24" se-container [labelWidth]="80">
|
||||||
<se [col]="1" label="备注">
|
<se [col]="1" label="备注">
|
||||||
<textarea
|
<textarea nz-input rows="3" placeholder="同意可以不用填写原因 ,拒绝必须说明原因"
|
||||||
nz-input
|
style="width: 325px; margin-left: 14px"></textarea>
|
||||||
rows="3"
|
|
||||||
placeholder="同意可以不用填写原因 ,拒绝必须说明原因"
|
|
||||||
style="width: 325px; margin-left: 14px"
|
|
||||||
></textarea>
|
|
||||||
</se>
|
</se>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
@ -20,7 +20,7 @@ export class BasicSettingComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getTypeList() {
|
getTypeList() {
|
||||||
this.service.request(this.service.$api_get_config_tree, { configFullKey: 'sys.config' }).subscribe((res: Array<any>) => {
|
this.service.request(this.service.$api_get_config_tree, { configFullKey: 'sys.config', extendType: 0 }).subscribe((res: Array<any>) => {
|
||||||
if (res?.length > 0) {
|
if (res?.length > 0) {
|
||||||
const typeData = res.find(config => config.configFullKey === 'sys.config');
|
const typeData = res.find(config => config.configFullKey === 'sys.config');
|
||||||
if (typeData) {
|
if (typeData) {
|
||||||
@ -50,7 +50,6 @@ export class BasicSettingComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
saveAction(params: any) {
|
saveAction(params: any) {
|
||||||
|
|
||||||
this.service.request(this.service.$api_update_config_batch, params).subscribe(res => {
|
this.service.request(this.service.$api_update_config_batch, params).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.service.msgSrv.success('修改配置成功');
|
this.service.msgSrv.success('修改配置成功');
|
||||||
|
|||||||
@ -74,11 +74,11 @@ export class RequestedInvoiceModalComponent implements OnInit {
|
|||||||
{ title: '承运司机', index: 'driverinfo', width: 170 },
|
{ title: '承运司机', index: 'driverinfo', width: 170 },
|
||||||
{
|
{
|
||||||
title: '总费用',
|
title: '总费用',
|
||||||
index: 'vatmoney',
|
index: 'billkpmoney',
|
||||||
width: 90,
|
width: 90,
|
||||||
type: 'widget',
|
type: 'widget',
|
||||||
className: 'text-right',
|
className: 'text-right',
|
||||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatmoney }) }
|
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.billkpmoney }) }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '运输费',
|
title: '运输费',
|
||||||
|
|||||||
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: your name
|
|
||||||
* @Date: 2021-12-07 17:30:18
|
|
||||||
* @LastEditTime: 2021-12-09 17:47:33
|
|
||||||
* @LastEditors: your name
|
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
||||||
* @FilePath: \tms-obc-web\src\app\routes\vehicle\components\list\img-view\img-view.component.spec.ts
|
|
||||||
*/
|
|
||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
import { VehicleImgViewComponent } from './img-view.component';
|
|
||||||
|
|
||||||
describe('VehicleImgViewComponent', () => {
|
|
||||||
let component: VehicleImgViewComponent;
|
|
||||||
let fixture: ComponentFixture<VehicleImgViewComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [VehicleImgViewComponent],
|
|
||||||
}).compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(VehicleImgViewComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@ -7,69 +7,47 @@
|
|||||||
* @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\list.component.html
|
* @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\list.component.html
|
||||||
-->
|
-->
|
||||||
<!-- 页头 -->
|
<!-- 页头 -->
|
||||||
<page-header-wrapper ></page-header-wrapper>
|
<page-header-wrapper></page-header-wrapper>
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<!-- 搜索区 -->
|
<!-- 搜索区 -->
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<div nz-row nzGutter="8">
|
<div nz-row nzGutter="8">
|
||||||
<!-- 查询字段小于或等于3个时,不显示伸缩按钮 -->
|
<div nz-col [nzSpan]="_$expand ? 24 : 18">
|
||||||
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
|
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||||
<sf
|
</div>
|
||||||
#sf
|
<div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
|
||||||
[schema]="schema"
|
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
|
||||||
[ui]="ui"
|
<button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportFire()" acl
|
||||||
[mode]="'search'"
|
[acl-ability]="'YUNLI-CART-DAOCHU'">导出</button>
|
||||||
[disabled]="!sf?.valid"
|
<button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button>
|
||||||
(formSubmit)="st?.load(1)"
|
<button nz-button nzType="link" (click)="expandToggle()">
|
||||||
(formReset)="resetSF()"
|
{{ !_$expand ? '展开' : '收起' }}
|
||||||
></sf>
|
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<!-- [loading]="service.http.loading" -->
|
|
||||||
|
|
||||||
<!-- 查询字段大于3个时,根据展开状态调整布局 -->
|
|
||||||
<ng-container *ngIf="queryFieldCount > 4">
|
|
||||||
<div nz-col [nzSpan]="_$expand ? 24 : 18">
|
|
||||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
|
||||||
</div>
|
|
||||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
|
|
||||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
|
|
||||||
<button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportFire()">导出</button>
|
|
||||||
<button nz-button [disabled]="service.http.loading"(click)="resetSF()">重置</button>
|
|
||||||
<button nz-button nzType="link" (click)="expandToggle()">
|
|
||||||
{{ !_$expand ? '展开' : '收起' }}
|
|
||||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</ng-container>
|
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
<!-- [data]="service.$api_get_supplier_page" -->
|
<!-- [data]="service.$api_get_supplier_page" -->
|
||||||
|
|
||||||
<st
|
<st #st [bordered]="true" [scroll]="{ x: '1200px' }" [columns]="columns" [data]='service.$api_get_operate_list'
|
||||||
#st
|
|
||||||
[bordered]="true"
|
|
||||||
[scroll]="{ x: '1200px' }"
|
|
||||||
[columns]="columns"
|
|
||||||
[data]='service.$api_get_operate_list'
|
|
||||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||||
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }"
|
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }"
|
||||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||||
[loading]="service.http.loading"
|
[loading]="service.http.loading">
|
||||||
>
|
|
||||||
<ng-template st-row="carLength" let-item let-index="index">
|
<ng-template st-row="carLength" let-item let-index="index">
|
||||||
<div>{{item?.carModelLabel }}-{{item?.carLengthLabel? item?.carLengthLabel + '米' : ''}}-{{ item?.carLoad? item?.carLoad + '吨' : ''}}</div>
|
<div>{{item?.carModelLabel }}-{{item?.carLengthLabel? item?.carLengthLabel + '米' : ''}}-{{ item?.carLoad?
|
||||||
|
item?.carLoad + '吨' : ''}}</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template st-row="isSelf" let-item let-index="index">
|
<ng-template st-row="isSelf" let-item let-index="index">
|
||||||
<div>
|
<div>
|
||||||
{{ item?.isSelf ? '是' : '否' }}
|
{{ item?.isSelf ? '是' : '否' }}
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template st-row="putOnRecord" let-item let-index="index">
|
<ng-template st-row="putOnRecord" let-item let-index="index">
|
||||||
<div>
|
<div>
|
||||||
{{ item?.putOnRecord ? '是' : '否' }}
|
{{ item?.putOnRecord ? '是' : '否' }}
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template st-row="approvalAuditStatus" let-item let-index="index">
|
<ng-template st-row="approvalAuditStatus" let-item let-index="index">
|
||||||
@ -89,4 +67,4 @@
|
|||||||
<nz-tag *elseBlock nzColor="success">正常</nz-tag>
|
<nz-tag *elseBlock nzColor="success">正常</nz-tag>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</st>
|
</st>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: your name
|
|
||||||
* @Date: 2021-12-01 20:05:59
|
|
||||||
* @LastEditTime: 2021-12-01 20:35:33
|
|
||||||
* @LastEditors: your name
|
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
||||||
* @FilePath: \tms-obc-web\src\app\routes\vehicle\components\list\list.component.spec.ts
|
|
||||||
*/
|
|
||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
import { VehicleComponentsListComponent } from './list.component';
|
|
||||||
|
|
||||||
describe('VehicleComponentsListComponent', () => {
|
|
||||||
let component: VehicleComponentsListComponent;
|
|
||||||
let fixture: ComponentFixture<VehicleComponentsListComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [VehicleComponentsListComponent],
|
|
||||||
}).compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(VehicleComponentsListComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@ -9,11 +9,10 @@ import { map } from 'rxjs/operators';
|
|||||||
import { VehicleService } from '../../../vehicle/services/vehicle.service';
|
import { VehicleService } from '../../../vehicle/services/vehicle.service';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-Vehicle-components-list',
|
selector: 'app-Vehicle-components-list',
|
||||||
templateUrl: './list.component.html',
|
templateUrl: './list.component.html'
|
||||||
})
|
})
|
||||||
export class VehicleComponentsListComponent implements OnInit {
|
export class VehicleComponentsListComponent implements OnInit {
|
||||||
_$expand = false;
|
_$expand = false;
|
||||||
url = `/rule?_allow_anonymous=true`;
|
|
||||||
|
|
||||||
ui!: SFUISchema;
|
ui!: SFUISchema;
|
||||||
schema!: SFSchema;
|
schema!: SFSchema;
|
||||||
@ -22,19 +21,13 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
|
|
||||||
constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
|
constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
|
||||||
/**
|
|
||||||
* 查询字段个数navigate
|
|
||||||
*/
|
|
||||||
get queryFieldCount(): number {
|
|
||||||
return Object.keys(this.schema?.properties || {}).length;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询参数
|
* 查询参数
|
||||||
*/
|
*/
|
||||||
get reqParams() {
|
get reqParams() {
|
||||||
const params: any = {
|
const params: any = {
|
||||||
...(this.sf && this.sf.value),
|
...(this.sf && this.sf.value)
|
||||||
};
|
};
|
||||||
if (this.sf?.value.effectiveDate) {
|
if (this.sf?.value.effectiveDate) {
|
||||||
params.effectiveDateStart = this.sf?.value.effectiveDate[0];
|
params.effectiveDateStart = this.sf?.value.effectiveDate[0];
|
||||||
@ -45,14 +38,10 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
get selectedRows() {
|
|
||||||
return this.st?.list.filter((item) => item.checked) || [];
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.initSF();
|
this.initSF();
|
||||||
this.initST();
|
this.initST();
|
||||||
this.ar.url.subscribe((params) => {
|
this.ar.url.subscribe(params => {
|
||||||
this.st?.load(1);
|
this.st?.load(1);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -68,8 +57,8 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
expand: {
|
expand: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
ui: {
|
ui: {
|
||||||
hidden: true,
|
hidden: true
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
carNo: {
|
carNo: {
|
||||||
title: '车牌号',
|
title: '车牌号',
|
||||||
@ -91,9 +80,6 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
},
|
|
||||||
visibleIf: {
|
|
||||||
_$expand: (value: boolean) => value
|
|
||||||
}
|
}
|
||||||
} as SFSelectWidgetSchema
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
@ -103,20 +89,20 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'dict-select',
|
widget: 'dict-select',
|
||||||
containsAllLable: true,
|
containsAllLable: true,
|
||||||
params: { dictKey: 'car:color' },
|
params: { dictKey: 'car:color' }
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
carStatus: {
|
carStatus: {
|
||||||
title: '运营状态',
|
title: '运营状态',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
enum: [
|
enum: [
|
||||||
{ label: '空闲', value: 0 },
|
{ label: '空闲', value: 0 },
|
||||||
{ label: '运输中', value: 1 },
|
{ label: '运输中', value: 1 }
|
||||||
],
|
],
|
||||||
ui: {
|
ui: {
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
widget: 'select',
|
widget: 'select'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
carModel: {
|
carModel: {
|
||||||
title: '车型',
|
title: '车型',
|
||||||
@ -126,36 +112,36 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
params: { dictKey: 'car:model' },
|
params: { dictKey: 'car:model' },
|
||||||
containsAllLable: true,
|
containsAllLable: true,
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value,
|
expand: (value: boolean) => value
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
carLength: {
|
carLength: {
|
||||||
title: '车长',
|
title: '车长',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'dict-select',
|
widget: 'dict-select',
|
||||||
params: { dictKey: 'car:length' },
|
params: { dictKey: 'car:length' },
|
||||||
containsAllLable: true,
|
containsAllLable: true,
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value,
|
expand: (value: boolean) => value
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
isSelf: {
|
isSelf: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '是否挂靠',
|
title: '是否挂靠',
|
||||||
enum: [
|
enum: [
|
||||||
{ label: '是', value: 1 },
|
{ label: '是', value: 1 },
|
||||||
{ label: '否', value: 0 },
|
{ label: '否', value: 0 }
|
||||||
],
|
],
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value,
|
expand: (value: boolean) => value
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
driverLicenseStatus: {
|
driverLicenseStatus: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -163,16 +149,16 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
enum: [
|
enum: [
|
||||||
{ label: '正常', value: 1 },
|
{ label: '正常', value: 1 },
|
||||||
{ label: '即将到期', value: 2 },
|
{ label: '即将到期', value: 2 },
|
||||||
{ label: '已到期', value: 3},
|
{ label: '已到期', value: 3 }
|
||||||
],
|
],
|
||||||
default: '',
|
default: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value,
|
expand: (value: boolean) => value
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
roadTransportStatus: {
|
roadTransportStatus: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -180,16 +166,16 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
enum: [
|
enum: [
|
||||||
{ label: '正常', value: 1 },
|
{ label: '正常', value: 1 },
|
||||||
{ label: '即将到期', value: 2 },
|
{ label: '即将到期', value: 2 },
|
||||||
{ label: '已到期', value: 3},
|
{ label: '已到期', value: 3 }
|
||||||
],
|
],
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value,
|
expand: (value: boolean) => value
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
// putOnRecord: {
|
// putOnRecord: {
|
||||||
// type: 'string',
|
// type: 'string',
|
||||||
// title: '是否已备案',
|
// title: '是否已备案',
|
||||||
@ -204,7 +190,7 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
this.ui = { '*': { spanLabelFixed: 130, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } };
|
this.ui = { '*': { spanLabelFixed: 130, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } };
|
||||||
}
|
}
|
||||||
@ -212,43 +198,47 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
initST() {
|
initST() {
|
||||||
this.columns = [
|
this.columns = [
|
||||||
// { title: '', type: 'checkbox', className: 'text-center' },
|
// { title: '', type: 'checkbox', className: 'text-center' },
|
||||||
{ title: '车牌号', width:'150px', className: 'text-center', index: 'carNo' },
|
{ title: '车牌号', width: '150px', className: 'text-center', index: 'carNo' },
|
||||||
{ title: '车牌颜色', width:'150px', className: 'text-center', index: 'carNoColorLabel' },
|
{ title: '车牌颜色', width: '150px', className: 'text-center', index: 'carNoColorLabel' },
|
||||||
{ title: '车型-车长-载重',width:'150px', className: 'text-center', render: 'carLength' },
|
{ title: '车型-车长-载重', width: '150px', className: 'text-center', render: 'carLength' },
|
||||||
{ title: '运营状态',width:'150px', className: 'text-center', index: 'carStatus',
|
{
|
||||||
type: 'badge',
|
title: '运营状态',
|
||||||
badge: {
|
width: '150px',
|
||||||
true: { text: '运输中', color: 'success' },
|
className: 'text-center',
|
||||||
false: { text: '空闲', color: 'default' },
|
index: 'carStatus',
|
||||||
|
type: 'badge',
|
||||||
|
badge: {
|
||||||
|
true: { text: '运输中', color: 'success' },
|
||||||
|
false: { text: '空闲', color: 'default' }
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '行驶证到期状态',
|
title: '行驶证到期状态',
|
||||||
width:'180px',
|
width: '180px',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
index: 'driverLicenseStatus',
|
index: 'driverLicenseStatus',
|
||||||
type: 'badge',
|
type: 'badge',
|
||||||
badge: {
|
badge: {
|
||||||
1: { text: '正常', color: 'success' },
|
1: { text: '正常', color: 'success' },
|
||||||
2: { text: '即将到期', color: 'warning' },
|
2: { text: '即将到期', color: 'warning' },
|
||||||
3: { text: '已到期', color: 'error' },
|
3: { text: '已到期', color: 'error' }
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '道运证到期状态',
|
title: '道运证到期状态',
|
||||||
width:'180px',
|
width: '180px',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
index: 'roadTransportStatus',
|
index: 'roadTransportStatus',
|
||||||
type: 'badge',
|
type: 'badge',
|
||||||
badge: {
|
badge: {
|
||||||
1: { text: '正常', color: 'success' },
|
1: { text: '正常', color: 'success' },
|
||||||
2: { text: '即将到期', color: 'warning' },
|
2: { text: '即将到期', color: 'warning' },
|
||||||
3: { text: '已到期', color: 'error' },
|
3: { text: '已到期', color: 'error' }
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
{ title: '所有人',width:'150px', className: 'text-center', index: 'carOwner' },
|
{ title: '所有人', width: '150px', className: 'text-center', index: 'carOwner' },
|
||||||
{ title: '是否挂靠', width:'150px', className: 'text-center', render: 'isSelf', },
|
{ title: '是否挂靠', width: '150px', className: 'text-center', render: 'isSelf' },
|
||||||
{ title: '挂靠协议', width:'150px', className: 'text-center', render: 'approvalAuditStatus' },
|
{ title: '挂靠协议', width: '150px', className: 'text-center', render: 'approvalAuditStatus' },
|
||||||
// { title: '是否已备案', className: 'text-center', render: 'putOnRecord', },
|
// { title: '是否已备案', className: 'text-center', render: 'putOnRecord', },
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -259,20 +249,19 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: '查看',
|
text: '查看',
|
||||||
click: (item) => {
|
click: item => {
|
||||||
this.router.navigate(['./detail', item.id], { relativeTo: this.ar,queryParams: { carId: item.carId } });
|
this.router.navigate(['./detail', item.id], { relativeTo: this.ar, queryParams: { carId: item.carId } });
|
||||||
// this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } });
|
// this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } });
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
// {
|
// {
|
||||||
// text: '申请备案',
|
// text: '申请备案',
|
||||||
// click: (item) => {
|
// click: (item) => {
|
||||||
|
|
||||||
|
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
],
|
]
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
expandToggle() {
|
expandToggle() {
|
||||||
@ -280,7 +269,7 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
this.sf?.setValue('/expand', this._$expand);
|
this.sf?.setValue('/expand', this._$expand);
|
||||||
}
|
}
|
||||||
creat() {
|
creat() {
|
||||||
this.router.navigate(['./new',], { relativeTo: this.ar });
|
this.router.navigate(['./new'], { relativeTo: this.ar });
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 重置表单
|
* 重置表单
|
||||||
@ -291,6 +280,6 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
// 导出
|
// 导出
|
||||||
exportFire() {
|
exportFire() {
|
||||||
this.service.downloadFile(this.service.$api_carLicense_export, this.reqParams );
|
this.service.downloadFile(this.service.$api_carLicense_export, this.reqParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,23 +8,41 @@
|
|||||||
*/
|
*/
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
import { ACLGuard, ACLGuardType } from '@delon/acl';
|
||||||
|
import { AuthGuard } from 'src/app/core/guards/auth.guard';
|
||||||
import { VehicleComponentsAuditComponent } from './components/audit/audit.component';
|
import { VehicleComponentsAuditComponent } from './components/audit/audit.component';
|
||||||
import { VehicleComponentsAuditDetailComponent } from './components/audit/detail/detail.component';
|
import { VehicleComponentsAuditDetailComponent } from './components/audit/detail/detail.component';
|
||||||
import { VehicleComponentsListDetailComponent } from './components/list/detail/detail.component';
|
import { VehicleComponentsListDetailComponent } from './components/list/detail/detail.component';
|
||||||
import { VehicleComponentsListComponent } from './components/list/list.component';
|
import { VehicleComponentsListComponent } from './components/list/list.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
|
{
|
||||||
{ path: 'list', component: VehicleComponentsListComponent },
|
path: '',
|
||||||
{ path: 'list/detail/:id', component: VehicleComponentsListDetailComponent },
|
canActivate: [AuthGuard],
|
||||||
{ path: 'audit', component: VehicleComponentsAuditComponent },
|
canActivateChild: [AuthGuard],
|
||||||
{ path: 'audit/detail/:id', component: VehicleComponentsAuditDetailComponent },
|
children: [
|
||||||
|
{
|
||||||
|
path: 'list',
|
||||||
|
component: VehicleComponentsListComponent,
|
||||||
|
data: { guard: { ability: ['YUNLI-CART-SEARCH'] } as ACLGuardType }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'list/detail/:id',
|
||||||
|
component: VehicleComponentsListDetailComponent,
|
||||||
|
data: { guard: { ability: ['YUNLI-CART-DETAIL'] } as ACLGuardType }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'audit',
|
||||||
|
component: VehicleComponentsAuditComponent,
|
||||||
|
data: { guard: { ability: ['YUNLI-CART--AUDIT-SEARCH1'] } as ACLGuardType }
|
||||||
|
},
|
||||||
|
{ path: 'audit/detail/:id', component: VehicleComponentsAuditDetailComponent }
|
||||||
|
]
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(routes)],
|
||||||
exports: [RouterModule],
|
exports: [RouterModule]
|
||||||
})
|
})
|
||||||
export class VehicleRoutingModule {}
|
export class VehicleRoutingModule {}
|
||||||
|
|||||||
@ -14,6 +14,9 @@
|
|||||||
<h2 style="font-weight: 800;">{{selectedTab?.name}}</h2>
|
<h2 style="font-weight: 800;">{{selectedTab?.name}}</h2>
|
||||||
<div nz-row nzGutter="8">
|
<div nz-row nzGutter="8">
|
||||||
<div nz-col nzSpan="24" se-container [labelWidth]="labelWidth">
|
<div nz-col nzSpan="24" se-container [labelWidth]="labelWidth">
|
||||||
|
<!-- <se col="1">
|
||||||
|
<app-freight-table></app-freight-table>
|
||||||
|
</se> -->
|
||||||
<se [label]="item.name" *ngFor="let item of configList" col="1">
|
<se [label]="item.name" *ngFor="let item of configList" col="1">
|
||||||
<ng-container [ngSwitch]="item.itemType">
|
<ng-container [ngSwitch]="item.itemType">
|
||||||
<ng-container *ngSwitchCase="1">
|
<ng-container *ngSwitchCase="1">
|
||||||
@ -37,36 +40,30 @@
|
|||||||
<div class="d-flex" style="align-items: center;justify-content: space-between;">
|
<div class="d-flex" style="align-items: center;justify-content: space-between;">
|
||||||
<input type="time" [(ngModel)]="item.itemValue.startTime" placeHolder="开始时间"
|
<input type="time" [(ngModel)]="item.itemValue.startTime" placeHolder="开始时间"
|
||||||
style="margin-left: 23px;">
|
style="margin-left: 23px;">
|
||||||
<!-- <nz-time-picker nzFormat="HH:mm" nzPlaceHolder="开始时间"
|
|
||||||
[(ngModel)]="item.itemValue.startTime" style="margin-left: 23px;">
|
|
||||||
</nz-time-picker> -->
|
|
||||||
<label class="ml-sm mr-sm"> --</label>
|
<label class="ml-sm mr-sm"> --</label>
|
||||||
<input type="time" [(ngModel)]="item.itemValue.endTime" placeHolder="结束时间"
|
<input type="time" [(ngModel)]="item.itemValue.endTime" placeHolder="结束时间"
|
||||||
style="margin-left: 0;" class=" mr-xl">
|
style="margin-left: 0;" class=" mr-xl">
|
||||||
<!-- <nz-time-picker nzFormat="HH:mm" nzPlaceHolder="结束时间"
|
</div>
|
||||||
[(ngModel)]="item.itemValue.endTime">
|
</ng-container>
|
||||||
</nz-time-picker> -->
|
<ng-container *ngSwitchCase="6">
|
||||||
|
<div class="d-flex" style="align-items: center;justify-content: space-between;">
|
||||||
|
|
||||||
|
<nz-radio-group [(ngModel)]="item.itemValue.radio" class="mr-xl">
|
||||||
|
<label nz-radio [nzValue]="0" class="ml-xl">{{item.remark?.[0] ||
|
||||||
|
'否'}}</label>
|
||||||
|
<label nz-radio [nzValue]="1" class="ml-xl">{{item.remark?.[1] ||
|
||||||
|
'是'}}</label>
|
||||||
|
</nz-radio-group>
|
||||||
|
|
||||||
|
<input type="time" [(ngModel)]="item.itemValue.startTime" placeHolder="开始时间"
|
||||||
|
style="margin-left: 23px;">
|
||||||
|
<label class="ml-sm mr-sm"> --</label>
|
||||||
|
<input type="time" [(ngModel)]="item.itemValue.endTime" placeHolder="结束时间"
|
||||||
|
style="margin-left: 0;" class=" mr-xl">
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- <ng-container *ngFor="let item of item.extend">
|
|
||||||
<ng-container [ngSwitch]="item">
|
|
||||||
<ng-container *ngSwitchCase="1">
|
|
||||||
<button nz-button nzType="default">配置网络货运</button>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngSwitchCase="2">
|
|
||||||
<button nz-button nzType="default">配置货主</button>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngSwitchCase="3">
|
|
||||||
<button nz-button nzType="default">配置司机</button>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngSwitchCase="4">
|
|
||||||
<button nz-button nzType="default">配置车队长</button>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngSwitchDefault></ng-container>
|
|
||||||
</ng-container>
|
|
||||||
</ng-container> -->
|
|
||||||
</se>
|
</se>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Component, OnInit, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, OnInit, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import { BaseService } from '@shared';
|
import { BaseService } from '@shared';
|
||||||
|
|
||||||
const JSONTYPE = new Set([5]);
|
const JSONTYPE = new Set([5,6]);
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dynamic-setting-h5',
|
selector: 'app-dynamic-setting-h5',
|
||||||
templateUrl: './dynamic-setting-h5.component.html',
|
templateUrl: './dynamic-setting-h5.component.html',
|
||||||
|
|||||||
@ -5,10 +5,11 @@ import { SHARED_ZORRO_MODULES } from '../../shared-zorro.module';
|
|||||||
import { SHARED_DELON_MODULES } from '../../shared-delon.module';
|
import { SHARED_DELON_MODULES } from '../../shared-delon.module';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { DynamicSettingModalComponent } from './dynamic-setting-modal/dynamic-setting-modal.component';
|
import { DynamicSettingModalComponent } from './dynamic-setting-modal/dynamic-setting-modal.component';
|
||||||
|
import { FreightTableComponent } from './freight-table/freight-table.component';
|
||||||
|
const COMPONENTS = [DynamicSettingH5Component, DynamicSettingModalComponent, FreightTableComponent];
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [DynamicSettingH5Component, DynamicSettingModalComponent],
|
declarations: [...COMPONENTS],
|
||||||
imports: [CommonModule, FormsModule, SHARED_ZORRO_MODULES, SHARED_DELON_MODULES],
|
imports: [CommonModule, FormsModule, SHARED_ZORRO_MODULES, SHARED_DELON_MODULES],
|
||||||
exports: [DynamicSettingH5Component]
|
exports: [...COMPONENTS]
|
||||||
})
|
})
|
||||||
export class DynamicSettingModule {}
|
export class DynamicSettingModule {}
|
||||||
|
|||||||
@ -0,0 +1,22 @@
|
|||||||
|
<nz-table #groupingTable [nzData]="data" nzBordered nzSize="small" [nzFrontPagination]="false"
|
||||||
|
[nzScroll]="{ x: '500px' }" [nzShowPagination]="false">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th nzWidth="200px" nzAlign="center">公里数</th>
|
||||||
|
<th nzWidth="130px" nzAlign="center">计算方式</th>
|
||||||
|
<th nzWidth="200px" nzAlign="center" *ngFor="let item of headers">车长(米)</th>
|
||||||
|
<th nzWidth="60px" nzAlign="center" nzRight>操作</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr *ngFor="let item of groupingTable.data">
|
||||||
|
<td nzWidth="200px" nzAlign="center">{{ item.startKm }} - {{ item.endKm }}</td>
|
||||||
|
<td nzWidth="130px" nzAlign="center">{{ item.computeMode }}</td>
|
||||||
|
<td nzWidth="200px" nzAlign="center" *ngFor="let node of item.configValue">最高{{ node.maxPrice }} 预警{{
|
||||||
|
node.ewPrice }}</td>
|
||||||
|
<td nzWidth="60px" nzAlign="center" nzRight>删除</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</nz-table>
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { BaseService } from '@shared';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-freight-table',
|
||||||
|
templateUrl: './freight-table.component.html',
|
||||||
|
styleUrls: ['./freight-table.component.less']
|
||||||
|
})
|
||||||
|
export class FreightTableComponent implements OnInit {
|
||||||
|
data: any[] = [];
|
||||||
|
headers: any[] = [];
|
||||||
|
constructor(public service: BaseService) {}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
this.loadHeaders();
|
||||||
|
this.loadData();
|
||||||
|
}
|
||||||
|
|
||||||
|
loadHeaders() {
|
||||||
|
this.service.request('/api/mdc/cuc/freightConfigItem/list').subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.headers = res;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
loadData() {
|
||||||
|
this.service.request('/api/mdc/cuc/freightConfig/list').subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.data = res;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
changeEndLength(event: any, i: number) {
|
||||||
|
console.log(event, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -103,7 +103,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "车辆审核列表",
|
"text": "车辆审核列表",
|
||||||
"link": "/vehicle/audit"
|
"link": "/vehicle/audit",
|
||||||
|
"acl": {
|
||||||
|
"ability": [
|
||||||
|
"YUNLI-CART-AUDIT-SEARCH"
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hide": true,
|
"hide": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user