diff --git a/src/views/base_config/battery/index.vue b/src/views/base_config/battery/index.vue index a8e598a..74c1a4c 100644 --- a/src/views/base_config/battery/index.vue +++ b/src/views/base_config/battery/index.vue @@ -2,13 +2,13 @@
- - + + - 查询 - 重置 + {{ $t('message.battery.search') }} + {{$t('message.battery.reset')}} @@ -17,30 +17,30 @@ - - - + + + - + - + - + @@ -65,7 +65,8 @@ import { ElMessageBox, ElMessage } from 'element-plus'; import { getAPI } from '/@/utils/axios-utils'; import { SysBatteryLogApi } from '/@/api-services/api'; - +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); const tableRef = ref(); // const grantMenuRef = ref>(); @@ -124,18 +125,18 @@ const handleSelectionChange = (data: EmptyObjectType[]) => { }; // const delReplace = (row: any) => { - ElMessageBox.confirm(`确定切换自动充电吗?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + ElMessageBox.confirm(t('message.battery.confirmSwitchToAutomaticCharging'), 'tips', { + confirmButtonText: t('message.system_base_config.submit'), + cancelButtonText: t('message.system_base_config.cancel'), type: 'warning', }) .then(async () => { row.autoCharge = 1; var response = await getAPI(SysBatteryLogApi).apiSysEquipInfoUpdatePost(row); 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')); } handleQuery(); }) @@ -143,18 +144,18 @@ const delReplace = (row: any) => { }; // const uploadcloud = (row: any) => { - ElMessageBox.confirm(`确定切换手动充电吗?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + ElMessageBox.confirm(t('message.battery.confirmSwitchToManualCharging'), 'tips', { + confirmButtonText: t('message.system_base_config.submit'), + cancelButtonText: t('message.system_base_config.cancel'), type: 'warning', }) .then(async () => { row.autoCharge = 0; var response = await getAPI(SysBatteryLogApi).apiSysEquipInfoUpdatePost(row); 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')); } handleQuery(); }) @@ -162,18 +163,18 @@ const uploadcloud = (row: any) => { }; const eq_status_true = (row: any) => { - ElMessageBox.confirm(`确定设备启用吗?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + ElMessageBox.confirm(t('message.battery.confirmEnableDevice'), 'tips', { + confirmButtonText: t('message.system_base_config.submit'), + cancelButtonText: t('message.system_base_config.cancel'), type: 'warning', }) .then(async () => { row.status = 1; var response = await getAPI(SysBatteryLogApi).apiSysEquipInfoUpdatePost(row); 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')); } handleQuery(); }) @@ -181,18 +182,18 @@ const eq_status_true = (row: any) => { }; // const eq_status_false = (row: any) => { - ElMessageBox.confirm(`确定设备禁用吗?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + ElMessageBox.confirm(t('message.battery.confirmDisableDevice'), 'tips', { + confirmButtonText: t('message.system_base_config.submit'), + cancelButtonText: t('message.system_base_config.cancel'), type: 'warning', }) .then(async () => { row.status = 3; var response = await getAPI(SysBatteryLogApi).apiSysEquipInfoUpdatePost(row); 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')); } handleQuery(); }) diff --git a/src/views/base_config/change_car/index.vue b/src/views/base_config/change_car/index.vue index f91b557..60fc5d6 100644 --- a/src/views/base_config/change_car/index.vue +++ b/src/views/base_config/change_car/index.vue @@ -2,16 +2,16 @@
- - + + - - + + - 查询 - 重置 + {{ $t('message.change_car.search') }} + {{ $t('message.change_car.reset') }} @@ -20,11 +20,11 @@ - - - - - + + + + + @@ -47,24 +47,24 @@ 有水插头 --> - + - - + + @@ -74,46 +74,46 @@ 启用 --> - + - - + + @@ -131,16 +131,16 @@ layout="total, sizes, prev, pager, next, jumper" /> - + - + @@ -153,7 +153,8 @@ import { ElMessageBox, ElMessage } from 'element-plus'; import { getAPI } from '/@/utils/axios-utils'; import { SysChargeMonitorApi } from '/@/api-services/api'; - +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); const tableRef = ref(); // const grantMenuRef = ref>(); @@ -226,9 +227,9 @@ const handleQuery = async () => { 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')); } handleQuery(); }; @@ -246,21 +247,21 @@ const submit_dialog_charg = async () => { if (!valid) return; const response = await getAPI(SysChargeMonitorApi).apiSetUpdateBatteryNoPost(state.form_charg.no, state.form_charg.batteryNo); 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(); - handleQuery() + handleQuery(); }); }; const getapiSetBinInfoMakeAnAppointmentPost = async (no, amtLock) => { const response = await getAPI(SysChargeMonitorApi).apiSetBinInfoMakeAnAppointmentPost(no, amtLock); 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')); } handleQuery(); }; @@ -268,9 +269,9 @@ const getapiSetBinInfoMakeAnAppointmentPost = async (no, amtLock) => { 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')); } handleQuery(); }; diff --git a/src/views/base_config/stop/component/cropper.vue b/src/views/base_config/stop/component/cropper.vue index a72e701..9783dad 100644 --- a/src/views/base_config/stop/component/cropper.vue +++ b/src/views/base_config/stop/component/cropper.vue @@ -13,7 +13,7 @@
-
预览
+
{{ $t('message.stop.preview') }}
@@ -42,10 +42,10 @@ :on-exceed="selectPictureExceed" style="display: inline-block; position: absolute; right: 172px" > - 选择图片 + {{ $t('message.stop.Select_image') }} - 取 消 - 确 定 + {{ $t('message.system_base_config.cancel') }} + {{ $t('message.system_base_config.submit') }} @@ -58,7 +58,8 @@ import Cropper from 'cropperjs'; import 'cropperjs/dist/cropper.css'; import { genFileId } from 'element-plus'; import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'; - +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); const props = defineProps({ title: { type: String, diff --git a/src/views/base_config/stop/component/editstop.vue b/src/views/base_config/stop/component/editstop.vue index 9f22495..aaa049b 100644 --- a/src/views/base_config/stop/component/editstop.vue +++ b/src/views/base_config/stop/component/editstop.vue @@ -10,172 +10,172 @@ - + - + - + - + - + - + - + - + - + - - + + - - + + - + - - - - - - + + + + + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + @@ -198,7 +198,8 @@ import { ElMessageBox, ElMessage } from 'element-plus'; import { getAPI } from '/@/utils/axios-utils'; import { SysSideBasisApi } from '/@/api-services/api'; import { UpdateStopSideInput } from '/@/api-services/models'; - +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); const props = defineProps({ title: String, }); diff --git a/src/views/base_config/stop/index.vue b/src/views/base_config/stop/index.vue index 4e8a4da..6abfc1d 100644 --- a/src/views/base_config/stop/index.vue +++ b/src/views/base_config/stop/index.vue @@ -3,95 +3,95 @@

