Feature: 添加俄语、西班牙语支持 & 添加单位国际化
This commit is contained in:
@ -124,8 +124,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 +199,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,
|
||||
},
|
||||
|
||||
@ -27,26 +27,26 @@
|
||||
<param-input-field
|
||||
v-model="paperCoreDiameter"
|
||||
:disabled="recordList.length > 0"
|
||||
:label="`${$t('paperCoreDiameter')} (${paperCoreDiameter.unit})`"
|
||||
:label="$t('paperCoreDiameter')"
|
||||
/>
|
||||
</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>
|
||||
@ -143,10 +143,10 @@
|
||||
<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 }} {{ 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>
|
||||
@ -176,8 +176,8 @@
|
||||
|
||||
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 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数据
|
||||
|
||||
@ -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>
|
||||
@ -126,8 +126,8 @@
|
||||
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 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 +147,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('paperCoreDiameter')"
|
||||
/>
|
||||
</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>
|
||||
@ -106,8 +106,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('paperCoreDiameter')"
|
||||
/>
|
||||
</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>
|
||||
@ -162,11 +162,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 +181,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 +194,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('paperCoreDiameter')"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<param-input-field
|
||||
v-model="paperRollWallThickness"
|
||||
:label="`${$t('paperRollWallThickness')}(${paperRollWallThickness.unit})`"
|
||||
:label="$t('paperRollWallThickness')"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@ -118,8 +118,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 +138,8 @@
|
||||
|
||||
const resetParameters = () => {
|
||||
paperRollLength.value = createParam(1000, 'mm')
|
||||
paperDensity.value = createParam(0.76, 'g/cm³')
|
||||
productionAmount.value = createParam(1000, '支')
|
||||
paperDensity.value = createParam(0.76, 'gpcm3')
|
||||
productionAmount.value = createParam(1000, 'pcs')
|
||||
paperCoreDiameter.value = createParam(76.2, 'mm')
|
||||
paperRollWallThickness.value = createParam(10, 'mm')
|
||||
}
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
:disabled="disabled"
|
||||
hide-details
|
||||
hide-spin-buttons
|
||||
:label="label"
|
||||
: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>
|
||||
|
||||
Reference in New Issue
Block a user