From 415c8d89c402eae78c1d6b0245b54a6b52a813f0 Mon Sep 17 00:00:00 2001 From: shilei <965026003@qq.com> Date: Fri, 19 Jul 2024 10:38:26 +0800 Subject: [PATCH] =?UTF-8?q?7.19=20=E5=9B=BD=E9=99=85=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/charging/index.css | 9 +- src/views/home/charging/index.less | 12 +- src/views/home/charging/index.vue | 159 ++++++++++++----------- src/views/home/swapping/index.vue | 201 +++++++++++++++-------------- 4 files changed, 197 insertions(+), 184 deletions(-) diff --git a/src/views/home/charging/index.css b/src/views/home/charging/index.css index 74821ca..827003e 100644 --- a/src/views/home/charging/index.css +++ b/src/views/home/charging/index.css @@ -271,17 +271,20 @@ flex: 1; display: flex; flex-wrap: wrap; - justify-content: space-between; + justify-content: space-evenly; + overflow: hidden; + overflow-y: scroll; } .bot_main .strategy_center .center_table > div { - width: 24%; - height: 49%; + width: 32%; + height: 50%; background: #edeef0; border-radius: 8px; padding: 10px 10px; box-sizing: border-box; font-size: 12px; color: #000; + margin: 5px; } .bot_main .strategy_center .center_table > div .title { font-size: 18px; diff --git a/src/views/home/charging/index.less b/src/views/home/charging/index.less index efe0836..2bbb601 100644 --- a/src/views/home/charging/index.less +++ b/src/views/home/charging/index.less @@ -347,11 +347,13 @@ flex: 1; display: flex; flex-wrap: wrap; - justify-content: space-between; + justify-content: space-evenly; + overflow: hidden; + overflow-y: scroll; >div { - width: 24%; - height: 49%; + width: 32%; + height: 50%; background: #edeef0; // border: 2px solid #ccc; border-radius: 8px; @@ -359,7 +361,7 @@ box-sizing: border-box; font-size: 12px; color: #000; - + margin: 5px; .title { font-size: 18px; font-weight: bold; @@ -417,6 +419,8 @@ width: 60%; text-align: start; white-space: nowrap; + // overflow: hidden; + // text-overflow: ellipsis; } >span:last-child { diff --git a/src/views/home/charging/index.vue b/src/views/home/charging/index.vue index beda406..b6ee936 100644 --- a/src/views/home/charging/index.vue +++ b/src/views/home/charging/index.vue @@ -25,14 +25,14 @@ {{ char_nums_obj.chargeTotalCount }} - 累计充电次数 + {{ $t('message.charging.totalChargingTimes') }}
{{ char_nums_obj.chargeTodayCount }}
- 今日充电次数 + {{ $t('message.charging.todayChargingTimes') }}
@@ -41,14 +41,14 @@ {{ batter_status.btyTotalCount }}
- 站内总电池数 + {{ $t('message.charging.totalBatteriesInStation') }}
{{ batter_status.canSwapCount }}
- 可用电池数 + {{ $t('message.charging.availableBatteries') }}
@@ -57,7 +57,7 @@ {{ batter_status.chargingCount }}
- 正在充电电池数 + {{ $t('message.charging.chargingBatteries') }}
({{ moveruleForm.name }})号仓 移仓进行中...
+
({{ checkchargbino }})号仓 --> ({{ moveruleForm.name }})号仓 {{ $t('message.charging.relocationInProgress') }}...
-
充电机信息监控
+
{{ $t('message.charging.chargerInfoMonitoring') }}
@@ -100,26 +100,26 @@
{{ index + 1 }}号仓 - 在位 - 不在位 + {{ $t('message.charging.inPosition') }} + {{ $t('message.charging.notInPosition') }}
-
电池编号:{{ item.batteryNo }}
+
{{ $t('message.charging.batteryNumber') }}:{{ item.batteryNo }}
- 移仓 + {{ $t('message.charging.relocate') }} - 操作 + {{ $t('message.charging.operation') }} @@ -137,28 +137,28 @@
- 工作状态: + {{ $t('message.charging.workingStatus') }}: - 未知 - 正在充电 - 无电池 - 禁用 - 充电完成 + {{ $t('message.charging.unknown') }} + {{ $t('message.charging.charging') }} + {{ $t('message.charging.noBattery') }} + {{ $t('message.charging.disabled') }} + {{ $t('message.charging.chargingCompleted') }}
- 充电机连接状态: + {{ $t('message.charging.chargerConnectionStatus') }}: - 已连接 - 未连接 + {{ $t('message.charging.connected') }} + {{ $t('message.charging.disconnected') }}
- 充电时间: + {{ $t('message.charging.chargingTime') }}: {{ item.chargingTime }} (min)
- 剩余时间: + {{ $t('message.charging.remainingTime') }}: {{ item.estimatedRemainingTime }} (min)
- 需求电压: + {{ $t('message.charging.requestedVoltage') }}: {{ item.bmsNeedVoltage }} (V)
- 需求电流: + {{ $t('message.charging.requestedCurrent') }}: {{ item.bmsNeedCurrent }} (A)
- 电池电流: + {{ $t('message.charging.batteryCurrent') }}: {{ item.totalCurrent }} (A)
- 电池最高温度: + {{ $t('message.charging.batteryMaxTemperature') }}: {{ item.cellTemperatureMax }} (°c)
- 电池最低温度: + {{ $t('message.charging.batteryMinTemperature') }}: {{ item.cellTemperatureMin }} (°c)
- 充电口1温度: + {{ $t('message.charging.chargingPort1Temperature') }}: {{ item.chargingInterfaceDetectionOneTemp }} (°c)
- 充电口2温度: + {{ $t('message.charging.chargingPort2Temperature') }}: {{ item.chargingInterfaceDetectionTwoTemp }} (°c)
- 充电口3温度: + {{ $t('message.charging.chargingPort3Temperature') }}: {{ item.chargingInterfaceDetectionTheTemp }} (°c)
- 充电口4温度: + {{ $t('message.charging.chargingPort4Temperature') }}: {{ item.chargingInterfaceDetectionFourTemp }} (°c)
- 功率: + {{ $t('message.charging.power') }}: {{ (item.power / 1000).toFixed(2) }} (KW)
- 是否鉴权: + {{ $t('message.charging.authenticationRequired') }}: - - + {{ $t('message.charging.isyes') }} + {{ $t('message.charging.isno') }}
@@ -224,11 +224,11 @@ - +
- - + + @@ -236,22 +236,22 @@
- + - + @@ -266,6 +266,9 @@ import { storeToRefs } from 'pinia'; import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes'; import battery from './components/battery.vue'; import { ArrowDown } from '@element-plus/icons-vue'; +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); + const storesTagsViewRoutes = useTagsViewRoutes(); const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes); @@ -474,50 +477,50 @@ const handle_remove = async (data, chargeStatus) => { const dele_handle = async (data) => { const response = await getAPI(SysChargeMonitorApi).apiSetChargingBinStatusPost(data, 0); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } }; const dele_handle_able = async (data) => { const response = await getAPI(SysChargeMonitorApi).apiSetChargingBinStatusPost(data, 1); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } }; const getSWAPMONITORING_CHARGESTART = async (data) => { const response = await getAPI(SysChargeMonitorApi).apiSetStartChargeByBinNoGet(data); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } }; const getSWAPMONITORING_CHARGESTOP = async (data) => { const response = await getAPI(SysChargeMonitorApi).apiSetStopChargeByBinNoGet(data); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } }; const getUpdateCanChargeFlagGet = async (id, flag) => { const response = await getAPI(SysChargeMonitorApi).apiUpdateCanChargeFlagGet(id, flag); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } }; const getapiUpdateCanSwapFlagGet = async (id, flag) => { const response = await getAPI(SysChargeMonitorApi).apiUpdateCanSwapFlagGet(id, flag); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } }; @@ -532,9 +535,9 @@ const submitForm = async () => { moveruleFormref.value.validate(async (valid) => { if (valid) { if (ischargeStatus_dialog.value) { - ElMessageBox.confirm('当前充电机状态未知,是否确认移仓?', '警告', { - confirmButtonText: '确认', - cancelButtonText: '取消', + ElMessageBox.confirm(t('message.charging.currentChargerStatusUnknown'), 'error', { + confirmButtonText: t('message.system_base_config.submit'), + cancelButtonText: t('message.system_base_config.cancel'), type: 'warning', }) .then(async () => { @@ -547,9 +550,9 @@ const submitForm = async () => { }; const response = await getAPI(SysChargeMonitorApi).apiSetBatteryRelocationPost(data.removeBinNo, data.putBinNo); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } demo_loading.value = false; resetForm(); @@ -567,9 +570,9 @@ const submitForm = async () => { }; const response = await getAPI(SysChargeMonitorApi).apiSetBatteryRelocationPost(data.removeBinNo, data.putBinNo); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } demo_loading.value = false; resetForm(); @@ -592,7 +595,7 @@ const initLineChart = () => { const option = { backgroundColor: '', title: { - text: '整站七天内直流电能数据', + text: t('message.charging.sevenDaysDCStationData'), x: 'left', textStyle: { fontSize: '15', color: '#303133' }, }, @@ -600,7 +603,7 @@ const initLineChart = () => { tooltip: { trigger: 'axis', }, - legend: { data: ['直流'], right: 0 }, + legend: { data: [t('message.charging.directCurrent')], right: 0 }, xAxis: { data: seven_x_data.value, }, @@ -613,7 +616,7 @@ const initLineChart = () => { ], series: [ { - name: '直流', + name: t('message.charging.directCurrent'), type: 'line', symbolSize: 6, symbol: 'circle', @@ -639,7 +642,7 @@ const initLineChart_EQM = () => { const option_EQM = { backgroundColor: '', title: { - text: '整站七天内交流电能数据', + text: t('message.charging.sevenDaysACStationData'), x: 'left', textStyle: { fontSize: '15', color: '#303133' }, }, @@ -647,7 +650,7 @@ const initLineChart_EQM = () => { tooltip: { trigger: 'axis', }, - legend: { data: ['交流'], right: 0 }, + legend: { data: [t('message.charging.alternatingCurrent')], right: 0 }, xAxis: { data: seven_x_data_EQM.value, }, @@ -660,7 +663,7 @@ const initLineChart_EQM = () => { ], series: [ { - name: '交流', + name: t('message.charging.alternatingCurrent'), type: 'line', symbolSize: 6, symbol: 'circle', @@ -713,7 +716,7 @@ const handle_power = async (row) => { if (response.data.isSuccess) { form_power.value.power = response.data.data; } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } form_power.value.code = row.code; dialogFormVisible_power.value = true; @@ -735,9 +738,9 @@ const submit_dialog_power = async () => { if (!valid) return; const response = await getAPI(SysChargeMonitorApi).apiSendPowerRegulationGet(form_power.value.code, form_power.value.power); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } reset_dialog_power(); }); diff --git a/src/views/home/swapping/index.vue b/src/views/home/swapping/index.vue index b578f09..01edfdc 100644 --- a/src/views/home/swapping/index.vue +++ b/src/views/home/swapping/index.vue @@ -31,18 +31,18 @@ --> - 手动鉴权 + {{ $t('message.swapping.Manual_authentication') }} - +
-

请选择操作

+

{{ $t('message.swapping.Please_choose_action') }}

- 人工换电取消 - 人工换电成功 + {{$t('message.swapping.Cancel_manual_replacement')}} + {{$t('message.swapping.Manual_replacement_successful')}}
@@ -52,44 +52,44 @@ 人工断蓝牙 --> - - 车辆上锁 + + {{ $t('message.swapping.Vehicle_locked') }} - 车辆解锁 + {{ $t('message.swapping.Vehicle_unlocking') }} - - + + - + - + - + - + - + @@ -99,15 +99,15 @@
-
订单数据 / DATA
+
{{$t('message.swapping.Order_data')}} / DATA
- 换电订单号: + {{$t('message.swapping.Exchange_order_number')}}: {{ mStationSwapTruckField != null ? mStationSwapTruckField.orderNo : '--' }}
- 车辆VIN码: + {{$t('message.swapping.Vehicle_VIN_code')}}: {{ mStationSwapTruckField != null ? mStationSwapTruckField.velVin : '--' }}
- 车型: + {{$t('message.swapping.Vehicle_model')}}: {{ mStationSwapTruckField != null ? mStationSwapTruckField.velType : '--' }}
- 车牌号: + {{$t('message.swapping.license_plate_number')}}: {{ mStationSwapTruckField != null ? mStationSwapTruckField.velNo : '--' }}
- - + + @@ -317,41 +317,41 @@ - + - - + + - + - + - + @@ -368,6 +368,9 @@ import { storeToRefs } from 'pinia'; import { swappingInfo } from '/@/stores/swapping'; import arrow_true from '/@/assets/imgs/arrow_true.png'; import arrow_false from '/@/assets/imgs/arrow_false.png'; +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); + const storesswappingInfo = swappingInfo(); const { wind_content_list } = storeToRefs(storesswappingInfo); @@ -491,9 +494,9 @@ const submit_dialog_charg = async () => { if (!valid) return; const response = await getAPI(SysChargeMonitorApi).apiChargerSendAuthGet(form_charg.value.code); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } reset_dialog_charg(); }); @@ -510,9 +513,9 @@ const submit_dialog_per = async () => { // console.log(response, 'response'); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } loading_operation.value = false; }); @@ -521,9 +524,9 @@ const isConfirmLockSucc = async () => { isloading_car_lock.value = true; const response = await getAPI(SysMonitorApi).apiConfirmLockSuccGet(); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } isloading_car_lock.value = false; }; @@ -532,9 +535,9 @@ const isConfirmUnLockSucc = async () => { isloading_car_lock.value = true; const response = await getAPI(SysMonitorApi).apiConfirmUnLockSuccGet(); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } isloading_car_lock.value = false; }; @@ -545,9 +548,9 @@ const handle_LockCar = async () => { dialogFormVisible.value = false; const response = await getAPI(SysMonitorApi).apiLockCarPost(form_car.value.carno); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } loading_car_lock.value = false; reset_dialog(); @@ -558,9 +561,9 @@ const handle_UnLockCar = async () => { dialogFormVisible.value = false; const response = await getAPI(SysMonitorApi).apiUnLockCarPost(form_car.value.carno); if (response.data.isSuccess) { - ElMessage.success('操作成功'); + ElMessage.success(t('message.system_base_config.Operation_successful')); } else { - ElMessage.error(response.data.msg); + ElMessage.error(t('message.system_base_config.Operation_failed')); } reset_dialog(); }; @@ -570,12 +573,12 @@ const swapping_status = async (data) => { let status = data; const response = await getAPI(SysMonitorApi).apiManualSwapStatusPost(swapNo, status); 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 { - ElMessage.error('当前无换电操作'); + ElMessage.error(t('message.swapping.no_operation')); } // console.log(response, 'response'); @@ -583,43 +586,43 @@ const swapping_status = async (data) => { const repeart_menu = async () => { const response = await getAPI(SysMonitorApi).apiSwapResetPost(); 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')); } }; const FaultRemove = async () => { const response = await getAPI(SysMonitorApi).apiLockResetPost(); 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')); } }; const handlemovement = async () => { const response = await getAPI(SysMonitorApi).apiManualSwappingPost(); 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')); } handle_GetStationSwapModel(); }; const handleautobtn = async () => { const response = await getAPI(SysMonitorApi).apiAutoSwappingPost(); 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')); } handle_GetStationSwapModel(); }; const handlelocalset = async (data) => { const response = await getAPI(SysMonitorApi).apiSetSwapModelPost(data); 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')); } handle_GetStationSwapModel(); }; @@ -633,9 +636,9 @@ const handleremoteset = async () => { let data = isgetswapway.value; const response = await getAPI(SysMonitorApi).apiSetSwapWayPost(data); 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')); } handle_GetStationSwapModel(); }; @@ -650,9 +653,9 @@ const handlelamp = async (data) => { let lampCmd = data; const response = await getAPI(SysMonitorApi).apiOperateOutstationLampPost(lampCmd); 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')); } };