bfg-common 1.4.861 → 1.4.862
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/inspectionProfiles/Project_Default.xml +2 -1
- package/assets/localization/local_be.json +3012 -3009
- package/assets/localization/local_en.json +5 -2
- package/assets/localization/local_hy.json +5 -2
- package/assets/localization/local_kk.json +5 -2
- package/assets/localization/local_ru.json +5 -2
- package/assets/localization/local_zh.json +5 -2
- package/components/common/chartOptionsModal/counters/timespan/form/Form.vue +40 -313
- package/components/common/chartOptionsModal/counters/timespan/form/FormNew.vue +241 -0
- package/components/common/chartOptionsModal/counters/timespan/form/FormOld.vue +372 -0
- package/components/common/graph/GraphOld.vue +50 -31
- package/components/common/monitor/advanced/Advanced.vue +0 -3
- package/components/common/monitor/advanced/AdvancedNew.vue +0 -2
- package/components/common/monitor/advanced/AdvancedOld.vue +0 -2
- package/components/common/monitor/advanced/graphView/GraphView.vue +16 -18
- package/components/common/monitor/advanced/tools/Tools.vue +0 -3
- package/components/common/monitor/advanced/tools/ToolsNew.vue +0 -2
- package/components/common/monitor/advanced/tools/ToolsOld.vue +0 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +113 -114
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModalNew.vue +190 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModalOld.vue +189 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/Notification.vue +13 -20
- package/components/common/monitor/advanced/tools/chartOptionsModal/NotificationNew.vue +20 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/NotificationOld.vue +27 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/Actions.vue +28 -79
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/ActionsNew.vue +160 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/ActionsOld.vue +114 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +75 -56
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/CountersNew.vue +97 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/CountersOld.vue +110 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/Table.vue +19 -58
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/tableNew/TableNew.vue +46 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/tableNew/config/options.ts +19 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/tableNew/config/tableData.ts +71 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/tableNew/utils/constructTable.ts +29 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/tableOld/TableOld.vue +85 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{lib → tableOld/lib}/config/tableConfig.ts +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +71 -47
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/TimespanNew.vue +150 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/TimespanOld.vue +95 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +21 -26
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectNew/ObjectNew.vue +56 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectNew/lib/config/options.ts +25 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectNew/lib/config/tableData.ts +47 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectNew/lib/utils/constructTable.ts +22 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectOld/ObjectOld.vue +84 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/Metrics.vue +17 -29
- package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/MetricsOld.vue +32 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/metricsNew/MetricsNew.vue +101 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/metricsNew/lib/utils/constructAccordion.ts +32 -0
- package/components/common/monitor/overview/Overview.vue +224 -221
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModalNew.vue +186 -181
- package/components/common/pages/hardwareHealth/historyTestimony/Graph.vue +26 -30
- package/lib/utils/date.ts +12 -0
- package/package.json +2 -2
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{lib → tableOld/lib}/models/types.ts +0 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="timespan-form-container">
|
|
3
|
+
<p class="block-title">{{ localization.inventoryMonitor.timespan }}</p>
|
|
4
|
+
<ui-select
|
|
5
|
+
v-model="localSelectedTimespanLocal"
|
|
6
|
+
:items="constructedTimespanOptions"
|
|
7
|
+
test-id="timespan-local"
|
|
8
|
+
select-width="100%"
|
|
9
|
+
size="md"
|
|
10
|
+
/>
|
|
11
|
+
|
|
12
|
+
<div class="radio-container">
|
|
13
|
+
<ui-radio
|
|
14
|
+
v-model="localPeriodTypeLocal"
|
|
15
|
+
:label="localization.common.last"
|
|
16
|
+
:disabled="isDisabledCustomForm"
|
|
17
|
+
test-id="last-from"
|
|
18
|
+
value="last"
|
|
19
|
+
size="sm"
|
|
20
|
+
/>
|
|
21
|
+
<div class="row-container">
|
|
22
|
+
<ui-input
|
|
23
|
+
v-model="localLastLocal"
|
|
24
|
+
:disabled="isDisabledCustomFormLast"
|
|
25
|
+
test-id="local-last"
|
|
26
|
+
/>
|
|
27
|
+
<ui-select
|
|
28
|
+
v-model="localSelectedCustomTimeLocal"
|
|
29
|
+
:items="constructedCustomTimeOptions"
|
|
30
|
+
:disabled="isDisabledCustomFormLast"
|
|
31
|
+
test-id="custom-time"
|
|
32
|
+
select-width="100%"
|
|
33
|
+
size="md"
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="radio-container">
|
|
38
|
+
<ui-radio
|
|
39
|
+
v-model="localPeriodTypeLocal"
|
|
40
|
+
:label="localization.common.timeRange"
|
|
41
|
+
:disabled="isDisabledCustomForm"
|
|
42
|
+
test-id="last-from"
|
|
43
|
+
value="period"
|
|
44
|
+
size="sm"
|
|
45
|
+
/>
|
|
46
|
+
|
|
47
|
+
<ui-input-with-datepicker
|
|
48
|
+
id="date-from"
|
|
49
|
+
v-model="constructedDateFromLocal"
|
|
50
|
+
:format="datepickerFormat"
|
|
51
|
+
test-id="date-from"
|
|
52
|
+
time-format="12"
|
|
53
|
+
:disabled="isDisabledCustomFormRange"
|
|
54
|
+
/>
|
|
55
|
+
|
|
56
|
+
<ui-input-with-datepicker
|
|
57
|
+
id="date-to"
|
|
58
|
+
v-model="constructedDateToLocal"
|
|
59
|
+
:format="datepickerFormat"
|
|
60
|
+
test-id="date-to"
|
|
61
|
+
time-format="12"
|
|
62
|
+
:disabled="isDisabledCustomFormRange"
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
65
|
+
<p class="date-time-info">
|
|
66
|
+
{{ localization.inventoryMonitor.dateTimeIsoFormat }}
|
|
67
|
+
</p>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<script setup lang="ts">
|
|
72
|
+
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
73
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
74
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
75
|
+
import { getUiDatepickerFormatByLanguage } from '~/lib/utils/date'
|
|
76
|
+
|
|
77
|
+
const localSelectedTimespanLocal = defineModel<string>(
|
|
78
|
+
'localSelectedTimespan',
|
|
79
|
+
{ required: true }
|
|
80
|
+
)
|
|
81
|
+
const localPeriodTypeLocal = defineModel<string>('localPeriodType', {
|
|
82
|
+
required: true,
|
|
83
|
+
})
|
|
84
|
+
const localLastLocal = defineModel<number>('localLast', {
|
|
85
|
+
required: true,
|
|
86
|
+
})
|
|
87
|
+
const localSelectedCustomTimeLocal = defineModel<string>(
|
|
88
|
+
'localSelectedCustomTime',
|
|
89
|
+
{
|
|
90
|
+
required: true,
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
const localCurrentDateFromLocal = defineModel<string>('localCurrentDateFrom', {
|
|
94
|
+
required: true,
|
|
95
|
+
})
|
|
96
|
+
const currentTimeFromLocal = defineModel<string>('currentTimeFrom', {
|
|
97
|
+
required: true,
|
|
98
|
+
})
|
|
99
|
+
const currentTimeToLocal = defineModel<string>('currentTimeTo', {
|
|
100
|
+
required: true,
|
|
101
|
+
})
|
|
102
|
+
const currentDateToLocal = defineModel<string>('currentDateTo', {
|
|
103
|
+
required: true,
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
const props = defineProps<{
|
|
107
|
+
timespanOptions: UI_I_OptionItem[]
|
|
108
|
+
customTimeOptions: UI_I_OptionItem[]
|
|
109
|
+
language: string
|
|
110
|
+
}>()
|
|
111
|
+
|
|
112
|
+
const {
|
|
113
|
+
$isDate,
|
|
114
|
+
$getUnixByDate,
|
|
115
|
+
$formattedDate,
|
|
116
|
+
$formattedTime,
|
|
117
|
+
$getDateFormat,
|
|
118
|
+
} = useNuxtApp()
|
|
119
|
+
|
|
120
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
121
|
+
|
|
122
|
+
const isDisabledCustomForm = computed<boolean>(
|
|
123
|
+
() => localSelectedTimespanLocal.value !== 'custom_interval'
|
|
124
|
+
)
|
|
125
|
+
const isDisabledCustomFormLast = computed<boolean>(
|
|
126
|
+
() => isDisabledCustomForm.value || localPeriodTypeLocal.value !== 'last'
|
|
127
|
+
)
|
|
128
|
+
const isDisabledCustomFormRange = computed<boolean>(
|
|
129
|
+
() => isDisabledCustomForm.value || localPeriodTypeLocal.value !== 'period'
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
const constructedTimespanOptions = computed<UI_I_Dropdown[]>(() =>
|
|
133
|
+
props.timespanOptions.map((item) => {
|
|
134
|
+
return {
|
|
135
|
+
text: item.text,
|
|
136
|
+
value: item.value,
|
|
137
|
+
}
|
|
138
|
+
})
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
const constructedCustomTimeOptions = computed<UI_I_Dropdown[]>(() =>
|
|
142
|
+
props.customTimeOptions.map((item) => {
|
|
143
|
+
return {
|
|
144
|
+
text: item.text,
|
|
145
|
+
value: item.value,
|
|
146
|
+
}
|
|
147
|
+
})
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
const datepickerFormat = computed<string>(() =>
|
|
151
|
+
getUiDatepickerFormatByLanguage(props.language)
|
|
152
|
+
)
|
|
153
|
+
const dateFormatForUpdate = ref<string>($getDateFormat(props.language))
|
|
154
|
+
const constructedDateFromLocal = computed<number>({
|
|
155
|
+
get() {
|
|
156
|
+
// TODO fix PM
|
|
157
|
+
return $isDate(localCurrentDateFromLocal.value)
|
|
158
|
+
? $getUnixByDate(
|
|
159
|
+
localCurrentDateFromLocal.value + ' ' + currentTimeFromLocal.value
|
|
160
|
+
)
|
|
161
|
+
: 0
|
|
162
|
+
},
|
|
163
|
+
set(newValue) {
|
|
164
|
+
localCurrentDateFromLocal.value = $formattedDate(
|
|
165
|
+
new Date(newValue),
|
|
166
|
+
dateFormatForUpdate.value
|
|
167
|
+
)
|
|
168
|
+
currentTimeFromLocal.value = $formattedTime(newValue, '', true)
|
|
169
|
+
},
|
|
170
|
+
})
|
|
171
|
+
|
|
172
|
+
const constructedDateToLocal = computed<number>({
|
|
173
|
+
get() {
|
|
174
|
+
// TODO fix PM
|
|
175
|
+
return $isDate(currentDateToLocal.value)
|
|
176
|
+
? $getUnixByDate(
|
|
177
|
+
currentDateToLocal.value + ' ' + currentTimeToLocal.value
|
|
178
|
+
)
|
|
179
|
+
: 0
|
|
180
|
+
},
|
|
181
|
+
set(newValue) {
|
|
182
|
+
currentDateToLocal.value = $formattedDate(
|
|
183
|
+
new Date(newValue),
|
|
184
|
+
dateFormatForUpdate.value
|
|
185
|
+
)
|
|
186
|
+
currentTimeToLocal.value = $formattedTime(newValue, '', true)
|
|
187
|
+
},
|
|
188
|
+
})
|
|
189
|
+
</script>
|
|
190
|
+
|
|
191
|
+
<style>
|
|
192
|
+
:root {
|
|
193
|
+
--chart-options-timespan-blocks-bg: #ffffff;
|
|
194
|
+
--chart-options-timespan-blocks-title-color: #4d5d69;
|
|
195
|
+
}
|
|
196
|
+
:root.dark-theme {
|
|
197
|
+
--chart-options-timespan-blocks-bg: #334453;
|
|
198
|
+
--chart-options-timespan-blocks-title-color: #e9eaec;
|
|
199
|
+
}
|
|
200
|
+
</style>
|
|
201
|
+
<style scoped lang="scss">
|
|
202
|
+
.timespan-form-container {
|
|
203
|
+
padding: 12px;
|
|
204
|
+
background: var(--chart-options-timespan-blocks-bg);
|
|
205
|
+
box-shadow: 0 1px 4px 0 #00000014;
|
|
206
|
+
border-radius: 8px;
|
|
207
|
+
|
|
208
|
+
.block-title {
|
|
209
|
+
color: var(--chart-options-timespan-blocks-title-color);
|
|
210
|
+
font-size: 14px;
|
|
211
|
+
font-weight: 500;
|
|
212
|
+
margin-bottom: 16px;
|
|
213
|
+
}
|
|
214
|
+
.radio-container {
|
|
215
|
+
display: flex;
|
|
216
|
+
flex-direction: column;
|
|
217
|
+
grid-gap: 12px;
|
|
218
|
+
margin-top: 16px;
|
|
219
|
+
|
|
220
|
+
.row-container {
|
|
221
|
+
display: grid;
|
|
222
|
+
grid-template-columns: 1fr 1fr;
|
|
223
|
+
grid-gap: 12px;
|
|
224
|
+
|
|
225
|
+
:deep(.ui-input-with-datepicker) {
|
|
226
|
+
grid-gap: 12px;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
:deep(.ui-input-with-datepicker) {
|
|
230
|
+
grid-gap: 12px;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.date-time-info {
|
|
235
|
+
font-weight: 400;
|
|
236
|
+
font-size: 12px;
|
|
237
|
+
color: #9da6ad;
|
|
238
|
+
margin-top: 16px;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
</style>
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="chart-option-timespan-split">
|
|
3
|
+
<div class="vertical-flex-container">
|
|
4
|
+
<div class="timespan-objects-section-direction">
|
|
5
|
+
<label for="chart-timespan-type-select"
|
|
6
|
+
>{{ localization.inventoryMonitor.timespan }}:</label
|
|
7
|
+
>
|
|
8
|
+
<div class="vertical-flex-container chart-option-timespan-settings">
|
|
9
|
+
<div class="timespan-select chart-option-setting-row">
|
|
10
|
+
<div class="view-select-label horizontal-flex-container">
|
|
11
|
+
<div class="select">
|
|
12
|
+
<select
|
|
13
|
+
id="chart-timespan-type-select"
|
|
14
|
+
v-model="localSelectedTimespanLocal"
|
|
15
|
+
data-id="chart-timespan-type-select"
|
|
16
|
+
>
|
|
17
|
+
<option
|
|
18
|
+
v-for="(item, index) in props.timespanOptions"
|
|
19
|
+
:key="index"
|
|
20
|
+
:value="item.value"
|
|
21
|
+
>
|
|
22
|
+
{{ item.text }}
|
|
23
|
+
</option>
|
|
24
|
+
</select>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div
|
|
29
|
+
:class="[
|
|
30
|
+
'custom-timespan-settings-container',
|
|
31
|
+
{ active: localSelectedTimespanLocal === 'custom_interval' },
|
|
32
|
+
]"
|
|
33
|
+
>
|
|
34
|
+
<table>
|
|
35
|
+
<tbody>
|
|
36
|
+
<tr>
|
|
37
|
+
<td class="relative">
|
|
38
|
+
<input
|
|
39
|
+
id="custom-time-lastInput"
|
|
40
|
+
v-model="localPeriodTypeLocal"
|
|
41
|
+
data-id="custom-time-lastInput"
|
|
42
|
+
type="radio"
|
|
43
|
+
value="last"
|
|
44
|
+
class="custom-radio-button"
|
|
45
|
+
name="lastFrom"
|
|
46
|
+
/>
|
|
47
|
+
<label
|
|
48
|
+
for="custom-time-lastInput"
|
|
49
|
+
class="custom-radio-label"
|
|
50
|
+
>
|
|
51
|
+
{{ props.periodTypeText }}:
|
|
52
|
+
</label>
|
|
53
|
+
</td>
|
|
54
|
+
<td>
|
|
55
|
+
<div
|
|
56
|
+
:class="[
|
|
57
|
+
'custom-timespan-type-last-container',
|
|
58
|
+
{ active: localPeriodTypeLocal === 'last' },
|
|
59
|
+
]"
|
|
60
|
+
>
|
|
61
|
+
<input
|
|
62
|
+
id="chart-option-setting-row"
|
|
63
|
+
v-model="localLastLocal"
|
|
64
|
+
data-id="chart-option-setting-row"
|
|
65
|
+
type="number"
|
|
66
|
+
class="chart-option-setting-row custom-time-input"
|
|
67
|
+
/>
|
|
68
|
+
<div
|
|
69
|
+
class="chart-option-setting-row custom-time-input inline-block"
|
|
70
|
+
>
|
|
71
|
+
<div
|
|
72
|
+
class="view-select-label horizontal-flex-container"
|
|
73
|
+
>
|
|
74
|
+
<div class="select">
|
|
75
|
+
<select
|
|
76
|
+
id="chart-timespan-type-select"
|
|
77
|
+
v-model="localSelectedCustomTimeLocal"
|
|
78
|
+
data-id="chart-timespan-type-select"
|
|
79
|
+
>
|
|
80
|
+
<option
|
|
81
|
+
v-for="(item, index) in props.customTimeOptions"
|
|
82
|
+
:key="index"
|
|
83
|
+
:value="item.value"
|
|
84
|
+
>
|
|
85
|
+
{{ item.text }}
|
|
86
|
+
</option>
|
|
87
|
+
</select>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</td>
|
|
93
|
+
</tr>
|
|
94
|
+
<tr>
|
|
95
|
+
<td class="relative">
|
|
96
|
+
<input
|
|
97
|
+
id="custom-time-fromInput"
|
|
98
|
+
v-model="localPeriodTypeLocal"
|
|
99
|
+
data-id="custom-time-from-input"
|
|
100
|
+
type="radio"
|
|
101
|
+
value="period"
|
|
102
|
+
class="custom-radio-button"
|
|
103
|
+
name="lastFrom"
|
|
104
|
+
/>
|
|
105
|
+
<label
|
|
106
|
+
for="custom-time-fromInput"
|
|
107
|
+
class="custom-radio-label text-capitalize text-right"
|
|
108
|
+
>{{ localization.common.from2 }}:
|
|
109
|
+
</label>
|
|
110
|
+
</td>
|
|
111
|
+
<td>
|
|
112
|
+
<div
|
|
113
|
+
:class="[
|
|
114
|
+
'date-container-row disabled-container calendar-date-row',
|
|
115
|
+
{ active: localPeriodTypeLocal === 'period' },
|
|
116
|
+
]"
|
|
117
|
+
>
|
|
118
|
+
<input
|
|
119
|
+
id="current-date-from"
|
|
120
|
+
v-model.lazy="localCurrentDateFromLocal"
|
|
121
|
+
data-id="current-date-from-input"
|
|
122
|
+
type="text"
|
|
123
|
+
class="chart-option-setting-row custom-time-input first-from"
|
|
124
|
+
/>
|
|
125
|
+
<div class="section-datepicker">
|
|
126
|
+
<atoms-datepicker
|
|
127
|
+
v-model="dateFromLocal"
|
|
128
|
+
:lang="props.language"
|
|
129
|
+
class="calendar-from calendar-popup btn-show-hide-calendar"
|
|
130
|
+
@update="emits('update-date-from', $event)"
|
|
131
|
+
/>
|
|
132
|
+
</div>
|
|
133
|
+
<input
|
|
134
|
+
id="current-time-from"
|
|
135
|
+
v-model="currentTimeFromLocal"
|
|
136
|
+
data-id="current-time-from-input"
|
|
137
|
+
type="text"
|
|
138
|
+
class="chart-option-setting-row custom-time-input"
|
|
139
|
+
/>
|
|
140
|
+
</div>
|
|
141
|
+
</td>
|
|
142
|
+
</tr>
|
|
143
|
+
<tr>
|
|
144
|
+
<td class="custom-time-label-text text-right">
|
|
145
|
+
{{ localization.common.to2 }}:
|
|
146
|
+
</td>
|
|
147
|
+
<td>
|
|
148
|
+
<div
|
|
149
|
+
:class="[
|
|
150
|
+
'date-container-row disabled-container calendar-date-row',
|
|
151
|
+
{ active: localPeriodTypeLocal === 'period' },
|
|
152
|
+
]"
|
|
153
|
+
>
|
|
154
|
+
<input
|
|
155
|
+
id="current-date-to"
|
|
156
|
+
v-model.lazy="currentDateToLocal"
|
|
157
|
+
data-id="current-date-to-input"
|
|
158
|
+
type="text"
|
|
159
|
+
class="chart-option-setting-row custom-time-input first-to"
|
|
160
|
+
/>
|
|
161
|
+
<div class="section-datepicker">
|
|
162
|
+
<atoms-datepicker
|
|
163
|
+
v-model="dateToLocal"
|
|
164
|
+
:lang="props.language"
|
|
165
|
+
class="calendar-from calendar-popup btn-show-hide-calendar"
|
|
166
|
+
@update="emits('update-date-to', $event)"
|
|
167
|
+
/>
|
|
168
|
+
</div>
|
|
169
|
+
<input
|
|
170
|
+
id="current-time-to"
|
|
171
|
+
v-model="currentTimeToLocal"
|
|
172
|
+
data-id="current-time-to-input"
|
|
173
|
+
type="text"
|
|
174
|
+
class="chart-option-setting-row custom-time-input"
|
|
175
|
+
/>
|
|
176
|
+
</div>
|
|
177
|
+
</td>
|
|
178
|
+
</tr>
|
|
179
|
+
<tr>
|
|
180
|
+
<td></td>
|
|
181
|
+
<td
|
|
182
|
+
:class="[
|
|
183
|
+
'disabled-container',
|
|
184
|
+
{ active: localPeriodTypeLocal === 'period' },
|
|
185
|
+
]"
|
|
186
|
+
>
|
|
187
|
+
<span>
|
|
188
|
+
({{ localization.inventoryMonitor.isoTimeFormat }})
|
|
189
|
+
</span>
|
|
190
|
+
</td>
|
|
191
|
+
</tr>
|
|
192
|
+
</tbody>
|
|
193
|
+
</table>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
<div class="horizontal-flex-container chart-type-container">
|
|
198
|
+
<div class="view-select-label horizontal-flex-container">
|
|
199
|
+
<label for="chart-type-select" class="label-select"
|
|
200
|
+
>{{ localization.inventoryMonitor.chartType }}:</label
|
|
201
|
+
>
|
|
202
|
+
<div class="select">
|
|
203
|
+
<select
|
|
204
|
+
id="chart-type-select"
|
|
205
|
+
v-model="chartTypeLocal"
|
|
206
|
+
data-id="chart-type-select"
|
|
207
|
+
>
|
|
208
|
+
<option
|
|
209
|
+
v-for="(item, index) in props.chartTypeOptions"
|
|
210
|
+
:key="index"
|
|
211
|
+
:value="item.value"
|
|
212
|
+
>
|
|
213
|
+
{{ item.text }}
|
|
214
|
+
</option>
|
|
215
|
+
</select>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
</template>
|
|
222
|
+
|
|
223
|
+
<script setup lang="ts">
|
|
224
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
225
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
226
|
+
|
|
227
|
+
const localSelectedTimespanLocal = defineModel<string>(
|
|
228
|
+
'localSelectedTimespan',
|
|
229
|
+
{ required: true }
|
|
230
|
+
)
|
|
231
|
+
const localPeriodTypeLocal = defineModel<string>('localPeriodType', {
|
|
232
|
+
required: true,
|
|
233
|
+
})
|
|
234
|
+
const localLastLocal = defineModel<number>('localLast', {
|
|
235
|
+
required: true,
|
|
236
|
+
})
|
|
237
|
+
const localSelectedCustomTimeLocal = defineModel<string>(
|
|
238
|
+
'localSelectedCustomTime',
|
|
239
|
+
{
|
|
240
|
+
required: true,
|
|
241
|
+
}
|
|
242
|
+
)
|
|
243
|
+
const localCurrentDateFromLocal = defineModel<string>('localCurrentDateFrom', {
|
|
244
|
+
required: true,
|
|
245
|
+
})
|
|
246
|
+
const dateFromLocal = defineModel<number>('dateFrom', {
|
|
247
|
+
required: true,
|
|
248
|
+
})
|
|
249
|
+
const currentDateToLocal = defineModel<string>('currentDateTo', {
|
|
250
|
+
required: true,
|
|
251
|
+
})
|
|
252
|
+
const dateToLocal = defineModel<number>('dateTo', {
|
|
253
|
+
required: true,
|
|
254
|
+
})
|
|
255
|
+
const currentTimeToLocal = defineModel<string>('currentTimeTo', {
|
|
256
|
+
required: true,
|
|
257
|
+
})
|
|
258
|
+
const currentTimeFromLocal = defineModel<string>('currentTimeFrom', {
|
|
259
|
+
required: true,
|
|
260
|
+
})
|
|
261
|
+
const chartTypeLocal = defineModel<string>('chartType', {
|
|
262
|
+
required: true,
|
|
263
|
+
})
|
|
264
|
+
|
|
265
|
+
const props = defineProps<{
|
|
266
|
+
timespanOptions: UI_I_OptionItem[]
|
|
267
|
+
periodTypeText: string
|
|
268
|
+
customTimeOptions: UI_I_OptionItem[]
|
|
269
|
+
language: string
|
|
270
|
+
chartTypeOptions: UI_I_OptionItem[]
|
|
271
|
+
}>()
|
|
272
|
+
|
|
273
|
+
const emits = defineEmits<{
|
|
274
|
+
(event: 'update-date-from', value: number): void
|
|
275
|
+
(event: 'update-date-to', value: number): void
|
|
276
|
+
}>()
|
|
277
|
+
|
|
278
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
279
|
+
</script>
|
|
280
|
+
|
|
281
|
+
<style scoped lang="scss">
|
|
282
|
+
.chart-option-timespan-split {
|
|
283
|
+
overflow-x: auto;
|
|
284
|
+
padding: 5px;
|
|
285
|
+
|
|
286
|
+
.timespan-objects-section-direction {
|
|
287
|
+
display: flex;
|
|
288
|
+
flex-direction: row;
|
|
289
|
+
align-items: flex-start;
|
|
290
|
+
|
|
291
|
+
.chart-option-timespan-settings {
|
|
292
|
+
margin-left: 15px;
|
|
293
|
+
|
|
294
|
+
.chart-option-setting-row {
|
|
295
|
+
width: 150px;
|
|
296
|
+
margin-bottom: 5px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.custom-radio-button {
|
|
300
|
+
position: absolute;
|
|
301
|
+
opacity: 0;
|
|
302
|
+
|
|
303
|
+
&:checked + .custom-radio-label:before {
|
|
304
|
+
box-shadow: inset 0 0 0 6px #0079b8;
|
|
305
|
+
border: none;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
.custom-radio-label {
|
|
309
|
+
display: block;
|
|
310
|
+
position: relative;
|
|
311
|
+
min-height: 19.2px;
|
|
312
|
+
padding-left: 23px;
|
|
313
|
+
cursor: pointer;
|
|
314
|
+
line-height: 19.2px;
|
|
315
|
+
//color: #454545;
|
|
316
|
+
|
|
317
|
+
&:before {
|
|
318
|
+
position: absolute;
|
|
319
|
+
top: 3px;
|
|
320
|
+
left: 0;
|
|
321
|
+
content: '';
|
|
322
|
+
display: inline-block;
|
|
323
|
+
height: 16px;
|
|
324
|
+
width: 16px;
|
|
325
|
+
border: 0.8px solid #565656;
|
|
326
|
+
border-radius: 50%;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.calendar-date-row {
|
|
331
|
+
display: flex;
|
|
332
|
+
align-items: center;
|
|
333
|
+
|
|
334
|
+
.custom-time-input.first-from,
|
|
335
|
+
.custom-time-input.first-to {
|
|
336
|
+
max-width: 114px;
|
|
337
|
+
}
|
|
338
|
+
.btn-show-hide-calendar {
|
|
339
|
+
margin: 0 9px;
|
|
340
|
+
cursor: pointer;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.custom-time-input {
|
|
345
|
+
margin-left: 8px;
|
|
346
|
+
margin-right: 8px;
|
|
347
|
+
max-width: 140px;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.custom-timespan-settings-container:not(.active),
|
|
352
|
+
.custom-timespan-type-last-container:not(.active),
|
|
353
|
+
.disabled-container:not(.active) {
|
|
354
|
+
opacity: 0.6;
|
|
355
|
+
pointer-events: none;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.chart-type-container {
|
|
360
|
+
margin-top: 15px;
|
|
361
|
+
|
|
362
|
+
.horizontal-flex-container {
|
|
363
|
+
display: flex;
|
|
364
|
+
flex-direction: row;
|
|
365
|
+
|
|
366
|
+
.select {
|
|
367
|
+
margin-left: 15px;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
</style>
|
|
@@ -1,31 +1,50 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="graph-content">
|
|
3
|
-
<template v-if="props.chartOptions">
|
|
4
|
-
<client-only>
|
|
5
|
-
<highchart
|
|
6
|
-
:options="props.chartOptions"
|
|
7
|
-
:modules="['exporting', 'export-data']"
|
|
8
|
-
class="graph-block"
|
|
9
|
-
/>
|
|
10
|
-
</client-only>
|
|
11
|
-
</template>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script setup lang="ts">
|
|
16
|
-
const props = defineProps<{
|
|
17
|
-
chartOptions: any
|
|
18
|
-
}>()
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
</
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="['graph-content', ...hiddenButtons]">
|
|
3
|
+
<template v-if="props.chartOptions">
|
|
4
|
+
<client-only>
|
|
5
|
+
<highchart
|
|
6
|
+
:options="props.chartOptions"
|
|
7
|
+
:modules="['exporting', 'export-data']"
|
|
8
|
+
class="graph-block"
|
|
9
|
+
/>
|
|
10
|
+
</client-only>
|
|
11
|
+
</template>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
const props = defineProps<{
|
|
17
|
+
chartOptions: any
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const hiddenButtons = computed<string[]>(() => {
|
|
21
|
+
const result = []
|
|
22
|
+
const chartOptions = props.chartOptions
|
|
23
|
+
if (chartOptions) {
|
|
24
|
+
const { openNewWindow } = chartOptions.exporting.menuItemDefinitions || {}
|
|
25
|
+
|
|
26
|
+
if (openNewWindow.isHide) result.push('hide-new-window')
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return result
|
|
30
|
+
})
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style scoped lang="scss">
|
|
34
|
+
.graph-content {
|
|
35
|
+
width: 100%;
|
|
36
|
+
//height: inherit;
|
|
37
|
+
height: 100%;
|
|
38
|
+
|
|
39
|
+
&.hide-new-window {
|
|
40
|
+
:deep(.highcharts-menu) {
|
|
41
|
+
.highcharts-menu-item:first-child {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
.graph-block {
|
|
47
|
+
height: 100%;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
</style>
|