From 461bf39813afcf1f3611bfcf0ed913fa4b110745 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 14 Apr 2022 14:52:48 +0800 Subject: [PATCH] fix bug --- proxy.conf.js | 4 +- .../customindex/customindex.component.html | 10 ++--- .../customindex/customindex.component.ts | 2 +- .../datascreen/datascreen.component.html | 24 +++++------ .../datascreen/datascreen.component.less | 6 ++- .../datascreen/datascreen.component.ts | 22 +++++----- .../datascreen/map/map.component.ts | 20 +++++---- .../services/insurance-management.service.ts | 41 ++++++------------- .../components/risk/risk.component.ts | 4 +- 9 files changed, 61 insertions(+), 72 deletions(-) diff --git a/proxy.conf.js b/proxy.conf.js index b8983842..6a0a73cf 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-04-14 11:38:39 + * @LastEditTime : 2022-04-14 14:40:51 * @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-dev.eascs.com', + host: 'tms-api-test.eascs.com', protocol: 'https:', port: 443 }, diff --git a/src/app/routes/datatable/components/customtable/customindex/customindex.component.html b/src/app/routes/datatable/components/customtable/customindex/customindex.component.html index 9dfc91aa..19875e13 100644 --- a/src/app/routes/datatable/components/customtable/customindex/customindex.component.html +++ b/src/app/routes/datatable/components/customtable/customindex/customindex.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-04-06 13:20:56 * @LastEditors : Shiming - * @LastEditTime : 2022-04-06 20:24:20 + * @LastEditTime : 2022-04-14 14:37:25 * @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\customtable\\customindex\\customindex.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -12,19 +12,19 @@
- +
- +
- +
- +
diff --git a/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts b/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts index 27b8a1ff..5d8edf23 100644 --- a/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts +++ b/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts @@ -38,7 +38,7 @@ export class DatatableCustomindexComponent implements OnInit { { title: '未激活用户数', index: 'notActivationTotal', className: 'text-center' }, { title: '沉默用户数', index: 'silentTotal', className: 'text-center' }, { title: '流失用户数', index: 'drainTotal', className: 'text-center' }, - { title: '流失率', index: 'drainRate', className: 'text-center',format: (item: any) => {return (item?.drainRate)*100 + '%' }} + { title: '流失率', index: 'drainRate', className: 'text-center',format: (item: any) => {return ((item?.drainRate)*100).toFixed(2) + '%' }} ]; hzData: any; hhrData: any; diff --git a/src/app/routes/datatable/components/datascreen/datascreen.component.html b/src/app/routes/datatable/components/datascreen/datascreen.component.html index e614479a..2bad58ef 100644 --- a/src/app/routes/datatable/components/datascreen/datascreen.component.html +++ b/src/app/routes/datatable/components/datascreen/datascreen.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-04-06 10:57:56 * @LastEditors : Shiming - * @LastEditTime : 2022-04-13 15:20:32 + * @LastEditTime : 2022-04-14 14:25:03 * @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -22,7 +22,7 @@

实时交易监控