{{ info.stationName }}

- +
- 更换图片 + {{ $t('message.stop.replaceImage') }}
- 换电站编码: {{ info.stationNo }} + {{ $t('message.stop.swapStationCode') }}: {{ info.stationNo }}
- 换电站名称:{{ info.stationName }} + {{ $t('message.stop.swapStationName') }}:{{ info.stationName }}
- 换电站类型:{{ info.stationType }} + {{ $t('message.stop.swapStationType') }}:{{ info.stationType }}
- 换电站识别号:{{ info.stationSn }} + {{ $t('message.stop.swapStationID') }}:{{ info.stationSn }}
- 地理位置:{{ info.stationLocation }} + {{ $t('message.stop.geographicLocation') }}:{{ info.stationLocation }}
- 经纬度:{{ info.longitude + '/' + info.latitude }} + {{ $t('message.stop.latitudeLongitude') }}:{{ info.longitude + '/' + info.latitude }}
- 区域编号:{{ info.areaCode }} + {{ $t('message.stop.areaCode') }}:{{ info.areaCode }}
- 区域名称:{{ info.areaName }} + {{ $t('message.stop.areaName') }}:{{ info.areaName }}
- 运营开始时间:{{ info.operatetionstime }} + {{ $t('message.stop.operationStartTime') }}:{{ info.operatetionstime }}
- 运营结束时间:{{ info.operatetionetime }} + {{ $t('message.stop.operationEndTime') }}:{{ info.operatetionetime }}
- 服务状态:{{ info.sevstatus }} + {{ $t('message.stop.serviceStatus') }}:{{ info.sevstatus }}
- 运营状态: - 营业中 - 歇业中 - 设备维护 - 暂停营业 + {{ $t('message.stop.operationStatus') }}: + {{ $t('message.stop.openForBusiness') }} + {{ $t('message.stop.temporarilyClosed') }} + {{ $t('message.stop.equipmentMaintenance') }} + {{ $t('message.stop.businessSuspended') }}
- 投放时间: {{ info.launchTime }} + {{ $t('message.stop.deploymentTime') }}: {{ info.launchTime }}
- 站点负责人:{{ info.principal }} + {{ $t('message.stop.stationManager') }}:{{ info.principal }}
- 联系方式:{{ info.contactWay }} + {{ $t('message.stop.contactInformation') }}:{{ info.contactWay }}
- 换电站所属运营企业:{{ info.stationCompany }} + {{ $t('message.stop.operatingCompany') }}:{{ info.stationCompany }}
- 所属运营企业统一社会信用代码:{{ info.socialCreditCode }} + {{ $t('message.stop.operatingCompanyCreditCode') }}:{{ info.socialCreditCode }}
- 站控主机软件版本号:{{ info.stationSftVer }} + {{ $t('message.stop.mainControllerSoftwareVersion') }}:{{ info.stationSftVer }}
- 供应商代码:{{ info.supplierCode }} + {{ $t('message.stop.supplierCode') }}:{{ info.supplierCode }}
- 换电站基础信息版本号:{{ info.stationVersion }} + {{ $t('message.stop.basicInfoVersion') }}:{{ info.stationVersion }}
- 换电站硬件版本:{{ info.hardwareVersion }} + {{ $t('message.stop.hardwareVersion') }}:{{ info.hardwareVersion }}
- + @@ -105,6 +105,8 @@ import CropperDialog from './component/cropper.vue'; // import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '/@/api-services/base'; import { onMounted, reactive, ref } from 'vue'; +import { useI18n } from 'vue-i18n'; +const { t } = useI18n(); const editstopRef = ref(Editstop); const info = ref({ @@ -170,7 +172,7 @@ const handleQuery = async () => { // 打开裁剪弹窗 const openCropperDialog = () => { - cropperTitle.value = '更换背景'; + cropperTitle.value = t('message.stop.replaceBackground'); cropperDialogRef.value?.openDialog(info.value.cover); }; // 上传图片