This commit is contained in:
commit ed6b4d8d6e
2 changed files with 22 additions and 11 deletions

View File

@ -62,7 +62,9 @@ const changeParametres = () => {
form_state.total_length_mm = form_state.total_length * 1000
if (auto_section_width.value) {
let w = parametric.length.max
while (((form_state.total_length_mm % w) > 0) && w > (parametric.length.min + parametric.length.step * 10)) {
let tw_f = (form_state.total_length_mm - form_state.fence_length)
let iw_f = (w - form_state.fence_length)
while ((tw_f % iw_f) && w > (parametric.length.min + parametric.length.step * 10)) {
w -= parametric.length.step
}
form_state.length = w
@ -104,7 +106,11 @@ const setPillarColor = (color: ralTypes) => {
pillar_color.value = color
}
const autoSectionWidth = () => {
const v = auto_section_width.value
auto_section_width.value = !auto_section_width.value
if (!v == true) {
changeParametres()
}
}
const predefLamelleColors = ['3009', '9003', '6027', '5024', '9001', '1012', '3007', '4007']
@ -189,8 +195,10 @@ const plurals = {
длиной {{ form_state.length }}{{ '\xa0' }}мм
<span class="contents" v-if="form_state.extra_section">
и {{ ~~(!!form_state.extra_section) * lamelles_count }}
<Plural :n="~~(!!form_state.extra_section) * lamelles_count" :forms="plurals.lamelle" /> длиной {{
form_state.extra_section }}{{'\xa0'}}мм</span>.
<Plural :n="~~(!!form_state.extra_section) * lamelles_count" :forms="plurals.lamelle" />
длиной {{
form_state.extra_section }}{{ '\xa0' }}мм
</span>.
</p>
<p>
Все элементы окрашиваются порошковым методом: <br />

View File

@ -110,13 +110,16 @@ const submit = (e: any) => {
<div>
Длина секции: {{ fence_section * 1000 }}
</div>
<div>
Секций: {{ section_count }}
</div>
<div>
общая длина: {{ total_length }}
</div>
<div>
Секций: {{ section_count }}
</div>
<div>
Секций: {{ total_length }}
</div>
<div>
Цвет столба: {{ getColorNameFromRal(pillar_color) }}
</div>