Browse Source

[完善]完善标绘

develop
邵佳豪 3 years ago
parent
commit
11964ef208
  1. 18
      src/app/system-management/host-config/host-config.component.ts
  2. 14
      src/app/system-management/image-label2/image-label2.component.html
  3. 2
      src/app/system-management/image-label2/image-label2.component.ts

18
src/app/system-management/host-config/host-config.component.ts

@ -430,27 +430,17 @@ mode=strict
if (element.type == 2 || element.type == 3) {//卸油区
let obj = element.dimensionedPointsObj
let str1 = ''
if (obj && obj.arrowOfSouth && obj.arrowOfSouth.length == 2) {
str1 = `${obj.arrowOfSouth[1].startX};${obj.arrowOfSouth[1].startY};${obj.arrowOfSouth[1].endX};${obj.arrowOfSouth[1].endY}`
if (obj && obj.arrow && obj.arrow.length == 2) {
str1 = `${obj.arrow[1].startX};${obj.arrow[1].startY};${obj.arrow[1].endX};${obj.arrow[1].endY}`
}
let str2 = ''
if (obj && obj.arrowOfWest && obj.arrowOfWest.length == 2) {
str2 = `${obj.arrowOfWest[1].startX};${obj.arrowOfWest[1].startY};${obj.arrowOfWest[1].endX};${obj.arrowOfWest[1].endY}`
}
let str3 = ''
if (obj && obj.arrowOfEast && obj.arrowOfEast.length == 2) {
str3 = `${obj.arrowOfEast[1].startX};${obj.arrowOfEast[1].startY};${obj.arrowOfEast[1].endX};${obj.arrowOfEast[1].endY}`
}
let str4 = ''
if (obj && obj.arrowOfNorth && obj.arrowOfNorth.length == 2) {
str4 = `${obj.arrowOfNorth[1].startX};${obj.arrowOfNorth[1].startY};${obj.arrowOfNorth[1].endX};${obj.arrowOfNorth[1].endY}`
}
if (str1 || str2 || str3 || str4) {
if (str1 || str2) {
let arr = [
{ name: 'South', value: str1 },
{ name: 'West', value: str2 },
{ name: 'East', value: str3 },
{ name: 'North', value: str4 }
{ name: 'West', value: str2 }
]
let newstr = ''
arr.forEach(item => {

14
src/app/system-management/image-label2/image-label2.component.html

@ -4,17 +4,17 @@
<label class="leftTitle" *ngIf="markType === 0">进出口</label>
<label class="leftTitle" *ngIf="markType === 2">卸油区</label>
<label class="leftTitle" *ngIf="markType === 3">便利店</label>
<button nz-button *ngIf="markType === 2 || markType === 3" [ngClass]="{selectBtn: isDrawArrow && !arrowDirection}"
(click)="isDrawArrow = true;arrowDirection=null">箭头方向标绘</button>
<button nz-button *ngIf="markType === 2 || markType === 3"
<button nz-button *ngIf="markType === 2" [ngClass]="{selectBtn: isDrawArrow && !arrowDirection}"
(click)="isDrawArrow = true;arrowDirection=null">箭头方向标绘1</button>
<!-- <button nz-button *ngIf="markType === 2"
[ngClass]="{selectBtn:(isDrawArrow && arrowDirection=='South')}"
(click)="isDrawArrow = true;arrowDirection='South'">South</button>
(click)="isDrawArrow = true;arrowDirection='South'">South</button> -->
<button nz-button *ngIf="markType === 2" [ngClass]="{selectBtn: (isDrawArrow && arrowDirection=='West')}"
(click)="isDrawArrow = true;arrowDirection='West'">West</button>
<button nz-button *ngIf="markType === 2" [ngClass]="{selectBtn: (isDrawArrow && arrowDirection=='East')}"
(click)="isDrawArrow = true;arrowDirection='West'">箭头方向标绘2</button>
<!-- <button nz-button *ngIf="markType === 2" [ngClass]="{selectBtn: (isDrawArrow && arrowDirection=='East')}"
(click)="isDrawArrow = true;arrowDirection='East'">East</button>
<button nz-button *ngIf="markType === 2" [ngClass]="{selectBtn: (isDrawArrow && arrowDirection=='North')}"
(click)="isDrawArrow = true;arrowDirection='North'">North</button>
(click)="isDrawArrow = true;arrowDirection='North'">North</button> -->
<button nz-button *ngIf="markType === 2" [ngClass]="{selectBtn: !isDrawArrow && oilUnloadingArea}"
(click)="isDrawArrow = false; oilUnloadingArea = true;">泄油管区域</button>
<button nz-button *ngIf="markType === 2" [ngClass]="{selectBtn: !isDrawArrow && !oilUnloadingArea}"

2
src/app/system-management/image-label2/image-label2.component.ts

@ -341,7 +341,6 @@ export class ImageLabel2Component implements OnInit {
let arr = [this.arrowPoints, this.arrowPointsOfSouth, this.arrowPointsOfWest, this.arrowPointsOfEast, this.arrowPointsOfNorth]
this.drawLine(arr, context)
} else if (this.isDrawArrow && this.arrowDirection == 'South') {
console.log('South')
if (this.arrowPointsOfSouth.length === 2) { //限制数量
this.message.create('warning', '绘制数量已达上限!');
return
@ -356,7 +355,6 @@ export class ImageLabel2Component implements OnInit {
let arr = [this.arrowPoints, this.arrowPointsOfSouth, this.arrowPointsOfWest, this.arrowPointsOfEast, this.arrowPointsOfNorth]
this.drawLine(arr, context)
} else if (this.isDrawArrow && this.arrowDirection == 'West') {
console.log('West')
if (this.arrowPointsOfWest.length === 2) { //限制数量
this.message.create('warning', '绘制数量已达上限!');
return

Loading…
Cancel
Save