Compare commits

...

12 Commits

Author SHA1 Message Date
b894d2a4ae style: 纸吸管计算页面布局调整
- 将卡片式布局调整为列表式布局
2025-12-01 16:54:04 +08:00
5651405605 style: 纸带宽度长度计算页面布局调整
- 将结果展示由卡片式变为列表式
2025-12-01 16:18:33 +08:00
c6190a0788 style: 纸卷产能计算页面布局调整
- 结果展示由卡片式转为列表式
2025-12-01 16:05:59 +08:00
17bda531d7 style: 纸卷重量长度计算页面布局调整
- 结果显示由卡片式变为列表式
2025-12-01 15:55:19 +08:00
ca5d33cf09 style: 皮带规格计算页面布局调整
- 将计算结果由卡片式转为列表式
2025-12-01 15:44:30 +08:00
6a214b3796 style: 纸管重量计算页面布局调整
- 将结果由卡片式调整为列表式
2025-12-01 15:30:40 +08:00
a5abfa5122 feat: 添加纸吸管计算支持
- 添加3/4层纸吸管计算
2025-11-29 16:27:14 +08:00
ec333c105c feat: 4层纸吸管计算 2025-11-29 16:25:08 +08:00
b3266a438e feat: 4层纸吸管计算 2025-11-29 16:24:27 +08:00
2cff599229 feat: 3层纸吸管计算 2025-11-25 16:46:40 +08:00
c646e572d9 Fix: 修正部分默认值 & 修正部分文本 2025-07-19 15:38:15 +08:00
6b7ef4c994 Feature: 添加iOS图标 2025-07-19 14:41:48 +08:00
22 changed files with 951 additions and 116 deletions

View File

@ -3,6 +3,9 @@
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<!-- iOS图标 -->
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Loading...</title>
</head>

BIN
public/apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

5
src/components.d.ts vendored
View File

@ -9,6 +9,9 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
BeltSpecificationCalculate: typeof import('./components/Modules/BeltSpecificationCalculate.vue')['default']
CalculateResult: typeof import('./components/CalculateResult.vue')['default']
FourLayerPaperStrawCalculate: typeof import('./components/Modules/FourLayerPaperStrawCalculate.vue')['default']
InputParamSection: typeof import('./components/InputParamSection.vue')['default']
MultiLayerPaperTapeWidthAngleCalculate: typeof import('./components/Modules/MultiLayerPaperTapeWidthAngleCalculate.vue')['default']
PaperRollWeightLengthCalculate: typeof import('./components/Modules/PaperRollWeightLengthCalculate.vue')['default']
PaperTapeWidthAngleCalculate: typeof import('./components/Modules/PaperTapeWidthAngleCalculate.vue')['default']
@ -16,7 +19,9 @@ declare module 'vue' {
PaperTubeWeightCalculate: typeof import('./components/Modules/PaperTubeWeightCalculate.vue')['default']
ParamInputField: typeof import('./components/ParamInputField.vue')['default']
ResultCard: typeof import('./components/ResultCard.vue')['default']
ResultSection: typeof import('./components/ResultSection.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
ThreeLayerPaperStrawCalculate: typeof import('./components/Modules/ThreeLayerPaperStrawCalculate.vue')['default']
}
}

View File

@ -0,0 +1,20 @@
<template>
<v-list-item>
<v-list-item-title class="text-h6 text-primary">
{{ value.value.toFixed(fixed ?? 2) }} {{ $t(`units.${value.unit}`) }}
</v-list-item-title>
<v-list-item-subtitle>
{{ label }}
</v-list-item-subtitle>
</v-list-item>
</template>
<script setup lang="ts">
import type { Param } from '@/types/param'
defineProps<{
label: string
value: Param
fixed?: number
}>()
</script>

View File

@ -49,7 +49,7 @@
<v-col cols="12">
<param-input-field
v-model="paperCoreDiameter"
:label="`${$t('paperCoreDiameter')} (${paperCoreDiameter.unit})`"
:label="`${$t('paperTubeInnerDiameter')} (${paperCoreDiameter.unit})`"
/>
</v-col>
<v-col cols="12">
@ -83,26 +83,52 @@
{{ $t('results') }}
</v-card-title>
<v-row>
<v-col cols="12">
<result-card
<v-list lines="two">
<result-section
:label="`${$t('recommendBeltThickness')}`"
:value="result.recommendBeltThickness"
/>
</v-col>
<v-col cols="12">
<result-card
<result-section
:label="`${$t('recommendBeltWidth')}`"
:value="result.recommendBeltWidth"
/>
</v-col>
<v-col cols="12">
<result-card
<result-section
:label="`${$t('recommendBeltLength')}`"
:value="result.recommendBeltLength"
/>
</v-list>
<v-expansion-panels flat multiple>
<v-expansion-panel hide-actions>
<v-expansion-panel-title class="text-warning font-weight-bold">
<template #default="{ expanded }">
<span>
<v-icon icon="mdi-information-outline" />
{{ expanded ? $t('calculationParameters') : $t('expandToShowCalculationParameters') }}
</span>
</template>
</v-expansion-panel-title>
<v-expansion-panel-text>
<v-row>
<v-col cols="6">
<input-param-section :label="$t('maxWheelbase')" :value="maxWheelbase" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('hubDiameter')" :value="hubDiameter" />
</v-col>
</v-row>
<v-row>
<v-col cols="6">
<input-param-section :label="$t('paperTubeInnerDiameter')" :value="paperCoreDiameter" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('paperRollWallThickness')" :value="paperRollWallThickness" />
</v-col>
</v-row>
</v-expansion-panel-text>
</v-expansion-panel>
</v-expansion-panels>
</v-card>
</v-col>
</v-row>

View File

@ -0,0 +1,289 @@
<template>
<div class="calculator-container">
<v-row justify="center">
<!-- 参数输入区域 -->
<v-col cols="12" lg="5" md="6">
<v-card class="pa-6 parameter-card" elevation="8" rounded="xl">
<v-card-title class="text-h5 mb-6 d-flex align-center">
<v-icon class="mr-3" color="primary" icon="mdi-tune" size="large" />
{{ $t('parameters') }}
</v-card-title>
<v-row>
<v-col cols="6">
<v-select
v-model="currentSelect"
density="comfortable"
:items="selects"
:label="$t('presetSpecifications')"
@update:model-value="updateParams"
/>
</v-col>
<v-col cols="12">
<param-input-field v-model="paperCoreDiameter" :disabled="!isCustomMode" :label="$t('paperTubeInnerDiameter')" />
</v-col>
<v-col cols="12">
<param-input-field v-model="bottomPaperWidth" :disabled="!isCustomMode" :label="$t('bottomPaperWidth')" />
</v-col>
<v-col cols="12">
<param-input-field v-model="bottomPaperThickness" :label="$t('bottomPaperThickness')" />
</v-col>
<v-col cols="12">
<param-input-field v-model="secondLayerPaperThickness" :label="$t('secondLayerPaperThickness')" />
</v-col>
<v-col cols="12">
<param-input-field v-model="thirdLayerPaperThickness" :label="$t('thirdLayerPaperThickness')" />
</v-col>
<v-col cols="12">
<param-input-field v-model="topPaperThickness" :label="$t('topPaperThickness')" />
</v-col>
</v-row>
<v-divider class="my-6" />
<v-row>
<v-btn
block
color="warning"
prepend-icon="mdi-refresh"
size="large"
variant="outlined"
@click="resetParameters"
>
{{ $t('reset') }}
</v-btn>
</v-row>
</v-card>
</v-col>
<!-- 计算结果区域 -->
<v-col cols="12" lg="5" md="6">
<v-card class="pa-6 result-card" elevation="8" rounded="xl">
<v-card-title class="text-h5 mb-6 d-flex align-center">
<v-icon
class="mr-3"
color="primary"
icon="mdi-calculator"
size="large"
/>
{{ $t('results') }}
</v-card-title>
<v-list lines="two">
<result-section
:label="`${$t('paperStrawResult.paperTubeInnerDiameter')}`"
:value="result.paperCoreDiameter"
/>
<result-section
:label="`${$t('paperStrawResult.paperTubeExternalDiameter')}`"
:value="result.paperTubeExternalDiameter"
/>
<result-section
:label="`${$t('paperStrawResult.paperTubeThickness')}`"
:value="result.paperTubeWallThickness"
/>
<result-section
:label="`${$t('paperStrawResult.bottomPaperAngle')}`"
:value="result.bottomPaperAngle"
/>
<result-section
:label="`${$t('paperStrawResult.leadingLength')}`"
:value="result.leadingLength"
/>
<result-section
:label="`${$t('paperStrawResult.bottomPaperWidth')}`"
:value="result.bottomPaperWidth"
/>
<result-section
:label="`${$t('paperStrawResult.secondLayerPaperWidth')}`"
:value="result.secondLayerPaperWidth"
/>
<result-section
:label="`${$t('paperStrawResult.thirdLayerPaperWidth')}`"
:value="result.thirdLayerPaperWidth"
/>
<result-section
:label="`${$t('paperStrawResult.topPaperWidth')}`"
:value="result.topPaperWidth"
/>
<result-section
:label="`${$t('paperStrawResult.beltWidth')}`"
:value="result.beltWidth"
/>
</v-list>
<v-expansion-panels flat multiple>
<v-expansion-panel hide-actions>
<v-expansion-panel-title class="text-warning font-weight-bold">
<template #default="{ expanded }">
<span>
<v-icon icon="mdi-information-outline" />
{{ expanded ? $t('calculationParameters') : $t('expandToShowCalculationParameters') }}
</span>
</template>
</v-expansion-panel-title>
<v-expansion-panel-text>
<v-row>
<v-col cols="6">
<input-param-section :label="$t('paperTubeInnerDiameter')" :value="paperCoreDiameter" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('bottomPaperWidth')" :value="bottomPaperWidth" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('bottomPaperThickness')" :value="bottomPaperThickness" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('secondLayerPaperThickness')" :value="secondLayerPaperThickness" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('thirdLayerPaperThickness')" :value="thirdLayerPaperThickness" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('topPaperThickness')" :value="topPaperThickness" />
</v-col>
</v-row>
</v-expansion-panel-text>
</v-expansion-panel>
</v-expansion-panels>
</v-card>
</v-col>
</v-row>
</div>
</template>
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { createParam, type Param } from '@/types/param'
import { degreesToRadians, radiansToDegrees } from '@/utils/angle'
import ParamInputField from '../ParamInputField.vue'
const { t, locale } = useI18n()
const currentSelect = ref('')
const currentSelectIndex = ref(0)
const selects = computed(() => [
t('presetSpecification.inner_3_3_outer_4_0'),
t('presetSpecification.inner_3_8_outer_4_5'),
t('presetSpecification.inner_4_3_outer_5_0'),
t('presetSpecification.inner_5_3_outer_6_0'),
t('presetSpecification.inner_6_3_outer_7_0'),
t('presetSpecification.inner_7_3_outer_8_0'),
t('presetSpecification.inner_8_3_outer_9_0'),
t('presetSpecification.inner_9_3_outer_10_0'),
t('presetSpecification.inner_11_3_outer_12_0'),
t('custom'),
])
const presetParams = computed(() => {
return {
[t('presetSpecification.inner_3_3_outer_4_0')]: {
paperCoreDiameter: 3.3,
bottomPaperWidth: 9.5,
},
[t('presetSpecification.inner_3_8_outer_4_5')]: {
paperCoreDiameter: 3.8,
bottomPaperWidth: 10,
},
[t('presetSpecification.inner_4_3_outer_5_0')]: {
paperCoreDiameter: 4.3,
bottomPaperWidth: 11,
},
[t('presetSpecification.inner_5_3_outer_6_0')]: {
paperCoreDiameter: 5.3,
bottomPaperWidth: 13.5,
},
[t('presetSpecification.inner_6_3_outer_7_0')]: {
paperCoreDiameter: 6.3,
bottomPaperWidth: 16,
},
[t('presetSpecification.inner_7_3_outer_8_0')]: {
paperCoreDiameter: 7.3,
bottomPaperWidth: 18.5,
},
[t('presetSpecification.inner_8_3_outer_9_0')]: {
paperCoreDiameter: 8.3,
bottomPaperWidth: 21,
},
[t('presetSpecification.inner_9_3_outer_10_0')]: {
paperCoreDiameter: 9.3,
bottomPaperWidth: 23.5,
},
[t('presetSpecification.inner_11_3_outer_12_0')]: {
paperCoreDiameter: 11.3,
bottomPaperWidth: 28.5,
},
}
})
const paperCoreDiameter = ref<Param>(createParam(3.3, 'mm'))
const bottomPaperWidth = ref<Param>(createParam(9.5, 'mm'))
const bottomPaperThickness = ref<Param>(createParam(120, 'g_per_m2'))
const secondLayerPaperThickness = ref<Param>(createParam(120, 'g_per_m2'))
const thirdLayerPaperThickness = ref<Param>(createParam(60, 'g_per_m2'))
const topPaperThickness = ref<Param>(createParam(60, 'g_per_m2'))
const result = computed(() => {
// 计算逻辑待补充
const totalThickness
= (bottomPaperThickness.value.value
+ secondLayerPaperThickness.value.value
+ thirdLayerPaperThickness.value.value
+ topPaperThickness.value.value) / 800
const paperTubeExternalDiameter
= paperCoreDiameter.value.value + totalThickness * 2
const bottomPaperAngle = 90 - radiansToDegrees(Math.acos(bottomPaperWidth.value.value / (paperCoreDiameter.value.value * Math.PI)))
const leadingLength = bottomPaperWidth.value.value / Math.sin(degreesToRadians(90 - bottomPaperAngle))
const secondLayerPaperWidth = leadingLength * Math.sin(degreesToRadians(radiansToDegrees(Math.atan((paperCoreDiameter.value.value + 2 * (bottomPaperThickness.value.value / 800)) * Math.PI / leadingLength))))
const thirdLayerPaperWidth = leadingLength * Math.sin(degreesToRadians(radiansToDegrees(Math.atan((paperCoreDiameter.value.value + 2 * (bottomPaperThickness.value.value + secondLayerPaperThickness.value.value) / 800) * Math.PI / leadingLength))))
const topPaperWidth = leadingLength * Math.sin(degreesToRadians(radiansToDegrees(Math.atan((paperCoreDiameter.value.value + 2 * (bottomPaperThickness.value.value + secondLayerPaperThickness.value.value + thirdLayerPaperThickness.value.value) / 800) * Math.PI / leadingLength))))
const beltWidth = leadingLength * Math.sin(degreesToRadians(radiansToDegrees(Math.atan((paperCoreDiameter.value.value + 2 * totalThickness) * Math.PI / leadingLength))))
return {
paperCoreDiameter: paperCoreDiameter.value,
paperTubeExternalDiameter: createParam(paperTubeExternalDiameter, 'mm'),
paperTubeWallThickness: createParam(totalThickness, 'mm'),
bottomPaperAngle: createParam(bottomPaperAngle, 'degree'),
leadingLength: createParam(leadingLength, 'mm'),
bottomPaperWidth: bottomPaperWidth.value,
secondLayerPaperWidth: createParam(secondLayerPaperWidth, 'mm'),
thirdLayerPaperWidth: createParam(thirdLayerPaperWidth, 'mm'),
topPaperWidth: createParam(topPaperWidth, 'mm'),
beltWidth: createParam(beltWidth, 'mm'),
}
})
const resetParameters = () => {
paperCoreDiameter.value = createParam(3.3, 'mm')
bottomPaperWidth.value = createParam(9.5, 'mm')
bottomPaperThickness.value = createParam(120, 'g_per_m2')
secondLayerPaperThickness.value = createParam(120, 'g_per_m2')
thirdLayerPaperThickness.value = createParam(60, 'g_per_m2')
topPaperThickness.value = createParam(60, 'g_per_m2')
}
const updateParams = (item: string) => {
const selected = presetParams.value[item]
currentSelectIndex.value = selects.value.indexOf(item)
if (selected) {
paperCoreDiameter.value = createParam(selected.paperCoreDiameter, 'mm')
bottomPaperWidth.value = createParam(selected.bottomPaperWidth, 'mm')
}
}
const isCustomMode = computed(() => {
return currentSelectIndex.value === selects.value.length - 1
})
onMounted(() => {
currentSelect.value = selects.value[0]
updateParams(currentSelect.value)
})
watch(locale, () => {
currentSelect.value = selects.value[currentSelectIndex.value]
updateParams(currentSelect.value)
})
</script>

View File

@ -27,7 +27,7 @@
<param-input-field
v-model="paperCoreDiameter"
:disabled="recordList.length > 0"
:label="$t('paperCoreDiameter')"
:label="$t('paperTubeInnerDiameter')"
/>
</v-col>
<v-col cols="12">
@ -175,7 +175,7 @@
}
const paperCoreDiameter = ref<Param>(createParam(76.2, 'mm'))
const bottomPaperWidth = ref<Param>(createParam(100, 'mm'))
const bottomPaperWidth = ref<Param>(createParam(105, 'mm'))
const paperGrammage = ref<Param>(createParam(420, 'g_per_m2'))
const paperDensity = ref<Param>(createParam(0.76, 'g_per_cm3'))

View File

@ -93,26 +93,57 @@
{{ $t('results') }}
</v-card-title>
<v-row>
<v-col cols="12">
<result-card
<v-list lines="two">
<result-section
:label="$t('paperRollWeight')"
:value="result.paperRollWeight"
/>
</v-col>
<v-col cols="12">
<result-card
<result-section
:label="$t('paperRollLength')"
:value="result.paperRollLength"
/>
</v-col>
<v-col cols="12">
<result-card
<result-section
:label="$t('paperThickness')"
:value="result.paperThickness"
/>
</v-list>
<v-expansion-panels flat multiple>
<v-expansion-panel hide-actions>
<v-expansion-panel-title class="text-warning font-weight-bold">
<template #default="{ expanded }">
<span>
<v-icon icon="mdi-information-outline" />
{{ expanded ? $t('calculationParameters') : $t('expandToShowCalculationParameters') }}
</span>
</template>
</v-expansion-panel-title>
<v-expansion-panel-text>
<v-row>
<v-col cols="6">
<input-param-section :label="$t('paperCoreDiameter')" :value="paperCoreDiameter" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('paperRollExternalDiameter')" :value="paperRollExternalDiameter" />
</v-col>
</v-row>
<v-row>
<v-col cols="6">
<input-param-section :label="$t('paperRollWidth')" :value="paperRollWidth" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('paperDensity')" :value="paperDensity" />
</v-col>
</v-row>
<v-row>
<v-col cols="6">
<input-param-section :label="$t('paperGrammage')" :value="paperGrammage" />
</v-col>
</v-row>
</v-expansion-panel-text>
</v-expansion-panel>
</v-expansion-panels>
</v-card>
</v-col>
</v-row>
@ -124,8 +155,8 @@
import { createParam, type Param } from '@/types/param'
const paperCoreDiameter = ref<Param>(createParam(76.2, 'mm'))
const paperRollExternalDiameter = ref<Param>(createParam(200, 'mm'))
const paperRollWidth = ref<Param>(createParam(100, 'mm'))
const paperRollExternalDiameter = ref<Param>(createParam(1200, 'mm'))
const paperRollWidth = ref<Param>(createParam(1600, 'mm'))
const paperDensity = ref<Param>(createParam(0.76, 'g_per_cm3'))
const paperGrammage = ref<Param>(createParam(420, 'g_per_m2'))

View File

@ -26,7 +26,7 @@
<v-col cols="12">
<param-input-field
v-model="paperCoreDiameter"
:label="$t('paperCoreDiameter')"
:label="$t('paperTubeInnerDiameter')"
/>
</v-col>
<v-col cols="12">
@ -68,20 +68,38 @@
{{ $t('results') }}
</v-card-title>
<v-list lines="two">
<result-section :label="$t('beltAngle')" :value="result.beltAngle" />
<result-section :label="$t('paperHolderAngle')" :value="result.paperHolderAngle" />
<result-section :label="$t('leadingLength')" :value="result.leadingLength" />
<result-section :label="$t('paperWidth')" :value="result.paperWidth" />
</v-list>
<v-expansion-panels flat multiple>
<v-expansion-panel hide-actions>
<v-expansion-panel-title class="text-warning font-weight-bold">
<template #default="{ expanded }">
<span>
<v-icon icon="mdi-information-outline" />
{{ expanded ? $t('calculationParameters') : $t('expandToShowCalculationParameters') }}
</span>
</template>
</v-expansion-panel-title>
<v-expansion-panel-text>
<v-row>
<v-col cols="12">
<result-card :label="$t('beltAngle')" :value="result.beltAngle" />
<v-col cols="6">
<input-param-section :label="$t('paperTubeInnerDiameter')" :value="paperCoreDiameter" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('paperRollWallThickness')" :value="paperRollWallThickness" />
</v-col>
<v-col cols="12">
<result-card :label="$t('paperHolderAngle')" :value="result.paperHolderAngle" />
</v-col>
<v-col cols="12">
<result-card :label="$t('leadingLength')" :value="result.leadingLength" />
</v-col>
<v-col cols="12">
<result-card :label="$t('paperWidth')" :value="result.paperWidth" />
<input-param-section :label="$t('innerPaperWidth')" :value="innerPaperWidth" />
</v-col>
</v-row>
</v-expansion-panel-text>
</v-expansion-panel>
</v-expansion-panels>
</v-card>
</v-col>
</v-row>

View File

@ -26,7 +26,7 @@
<v-col cols="12">
<param-input-field
v-model="paperCoreDiameter"
:label="$t('paperCoreDiameter')"
:label="$t('paperTubeInnerDiameter')"
/>
</v-col>
<v-col cols="12">
@ -111,44 +111,80 @@
{{ $t('results') }}
</v-card-title>
<v-row>
<v-col cols="12">
<result-card
<v-list lines="two">
<result-section
:label="$t('feedPaperSpeed')"
:value="result.feedPaperSpeed"
/>
</v-col>
<v-col cols="12">
<result-card
<result-section
:label="$t('outputSpeed')"
:value="result.outputSpeed"
/>
</v-col>
<v-col cols="12">
<result-card
<result-section
:label="$t('productionAmountPerHour')"
:value="result.productionAmountPerHour"
/>
</v-col>
<v-col cols="12">
<result-card
<result-section
:label="$t('productionWeightPerHour')"
:value="result.productionWeightPerHour"
/>
</v-col>
<v-col cols="12">
<result-card
<result-section
:label="$t('productionAmountPerDay')"
:value="result.productionAmountPerDay"
/>
</v-col>
<v-col cols="12">
<result-card
<result-section
:label="$t('productionWeightPerDay')"
:value="result.productionWeightPerDay"
/>
</v-list>
<v-expansion-panels flat multiple>
<v-expansion-panel hide-actions>
<v-expansion-panel-title class="text-warning font-weight-bold">
<template #default="{ expanded }">
<span>
<v-icon icon="mdi-information-outline" />
{{ expanded ? $t('calculationParameters') : $t('expandToShowCalculationParameters') }}
</span>
</template>
</v-expansion-panel-title>
<v-expansion-panel-text>
<v-row>
<v-col cols="6">
<input-param-section :label="$t('paperTubeInnerDiameter')" :value="paperCoreDiameter" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('paperRollWallThickness')" :value="paperRollWallThickness" />
</v-col>
</v-row>
<v-row>
<v-col cols="6">
<input-param-section :label="$t('paperRollLength')" :value="paperRollLength" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('paperDensity')" :value="paperDensity" />
</v-col>
</v-row>
<v-row>
<v-col cols="6">
<input-param-section :label="$t('innerPaperWidth')" :value="innerPaperWidth" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('workFrequency')" :value="workFrequency" />
</v-col>
</v-row>
<v-row>
<v-col cols="6">
<input-param-section :label="$t('workTime')" :value="workTime" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('workEfficiency')" :value="workEfficiency" />
</v-col>
</v-row>
</v-expansion-panel-text>
</v-expansion-panel>
</v-expansion-panels>
</v-card>
</v-col>
</v-row>

View File