-
+
@@ -45,13 +45,12 @@ - + - - - + +
+ +
+ - +
@@ -152,12 +153,11 @@ - + tr > th, .ant-table-tbody > tr > td, .ant-table tfoot > tr > th, .ant-table tfoot > tr > td { + padding: 0; + font-size: 12px; } } } \ No newline at end of file diff --git a/src/app/routes/datatable/components/datascreen/datascreen.component.ts b/src/app/routes/datatable/components/datascreen/datascreen.component.ts index 128e3f9e..ba2a32f4 100644 --- a/src/app/routes/datatable/components/datascreen/datascreen.component.ts +++ b/src/app/routes/datatable/components/datascreen/datascreen.component.ts @@ -5,7 +5,7 @@ import { map } from 'rxjs/operators'; * @Author : Shiming * @Date : 2022-04-06 10:57:56 * @LastEditors : Shiming - * @LastEditTime : 2022-04-13 10:25:50 + * @LastEditTime : 2022-04-14 14:05:01 * @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -127,20 +127,20 @@ export class DatatableDatascreenComponent implements OnInit { */ initST() { this.columns = [ - { title: '序号', render: 'index', className: 'text-center', width: '70px', }, - { title: '发货地', index: 'loadAddress', className: 'text-center', width: '90px' }, - { title: '卸货地', index: 'dischargeAddress', className: 'text-center', width: '90px' }, - { title: '货物', index: 'goodsName', className: 'text-center', width: '90px' }, - { title: '数量', render: 'weight', className: 'text-center', width: '120px' } + { title: '序号', render: 'index', className: 'text-center', }, + { title: '发货地', index: 'loadAddress', className: 'text-center', }, + { title: '卸货地', index: 'dischargeAddress', className: 'text-center',}, + { title: '货物', index: 'goodsName', className: 'text-center', }, + { title: '数量', render: 'weight', className: 'text-center',} ]; } initOrderST() { this.orderColumns = [ - { title: '运单号', index: 'wayCode', className: 'text-center', width: '150px' }, - { title: '司机/车辆', index: 'carNo', className: 'text-center', width: '120px' }, - { title: '货主', index: 'shipperName', className: 'text-center', width: '200px' }, - { title: '时间', index: 'createTime', className: 'text-center', width: '200px' }, - { title: '异常预警', index: 'warningTypeLabel', className: 'text-center', width: '120px' } + { title: '运单号', index: 'wayCode', className: 'text-center', }, + { title: '司机/车辆', index: 'carNo', className: 'text-center', }, + { title: '货主', index: 'shipperName', className: 'text-center', }, + { title: '时间', index: 'createTime', className: 'text-center', }, + { title: '异常预警', index: 'warningTypeLabel', className: 'text-center',} ]; } diff --git a/src/app/routes/datatable/components/datascreen/map/map.component.ts b/src/app/routes/datatable/components/datascreen/map/map.component.ts index 23d25d80..739e2592 100644 --- a/src/app/routes/datatable/components/datascreen/map/map.component.ts +++ b/src/app/routes/datatable/components/datascreen/map/map.component.ts @@ -95,8 +95,8 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges, Afte if(res) { res.forEach((element: any) => { value.push({ - name: element.province, - value: element.weight, + '省份': element.province, + '订单数': element.weight, }); }); console.log(value); @@ -107,17 +107,19 @@ if (!(this.userData instanceof Array) || this.userData.length === 0) { } this.userDv = this.ds.createView().source(this.userData).transform({ geoDataView: this.worldMap, - field: 'name', + field: '省份', type: 'geo.region', as: ['longitude', 'latitude'] }).transform({ type: 'map', - callback: (obj: { trend: string; value: number }) => { - if(obj.value < 500) { + callback: (obj: { trend: string; 订单数: number }) => { + console.log(obj); + + if(obj.订单数 < 500) { obj.trend = '500以下'; - } else if(obj.value >= 500 && obj.value < 1000){ + } else if(obj.订单数 >= 500 && obj.订单数 < 1000){ obj.trend = '500-1000'; - } else if(obj.value >= 1000 ){ + } else if(obj.订单数 >= 1000 ){ obj.trend = '>1000'; } return obj; @@ -127,13 +129,13 @@ if (!(this.userData instanceof Array) || this.userData.length === 0) { this.userView.data(this.userDv.rows); this.userView.scale({ trend: { - alias: '蓝色地区数量' + alias: '订单交易数量' } }); console.log(this.userView); console.log('45545'); - this.userView.polygon().position('longitude*latitude').color('trend', ['#0a3f80', '#1b6aca', '#5d93d4']).tooltip('name*trend*value').style({fillOpacity: 0.85 }) + this.userView.polygon().position('longitude*latitude').color('trend', ['#0a3f80', '#1b6aca', '#5d93d4']).tooltip('省份*订单数').style({fillOpacity: 0.85 }) .animate({ leave: { animation: 'fade-out' diff --git a/src/app/routes/insurance-management/services/insurance-management.service.ts b/src/app/routes/insurance-management/services/insurance-management.service.ts index 413d2a7d..cd35b120 100644 --- a/src/app/routes/insurance-management/services/insurance-management.service.ts +++ b/src/app/routes/insurance-management/services/insurance-management.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 15:31:52 * @LastEditors : Shiming - * @LastEditTime : 2022-04-11 15:13:24 + * @LastEditTime : 2022-04-14 11:43:13 * @FilePath : \\tms-obc-web\\src\\app\\routes\\insurance-management\\services\\insurance-management.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -55,34 +55,17 @@ export class InsuranceManagementService extends ShipperBaseService { // } // a.remove(); } - // getReceiptUrl(url: string, params: any) { - // const { bankType, snglFlgCd } = params; - // if (url) { - // if (params?.bankType === '1') { - // window.open(params?.receiptUrl); - // } else if (params?.bankType === '2') { - // window.open(url); - // // this.exportFile({ bankType, receiptUrl: url, bankSerialNumber: snglFlgCd }, this.$api_download_receipt_apply_byte); - // } - // } else { - // this.request(this.$api_download_receipt_apply, { ...params }).subscribe(res => { - // if (res?.receiptUrl) { - // if (bankType === '1') { - // window.open(res?.receiptUrl); - // } else if (bankType === '2') { - // window.open(res?.receiptUrl); - // // this.downloadFile(this.$api_download_receipt_apply_byte, { - // // bankType, - // // receiptUrl: res.receiptUrl, - // // bankSerialNumber: snglFlgCd - // // }); - // } - // } else { - // this.msgSrv.warning(res.statusMsg || '获取回单失败'); - // } - // }); - // } - // } + getReceiptUrl(url: string, params: any) { + const { bankType, snglFlgCd } = params; + if (url) { + if (params?.bankType === '1') { + window.open(params?.receiptUrl); + } else if (params?.bankType === '2') { + window.open(url); + // this.exportFile({ bankType, receiptUrl: url, bankSerialNumber: snglFlgCd }, this.$api_download_receipt_apply_byte); + } + } + } constructor(public injector: Injector) { super(injector); } diff --git a/src/app/routes/order-management/components/risk/risk.component.ts b/src/app/routes/order-management/components/risk/risk.component.ts index 898ad94a..400d1fb0 100644 --- a/src/app/routes/order-management/components/risk/risk.component.ts +++ b/src/app/routes/order-management/components/risk/risk.component.ts @@ -201,7 +201,7 @@ export class OrderManagementRiskComponent implements OnInit { } } as SFSelectWidgetSchema }, - shipperId: { + shipperAppUserName: { type: 'string', title: '托运人', ui: { @@ -218,7 +218,7 @@ export class OrderManagementRiskComponent implements OnInit { if (str) { return this.service .request(this.service.$api_enterpriceList, { enterpriseName: str }) - .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) + .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.enterpriseName } as SFSchemaEnum)))) .toPromise(); } else { return of([]);