国际化调整

This commit is contained in:
fan 2019-10-23 17:20:32 +08:00
parent 0a39680f6c
commit c83e882f6a
5 changed files with 37 additions and 20 deletions

View File

@ -94,5 +94,11 @@ export default {
getTrainListFailed: 'Failed to get train list',
getDraftCourseDataFailed: 'Failed to get draft course data!',
failedToGetCourseData: 'Failed to get course data!',
failedToGetSystemData: 'Failed to get system data!'
failedToGetSystemData: 'Failed to get system data!',
inquiryPLCDeviceFailed: 'Inquiry PLC device failed!',
getScreenDoorsListFailed: 'Get the list of screen doors failed!',
theDeviceTypeAlreadyExists: 'The device type already exists!',
connectToRealDeviceFailed: 'Connect to real device failed!',
getRealDeviceListFailed: 'Get real device list failed!',
deleteRealDeviceFailed: 'Delete real device failed!'
};

View File

@ -27,5 +27,10 @@ export default {
recording: 'recording...',
sendText: 'Send text',
left: 'left',
right: 'right'
right: 'right',
realDevice: 'Real device',
plcGatewayOnline: '[PLC gateway online]',
plcGatewayOffline: '[PLC gateway offline]',
uplinkPlatform: 'Uplink platform',
downlinkPlatform: 'Downlink platform'
};

View File

@ -94,5 +94,11 @@ export default {
getTrainListFailed: '获取列车列表失败',
getDraftCourseDataFailed: '获取草稿课程数据失败!',
failedToGetCourseData: '获取课程数据失败!',
failedToGetSystemData: '获取系统数据失败!'
failedToGetSystemData: '获取系统数据失败!',
inquiryPLCDeviceFailed: '查询PLC设备失败',
getScreenDoorsListFailed: '获取屏蔽门列表失败!',
theDeviceTypeAlreadyExists: '已存在该设备类型!',
connectToRealDeviceFailed: '关联真实设备失败!',
getRealDeviceListFailed: '获取真实设备列表失败!',
deleteRealDeviceFailed: '删除真实设备失败!'
};

View File

@ -27,5 +27,10 @@ export default {
recording: '录音中...',
sendText: '发送文字',
left: '左',
right: '右'
right: '右',
realDevice: '真实设备',
plcGatewayOnline: '[PLC网关在线]',
plcGatewayOffline: '[PLC网关离线]',
uplinkPlatform: '上行站台',
downlinkPlatform: '下行站台'
};

View File

@ -174,7 +174,7 @@
</div>
</div>
<div class="Scheduling">
<p class="title">真实设备-<span>{{ hasPlc?'[PLC网关在线]':'[PLC网关离线]' }}</span></p>
<p class="title">{{ $t('trainRoom.realDevice') }}-<span>{{ hasPlc?$t('trainRoom.plcGatewayOnline'):$t('trainRoom.plcGatewayOffline') }}</span></p>
<ul>
<li v-for="(nor, index) in stationStandList" :key="index" class="selectPerson">
<span>{{ realDeviceType[nor.deviceType] }}</span>
@ -905,7 +905,7 @@ export default {
this.hasPlc = false;
}
}).catch(() => {
this.$messageBox('查询PLC设备失败');
this.$messageBox(this.$t('error.inquiryPLCDeviceFailed'));
});
},
handleDoorList(mapId, stationList) {
@ -914,14 +914,14 @@ export default {
stationList.forEach(item => {
res.data.forEach(it =>{
if (item.code === it.stationCode) {
const direction = parseInt(it.doorLocationType)%2 ===0? '上行站台':'下行站台';
const direction = parseInt(it.doorLocationType)%2 ===0? this.$t('trainRoom.uplinkPlatform'):this.$t('trainRoom.downlinkPlatform');
doorList.push({code: it.code, name: item.name+direction});
}
});
});
this.doorList = doorList;
}).catch(() => {
this.$messageBox('获取屏蔽门列表失败!');
this.$messageBox(this.$t('error.getScreenDoorsListFailed'));
});
},
addingDevice() {
@ -933,33 +933,28 @@ export default {
}
});
if (typeSame) {
this.$message.info('已存在该设备类型!');
this.$message.info(this.$t('error.theDeviceTypeAlreadyExists'));
return;
}
setRealDevice(this.$route.query.group, roomDeviceVo);
},
handleChangeDevice(nor, doorList, stationStandList) {
setRealDevice(this.$route.query.group, nor);
// doorList.forEach(item => {
// item.disabled = false;
// stationStandList.forEach(nor => {
// if (item.code == nor.deviceCode) {
// item.disabled = true;
// }
// });
// });
setRealDevice(this.$route.query.group, nor).then(resp => {
}).catch(() => {
this.$messageBox(this.$t('error.connectToRealDeviceFailed'));
});
},
getDevicesList() {
getRealDevices(this.$route.query.group).then( resp => {
this.stationStandList = resp.data;
}).catch(() => {
this.$messageBox('获取真实设备列表失败!');
this.$messageBox(this.$t('error.getRealDeviceListFailed'));
});
},
handleDelDevice(nor) {
delRealDevice(nor.id, this.$route.query.group).then( resp => {
}).catch(() => {
this.$messageBox('删除真实设备失败!');
this.$messageBox(this.$t('error.deleteRealDeviceFailed'));
});
}
}