|
|
@@ -404,10 +404,60 @@ class TFMapUitl {
|
|
|
</div>`;
|
|
|
for (let j = 0; j < i.sensor?.length; j++) {
|
|
|
str2 += `<li><span> ${i.sensor[j].sensor_name} </span> <br/>
|
|
|
- <span style=" display: inline-block;"><span style="font-size:17px;color:#00A2FF; display: inline-block;margin-right:5px"> ${i.sensor[j].real_value}</span><span style="font-size:14px; display: inline-block;margin-right:10px"> ${i.sensor[j].dchar}</span> ${i.sensor[j].real_time?.slice(11, 16)}</span></li>`
|
|
|
+ <span style=" display: inline-block;"><span style="font-size:17px;color:#00A2FF; display: inline-block;margin-right:5px"> ${i.sensor[j].sensor_name != '风向' ? i.sensor[j].real_value : this.setWd(i.sensor[j].real_value)}</span><span style="font-size:14px; display: inline-block;margin-right:10px"> ${i.sensor[j].sensor_name != '风向' ? i.sensor[j].dchar : ''}</span> ${i.sensor[j].real_time?.slice(11, 16)}</span></li>`
|
|
|
}
|
|
|
return str + str2 + str3
|
|
|
}
|
|
|
+ setWd(wd) {
|
|
|
+ if (wd >= 348.76 && wd <= 11.25) {
|
|
|
+ return 'N';
|
|
|
+ }
|
|
|
+ if (wd >= 11.26 && wd <= 33.75) {
|
|
|
+ return 'NNE';
|
|
|
+ }
|
|
|
+ if (wd >= 33.76 && wd <= 56.25) {
|
|
|
+ return 'NE';
|
|
|
+ }
|
|
|
+ if (wd >= 56.26 && wd <= 78.75) {
|
|
|
+ return 'ENE';
|
|
|
+ }
|
|
|
+ if (wd >= 78.76 && wd <= 101.25) {
|
|
|
+ return 'E';
|
|
|
+ }
|
|
|
+ if (wd >= 101.26 && wd <= 123.75) {
|
|
|
+ return 'ESE';
|
|
|
+ }
|
|
|
+ if (wd >= 123.76 && wd <= 146.25) {
|
|
|
+ return 'SE';
|
|
|
+ }
|
|
|
+ if (wd >= 146.26 && wd <= 168.75) {
|
|
|
+ return 'SSE';
|
|
|
+ }
|
|
|
+ if (wd >= 168.76 && wd <= 191.25) {
|
|
|
+ return 'S';
|
|
|
+ }
|
|
|
+ if (wd >= 191.26 && wd <= 213.75) {
|
|
|
+ return 'SSW';
|
|
|
+ }
|
|
|
+ if (wd >= 213.76 && wd <= 236.25) {
|
|
|
+ return 'SW';
|
|
|
+ }
|
|
|
+ if (wd >= 236.26 && wd <= 258.75) {
|
|
|
+ return 'WSW';
|
|
|
+ }
|
|
|
+ if (wd >= 258.76 && wd <= 281.25) {
|
|
|
+ return 'W';
|
|
|
+ }
|
|
|
+ if (wd >= 281.76 && wd <= 303.75) {
|
|
|
+ return 'WNW';
|
|
|
+ }
|
|
|
+ if (wd >= 303.76 && wd <= 326.25) {
|
|
|
+ return 'NW';
|
|
|
+ }
|
|
|
+ if (wd >= 326.26 && wd <= 348.75) {
|
|
|
+ return 'NNW';
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
dzdMarkerDom(i) {
|
|
|
console.log('dzdMarkerDom', i);
|