dev #43
|
@ -51,12 +51,7 @@ const form_refs = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeParametres = () => {
|
const changeParametres = () => {
|
||||||
console.log(form_state.total_length * 1000, copy_form_state.total_length * 1000)
|
// console.log(form_state.total_length * 1000, copy_form_state.total_length * 1000)
|
||||||
|
|
||||||
if ((form_state.total_length * 1000) <= (parametric.length.min + parametric.height.step)) {
|
|
||||||
form_state.total_length = (parametric.length.min + parametric.height.step) / 1000
|
|
||||||
// return
|
|
||||||
}
|
|
||||||
|
|
||||||
const lamelles = Math.floor(form_state.height / parametric.height.step)
|
const lamelles = Math.floor(form_state.height / parametric.height.step)
|
||||||
|
|
||||||
|
@ -79,6 +74,7 @@ const changeParametres = () => {
|
||||||
|
|
||||||
let { fence_length, total_length_mm, auto_length, length, full_sections } = form_state
|
let { fence_length, total_length_mm, auto_length, length, full_sections } = form_state
|
||||||
length = parseFloat(length.toString())
|
length = parseFloat(length.toString())
|
||||||
|
if (total_length_mm < parametric.length.min) total_length_mm = parametric.length.min
|
||||||
|
|
||||||
if (auto_length) {
|
if (auto_length) {
|
||||||
let w = parametric.length.min
|
let w = parametric.length.min
|
||||||
|
@ -152,13 +148,13 @@ const goal = (target: string, params: object) => {
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-item w-full">
|
<div class="form-item w-full">
|
||||||
<label for="length">Длина ламельного блока, мм</label>
|
<label for="length">Длина ламельного блока, мм</label>
|
||||||
<input disabled :value="`${form_state.length} мм`" class="w-28" />
|
<input disabled :value.input="`${form_state.length.toFixed(0)} мм`" class="w-28" />
|
||||||
<input id="length" type="range" class="xl:w-full" v-bind="parametric.length"
|
<input id="length" type="range" class="xl:w-full" v-bind="parametric.length"
|
||||||
v-model="form_state.length" :disabled="form_state.auto_length" :ref="form_refs.length" />
|
v-model="form_state.length" :disabled="form_state.auto_length" :ref="form_refs.length" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-item w-full">
|
<div class="form-item w-full">
|
||||||
<label for="height">Высота забора, мм</label>
|
<label for="height">Высота забора, мм</label>
|
||||||
<input disabled :value="`${form_state.height} мм`" class="w-28" />
|
<input disabled :value="`${form_state.height.toFixed(0)} мм`" class="w-28" />
|
||||||
<input id="height" type="range" class="xl:w-full" v-bind="parametric.height"
|
<input id="height" type="range" class="xl:w-full" v-bind="parametric.height"
|
||||||
v-model="form_state.height" :ref="form_refs.height" />
|
v-model="form_state.height" :ref="form_refs.height" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -188,6 +184,9 @@ const goal = (target: string, params: object) => {
|
||||||
v-model="form_state.total_length" :ref="form_refs.total_length" />
|
v-model="form_state.total_length" :ref="form_refs.total_length" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-item xl:w-2/4 text-sm xl:text-base">
|
<div class="form-item xl:w-2/4 text-sm xl:text-base">
|
||||||
|
<p v-if="form_state.total_length_mm < parametric.length.min" class="text-ioprim">
|
||||||
|
Длина забора слишком мала
|
||||||
|
</p>
|
||||||
<p v-if="form_state.extra_section" class="text-ioprim">
|
<p v-if="form_state.extra_section" class="text-ioprim">
|
||||||
Внимание! Дополнительная секция приводит к увеличению стоимости.
|
Внимание! Дополнительная секция приводит к увеличению стоимости.
|
||||||
Рекомендуем вам изменить длину забора или длину секции!
|
Рекомендуем вам изменить длину забора или длину секции!
|
||||||
|
|
Loading…
Reference in New Issue