-
PH炉实际温度
+
{{ $t('track.phFurnaceTempActual') }}
{{ getLatestValue('furnace', 'phFurnaceTemperatureActual') }}
°C
-
NOF1炉实际温度
+
{{ $t('track.nof1FurnaceTempActual') }}
{{ getLatestValue('furnace', 'nof1FurnaceTemperatureActual') }}
°C
-
NOF1炉设定温度
+
{{ $t('track.nof1FurnaceTempSet') }}
{{ getLatestValue('furnace', 'nof1FurnaceTemperatureSet') }}
°C
@@ -129,10 +129,10 @@
@@ -140,22 +140,22 @@
-
顶部涂层重量
+
{{ $t('track.topCoatWeight') }}
{{ getLatestValue('coat', 'avrCoatingWeightTop') }}
g/m²
-
底部涂层重量
+
{{ $t('track.bottomCoatWeight') }}
{{ getLatestValue('coat', 'avrCoatingWeightBottom') }}
g/m²
-
气刀压力
+
{{ $t('track.airKnifePressure') }}
{{ getLatestValue('coat', 'airKnifePressure') }}
kPa
-
出口速度
+
{{ $t('track.exitSpeed') }}
{{ getLatestValue('coat', 'stripSpeedTmExit') }}
m/min
@@ -170,10 +170,10 @@
@@ -181,17 +181,17 @@
-
出口张力1
+
{{ $t('track.exitTension1') }}
{{ getLatestValue('exit', 'tensionBr8Br9') }}
kN
-
出口张力2
+
{{ $t('track.exitTension2') }}
{{ getLatestValue('exit', 'tensionBr9Tr') }}
kN
-
出口速度
+
{{ $t('track.exitSpeed') }}
{{ getLatestValue('exit', 'speedExitSection') }}
m/min
@@ -209,12 +209,12 @@
{{ getCurrentTypeLabel() }}
-
当前数据类型不支持图表展示,原始数据如下
+
{{ $t('track.noChartSupport') }}
@@ -231,12 +231,12 @@ export default {
return {
socket: null,
types: [
- { value: 'alarm', label: '告警信息', desc: '系统告警与异常' },
- { value: 'track_position', label: '位置跟踪', desc: '钢卷位置信息' },
- { value: 'calc_setup_result', label: '设定计算', desc: '计算结果数据' },
- { value: 'track_measure', label: '过程测量', desc: '实时测量数据' },
- { value: 'track_signal', label: '信号跟踪', desc: '信号状态数据' },
- { value: 'track_matmap', label: '物料映射', desc: '物料映射关系' }
+ { value: 'alarm', label: this.$t('track.alarmInfo'), desc: this.$t('track.alarmDesc') },
+ { value: 'track_position', label: this.$t('track.positionTrack'), desc: this.$t('track.positionDesc') },
+ { value: 'calc_setup_result', label: this.$t('track.calcSetupResult'), desc: this.$t('track.calcDesc') },
+ { value: 'track_measure', label: this.$t('track.processMeasure'), desc: this.$t('track.measureDesc') },
+ { value: 'track_signal', label: this.$t('track.signalTrack'), desc: this.$t('track.signalDesc') },
+ { value: 'track_matmap', label: this.$t('track.matmap'), desc: this.$t('track.matmapDesc') }
],
currentType: 'track_measure',
isConnected: false,
@@ -284,7 +284,7 @@ export default {
},
computed: {
formattedRawData() {
- if (!this.rawData) return '等待接收数据...';
+ if (!this.rawData) return this.$t('track.waitingData');
try {
return JSON.stringify(JSON.parse(this.rawData), null, 2);
} catch (e) {
@@ -334,9 +334,9 @@ export default {
// 复制原始数据
copyRawData() {
navigator.clipboard.writeText(this.formattedRawData).then(() => {
- this.$message.success('已复制到剪贴板');
+ this.$message.success(this.$t('track.copySuccess'));
}).catch(() => {
- this.$message.error('复制失败');
+ this.$message.error(this.$t('track.copyFailed'));
});
},
@@ -385,7 +385,7 @@ export default {
textStyle: { color: '#fff' }
},
legend: {
- data: ['入口张力1', '入口张力2', '入口张力3', '带钢速度'],
+ data: [$t('track.entryTension1'), $t('track.entryTension2'), $t('track.entryTension3'), $t('track.stripSpeed')],
textStyle: { color: '#b0b0b0', fontSize: 12 },
top: 10
},
@@ -406,7 +406,7 @@ export default {
},
series: [
{
- name: '入口张力1',
+ name: this.$t('track.entryTension1'),
type: 'line',
data: [],
smooth: true,
@@ -415,7 +415,7 @@ export default {
areaStyle: { color: 'rgba(0, 212, 255, 0.1)' }
},
{
- name: '入口张力2',
+ name: this.$t('track.entryTension2'),
type: 'line',
data: [],
smooth: true,
@@ -423,7 +423,7 @@ export default {
itemStyle: { color: '#00ff9d' }
},
{
- name: '入口张力3',
+ name: this.$t('track.entryTension3'),
type: 'line',
data: [],
smooth: true,
@@ -431,7 +431,7 @@ export default {
itemStyle: { color: '#ffa502' }
},
{
- name: '带钢速度',
+ name: this.$t('track.stripSpeed'),
type: 'line',
data: [],
smooth: true,
@@ -454,7 +454,7 @@ export default {
textStyle: { color: '#fff' }
},
legend: {
- data: ['PH炉实际温度', 'NOF1炉实际温度', 'NOF1炉设定温度'],
+ data: [$t('track.phFurnaceTempActual'), $t('track.nof1FurnaceTempActual'), $t('track.nof1FurnaceTempSet')],
textStyle: { color: '#b0b0b0', fontSize: 12 },
top: 10
},
@@ -475,7 +475,7 @@ export default {
},
series: [
{
- name: 'PH炉实际温度',
+ name: this.$t('track.phFurnaceTempActual'),
type: 'line',
data: [],
smooth: true,
@@ -484,7 +484,7 @@ export default {
areaStyle: { color: 'rgba(255, 99, 72, 0.1)' }
},
{
- name: 'NOF1炉实际温度',
+ name: this.$t('track.nof1FurnaceTempActual'),
type: 'line',
data: [],
smooth: true,
@@ -492,7 +492,7 @@ export default {
itemStyle: { color: '#ffa502' }
},
{
- name: 'NOF1炉设定温度',
+ name: this.$t('track.nof1FurnaceTempSet'),
type: 'line',
data: [],
smooth: true,
@@ -515,7 +515,7 @@ export default {
textStyle: { color: '#fff' }
},
legend: {
- data: ['顶部平均涂层重量', '底部平均涂层重量', '气刀压力', '出口速度'],
+ data: [$t('track.avrCoatingWeightTop'), $t('track.avrCoatingWeightBottom'), $t('track.airKnifePressure'), $t('track.exitSpeed')],
textStyle: { color: '#b0b0b0', fontSize: 12 },
top: 10
},
@@ -536,7 +536,7 @@ export default {
},
series: [
{
- name: '顶部平均涂层重量',
+ name: this.$t('track.avrCoatingWeightTop'),
type: 'line',
data: [],
smooth: true,
@@ -545,7 +545,7 @@ export default {
areaStyle: { color: 'rgba(0, 255, 157, 0.1)' }
},
{
- name: '底部平均涂层重量',
+ name: this.$t('track.avrCoatingWeightBottom'),
type: 'line',
data: [],
smooth: true,
@@ -553,7 +553,7 @@ export default {
itemStyle: { color: '#00d4ff' }
},
{
- name: '气刀压力',
+ name: this.$t('track.airKnifePressure'),
type: 'line',
data: [],
smooth: true,
@@ -561,7 +561,7 @@ export default {
itemStyle: { color: '#ffa502' }
},
{
- name: '出口速度',
+ name: this.$t('track.exitSpeed'),
type: 'line',
data: [],
smooth: true,
@@ -584,7 +584,7 @@ export default {
textStyle: { color: '#fff' }
},
legend: {
- data: ['出口张力1', '出口张力2', '出口速度'],
+ data: [$t('track.exitTension1'), $t('track.exitTension2'), $t('track.exitSpeed')],
textStyle: { color: '#b0b0b0', fontSize: 12 },
top: 10
},
@@ -605,7 +605,7 @@ export default {
},
series: [
{
- name: '出口张力1',
+ name: this.$t('track.exitTension1'),
type: 'line',
data: [],
smooth: true,
@@ -614,7 +614,7 @@ export default {
areaStyle: { color: 'rgba(0, 212, 255, 0.1)' }
},
{
- name: '出口张力2',
+ name: this.$t('track.exitTension2'),
type: 'line',
data: [],
smooth: true,
@@ -622,7 +622,7 @@ export default {
itemStyle: { color: '#00ff9d' }
},
{
- name: '出口速度',
+ name: this.$t('track.exitSpeed'),
type: 'line',
data: [],
smooth: true,
diff --git a/apps/l2/src/views/l2/track/rect.vue b/apps/l2/src/views/l2/track/rect.vue
index 269e811..2bcb8ba 100644
--- a/apps/l2/src/views/l2/track/rect.vue
+++ b/apps/l2/src/views/l2/track/rect.vue
@@ -6,32 +6,32 @@
- 加载中...
+ {{ $t('common.loading') }}
-
+
-
+
-
+
-
+
-
+
@@ -42,8 +42,8 @@
@@ -70,8 +70,8 @@
@@ -97,7 +97,7 @@
-
+
{{ item.label }}:
@@ -123,8 +123,8 @@
@@ -150,7 +150,7 @@
-
+
- 生产计划
+ {{ $t('track.productionPlan') }}
-
+
{{ index + 1 }}
-
计划ID:{{ plan.planid || '-' }}
-
钢卷号:{{ plan.coilid || '-' }}
+
{{ $t('track.planId') }}:{{ plan.planid || '-' }}
+
{{ $t('track.coilid') }}:{{ plan.coilid || '-' }}
{{ getPlanStatusText(plan.status) }}
- 钢种:{{ plan.steelGrade || '-' }}
- 顺序:{{ plan.seqid || '-' }}
+ {{ $t('track.steelGrade') }}:{{ plan.steelGrade || '-' }}
+ {{ $t('track.sequence') }}:{{ plan.seqid || '-' }}
@@ -206,21 +206,21 @@
- 生产计划详情
+ {{ $t('track.productionPlanDetail') }}
-
-
-
-
-
-
当前位置
-
{{ selectedPlanPosition.positionNameCn }}
-
{{ selectedPlanPosition.positionNameEn }}
-
+
+
+
+
+
{{ $t('track.currentPosition') }}
+
{{ selectedPlanPosition.positionNameCn }}
+
{{ selectedPlanPosition.positionNameEn }}
+
+
{{ selectedPlan.planid || '-' }}
@@ -250,8 +250,8 @@
-
-
时间信息
+
+
{{ $t('track.timeInfo') }}
{{ formatDateTime(selectedPlan.onlineDate) }}
@@ -270,7 +270,7 @@
-
最近操作
+
{{ $t('track.recentOperation') }}
-
操作
+
{{ $t('track.operation') }}
- 钢卷上线
- 手动卸卷
+ {{ $t('track.coilOnline') }}
+ {{ $t('track.manualUnload') }}
整卷回退
+ @click="handleOperate(selectedCard, 'ALL_RETURN')">{{ $t('track.allReturn') }}
半卷回退
- 卸卷并封闭
+ @click="handleOperate(selectedCard, 'HALF_RETURN')">{{ $t('track.halfReturn') }}
+ {{ $t('track.unloadAndBlock') }}
-
基本信息
+
{{ $t('track.basicInfo') }}
- | 位置名称 |
+ {{ $t('track.positionName') }} |
{{ selectedCard.positionNameCn || '-' }} |
- | 位置代号 |
+ {{ $t('track.positionCode') }} |
{{ selectedCard.positionNameEn || '-' }} |
- | 钢卷号 |
+ {{ $t('track.coilid') }} |
{{ selectedCard.matId || '-' }} |
- | 计划ID |
+ {{ $t('track.planId') }} |
{{ selectedCard.planId || '-' }} |
- | 计划号 |
+ {{ $t('track.planId') }} |
{{ selectedCard.planNo || '-' }} |
@@ -349,20 +349,20 @@
-
+
-
+
确认调整
+ @click="handleConfirmAdjust">{{ $t('track.confirmAdjustment') }}
@@ -371,14 +371,14 @@
@@ -389,69 +389,69 @@
stripe
max-height="500"
>
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
- 无计算结果数据
+ {{ $t('track.noCalculationResult') }}
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
@@ -498,39 +498,39 @@ const DEVICE_META = {
}
const PARAM_LABELS = {
- tensionPorBr1: '开卷张力1#',
- tensionPorBr2: '开卷张力2#',
- stripSpeed: '带钢速度',
- weldStatus: '焊机状态',
- celLength: '入口活套位置',
- celCapacity: '入口活套套量',
- tensionCel: '入口活套张力',
- cleaningVoltage: '清洗电压',
- cleaningCurrent: '清洗电流',
- alkaliConcentration: '碱液浓度',
- alkaliTemperature: '碱液温度',
- phfExitStripTemp: 'PH炉出口温度',
- potTemperature: '锌锅温度',
- gasConsumption: '燃气消耗',
- rtfExitStripTemp: '加热段出口温度',
- zincPotPower: '锌锅功率',
- jcsExitStripTemp: '冷却段出口温度',
- coolingTowerStripTemp: '冷却塔温度',
- scsExitStripTemp: '均衡段出口温度',
- tensionBr5Tm: 'BR5-TM张力',
- stripSpeedTmExit: 'TM出口速度',
- tmElongation: '光整延伸率',
- tensionTlBr7: 'TL-BR7张力',
- tlElongation: '拉矫延伸率',
- cxlLength: '出口活套位置',
- cxlCapacity: '出口活套套量',
- tensionCxl: '出口活套张力',
- inspectionStatus: '检查状态',
- coilLength: '钢卷长度',
- speedExitSection: '出口段速度',
- tensionBr9Tr: 'BR9-TR张力',
- avrCoatingWeightTop: '顶部涂重',
- avrCoatingWeightBottom: '底部涂重'
+ tensionPorBr1: 'tensionPorBr1',
+ tensionPorBr2: 'tensionPorBr2',
+ stripSpeed: 'stripSpeed',
+ weldStatus: 'weldStatus',
+ celLength: 'celLength',
+ celCapacity: 'celCapacity',
+ tensionCel: 'tensionCel',
+ cleaningVoltage: 'cleaningVoltage',
+ cleaningCurrent: 'cleaningCurrent',
+ alkaliConcentration: 'alkaliConcentration',
+ alkaliTemperature: 'alkaliTemperature',
+ phfExitStripTemp: 'phfExitStripTemp',
+ potTemperature: 'potTemperature',
+ gasConsumption: 'gasConsumption',
+ rtfExitStripTemp: 'rtfExitStripTemp',
+ zincPotPower: 'zincPotPower',
+ jcsExitStripTemp: 'jcsExitStripTemp',
+ coolingTowerStripTemp: 'coolingTowerStripTemp',
+ scsExitStripTemp: 'scsExitStripTemp',
+ tensionBr5Tm: 'tensionBr5Tm',
+ stripSpeedTmExit: 'stripSpeedTmExit',
+ tmElongation: 'tmElongation',
+ tensionTlBr7: 'tensionTlBr7',
+ tlElongation: 'tlElongation',
+ cxlLength: 'cxlLength',
+ cxlCapacity: 'cxlCapacity',
+ tensionCxl: 'tensionCxl',
+ inspectionStatus: 'inspectionStatus',
+ coilLength: 'coilLength',
+ speedExitSection: 'speedExitSection',
+ tensionBr9Tr: 'tensionBr9Tr',
+ avrCoatingWeightTop: 'avrCoatingWeightTop',
+ avrCoatingWeightBottom: 'avrCoatingWeightBottom'
}
const FIELD_ALIASES = {
@@ -771,17 +771,17 @@ export default {
if (!source) return []
const data = []
- // 通用字段:按 DeviceEnum.paramFields 取值
- meta.paramFields.forEach(field => {
- const value = this.getFieldValueWithAlias(source, field)
- if (value !== null && value !== undefined && value !== '') {
- data.push({
- label: PARAM_LABELS[field] || field,
- value: this.formatValue(value),
- unit: this.getFieldUnit(field)
- })
- }
- })
+ // 通用字段:按 DeviceEnum.paramFields 取值
+ meta.paramFields.forEach(field => {
+ const value = this.getFieldValueWithAlias(source, field)
+ if (value !== null && value !== undefined && value !== '') {
+ data.push({
+ label: this.$t(`track.${PARAM_LABELS[field] || field}`),
+ value: this.formatValue(value),
+ unit: this.getFieldUnit(field)
+ })
+ }
+ })
return data
}
@@ -868,7 +868,7 @@ export default {
const raw = source ? this.getFieldValueWithAlias(source, f) : null
const unit = this.getFieldUnit(f)
return {
- label: PARAM_LABELS[f] || f,
+ label: this.$t(`track.${PARAM_LABELS[f] || f}`),
value: `${this.formatValue(raw)}${unit ? ' ' + unit : ''}`
}
})
@@ -992,7 +992,7 @@ export default {
this.signalData = data
const operationText = this.getOperationText(data.operation)
- const autoFlagText = data.autoFlag === 1 ? '[手动]' : '[自动]'
+ const autoFlagText = data.autoFlag === 1 ? `[${this.$t('track.manualOperation')}]` : `[${this.$t('track.autoOperation')}]`
const config = this.getOperationConfig(data.operation)
// 检测到上线、生产中、生产完成等关键操作时,刷新生产计划队列
@@ -1005,7 +1005,7 @@ export default {
if(!repeatProducing){
this.$notify({
title: `${config.icon} ${config.title}`,
- message: `${autoFlagText} ${operationText}\n钢卷号: ${data.entryMatId}\n计划ID: ${data.planId || '-'}`,
+ message: `${autoFlagText} ${operationText}\n${this.$t('track.coilid')}: ${data.entryMatId}\n${this.$t('track.planId')}: ${data.planId || '-'}`,
type: config.type,
duration: config.duration,
position: 'top-right',
@@ -1017,10 +1017,10 @@ export default {
// 如果需要弹窗确认(甩尾等重要操作)
if (config.needAlert) {
this.$alert(
- `钢卷号: ${data.entryMatId}\n计划ID: ${data.planId || '-'}\n操作类型: ${operationText}\n操作方式: ${autoFlagText}`,
+ `${this.$t('track.coilid')}: ${data.entryMatId}\n${this.$t('track.planId')}: ${data.planId || '-'}\n${this.$t('track.operationType')}: ${operationText}\n${this.$t('track.operationType')}: ${autoFlagText}`,
`${config.icon} ${config.title}`,
{
- confirmButtonText: '知道了',
+ confirmButtonText: this.$t('common.confirm'),
type: config.type,
center: true
}
@@ -1048,10 +1048,10 @@ export default {
this.calcSetupResult = data
if (data.flag) {
- this.$message.success(`计算完成 (Key: ${data.key})`)
+ this.$message.success(`${this.$t('track.calculationSuccess')} (Key: ${data.key})`)
this.showCalcResultDialog = true
} else {
- this.$message.error(`计算失败 (Key: ${data.key})`)
+ this.$message.error(`${this.$t('track.calculationFailed')} (Key: ${data.key})`)
}
},
@@ -1059,15 +1059,15 @@ export default {
getOperationText(operation) {
const operationMap = {
- ONLINE: '钢卷上线',
- UNLOAD: '卸卷',
- PRODUCING: '生产中',
- PRODUCT: '生产完成',
- PAY_OVER: '甩尾',
- THROW_TAIL: '甩尾',
- ALL_RETURN: '整卷回退',
- HALF_RETURN: '半卷回退',
- BLOCK: '卸卷并封闭'
+ ONLINE: this.$t('track.coilOnline'),
+ UNLOAD: this.$t('track.manualUnload'),
+ PRODUCING: this.$t('track.producing'),
+ PRODUCT: this.$t('track.product'),
+ PAY_OVER: this.$t('track.payOver'),
+ THROW_TAIL: this.$t('track.throwTail'),
+ ALL_RETURN: this.$t('track.allReturn'),
+ HALF_RETURN: this.$t('track.halfReturn'),
+ BLOCK: this.$t('track.unloadAndBlock')
}
return operationMap[operation] || operation
},
@@ -1077,63 +1077,63 @@ export default {
const configs = {
ONLINE: {
icon: '🎬',
- title: '钢卷上线通知',
+ title: this.$t('track.onlineNotice'),
type: 'success',
duration: 4000,
needAlert: false
},
UNLOAD: {
icon: '📤',
- title: '卸卷操作通知',
+ title: this.$t('track.unloadNotice'),
type: 'info',
duration: 3000,
needAlert: false
},
PRODUCING: {
icon: '⚙️',
- title: '生产状态变更',
+ title: this.$t('track.producingNotice'),
type: 'success',
duration: 3000,
needAlert: false
},
PRODUCT: {
icon: '✅',
- title: '生产完成通知',
+ title: this.$t('track.productNotice'),
type: 'success',
duration: 4000,
needAlert: false
},
PAY_OVER: {
icon: '⚠️',
- title: '甩尾操作提示',
+ title: this.$t('track.payOverNotice'),
type: 'warning',
duration: 5000,
needAlert: true
},
THROW_TAIL: {
icon: '⚠️',
- title: '甩尾操作提示',
+ title: this.$t('track.throwTailNotice'),
type: 'warning',
duration: 5000,
needAlert: true
},
ALL_RETURN: {
icon: '↩️',
- title: '整卷回退通知',
+ title: this.$t('track.allReturnNotice'),
type: 'warning',
duration: 4000,
needAlert: false
},
HALF_RETURN: {
icon: '↩️',
- title: '半卷回退通知',
+ title: this.$t('track.halfReturnNotice'),
type: 'warning',
duration: 4000,
needAlert: false
},
BLOCK: {
icon: '🚫',
- title: '封闭操作通知',
+ title: this.$t('track.blockNotice'),
type: 'warning',
duration: 3000,
needAlert: false
@@ -1141,7 +1141,7 @@ export default {
}
return configs[operation] || {
icon: '📢',
- title: '操作通知',
+ title: this.$t('track.operationNotice'),
type: 'info',
duration: 3000,
needAlert: false
diff --git a/apps/l2/src/views/login.vue b/apps/l2/src/views/login.vue
index da46026..4684851 100644
--- a/apps/l2/src/views/login.vue
+++ b/apps/l2/src/views/login.vue
@@ -13,12 +13,12 @@
@@ -66,15 +66,6 @@ export default {
code: "",
uuid: ""
},
- loginRules: {
- username: [
- { required: true, trigger: "blur", message: "请输入您的账号" }
- ],
- password: [
- { required: true, trigger: "blur", message: "请输入您的密码" }
- ],
- code: [{ required: true, trigger: "change", message: "请输入验证码" }]
- },
loading: false,
// 验证码开关
captchaEnabled: true,
@@ -83,6 +74,19 @@ export default {
redirect: undefined
}
},
+ computed: {
+ loginRules() {
+ return {
+ username: [
+ { required: true, trigger: "blur", message: this.$t('common.enterUsername') }
+ ],
+ password: [
+ { required: true, trigger: "blur", message: this.$t('common.enterPassword') }
+ ],
+ code: [{ required: true, trigger: "change", message: this.$t('common.enterVerificationCode') }]
+ }
+ }
+ },
watch: {
$route: {
handler: function(route) {