Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
wangshiming
2022-03-07 10:43:40 +08:00
17 changed files with 174 additions and 43 deletions

View File

@ -35,8 +35,19 @@
"styles": [
"node_modules/perfect-scrollbar/css/perfect-scrollbar.css",
"node_modules/quill/dist/quill.snow.css",
"src/styles.less"
"src/styles.less",
{
"input": "src/styles/default.less",
"bundleName": "default",
"inject": false
},
{
"input": "src/styles/compact.less",
"bundleName": "compact",
"inject": false
}
],
"scripts": [
"node_modules/quill/dist/quill.min.js",
"node_modules/perfect-scrollbar/dist/perfect-scrollbar.js",

View File

@ -5,6 +5,7 @@ import { environment } from '@env/environment';
import { NzIconService } from 'ng-zorro-antd/icon';
import { NzModalService } from 'ng-zorro-antd/modal';
import { VERSION as VERSION_ZORRO } from 'ng-zorro-antd/version';
import { ThemeService } from './theme.service';
@Component({
selector: 'app-root',
@ -17,7 +18,8 @@ export class AppComponent implements OnInit {
private router: Router,
private titleSrv: TitleService,
private modalSrv: NzModalService,
private iconService: NzIconService
private iconService: NzIconService,
private themeService: ThemeService
) {
renderer.setAttribute(el.nativeElement, 'ng-alain-version', VERSION_ALAIN.full);
renderer.setAttribute(el.nativeElement, 'ng-zorro-version', VERSION_ZORRO.full);
@ -47,5 +49,14 @@ export class AppComponent implements OnInit {
this.modalSrv.closeAll();
}
});
const screen: any = window.screen
var zoom = window.devicePixelRatio || screen.deviceXDPI / screen?.logicalXDPI;
console.log(zoom)
if (document.body.clientWidth >= 1280) {
if (zoom != 1 && zoom != 2 && zoom != 3) {
this.themeService.toggleTheme().then();
}
}
}
}

View File

