Fix IO visible
This commit is contained in:
+13
@@ -41,4 +41,17 @@ export default class IO extends Vue {
|
||||
|
||||
}
|
||||
|
||||
isConfigVisible(group,bankid){
|
||||
var vis = false;
|
||||
var it = this.items[group].filter(i => i.bank == bankid);
|
||||
|
||||
for (let index = 0; index < it.length; index++) {
|
||||
if(it[index].visible){
|
||||
vis = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return vis
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -9,6 +9,7 @@
|
||||
@click="scrollto(true,`input-${group}-${inputid}`)"
|
||||
class="upper"
|
||||
v-for="(inputid, idx2) in config[group]"
|
||||
v-if="isConfigVisible(group,inputid)"
|
||||
:key="`h-${idx}-${idx2}`"
|
||||
>{{`${group} ${inputid}`}}</a>
|
||||
</template>
|
||||
@@ -24,6 +25,7 @@
|
||||
@click="scrollto(false,`output-${group}-${inputid}`)"
|
||||
class="upper"
|
||||
v-for="(inputid, idx2) in config[group]"
|
||||
v-if="isConfigVisible(group,inputid)"
|
||||
:key="`h-${idx}-${idx2}`"
|
||||
>{{`${group} ${inputid}`}}</a>
|
||||
</template>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<tr>
|
||||
<tr v-if="item.visible">
|
||||
<td class="pointer">
|
||||
<button class="pointer" @click="$emit('click')">
|
||||
<img
|
||||
|
||||
+14
@@ -32,4 +32,18 @@ export default class InputTable extends Vue {
|
||||
get config(): { [id: string]: number[] } {
|
||||
return store.state.underTheHood.ioChannelsConfig;
|
||||
}
|
||||
|
||||
isConfigVisible(group,bankid){
|
||||
var vis = false;
|
||||
var it = this.items[group].filter(i => i.bank == bankid);
|
||||
|
||||
for (let index = 0; index < it.length; index++) {
|
||||
if(it[index].visible){
|
||||
vis = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return vis
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
|
||||
<template v-for="(group, idx) in ['di','ai']">
|
||||
<template v-for="(bankid, idx2) in config[group]">
|
||||
<tr class="group-row" :key="`h-${idx}-${idx2}`" :id="`input-${group}-${bankid}`" >
|
||||
<tr class="group-row" :key="`h-${idx}-${idx2}`" :id="`input-${group}-${bankid}`" v-if="isConfigVisible(group,bankid)" >
|
||||
<td colspan="6">{{ `${group} ${bankid}`}}</td>
|
||||
</tr>
|
||||
<input-row
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<tr>
|
||||
<tr v-if="item.visible">
|
||||
<td class="pointer">
|
||||
<button class="pointer" @click="$emit('click')">
|
||||
<img
|
||||
|
||||
+13
@@ -31,4 +31,17 @@ export default class OutputTable extends Vue {
|
||||
get config(): { [id: string]: number[] } {
|
||||
return store.state.underTheHood.ioChannelsConfig;
|
||||
}
|
||||
|
||||
isConfigVisible(group,bankid){
|
||||
var vis = false;
|
||||
var it = this.items[group].filter(i => i.bank == bankid);
|
||||
|
||||
for (let index = 0; index < it.length; index++) {
|
||||
if(it[index].visible){
|
||||
vis = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return vis
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -29,9 +29,9 @@
|
||||
</template>
|
||||
|
||||
<template v-for="(group, idx) in ['do','ao']">
|
||||
<template v-for="(bankid, idx2) in config[group]">
|
||||
<template v-for="(bankid, idx2) in config[group]" >
|
||||
<tr class="group-row" :key="`h-${idx}-${idx2}`"
|
||||
:id="`output-${group}-${bankid}`">
|
||||
:id="`output-${group}-${bankid}`" v-if="isConfigVisible(group,bankid)">
|
||||
<td colspan="7">{{ `${group} ${bankid}`}}</td>
|
||||
</tr>
|
||||
<output-row
|
||||
|
||||
Reference in New Issue
Block a user