wx-program
pangdundun 2024-01-26 19:09:08 +08:00
parent c9d7d61534
commit c38c494952
4 changed files with 145 additions and 86 deletions

View File

@ -38,7 +38,7 @@
<view class="">
{{ item.environmentDataId }}
</view>
<view class="" :style="item.equipmentStart == 0 ? 'color:red':''">{{ item.equipmentStart == 0 ? '故障' : (item.environmentData + getTypeList(item.formula)) }}</view>
<view class="" :style="item.equipmentStart == 0 ? 'color:red':''">{{ item.equipmentStart == 0 ? '故障' : ((item.formula == '12' ? getWindDirection(item.environmentData) : item.environmentData) + (item.formula == '12' ? '' : getTypeList(item.formula))) }}</view>
</view>
</view>
</view>
@ -64,7 +64,7 @@
<view class="">
{{ item.environmentDataId }}
</view>
<view class="" :style="item.equipmentStart == 0 ? 'color:red':''">{{ item.equipmentStart == 0 ? '故障' : (item.environmentData + getTypeList(item.formula)) }}</view>
<view class="" :style="item.equipmentStart == 0 ? 'color:red':''">{{ item.equipmentStart == 0 ? '故障' : ((item.formula == '12' ? getWindDirection(item.environmentData) : item.environmentData) + (item.formula == '12' ? '' : getTypeList(item.formula))) }}</view>
</view>
</view>
</view>
@ -688,6 +688,30 @@
})
// console.log(this.equipmentName30List,'this.equipmentName30List');
},
//
getWindDirection(number){
let num = Number(number)
if(num <= 67 && num >= 22 ){
return '东北'
}else if(num > 67 && num < 112){
return '东'
}else if(num >= 112 && num <= 157){
return '东南'
}else if(num > 157 && num < 202){
return '南'
}else if(num >= 202 && num <= 247){
return '西南'
}else if(num > 247 && num < 292){
return '西'
}else if(num >= 292 && num <= 337){
return '西北'
}else if(num < 22){
return '北'
}else if(num > 337){
return '北'
}
}
}
}
</script>

File diff suppressed because one or more lines are too long

View File

