From c8de12f4ea4e8a6ee6361f2adfa6e8816d433f55 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Mon, 24 Apr 2023 17:16:14 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E4=BF=AE=E6=94=B9=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/histories/histories.component.html | 12 ++++----- .../pages/histories/histories.component.ts | 22 +++++----------- .../img-list/img-list.component.html | 2 +- .../histories/img-list/img-list.component.ts | 26 +++++++++++++------ 4 files changed, 32 insertions(+), 30 deletions(-) diff --git a/src/app/pages/histories/histories.component.html b/src/app/pages/histories/histories.component.html index 381a3ba..282728e 100644 --- a/src/app/pages/histories/histories.component.html +++ b/src/app/pages/histories/histories.component.html @@ -68,10 +68,10 @@ - - - - + + + + @@ -79,9 +79,9 @@ - + - + diff --git a/src/app/pages/histories/histories.component.ts b/src/app/pages/histories/histories.component.ts index 3999029..7fe12e6 100644 --- a/src/app/pages/histories/histories.component.ts +++ b/src/app/pages/histories/histories.component.ts @@ -126,13 +126,9 @@ export class HistoriesComponent implements OnInit { item.id ? ViolationIds.push(item.id) : null; }); } - let VendorId: any = -1; + let VendorName: any = null; if (this.validateForm.value.manufacturer) { - if (this.validateForm.value.manufacturer === "null") { - VendorId = null; - } else { - VendorId = this.validateForm.value.manufacturer; - } + VendorName = this.validateForm.value.manufacturer; } let NotificationState: any = "All"; if (this.validateForm.value.operation) { @@ -158,7 +154,7 @@ export class HistoriesComponent implements OnInit { SkipCount: this.SkipCount, MaxResultCount: this.MaxResultCount, //每页50条 Positive: this.validateForm.value.disposalState, - VendorId: VendorId, + VendorName: VendorName, NotificationState: NotificationState, }; this.tableSpin = true; @@ -193,13 +189,9 @@ export class HistoriesComponent implements OnInit { item.id ? ViolationIds.push(item.id) : null; }); } - let VendorId: any = -1; + let VendorName: any = null; if (this.validateForm.value.manufacturer) { - if (this.validateForm.value.manufacturer === "null") { - VendorId = null; - } else { - VendorId = this.validateForm.value.manufacturer; - } + VendorName = this.validateForm.value.manufacturer; } let NotificationState: any = "All"; if (this.validateForm.value.operation) { @@ -223,7 +215,7 @@ export class HistoriesComponent implements OnInit { ] : null, Positive: this.validateForm.value.disposalState, - VendorId: VendorId, + VendorName: VendorName, NotificationState: NotificationState, }; this.http @@ -251,7 +243,7 @@ export class HistoriesComponent implements OnInit { nzComponentParams: { data: data, }, - nzWidth:700, + nzWidth: 700, nzOnOk: () => new Promise((resolve) => setTimeout(resolve, 1000)), nzFooter: null, }); diff --git a/src/app/pages/histories/img-list/img-list.component.html b/src/app/pages/histories/img-list/img-list.component.html index 8d6b4ca..77e92ff 100644 --- a/src/app/pages/histories/img-list/img-list.component.html +++ b/src/app/pages/histories/img-list/img-list.component.html @@ -1,3 +1,3 @@
- +
\ No newline at end of file diff --git a/src/app/pages/histories/img-list/img-list.component.ts b/src/app/pages/histories/img-list/img-list.component.ts index 22369cf..d9aed07 100644 --- a/src/app/pages/histories/img-list/img-list.component.ts +++ b/src/app/pages/histories/img-list/img-list.component.ts @@ -1,17 +1,27 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit } from "@angular/core"; @Component({ - selector: 'app-img-list', - templateUrl: './img-list.component.html', - styleUrls: ['./img-list.component.scss'] + selector: "app-img-list", + templateUrl: "./img-list.component.html", + styleUrls: ["./img-list.component.scss"], }) export class ImgListComponent implements OnInit { + @Input() data?: any; - @Input() data?: string; - - constructor() { } + constructor() {} + newList; ngOnInit(): void { + let str = ""; + let num = 0; + this.data.forEach((element) => { + num++; + if (element.indexOf("http") !== 0) { + str += location.origin + element + "\n"; + } else { + str += element + "\n"; + } + }); + this.newList = str; } - }