Commit 5323cfba by 匡雅琴

bug修复

1 parent f2c505fc
......@@ -76,6 +76,7 @@ export default {
// 指定图表的配置项和数据
var storedList = this.list;
const pointerData = this.list.length ? this.list[0].value : 0
console.log(pointerData);
this.option = {
backgroundColor: "",
series: [{
......@@ -102,20 +103,20 @@ export default {
fontSize: 12,
formatter: function(val) {
let value = ''
switch (pointerData) {
case 100:
switch (storedList[0].alarmLevel / 1) {
case 1:
value = '极高风险';
break;
case 80:
case 2:
value = '高风险';
break;
case 60:
case 3:
value = '中风险';
break;
case 40:
case 4:
value = '低风险';
break;
case 20:
case 5:
value = '安全';
break;
default:
......
......@@ -674,21 +674,6 @@ export default {
MONITOR_SERVICE.getVehicleTree({
termType: 2,
term: this.$route.query.vin,
}).then((res) => {
let list = res.data || [];
if (!list || list.length <= 0) {
return false;
}
// 跳转到风险评估页面获取有线设备还是无线设备还是两者结合
// 有线设备或者有线+无线组合都正常展示按钮sourceType-1,否则就是0
// let sourceType = 0
list.forEach(item => {
if (item.source == '有线') this.sourceType = 1
})
});
MONITOR_SERVICE.getVehicleTree({
termType: 2,
term: this.$route.query.vin,
returnTrees: true,
}).then((res) => {
const items = res.data;
......@@ -791,12 +776,6 @@ export default {
if (!list || list.length <= 0) {
return false;
}
// 跳转到风险评估页面获取有线设备还是无线设备还是两者结合
// 有线设备或者有线+无线组合都正常展示按钮sourceType-1,否则就是0
// let sourceType = 0
list.forEach(item => {
if (item.source == '有线') this.sourceType = 1
})
this.vidCode = list[0].vid;
for (var i = 0, len = list.length; i < len; i++) {
_this.handleSelect(list[i]);
......
......@@ -527,10 +527,10 @@ MapService.prototype = {
}
}
// 跳转到风险评估页面 无线设备不显示按钮 sourceType:1有线组合,其他无线
// 跳转到风险评估页面 无线设备不显示按钮 info.deviceCompose=010/020/011/012/013/022,需要有风险评估按钮出现
let riskBtn = infoDiv.querySelector('[data-risk]');
if (riskBtn) {
if (info.sourceType != 1) {
if (info.deviceCompose != '010' && info.deviceCompose != '020' && info.deviceCompose != '011' && info.deviceCompose != '012' && info.deviceCompose != '013' && info.deviceCompose != '022') {
riskBtn.classList.add('resident_btn_hidden');
}
riskBtn.onclick = function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!