summaryrefslogtreecommitdiff
path: root/src/views/_sila/PowerSupplies/Specification/PowerStaticPage.vue
blob: 10bf1457dea900f083c837fdbf2439731cdcc708 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<template>
  <b-container
    :style="{ display: 'flex', 'flex-direction': 'column' }"
    fluid="xxl pt-0 m-0"
  >
    <page-title :description="$t('appNavigation.specification')" />
    <page-section class="bootstrap-table__section info_section">
      <span class="bold-16px">{{ $t('pageInventory.powerSources') }}</span>
    </page-section>
    <data-tabs
      :slots="sourceSlots"
      :switch-tab="switchSourceSlot"
      :current-tab="currentSourceSlot"
      :slot-width="100"
      :slider-width="68"
    />
    <page-section class="bootstrap-table__section">
      <b-table
        responsive="md"
        show-empty
        class="table-rounded"
        no-border-collapse
        :items="items_slots"
        :fields="fields"
        :empty-text="$t('global.table.emptyMessage')"
      >
        <template #cell(value)="{ index, value }">
          <b-row v-if="index === 0">
            <b-col cols="11">
              <span>
                {{ 'Работоспособность' }}
              </span>
            </b-col>
            <b-col cols="1">
              <img src="@/assets/images/status/on.svg" class="icon-chevron" />
            </b-col>
          </b-row>
          <b-row v-else>
            <b-col>
              <span>{{ value }}</span>
            </b-col>
          </b-row>
        </template>
      </b-table>
    </page-section>
  </b-container>
</template>

<script>
import PageTitle from '@/components/Global/PageTitle';
import PageSection from '@/components/Global/PageSection';
import DataTabs from '@/components/Global/SilaComponents/DataTabs';

export default {
  components: { PageTitle, PageSection, DataTabs },
  data() {
    return {
      currentSourceSlot: 1,
      sourceSlots: [
        { id: 1, name: 'Источник 1' },
        { id: 2, name: 'Источник 2' },
        { id: 3, name: 'Источник 3' },
        { id: 4, name: 'Источник 4' },
        { id: 5, name: 'Источник 5' },
        { id: 6, name: 'Источник 6' },
        { id: 7, name: 'Источник 7' },
        { id: 8, name: 'Источник 8' },
        { id: 9, name: 'Источник 9' },
        { id: 10, name: 'Источник 10' },
        { id: 11, name: 'Источник 11' },
        { id: 12, name: 'Источник 12' },
        { id: 13, name: 'Источник 13' },
        { id: 14, name: 'Источник 14' },
        { id: 15, name: 'Источник 15' },
      ],
      fields: [
        {
          key: 'parametr',
          label: 'Параметр',
          formatter: this.dataFormatter,
          thStyle: { width: '50%' },
        },
        {
          key: 'value',
          label: 'Значение',
          formatter: this.dataFormatter,
        },
      ],
      items_slots: [
        {
          parametr: 'Статус',
          value: true,
        },
        {
          parametr: 'Название',
          value: 'Источник 1',
        },
        {
          parametr: 'Версия прошивки',
          value: '1.1.2257',
        },
        {
          parametr: 'Серийный номер',
          value: '4789564478551',
        },
        {
          parametr: 'Номинальное напряжение',
          value: '220 В',
        },
        {
          parametr: 'Номинальная мощность',
          value: '400 Вт',
        },
        {
          parametr: 'Поддержка горячей замены',
          value: 'Есть',
        },
      ],
    };
  },
  methods: {
    switchSourceSlot(period) {
      this.currentSourceSlot = period;
    },
  },
};
</script>
<style lang="scss" scoped>
.info_section {
  margin-bottom: 0px;
}

.bold-16px {
  display: block;
  margin: 25px 0 16px 0;
}
</style>