diff --git a/src/i18n/pages/login/en.ts b/src/i18n/pages/login/en.ts index 8a17bb4..e47f0d1 100644 --- a/src/i18n/pages/login/en.ts +++ b/src/i18n/pages/login/en.ts @@ -138,89 +138,89 @@ export default { no_operation: 'There is currently no battery swapping operation', }, // - un_repair_info:{ - Device_code:"Device code", - Please_enter:"Please enter", - Querying:"Querying", - Reset:"Reset", - Export:"Export", - Serial_number:"Serial number", - Device_type_encoding:"Device type encoding", - Alarm_code:"Alarm code", - Start_time:"Start time", - Alarm_level:"Alarm level", - Alarm_description:"Alarm description", - Processing_method:"Processing method", - Electric_charging_machine:"Electric charging machine", - BMS_battery:"BMS battery", - Processing_time:"Processing time", - The_device_has_been_processed_failure_log_table:"The device has been processed failure log table.xlsx", - Device_unprocessed_fault_log_table:"Device unprocessed fault log table.xlsx", - - }, - emeter_total_energy_value:{ - Chart_of_accumulated_value_of_electricity_meter_Chart_of_accumulated_value_of_electricity_meter:"Chart of accumulated value of electricity meter Chart of accumulated value of electricity meter", - This_month:"This month", - Energy_meter_cumulative_value_data:"Energy meter cumulative value data", - Direct_current:"Direct current", - Alternating_current:"Alternating current current", - Serial_number:"Serial number", - Electricity_meter_code:"Electricity meter code", - Kilowatt_hour:"Kilowatt hour", - Type_of_energy_meter:"Type of energy meter", - Direct_current_meter:"Direct current meter", - Alternating_current_table:"Alternating current table", + un_repair_info: { + Device_code: "Device code", + Please_enter: "Please enter", + Querying: "Querying", + Reset: "Reset", + Export: "Export", + Serial_number: "Serial number", + Device_type_encoding: "Device type encoding", + Alarm_code: "Alarm code", + Start_time: "Start time", + Alarm_level: "Alarm level", + Alarm_description: "Alarm description", + Processing_method: "Processing method", + Electric_charging_machine: "Electric charging machine", + BMS_battery: "BMS battery", + Processing_time: "Processing time", + The_device_has_been_processed_failure_log_table: "The device has been processed failure log table.xlsx", + Device_unprocessed_fault_log_table: "Device unprocessed fault log table.xlsx", + + }, + emeter_total_energy_value: { + Chart_of_accumulated_value_of_electricity_meter_Chart_of_accumulated_value_of_electricity_meter: "Chart of accumulated value of electricity meter Chart of accumulated value of electricity meter", + This_month: "This month", + Energy_meter_cumulative_value_data: "Energy meter cumulative value data", + Direct_current: "Direct current", + Alternating_current: "Alternating current current", + Serial_number: "Serial number", + Electricity_meter_code: "Electricity meter code", + Kilowatt_hour: "Kilowatt hour", + Type_of_energy_meter: "Type of energy meter", + Direct_current_meter: "Direct current meter", + Alternating_current_table: "Alternating current table", }, - emeter_real_energy_value:{ - Meter_minute_value_DC_chart:"Meter minute value DC chart", - Meter_minute_value_AC_chart:"Meter minute value AC chart", - Meter_hour_value_DC_chart:"Meter hour value DC chart", - Meter_hour_value_AC_chart:"Meter hour value AC chart", + emeter_real_energy_value: { + Meter_minute_value_DC_chart: "Meter minute value DC chart", + Meter_minute_value_AC_chart: "Meter minute value AC chart", + Meter_hour_value_DC_chart: "Meter hour value DC chart", + Meter_hour_value_AC_chart: "Meter hour value AC chart", }, - ac:{ - Current_state:"Current state", - stateless:"stateless", - Open:"Open", - Close:"Close", - The_operation_succeeded:"The operation succeeded", - Are_you_sure_you_want_to_set_startup:"Are you sure you want to set startup?", + ac: { + Current_state: "Current state", + stateless: "stateless", + Open: "Open", + Close: "Close", + The_operation_succeeded: "The operation succeeded", + Are_you_sure_you_want_to_set_startup: "Are you sure you want to set startup?", }, - - fan:{ - Fan_control:"Fan control", - Current_state:"Current state", - stateless:"stateless", - Open:"Open", - Close:"Close", + + fan: { + Fan_control: "Fan control", + Current_state: "Current state", + stateless: "stateless", + Open: "Open", + Close: "Close", Operation_successful: 'Operation successful', Operation_failed: 'Operation failed', }, - warehouses:{ - To_transfer_battery_please_click_Select:"To transfer battery, please click Select...", - Select:"Select", - Fire_shelter:"Fire shelter", - Current_change_channel:"(Current change channel)", - Position_of_position:"Position of position", - Position_number:" Position number", + warehouses: { + To_transfer_battery_please_click_Select: "To transfer battery, please click Select...", + Select: "Select", + Fire_shelter: "Fire shelter", + Current_change_channel: "(Current change channel)", + Position_of_position: "Position of position", + Position_number: " Position number", Confirmation_warehouse_relocation: 'Confirmation of warehouse relocation', Cancel_warehouse_move: 'Cancel warehouse move', Fire_removal_please_move_away: 'Fire removal is about to take place, please move away!!!', Cancel: 'Cancel', Confirmation: 'Confirmation', - Please_select_your_position:"Please select your position", - Please_select_a_space_with_batteries:"Please select a space with batteries", - Transferable_positions:"Transferable positions", - Transfer_in_warehouse:"Transfer in warehouse...", + Please_select_your_position: "Please select your position", + Please_select_a_space_with_batteries: "Please select a space with batteries", + Transferable_positions: "Transferable positions", + Transfer_in_warehouse: "Transfer in warehouse...", }, - direct_current:{ - Querying:"Querying", - Reset:"Reset", - Ac_power_meter_No:"Ac power meter No", - Kilowatt_hour:"Kilowatt hour", - Date:"Date", - Ac_power_meter:"Ac power meter", - Dc_power_meter:"Dc power meter", + direct_current: { + Querying: "Querying", + Reset: "Reset", + Ac_power_meter_No: "Ac power meter No", + Kilowatt_hour: "Kilowatt hour", + Date: "Date", + Ac_power_meter: "Ac power meter", + Dc_power_meter: "Dc power meter", }, // charging: { @@ -382,6 +382,144 @@ export default { confirmSwitchToManualCharging: "confirm switch to manual charging", confirmEnableDevice: "confirm enable device", confirmDisableDevice: "confirm disable device" + }, + replace_log: { + orderNumber: "Order Number", + licensePlate: "License Plate", + fullBatteryCode: "Full Battery Code", + emptyBatteryCode: "Empty Battery Code", + startTime: "Start Time", + endTime: "End Time", + search: "Search", + reset: "Reset", + addNew: "Add New", + batchDelete: "Batch Delete", + export: "Export", + serialNumber: "Serial Number", + cloudPlatformOrderNumber: "Cloud Platform Order Number", + reportCount: "Report Count", + vehicleVin: "Vehicle VIN", + vehicleEntryTime: "Vehicle Entry Time", + vehicleExitTime: "Vehicle Exit Time", + batteryChangeStartTime: "Battery Change Start Time", + batteryChangeEndTime: "Battery Change End Time", + batteryChangeType: "Battery Change Type", + manual: "Manual", + automatic: "Automatic", + batteryChangeResult: "Battery Change Result", + unknown: "Unknown", + success: "Success", + failure: "Failure", + failureReason: "Failure Reason", + cloudPlatformUploadStatus: "Cloud Platform Upload Status", + notUploaded: "Not Uploaded", + uploaded: "Uploaded", + operation: "Operation", + reportToCloud: "Report to Cloud", + edit: "Edit", + delete: "Delete", + warehousePositionIn: "Warehouse Position In", + emptyBatterySoc: "Empty Battery SOC", + warehousePositionOut: "Warehouse Position Out", + fullBatterySoc: "Full Battery SOC", + confirmDeleteCurrentData: "Confirm Delete Current Data?", + deleteSuccess: "Delete Success", + deleteFailure: "Delete Failure", + confirmBatchDeleteData: "Confirm Batch Delete Data?", + confirmReportToCloud: "Confirm Report to Cloud?", + reportSuccess: "Report Success", + reportFailure: "Report Failure" + }, + replace_status_log: { + batteryChangeOrderNumber: "Battery Change Order Number", + stepSequence: "Step Sequence", + stepName: "Step Name", + search: "Search", + reset: "Reset", + serialNumber: "Serial Number", + creationTime: "Creation Time" + }, + station_battery_total_result: { + warehousePositionOut: "Warehouse Position Out", + batteryCodeOut: "Battery Code Out", + socOut: "SOC Out", + search: "Search", + reset: "Reset", + serialNumber: "Serial Number", + warehousePositionIn: "Warehouse Position In", + creationTime: "Creation Time", + updateTime: "Update Time", + status: "Status", + initialization: "Initialization", + inProgress: "In Progress", + success: "Success", + failure: "Failure", + type: "Type", + automatic: "Automatic", + manual: "Manual" + }, + day_swap_run_result: { + batchDelete: "Batch Delete", + export: "Export", + serialNumber: "Serial Number", + averageChargingDurationMin: "Average Charging Duration (min)", + averageBatteryChangeDurationMin: "Average Battery Change Duration (min)", + batteryChangeDate: "Battery Change Date", + firstBatteryChangeTime: "First Battery Change Time", + endBatteryChangeTime: "End Battery Change Time", + totalChargingCount: "Total Charging Count", + operationalStatus: "Operational Status", + inOperation: "In Operation", + outOfService: "Out of Service", + equipmentMaintenanceStatus: "Equipment Maintenance Status", + suspended: "Suspended", + totalBatteryChangeCount: "Total Battery Change Count", + totalBatteryChangeDurationMin: "Total Battery Change Duration (min)", + operation: "Operation", + delete: "Delete" + }, + charging_real_result: { + orderNumber: "Order Number", + batteryCode: "Battery Code", + chargerNumber: "Charger Number", + batteryChangeOrderNumber: "Battery Change Order Number", + search: "Search", + reset: "Reset", + export: "Export", + serialNumber: "Serial Number", + startMessageStatus: "Start Message Status", + initialization: "Initialization", + startSuccess: "Start Success", + chargingStartTime: "Charging Start Time", + chargingEndTime: "Charging End Time", + chargingStartSoc: "Charging Start SOC", + chargingEndSoc: "Charging End SOC", + chargingDurationMin: "Charging Duration (min)", + chargingEnergyKwh: "Charging Energy (kWh)", + acMeterReadingKwh: "AC Meter Reading (kWh)", + chargingStartAcMeterReadingKwh: "Charging Start AC Meter Reading (kWh)", + chargingEndAcMeterReadingKwh: "Charging End AC Meter Reading (kWh)", + chargingStartDcMeterReadingKwh: "Charging Start DC Meter Reading (kWh)", + chargingEndDcMeterReadingKwh: "Charging End DC Meter Reading (kWh)", + startType: "Start Type", + stationControlAutoStart: "Station Control Auto Start", + stationControlManualStart: "Station Control Manual Start", + chargerAutoStart: "Charger Auto Start", + stopReason: "Stop Reason", + fullChargeAutoStop: "Full Charge Auto Stop", + manualStop: "Manual Stop", + peakPeriodEnergy: "Peak Period Energy", + peakingPeriodEnergy: "Peak period electricity consumption", + offPeakPeriodEnergy: "Off-Peak Period Energy", + flatPeriodEnergy: "Flat Period Energy", + tariffVersionNumber: "Tariff Version Number", + cloudPlatformUploadStatus: "Cloud Platform Upload Status", + notUploaded: "Not Uploaded", + uploaded: "Uploaded", + operation: "Operation", + reportToCloud: "Report to Cloud" } + + }; diff --git a/src/i18n/pages/login/zh-cn.ts b/src/i18n/pages/login/zh-cn.ts index eb67933..d65494a 100644 --- a/src/i18n/pages/login/zh-cn.ts +++ b/src/i18n/pages/login/zh-cn.ts @@ -137,89 +137,89 @@ export default { no_operation: '当前无换电操作', }, // - un_repair_info:{ - Device_code:"设备编码", - Please_enter:"请输入", - Querying:"查询", - Reset:"重置", - Export:"导出", - Serial_number:"序号", - Device_type_encoding:"设备类型编码", - Alarm_code:"报警编码", - Start_time:"开始时间", - Alarm_level:"报警等级", - Alarm_description:"报警描述", - Processing_method:"处理方法", - Electric_charging_machine:"充电机", - BMS_battery:"BMS电池", - Processing_time:"处理时间", - The_device_has_been_processed_failure_log_table:"设备已处理故障日志表.xlsx", - Device_unprocessed_fault_log_table:"设备未处理故障日志表.xlsx", - + un_repair_info: { + Device_code: "设备编码", + Please_enter: "请输入", + Querying: "查询", + Reset: "重置", + Export: "导出", + Serial_number: "序号", + Device_type_encoding: "设备类型编码", + Alarm_code: "报警编码", + Start_time: "开始时间", + Alarm_level: "报警等级", + Alarm_description: "报警描述", + Processing_method: "处理方法", + Electric_charging_machine: "充电机", + BMS_battery: "BMS电池", + Processing_time: "处理时间", + The_device_has_been_processed_failure_log_table: "设备已处理故障日志表.xlsx", + Device_unprocessed_fault_log_table: "设备未处理故障日志表.xlsx", + }, - emeter_total_energy_value:{ - Chart_of_accumulated_value_of_electricity_meter_Chart_of_accumulated_value_of_electricity_meter:"电能表累计值图表", - This_month:"本月", - Energy_meter_cumulative_value_data:"电能表累计值数据", - Direct_current:"直流", - Alternating_current:"交流", - Serial_number:"序号", - Electricity_meter_code:"电表编码", - Kilowatt_hour:"千瓦时(kwh)", - Type_of_energy_meter :"电能表类型", - Direct_current_meter:"直流表", - Alternating_current_table:"交流表", + emeter_total_energy_value: { + Chart_of_accumulated_value_of_electricity_meter_Chart_of_accumulated_value_of_electricity_meter: "电能表累计值图表", + This_month: "本月", + Energy_meter_cumulative_value_data: "电能表累计值数据", + Direct_current: "直流", + Alternating_current: "交流", + Serial_number: "序号", + Electricity_meter_code: "电表编码", + Kilowatt_hour: "千瓦时(kwh)", + Type_of_energy_meter: "电能表类型", + Direct_current_meter: "直流表", + Alternating_current_table: "交流表", }, - emeter_real_energy_value:{ - Meter_minute_value_DC_chart:"电能表分钟值直流图表", - Meter_minute_value_AC_chart:"电能表分钟值交流图表", - Meter_hour_value_DC_chart:"电能表小时值直流图表", - Meter_hour_value_AC_chart:"电能表小时值交流图表", + emeter_real_energy_value: { + Meter_minute_value_DC_chart: "电能表分钟值直流图表", + Meter_minute_value_AC_chart: "电能表分钟值交流图表", + Meter_hour_value_DC_chart: "电能表小时值直流图表", + Meter_hour_value_AC_chart: "电能表小时值交流图表", }, - ac:{ - Current_state:"当前状态", - stateless:"无状态", - Open:"打开", - Close:"关闭", - The_operation_succeeded:"操作成功", - Are_you_sure_you_want_to_set_startup:"确定要设置启动吗", + ac: { + Current_state: "当前状态", + stateless: "无状态", + Open: "打开", + Close: "关闭", + The_operation_succeeded: "操作成功", + Are_you_sure_you_want_to_set_startup: "确定要设置启动吗", }, - fan:{ - Fan_control:"风机控制", - Current_state:"当前状态", - stateless:"无状态", - Open:"打开", - Close:"关闭", + fan: { + Fan_control: "风机控制", + Current_state: "当前状态", + stateless: "无状态", + Open: "打开", + Close: "关闭", Operation_successful: '操作成功', Operation_failed: '操作失败', }, - warehouses:{ - To_transfer_battery_please_click_Select:"待转移电池,请点击选择...", - Select:"选择", - Fire_shelter:"消防仓", - Current_change_channel:"(换电通道)", - Position_of_position:"仓位", - Position_number:"仓位编号", + warehouses: { + To_transfer_battery_please_click_Select: "待转移电池,请点击选择...", + Select: "选择", + Fire_shelter: "消防仓", + Current_change_channel: "(换电通道)", + Position_of_position: "仓位", + Position_number: "仓位编号", Confirmation_warehouse_relocation: '确定移仓', Cancel_warehouse_move: '取消移仓', Fire_removal_please_move_away: '即将进行消防移仓,请车辆驶离!!!', Cancel: '取消', Confirmation: '确认', - Please_select_your_position:"请选择仓位", - Please_select_a_space_with_batteries:"请选择有电池的仓位", - Transferable_positions:"可转移仓位", - Transfer_in_warehouse:"移仓中...", + Please_select_your_position: "请选择仓位", + Please_select_a_space_with_batteries: "请选择有电池的仓位", + Transferable_positions: "可转移仓位", + Transfer_in_warehouse: "移仓中...", }, - direct_current:{ - Querying:"查询", - Reset:"重置", - Ac_power_meter:"号交流电能表", - Dc_power_meter:"号直流电能表", - Kilowatt_hour:"千瓦时", - Date:"日期", + direct_current: { + Querying: "查询", + Reset: "重置", + Ac_power_meter: "号交流电能表", + Dc_power_meter: "号直流电能表", + Kilowatt_hour: "千瓦时", + Date: "日期", }, // charging: { @@ -381,7 +381,142 @@ export default { confirmSwitchToManualCharging: "确定切换手动充电吗?", confirmEnableDevice: "确定设备启用吗?", confirmDisableDevice: "确定设备禁用吗?" - } - - + }, + replace_log: { + orderNumber: "订单号", + licensePlate: "车牌号", + fullBatteryCode: "满电包编码", + emptyBatteryCode: "亏电包编码", + startTime: "开始时间", + endTime: "结束时间", + search: "查询", + reset: "重置", + addNew: "新增", + batchDelete: "批量删除", + export: "导出", + serialNumber: "序号", + cloudPlatformOrderNumber: "云平台订单号", + reportCount: "上报次数", + vehicleVin: "车辆Vin码", + vehicleEntryTime: "车辆进场时间", + vehicleExitTime: "车辆离场时间", + batteryChangeStartTime: "换电开始时间", + batteryChangeEndTime: "换电结束时间", + batteryChangeType: "换电类型", + manual: "手动", + automatic: "自动", + batteryChangeResult: "换电结果", + unknown: "未知", + success: "成功", + failure: "失败", + failureReason: "失败原因", + cloudPlatformUploadStatus: "上传云平台状态", + notUploaded: "未上传", + uploaded: "已上传", + operation: "操作", + reportToCloud: "上报云端", + edit: "编辑", + delete: "删除", + warehousePositionIn: "入仓仓位", + emptyBatterySoc: "亏电池包soc", + warehousePositionOut: "出仓仓位", + fullBatterySoc: "满电池包soc", + confirmDeleteCurrentData: "确定删除当前数据吗?", + deleteSuccess: "删除成功", + deleteFailure: "删除失败", + confirmBatchDeleteData: "确定批量删除这些数据吗?", + confirmReportToCloud: "确定上报云端当前数据吗?", + reportSuccess: "上报成功", + reportFailure: "上报失败" + }, + replace_status_log: { + batteryChangeOrderNumber: "换电订单编号", + stepSequence: "步序", + stepName: "步序名称", + search: "查询", + reset: "重置", + serialNumber: "序号", + creationTime: "创建时间" + }, + station_battery_total_result: { + warehousePositionOut: "出仓仓位号", + batteryCodeOut: "出仓电池编号", + socOut: "出仓soc", + search: "查询", + reset: "重置", + serialNumber: "序号", + warehousePositionIn: "入仓仓位号", + creationTime: "创建时间", + updateTime: "更新时间", + status: "状态", + initialization: "初始化", + inProgress: "进行中", + success: "成功", + failure: "失败", + type: "类型", + automatic: "自动", + manual: "手动" + }, + day_swap_run_result: { + batchDelete: "批量删除", + export: "导出", + serialNumber: "序号", + averageChargingDurationMin: "平均充电时长(min)", + averageBatteryChangeDurationMin: "平均换电时长(min)", + batteryChangeDate: "换电日期", + firstBatteryChangeTime: "首次换电时间", + endBatteryChangeTime: "结束换电时间", + totalChargingCount: "充电总次数", + operationalStatus: "运营状态", + inOperation: "营运中", + outOfService: "歇业中", + equipmentMaintenanceStatus: "设备维护状态", + suspended: "暂停营业", + totalBatteryChangeCount: "换电总次数", + totalBatteryChangeDurationMin: "换电总时长(min)", + operation: "操作", + delete: "删除" + }, + + charging_real_result: { + orderNumber: "订单号", + batteryCode: "电池编号", + chargerNumber: "充电机编号", + batteryChangeOrderNumber: "换电订单编号", + search: "查询", + reset: "重置", + export: "导出", + serialNumber: "序号", + startMessageStatus: "启动报文状态", + initialization: "初始化", + startSuccess: "启动成功", + chargingStartTime: "充电开始时间", + chargingEndTime: "充电结束时间", + chargingStartSoc: "充电开始soc", + chargingEndSoc: "充电结束soc", + chargingDurationMin: "充电时长(min)", + chargingEnergyKwh: "充电电量(kwh)", + acMeterReadingKwh: "交流电表量(kwh)", + chargingStartAcMeterReadingKwh: "充电开始交流表电量(kwh)", + chargingEndAcMeterReadingKwh: "充电结束交流表电量(kwh)", + chargingStartDcMeterReadingKwh: "充电开始直流表电量(kwh)", + chargingEndDcMeterReadingKwh: "充电结束直流表电量(kwh)", + startType: "启动类型", + stationControlAutoStart: "站控自启", + stationControlManualStart: "站控手动启动", + chargerAutoStart: "充电机自启", + stopReason: "停止原因", + fullChargeAutoStop: "满电自动停止", + manualStop: "人工停止", + peakPeriodEnergy: "尖时段电量", + peakingPeriodEnergy: "峰时段电量", + flatPeriodEnergy: "平时段电量", + offPeakPeriodEnergy: "谷时段电量", + tariffVersionNumber: "电价版本号", + cloudPlatformUploadStatus: "上传云平台状态", + notUploaded: "未上传", + uploaded: "已上传", + operation: "操作", + reportToCloud: "上报云端" + } }; diff --git a/src/views/charge_battery/charging_real_result/index.vue b/src/views/charge_battery/charging_real_result/index.vue index 5dfcfda..e99bbfc 100644 --- a/src/views/charge_battery/charging_real_result/index.vue +++ b/src/views/charge_battery/charging_real_result/index.vue @@ -2,26 +2,26 @@
- - + + - - + + - + - - + + - 查询 - 重置 - 导出 + {{ $t('message.charging_real_result.search') }} + {{ $t('message.charging_real_result.reset') }} + {{ $t('message.charging_real_result.export') }} @@ -34,17 +34,17 @@ - - - - + + + + - + - - - - - - - - - - - - + + + + + + + + + + + + - + - - - - - - - + + + + + + + - + @@ -124,7 +126,8 @@ import { downloadByData, getFileName } from '/@/utils/download'; import { getAPI } from '/@/utils/axios-utils'; import { SysChargingRealReaultApi } from '/@/api-services/api'; // import { TenantOutput } from '/@/api-services/models'; - +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); const editReplaceRef = ref>(); const tableRef = ref(); @@ -147,7 +150,8 @@ const state = reactive({ }, toTal: 0 as any, editTenantTitle: '', -});222 +}); +222; onMounted(async () => { handleQuery(); @@ -155,7 +159,8 @@ onMounted(async () => { // 查询操作 const handleQuery = async () => { - state.loading = true;22 + state.loading = true; + 22; let params = Object.assign(state.queryParams, state.tableParams); var res = await getAPI(SysChargingRealReaultApi).apiSwapOrderQueryPagePost(params); // console.log(res,"zheshi res") @@ -181,13 +186,13 @@ const handleExport = async () => { // 打开新增页面 const openAddTenant = () => { - state.editTenantTitle = '添加'; + state.editTenantTitle = t('message.replace_log.addNew'); editReplaceRef.value?.openDialog({ tenantType: 0, orderNo: 100 }); }; // 打开编辑页面 const openEditTenant = (row: any) => { - state.editTenantTitle = '编辑'; + state.editTenantTitle = t('message.replace_log.edit'); editReplaceRef.value?.openDialog(row); }; @@ -211,8 +216,8 @@ const handleSelectionChange = (data: EmptyObjectType[]) => { // // console.log(row, 'row'); // ElMessageBox.confirm(`确定删除id为:【${row.id}】的数据吗?`, '提示', { -// confirmButtonText: '确定', -// cancelButtonText: '取消', +// confirmButtonText: t('message.system_base_config.submit'), +// cancelButtonText: t('message.system_base_config.cancel'), // type: 'warning', // }) // .then(async () => { @@ -232,8 +237,8 @@ const handleSelectionChange = (data: EmptyObjectType[]) => { // const bacthDelete = () => { // if (state.selectlist.length == 0) return false; // ElMessageBox.confirm(`确定批量删除id为【${state.selectlist[0].id}】等${state.selectlist.length}个配置?`, '提示', { -// confirmButtonText: '确定', -// cancelButtonText: '取消', +// confirmButtonText: t('message.system_base_config.submit'), +// cancelButtonText: t('message.system_base_config.cancel'), // type: 'warning', // }) // .then(async () => { @@ -253,17 +258,17 @@ const handleSelectionChange = (data: EmptyObjectType[]) => { // 上报云端 const uploadcloud = (row: any) => { - ElMessageBox.confirm(`确定上报云端id为【${row.id}】的数据吗?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + ElMessageBox.confirm(t('message.replace_log.confirmReportToCloud'), 'tips', { + confirmButtonText: t('message.system_base_config.submit'), + cancelButtonText: t('message.system_base_config.cancel'), type: 'warning', }) .then(async () => { var response = await getAPI(SysChargingRealReaultApi).apiUploadCloudGet(row.id); if (response.data.isSuccess) { - ElMessage.success('上报成功'); + ElMessage.success(t('message.replace_log.reportSuccess')); } else { - ElMessage.error('上报失败'); + ElMessage.error(t('message.replace_log.reportFailure')); } handleQuery(); }) diff --git a/src/views/replace_battery/day_swap_run_result/index.vue b/src/views/replace_battery/day_swap_run_result/index.vue index 80209c3..7a3fc8d 100644 --- a/src/views/replace_battery/day_swap_run_result/index.vue +++ b/src/views/replace_battery/day_swap_run_result/index.vue @@ -4,8 +4,8 @@ - 批量删除 - 导出 + {{ $t('message.day_swap_run_result.batchDelete') }} + {{ $t('message.day_swap_run_result.export') }} @@ -13,29 +13,29 @@ - - - - - - + + + + + + - - + + - - + + - + @@ -61,7 +61,8 @@ import { downloadByData, getFileName } from '/@/utils/download'; import { getAPI } from '/@/utils/axios-utils'; import { SysDaySwapRunResultApi } from '/@/api-services/api'; - +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); const tableRef = ref(); const state = reactive({ @@ -125,18 +126,18 @@ const handleSelectionChange = (data: EmptyObjectType[]) => { const delReplace = (row: any) => { // console.log(row, 'row'); - ElMessageBox.confirm(`确定删除id为:【${row.id}】的数据吗?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + ElMessageBox.confirm(t('message.replace_log.confirmDeleteCurrentData'), 'tips', { + confirmButtonText: t('message.system_base_config.submit'), + cancelButtonText: t('message.system_base_config.cancel'), type: 'warning', }) .then(async () => { const ids = row.id; const response = await getAPI(SysDaySwapRunResultApi).apiDeleteDaySwapRunResPost(ids); if (response.data.isSuccess) { - ElMessage.success('删除成功'); + ElMessage.success(t('message.replace_log.deleteSuccess')); } else { - ElMessage.error('删除失败'); + ElMessage.error(t('message.replace_log.deleteFailure')); } // tableRef.value.handleList(); handleQuery(); @@ -146,9 +147,9 @@ const delReplace = (row: any) => { //批量删除 const bacthDelete = () => { if (state.selectlist.length == 0) return false; - ElMessageBox.confirm(`确定批量删除id为【${state.selectlist[0].id}】等${state.selectlist.length}个配置?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + ElMessageBox.confirm(t('message.replace_log.confirmBatchDeleteData'), 'tips', { + confirmButtonText: t('message.system_base_config.submit'), + cancelButtonText: t('message.system_base_config.cancel'), type: 'warning', }) .then(async () => { @@ -157,9 +158,9 @@ const bacthDelete = () => { }); var response = await getAPI(SysDaySwapRunResultApi).apiBatchDeleteDaySwapRunResByIdsPost(ids); if (response.data.isSuccess) { - ElMessage.success('删除成功'); + ElMessage.success(t('message.replace_log.deleteSuccess')); } else { - ElMessage.error('删除失败'); + ElMessage.error(t('message.replace_log.deleteFailure')); } handleQuery(); }) diff --git a/src/views/replace_battery/replace_log/component/editreplace.vue b/src/views/replace_battery/replace_log/component/editreplace.vue index 634a564..ed10861 100644 --- a/src/views/replace_battery/replace_log/component/editreplace.vue +++ b/src/views/replace_battery/replace_log/component/editreplace.vue @@ -10,17 +10,17 @@ - + - + - + @@ -30,49 +30,49 @@ --> - + - - + + - - + + - - + + - - + + - - - - - + + + + + - + - - - - + + + + @@ -86,32 +86,32 @@ - + - + - + - + - + - + @@ -142,8 +142,8 @@ @@ -157,6 +157,8 @@ import { ElMessageBox, ElMessage } from 'element-plus'; import { getAPI } from '/@/utils/axios-utils'; import { SysReplaceLogOnlyApi } from '/@/api-services/api'; import { UpdateReplaceLogInput } from '/@/api-services/models'; +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); const props = defineProps({ title: String, @@ -216,12 +218,12 @@ const submit = () => { if (state.ruleForm.id != undefined && state.ruleForm.id > 0) { if (state.ruleForm.hasOwnProperty('downBatteryNo')) { - state.ruleForm.batteryList[0].downBatteryNo = state.ruleForm.downBatteryNo == ''? null: state.ruleForm.downBatteryNo; - state.ruleForm.batteryList[0].downBatteryBinNo = state.ruleForm.downBatteryBinNo == ''? null: state.ruleForm.downBatteryBinNo; - state.ruleForm.batteryList[0].downBatterySoc = state.ruleForm.downBatterySoc == ''? null: state.ruleForm.downBatterySoc; - state.ruleForm.batteryList[0].upBatteryNo = state.ruleForm.upBatteryNo == ''? null: state.ruleForm.upBatteryNo; - state.ruleForm.batteryList[0].upBatteryBinNo = state.ruleForm.upBatteryBinNo == ''? null: state.ruleForm.upBatteryBinNo; - state.ruleForm.batteryList[0].upBatterySoc = state.ruleForm.upBatterySoc == ''? null: state.ruleForm.upBatterySoc; + state.ruleForm.batteryList[0].downBatteryNo = state.ruleForm.downBatteryNo == '' ? null : state.ruleForm.downBatteryNo; + state.ruleForm.batteryList[0].downBatteryBinNo = state.ruleForm.downBatteryBinNo == '' ? null : state.ruleForm.downBatteryBinNo; + state.ruleForm.batteryList[0].downBatterySoc = state.ruleForm.downBatterySoc == '' ? null : state.ruleForm.downBatterySoc; + state.ruleForm.batteryList[0].upBatteryNo = state.ruleForm.upBatteryNo == '' ? null : state.ruleForm.upBatteryNo; + state.ruleForm.batteryList[0].upBatteryBinNo = state.ruleForm.upBatteryBinNo == '' ? null : state.ruleForm.upBatteryBinNo; + state.ruleForm.batteryList[0].upBatterySoc = state.ruleForm.upBatterySoc == '' ? null : state.ruleForm.upBatterySoc; delete state.ruleForm['downBatteryNo']; delete state.ruleForm['downBatteryBinNo']; delete state.ruleForm['downBatterySoc']; @@ -231,11 +233,11 @@ const submit = () => { } const response = await getAPI(SysReplaceLogOnlyApi).apiSysReplaceLogUpdatePost(state.ruleForm); if (response.data.isSuccess) { - ElMessage.success('修改成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error('修改失败'); + ElMessage.error(t('message.system_base_config.Operation_failed')); } - } else if (props.title == '添加') { + } else if (props.title == t('message.replace_log.addNew')) { // await getAPI(SysReplaceLogApi).apiSysTenantAddPost(state.ruleForm); // console.log(state.ruleForm, 'state.ruleForm'); @@ -265,9 +267,9 @@ const submit = () => { }; const response = await getAPI(SysReplaceLogOnlyApi).apiSwapOrderAddPost(params); if (response.data.isSuccess) { - ElMessage.success('添加成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error('添加失败'); + ElMessage.error(t('message.system_base_config.Operation_failed')); } } closeDialog(); diff --git a/src/views/replace_battery/replace_log/index.vue b/src/views/replace_battery/replace_log/index.vue index 8f66f02..71f5dab 100644 --- a/src/views/replace_battery/replace_log/index.vue +++ b/src/views/replace_battery/replace_log/index.vue @@ -4,75 +4,84 @@ - - + + - - + + - - + + - - + + - + - + - + - + - 查询 - 重置 + {{ $t('message.replace_log.search') }} + {{ $t('message.replace_log.reset') }} - 新增 - 批量删除 - 导出 + {{ $t('message.replace_log.addNew') }} + {{ $t('message.replace_log.batchDelete') }} + {{ $t('message.replace_log.export') }} - - - - - - - - - - - + + + + + + + + + + + - + - - + + - + @@ -92,22 +101,21 @@ @@ -129,11 +137,13 @@ import { downloadByData, getFileName } from '/@/utils/download'; import { getAPI } from '/@/utils/axios-utils'; import { SysReplaceLogOnlyApi } from '/@/api-services/api'; +import { useI18n } from 'vue-i18n'; import { number } from 'echarts'; // import { TenantOutput } from '/@/api-services/models'; const editReplaceRef = ref>(); const tableRef = ref(); +const { t } = useI18n(); // const grantMenuRef = ref>(); const state = reactive({ @@ -163,7 +173,7 @@ const state = reactive({ upBatteryNo: '暂无数据', upBatteryBinNo: '暂无数据', upBatterySoc: '暂无数据', - vtm: '暂无数据' + vtm: '暂无数据', }); onMounted(async () => { @@ -224,24 +234,25 @@ const openDictDataDialog = (row: any) => { // 重置操作 const resetQuery = () => { state.queryParams.sn = undefined; - state.queryParams.vehicleNo = undefined, - state.queryParams.downBatteryNo = undefined, - state.queryParams.upBatteryNo = undefined, - state.queryParams.swapBeginTime = undefined, - state.queryParams.swapEndTime = undefined, - handleQuery(); + (state.queryParams.vehicleNo = undefined), + (state.queryParams.downBatteryNo = undefined), + (state.queryParams.upBatteryNo = undefined), + (state.queryParams.swapBeginTime = undefined), + (state.queryParams.swapEndTime = undefined), + handleQuery(); }; // 打开新增页面 const openAddTenant = () => { - state.editTenantTitle = '添加'; + let title = t('message.replace_log.addNew'); + state.editTenantTitle = title; let num = 1; editReplaceRef.value?.openDialog({ tenantType: 0, orderNo: 100 }, num); }; // 打开编辑页面 const openEditTenant = (row: any) => { - state.editTenantTitle = '编辑'; + state.editTenantTitle = t('message.replace_log.edit'); let num = 2; editReplaceRef.value?.openDialog(row, num); }; @@ -265,18 +276,18 @@ const handleSelectionChange = (data: EmptyObjectType[]) => { const delReplace = (row: any) => { // console.log(row, 'row'); - ElMessageBox.confirm(`确定删除id为:【${row.id}】的数据吗?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + ElMessageBox.confirm(t('message.replace_log.confirmDeleteCurrentData'), 'tips', { + confirmButtonText: t('message.system_base_config.submit'), + cancelButtonText: t('message.system_base_config.cancel'), type: 'warning', }) .then(async () => { const ids = [row.id]; const response = await getAPI(SysReplaceLogOnlyApi).apiSysReplaceLogDeleteByIdsPost(ids); if (response.data.isSuccess) { - ElMessage.success('删除成功'); + ElMessage.success(t('message.replace_log.deleteSuccess')); } else { - ElMessage.error('删除失败'); + ElMessage.error(t('message.replace_log.deleteFailure')); } // tableRef.value.handleList(); handleQuery(); @@ -286,9 +297,9 @@ const delReplace = (row: any) => { //批量删除 const bacthDelete = () => { if (state.selectlist.length == 0) return false; - ElMessageBox.confirm(`确定批量删除id为【${state.selectlist[0].id}】等${state.selectlist.length}个配置?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + ElMessageBox.confirm(t('message.replace_log.confirmBatchDeleteData'), 'tips', { + confirmButtonText: t('message.system_base_config.submit'), + cancelButtonText: t('message.system_base_config.cancel'), type: 'warning', }) .then(async () => { @@ -297,9 +308,9 @@ const bacthDelete = () => { }); var response = await getAPI(SysReplaceLogOnlyApi).apiSysReplaceLogDeleteByIdsPost(ids); if (response.data.isSuccess) { - ElMessage.success('删除成功'); + ElMessage.success(t('message.replace_log.deleteSuccess')); } else { - ElMessage.error('删除失败'); + ElMessage.error(t('message.replace_log.deleteFailure')); } handleQuery(); }) @@ -308,17 +319,17 @@ const bacthDelete = () => { // 上报云端 const uploadcloud = (row: any) => { - ElMessageBox.confirm(`确定上报云端id为【${row.id}】的数据吗?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + ElMessageBox.confirm(t('message.replace_log.confirmReportToCloud'), 'tips', { + confirmButtonText: t('message.system_base_config.submit'), + cancelButtonText: t('message.system_base_config.cancel'), type: 'warning', }) .then(async () => { var response = await getAPI(SysReplaceLogOnlyApi).apiUploadCloudGet(row.id); if (response.data.isSuccess) { - ElMessage.success('上报成功'); + ElMessage.success(t('message.replace_log.reportSuccess')); } else { - ElMessage.error('上报失败'); + ElMessage.error(t('message.replace_log.reportFailure')); } handleQuery(); }) diff --git a/src/views/replace_battery/replace_status_log/index.vue b/src/views/replace_battery/replace_status_log/index.vue index 6a1c818..fd1923c 100644 --- a/src/views/replace_battery/replace_status_log/index.vue +++ b/src/views/replace_battery/replace_status_log/index.vue @@ -2,20 +2,20 @@
- - + + - - + + - - + + - 查询 - 重置 + {{ $t('message.replace_status_log.search') }} + {{ $t('message.replace_status_log.reset') }} @@ -27,9 +27,9 @@ - - - + + + - - + +