modal data

This commit is contained in:
Kseninia Mikhaylova 2024-06-18 16:00:59 +03:00
parent 3d39c6bf3b
commit b541bdead7
1 changed files with 11 additions and 5 deletions

View File

@ -91,19 +91,25 @@ const roubleSign = new Intl.NumberFormat('ru-RU', {
currency: 'RUB', currency: 'RUB',
}); });
const total = computed(() => { const total = computed(() => {
const { mortgage, pillar, lamella } = calculatorData.value const { mortgage, pillar, lamella, rivets, bar, guide } = calculatorData.value
const pillar_count = (section_count.value + 1) const pillar_count = (section_count.value + 1)
const pil = (parseFloat(mortgage) + parseFloat(pillar)) * pillar_count const pil = (parseFloat(mortgage) + parseFloat(pillar)) * pillar_count
const length = fence_section.value
const lam_count = lamelles_count.value * section_count.value const lam_count = lamelles_count.value * section_count.value
const lam = lam_count * lamella const lam = (lam_count * length * parseFloat(lamella)) + parseFloat(rivets)
const top_count = section_count.value const top_count = section_count.value
const top = top_count * lamella const top = top_count * lamella
const guides_count = section_count.value
const guides = guides_count * parseFloat(guide) * lam_count * 115
return [ return [
`Столб, ${pillar_count}: ${roubleSign.format(pil)}`, `Столб, ${pillar_count}: (${parseFloat(mortgage)} + ${parseFloat(pillar)}) x ${pillar_count} = ${roubleSign.format(pil)}`,
`Ламели, ${lam_count}: ${roubleSign.format(lam)}`, `Ламели, ${lam_count}: (${lam_count} x ${length} x ${lamella}) + ${rivets} = ${roubleSign.format(lam)}`,
`Верхняя планка, ${top_count}: ${roubleSign.format(top)}`, `Направляющая, ${guides_count}: ${guides_count} x ${guide} x ${lam_count} x 115 = ${roubleSign.format(guides)}`,
`Верхняя планка, ${top_count}: ${top_count} x ${length} x ${bar} = ${roubleSign.format(top)}`,
] ]
}) })
</script> </script>