diff options
Diffstat (limited to 'src/components/_sila')
-rw-r--r-- | src/components/_sila/Global/Chart.vue | 75 | ||||
-rw-r--r-- | src/components/_sila/Global/Collapse.vue | 6 |
2 files changed, 79 insertions, 2 deletions
diff --git a/src/components/_sila/Global/Chart.vue b/src/components/_sila/Global/Chart.vue index 4da58798..0b639252 100644 --- a/src/components/_sila/Global/Chart.vue +++ b/src/components/_sila/Global/Chart.vue @@ -42,6 +42,10 @@ export default { type: Number, default: null, }, + float: { + type: Boolean, + default: false, + }, }, data() { return { @@ -90,7 +94,7 @@ export default { return { ...metric, Timestamp: time, - Value: Math.round(metric.Value), + Value: this.float ? metric.Value : Math.round(metric.Value), }; }); @@ -290,6 +294,75 @@ export default { }, }); break; + case 'voltage-input': + this.categories = this.setCategories(251, 'В'); + this.yMax = 250; + this.minTickInterval = 25; + this.plotLines.push({ + color: '#1A3E5B', + dashStyle: 'solid', + value: this.shutdown, + width: 2, + label: { + text: this.$t('chart.thresholdFailure'), + align: 'right', + style: { + fontFamily: 'Inter', + fontSize: '12px', + fontStyle: 'normal', + fontWeight: '400', + lineHeight: '16px', + color: '#0C1C2999', + }, + }, + }); + break; + case 'voltage-output': + this.categories = this.setCategories(101, 'В'); + this.yMax = 100; + this.minTickInterval = 25; + this.plotLines.push({ + color: '#1A3E5B', + dashStyle: 'solid', + value: this.shutdown, + width: 2, + label: { + text: this.$t('chart.thresholdFailure'), + align: 'right', + style: { + fontFamily: 'Inter', + fontSize: '12px', + fontStyle: 'normal', + fontWeight: '400', + lineHeight: '16px', + color: '#0C1C2999', + }, + }, + }); + break; + case 'current': + this.categories = this.setCategories(11, 'A'); + this.yMax = 10; + this.minTickInterval = 2; + this.plotLines.push({ + color: '#1A3E5B', + dashStyle: 'solid', + value: this.shutdown, + width: 2, + label: { + text: this.$t('chart.thresholdFailure'), + align: 'right', + style: { + fontFamily: 'Inter', + fontSize: '12px', + fontStyle: 'normal', + fontWeight: '400', + lineHeight: '16px', + color: '#0C1C2999', + }, + }, + }); + break; } }, setCategories(count, desc) { diff --git a/src/components/_sila/Global/Collapse.vue b/src/components/_sila/Global/Collapse.vue index f004c955..da2b74c8 100644 --- a/src/components/_sila/Global/Collapse.vue +++ b/src/components/_sila/Global/Collapse.vue @@ -10,7 +10,7 @@ {{ title }} <component :is="iconChevronUp" class="icon-expand" /> </b-button> - <b-collapse :id="id"> + <b-collapse :id="id" :visible="defaultOpen"> <slot></slot> </b-collapse> </div> @@ -29,6 +29,10 @@ export default { type: String, default: null, }, + defaultOpen: { + type: Boolean, + default: false, + }, }, data() { return { |