Commit 7f40fe56 by zhangquan

提交代码

1 parent cb3b59d6
......@@ -76,7 +76,8 @@ export default {
// 指定图表的配置项和数据
var storedList = this.list;
const pointerData = this.list.length ? this.list[0].value : 0
console.log(pointerData);
console.log(pointerData,storedList, 'pointerData' , '---888----');
const alarmLevel = storedList[0] && storedList[0].alarmLevel ? storedList[0].alarmLevel : 0
this.option = {
backgroundColor: "",
series: [{
......@@ -103,7 +104,7 @@ export default {
fontSize: 12,
formatter: function(val) {
let value = ''
switch (storedList[0].alarmLevel / 1) {
switch (alarmLevel / 1) {
case 1:
value = '极高风险';
break;
......@@ -123,9 +124,9 @@ export default {
value = '无风险';
}
if (!storedList.length) {
return `无警情\n{b|${value}}`;
return `5级警情\n{b|${value}}`;
} else {
return `${storedList[0].alarmLevel}级警情\n{b|${value}}`;
return `${alarmLevel}级警情\n{b|${value}}`;
}
},
rich: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!