@ -129,12 +129,18 @@ var render = function () {
var $orig = _vm.__get_orig(item0)
var l0 = _vm.__map(item0.weatherListChild, function (item, __i1__) {
var $orig = _vm.__get_orig(item)
var m0 = !(item.equipmentStart == 0)
? _vm.getTypeList(item.formula)
: null
var m0 =
!(item.equipmentStart == 0) && item.formula == "12"
? _vm.getWindDirection(item.environmentData)
: null
var m1 =
!(item.equipmentStart == 0) && !(item.formula == "12")
? _vm.getTypeList(item.formula)
: null
return {
$orig: $orig,
m0: m0,
m1: m1,
}
})
var g0 = item0.weatherListChild.length
@ -159,12 +165,18 @@ var render = function () {
var $orig = _vm.__get_orig(item0)
var l2 = _vm.__map(item0.equipmentName30ListChild, function (item, __i3__) {
var $orig = _vm.__get_orig(item)
var m1 = !(item.equipmentStart == 0)
? _vm.getTypeList(item.formula)
: null
var m2 =
!(item.equipmentStart == 0) && item.formula == "12"
? _vm.getWindDirection(item.environmentData)
: null
var m3 =
!(item.equipmentStart == 0) && !(item.formula == "12")
? _vm.getTypeList(item.formula)
: null
return {
$orig: $orig,
m1: m1,
m2: m2,
m3: m3,
}
})
var g3 = item0.equipmentName30ListChild.length
@ -191,226 +203,226 @@ var render = function () {
var $orig = _vm.__get_orig(item1)
var l4 = _vm.__map(item1.childList_mubiao, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m2 = _vm.getTypeList(item2.formula)
var m3 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m4 = !(item2.equipmentStart == 0)
var m4 = _vm.getTypeList(item2.formula)
var m5 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m6 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m2: m2,
m3: m3,
m4: m4,
m5: m5,
m6: m6,
}
})
var g6 = item1.childList_mubiao.length
var l5 = _vm.__map(item1.childList_one, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m5 = _vm.getTypeList(item2.formula)
var m6 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m7 = !(item2.equipmentStart == 0)
var m7 = _vm.getTypeList(item2.formula)
var m8 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m9 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m5: m5,
m6: m6,
m7: m7,
m8: m8,
m9: m9,
}
})
var g7 = item1.childList_one.length
var l6 = _vm.__map(item1.childList_two, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m8 = _vm.getTypeList(item2.formula)
var m9 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m10 = !(item2.equipmentStart == 0)
var m10 = _vm.getTypeList(item2.formula)
var m11 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m12 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m8: m8,
m9: m9,
m10: m10,
m11: m11,
m12: m12,
}
})
var g8 = item1.childList_two.length
var l7 = _vm.__map(item1.childList_three, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m11 = _vm.getTypeList(item2.formula)
var m12 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m13 = !(item2.equipmentStart == 0)
var m13 = _vm.getTypeList(item2.formula)
var m14 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m15 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m11: m11,
m12: m12,
m13: m13,
m14: m14,
m15: m15,
}
})
var g9 = item1.childList_three.length
var l8 = _vm.__map(item1.childList_four, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m14 = _vm.getTypeList(item2.formula)
var m15 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m16 = !(item2.equipmentStart == 0)
var m16 = _vm.getTypeList(item2.formula)
var m17 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m18 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m14: m14,
m15: m15,
m16: m16,
m17: m17,
m18: m18,
}
})
var g10 = item1.childList_four.length
var l9 = _vm.__map(item1.childList_five, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m17 = _vm.getTypeList(item2.formula)
var m18 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m19 = !(item2.equipmentStart == 0)
var m19 = _vm.getTypeList(item2.formula)
var m20 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m21 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m17: m17,
m18: m18,
m19: m19,
m20: m20,
m21: m21,
}
})
var g11 = item1.childList_five.length
var l10 = _vm.__map(item1.childList_six, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m20 = _vm.getTypeList(item2.formula)
var m21 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m22 = !(item2.equipmentStart == 0)
var m22 = _vm.getTypeList(item2.formula)
var m23 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m24 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m20: m20,
m21: m21,
m22: m22,
m23: m23,
m24: m24,
}
})
var g12 = item1.childList_six.length
var l11 = _vm.__map(item1.childList_seven, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m23 = _vm.getTypeList(item2.formula)
var m24 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m25 = !(item2.equipmentStart == 0)
var m25 = _vm.getTypeList(item2.formula)
var m26 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m27 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m23: m23,
m24: m24,
m25: m25,
m26: m26,
m27: m27,
}
})
var g13 = item1.childList_seven.length
var l12 = _vm.__map(item1.childList_eight, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m26 = _vm.getTypeList(item2.formula)
var m27 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m28 = !(item2.equipmentStart == 0)
var m28 = _vm.getTypeList(item2.formula)
var m29 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m30 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m26: m26,
m27: m27,
m28: m28,
m29: m29,
m30: m30,
}
})
var g14 = item1.childList_eight.length
var l13 = _vm.__map(item1.childList_nine, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m29 = _vm.getTypeList(item2.formula)
var m30 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m31 = !(item2.equipmentStart == 0)
var m31 = _vm.getTypeList(item2.formula)
var m32 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m33 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m29: m29,
m30: m30,
m31: m31,
m32: m32,
m33: m33,
}
})
var g15 = item1.childList_nine.length
var l14 = _vm.__map(item1.childList_ten, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m32 = _vm.getTypeList(item2.formula)
var m33 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m34 = !(item2.equipmentStart == 0)
var m34 = _vm.getTypeList(item2.formula)
var m35 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m36 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m32: m32,
m33: m33,
m34: m34,
m35: m35,
m36: m36,
}
})
var g16 = item1.childList_ten.length
var l15 = _vm.__map(item1.childList_eleven, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m35 = _vm.getTypeList(item2.formula)
var m36 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m37 = !(item2.equipmentStart == 0)
var m37 = _vm.getTypeList(item2.formula)
var m38 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m39 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m35: m35,
m36: m36,
m37: m37,
m38: m38,
m39: m39,
}
})
var g17 = item1.childList_eleven.length
var l16 = _vm.__map(item1.childList_twelve, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m38 = _vm.getTypeList(item2.formula)
var m39 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m40 = !(item2.equipmentStart == 0)
var m40 = _vm.getTypeList(item2.formula)
var m41 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m42 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m38: m38,
m39: m39,
m40: m40,
m41: m41,
m42: m42,
}
})
var g18 = item1.childList_twelve.length
var l17 = _vm.__map(item1.childList_thirteen, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m41 = _vm.getTypeList(item2.formula)
var m42 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m43 = !(item2.equipmentStart == 0)
var m43 = _vm.getTypeList(item2.formula)
var m44 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m45 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m41: m41,
m42: m42,
m43: m43,
m44: m44,
m45: m45,
}
})
var g19 = item1.childList_thirteen.length
var l18 = _vm.__map(item1.childList_fourteen, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m44 = _vm.getTypeList(item2.formula)
var m45 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m46 = !(item2.equipmentStart == 0)
var m46 = _vm.getTypeList(item2.formula)
var m47 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m48 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m44: m44,
m45: m45,
m46: m46,
m47: m47,
m48: m48,
}
})
var g20 = item1.childList_fourteen.length
@ -1201,6 +1213,29 @@ var _default = {
});
});
// console.log(this.equipmentName30List,'this.equipmentName30List');
},
// 风向判定
getWindDirection: function getWindDirection(number) {
var num = Number(number);
if (num <= 67 && num >= 22) {
return '东北';
} else if (num > 67 && num < 112) {
return '东';
} else if (num >= 112 && num <= 157) {
return '东南';
} else if (num > 157 && num < 202) {
return '南';
} else if (num >= 202 && num <= 247) {
return '西南';
} else if (num > 247 && num < 292) {
return '西';
} else if (num >= 292 && num <= 337) {
return '西北';
} else if (num < 22) {
return '北';
} else if (num > 337) {
return '北';
}
}
}
};

File diff suppressed because one or more lines are too long