Commit 45fd7374 authored by 李维's avatar 李维

添加标记组合并识别表单页

parent d872c493
...@@ -282,6 +282,26 @@ ...@@ -282,6 +282,26 @@
</div> </div>
</div> </div>
<div style="margin-top: 30px;"></div>
<h2>标记组合并识别设置:</h2>
<div style="padding: 10px; border: 2px solid #ccc; border-radius: 10px; width: 350px;">
<div *ngIf="checkHasCombineGroup()" style="position: relative;">
<button nz-button nzType="default" nzShape="circle" (click)="addItemCombineGroup()" style="position: absolute; top: -40px; right: 0;">
<span nz-icon nzType="plus"></span>
</button>
<div style="margin-top: 40px;">
<div *ngFor="let cgItem of item.itemCombineGroup; let i = index" style="width: 100%; padding-right: 50px; position: relative; margin-top: 10px;">
<nz-select [(ngModel)]="item.itemCombineGroup[i]" nzMode="multiple" (ngModelChange)="onItemCombineGroupChange()" nzPlaceHolder="Please select" style="width: 100%;">
<nz-option *ngFor="let option of item.hotZoneItemArr2; let j = index" [nzLabel]="'sign-item-' + j" [nzValue]="j"></nz-option>
</nz-select>
<button nz-button nzType="danger" nzShape="circle" (click)="deleteItemCombineGroup(i)" style="position: absolute; right: 0;">
<span nz-icon nzType="delete"></span>
</button>
</div>
</div>
</div>
</div>
<div style="margin-top: 30px;"></div> <div style="margin-top: 30px;"></div>
<h2>涂色组设置:</h2> <h2>涂色组设置:</h2>
......
...@@ -304,7 +304,33 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni ...@@ -304,7 +304,33 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
} }
addItemCombineGroup() {
if(this.item.itemCombineGroup == undefined || this.item.itemCombineGroup == null) {
this.item.itemCombineGroup = [];
}
this.item.itemCombineGroup.push([])
this.save();
}
deleteItemCombineGroup(index) {
this.item.itemCombineGroup.splice(index, 1);
this.save();
}
checkHasCombineGroup() {
let count = 0;
this.item.hotZoneItemArr2.forEach(item => {
item.gIdx == '4';
count++;
});
return count>1;
}
onItemCombineGroupChange() {
this.save();
}
addForeground() { addForeground() {
if (!this.item.foregroundArr) { if (!this.item.foregroundArr) {
...@@ -388,6 +414,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni ...@@ -388,6 +414,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
group.bgItem = bgItem; group.bgItem = bgItem;
group.hotZoneItemArr = hotZoneItemArr; group.hotZoneItemArr = hotZoneItemArr;
this.item.itemCombineGroup = [];
this.getAllGroupType(); this.getAllGroupType();
this.save(); this.save();
...@@ -400,6 +428,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni ...@@ -400,6 +428,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
group.bgItem2 = bgItem; group.bgItem2 = bgItem;
group.hotZoneItemArr2 = hotZoneItemArr; group.hotZoneItemArr2 = hotZoneItemArr;
this.item.itemCombineGroup = [];
this.save(); this.save();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment