Browse Source

[完善]标绘图形必须为封闭图形

非煤矿业企业安全风险监测预警系统
邵佳豪 2 years ago
parent
commit
9a0b783b4c
  1. 10
      src/app/system-management/image-label-anxin/image-label-anxin.component.ts

10
src/app/system-management/image-label-anxin/image-label-anxin.component.ts

@ -455,6 +455,15 @@ export class ImageLabelAnxinComponent implements OnInit {
//保存
save() {
console.log(this.camerasData.dimensionedPointsAnxin);
console.log('标点数据', this.PolygonData);
// return;
for (const key in this.PolygonData) {
const element = this.PolygonData[key];
if (element.Points.length !== 0 && element.Points.length <= 2) {
this.message.create('info', '标绘图形必须为封闭图形!');
return;
}
}
if (!this.camerasData.dimensionedPointsAnxin) {
this.camerasData.dimensionedPointsAnxin = {};
this.camerasData.dimensionedPointsAnxin.rawData = {
@ -465,7 +474,6 @@ export class ImageLabelAnxinComponent implements OnInit {
};
this.camerasData.dimensionedPointsAnxin.yamlData = [];
}
console.log('标点数据', this.PolygonData);
let yamlData = [];
for (const key in this.PolygonData) {

Loading…
Cancel
Save