|
@@ -32,21 +32,19 @@
|
|
|
<div class="scoll"> -->
|
|
|
<div class="matrix" v-if="showList.length > 0">
|
|
|
<box-select node=".box" @selectList="selectList">
|
|
|
-
|
|
|
- <!-- v-if="showWh(showList[0])" -->
|
|
|
+ <!-- v-if="showWh(showList[0])" -->
|
|
|
<MatrixBlock
|
|
|
- v-if="showWh(showList[0])"
|
|
|
- @choose-click="handleClick"
|
|
|
- @on-click="handleDetails"
|
|
|
- :dataList="showList"
|
|
|
+ @choose-click="handleClick"
|
|
|
+ @on-click="handleDetails"
|
|
|
+ :dataList="showList"
|
|
|
>
|
|
|
</MatrixBlock>
|
|
|
- <MatrixBlockPv
|
|
|
- v-else
|
|
|
+ <!-- <MatrixBlockPv
|
|
|
+ v-else
|
|
|
@on-click="handleDetialPv"
|
|
|
:dataList="showList"
|
|
|
>
|
|
|
- </MatrixBlockPv>
|
|
|
+ </MatrixBlockPv> -->
|
|
|
</box-select>
|
|
|
</div>
|
|
|
<!-- </div>
|
|
@@ -60,7 +58,11 @@
|
|
|
@close="handleClose"
|
|
|
:windturbine="currentWindturbine"
|
|
|
></WindturbineDetailPages>
|
|
|
- <PvDetailPages v-model="dialogPvDia" @close="handleClose" :windturbine="currentWindturbinePv">
|
|
|
+ <PvDetailPages
|
|
|
+ v-model="dialogPvDia"
|
|
|
+ @close="handleClose"
|
|
|
+ :windturbine="currentWindturbinePv"
|
|
|
+ >
|
|
|
</PvDetailPages>
|
|
|
<ParametersContrast
|
|
|
:chooseList="chooseList"
|
|
@@ -80,6 +82,8 @@ import api from "api/index";
|
|
|
import boxSelect from "components/boxSelect.vue";
|
|
|
import ParametersContrast from "./parametersContrast.vue";
|
|
|
import MessageBridge from "utils/MessageBridge";
|
|
|
+
|
|
|
+import dataJson from "./controlJson.json";
|
|
|
export default {
|
|
|
name: "ProblemArea",
|
|
|
components: {
|
|
@@ -160,21 +164,26 @@ export default {
|
|
|
},
|
|
|
computed: {},
|
|
|
created: function () {
|
|
|
- this.initData();
|
|
|
- this.handleWindturbineChange();
|
|
|
- this.controls();
|
|
|
- this.getLocks();
|
|
|
- this.intervals = setInterval(() =>{
|
|
|
- this.handleWindturbineChange
|
|
|
- }, 3000);
|
|
|
+ // this.initData();
|
|
|
+ // this.handleWindturbineChange();
|
|
|
+ // this.controls();
|
|
|
+ // this.getLocks();
|
|
|
+ // this.intervals = setInterval(() =>{
|
|
|
+ // this.handleWindturbineChange
|
|
|
+ // }, 3000);
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.showList = dataJson.showList;
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
showWh(item) {
|
|
|
- let show = false
|
|
|
- if (item.stationId) {
|
|
|
- show = true
|
|
|
- }
|
|
|
- return show
|
|
|
+ let show = false;
|
|
|
+ if (item.stationId) {
|
|
|
+ show = true;
|
|
|
+ }
|
|
|
+ return show;
|
|
|
},
|
|
|
selectList(val) {
|
|
|
val.forEach((item) => {
|
|
@@ -182,124 +191,135 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
controls() {
|
|
|
- this.options = [
|
|
|
- {
|
|
|
- value: "0",
|
|
|
- label: "问题设备",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "1",
|
|
|
- label: "故障",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "2",
|
|
|
- label: "维护",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "3",
|
|
|
- label: "离线",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "4",
|
|
|
- label: "挂牌",
|
|
|
- },
|
|
|
- ];
|
|
|
- let stationList = this.$store.state.stationList;
|
|
|
- stationList.forEach((item, index) => {
|
|
|
- if (item.id.indexOf("FDC") != -1 || item.id.indexOf("GDC") != -1) {
|
|
|
- let obj = {};
|
|
|
- obj.value = String(index + 6);
|
|
|
- obj.label = item.name;
|
|
|
- obj.stationId = item.code || item.id;
|
|
|
- this.options.push(obj);
|
|
|
- }
|
|
|
- });
|
|
|
- // let json = this.$store.state.windturbinelist;
|
|
|
- let wswind = JSON.parse(window.sessionStorage.getItem('windSbq'))
|
|
|
- let pv = JSON.parse(window.sessionStorage.getItem('pvSbq'))
|
|
|
- let json = {}
|
|
|
- if (wswind && pv) {
|
|
|
- json = {...wswind, ...pv}
|
|
|
- this.dataList = [];
|
|
|
- const showList = [];
|
|
|
- let arr = Object.keys(json).sort();
|
|
|
- for (let id of arr) {
|
|
|
- let val = json[id];
|
|
|
- this.chooseList.forEach((item) => {
|
|
|
- if (item.windturbineId === val.windturbineId) {
|
|
|
- val.active = true;
|
|
|
- }
|
|
|
- });
|
|
|
- this.dataList.push(val);
|
|
|
- switch (Number(this.selectValue)) {
|
|
|
- case 0:
|
|
|
- if (
|
|
|
- val.status === 5 ||
|
|
|
- val.status === 6 ||
|
|
|
- val.status === 7 ||
|
|
|
- val.lockValue > 0
|
|
|
- ) {
|
|
|
- showList.push(val);
|
|
|
- }
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- val.status === 5 ? showList.push(val) : "";
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- val.status === 6 ? showList.push(val) : "";
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- val.status === 7 ? showList.push(val) : "";
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- val.lockValue > 0 ? showList.push(val) : "";
|
|
|
- break;
|
|
|
- default:
|
|
|
- if (
|
|
|
- val.stationId ===
|
|
|
- this.options.filter((ops) => ops?.value === this.selectValue)[0]
|
|
|
- .stationId
|
|
|
- ) {
|
|
|
- showList.push(val);
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
+ this.options = [
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: "问题设备",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "故障",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "2",
|
|
|
+ label: "维护",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "3",
|
|
|
+ label: "离线",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "4",
|
|
|
+ label: "挂牌",
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ let stationList = this.$store.state.stationList;
|
|
|
+ stationList.forEach((item, index) => {
|
|
|
+ if (item.id.indexOf("FDC") != -1 || item.id.indexOf("GDC") != -1) {
|
|
|
+ let obj = {};
|
|
|
+ obj.value = String(index + 6);
|
|
|
+ obj.label = item.name;
|
|
|
+ obj.stationId = item.code || item.id;
|
|
|
+ this.options.push(obj);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // let json = this.$store.state.windturbinelist;
|
|
|
+ let wswind = JSON.parse(window.sessionStorage.getItem("windSbq"));
|
|
|
+ let pv = JSON.parse(window.sessionStorage.getItem("pvSbq"));
|
|
|
+ let json = {};
|
|
|
+ if (wswind && pv) {
|
|
|
+ json = { ...wswind, ...pv };
|
|
|
+ this.dataList = [];
|
|
|
+ const showList = [];
|
|
|
+ let arr = Object.keys(json).sort();
|
|
|
+ for (let id of arr) {
|
|
|
+ let val = json[id];
|
|
|
+ this.chooseList.forEach((item) => {
|
|
|
+ if (item.windturbineId === val.windturbineId) {
|
|
|
+ val.active = true;
|
|
|
}
|
|
|
- let checkoutList = BackgroundData.getInstance().checkouts;
|
|
|
- checkoutList.forEach((item) => {
|
|
|
- let showIndex = null;
|
|
|
- showList.forEach((param, index) => {
|
|
|
- if (item.windturbineId === param.windturbineId) {
|
|
|
- showIndex = index;
|
|
|
- }
|
|
|
- });
|
|
|
- showList.splice(showIndex, 1);
|
|
|
- });
|
|
|
- showList.sort((a,b)=>{
|
|
|
- let aSubString = '0', bSubString = '0'
|
|
|
- let aStation = '1', bStation = '2'
|
|
|
- if(a.windturbineId && b.windturbineId){
|
|
|
- aSubString = a.windturbineId.substring(a.windturbineId.lastIndexOf('_')+1)
|
|
|
- bSubString = b.windturbineId.substring(b.windturbineId.lastIndexOf('_')+1)
|
|
|
-
|
|
|
- aStation = a.windturbineId.substring(0, a.windturbineId.lastIndexOf('_'))
|
|
|
- bStation = b.windturbineId.substring(0, b.windturbineId.lastIndexOf('_'))
|
|
|
-
|
|
|
- }else if(a.id && b.id){
|
|
|
- aSubString = a.id.substring(a.id.lastIndexOf('_')+1)
|
|
|
- bSubString = b.id.substring(b.id.lastIndexOf('_')+1)
|
|
|
-
|
|
|
- aStation = a.id.substring(0, a.id.lastIndexOf('_'))
|
|
|
- bStation = b.id.substring(0, b.id.lastIndexOf('_'))
|
|
|
+ });
|
|
|
+ this.dataList.push(val);
|
|
|
+ switch (Number(this.selectValue)) {
|
|
|
+ case 0:
|
|
|
+ if (
|
|
|
+ val.status === 5 ||
|
|
|
+ val.status === 6 ||
|
|
|
+ val.status === 7 ||
|
|
|
+ val.lockValue > 0
|
|
|
+ ) {
|
|
|
+ showList.push(val);
|
|
|
}
|
|
|
- if(aStation === bStation){
|
|
|
- return parseInt(aSubString) - parseInt(bSubString)
|
|
|
- }else{
|
|
|
- return 0
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ val.status === 5 ? showList.push(val) : "";
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ val.status === 6 ? showList.push(val) : "";
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ val.status === 7 ? showList.push(val) : "";
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ val.lockValue > 0 ? showList.push(val) : "";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ if (
|
|
|
+ val.stationId ===
|
|
|
+ this.options.filter((ops) => ops?.value === this.selectValue)[0]
|
|
|
+ .stationId
|
|
|
+ ) {
|
|
|
+ showList.push(val);
|
|
|
}
|
|
|
- })
|
|
|
- this.showList = showList
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
+ let checkoutList = BackgroundData.getInstance().checkouts;
|
|
|
+ checkoutList.forEach((item) => {
|
|
|
+ let showIndex = null;
|
|
|
+ showList.forEach((param, index) => {
|
|
|
+ if (item.windturbineId === param.windturbineId) {
|
|
|
+ showIndex = index;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ showList.splice(showIndex, 1);
|
|
|
+ });
|
|
|
+ showList.sort((a, b) => {
|
|
|
+ let aSubString = "0",
|
|
|
+ bSubString = "0";
|
|
|
+ let aStation = "1",
|
|
|
+ bStation = "2";
|
|
|
+ if (a.windturbineId && b.windturbineId) {
|
|
|
+ aSubString = a.windturbineId.substring(
|
|
|
+ a.windturbineId.lastIndexOf("_") + 1
|
|
|
+ );
|
|
|
+ bSubString = b.windturbineId.substring(
|
|
|
+ b.windturbineId.lastIndexOf("_") + 1
|
|
|
+ );
|
|
|
+
|
|
|
+ aStation = a.windturbineId.substring(
|
|
|
+ 0,
|
|
|
+ a.windturbineId.lastIndexOf("_")
|
|
|
+ );
|
|
|
+ bStation = b.windturbineId.substring(
|
|
|
+ 0,
|
|
|
+ b.windturbineId.lastIndexOf("_")
|
|
|
+ );
|
|
|
+ } else if (a.id && b.id) {
|
|
|
+ aSubString = a.id.substring(a.id.lastIndexOf("_") + 1);
|
|
|
+ bSubString = b.id.substring(b.id.lastIndexOf("_") + 1);
|
|
|
+
|
|
|
+ aStation = a.id.substring(0, a.id.lastIndexOf("_"));
|
|
|
+ bStation = b.id.substring(0, b.id.lastIndexOf("_"));
|
|
|
+ }
|
|
|
+ if (aStation === bStation) {
|
|
|
+ return parseInt(aSubString) - parseInt(bSubString);
|
|
|
+ } else {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.showList = showList;
|
|
|
+ }
|
|
|
},
|
|
|
getLocks() {
|
|
|
api.getCustomerLock().then((res) => {
|
|
@@ -309,11 +329,11 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
initData: function () {
|
|
|
- let mb = MessageBridge.getInstance();
|
|
|
- let vss = [
|
|
|
- { key: "/topic/voice-control", action: this.windturbineMessage },
|
|
|
- ];
|
|
|
- mb.register(vss);
|
|
|
+ let mb = MessageBridge.getInstance();
|
|
|
+ let vss = [
|
|
|
+ { key: "/topic/voice-control", action: this.windturbineMessage },
|
|
|
+ ];
|
|
|
+ mb.register(vss);
|
|
|
},
|
|
|
windturbineMessage(msg) {
|
|
|
if (this.$store.state.current === 2) {
|
|
@@ -331,7 +351,7 @@ export default {
|
|
|
this.dialogVisible = true;
|
|
|
} else if (arr[0] === "CLOSE") {
|
|
|
this.dialogVisible = false;
|
|
|
- } else if (
|
|
|
+ } else if (
|
|
|
arr[0] === "CONTROL_START" ||
|
|
|
arr[0] === "CONTROL_STOP" ||
|
|
|
arr[0] === "CONTROL_MAINTAIN"
|
|
@@ -764,57 +784,68 @@ export default {
|
|
|
break;
|
|
|
default:
|
|
|
if (Number(this.selectValue) < 12) {
|
|
|
- if (
|
|
|
- val.stationId ===
|
|
|
- this.options.filter((ops) => ops?.value === this.selectValue)[0]
|
|
|
- .stationId
|
|
|
- ) {
|
|
|
- showList.push(val);
|
|
|
- }
|
|
|
+ if (
|
|
|
+ val.stationId ===
|
|
|
+ this.options.filter((ops) => ops?.value === this.selectValue)[0]
|
|
|
+ .stationId
|
|
|
+ ) {
|
|
|
+ showList.push(val);
|
|
|
+ }
|
|
|
} else {
|
|
|
- if (
|
|
|
- val.station ===
|
|
|
- this.options.filter((ops) => ops?.value === this.selectValue)[0]
|
|
|
- .stationId
|
|
|
- ) {
|
|
|
- showList.push(val);
|
|
|
- }
|
|
|
+ if (
|
|
|
+ val.station ===
|
|
|
+ this.options.filter((ops) => ops?.value === this.selectValue)[0]
|
|
|
+ .stationId
|
|
|
+ ) {
|
|
|
+ showList.push(val);
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
});
|
|
|
- showList.sort((a,b)=>{
|
|
|
- let aSubString = '0', bSubString = '0'
|
|
|
- let aStation = '1', bStation = '2'
|
|
|
- if(a.windturbineId && b.windturbineId){
|
|
|
- aSubString = a.windturbineId.substring(a.windturbineId.lastIndexOf('_')+1)
|
|
|
- bSubString = b.windturbineId.substring(b.windturbineId.lastIndexOf('_')+1)
|
|
|
+ showList.sort((a, b) => {
|
|
|
+ let aSubString = "0",
|
|
|
+ bSubString = "0";
|
|
|
+ let aStation = "1",
|
|
|
+ bStation = "2";
|
|
|
+ if (a.windturbineId && b.windturbineId) {
|
|
|
+ aSubString = a.windturbineId.substring(
|
|
|
+ a.windturbineId.lastIndexOf("_") + 1
|
|
|
+ );
|
|
|
+ bSubString = b.windturbineId.substring(
|
|
|
+ b.windturbineId.lastIndexOf("_") + 1
|
|
|
+ );
|
|
|
|
|
|
- aStation = a.windturbineId.substring(0, a.windturbineId.lastIndexOf('_'))
|
|
|
- bStation = b.windturbineId.substring(0, b.windturbineId.lastIndexOf('_'))
|
|
|
+ aStation = a.windturbineId.substring(
|
|
|
+ 0,
|
|
|
+ a.windturbineId.lastIndexOf("_")
|
|
|
+ );
|
|
|
+ bStation = b.windturbineId.substring(
|
|
|
+ 0,
|
|
|
+ b.windturbineId.lastIndexOf("_")
|
|
|
+ );
|
|
|
+ } else if (a.id && b.id) {
|
|
|
+ aSubString = a.id.substring(a.id.lastIndexOf("_") + 1);
|
|
|
+ bSubString = b.id.substring(b.id.lastIndexOf("_") + 1);
|
|
|
|
|
|
- }else if(a.id && b.id){
|
|
|
- aSubString = a.id.substring(a.id.lastIndexOf('_')+1)
|
|
|
- bSubString = b.id.substring(b.id.lastIndexOf('_')+1)
|
|
|
-
|
|
|
- aStation = a.id.substring(0, a.id.lastIndexOf('_'))
|
|
|
- bStation = b.id.substring(0, b.id.lastIndexOf('_'))
|
|
|
+ aStation = a.id.substring(0, a.id.lastIndexOf("_"));
|
|
|
+ bStation = b.id.substring(0, b.id.lastIndexOf("_"));
|
|
|
}
|
|
|
- if(aStation === bStation){
|
|
|
- return parseInt(aSubString) - parseInt(bSubString)
|
|
|
- }else{
|
|
|
- return 0
|
|
|
+ if (aStation === bStation) {
|
|
|
+ return parseInt(aSubString) - parseInt(bSubString);
|
|
|
+ } else {
|
|
|
+ return 0;
|
|
|
}
|
|
|
- })
|
|
|
- this.showList = showList
|
|
|
+ });
|
|
|
+ this.showList = showList;
|
|
|
},
|
|
|
handleDetails(itm) {
|
|
|
this.dialogVisible = true;
|
|
|
this.currentWindturbine = itm;
|
|
|
},
|
|
|
handleDetialPv(item) {
|
|
|
- this.dialogPvDia = true;
|
|
|
- this.currentWindturbinePv = item;
|
|
|
+ this.dialogPvDia = true;
|
|
|
+ this.currentWindturbinePv = item;
|
|
|
},
|
|
|
handleClose() {
|
|
|
this.dialogVisible = false;
|
|
@@ -827,150 +858,158 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleWindturbineChange() {
|
|
|
- let ws = MessageBridge.getInstance();
|
|
|
- let wind = [
|
|
|
- { key: "/topic/windturbine", action: this.getWindMsg },
|
|
|
- ];
|
|
|
- let guangfu = [
|
|
|
- { key: "/topic/pv", action: this.getPvMsg },
|
|
|
- ];
|
|
|
- ws.register(wind);
|
|
|
- ws.register(guangfu);
|
|
|
+ let ws = MessageBridge.getInstance();
|
|
|
+ let wind = [{ key: "/topic/windturbine", action: this.getWindMsg }];
|
|
|
+ let guangfu = [{ key: "/topic/pv", action: this.getPvMsg }];
|
|
|
+ ws.register(wind);
|
|
|
+ ws.register(guangfu);
|
|
|
},
|
|
|
getPvMsg(msg) {
|
|
|
- window.sessionStorage.removeItem('pvSbq')
|
|
|
- // let jsonMsg = JSON.parse(msg)
|
|
|
- window.sessionStorage.setItem('pvSbq', msg)
|
|
|
- this.changeData()
|
|
|
+ window.sessionStorage.removeItem("pvSbq");
|
|
|
+ // let jsonMsg = JSON.parse(msg)
|
|
|
+ window.sessionStorage.setItem("pvSbq", msg);
|
|
|
+ this.changeData();
|
|
|
},
|
|
|
getWindMsg(msg) {
|
|
|
- window.sessionStorage.removeItem('windSbq')
|
|
|
- // let jsonMsg = JSON.parse(msg)
|
|
|
- window.sessionStorage.setItem('windSbq', msg)
|
|
|
- this.changeData()
|
|
|
+ window.sessionStorage.removeItem("windSbq");
|
|
|
+ // let jsonMsg = JSON.parse(msg)
|
|
|
+ window.sessionStorage.setItem("windSbq", msg);
|
|
|
+ this.changeData();
|
|
|
},
|
|
|
changeData() {
|
|
|
- let wswind = JSON.parse(window.sessionStorage.getItem('windSbq'))
|
|
|
- let pv = JSON.parse(window.sessionStorage.getItem('pvSbq'))
|
|
|
- let msg = {}
|
|
|
- if (wswind || pv) {
|
|
|
- msg = {...wswind}
|
|
|
- if(pv){
|
|
|
- msg = {...msg, ...pv}
|
|
|
+ let wswind = JSON.parse(window.sessionStorage.getItem("windSbq"));
|
|
|
+ let pv = JSON.parse(window.sessionStorage.getItem("pvSbq"));
|
|
|
+ let msg = {};
|
|
|
+ if (wswind || pv) {
|
|
|
+ msg = { ...wswind };
|
|
|
+ if (pv) {
|
|
|
+ msg = { ...msg, ...pv };
|
|
|
+ }
|
|
|
+ this.windturbinelist = msg;
|
|
|
+ this.$store.commit("windturbinelist", msg);
|
|
|
+ this.dataList = [];
|
|
|
+ const showList = [];
|
|
|
+ let arr = Object.keys(msg).sort();
|
|
|
+ let newArr = [];
|
|
|
+ for (let id of arr) {
|
|
|
+ let val = msg[id];
|
|
|
+ newArr.push(val);
|
|
|
+ this.chooseList.forEach((item) => {
|
|
|
+ if (item.windturbineId === val.windturbineId) {
|
|
|
+ val.active = true;
|
|
|
}
|
|
|
- this.windturbinelist = msg;
|
|
|
- this.$store.commit("windturbinelist", msg);
|
|
|
- this.dataList = [];
|
|
|
- const showList = [];
|
|
|
- let arr = Object.keys(msg).sort();
|
|
|
- let newArr = [];
|
|
|
- for (let id of arr) {
|
|
|
- let val = msg[id];
|
|
|
- newArr.push(val);
|
|
|
- this.chooseList.forEach((item) => {
|
|
|
- if (item.windturbineId === val.windturbineId) {
|
|
|
- val.active = true;
|
|
|
- }
|
|
|
- });
|
|
|
- if (val.lockValue === 9) {
|
|
|
- val.lockValues = this.lockValues.filter(
|
|
|
- (item) => val.windturbineId === item.windturbineID
|
|
|
- )[0]?.value;
|
|
|
- }
|
|
|
- this.dataList.push(val);
|
|
|
- switch (Number(this.selectValue)) {
|
|
|
- case 0:
|
|
|
- if (
|
|
|
- val.status === 5 ||
|
|
|
- val.status === 6 ||
|
|
|
- val.status === 7 ||
|
|
|
- val.lockValue > 0
|
|
|
- ) {
|
|
|
- showList.push(val);
|
|
|
- }
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- val.status === 5 ? showList.push(val) : "";
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- val.status === 6 ? showList.push(val) : "";
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- val.status === 7 ? showList.push(val) : "";
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- val.lockValue > 0 ? showList.push(val) : "";
|
|
|
- break;
|
|
|
+ });
|
|
|
+ if (val.lockValue === 9) {
|
|
|
+ val.lockValues = this.lockValues.filter(
|
|
|
+ (item) => val.windturbineId === item.windturbineID
|
|
|
+ )[0]?.value;
|
|
|
+ }
|
|
|
+ this.dataList.push(val);
|
|
|
+ switch (Number(this.selectValue)) {
|
|
|
+ case 0:
|
|
|
+ if (
|
|
|
+ val.status === 5 ||
|
|
|
+ val.status === 6 ||
|
|
|
+ val.status === 7 ||
|
|
|
+ val.lockValue > 0
|
|
|
+ ) {
|
|
|
+ showList.push(val);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ val.status === 5 ? showList.push(val) : "";
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ val.status === 6 ? showList.push(val) : "";
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ val.status === 7 ? showList.push(val) : "";
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ val.lockValue > 0 ? showList.push(val) : "";
|
|
|
+ break;
|
|
|
|
|
|
- default:
|
|
|
- // if (
|
|
|
- // val.stationId ===
|
|
|
- // this.options.filter(
|
|
|
- // (ops) => ops?.value === this.selectValue
|
|
|
- // )[0].stationId
|
|
|
- // ) {
|
|
|
- // this.showList.push(val);
|
|
|
- // }
|
|
|
- if (Number(this.selectValue) < 12) {
|
|
|
- if (
|
|
|
- val.stationId ===
|
|
|
- this.options.filter((ops) => ops?.value === this.selectValue)[0]
|
|
|
- .stationId
|
|
|
- ) {
|
|
|
- showList.push(val);
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (
|
|
|
- val.station ===
|
|
|
- this.options.filter((ops) => ops?.value === this.selectValue)[0]
|
|
|
- .stationId
|
|
|
- ) {
|
|
|
- showList.push(val);
|
|
|
- }
|
|
|
- }
|
|
|
- break;
|
|
|
+ default:
|
|
|
+ // if (
|
|
|
+ // val.stationId ===
|
|
|
+ // this.options.filter(
|
|
|
+ // (ops) => ops?.value === this.selectValue
|
|
|
+ // )[0].stationId
|
|
|
+ // ) {
|
|
|
+ // this.showList.push(val);
|
|
|
+ // }
|
|
|
+ if (Number(this.selectValue) < 12) {
|
|
|
+ if (
|
|
|
+ val.stationId ===
|
|
|
+ this.options.filter(
|
|
|
+ (ops) => ops?.value === this.selectValue
|
|
|
+ )[0].stationId
|
|
|
+ ) {
|
|
|
+ showList.push(val);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (
|
|
|
+ val.station ===
|
|
|
+ this.options.filter(
|
|
|
+ (ops) => ops?.value === this.selectValue
|
|
|
+ )[0].stationId
|
|
|
+ ) {
|
|
|
+ showList.push(val);
|
|
|
}
|
|
|
- }
|
|
|
- // console.log('showList', this.showList)
|
|
|
- let checkoutList = BackgroundData.getInstance().checkouts;
|
|
|
- if (checkoutList.length>0) {
|
|
|
- checkoutList.forEach((item) => {
|
|
|
- let showIndex = null;
|
|
|
- showList.forEach((param, index) => {
|
|
|
- if (item.windturbineId === param.windturbineId) {
|
|
|
- showIndex = index;
|
|
|
- }
|
|
|
- });
|
|
|
- showList.splice(showIndex, 1);
|
|
|
- });
|
|
|
- }
|
|
|
- showList.sort((a,b)=>{
|
|
|
- let aSubString = '0', bSubString = '0'
|
|
|
- let aStation = '1', bStation = '2'
|
|
|
- if(a.windturbineId && b.windturbineId){
|
|
|
- aSubString = a.windturbineId.substring(a.windturbineId.lastIndexOf('_')+1)
|
|
|
- bSubString = b.windturbineId.substring(b.windturbineId.lastIndexOf('_')+1)
|
|
|
-
|
|
|
- aStation = a.windturbineId.substring(0, a.windturbineId.lastIndexOf('_'))
|
|
|
- bStation = b.windturbineId.substring(0, b.windturbineId.lastIndexOf('_'))
|
|
|
-
|
|
|
- }else if(a.id && b.id){
|
|
|
- aSubString = a.id.substring(a.id.lastIndexOf('_')+1)
|
|
|
- bSubString = b.id.substring(b.id.lastIndexOf('_')+1)
|
|
|
-
|
|
|
- aStation = a.id.substring(0, a.id.lastIndexOf('_'))
|
|
|
- bStation = b.id.substring(0, b.id.lastIndexOf('_'))
|
|
|
}
|
|
|
- if(aStation === bStation){
|
|
|
- return parseInt(aSubString) - parseInt(bSubString)
|
|
|
- }else{
|
|
|
- return 0
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // console.log('showList', this.showList)
|
|
|
+ let checkoutList = BackgroundData.getInstance().checkouts;
|
|
|
+ if (checkoutList.length > 0) {
|
|
|
+ checkoutList.forEach((item) => {
|
|
|
+ let showIndex = null;
|
|
|
+ showList.forEach((param, index) => {
|
|
|
+ if (item.windturbineId === param.windturbineId) {
|
|
|
+ showIndex = index;
|
|
|
}
|
|
|
- })
|
|
|
- this.showList = showList
|
|
|
-
|
|
|
+ });
|
|
|
+ showList.splice(showIndex, 1);
|
|
|
+ });
|
|
|
}
|
|
|
- }
|
|
|
+ showList.sort((a, b) => {
|
|
|
+ let aSubString = "0",
|
|
|
+ bSubString = "0";
|
|
|
+ let aStation = "1",
|
|
|
+ bStation = "2";
|
|
|
+ if (a.windturbineId && b.windturbineId) {
|
|
|
+ aSubString = a.windturbineId.substring(
|
|
|
+ a.windturbineId.lastIndexOf("_") + 1
|
|
|
+ );
|
|
|
+ bSubString = b.windturbineId.substring(
|
|
|
+ b.windturbineId.lastIndexOf("_") + 1
|
|
|
+ );
|
|
|
+
|
|
|
+ aStation = a.windturbineId.substring(
|
|
|
+ 0,
|
|
|
+ a.windturbineId.lastIndexOf("_")
|
|
|
+ );
|
|
|
+ bStation = b.windturbineId.substring(
|
|
|
+ 0,
|
|
|
+ b.windturbineId.lastIndexOf("_")
|
|
|
+ );
|
|
|
+ } else if (a.id && b.id) {
|
|
|
+ aSubString = a.id.substring(a.id.lastIndexOf("_") + 1);
|
|
|
+ bSubString = b.id.substring(b.id.lastIndexOf("_") + 1);
|
|
|
+
|
|
|
+ aStation = a.id.substring(0, a.id.lastIndexOf("_"));
|
|
|
+ bStation = b.id.substring(0, b.id.lastIndexOf("_"));
|
|
|
+ }
|
|
|
+ if (aStation === bStation) {
|
|
|
+ return parseInt(aSubString) - parseInt(bSubString);
|
|
|
+ } else {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.showList = showList;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
unmounted() {
|
|
|
clearInterval(this.intervals);
|