summaryrefslogtreecommitdiff
path: root/src/views/PowerSupplies/Specification/PowerStaticPage.vue
blob: 844dc693f2505380d20b7704f0a96d0ed544418b (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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<template>
  <b-container
    :style="{ display: 'flex', 'flex-direction': 'column' }"
    fluid="xxl pt-0 m-0"
  >
    <page-title />
    <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="bootstrap-rounded-table"
        :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,
          thClass: 'semi-bold-12px__caps bootstrap-rounded-table__head_bg',
          class: `bootstrap-rounded-table__column-first
            memory-table-col-first`,
          tdClass: 'regular-12px bootstrap-rounded-table__td',
        },
        {
          key: 'value',
          label: 'Значение',
          formatter: this.dataFormatter,
          thClass: 'semi-bold-12px__caps bootstrap-rounded-table__head_bg',
          class: 'bootstrap-rounded-table__column-last',
          tdClass: 'regular-12px bootstrap-rounded-table__td',
        },
      ],
      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">
.memory-table-col-first {
  width: 50%;
}
</style>

<style lang="scss" scoped>
.bootstrap-table__section {
  margin-bottom: 24px;
}
.info_section {
  margin-bottom: 0px;
}

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