From 3700883b70dade6693dc226f5735965a8924d310 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Thu, 13 Jun 2024 15:12:23 +0300 Subject: [PATCH] txt --- components/calcValues.vue | 24 ++++++++++++++++-------- components/modal.vue | 3 +++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/components/calcValues.vue b/components/calcValues.vue index ce0d34e..6a3825d 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -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'] @@ -175,22 +181,24 @@ const plurals = {

- Забор общей длиной {{ form_state.total_length }}{{'\xa0'}}м, + Забор общей длиной {{ form_state.total_length }}{{ '\xa0' }}м, {{ section_count }} по - {{ form_state.length }}{{'\xa0'}}мм - и 1 дополнительная секция длиной {{ form_state.extra_section }}{{'\xa0'}}мм. + {{ form_state.length }}{{ '\xa0' }}мм + и 1 дополнительная секция длиной {{ form_state.extra_section }}{{ '\xa0' }}мм.

Всего {{ section_count + ~~(!!form_state.extra_section) + 1 }} , {{ section_count * lamelles_count }} - длиной {{ form_state.length }}{{'\xa0'}}мм + длиной {{ form_state.length }}{{ '\xa0' }}мм - и {{ ~~(!!form_state.extra_section) * lamelles_count }} - длиной {{ - form_state.extra_section }}{{'\xa0'}}мм. + и {{ ~~(!!form_state.extra_section) * lamelles_count }} + + длиной {{ + form_state.extra_section }}{{ '\xa0' }}мм + .

Все элементы окрашиваются порошковым методом:
diff --git a/components/modal.vue b/components/modal.vue index ef74957..e45a7f1 100644 --- a/components/modal.vue +++ b/components/modal.vue @@ -113,6 +113,9 @@ const submit = (e: any) => {

Секций: {{ section_count }}
+
+ Секций: {{ total_length }} +
Цвет столба: {{ getColorNameFromRal(pillar_color) }}