|
@@ -294,6 +294,7 @@ export default {
|
|
|
wpId: undefined,
|
|
|
wpnumMap: {}, //风机监视数量
|
|
|
wpInfoMap: {}, //风机详情
|
|
|
+ fjmap: [], // 风机名
|
|
|
selectIndex: 0,
|
|
|
rowIndex: 0,
|
|
|
btnGroups: [
|
|
@@ -321,15 +322,13 @@ export default {
|
|
|
mapToolIndex: 0,
|
|
|
fans: [],
|
|
|
colors: {
|
|
|
- dj: ["#05bb4c", "#4ad476", "#9fedb2"],
|
|
|
- yx: ["#4b55ae", "#959dc7", "#d3d6e0"],
|
|
|
- xd: ["#c531c7", "#e080dc", "#fadef7"],
|
|
|
- xdStop: ["#c531c7", "#e080dc", "#fadef7"],
|
|
|
- gz: ["#BA3237", "#d4807d", "#eddad8"],
|
|
|
-
|
|
|
- jx: ["#e17e23", "#fabf78", "#ffebcc"],
|
|
|
- lx: ["#606769", "#757575", "#AFAFAF"],
|
|
|
- sl: ["#ffffff", "#D8D8D8", "#D8D8D8"],
|
|
|
+ "0": ["#05bb4c", "#4ad476", "#9fedb2"],
|
|
|
+ "1": ["#4b55ae", "#959dc7", "#d3d6e0"],
|
|
|
+ "2": ["#BA3237", "#d4807d", "#eddad8"],
|
|
|
+ "3": ["#606769", "#757575", "#AFAFAF"],
|
|
|
+ "4": ["#e17e23", "#fabf78", "#ffebcc"],
|
|
|
+ "5": ["#c531c7", "#e080dc", "#fadef7"],
|
|
|
+ "6": ["#c531c7", "#e080dc", "#fadef7"],
|
|
|
},
|
|
|
syzImg: require("@assets/png/booster-station.png"),
|
|
|
};
|
|
@@ -340,7 +339,6 @@ export default {
|
|
|
that.$nextTick(() => {
|
|
|
that.getWp();
|
|
|
that.requestData();
|
|
|
- that.requestInfo();
|
|
|
});
|
|
|
},
|
|
|
// 函数
|
|
@@ -399,24 +397,11 @@ export default {
|
|
|
if (res.code == 200) {
|
|
|
that.wpnumMap = res.data.fczbmap.jczbmap;
|
|
|
that.wpInfoMap = res.data.wxssmap;
|
|
|
+ that.fjmap = res.data.fjmap[0];
|
|
|
}
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
- // 风机详情
|
|
|
- requestInfo() {
|
|
|
- let that = this;
|
|
|
- that.API.requestData({
|
|
|
- method: "POST",
|
|
|
- subUrl: "monitor/findGeneralAppearance",
|
|
|
- data: {
|
|
|
- wpId: that.wpId,
|
|
|
- },
|
|
|
- success(res) {
|
|
|
- if (res.code == 200) that.wpnumMap = res.data.fczbmap.jczbmap;
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
renderBtnActiveIndex() {
|
|
|
this.btnGroups.forEach((pEle, pIndex) => {
|
|
|
pEle.btns.forEach((cEle, cIndex) => {
|
|
@@ -429,39 +414,46 @@ export default {
|
|
|
},
|
|
|
when: function () {
|
|
|
let jsonObj = dataService.get("arcgis-nx-fc1");
|
|
|
- let data = [
|
|
|
- { id: "MG13", state: "yx" },
|
|
|
- { id: "MG12", state: "xd" },
|
|
|
- { id: "MG20", state: "xdStop" },
|
|
|
- { id: "MG34", state: "gz" },
|
|
|
- { id: "MG39", state: "jx" },
|
|
|
- { id: "MG02", state: "lx" },
|
|
|
- { id: "MG19", state: "sl" },
|
|
|
- ];
|
|
|
this.fans = jsonObj;
|
|
|
jsonObj.forEach((item) => {
|
|
|
- let obj = data.find((t) => t.id == item.attributes.code);
|
|
|
+ let obj = this.fjmap.find((t) => {
|
|
|
+ let wtid = t.wtId.replace("01_","");
|
|
|
+ if (wtid == item.attributes.code) return t
|
|
|
+ });
|
|
|
if (obj) {
|
|
|
- item.attributes.state = obj.state;
|
|
|
+ item.attributes.state = String(obj.fjzt);
|
|
|
} else {
|
|
|
- item.attributes.state = "dj";
|
|
|
+ item.attributes.state = "4";
|
|
|
}
|
|
|
switch (item.attributes.state) {
|
|
|
- case "yx":
|
|
|
+ case "0": //待机
|
|
|
+ item.attributes.rotate = false; // 转
|
|
|
+ item.attributes.dur = 8; // 转一圈时间
|
|
|
+ break;
|
|
|
+ case "1": //运行
|
|
|
item.attributes.rotate = true; // 转
|
|
|
- item.attributes.dur = 4; // 转一圈时间
|
|
|
+ item.attributes.dur = 2; // 转一圈时间
|
|
|
break;
|
|
|
-
|
|
|
- case "xd":
|
|
|
- item.attributes.rotate = true;
|
|
|
+ case "2": //故障
|
|
|
+ item.attributes.rotate = false; // 不转
|
|
|
item.attributes.dur = 8;
|
|
|
break;
|
|
|
-
|
|
|
- case "xdStop":
|
|
|
+ case "3": //中断
|
|
|
item.attributes.rotate = false; // 不转
|
|
|
item.attributes.dur = 8;
|
|
|
- break;
|
|
|
-
|
|
|
+ break;
|
|
|
+ case "4": //维护
|
|
|
+ item.attributes.rotate = false; // 不转
|
|
|
+ item.attributes.dur = 8;
|
|
|
+ break;
|
|
|
+ case "5": //限电
|
|
|
+ item.attributes.rotate = true; // 转
|
|
|
+ item.attributes.dur = 6;
|
|
|
+ break;
|
|
|
+ case "6": //停机
|
|
|
+ item.attributes.rotate = false; // 不转
|
|
|
+ item.attributes.dur = 8;
|
|
|
+ break;
|
|
|
default:
|
|
|
item.attributes.rotate = false;
|
|
|
item.attributes.dur = 8;
|