diff --git a/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html b/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html
index f98d2a4..3dd07ad 100644
--- a/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html
+++ b/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.html
@@ -62,6 +62,7 @@
编辑
配置
+ 下载设备编号
删除
|
diff --git a/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts b/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts
index 4e8ba17..46a29af 100644
--- a/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts
+++ b/src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts
@@ -169,4 +169,32 @@ export class AnalysisOfTheHostComponent implements OnInit {
this.router.navigate([`/system/host/camera`], { queryParams: { 'hostId': data.id, 'orId': this.selectedOilStation.id } })
}
+
+ download(data) {
+ console.log(data)
+ let params = {
+ edgeDeviceId: data.id
+ }
+ const httpOptions = {
+ responseType: 'blob' as 'json',
+ params: params
+ };
+ this.http.get(`/api/EdgeDevices/IdentityDigest/File`, httpOptions).subscribe({
+ next: (data: any) => {
+ console.log('文件',data)
+ // 文件名中有中文 则对文件名进行转码
+ const link = document.createElement('a');
+ const blob = new Blob([data], { type: 'application/octet-stream' });
+ link.setAttribute('href', window.URL.createObjectURL(blob));
+ link.setAttribute('download', `.deviceid`);
+ link.style.visibility = 'hidden';
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ },
+ error: (err) => {
+ console.log(err)
+ }
+ })
+ }
}
diff --git a/src/app/system-management/host-config/host-config.component.ts b/src/app/system-management/host-config/host-config.component.ts
index 93538b7..d6ce1e0 100644
--- a/src/app/system-management/host-config/host-config.component.ts
+++ b/src/app/system-management/host-config/host-config.component.ts
@@ -161,283 +161,180 @@ export class HostConfigComponent implements OnInit {
disposalData() {
console.log(this.listOfData)
let config1 = `[property]
- enable=1
- #Width height used for configuration to which below configs are configured
- config-width=1980
- config-height=1080
- #osd-mode 0: Dont display any lines, rois and text
- # 1: Display only lines, rois and static text i.e. labels
- # 2: Display all info from 1 plus information about counts
- osd-mode=2
- #Set OSD font size that has to be displayed
- display-font-size=12
-
- ## Per stream configuration
- [roi-filtering-stream-0]
- #shoushiyuan-out202
- #enable or disable following feature
- enable=1
- #ROI to filter select objects, and remove from meta data
- roi-RF=1052;119;76;1066;1908;1071;1797;180
- #remove objects in the ROI
- inverse-roi=0
- class-id=-1
-
- # ## Per stream configuration
- # [roi-filtering-stream-1]
- # #shoushiyuan-out206
- # #enable or disable following feature
- # enable=1
- # #ROI to filter select objects, and remove from meta data
- # roi-RF=443;660;660;1076;1113;1079;638;541
- # #remove objects in the ROI
- # inverse-roi=0
- # class-id=-1
-
- ## Per stream configuration
- [roi-filtering-stream-2]
- #shoushiyuan-out210
- #enable or disable following feature
- enable=1
- #ROI to filter select objects, and remove from meta data
- roi-RF=10;323;227;1073;1908;1066;1909;370;1291;166
- #remove objects in the ROI
- inverse-roi=0
- class-id=0
-
- # ## Per stream configuration
- # [roi-filtering-stream-3]
- # #shoushiyuan-out211
- # #enable or disable following feature
- # enable=1
- # #ROI to filter select objects, and remove from meta data
- # roi-RF=587;447;405;1063;1904;1063;1334;602
- # #remove objects in the ROI
- # inverse-roi=0
- # class-id=-1
-
- # ## Per stream configuration
- # [roi-filtering-stream-4]
- # #shoushiyuan-out214 2区
- # #enable or disable following feature
- # enable=1
- # #ROI to filter select objects, and remove from meta data
- # roi-RF=687;227;1025;227;1025;688;687;688
- # #remove objects in the ROI
- # inverse-roi=0
- # class-id=0
-
- # ## Per stream configuration
- # [roi-filtering-stream-5]
- # #shoushiyuan-out215 3区
- # #enable or disable following feature
- # enable=1
- # #ROI to filter select objects, and remove from meta data
- # roi-RF=649;139;956;139;956;528;649;528
- # # 659;139;956;139;956;448;659;448
- # #remove objects in the ROI
- # inverse-roi=0
- # class-id=0
-
- # ## Per stream configuration
- # [roi-filtering-stream-6]
- # #shoushiyuan-out216
- # #enable or disable following feature
- # enable=1
- # #ROI to filter select objects, and remove from meta data
- # roi-RF=840;152;1102;152;1102;601;840;601
- # #remove objects in the ROI
- # inverse-roi=0
- # class-id=0
-
- # ## Per stream configuration
- # [roi-filtering-stream-7]
- # #shoushiyuan-out217 4区
- # #enable or disable following feature
- # enable=1
- # #ROI to filter select objects, and remove from meta data
- # roi-RF=886;248;1163;248;1163;627;886;627
- # #remove objects in the ROI
- # inverse-roi=0
- # class-id=0
-
- [line-crossing-stream-1]
- enable=1
- #Label;direction;lc
- line-crossing-Entry=471;540;570;689;443;660;638;541
- # line-crossing-Exit=789;672;1084;900;851;773;1203;732
- class-id=0
- #extended when 0- only counts crossing on the configured Line
- # 1- assumes extended Line crossing counts all the crossing
- extended=0
- #LC modes supported:
- #loose : counts all crossing without strong adherence to direction
- #balanced: Strict direction adherence expected compared to mode=loose
- #strict : Strict direction adherence expected compared to mode=balanced
- mode=strict
-
- [line-crossing-stream-3]
- enable=1
- #Label;direction;lc
- line-crossing-Entry=685;794;361;704;587;447;405;1063
- # line-crossing-Exit=789;672;1084;900;1908;827;685;436
- class-id=0
- #extended when 0- only counts crossing on the configured Line
- # 1- assumes extended Line crossing counts all the crossing
- extended=0
- #LC modes supported:
- #loose : counts all crossing without strong adherence to direction
- #balanced: Strict direction adherence expected compared to mode=loose
- #strict : Strict direction adherence expected compared to mode=balanced
- mode=strict
-
- # [overcrowding-stream-1]
- # enable=1
- # roi-OC=295;643;579;634;642;913;56;828
- # #no of objects that will trigger OC
- # object-threshold=2
- # class-id=-1
- `
- let config2 = `# The all in one config file.
- # RTSP sources
- # type
- # 0 ViolateArea.ENTRANCE,
- # 1 ViolateArea.GAS_AREA,
- # 2 ViolateArea.FUEL_AREA,
- # 3 ViolateArea.MART,
- # don't change the key name.
-
- debug: true #when the debug is on, osd.
-
- sources:
- config: 'config/source.yaml'
-
- streammux:
- width: 1980
- height: 1080
- batch-size: 32
- batched-push-timeout: 4000000
- live-source: true
- sync-inputs: true
-
- sourcebin:
- buffer-duration: 1000000000
- buffer-size: 102400
-
- tracker:
- config: 'config/dstest_tracker_config.txt'
-
- analytics:
- config: 'config/config_nvdsanalytics.txt'
-
- osd:
- enable: false
- ipaddr: '0.0.0.0'
- port: 8554
- out_path: 'test'
-
- peoplenet:
- enable: true
- apply_on: -1
- interval: 1
- batch_size: 16
- topk: 5
- roi-top-offset: 0
- roi-bottom-offset: 0
- detected-min-w: 20
- detected-min-h: 200
-
- trafficcam:
- enable: true
- apply_on: 0
- interval: 1
- batch_size: 16
- topk: 5
- roi-top-offset: 0
- roi-bottom-offset: 0
- detected-min-w: 200
- detected-min-h: 200
-
- actionnet:
- enable: false
- apply_on: 1
- interval: 1
- batch_size: 32
- # roi:
- # - 'fuel_island-4':
- # - [672, 227, 366, 471]
- # - 'fuel_island-5':
- # - [649, 139, 307, 389]
- # - 'fuel_island-6':
- # - [805, 152, 297, 430]
- # - 'fuel_island-7':
- # - [876, 248, 287, 409]
-
- idnet:
- enable: true
- apply_on: -1
- interval: 1
- batch_size: 32
-
- oilnet:
- enable: true
- apply_on: 2
- interval: 1
- batch_size: 16
- roi-top-offset: 0
- roi-bottom-offset: 0
- detected-min-w: 30
- detected-min-h: 0
-
- smoke_fire_net:
- enable: false
- apply_on: -1
- interval: 1
- batch_size: 16
-
- smoking_calling_net:
- enable: true
- apply_on: -1
- interval: 1
- batch_size: 32
-
- connet:
- enable: false
- apply_on: 2
- roi:
- - 'oil_tube-3':
- - [490, 370, 381, 168]
- - 'grounder-3':
- - [585, 334, 289, 139]
- interval: 1
- batch_size: 2
-
- #new field for rule threshold
- rule_threshold:
- object_occurence_interval_second: 15
- object_disappear_interval_second: 60
- on_car_parking_interval_second: 1800
- threshold_relying_sitting: 0.4 #rolling mean confidence
- threshold_smoking_calling: 0.8 #rolling mean confidence
- threshold_connecting: 0.667 #rolling mean confidence
- threshold_identity: 0.1 #only to filter out people net error
+enable=1
+#Width height used for configuration to which below configs are configured
+config-width=1980
+config-height=1080
+#osd-mode 0: Dont display any lines, rois and text
+# 1: Display only lines, rois and static text i.e. labels
+# 2: Display all info from 1 plus information about counts
+osd-mode=2
+#Set OSD font size that has to be displayed
+display-font-size=12
`
+ let config2 = ''
let config3 = `test_action: true
- logging_interval : 600
+logging_interval : 600
`
let config4 = `#RTSP sources for file source, use file as the
#Shoushi Yuan RTSP sources
video_rate: 5
inference_buffer_second: 10`
- this.listOfData.forEach((item: any) => {
+ let xieyouqu = []
+ this.listOfData.forEach((item: any, index) => {
+ if (item.type == 2) { xieyouqu.push(item) }
config4 += `
- - name: '${item.name}'
+ - name: '${item.name} ${index}'
user: '${item.user}'
password: '${item.password}'
uri: '${item.uri}'
type: ${item.type}
`
+ if (item.type == 0) {
+ config1 += `
+## Per stream configuration
+[roi-filtering-stream-${index}]
+#shoushiyuan-out202
+#enable or disable following feature
+enable=1
+#ROI to filter select objects, and remove from meta data
+roi-RF=${index}
+#remove objects in the ROI
+inverse-roi=0
+class-id=-1
+ `
+ }
+ if (item.type == 2 || item.type == 3) {
+ config1 += `
+[line-crossing-stream-${index}]
+enable=1
+#Label;direction;lc
+line-crossing-Entry=${index}
+# line-crossing-Exit=789;672;1084;900;851;773;1203;732
+class-id=0
+#extended when 0- only counts crossing on the configured Line
+# 1- assumes extended Line crossing counts all the crossing
+extended=0
+#LC modes supported:
+#loose : counts all crossing without strong adherence to direction
+#balanced: Strict direction adherence expected compared to mode=loose
+#strict : Strict direction adherence expected compared to mode=balanced
+mode=strict
+ `
+ }
})
+ if (xieyouqu.length != 1) {
+ this.message.create('warning', '有且只能有一个卸油区!');
+ return
+ } else {
+ config2 = `# The all in one config file.
+# RTSP sources
+# type
+# 0 ViolateArea.ENTRANCE,
+# 1 ViolateArea.GAS_AREA,
+# 2 ViolateArea.FUEL_AREA,
+# 3 ViolateArea.MART,
+# don't change the key name.
+
+debug: true #when the debug is on, osd.
+
+sources:
+ config: 'config/source.yaml'
+
+tracker:
+ config: 'config/dstest_tracker_config.txt'
+
+analytics:
+ config: 'config/config_nvdsanalytics.txt'
+
+peoplenet:
+ enable: true
+ apply_on: -1
+ interval: 1
+ batch_size: 16
+ topk: 5
+ roi-top-offset: 0
+ roi-bottom-offset: 0
+ detected-min-w: 20
+ detected-min-h: 200
+
+trafficcam:
+ enable: true
+ apply_on: 0
+ interval: 1
+ batch_size: 16
+ topk: 5
+ roi-top-offset: 0
+ roi-bottom-offset: 0
+ detected-min-w: 100
+ detected-min-h: 100
+
+actionnet:
+ enable: false
+ apply_on: 1
+ # roi:
+ # - 'fuel_island-4':
+ # - [200, 0, 450, 500]
+ # - 'fuel_island-5':
+ # - [930, 93, 940, 987]
+ # - 'fuel_island-6':
+ # - [1174, 151, 746, 929]
+ # - 'fuel_island-7':
+ # - [1450, 300, 460, 650]
+ interval: 1
+ batch_size: 32
+
+idnet:
+ enable: true
+ apply_on: -1
+ interval: 1
+ batch_size: 32
+
+oilnet:
+ enable: true
+ apply_on: 2
+ interval: 1
+ batch_size: 16
+ roi-top-offset: 0
+ roi-bottom-offset: 0
+ detected-min-w: 20
+ detected-min-h: 20
+
+fire_smoke_net:
+ enable: true
+ apply_on: -1
+ interval: 1
+ batch_size: 16
+
+smoking_calling_net:
+ enable: true
+ apply_on: -1
+ interval: 1
+ batch_size: 32
+
+connet:
+ enable: true
+ apply_on: 2
+ roi:
+ - 'oil_tube-3':
+ - ${xieyouqu[0].xxx}
+ - 'grounder-3':
+ - ${xieyouqu[0].xxx}
+ interval: 1
+ batch_size: 2
+
+ #new field for rule threshold
+rule_threshold:
+ object_occurence_interval_second: 15
+ object_disappear_interval_second: 60
+ on_car_parking_interval_second: 1800
+ on_fire_smoke_interval_second: 5
+ threshold_relying_sitting: 0.4 #rolling mean confidence
+ threshold_smoking_calling: 0.5 #rolling mean confidence
+ threshold_connecting: 0.667 #rolling mean confidence
+ threshold_identity: 0.1 #only to filter out people net error
+`
+}
sessionStorage.setItem('config1', config1)
sessionStorage.setItem('config2', config2)
sessionStorage.setItem('config3', config3)