Browse Source

[完善]修改盒子名称

非煤矿业企业安全风险监测预警系统
邵佳豪 2 years ago
parent
commit
dc6f596631
  1. 2
      proxy.config.json
  2. 6
      src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html
  3. 15
      src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts
  4. 14
      src/app/system-management/host-config/host-config.component.html
  5. 15
      src/app/system-management/host-config/host-config.component.ts
  6. 9
      src/app/system-management/image-label-anxin/image-label-anxin.component.ts

2
proxy.config.json

@ -1,6 +1,8 @@
{
"/api": {
"target": "http://121.36.37.70:8080/",
"测试":"http://121.36.37.70:8080/",
"s":"http://121.36.37.70:8080/",
"secure": false,
"changeOrigin": true
},

6
src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html

@ -54,9 +54,9 @@
(nzOnOk)="handleOk()">
<ng-container *nzModalContent>
<nz-radio-group [(ngModel)]="radioValue">
<label nz-radio nzValue="交大">交大盒子</label>
<label nz-radio nzValue="黄海">黄海盒子</label>
<label nz-radio nzValue="安信">安信盒子</label>
<label nz-radio nzValue="警旗1">警旗1</label>
<label nz-radio nzValue="警旗2">警旗2</label>
<label nz-radio nzValue="警旗3">警旗3</label>
</nz-radio-group>
</ng-container>
</nz-modal>

15
src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts

@ -215,18 +215,11 @@ export class AnalysisOfTheHostComponent implements OnInit {
}
isVisible = false;
radioValue = '交大';
radioValue = '警旗1';
configdata;
config(data) {
this.isVisible = true;
this.configdata = data;
// this.router.navigate([`/system/host/camera`], {
// queryParams: {
// hostId: this.configdata.id,
// orId: this.selectedOilStation.id,
// type: '交大',
// },
// });
}
handleOk(): void {
@ -287,7 +280,7 @@ export class AnalysisOfTheHostComponent implements OnInit {
}
enum DeviceProvider {
'交大' = 0,
'黄海' = 1,
'安信' = 2,
'警旗1' = 0,
'警旗2' = 1,
'警旗3' = 2,
}

14
src/app/system-management/host-config/host-config.component.html

@ -29,13 +29,13 @@
<td>{{ item.uri }}</td>
<td>{{ item.type | cameraType}}</td>
<td>
<span *ngIf="hostType === '交大'">
<span *ngIf="hostType === '警旗1'">
{{item.dimensionedPoints ? '已标注' : '未标注'}}
</span>
<span *ngIf="hostType === '黄海'">
<span *ngIf="hostType === '警旗2'">
{{item.dimensionedPointsHuanghai ? '已标注' : '未标注'}}
</span>
<span *ngIf="hostType === '安信'">
<span *ngIf="hostType === '警旗3'">
{{item.dimensionedPointsAnxin ? '已标注' : '未标注'}}
</span>
</td>
@ -55,16 +55,16 @@
</tr>
</tbody>
</nz-table>
<div class="footer" *ngIf="hostType === '交大'">
<div class="footer" *ngIf="hostType === '警旗1'">
<button nz-button nzType="primary" (click)="sourceYaml()">下发source.yaml配置</button>
</div>
<div class="footer" *ngIf="hostType === '交大'">
<div class="footer" *ngIf="hostType === '警旗1'">
<button [disabled]="isSourceYaml === false" nz-button nzType="primary" (click)="connect()">下发算法配置</button>
</div>
<div class="footer" *ngIf="hostType === '黄海'">
<div class="footer" *ngIf="hostType === '警旗2'">
<button nz-button nzType="primary" (click)="config()">下发黄海config.json配置</button>
</div>
<div class="footer" *ngIf="hostType === '安信'">
<div class="footer" *ngIf="hostType === '警旗3'">
<button nz-button nzType="primary" (click)="configToAx()">下发安信data.yaml配置</button>
</div>
</div>

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

@ -251,7 +251,7 @@ export class HostConfigComponent implements OnInit {
label(item) {
this.http.get(`/api/EdgeDevices/${this.hostId}`).subscribe({
next: (data: any) => {
if (this.hostType == '交大') {
if (this.hostType == '警旗1') {
if (data.configFiles) {
this.isSourceYaml = true;
const element = document.documentElement;
@ -283,7 +283,7 @@ export class HostConfigComponent implements OnInit {
this.isSourceYaml = false;
this.message.create('error', '请先下发source.yaml配置');
}
} else if (this.hostType == '黄海') {
} else if (this.hostType == '警旗2') {
const element = document.documentElement;
if (element.requestFullscreen) {
//进入全屏
@ -309,7 +309,7 @@ export class HostConfigComponent implements OnInit {
modal.afterClose.subscribe((result) => {
this.ngOnInit();
});
} else if (this.hostType == '安信') {
} else if (this.hostType == '警旗3') {
const element = document.documentElement;
if (element.requestFullscreen) {
//进入全屏
@ -1566,9 +1566,14 @@ rule_threshold:
}
configJsonToAx() {
// server: 'http://121.36.37.70:8208',
// obs: 'http://121.36.37.70:8906',
// server: 'http://10.156.134.53:8208',
// obs: 'https://znaq.sinochemoilmarketing.com',
let data = {
server: 'http://121.36.37.70:8208',
obs: 'http://121.36.37.70:8906',
server: 'http://10.156.134.53:8208',
obs: 'https://znaq.sinochemoilmarketing.com',
userInfo: {
user: '',
password: '',

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

@ -32,8 +32,12 @@ export class ImageLabelAnxinComponent implements OnInit {
//获取 摄像头图片/标注点位
getImgMarkData() {
console.log('获取照片', new Date().getTime());
return new Promise((resolve, reject) => {
this.http.get(`/api/Cameras/${this.cameraId}`).subscribe((data: any) => {
this.http
.get(`/api/Cameras/${this.cameraId}`)
.subscribe((data: any) => {
this.camerasData = data;
// this.camerasData.dimensionedPointsAnxin = null
this.markType = data.type;
@ -41,7 +45,8 @@ export class ImageLabelAnxinComponent implements OnInit {
responseType: 'blob' as 'json',
params: { cameraId: this.cameraId },
};
this.http.get(`/api/Cameras/Images`, httpOptions).subscribe({
let date = new Date().getTime();
this.http.get(`/api/Cameras/Images?v=${date}`, httpOptions).subscribe({
next: (data) => {
resolve(data);
},

Loading…
Cancel
Save