summaryrefslogtreecommitdiff
path: root/src/views/Fans/StaticInformation/FansStaticPage.vue
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-07-01 14:46:40 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-07-01 14:46:40 +0300
commitd686e23f1f4d7ab873d6d8631c84564b291364fa (patch)
tree290e4e6ae898784f4d7d4d51d9b57bd5a3583952 /src/views/Fans/StaticInformation/FansStaticPage.vue
parent42eec917d4181481b41e61f85766e45ab45a90ef (diff)
downloadwebui-vue-d686e23f1f4d7ab873d6d8631c84564b291364fa.tar.xz
add fans info
Diffstat (limited to 'src/views/Fans/StaticInformation/FansStaticPage.vue')
-rw-r--r--src/views/Fans/StaticInformation/FansStaticPage.vue38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/views/Fans/StaticInformation/FansStaticPage.vue b/src/views/Fans/StaticInformation/FansStaticPage.vue
index 7c5e6059..041046c1 100644
--- a/src/views/Fans/StaticInformation/FansStaticPage.vue
+++ b/src/views/Fans/StaticInformation/FansStaticPage.vue
@@ -10,7 +10,8 @@
responsive="md"
show-empty
class="bootstrap-rounded-table"
- :items="items"
+ :items="filteredSensors"
+ :busy="isBusy"
:fields="fields"
:empty-text="$t('global.table.emptyMessage')"
>
@@ -28,6 +29,9 @@
</span>
</div>
</template>
+ <template #cell(currentValue)="data">
+ {{ data.value }} {{ data.item.units }}
+ </template>
</b-table>
</page-section>
</b-container>
@@ -37,8 +41,12 @@
import PageTitle from '@/components/Global/PageTitle';
import PageSection from '@/components/Global/PageSection';
+import TableFilterMixin from '@/components/Mixins/TableFilterMixin';
+import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin';
+
export default {
components: { PageTitle, PageSection },
+ mixins: [TableFilterMixin, DataFormatterMixin],
data() {
return {
isBusy: true,
@@ -72,11 +80,11 @@ export default {
tdClass: 'regular-12px bootstrap-rounded-table__td',
},
{
- key: 'value',
+ key: 'currentValue',
label: 'Номинальная скорость, об/мин',
formatter: this.dataFormatter,
thClass: 'semi-bold-12px__caps bootstrap-rounded-table__head_bg',
- class: `bootstrap-rounded-table__column-last
+ class: `bootstrap-rounded-table__column-last
fans-table-col-third`,
tdClass: 'regular-12px bootstrap-rounded-table__td',
},
@@ -101,8 +109,32 @@ export default {
value: '2400',
},
],
+ activeFilters: [],
};
},
+
+ computed: {
+ allSensors() {
+ return this.$store.getters['sensors/sensors'];
+ },
+
+ filteredSensors() {
+ console.log('wow!');
+ console.log('this.allSensors!', this.allSensors);
+ console.log('this.activeFilters!', this.activeFilters);
+ console.log(
+ 'eeeeeeeeeeeeeee!',
+ this.getFilteredTableData(this.allSensors, this.activeFilters)
+ );
+ return this.getFilteredTableData(this.allSensors, this.activeFilters);
+ },
+ },
+
+ created() {
+ this.$store.dispatch('sensors/getAllSensors').finally(() => {
+ this.isBusy = false;
+ });
+ },
};
</script>
<style lang="scss">