Commit 1d675900 by liuwange1

更改要暖色

parent 8d379460
......@@ -113,7 +113,7 @@ export default {
url: require("./assets/image/icon5.png"),
label: "智慧能耗",
routerName: "nengyuan",
menuCode: "NF",
menuCode: "NH",
},
{
url: require("./assets/image/icon6.png"),
......@@ -346,6 +346,8 @@ export default {
};
websocket.onmessage = function (event) {
console.log("event: ", event);
console.log(JSON.parse(event.data));
try {
let data = JSON.parse(event.data);
data.data.isNew = true;
......
......@@ -54,6 +54,7 @@
<div
class="btn2"
:class="{ active: monitorIndex == index }"
:style="{ color: '1px solid' + getColor(item.monitorStatus) }"
v-for="(item, index) in optionsList"
:key="index + 'list'"
@click="monitorChange(index)"
......@@ -141,7 +142,7 @@ export default {
return {
options: ["监控摄像头", "AI智能摄像头"],
optionKeys: ["CAMERA_MONITOR", "CAMERA_AI"],
optionActiveIndex: 0,
optionActiveIndex: -1,
osc: 11,
oscName: "/EZ_AF",
roadList: [],
......@@ -173,6 +174,17 @@ export default {
this.listL = buildList;
this.listR = this.listL[0].child || [];
},
getColor(type) {
if (type == "故障") {
return "red";
} else if (type == "异常") {
return "#dc68dc";
} else if (type == "离线") {
return "#c2c2c2";
} else {
return "";
}
},
changeOption(index) {
this.optionActiveIndex = index;
if (index) {
......
......@@ -36,6 +36,7 @@
class="btn2"
:class="{ active: activeIndex == index }"
v-for="(item, index) in equipmentList"
:style="{ color: '1px solid' + getColor(item.deviceStatus) }"
@click="equipmentClickHandle(index)"
:key="item.deviceStandCode"
>
......@@ -75,6 +76,17 @@ export default {
};
},
methods: {
getColor(type) {
if (type == "故障") {
return "red";
} else if (type == "异常") {
return "#dc68dc";
} else if (type == "离线") {
return "#c2c2c2";
} else {
return "";
}
},
changeOption(index) {
this.optionActiveIndex = index;
this.$axios
......
......@@ -35,6 +35,7 @@
<div
class="btn2"
:class="{ active: activeIndex == index }"
:style="{ color: '1px solid' + getColor(item.deviceStatus) }"
v-for="(item, index) in equipmentList"
@click="equipmentClickHandle(index)"
:key="item.deviceStandCode"
......@@ -72,6 +73,17 @@ export default {
},
created() {},
methods: {
getColor(type) {
if (type == "故障") {
return "red";
} else if (type == "异常") {
return "#dc68dc";
} else if (type == "离线") {
return "#c2c2c2";
} else {
return "";
}
},
changeOption(index) {
this.optionActiveIndex = index;
this.$axios
......
......@@ -35,6 +35,7 @@
<div
class="btn2 ww"
:class="{ active: activeIndex == index }"
:style="{ color: '1px solid' + getColor(item.deviceStatus) }"
v-for="(item, index) in equipmentList"
@click="equipmentClickHandle(index)"
:key="item.deviceStandCode"
......@@ -92,6 +93,17 @@ export default {
this.ids = e;
this.getEquipmentList();
},
getColor(type) {
if (type == "故障") {
return "red";
} else if (type == "异常") {
return "#dc68dc";
} else if (type == "离线") {
return "#c2c2c2";
} else {
return "";
}
},
changeOption(index) {
this.optionActiveIndex = index;
this.activeIndex = -1;
......
......@@ -30,6 +30,7 @@
class="btn2"
:class="{ active: activeIndex == index }"
v-for="(item, index) in equipmentList"
:style="{ color: '1px solid' + getColor(item.deviceStatus) }"
@click="equipmentClickHandle(index)"
:key="item.deviceStandCode"
>
......@@ -52,7 +53,21 @@ export default {
activeIndex: -1,
};
},
created() {
this.buildListChange({});
},
methods: {
getColor(type) {
if (type == "故障") {
return "red";
} else if (type == "异常") {
return "#dc68dc";
} else if (type == "离线") {
return "#c2c2c2";
} else {
return "";
}
},
changeOption(index) {
this.optionActiveIndex = index;
this.$axios
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment