Compare commits
25 Commits
Router
...
b894d2a4ae
| Author | SHA1 | Date | |
|---|---|---|---|
| b894d2a4ae | |||
| 5651405605 | |||
| c6190a0788 | |||
| 17bda531d7 | |||
| ca5d33cf09 | |||
| 6a214b3796 | |||
| a5abfa5122 | |||
| ec333c105c | |||
| b3266a438e | |||
| 2cff599229 | |||
| c646e572d9 | |||
| 6b7ef4c994 | |||
| 21dbc31aa3 | |||
| 38d10d7151 | |||
| 25d4dc7a7f | |||
| e9d254c4e7 | |||
| c85afc9bde | |||
| 1733d2ae5b | |||
| cb743741d2 | |||
| 22caff155b | |||
| 32e8e549dc | |||
| 8080976772 | |||
| 9720bf05c6 | |||
| bdb02fd147 | |||
| bed128a0ba |
@ -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
BIN
public/apple-touch-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
5
src/components.d.ts
vendored
5
src/components.d.ts
vendored
@ -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']
|
||||
}
|
||||
}
|
||||
|
||||
20
src/components/InputParamSection.vue
Normal file
20
src/components/InputParamSection.vue
Normal 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>
|
||||
@ -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
|
||||
:label="`${$t('recommendBeltThickness')} (${result.recommendBeltThickness.unit})`"
|
||||
:value="result.recommendBeltThickness"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<result-card
|
||||
:label="`${$t('recommendBeltWidth')} (${result.recommendBeltWidth.unit})`"
|
||||
:value="result.recommendBeltWidth"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<result-card
|
||||
:label="`${$t('recommendBeltLength')} (${result.recommendBeltLength.unit})`"
|
||||
:value="result.recommendBeltLength"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-list lines="two">
|
||||
<result-section
|
||||
:label="`${$t('recommendBeltThickness')}`"
|
||||
:value="result.recommendBeltThickness"
|
||||
/>
|
||||
<result-section
|
||||
:label="`${$t('recommendBeltWidth')}`"
|
||||
:value="result.recommendBeltWidth"
|
||||
/>
|
||||
<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>
|
||||
@ -124,8 +150,8 @@
|
||||
t('50_120Series'),
|
||||
t('200_Series'),
|
||||
t('600_Series'),
|
||||
t('new_120Series'),
|
||||
t('new_200_Series'),
|
||||
t('PT23-120_Series'),
|
||||
t('PT23-200_Series'),
|
||||
t('custom'),
|
||||
])
|
||||
|
||||
@ -199,11 +225,11 @@
|
||||
maxWheelbase: 1675,
|
||||
hubDiameter: 320,
|
||||
},
|
||||
[t('new_120Series')]: {
|
||||
[t('PT23-120_Series')]: {
|
||||
maxWheelbase: 900,
|
||||
hubDiameter: 240,
|
||||
},
|
||||
[t('new_200_Series')]: {
|
||||
[t('PT23-200_Series')]: {
|
||||
maxWheelbase: 1100,
|
||||
hubDiameter: 268,
|
||||
},
|
||||
|
||||
289
src/components/Modules/FourLayerPaperStrawCalculate.vue
Normal file
289
src/components/Modules/FourLayerPaperStrawCalculate.vue
Normal 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>
|
||||
@ -27,26 +27,26 @@
|
||||
<param-input-field
|
||||
v-model="paperCoreDiameter"
|
||||
:disabled="recordList.length > 0"
|
||||
:label="`${$t('paperCoreDiameter')} (${paperCoreDiameter.unit})`"
|
||||
:label="$t('paperTubeInnerDiameter')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="bottomPaperWidth"
|
||||
:disabled="recordList.length > 0"
|
||||
:label="`${$t('bottomPaperWidth')} (${bottomPaperWidth.unit})`"
|
||||
:label="$t('bottomPaperWidth')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperGrammage"
|
||||
:label="`${$t('paperGrammage')} (${paperGrammage.unit})`"
|
||||
:label="$t('paperGrammage')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperDensity"
|
||||
:label="`${$t('paperDensity')} (${paperDensity.unit})`"
|
||||
:label="$t('paperDensity')"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@ -137,16 +137,16 @@
|
||||
<th>{{ $t('paperGrammage') }}</th>
|
||||
<th>{{ $t('cumulativeThickness') }}</th>
|
||||
<th>{{ $t('angle') }}</th>
|
||||
<th>{{ $t('paperWidth') }}</th>
|
||||
<th>{{ $t('paperTapeWidth') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<transition-group name="fade" tag="tbody">
|
||||
<tr v-for="(record, index) in recordList" :key="index" class="table-row-item">
|
||||
<td>{{ record.layer }}</td>
|
||||
<td>{{ record.grammage.value.toFixed(2) }} {{ record.grammage.unit }}</td>
|
||||
<td>{{ record.cumulativeThickness.value.toFixed(2) }} {{ record.cumulativeThickness.unit }}</td>
|
||||
<td>{{ record.angle.value.toFixed(2) }} {{ record.angle.unit }}</td>
|
||||
<td>{{ record.paperWidth.value.toFixed(2) }} {{ record.paperWidth.unit }}</td>
|
||||
<td>{{ record.grammage.value }} {{ $t(`units.${record.grammage.unit}`) }}</td>
|
||||
<td>{{ record.cumulativeThickness.value.toFixed(2) }} {{ $t(`units.${record.cumulativeThickness.unit}`) }}</td>
|
||||
<td>{{ record.angle.value.toFixed(2) }} {{ $t(`units.${record.angle.unit}`) }}</td>
|
||||
<td>{{ record.paperWidth.value.toFixed(2) }} {{ $t(`units.${record.paperWidth.unit}`) }}</td>
|
||||
</tr>
|
||||
</transition-group>
|
||||
</v-table>
|
||||
@ -175,9 +175,9 @@
|
||||
}
|
||||
|
||||
const paperCoreDiameter = ref<Param>(createParam(76.2, 'mm'))
|
||||
const bottomPaperWidth = ref<Param>(createParam(100, 'mm'))
|
||||
const paperGrammage = ref<Param>(createParam(420, 'g/m²'))
|
||||
const paperDensity = ref<Param>(createParam(0.76, 'g/cm³'))
|
||||
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'))
|
||||
|
||||
const recordList = ref<LayerRecord[]>([])
|
||||
|
||||
@ -195,7 +195,7 @@
|
||||
layer: recordList.value.length + 1,
|
||||
grammage: paperGrammage.value,
|
||||
cumulativeThickness: createParam(paperTotalThickness + paperRollWallThickness, 'mm'),
|
||||
angle: createParam(beltAngle, '°'),
|
||||
angle: createParam(beltAngle, 'degree'),
|
||||
paperWidth: createParam(paperWidth, 'mm'),
|
||||
}
|
||||
})
|
||||
@ -338,13 +338,13 @@
|
||||
// 添加Results表头列名
|
||||
worksheet.getCell('A8').value = t('layer')
|
||||
worksheet.getCell('A8').style = parameterStyle
|
||||
worksheet.getCell('B8').value = t('paperGrammage') + ` (${recordList.value[0].grammage.unit})`
|
||||
worksheet.getCell('B8').value = t('paperGrammage') + ` (${t(`units.${recordList.value[0].grammage.unit}`)})`
|
||||
worksheet.getCell('B8').style = parameterStyle
|
||||
worksheet.getCell('C8').value = t('cumulativeThickness') + ` (${recordList.value[0].cumulativeThickness.unit})`
|
||||
worksheet.getCell('C8').value = t('cumulativeThickness') + ` (${t(`units.${recordList.value[0].cumulativeThickness.unit}`)})`
|
||||
worksheet.getCell('C8').style = parameterStyle
|
||||
worksheet.getCell('D8').value = t('angle') + ` (${recordList.value[0].angle.unit})`
|
||||
worksheet.getCell('D8').value = t('angle') + ` (${t(`units.${recordList.value[0].angle.unit}`)})`
|
||||
worksheet.getCell('D8').style = parameterStyle
|
||||
worksheet.getCell('E8').value = t('paperWidth') + ` (${recordList.value[0].paperWidth.unit})`
|
||||
worksheet.getCell('E8').value = t('paperWidth') + ` (${t(`units.${recordList.value[0].paperWidth.unit}`)})`
|
||||
worksheet.getCell('E8').style = parameterStyle
|
||||
|
||||
// 添加Results数据
|
||||
@ -420,7 +420,7 @@
|
||||
worksheet.mergeCells('F5:H6')
|
||||
|
||||
// 自动调整列宽
|
||||
for (const [index, column] of worksheet.columns.entries()) {
|
||||
for (const [_index, column] of worksheet.columns.entries()) {
|
||||
let maxLength = 0
|
||||
|
||||
if (column && typeof column.eachCell === 'function') {
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
md="6"
|
||||
>
|
||||
<v-card
|
||||
class="pa-6 parameters-card"
|
||||
class="pa-6 parameter-card"
|
||||
elevation="8"
|
||||
rounded="xl"
|
||||
>
|
||||
@ -28,31 +28,31 @@
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperCoreDiameter"
|
||||
:label="`${$t('paperCoreDiameter')} (${paperCoreDiameter.unit})`"
|
||||
:label="$t('paperCoreDiameter')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperRollExternalDiameter"
|
||||
:label="`${$t('paperRollExternalDiameter')} (${paperRollExternalDiameter.unit})`"
|
||||
:label="$t('paperRollExternalDiameter')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperRollWidth"
|
||||
:label="`${$t('paperRollWidth')} (${paperRollWidth.unit})`"
|
||||
:label="$t('paperRollWidth')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperDensity"
|
||||
:label="`${$t('paperDensity')} (${paperDensity.unit})`"
|
||||
:label="$t('paperDensity')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperGrammage"
|
||||
:label="`${$t('paperGrammage')} (${paperGrammage.unit})`"
|
||||
:label="$t('paperGrammage')"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@ -93,26 +93,57 @@
|
||||
{{ $t('results') }}
|
||||
</v-card-title>
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12">
|
||||
<result-card
|
||||
:label="$t('paperRollWeight')"
|
||||
:value="result.paperRollWeight"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<result-card
|
||||
:label="$t('paperRollLength')"
|
||||
:value="result.paperRollLength"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<result-card
|
||||
:label="$t('paperThickness')"
|
||||
:value="result.paperThickness"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-list lines="two">
|
||||
<result-section
|
||||
:label="$t('paperRollWeight')"
|
||||
:value="result.paperRollWeight"
|
||||
/>
|
||||
<result-section
|
||||
:label="$t('paperRollLength')"
|
||||
:value="result.paperRollLength"
|
||||
/>
|
||||
<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,10 +155,10 @@
|
||||
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 paperDensity = ref<Param>(createParam(0.76, 'g/cm³'))
|
||||
const paperGrammage = ref<Param>(createParam(420, 'g/m²'))
|
||||
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'))
|
||||
|
||||
const result = computed(() => {
|
||||
const paperRollExternalRadius = paperRollExternalDiameter.value.value / 2
|
||||
@ -147,8 +178,8 @@
|
||||
paperCoreDiameter.value = createParam(76.2, 'mm')
|
||||
paperRollExternalDiameter.value = createParam(200, 'mm')
|
||||
paperRollWidth.value = createParam(100, 'mm')
|
||||
paperDensity.value = createParam(0.76, 'g/cm³')
|
||||
paperGrammage.value = createParam(420, 'g/m²')
|
||||
paperDensity.value = createParam(0.76, 'g_per_cm3')
|
||||
paperGrammage.value = createParam(420, 'g_per_m2')
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -26,19 +26,19 @@
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperCoreDiameter"
|
||||
:label="`${$t('paperCoreDiameter')} (${paperCoreDiameter.unit})`"
|
||||
:label="$t('paperTubeInnerDiameter')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperRollWallThickness"
|
||||
:label="`${$t('paperRollWallThickness')} (${paperRollWallThickness.unit})`"
|
||||
:label="$t('paperRollWallThickness')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="innerPaperWidth"
|
||||
:label="`${$t('innerPaperWidth')} (${innerPaperWidth.unit})`"
|
||||
:label="$t('innerPaperWidth')"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@ -68,20 +68,38 @@
|
||||
{{ $t('results') }}
|
||||
</v-card-title>
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12">
|
||||
<result-card :label="$t('beltAngle')" :value="result.beltAngle" />
|
||||
</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" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<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="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">
|
||||
<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>
|
||||
@ -106,8 +124,8 @@
|
||||
const paperWidth = leadingLength * Math.sin(Math.atan(paperRollExternalDiameter * Math.PI / leadingLength))
|
||||
|
||||
return {
|
||||
beltAngle: createParam(beltAngle, '°'),
|
||||
paperHolderAngle: createParam(paperHolderAngle, '°'),
|
||||
beltAngle: createParam(beltAngle, 'degree'),
|
||||
paperHolderAngle: createParam(paperHolderAngle, 'degree'),
|
||||
leadingLength: createParam(leadingLength, 'mm'),
|
||||
paperWidth: createParam(paperWidth, 'mm'),
|
||||
}
|
||||
|
||||
@ -26,49 +26,49 @@
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperCoreDiameter"
|
||||
:label="`${$t('paperCoreDiameter')}(${paperCoreDiameter.unit})`"
|
||||
:label="$t('paperTubeInnerDiameter')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperRollWallThickness"
|
||||
:label="`${$t('paperRollWallThickness')}(${paperRollWallThickness.unit})`"
|
||||
:label="$t('paperRollWallThickness')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperRollLength"
|
||||
:label="`${$t('paperRollLength')}(${paperRollLength.unit})`"
|
||||
:label="$t('paperRollLength')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperDensity"
|
||||
:label="`${$t('paperDensity')}(${paperDensity.unit})`"
|
||||
:label="$t('paperDensity')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="innerPaperWidth"
|
||||
:label="`${$t('innerPaperWidth')}(${innerPaperWidth.unit})`"
|
||||
:label="$t('innerPaperWidth')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="workFrequency"
|
||||
:label="`${$t('workFrequency')}(${workFrequency.unit})`"
|
||||
:label="$t('workFrequency')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="workTime"
|
||||
:label="`${$t('workTime')}(${workTime.unit})`"
|
||||
:label="$t('workTime')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="workEfficiency"
|
||||
:label="`${$t('workEfficiency')}(${workEfficiency.unit})`"
|
||||
:label="$t('workEfficiency')"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@ -111,44 +111,80 @@
|
||||
{{ $t('results') }}
|
||||
</v-card-title>
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12">
|
||||
<result-card
|
||||
:label="$t('feedPaperSpeed')"
|
||||
:value="result.feedPaperSpeed"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<result-card
|
||||
:label="$t('outputSpeed')"
|
||||
:value="result.outputSpeed"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<result-card
|
||||
:label="$t('productionAmountPerHour')"
|
||||
:value="result.productionAmountPerHour"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<result-card
|
||||
:label="$t('productionWeightPerHour')"
|
||||
:value="result.productionWeightPerHour"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<result-card
|
||||
:label="$t('productionAmountPerDay')"
|
||||
:value="result.productionAmountPerDay"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<result-card
|
||||
:label="$t('productionWeightPerDay')"
|
||||
:value="result.productionWeightPerDay"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-list lines="two">
|
||||
<result-section
|
||||
:label="$t('feedPaperSpeed')"
|
||||
:value="result.feedPaperSpeed"
|
||||
/>
|
||||
<result-section
|
||||
:label="$t('outputSpeed')"
|
||||
:value="result.outputSpeed"
|
||||
/>
|
||||
<result-section
|
||||
:label="$t('productionAmountPerHour')"
|
||||
:value="result.productionAmountPerHour"
|
||||
/>
|
||||
<result-section
|
||||
:label="$t('productionWeightPerHour')"
|
||||
:value="result.productionWeightPerHour"
|
||||
/>
|
||||
<result-section
|
||||
:label="$t('productionAmountPerDay')"
|
||||
:value="result.productionAmountPerDay"
|
||||
/>
|
||||
<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>
|
||||
@ -162,11 +198,11 @@
|
||||
const paperCoreDiameter = ref<Param>(createParam(76.2, 'mm'))
|
||||
const paperRollWallThickness = ref<Param>(createParam(10, 'mm'))
|
||||
const paperRollLength = ref<Param>(createParam(1000, 'mm'))
|
||||
const paperDensity = ref<Param>(createParam(0.76, 'g/cm³'))
|
||||
const paperDensity = ref<Param>(createParam(0.76, 'g_per_cm3'))
|
||||
const innerPaperWidth = ref<Param>(createParam(105, 'mm'))
|
||||
const workFrequency = ref<Param>(createParam(30, 'Hz'))
|
||||
const workTime = ref<Param>(createParam(8, 'h'))
|
||||
const workEfficiency = ref<Param>(createParam(85, '%'))
|
||||
const workFrequency = ref<Param>(createParam(30, 'hz'))
|
||||
const workTime = ref<Param>(createParam(8, 'hour'))
|
||||
const workEfficiency = ref<Param>(createParam(85, 'percent'))
|
||||
|
||||
const result = computed(() => {
|
||||
const paperRollExternalDiameter = paperCoreDiameter.value.value + 2 * paperRollWallThickness.value.value
|
||||
@ -181,12 +217,12 @@
|
||||
const productionWeightPerDay = productionWeightPerHour * workTime.value.value
|
||||
|
||||
return {
|
||||
feedPaperSpeed: createParam(feedPaperSpeed, 'm/min'),
|
||||
outputSpeed: createParam(outputSpeed, 'm/min'),
|
||||
productionAmountPerHour: createParam(productionAmountPerHour, '支/h'),
|
||||
productionWeightPerHour: createParam(productionWeightPerHour, 'kg/h'),
|
||||
productionAmountPerDay: createParam(productionAmountPerDay, '支'),
|
||||
productionWeightPerDay: createParam(productionWeightPerDay, 'kg'),
|
||||
feedPaperSpeed: createParam(feedPaperSpeed, 'm_per_min'),
|
||||
outputSpeed: createParam(outputSpeed, 'm_per_min'),
|
||||
productionAmountPerHour: createParam(productionAmountPerHour, 'pcs_per_hour'),
|
||||
productionWeightPerHour: createParam(productionWeightPerHour, 'kg_per_hour'),
|
||||
productionAmountPerDay: createParam(productionAmountPerDay, 'pcs_per_day'),
|
||||
productionWeightPerDay: createParam(productionWeightPerDay, 'kg_per_day'),
|
||||
}
|
||||
})
|
||||
|
||||
@ -194,11 +230,11 @@
|
||||
paperCoreDiameter.value = createParam(76.2, 'mm')
|
||||
paperRollWallThickness.value = createParam(10, 'mm')
|
||||
paperRollLength.value = createParam(1000, 'mm')
|
||||
paperDensity.value = createParam(0.76, 'g/cm³')
|
||||
paperDensity.value = createParam(0.76, 'g_per_cm3')
|
||||
innerPaperWidth.value = createParam(105, 'mm')
|
||||
workFrequency.value = createParam(30, 'Hz')
|
||||
workTime.value = createParam(8, 'h')
|
||||
workEfficiency.value = createParam(85, '%')
|
||||
workFrequency.value = createParam(30, 'hz')
|
||||
workTime.value = createParam(8, 'hour')
|
||||
workEfficiency.value = createParam(85, 'percent')
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@ -26,31 +26,31 @@
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperRollLength"
|
||||
:label="`${$t('paperRollLength')}(${paperRollLength.unit})`"
|
||||
:label="$t('paperRollLength')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperDensity"
|
||||
:label="`${$t('paperDensity')}(${paperDensity.unit})`"
|
||||
:label="$t('paperDensity')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="productionAmount"
|
||||
:label="`${$t('productionAmount')}(${productionAmount.unit})`"
|
||||
:label="$t('productionAmount')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperCoreDiameter"
|
||||
:label="`${$t('paperCoreDiameter')}(${paperCoreDiameter.unit})`"
|
||||
:label="$t('paperTubeInnerDiameter')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperRollWallThickness"
|
||||
:label="`${$t('paperRollWallThickness')}(${paperRollWallThickness.unit})`"
|
||||
:label="$t('paperRollWallThickness')"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@ -93,21 +93,55 @@
|
||||
{{ $t('results') }}
|
||||
</v-card-title>
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12">
|
||||
<result-card
|
||||
:label="`${$t('singlePaperTubeWeight')}(${result.singlePaperTubeWeight.unit})`"
|
||||
:value="result.singlePaperTubeWeight"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<result-card
|
||||
:label="`${$t('totalPaperTubeWeight')}(${result.totalPaperTubeWeight.unit})`"
|
||||
:value="result.totalPaperTubeWeight"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<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="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
|
||||
: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>
|
||||
@ -118,8 +152,8 @@
|
||||
import { createParam, type Param } from '@/types/param'
|
||||
|
||||
const paperRollLength = ref<Param>(createParam(1000, 'mm'))
|
||||
const paperDensity = ref<Param>(createParam(0.76, 'g/cm³'))
|
||||
const productionAmount = ref<Param>(createParam(1000, '支'))
|
||||
const paperDensity = ref<Param>(createParam(0.76, 'g_per_cm3'))
|
||||
const productionAmount = ref<Param>(createParam(1000, 'pcs'))
|
||||
const paperCoreDiameter = ref<Param>(createParam(76.2, 'mm'))
|
||||
const paperRollWallThickness = ref<Param>(createParam(10, 'mm'))
|
||||
|
||||
@ -138,8 +172,8 @@
|
||||
|
||||
const resetParameters = () => {
|
||||
paperRollLength.value = createParam(1000, 'mm')
|
||||
paperDensity.value = createParam(0.76, 'g/cm³')
|
||||
productionAmount.value = createParam(1000, '支')
|
||||
paperDensity.value = createParam(0.76, 'g_per_cm3')
|
||||
productionAmount.value = createParam(1000, 'pcs')
|
||||
paperCoreDiameter.value = createParam(76.2, 'mm')
|
||||
paperRollWallThickness.value = createParam(10, 'mm')
|
||||
}
|
||||
|
||||
273
src/components/Modules/ThreeLayerPaperStrawCalculate.vue
Normal file
273
src/components/Modules/ThreeLayerPaperStrawCalculate.vue
Normal 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>
|
||||
@ -3,9 +3,10 @@
|
||||
density="compact"
|
||||
:disabled="disabled"
|
||||
hide-details
|
||||
:label="label"
|
||||
hide-spin-buttons
|
||||
:label="label + ' (' + $t(`units.${modelValue.unit}`) + ')'"
|
||||
:model-value="modelValue.value.toString()"
|
||||
:suffix="modelValue.unit"
|
||||
:suffix="$t(`units.${modelValue.unit}`)"
|
||||
type="number"
|
||||
variant="outlined"
|
||||
@update:model-value="handleUpdate"
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
size="large"
|
||||
variant="outlined"
|
||||
>
|
||||
{{ value.value.toFixed(2) }} {{ value.unit }}
|
||||
{{ value.value.toFixed(2) }} {{ $t(`units.${value.unit}`) }}
|
||||
</v-chip>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
21
src/components/ResultSection.vue
Normal file
21
src/components/ResultSection.vue
Normal 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>
|
||||
@ -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',
|
||||
},
|
||||
]
|
||||
|
||||
@ -10,12 +10,83 @@
|
||||
>
|
||||
<v-app-bar-nav-icon @click="drawer = !drawer" />
|
||||
<v-app-bar-title class="text-h6">
|
||||
{{ menuItems[selectedIndex].title }}
|
||||
<template v-if="menuItems.length > 0 && menuItems[selectedIndex]">
|
||||
{{ menuItems[selectedIndex].title || $t('appTitle') }}
|
||||
</template>
|
||||
</v-app-bar-title>
|
||||
|
||||
<v-spacer />
|
||||
|
||||
<v-btn icon="mdi-translate" @click="toggleLanguage" />
|
||||
<v-menu
|
||||
v-model="languageMenu"
|
||||
:close-on-content-click="true"
|
||||
location="bottom end"
|
||||
offset="8"
|
||||
>
|
||||
<template #activator="{ props }">
|
||||
<v-btn
|
||||
v-bind="props"
|
||||
:icon="$vuetify.display.xs"
|
||||
:prepend-icon="$vuetify.display.xs ? undefined : 'mdi-translate'"
|
||||
:size="$vuetify.display.xs ? 'default' : 'large'"
|
||||
variant="text"
|
||||
>
|
||||
<v-icon v-if="$vuetify.display.xs">mdi-translate</v-icon>
|
||||
<span v-else class="text-button">{{ currentLanguage.label }}</span>
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<!-- <v-list
|
||||
class="language-menu"
|
||||
density="compact"
|
||||
min-width="160"
|
||||
>
|
||||
<v-list-item
|
||||
v-for="lang in availableLanguages"
|
||||
:key="lang.code"
|
||||
:activate="locale === lang.code"
|
||||
:title="lang.label"
|
||||
@click="changeLanguage(lang.code)"
|
||||
>
|
||||
<template #append>
|
||||
<v-icon
|
||||
v-if="locale === lang.code"
|
||||
class="text-primary"
|
||||
icon="mdi-check"
|
||||
/>
|
||||
</template>
|
||||
</v-list-item>
|
||||
</v-list> -->
|
||||
<div class="language-pill-container">
|
||||
<v-chip-group
|
||||
v-model="selectedLanguageIndex"
|
||||
direction="vertical"
|
||||
selected-class="text-primary"
|
||||
@update:model-value="handleLanguageChange"
|
||||
>
|
||||
<v-chip
|
||||
v-for="(lang, index) in availableLanguages"
|
||||
:key="lang.code"
|
||||
class="language-pill-large"
|
||||
:color="locale === lang.code ? 'primary' : undefined"
|
||||
label
|
||||
rounded="xl"
|
||||
size="large"
|
||||
:value="index"
|
||||
:variant="locale === lang.code ? 'flat' : 'outlined'"
|
||||
>
|
||||
<v-icon
|
||||
v-if="locale === lang.code"
|
||||
class="mr-2"
|
||||
icon="mdi-check"
|
||||
size="small"
|
||||
/>
|
||||
{{ lang.label }}
|
||||
</v-chip>
|
||||
</v-chip-group>
|
||||
</div>
|
||||
|
||||
</v-menu>
|
||||
</v-app-bar>
|
||||
|
||||
<v-navigation-drawer
|
||||
@ -139,18 +210,6 @@
|
||||
</v-fade-transition>
|
||||
</router-view>
|
||||
</v-main>
|
||||
|
||||
<!-- 页脚 -->
|
||||
<v-footer app class="pa-4 bg-grey-lighten-5">
|
||||
<div class="d-flex justify-space-between align-center w-100">
|
||||
<div class="text-caption text-disabled">
|
||||
© {{ new Date().getFullYear() }} {{ appInfo.author }} - {{ $t('allRightsReserved') }}
|
||||
</div>
|
||||
<div class="text-caption text-disabled">
|
||||
v{{ appInfo.version }}
|
||||
</div>
|
||||
</div>
|
||||
</v-footer>
|
||||
</v-app>
|
||||
|
||||
</template>
|
||||
@ -159,14 +218,24 @@
|
||||
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { navigationConfig } from '@/config/navigation'
|
||||
import { useNavigationStore } from '@/stores/navigation'
|
||||
|
||||
const { t, locale } = useI18n()
|
||||
|
||||
const drawer = ref(true)
|
||||
const selectedIndex = ref(0)
|
||||
const navigationStore = useNavigationStore()
|
||||
|
||||
const drawer = computed({
|
||||
get: () => navigationStore.drawer,
|
||||
set: (value: boolean) => {
|
||||
navigationStore.setDrawerOpen(value)
|
||||
},
|
||||
})
|
||||
const selectedIndex = computed(() => navigationStore.selectedIndex)
|
||||
|
||||
const windowWidth = ref(typeof window === 'undefined' ? 1200 : window.innerWidth)
|
||||
|
||||
const showAboutDialog = ref(false)
|
||||
const languageMenu = ref(false)
|
||||
|
||||
// 应用信息
|
||||
const appInfo = computed(() => {
|
||||
@ -255,12 +324,39 @@
|
||||
})
|
||||
})
|
||||
|
||||
function toggleLanguage () {
|
||||
locale.value = locale.value === 'zh' ? 'en' : 'zh'
|
||||
const availableLanguages = [
|
||||
{
|
||||
code: 'zh',
|
||||
label: '中文(简体)',
|
||||
},
|
||||
{
|
||||
code: 'en',
|
||||
label: 'English',
|
||||
},
|
||||
{
|
||||
code: 'ru',
|
||||
label: 'Русский(Experimental)',
|
||||
},
|
||||
{
|
||||
code: 'sp',
|
||||
label: 'Español(Experimental)',
|
||||
},
|
||||
]
|
||||
const currentLanguage = computed(() => {
|
||||
return availableLanguages.find(lang => lang.code === locale.value) || availableLanguages[0]
|
||||
})
|
||||
|
||||
const selectedLanguageIndex = computed(() => {
|
||||
return availableLanguages.findIndex(lang => lang.code === locale.value)
|
||||
})
|
||||
|
||||
function handleLanguageChange (index: number) {
|
||||
if (index !== undefined && index >= 0 && index < availableLanguages.length) {
|
||||
locale.value = availableLanguages[index].code
|
||||
}
|
||||
}
|
||||
|
||||
function handleSelect (index: number) {
|
||||
selectedIndex.value = index
|
||||
function handleSelect (_index: number) {
|
||||
drawer.value = false // 选择后自动关闭抽屉
|
||||
}
|
||||
|
||||
@ -272,3 +368,210 @@
|
||||
document.title = pageTitle.value
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* AppBar响应式样式 */
|
||||
@media (max-width: 599px) {
|
||||
.v-app-bar-title {
|
||||
font-size: 0.875rem !important;
|
||||
line-height: 1.2 !important;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: calc(100vw - 120px); /* 为导航按钮和语言按钮留出空间 */
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 600px) and (max-width: 959px) {
|
||||
.v-app-bar-title {
|
||||
font-size: 1rem !important;
|
||||
line-height: 1.3 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* 导航抽屉响应式样式 */
|
||||
@media (max-width: 599px) {
|
||||
.v-list-item-title {
|
||||
font-size: 0.75rem !important;
|
||||
line-height: 1.2 !important;
|
||||
}
|
||||
|
||||
.v-list-item-subtitle {
|
||||
font-size: 0.625rem !important;
|
||||
line-height: 1.2 !important;
|
||||
}
|
||||
|
||||
.v-list-item {
|
||||
min-height: 36px !important;
|
||||
}
|
||||
|
||||
/* 确保文本不会溢出 */
|
||||
.v-list-item-title,
|
||||
.v-list-item-subtitle {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 600px) and (max-width: 959px) {
|
||||
.v-list-item-title {
|
||||
font-size: 0.875rem !important;
|
||||
}
|
||||
|
||||
.v-list-item-subtitle {
|
||||
font-size: 0.75rem !important;
|
||||
}
|
||||
|
||||
.v-app-bar-title {
|
||||
font-size: 1rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* 关于对话框响应式样式 */
|
||||
@media (max-width: 599px) {
|
||||
.v-dialog .v-card-title {
|
||||
font-size: 1rem !important;
|
||||
}
|
||||
|
||||
.v-dialog .v-card-text {
|
||||
font-size: 0.875rem !important;
|
||||
}
|
||||
|
||||
.v-dialog .text-caption {
|
||||
font-size: 0.75rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* 移动设备上的特殊处理 */
|
||||
@media (max-width: 599px) {
|
||||
.v-list-item.pa-4 {
|
||||
padding: 12px 16px !important;
|
||||
}
|
||||
|
||||
.v-list-item.ma-1 {
|
||||
margin: 2px 4px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* 无背景的语言选择器容器 */
|
||||
.language-pill-container {
|
||||
padding: 8px;
|
||||
min-width: 180px;
|
||||
max-width: 320px;
|
||||
}
|
||||
|
||||
/* 大尺寸语言药丸样式 */
|
||||
.language-pill-large {
|
||||
margin: 4px 0;
|
||||
padding: 12px 20px;
|
||||
height: 48px;
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
transition: all 0.3s ease;
|
||||
border-radius: 24px;
|
||||
width: 100%;
|
||||
|
||||
/* 文本居中 */
|
||||
display: flex !important;
|
||||
justify-content: center !important;
|
||||
align-items: center !important;
|
||||
}
|
||||
|
||||
.language-pill-large:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
/* chip内容居中对齐 */
|
||||
.language-pill-large .v-chip__content {
|
||||
display: flex !important;
|
||||
justify-content: center !important;
|
||||
align-items: center !important;
|
||||
width: 100% !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 响应式药丸样式 */
|
||||
@media (max-width: 599px) {
|
||||
.language-pill-container {
|
||||
min-width: 160px;
|
||||
max-width: 280px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.language-pill-large {
|
||||
margin: 2px 0;
|
||||
padding: 8px 16px;
|
||||
height: 40px;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.text-button {
|
||||
font-size: 0.75rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 600px) and (max-width: 959px) {
|
||||
.language-pill-large {
|
||||
padding: 10px 18px;
|
||||
height: 44px;
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* 药丸选中状态 */
|
||||
.v-chip--variant-flat {
|
||||
background: rgb(var(--v-theme-primary)) !important;
|
||||
color: rgb(var(--v-theme-surface)) !important;
|
||||
box-shadow: 0 2px 8px rgba(var(--v-theme-primary), 0.1);
|
||||
}
|
||||
|
||||
/* 药丸未选中状态 */
|
||||
.v-chip--variant-outlined {
|
||||
border: 1px solid rgba(var(--v-theme-info), 0.3);
|
||||
color: rgb(var(--v-theme-info));
|
||||
background: rgba(var(--v-theme-surface), 1);
|
||||
}
|
||||
|
||||
.v-chip--variant-outlined:hover {
|
||||
background: rgba(var(--v-theme-info), 0.08);
|
||||
border-color: rgba(var(--v-theme-info), 0.5);
|
||||
}
|
||||
|
||||
/* 选中状态的图标 */
|
||||
.language-pill-large .v-icon {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* 字体权重调整 */
|
||||
.language-pill-large .v-chip__content {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.language-pill {
|
||||
margin: 2px 4px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.language-pill:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
/* 响应式药丸样式 */
|
||||
@media (max-width: 599px) {
|
||||
.language-pill-menu {
|
||||
min-width: 160px;
|
||||
max-width: 250px;
|
||||
}
|
||||
|
||||
.language-pill {
|
||||
margin: 1px 2px;
|
||||
}
|
||||
|
||||
.text-button {
|
||||
font-size: 0.75rem !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,17 +1,18 @@
|
||||
{
|
||||
"appTitle": "Paper Tube Production Calculator",
|
||||
"beltSpecificationCalculate": "Belt Specification Calculate",
|
||||
"multiLayerPaperTapeWidthAngleCalculate": "MultiLayer Paper Tape Width Angle Calculate",
|
||||
"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",
|
||||
"paperRollLength": "Paper roll length",
|
||||
"paperRollWallThickness": "Paper roll wall thickness",
|
||||
"paperRollWeightLengthCalculate": "Paper Roll Weight Length Calculate",
|
||||
"paperTapeWidthAngleCalculate": "Paper Tape Width Angle Calculate",
|
||||
"paperTubeProductionCalculate": "Paper Tube Production Calculate",
|
||||
"paperTubeWeightCalculate": "Paper Tube Weight Calculate",
|
||||
"paperRollWeightLengthCalculate": "Paper Roll Weight Length",
|
||||
"paperTapeWidthAngleCalculate": "Paper Tape Width & Angle",
|
||||
"paperTubeProductionCalculate": "Paper Tube Production",
|
||||
"paperTubeWeightCalculate": "Paper Tube Weight",
|
||||
"parameters": "Parameters",
|
||||
"productionAmount": "Production amount",
|
||||
"reset": "Reset",
|
||||
@ -42,7 +43,8 @@
|
||||
"50_120Series": "50, 120 series",
|
||||
"200_Series": "200 series",
|
||||
"600_Series": "600 series",
|
||||
"new_200_Series": "New 200 series",
|
||||
"PT23-120_Series": "PT23-120 series",
|
||||
"PT23-200_Series": "PT23-200 series",
|
||||
"custom": "Customize",
|
||||
"recommendBeltLength": "Recommended belt length",
|
||||
"recommendBeltWidth": "Recommended bandwidth",
|
||||
@ -54,7 +56,6 @@
|
||||
"add": "Add",
|
||||
"layer": "Layer",
|
||||
"angle": "Angle",
|
||||
"new_120Series": "New 120 Series",
|
||||
"cumulativeThickness": "Cumulative thickness",
|
||||
"reference": "Reference",
|
||||
"minimum": "Minimum",
|
||||
@ -69,5 +70,24 @@
|
||||
"appDescription": "Paper tube production auxiliary production tool provides calculation of various parameters such as weight, size, angle, etc.",
|
||||
"allRightsReserved": "All Rights Reserved",
|
||||
"close": "Close",
|
||||
"officialWebsite": "Official website"
|
||||
"officialWebsite": "Official website",
|
||||
"loading": "Loading",
|
||||
"paperTapeWidth": "Paper tape width",
|
||||
"units": {
|
||||
"mm": "mm",
|
||||
"m": "m",
|
||||
"g_per_cm3": "g/cm³",
|
||||
"pcs": "pcs",
|
||||
"kg": "kg",
|
||||
"g_per_m2": "g/m²",
|
||||
"hz": "Hz",
|
||||
"hour": "h",
|
||||
"percent": "%",
|
||||
"m_per_min": "m/min",
|
||||
"kg_per_hour": "kg/h",
|
||||
"pcs_per_hour": "pcs/h",
|
||||
"kg_per_day": "kg/d",
|
||||
"pcs_per_day": "pcs/d",
|
||||
"degree": "°"
|
||||
}
|
||||
}
|
||||
|
||||
95
src/locale/ru.json
Normal file
95
src/locale/ru.json
Normal file
@ -0,0 +1,95 @@
|
||||
{
|
||||
"appTitle": "Калькулятор производства бумажных трубок",
|
||||
"beltSpecificationCalculate": "Спецификация ремня",
|
||||
"multiLayerPaperTapeWidthAngleCalculate": "Ширина и угол многослойной бумажной ленты",
|
||||
"paperCoreDiameter": "Диаметр бумажного сердечника",
|
||||
"paperTubeInnerDiameter": "Внутренний диаметр бумажной трубки",
|
||||
"paperDensity": "Плотность бумаги",
|
||||
"paperGrammage": "Граммаж",
|
||||
"paperRollExternalDiameter": "Внешний диаметр бумажного рулона",
|
||||
"paperRollLength": "Длина бумажного рулона",
|
||||
"paperRollWallThickness": "Толщина стенки бумажного рулона",
|
||||
"paperRollWeightLengthCalculate": "Вес и длина бумажного рулона",
|
||||
"paperTapeWidthAngleCalculate": "Ширина и угол бумажной ленты",
|
||||
"paperTubeProductionCalculate": "Производство бумажных трубок",
|
||||
"paperTubeWeightCalculate": "Вес бумажной трубки",
|
||||
"parameters": "Параметры",
|
||||
"productionAmount": "Количество производства",
|
||||
"reset": "Сброс",
|
||||
"results": "Результаты",
|
||||
"singlePaperTubeWeight": "Вес одной бумажной трубки",
|
||||
"totalPaperTubeWeight": "Общий вес бумажных трубок",
|
||||
"paperRollWidth": "Ширина бумажного рулона",
|
||||
"paperThickness": "Толщина бумаги",
|
||||
"paperRollWeight": "Вес бумажного рулона",
|
||||
"paperLength": "Длина бумажного рулона",
|
||||
"innerPaperWidth": "Ширина внутренней бумаги",
|
||||
"workFrequency": "Рабочая частота",
|
||||
"workTime": "Рабочее время",
|
||||
"workEfficiency": "Эффективность работы",
|
||||
"feedPaperSpeed": "Скорость подачи",
|
||||
"outputSpeed": "Скорость выхода",
|
||||
"productionAmountPerDay": "Дневная выработка",
|
||||
"productionAmountPerHour": "Часовая выработка",
|
||||
"productionWeightPerDay": "Дневная выработка по весу",
|
||||
"productionWeightPerHour": "Часовая выработка по весу",
|
||||
"beltAngle": "Угол ремня",
|
||||
"paperHolderAngle": "Угол держателя бумаги",
|
||||
"leadingLength": "Ведущая длина",
|
||||
"paperWidth": "Ширина бумаги",
|
||||
"machineModel": "Модель",
|
||||
"maxWheelbase": "Максимальная колесная база",
|
||||
"hubDiameter": "Диаметр ступицы",
|
||||
"50_120Series": "50, 120 серии",
|
||||
"200_Series": "200 серия",
|
||||
"600_Series": "600 серия",
|
||||
"PT23-120_Series": "PT23-120 серия",
|
||||
"PT23-200_Series": "PT23-200 серия",
|
||||
"custom": "Настроить",
|
||||
"recommendBeltLength": "Рекомендуемая длина ремня",
|
||||
"recommendBeltWidth": "Рекомендуемая ширина ремня",
|
||||
"recommendBeltThickness": "Рекомендуемая толщина ремня",
|
||||
"bottomPaperWidth": "Ширина нижней бумаги",
|
||||
"save": "Сохранить",
|
||||
"clear": "Очистить",
|
||||
"remove": "Удалить",
|
||||
"add": "Добавить",
|
||||
"layer": "Слой",
|
||||
"angle": "Угол",
|
||||
"cumulativeThickness": "Накопительная толщина",
|
||||
"reference": "Справочная информация",
|
||||
"minimum": "Минимум",
|
||||
"maximum": "Максимум",
|
||||
"calculatedValue": "Расчетное значение",
|
||||
"fit": "ПОДХОДИТ",
|
||||
"notFit": "НЕ ПОДХОДИТ",
|
||||
"multiLayerExcelOutputFile": "МногослойнаяШиринаУголБумажнойЛенты",
|
||||
"about": "О программе",
|
||||
"calculator": "Калькулятор",
|
||||
"companyName": "Чжэцзян Цзиньшэнь Машиностроительная компания с ограниченной ответственностью",
|
||||
"appDescription": "Вспомогательный инструмент для производства бумажных трубок, обеспечивающий расчет различных параметров: веса, размеров, углов и т.д.",
|
||||
"allRightsReserved": "Все права защищены",
|
||||
"close": "Закрыть",
|
||||
"officialWebsite": "Официальный сайт",
|
||||
"loading": "Загрузка",
|
||||
"paperTapeWidth": "Ширина бумажной ленты",
|
||||
"selectLanguage": "Выберите язык",
|
||||
"units": {
|
||||
"mm": "мм",
|
||||
"m": "м",
|
||||
"g_per_cm3": "г/см³",
|
||||
"pcs": "шт.",
|
||||
"kg": "кг",
|
||||
"g_per_m2": "г/м²",
|
||||
"hz": "Гц",
|
||||
"hour": "ч",
|
||||
"percent": "%",
|
||||
"m_per_min": "м/мин",
|
||||
"kg_per_hour": "кг/ч",
|
||||
"pcs_per_hour": "шт./ч",
|
||||
"kg_per_day": "кг/д",
|
||||
"pcs_per_day": "шт./д",
|
||||
"degree": "°"
|
||||
}
|
||||
|
||||
}
|
||||
94
src/locale/sp.json
Normal file
94
src/locale/sp.json
Normal file
@ -0,0 +1,94 @@
|
||||
{
|
||||
"appTitle": "Calculadora de Producción de Tubos de Papel",
|
||||
"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",
|
||||
"paperRollLength": "Longitud del rollo de papel",
|
||||
"paperRollWallThickness": "Grosor de pared del rollo de papel",
|
||||
"paperRollWeightLengthCalculate": "Peso y Longitud del Rollo de Papel",
|
||||
"paperTapeWidthAngleCalculate": "Ancho y Ángulo de Cinta de Papel",
|
||||
"paperTubeProductionCalculate": "Producción de Tubos de Papel",
|
||||
"paperTubeWeightCalculate": "Peso del Tubo de Papel",
|
||||
"parameters": "Parámetros",
|
||||
"productionAmount": "Cantidad de producción",
|
||||
"reset": "Restablecer",
|
||||
"results": "Resultados",
|
||||
"singlePaperTubeWeight": "Peso de un solo tubo de papel",
|
||||
"totalPaperTubeWeight": "Peso total de tubos de papel",
|
||||
"paperRollWidth": "Ancho del rollo de papel",
|
||||
"paperThickness": "Grosor del papel",
|
||||
"paperRollWeight": "Peso del rollo de papel",
|
||||
"paperLength": "Longitud del rollo de papel",
|
||||
"innerPaperWidth": "Ancho del papel interior",
|
||||
"workFrequency": "Frecuencia de trabajo",
|
||||
"workTime": "Tiempo de trabajo",
|
||||
"workEfficiency": "Eficiencia del trabajo",
|
||||
"feedPaperSpeed": "Velocidad de alimentación",
|
||||
"outputSpeed": "Velocidad de salida",
|
||||
"productionAmountPerDay": "Producción diaria",
|
||||
"productionAmountPerHour": "Producción por hora",
|
||||
"productionWeightPerDay": "Peso de producción diaria",
|
||||
"productionWeightPerHour": "Peso de producción por hora",
|
||||
"beltAngle": "Ángulo de la correa",
|
||||
"paperHolderAngle": "Ángulo del soporte de papel",
|
||||
"leadingLength": "Longitud de avance",
|
||||
"paperWidth": "Ancho del papel",
|
||||
"machineModel": "Modelo de máquina",
|
||||
"maxWheelbase": "Distancia entre ejes máxima",
|
||||
"hubDiameter": "Diámetro del cubo",
|
||||
"50_120Series": "Series 50, 120",
|
||||
"200_Series": "Serie 200",
|
||||
"600_Series": "Serie 600",
|
||||
"PT23-120_Series": "Serie PT23-120",
|
||||
"PT23-200_Series": "Serie PT23-200",
|
||||
"custom": "Personalizar",
|
||||
"recommendBeltLength": "Longitud de correa recomendada",
|
||||
"recommendBeltWidth": "Ancho de correa recomendado",
|
||||
"recommendBeltThickness": "Grosor de correa recomendado",
|
||||
"bottomPaperWidth": "Ancho del papel inferior",
|
||||
"save": "Guardar",
|
||||
"clear": "Limpiar",
|
||||
"remove": "Eliminar",
|
||||
"add": "Agregar",
|
||||
"layer": "Capa",
|
||||
"angle": "Ángulo",
|
||||
"cumulativeThickness": "Grosor acumulativo",
|
||||
"reference": "Referencia",
|
||||
"minimum": "Mínimo",
|
||||
"maximum": "Máximo",
|
||||
"calculatedValue": "Valor calculado",
|
||||
"fit": "AJUSTA",
|
||||
"notFit": "NO AJUSTA",
|
||||
"multiLayerExcelOutputFile": "AnchoAnguloTintaPapelMulticapa",
|
||||
"about": "Acerca de",
|
||||
"calculator": "Calculadora",
|
||||
"companyName": "Zhejiang Jinshen Machinery Manufacturing Co., Ltd.",
|
||||
"appDescription": "Herramienta auxiliar de producción de tubos de papel que proporciona cálculo de varios parámetros como peso, tamaño, ángulo, etc.",
|
||||
"allRightsReserved": "Todos los derechos reservados",
|
||||
"close": "Cerrar",
|
||||
"officialWebsite": "Sitio web oficial",
|
||||
"loading": "Cargando",
|
||||
"paperTapeWidth": "Ancho de cinta de papel",
|
||||
"selectLanguage": "Seleccionar idioma",
|
||||
"units": {
|
||||
"mm": "mm",
|
||||
"m": "m",
|
||||
"g_per_cm3": "g/cm³",
|
||||
"pcs": "uds.",
|
||||
"kg": "kg",
|
||||
"g_per_m2": "g/m²",
|
||||
"hz": "Hz",
|
||||
"hour": "h",
|
||||
"percent": "%",
|
||||
"m_per_min": "m/min",
|
||||
"kg_per_hour": "kg/h",
|
||||
"pcs_per_hour": "uds./h",
|
||||
"kg_per_day": "kg/d",
|
||||
"pcs_per_day": "uds./d",
|
||||
"degree": "°"
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,9 @@
|
||||
{
|
||||
"appTitle": "纸管制作辅助生产工具",
|
||||
"appTitle": "纸管生产辅助计算工具",
|
||||
"beltSpecificationCalculate": "皮带规格计算",
|
||||
"multiLayerPaperTapeWidthAngleCalculate": "多层纸带宽度角度计算",
|
||||
"paperCoreDiameter": "纸芯内径",
|
||||
"paperTubeInnerDiameter": "纸管内径",
|
||||
"paperDensity": "纸张密度",
|
||||
"paperGrammage": "纸张克重",
|
||||
"paperRollExternalDiameter": "纸卷外径",
|
||||
@ -12,6 +13,8 @@
|
||||
"paperTapeWidthAngleCalculate": "纸带宽度角度计算",
|
||||
"paperTubeProductionCalculate": "纸管产能计算",
|
||||
"paperTubeWeightCalculate": "纸管重量计算",
|
||||
"3LayerPaperStrawCalculate": "三层纸吸管计算",
|
||||
"4LayerPaperStrawCalculate": "四层纸吸管计算",
|
||||
"parameters": "参数",
|
||||
"productionAmount": "生产数量",
|
||||
"reset": "重置",
|
||||
@ -42,7 +45,8 @@
|
||||
"50_120Series": "50、120系列",
|
||||
"200_Series": "200系列",
|
||||
"600_Series": "600系列",
|
||||
"new_200_Series": "新200系列",
|
||||
"PT23-120_Series": "PT23-120系列",
|
||||
"PT23-200_Series": "PT23-200系列",
|
||||
"custom": "自定义",
|
||||
"recommendBeltThickness": "推荐皮带厚度",
|
||||
"recommendBeltWidth": "推荐皮带宽度",
|
||||
@ -54,7 +58,6 @@
|
||||
"add": "新增",
|
||||
"layer": "层数",
|
||||
"angle": "角度",
|
||||
"new_120Series": "新120系列",
|
||||
"cumulativeThickness": "累计厚度",
|
||||
"reference": "参考区间",
|
||||
"minimum": "最小值",
|
||||
@ -66,8 +69,59 @@
|
||||
"about": "关于",
|
||||
"calculator": "计算工具",
|
||||
"companyName": "浙江金申机械制造有限公司",
|
||||
"appDescription": "纸管制作辅助生产工具,提供纸管重量、尺寸、角度等多种参数的计算。",
|
||||
"appDescription": "纸管生产辅助计算工具,提供纸管重量、尺寸、角度等多种参数的计算。",
|
||||
"allRightsReserved": "版权所有",
|
||||
"close": "关闭",
|
||||
"officialWebsite": "官方网站"
|
||||
"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",
|
||||
"g_per_cm3": "g/cm³",
|
||||
"pcs": "支",
|
||||
"kg": "kg",
|
||||
"g_per_m2": "g/m²",
|
||||
"hz": "Hz",
|
||||
"hour": "小时",
|
||||
"percent": "%",
|
||||
"m_per_min": "m/min",
|
||||
"kg_per_hour": "kg/h",
|
||||
"pcs_per_hour": "pcs/h",
|
||||
"kg_per_day": "kg/d",
|
||||
"pcs_per_day": "pcs/d",
|
||||
"degree": "°"
|
||||
},
|
||||
"calculationParameters": "计算参数",
|
||||
"expandToShowCalculationParameters": "展开以显示计算参数"
|
||||
}
|
||||
|
||||
13
src/pages/calculators/four-layer-paper-straw.vue
Normal file
13
src/pages/calculators/four-layer-paper-straw.vue
Normal 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>
|
||||
13
src/pages/calculators/three-layer-paper-straw.vue
Normal file
13
src/pages/calculators/three-layer-paper-straw.vue
Normal 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>
|
||||
@ -1,15 +1,48 @@
|
||||
<template>
|
||||
<div>Redirecting...</div>
|
||||
<v-container class="d-flex justify-center align-center" style="min-height: 50vh;">
|
||||
<div class="text-center">
|
||||
<v-progress-circular
|
||||
color="primary"
|
||||
indeterminate
|
||||
size="64"
|
||||
width="6"
|
||||
/>
|
||||
<div class="text-h6 mt-4 text-primary">
|
||||
{{ $t('loading') }}...
|
||||
</div>
|
||||
</div>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
onMounted(() => {
|
||||
// Redirect to the calculators page
|
||||
router.push('/calculators/paper-tube-weight')
|
||||
onMounted(async () => {
|
||||
// 等待路由完全准备好
|
||||
await router.isReady()
|
||||
|
||||
// 检查是否是直接访问首页
|
||||
const isDirectAccess = route.path === '/' && !document.referrer.includes(window.location.origin)
|
||||
|
||||
let targetPath = '/calculators/paper-tube-weight' // 默认路径
|
||||
|
||||
if (!isDirectAccess) {
|
||||
// 如果不是直接访问,尝试恢复上次的路径
|
||||
const lastRoute = sessionStorage.getItem('lastRoute')
|
||||
const savedPath = localStorage.getItem('lastPath')
|
||||
targetPath = lastRoute || savedPath || targetPath
|
||||
}
|
||||
|
||||
// 使用 replace 避免在历史记录中留下首页
|
||||
router.replace(targetPath)
|
||||
})
|
||||
</script>
|
||||
|
||||
<route lang="yaml">
|
||||
meta:
|
||||
layout: CalculatorLayout
|
||||
</route>
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import { createI18n } from 'vue-i18n'
|
||||
import en from '@/locale/en.json'
|
||||
import ru from '@/locale/ru.json'
|
||||
import sp from '@/locale/sp.json'
|
||||
import zh from '@/locale/zh.json'
|
||||
|
||||
export default createI18n({
|
||||
@ -9,5 +11,7 @@ export default createI18n({
|
||||
messages: {
|
||||
zh,
|
||||
en,
|
||||
ru,
|
||||
sp,
|
||||
},
|
||||
})
|
||||
|
||||
@ -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,
|
||||
},
|
||||
|
||||
@ -33,4 +33,28 @@ router.isReady().then(() => {
|
||||
localStorage.removeItem('vuetify:dynamic-reload')
|
||||
})
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
// 如果访问根路径且不是直接输入地址访问
|
||||
if (to.path === '/' && from.path !== '/') {
|
||||
// 检查是否有保存的路径
|
||||
const lastRoute = sessionStorage.getItem('lastRoute')
|
||||
const savedPath = localStorage.getItem('lastPath')
|
||||
|
||||
if (lastRoute || savedPath) {
|
||||
// 重定向到上次访问的页面
|
||||
next(lastRoute || savedPath || '/calculators/paper-tube-weight')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 保存当前路由(非首页)
|
||||
if (to.path !== '/') {
|
||||
sessionStorage.setItem('lastRoute', to.fullPath)
|
||||
localStorage.setItem('lastPath', to.fullPath)
|
||||
}
|
||||
|
||||
next()
|
||||
|
||||
})
|
||||
|
||||
export default router
|
||||
|
||||
31
src/stores/navigation.ts
Normal file
31
src/stores/navigation.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { computed, ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { navigationConfig } from '@/config/navigation'
|
||||
|
||||
export const useNavigationStore = defineStore('navigation', () => {
|
||||
// Status
|
||||
const route = useRoute()
|
||||
const drawer = ref(false)
|
||||
|
||||
// 当前选中的菜单项
|
||||
const selectedIndex = computed(() => {
|
||||
return navigationConfig.findIndex(item => item.to === route.path)
|
||||
})
|
||||
|
||||
// Actions
|
||||
function toggleDrawer () {
|
||||
drawer.value = !drawer.value
|
||||
}
|
||||
|
||||
function setDrawerOpen (open: boolean) {
|
||||
drawer.value = open
|
||||
}
|
||||
|
||||
return {
|
||||
selectedIndex,
|
||||
drawer,
|
||||
toggleDrawer,
|
||||
setDrawerOpen,
|
||||
}
|
||||
})
|
||||
2
src/typed-router.d.ts
vendored
2
src/typed-router.d.ts
vendored
@ -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>>,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user