@ -44,7 +44,7 @@
<v-col cols="12">
<param-input-field
v-model="paperCoreDiameter"
:label="$t('paperCoreDiameter')"
:label="$t('paperTubeInnerDiameter')"
/>
</v-col>
<v-col cols="12">
@ -93,21 +93,55 @@
{{ $t('results') }}
</v-card-title>
<v-list lines="two">
<result-section :label="$t('singlePaperTubeWeight')" :value="result.singlePaperTubeWeight" />
<result-section :label="$t('totalPaperTubeWeight')" :value="result.totalPaperTubeWeight" />
</v-list>
<v-expansion-panels flat multiple>
<v-expansion-panel hide-actions>
<v-expansion-panel-title class="text-warning font-weight-bold">
<template #default="{ expanded }">
<span>
<v-icon icon="mdi-information-outline" />
{{ expanded ? $t('calculationParameters') : $t('expandToShowCalculationParameters') }}
</span>
</template>
</v-expansion-panel-title>
<v-expansion-panel-text>
<v-row>
<v-col cols="12">
<result-card
:label="`${$t('singlePaperTubeWeight')}`"
:value="result.singlePaperTubeWeight"
/>
<v-col cols="6">
<input-param-section :label="$t('paperRollLength')" :value="paperRollLength" />
</v-col>
<v-col cols="12">
<result-card
:label="`${$t('totalPaperTubeWeight')}`"
:value="result.totalPaperTubeWeight"
<v-col cols="6">
<input-param-section
:label="$t('paperDensity')"
:value="paperDensity"
/>
</v-col>
</v-row>
<v-row>
<v-col cols="6">
<input-param-section
:fixed="0"
:label="$t('productionAmount')"
:value="productionAmount"
/>
</v-col>
<v-col cols="6">
<input-param-section :label="$t('paperTubeInnerDiameter')" :value="paperCoreDiameter" />
</v-col>
</v-row>
<v-row>
<v-col cols="6">
<input-param-section :label="$t('paperRollWallThickness')" :value="paperRollWallThickness" />
</v-col>
</v-row>
</v-expansion-panel-text>
</v-expansion-panel>
</v-expansion-panels>
</v-card>
</v-col>
</v-row>
</div>
@ -138,7 +172,7 @@
const resetParameters = () => {
paperRollLength.value = createParam(1000, 'mm')
paperDensity.value = createParam(0.76, 'gpcm3')
paperDensity.value = createParam(0.76, 'g_per_cm3')
productionAmount.value = createParam(1000, 'pcs')
paperCoreDiameter.value = createParam(76.2, 'mm')
paperRollWallThickness.value = createParam(10, 'mm')

View File

@ -0,0 +1,273 @@
<template>
<div class="calculator-container">
<v-row justify="center">
<!-- 参数输入区域 -->
<v-col cols="12" lg="5" md="6">
<v-card class="pa-6 parameter-card" elevation="8" rounded="xl">
<v-card-title class="text-h5 mb-6 d-flex align-center">
<v-icon class="mr-3" color="primary" icon="mdi-tune" size="large" />
{{ $t('parameters') }}
</v-card-title>
<v-row>
<v-col cols="6">
<v-select
v-model="currentSelect"
density="comfortable"
:items="selects"
:label="$t('presetSpecifications')"
@update:model-value="updateParams"
/>
</v-col>
<v-col cols="12">
<param-input-field v-model="paperCoreDiameter" :disabled="!isCustomMode" :label="$t('paperTubeInnerDiameter')" />
</v-col>
<v-col cols="12">
<param-input-field v-model="bottomPaperWidth" :disabled="!isCustomMode" :label="$t('bottomPaperWidth')" />
</v-col>
<v-col cols="12">
<param-input-field v-model="bottomPaperThickness" :label="$t('bottomPaperThickness')" />
</v-col>
<v-col cols="12">
<param-input-field v-model="middlePaperThickness" :label="$t('middlePaperThickness')" />
</v-col>
<v-col cols="12">
<param-input-field v-model="topPaperThickness" :label="$t('topPaperThickness')" />
</v-col>
</v-row>
<v-divider class="my-6" />
<v-row>
<v-btn
block
color="warning"
prepend-icon="mdi-refresh"
size="large"
variant="outlined"
@click="resetParameters"
>
{{ $t('reset') }}
</v-btn>
</v-row>
</v-card>
</v-col>
<!-- 计算结果区域 -->
<v-col cols="12" lg="5" md="6">
<v-card class="pa-6 result-card" elevation="8" rounded="xl">
<v-card-title class="text-h5 mb-6 d-flex align-center">
<v-icon
class="mr-3"
color="primary"
icon="mdi-calculator"
size="large"
/>
{{ $t('results') }}
</v-card-title>
<v-list lines="two">
<result-section
:label="`${$t('paperStrawResult.paperTubeInnerDiameter')}`"
:value="result.paperCoreDiameter"
/>
<result-section
:label="`${$t('paperStrawResult.paperTubeExternalDiameter')}`"
:value="result.paperTubeExternalDiameter"
/>
<result-section
:label="`${$t('paperStrawResult.paperTubeThickness')}`"
:value="result.paperTubeWallThickness"
/>
<result-section
:label="`${$t('paperStrawResult.bottomPaperAngle')}`"
:value="result.bottomPaperAngle"
/>
<result-section
:label="`${$t('paperStrawResult.leadingLength')}`"
:value="result.leadingLength"
/>
<result-section
:label="`${$t('paperStrawResult.bottomPaperWidth')}`"
:value="result.bottomPaperWidth"
/>
<result-section
:label="`${$t('paperStrawResult.middlePaperWidth')}`"
:value="result.middlePaperWidth"
/>
<result-section
:label="`${$t('paperStrawResult.topPaperWidth')}`"
:value="result.topPaperWidth"
/>
<result-section
:label="`${$t('paperStrawResult.beltWidth')}`"
:value="result.beltWidth"
/>
</v-list>
<v-expansion-panels flat multiple>
<v-expansion-panel hide-actions>
<v-expansion-panel-title class="text-warning font-weight-bold">
<template #default="{ expanded }">
<span>
<v-icon icon="mdi-information-outline" />
{{ expanded ? $t('calculationParameters') : $t('expandToShowCalculationParameters') }}
</span>
</template>
</v-expansion-panel-title>
<v-expansion-panel-text>
<v-row>
<v-col cols="6">
<input-param-section :label="$t('paperTubeInnerDiameter')" :value="paperCoreDiameter" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('bottomPaperWidth')" :value="bottomPaperWidth" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('bottomPaperThickness')" :value="bottomPaperThickness" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('middlePaperThickness')" :value="middlePaperThickness" />
</v-col>
<v-col cols="6">
<input-param-section :label="$t('topPaperThickness')" :value="topPaperThickness" />
</v-col>
</v-row>
</v-expansion-panel-text>
</v-expansion-panel>
</v-expansion-panels>
</v-card>
</v-col>
</v-row>
</div>
</template>
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { createParam, type Param } from '@/types/param'
import { degreesToRadians, radiansToDegrees } from '@/utils/angle'
import ParamInputField from '../ParamInputField.vue'
const { t, locale } = useI18n()
const currentSelect = ref('')
const currentSelectIndex = ref(0)
const selects = computed(() => [
t('presetSpecification.inner_3_3_outer_4_0'),
t('presetSpecification.inner_3_8_outer_4_5'),
t('presetSpecification.inner_4_3_outer_5_0'),
t('presetSpecification.inner_5_3_outer_6_0'),
t('presetSpecification.inner_6_3_outer_7_0'),
t('presetSpecification.inner_7_3_outer_8_0'),
t('presetSpecification.inner_8_3_outer_9_0'),
t('presetSpecification.inner_9_3_outer_10_0'),
t('presetSpecification.inner_11_3_outer_12_0'),
t('custom'),
])
const presetParams = computed(() => {
return {
[t('presetSpecification.inner_3_3_outer_4_0')]: {
paperCoreDiameter: 3.3,
bottomPaperWidth: 9.5,
},
[t('presetSpecification.inner_3_8_outer_4_5')]: {
paperCoreDiameter: 3.8,
bottomPaperWidth: 10,
},
[t('presetSpecification.inner_4_3_outer_5_0')]: {
paperCoreDiameter: 4.3,
bottomPaperWidth: 11,
},
[t('presetSpecification.inner_5_3_outer_6_0')]: {
paperCoreDiameter: 5.3,
bottomPaperWidth: 13.5,
},
[t('presetSpecification.inner_6_3_outer_7_0')]: {
paperCoreDiameter: 6.3,
bottomPaperWidth: 16,
},
[t('presetSpecification.inner_7_3_outer_8_0')]: {
paperCoreDiameter: 7.3,
bottomPaperWidth: 18.5,
},
[t('presetSpecification.inner_8_3_outer_9_0')]: {
paperCoreDiameter: 8.3,
bottomPaperWidth: 21,
},
[t('presetSpecification.inner_9_3_outer_10_0')]: {
paperCoreDiameter: 9.3,
bottomPaperWidth: 23.5,
},
[t('presetSpecification.inner_11_3_outer_12_0')]: {
paperCoreDiameter: 11.3,
bottomPaperWidth: 28.5,
},
}
})
const paperCoreDiameter = ref<Param>(createParam(3.3, 'mm'))
const bottomPaperWidth = ref<Param>(createParam(9.5, 'mm'))
const bottomPaperThickness = ref<Param>(createParam(120, 'g_per_m2'))
const middlePaperThickness = ref<Param>(createParam(120, 'g_per_m2'))
const topPaperThickness = ref<Param>(createParam(60, 'g_per_m2'))
const result = computed(() => {
// 计算逻辑待补充
const totalThickness
= (bottomPaperThickness.value.value
+ middlePaperThickness.value.value
+ topPaperThickness.value.value) / 800
const paperTubeExternalDiameter
= paperCoreDiameter.value.value + totalThickness * 2
const bottomPaperAngle = 90 - radiansToDegrees(Math.acos(bottomPaperWidth.value.value / (paperCoreDiameter.value.value * Math.PI)))
const leadingLength = bottomPaperWidth.value.value / Math.sin(degreesToRadians(90 - bottomPaperAngle))
const middlePaperWidth = leadingLength * Math.sin(degreesToRadians(radiansToDegrees(Math.atan((paperCoreDiameter.value.value + 2 * (bottomPaperThickness.value.value / 800)) * Math.PI / leadingLength))))
const topPaperWidth = leadingLength * Math.sin(degreesToRadians(radiansToDegrees(Math.atan((paperCoreDiameter.value.value + 2 * (bottomPaperThickness.value.value + middlePaperThickness.value.value) / 800) * Math.PI / leadingLength))))
const beltWidth = leadingLength * Math.sin(degreesToRadians(radiansToDegrees(Math.atan((paperCoreDiameter.value.value + 2 * totalThickness) * Math.PI / leadingLength))))
return {
paperCoreDiameter: paperCoreDiameter.value,
paperTubeExternalDiameter: createParam(paperTubeExternalDiameter, 'mm'),
paperTubeWallThickness: createParam(totalThickness, 'mm'),
bottomPaperAngle: createParam(bottomPaperAngle, 'degree'),
leadingLength: createParam(leadingLength, 'mm'),
bottomPaperWidth: bottomPaperWidth.value,
middlePaperWidth: createParam(middlePaperWidth, 'mm'),
topPaperWidth: createParam(topPaperWidth, 'mm'),
beltWidth: createParam(beltWidth, 'mm'),
}
})
const resetParameters = () => {
paperCoreDiameter.value = createParam(3.3, 'mm')
bottomPaperWidth.value = createParam(9.5, 'mm')
bottomPaperThickness.value = createParam(120, 'g_per_m2')
middlePaperThickness.value = createParam(120, 'g_per_m2')
topPaperThickness.value = createParam(60, 'g_per_m2')
}
const updateParams = (item: string) => {
const selected = presetParams.value[item]
currentSelectIndex.value = selects.value.indexOf(item)
if (selected) {
paperCoreDiameter.value = createParam(selected.paperCoreDiameter, 'mm')
bottomPaperWidth.value = createParam(selected.bottomPaperWidth, 'mm')
}
}
const isCustomMode = computed(() => {
return currentSelectIndex.value === selects.value.length - 1
})
onMounted(() => {
currentSelect.value = selects.value[0]
updateParams(currentSelect.value)
})
watch(locale, () => {
currentSelect.value = selects.value[currentSelectIndex.value]
updateParams(currentSelect.value)
})
</script>

View File

@ -0,0 +1,21 @@
<template>
<div>
<v-list-item>
<v-list-item-title class="text-h4 text-primary font-weight-bold">
{{ value.value.toFixed(2) }} {{ $t(`units.${value.unit}`) }}
</v-list-item-title>
<v-list-item-subtitle>
{{ label }}
</v-list-item-subtitle>
</v-list-item>
</div>
</template>
<script setup lang="ts">
import type { Param } from '@/types/param'
defineProps<{
label: string
value: Param
}>()
</script>

View File

@ -30,4 +30,12 @@ export const navigationConfig: NavigationItem[] = [
title: 'multiLayerPaperTapeWidthAngleCalculate',
to: '/calculators/multi-layer-paper-tape-width-angle',
},
{
title: '3LayerPaperStrawCalculate',
to: '/calculators/three-layer-paper-straw',
},
{
title: '4LayerPaperStrawCalculate',
to: '/calculators/four-layer-paper-straw',
},
]