@ -144,30 +144,30 @@ export class SupplyManagementBulkAssignedCarComponent implements OnInit {
title: '司机姓名',
index: 'name',
className: 'text-center',
width: '80px'
width: '20%'
},
{
title: '手机号',
index: 'telephone',
className: 'text-center',
width: '100px'
width: '15%'
},
{
title: '车队长',
render: 'captain',
className: 'text-center',
width: '200px'
width: '30%'
},
{
title: '指定车辆',
render: 'carNo',
className: 'text-center',
width: '100px'
width: '15%'
},
{
title: '操作',
className: 'text-center',
width: '80px',
width: '20%',
buttons: [
{
text: '移除',

View File

@ -14,10 +14,10 @@
min-height: 32px;
}
input {
width : 100px;
margin-left: 10px;
}
// input {
// width : 100px;
// margin-left: 10px;
// }
.ant-form-item-control-input-content {
display: flex;

View File

@ -11,7 +11,7 @@
<img [src]="userDetail?.avatar" />
<div style="flex: 1">
<div style="display: flex; width: 100%; justify-content: space-between">
<p style="padding-right: 80px; width: 400px">{{ userDetail?.name }}
<p style="padding-right: 80px; width: 400px">{{ userDetail?.realName }}
<nz-badge nzStatus="success" nzText="正常" *ngIf="!userDetail?.stateLocked" class="ml-xl"> </nz-badge>
<nz-badge nzStatus="warning" nzText="冻结" *ngIf="userDetail?.stateLocked" class="ml-xl"> </nz-badge>
</p>
@ -103,10 +103,10 @@
<sv-container col="3" class="mt-md">
<sv-title>银行结算信息</sv-title>
<sv label="开户银行">
<!-- {{ detailData?.name }} -->
{{ userIdentityDetail?.name }}
</sv>
<sv label="银行卡号">
<!-- {{ detailData?.certificateNumber }} -->
{{ userIdentityDetail?.certificateNumber }}
</sv>
</sv-container>
</nz-card>

View File

@ -65,8 +65,6 @@ export class CaptainDetailComponent implements OnInit {
/** 启用/冻结司机 */
userAction(status: number) {
console.log(this.userDetail);
this.nzModalService.warning({
nzTitle: status === 1 ? '确定启用该司机吗?' : '确定冻结该司机吗?',
nzContent: status === 1 ? '启用后,该司机将恢复正常使用功能,请再次确认!' : '冻结后,司机将被限制使用,无法登陆,请谨慎操作!',

View File

@ -11,7 +11,7 @@
<img [src]="userDetail?.avatar" />
<div style="flex: 1">
<div style="display: flex;width: 100%;justify-content: space-between;">
<p style="padding-right: 80px; width: 400px;">{{ userDetail?.name }}
<p style="padding-right: 80px; width: 400px;">{{ userDetail?.realName }}
<nz-badge nzStatus="success" nzText="正常" *ngIf="!userDetail?.stateLocked" class="ml-xl"></nz-badge>
<nz-badge nzStatus="warning" nzText="冻结" *ngIf="userDetail?.stateLocked" class="ml-xl"></nz-badge>
</p>
@ -215,7 +215,7 @@
<input nz-input type="text" [(ngModel)]="licenseDetail.licenseNo" [readonly]="!isEditDriver"
[nzBorderless]="!isEditDriver" [placeholder]="isEditDriver?'':'-'">
</sv>
<sv label="公司所在地" >
<!-- <sv label="公司所在地" >
<ng-container *ngIf="isEditDriver; else cascaderelseTemplate">
<nz-select [(ngModel)]="licenseDetail.regionCode">
<ng-container *ngFor="let item of adressCodeList">
@ -226,8 +226,8 @@
<ng-template #cascaderelseTemplate>
{{licenseDetail?.regionCodeName }}
</ng-template>
</sv>
<sv label="发证日期" col="1">
</sv> -->
<sv label="发证日期" col="2">
<nz-date-picker [(ngModel)]="licenseDetail.validStartTime" [nzDisabled]="!isEditDriver" nzPlaceHolder=" "
[nzBorderless]="!isEditDriver" [nzSuffixIcon]="isEditDriver?'calendar':''" style="width: 110px;" class="calendar">
</nz-date-picker>
@ -301,16 +301,16 @@
</sv-container>
<nz-divider></nz-divider>
<sv-container col="3" class="mt16">
<sv-container col="3" class="mt-md">
<sv-title>服务评级
<ng-container *ngIf="billEvaluateList?.length===0">(暂无评级)</ng-container>
</sv-title>
<sv [label]="item.evaluateType" *ngFor="let item of billEvaluateList">
<sv [label]="item.evaluateTypeLabel" *ngFor="let item of billEvaluateList">
<nz-rate [ngModel]="item.evaluateFraction" nzDisabled></nz-rate>
</sv>
</sv-container>
<sv-container col="3" class="mt16">
<sv-container col="3" class="mt-md">
<sv-title>关联企业</sv-title>
<st #st [columns]="columns" [data]="service.$api_get_driver_projects" size="small"
[req]="{ method: 'POST', allInBody: true, params: {appUserId:route.snapshot.params.id} }" [page]="{ show: false }"

View File

@ -203,6 +203,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
id: this.detailData.id,
approvalOpinion: this.approvalOpinion,
networkTransporter: this.networkTransporter,
customerServiceId: this.customerServiceId,
roleId: this.roleId || null
})
.subscribe(res => {

View File

@ -42,7 +42,7 @@
</div>
</div>
<!-- 数据列表 -->
<st #st [columns]="columns" [data]='service.$api_freight_config_page' [req]="{ process: beforeReq }"
<st #st [columns]="columns" [data]='service.$api_freight_config_page' [req]="{ process: beforeReq }" [page]="{}"
[scroll]="{ x: '1200px' }" [loading]="service.http.loading" (change)="stChange($event)">
</st>
</nz-card>

View File

@ -51,6 +51,7 @@ export class FreightConfigComponent implements OnInit {
});
}
}
this.selectedRows = [];
return requestOptions;
};
@ -282,7 +283,7 @@ export class FreightConfigComponent implements OnInit {
format: item => `${item.contractSurchargeRatio}%`
},
{
title: '合同单业务量(元)',
title: '合同单业务量(元)',
index: 'contractQuota',
width: 170,
type: 'widget',
@ -290,7 +291,7 @@ export class FreightConfigComponent implements OnInit {
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.contractQuota }) }
},
{
title: '货源单业务量(元)',
title: '货源单业务量(元)',
index: 'goodsQuota',
width: 170,
type: 'widget',

View File

@ -24,7 +24,7 @@
}
.ant-form-item-label>label {
height: 36px;
height: 42px;
}
.se__horizontal>.se__item .se__label-text {

73
src/app/theme.service.ts Normal file
View File

@ -0,0 +1,73 @@
import { Injectable } from '@angular/core';
enum ThemeType {
compact = 'compact',
default = 'default',
}
@Injectable({
providedIn: 'root',
})
export class ThemeService {
currentTheme = ThemeType.default;
constructor() {}
private reverseTheme(theme: string): ThemeType {
return theme === ThemeType.compact ? ThemeType.default : ThemeType.compact;
}
private removeUnusedTheme(theme: ThemeType): void {
document.documentElement.classList.remove(theme);
const removedThemeStyle = document.getElementById(theme);
if (removedThemeStyle) {
document.head.removeChild(removedThemeStyle);
}
}
private loadCss(href: string, id: string): Promise<Event> {
return new Promise((resolve, reject) => {
const style01 = document.createElement('link');
style01.rel = 'stylesheet';
style01.href = 'compact.css';
style01.onload = resolve;
style01.onerror = reject;
document.body.after(style01);
const style = document.createElement('link');
style.rel = 'stylesheet';
style.href = href;
style.onload = resolve;
style.onerror = reject;
document.body.after(style);
});
}
public loadTheme(firstLoad = true): Promise<Event> {
//const theme = this.currentTheme;
const theme = 'assets/style.compact';
if (firstLoad) {
document.documentElement.classList.add(theme);
}
return new Promise<Event>((resolve, reject) => {
this.loadCss(`${theme}.css`, theme).then(
(e) => {
if (!firstLoad) {
document.documentElement.classList.add(theme);
}
this.removeUnusedTheme(this.reverseTheme(theme));
resolve(e);
},
(e) => reject(e)
);
});
}
public toggleTheme(): Promise<Event> {
this.currentTheme = this.reverseTheme(this.currentTheme);
return this.loadTheme(false);
}
}

View File

@ -15,13 +15,13 @@
<meta charset="utf-8" />
<title>运多星运营平台</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- <meta name="viewport" content="width=device-width, initial-scale=0.3" /> -->
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" href="https://at.alicdn.com/t/font_3153207_udngwyp35db.css" />
<!-- Apple Touch Icon -->
<!-- <link rel="apple-touch-icon" href="custom-icon.png"> -->
<style type="text/css">
<style type="text/css" id="css">
.preloader {
position: fixed;
top: 0;
@ -66,18 +66,20 @@
}
var zoom = window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI;
if (!!window.ActiveXObject || "ActiveXObject" in window) {
if (zoom != 1 && zoom != 2 && zoom != 3) {
alert('系统检测到您的设备对显示进行放大,可能导致页面显示不全,请调整后打开/或使用其他浏览器!')
}
} else {
if (document.body.clientWidth >= 1280) {
if (zoom != 1 && zoom != 2 && zoom != 3) {
var c = document.querySelector('body');
c.style.zoom = -0.62 * zoom + 1.65;
}
}
}
// if (!!window.ActiveXObject || "ActiveXObject" in window) {
// if (zoom != 1 && zoom != 2 && zoom != 3) {
// alert('系统检测到您的设备对显示进行放大,可能导致页面显示不全,请调整后打开/或使用其他浏览器!')
// }
// } else {
// if (document.body.clientWidth >= 1280) {
// if (zoom != 1 && zoom != 2 && zoom != 3) {
// var c = document.querySelector('body');
// // c.style.zoom = -0.62 * zoom + 1.65;
// }
// }
// }
</script>
<!-- <script type="text/javascript" src='//webapi.amap.com/maps?v=2.0&key=63f9573ca55fef2b92d4ffe0c85dea8f'></script>
<script src="//webapi.amap.com/ui/1.1/main.js?v=1.1.1"></script> -->

25
src/styles/compact.less Normal file
View File

@ -0,0 +1,25 @@
.alain-pro__sider-logo h1{
font-size: 15px;
}
.page-header__title{
font-size: 14px;
display: none;
}
.alain-pro__body{
margin: 0 !important;
}
.alain-pro__page-header-content{
margin: 8px 8px 0px !important;
}
.ant-card-body{
padding: 6px !important;
}
.ant-card {
margin-bottom: 8px !important;
}
.ant-table tfoot>tr>td, .ant-table tfoot>tr>th, .ant-table-tbody>tr>td, .ant-table-thead>tr>th{
padding: 6px 4px !important;
}
.alain-pro__page-header-wrapper{
margin: 0 !important
}

2
src/styles/default.less Normal file
View File

@ -0,0 +1,2 @@
@import '../app/layout/pro/styles/theme-default.less';
@import './fix/theme-default.less';

View File

@ -1 +1,2 @@
@import './theme-default.less';

View File

@ -1,3 +1,9 @@
/* You can add global styles to this file, and also import other style files */
@import './fix/index';
.error-color {
color: #ff4d4f;
}
@primary-color: #F5222D;
@font-size-base: 15px;