From b1bc3d43c7029d1f46813a9e9d62181a89749472 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Fri, 16 Aug 2024 15:10:18 +0800 Subject: [PATCH] 1 --- package-lock.json | 8 +++--- package.json | 2 +- src/app/pages/body/index/index.component.html | 14 ++++++---- src/app/pages/body/index/index.component.less | 22 +++++++++++++++ src/app/pages/body/index/index.component.ts | 19 ++++++++++--- .../goods-list/goods-list.component.html | 2 +- .../trade/goods-list/goods-list.component.ts | 27 ++----------------- .../goods-logistics-list.component.html | 2 +- .../goods-logistics-list.component.ts | 4 +-- 9 files changed, 57 insertions(+), 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index 46e0183..8607aa4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "ng-zorro-antd": "^17.1.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", - "typescript": "5.4", + "typescript": "5.2", "zone.js": "~0.14.2" }, "devDependencies": { @@ -11348,9 +11348,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index 77ad293..3d3f5f4 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "ng-zorro-antd": "^17.1.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", - "typescript": "5.4", + "typescript": "5.2", "zone.js": "~0.14.2" }, "devDependencies": { diff --git a/src/app/pages/body/index/index.component.html b/src/app/pages/body/index/index.component.html index 3e980c8..0892f4c 100644 --- a/src/app/pages/body/index/index.component.html +++ b/src/app/pages/body/index/index.component.html @@ -34,10 +34,9 @@ - {{item.title}} - - 失败 + + @@ -47,6 +46,10 @@ +
+ 正在导出中,请稍后在此处进行下载 +
+
@@ -100,8 +103,9 @@ {{ data.downloadTime | date: 'yyyy-MM-dd HH:mm:ss'}} {{ data.status | status}} - 下载 - 重新下载 + 下载 + 重新下载 + diff --git a/src/app/pages/body/index/index.component.less b/src/app/pages/body/index/index.component.less index b14d3f5..e227cbd 100644 --- a/src/app/pages/body/index/index.component.less +++ b/src/app/pages/body/index/index.component.less @@ -70,3 +70,25 @@ nz-content { .file-downLoad { width: 300px; } +.button-up { + font-size: 16px; + padding: 10px; + top: 48px; + left: 22px; + z-index: 999; + border-radius: 5px; + position:absolute; + height: 80px; + width: 280px; + background-color: rgba(0, 0, 0, 0.7); +} +.to_top { + z-index: 999; + top: 40px; + position:absolute; + width: 0; + height: 0; + border-bottom: 8px solid rgba(0, 0, 0, 0.7); + border-left: 8px solid transparent; + border-right: 8px solid transparent; +} diff --git a/src/app/pages/body/index/index.component.ts b/src/app/pages/body/index/index.component.ts index b0d5a55..218d0da 100644 --- a/src/app/pages/body/index/index.component.ts +++ b/src/app/pages/body/index/index.component.ts @@ -38,6 +38,9 @@ import {NzTimelineComponent, NzTimelineItemComponent} from "ng-zorro-antd/timeli import {NzTableComponent, NzTableModule} from "ng-zorro-antd/table"; import {BusinessTypePipe} from "../../../pipes/file/business-type.pipe"; import {StatusPipe} from "../../../pipes/file/status.pipe"; +import {NzPopconfirmDirective} from "ng-zorro-antd/popconfirm"; +import {NzButtonComponent} from "ng-zorro-antd/button"; +import {NzBadgeComponent} from "ng-zorro-antd/badge"; @Component({ selector: 'app-index', @@ -85,7 +88,10 @@ import {StatusPipe} from "../../../pipes/file/status.pipe"; NzTableComponent, NzModalContentDirective, BusinessTypePipe, - StatusPipe + StatusPipe, + NzPopconfirmDirective, + NzButtonComponent, + NzBadgeComponent ], templateUrl: './index.component.html', styleUrl: './index.component.less', @@ -111,6 +117,7 @@ export class IndexComponent { currentParentMenu: any = {}; downloadType = 1; interval: any; + showComponent = false; constructor( private commonService: CommonService, private storage: BrowserStorageService, @@ -124,6 +131,7 @@ export class IndexComponent { ) { this.communicationService.currentMessage.subscribe(message => { + this.showComponent = true; this.fileRecords(); this.findFileRecords(message.id); this.downloadType = 2; @@ -212,13 +220,14 @@ export class IndexComponent { public findFileRecords(id: number) { this.interval = setInterval(() => this.fileService.findFileRecords(id, (data: any) => { if (data['return_code'] == '000000') { - if (data['return_data'].status == 1) { + if (data['return_data'].status == 1 || data['return_data'].status == 3) { + this.showComponent = false; clearTimeout(this.interval); - console.log("完成"); this.downloadType = 1; this.fileRecords(); } }else { + this.showComponent = false; clearTimeout(this.interval); this.fileRecords(); this.downloadType = 1; @@ -233,10 +242,12 @@ export class IndexComponent { public getDownLoad(id: number) { this.fileService.getDownLoad(id, (data: any) => { if (data['return_code'] == '000000') { - window.location.href = data['return_data']; + this.fileRecords(); + window.open(data['return_data']); }else { this.message.error(data['return_msg']); } }) } + } diff --git a/src/app/pages/trade/goods-list/goods-list.component.html b/src/app/pages/trade/goods-list/goods-list.component.html index 7433a8b..1f5ca21 100644 --- a/src/app/pages/trade/goods-list/goods-list.component.html +++ b/src/app/pages/trade/goods-list/goods-list.component.html @@ -202,7 +202,7 @@ diff --git a/src/app/pages/trade/goods-list/goods-list.component.ts b/src/app/pages/trade/goods-list/goods-list.component.ts index 476eccf..98a3537 100644 --- a/src/app/pages/trade/goods-list/goods-list.component.ts +++ b/src/app/pages/trade/goods-list/goods-list.component.ts @@ -260,39 +260,16 @@ export class GoodsListComponent { }); } - getLogisticsNo(id: number): void { - this.getRequest(false); - this.goodsOrderId = id; - this.isVisible = true; - } - showDetail(data: OrderGoodsData): void { this.orderGoodsData = data; this.findDeliveryAddressById(data.deliveryAddressId); this.orderDetailModal = true; } - handleOk(): void { - let params = { - id: this.goodsOrderId, - logisticsNo: this.logisticsNo, - time: new Date().getTime() - } - - this.orderGoodsService.updateLogisticsNo(params , (data: any) => { - if (data['return_code'] == '000000') { - this.isVisible = false; - - this.msg.success("成功") - } else { - this.msg.error(data['return_msg']); - } - }); - } - showLogisticsNo(logisticsNo: string): void { + showLogisticsNo(id: number): void { let params = { - logisticsNo:logisticsNo, + id:id, time: new Date().getTime() } diff --git a/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.html b/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.html index f0aba29..3bbef23 100644 --- a/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.html +++ b/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.html @@ -188,7 +188,7 @@ diff --git a/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.ts b/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.ts index 488df62..730395b 100644 --- a/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.ts +++ b/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.ts @@ -278,9 +278,9 @@ export class GoodsLogisticsListComponent { }); } - showLogisticsNo(logisticsNo: string): void { + showLogisticsNo(id: number): void { let params = { - logisticsNo:logisticsNo, + id:id, time: new Date().getTime() }