View File

@ -3,6 +3,7 @@
"beltSpecificationCalculate": "Belt Specification",
"multiLayerPaperTapeWidthAngleCalculate": "MultiLayer Paper Tape Width & Angle",
"paperCoreDiameter": "Paper core diameter",
"paperTubeInnerDiameter": "Paper tube inner diameter",
"paperDensity": "Paper density",
"paperGrammage": "Grammage",
"paperRollExternalDiameter": "Paper roll external diameter",

View File

@ -3,6 +3,7 @@
"beltSpecificationCalculate": "Спецификация ремня",
"multiLayerPaperTapeWidthAngleCalculate": "Ширина и угол многослойной бумажной ленты",
"paperCoreDiameter": "Диаметр бумажного сердечника",
"paperTubeInnerDiameter": "Внутренний диаметр бумажной трубки",
"paperDensity": "Плотность бумаги",
"paperGrammage": "Граммаж",
"paperRollExternalDiameter": "Внешний диаметр бумажного рулона",

View File

@ -3,6 +3,7 @@
"beltSpecificationCalculate": "Especificación de Correa",
"multiLayerPaperTapeWidthAngleCalculate": "Ancho y Ángulo de Cinta de Papel Multicapa",
"paperCoreDiameter": "Diámetro del núcleo de papel",
"paperTubeInnerDiameter": "Diámetro interior del tubo de papel",
"paperDensity": "Densidad del papel",
"paperGrammage": "Gramaje",
"paperRollExternalDiameter": "Diámetro externo del rollo de papel",

View File

@ -3,6 +3,7 @@
"beltSpecificationCalculate": "皮带规格计算",
"multiLayerPaperTapeWidthAngleCalculate": "多层纸带宽度角度计算",
"paperCoreDiameter": "纸芯内径",
"paperTubeInnerDiameter": "纸管内径",
"paperDensity": "纸张密度",
"paperGrammage": "纸张克重",
"paperRollExternalDiameter": "纸卷外径",
@ -12,6 +13,8 @@
"paperTapeWidthAngleCalculate": "纸带宽度角度计算",
"paperTubeProductionCalculate": "纸管产能计算",
"paperTubeWeightCalculate": "纸管重量计算",
"3LayerPaperStrawCalculate": "三层纸吸管计算",
"4LayerPaperStrawCalculate": "四层纸吸管计算",
"parameters": "参数",
"productionAmount": "生产数量",
"reset": "重置",
@ -72,6 +75,36 @@
"officialWebsite": "官方网站",
"loading": "加载中",
"paperTapeWidth": "纸带宽度",
"presetSpecifications": "预设规格",
"bottomPaperThickness": "底层纸厚度",
"middlePaperThickness": "中层纸厚度",
"secondLayerPaperThickness": "第二层纸厚度",
"thirdLayerPaperThickness": "第三层纸厚度",
"topPaperThickness": "顶层纸厚度",
"paperStrawResult": {
"paperTubeInnerDiameter": "纸管内径",
"paperTubeExternalDiameter": "纸管外径",
"paperTubeThickness": "纸管壁厚",
"bottomPaperAngle": "底层纸角度",
"leadingLength": "导程",
"bottomPaperWidth": "底层纸宽度",
"middlePaperWidth": "中层纸宽度",
"secondLayerPaperWidth": "第二层纸宽度",
"thirdLayerPaperWidth": "第三层纸宽度",
"topPaperWidth": "顶层纸宽度",
"beltWidth": "皮带宽度"
},
"presetSpecification": {
"inner_3_3_outer_4_0": "内径3.3mm外径4.0mm",
"inner_3_8_outer_4_5": "内径3.8mm外径4.5mm",
"inner_4_3_outer_5_0": "内径4.3mm外径5.0mm",
"inner_5_3_outer_6_0": "内径5.3mm外径6.0mm",
"inner_6_3_outer_7_0": "内径6.3mm外径7.0mm",
"inner_7_3_outer_8_0": "内径7.3mm外径8.0mm",
"inner_8_3_outer_9_0": "内径8.3mm外径9.0mm",
"inner_9_3_outer_10_0": "内径9.3mm外径10.0mm",
"inner_11_3_outer_12_0": "内径11.3mm外径12.0mm"
},
"units": {
"mm": "mm",
"m": "m",
@ -88,5 +121,7 @@
"kg_per_day": "kg/d",
"pcs_per_day": "pcs/d",
"degree": "°"
}
},
"calculationParameters": "计算参数",
"expandToShowCalculationParameters": "展开以显示计算参数"
}

View File

@ -0,0 +1,13 @@
<template>
<FourLayerPaperStrawCalculate />
</template>
<script setup lang="ts">
import FourLayerPaperStrawCalculate from '@/components/Modules/FourLayerPaperStrawCalculate.vue'
</script>
<route lang="yaml">
meta:
layout: CalculatorLayout
title: 4LayerPaperStraw
</route>

View File

@ -0,0 +1,13 @@
<template>
<ThreeLayerPaperStrawCalculate />
</template>
<script setup lang="ts">
import ThreeLayerPaperStrawCalculate from '@/components/Modules/ThreeLayerPaperStrawCalculate.vue'
</script>
<route lang="yaml">
meta:
layout: CalculatorLayout
title: 3LayerPaperStraw
</route>

View File

@ -30,6 +30,11 @@ const jinshenLightTheme: ThemeDefinition = {
export default createVuetify({
theme: {
defaultTheme: 'light',
variations: {
colors: ['primary', 'secondary', 'success', 'info', 'warning', 'error'],
lighten: 5,
darken: 5,
},
themes: {
light: jinshenLightTheme,
},

View File

@ -20,10 +20,12 @@ declare module 'vue-router/auto-routes' {
export interface RouteNamedMap {
'/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
'/calculators/belt-specification': RouteRecordInfo<'/calculators/belt-specification', '/calculators/belt-specification', Record<never, never>, Record<never, never>>,
'/calculators/four-layer-paper-straw': RouteRecordInfo<'/calculators/four-layer-paper-straw', '/calculators/four-layer-paper-straw', Record<never, never>, Record<never, never>>,
'/calculators/multi-layer-paper-tape-width-angle': RouteRecordInfo<'/calculators/multi-layer-paper-tape-width-angle', '/calculators/multi-layer-paper-tape-width-angle', Record<never, never>, Record<never, never>>,
'/calculators/paper-roll-weight-length': RouteRecordInfo<'/calculators/paper-roll-weight-length', '/calculators/paper-roll-weight-length', Record<never, never>, Record<never, never>>,
'/calculators/paper-tape-width-angle': RouteRecordInfo<'/calculators/paper-tape-width-angle', '/calculators/paper-tape-width-angle', Record<never, never>, Record<never, never>>,
'/calculators/paper-tube-production': RouteRecordInfo<'/calculators/paper-tube-production', '/calculators/paper-tube-production', Record<never, never>, Record<never, never>>,
'/calculators/paper-tube-weight': RouteRecordInfo<'/calculators/paper-tube-weight', '/calculators/paper-tube-weight', Record<never, never>, Record<never, never>>,
'/calculators/three-layer-paper-straw': RouteRecordInfo<'/calculators/three-layer-paper-straw', '/calculators/three-layer-paper-straw', Record<never, never>, Record<never, never>>,
}
}