7.19 国际化代码提交

main
shilei 4 months ago
parent 40c5169cbc
commit 415c8d89c4

@ -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;

@ -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 {

@ -25,14 +25,14 @@
<span></span>
<span class="numbers_family">{{ char_nums_obj.chargeTotalCount }}</span>
</div>
<span>累计充电次数</span>
<span>{{ $t('message.charging.totalChargingTimes') }}</span>
</div>
<div class="allow_big">
<div>
<span></span>
<span class="numbers_family">{{ char_nums_obj.chargeTodayCount }}</span>
</div>
<span>今日充电次数</span>
<span>{{ $t('message.charging.todayChargingTimes') }}</span>
</div>
</div>
<div>
@ -41,14 +41,14 @@
<span></span>
<span class="numbers_family">{{ batter_status.btyTotalCount }}</span>
</div>
<span>站内总电池数</span>
<span>{{ $t('message.charging.totalBatteriesInStation') }}</span>
</div>
<div class="allow_big">
<div>
<span></span>
<span class="numbers_family">{{ batter_status.canSwapCount }}</span>
</div>
<span>可用电池数</span>
<span>{{ $t('message.charging.availableBatteries') }}</span>
</div>
</div>
<div>
@ -57,7 +57,7 @@
<span></span>
<span class="numbers_family">{{ batter_status.chargingCount }}</span>
</div>
<span>正在充电电池数</span>
<span>{{ $t('message.charging.chargingBatteries') }}</span>
</div>
<div class="allow_big">
<!-- <div>
@ -82,14 +82,14 @@
<div class="infor_monitor">
<div class="strategy_soc">
<span></span>
<span>换电策略SOC</span>
<span>{{ $t('message.charging.swapStrategySOC') }}</span>
<span>{{ ChooseSpace.swapSoc }}%</span>
<span></span>
<span>充电策略SOC</span>
<span>{{ $t('message.charging.chargingStrategySOC') }}</span>
<span>{{ ChooseSpace.chargeSoc }}%</span>
<div class="moving_charg" v-if="demo_loading">({{ checkchargbino }}) --> ({{ moveruleForm.name }})号仓 移仓进行中...</div>
<div class="moving_charg" v-if="demo_loading">({{ checkchargbino }}) --> ({{ moveruleForm.name }})号仓 {{ $t('message.charging.relocationInProgress') }}...</div>
</div>
<div>充电机信息监控</div>
<div>{{ $t('message.charging.chargerInfoMonitoring') }}</div>
</div>
<!-- -->
<!-- -->
@ -100,26 +100,26 @@
<div style="flex-direction: column">
<div class="title">
{{ index + 1 }}号仓
<el-tag v-if="item.exists == 1" type="success"></el-tag>
<el-tag v-if="item.exists == 0" type="danger"></el-tag>
<el-tag v-if="item.exists == 1" type="success">{{ $t('message.charging.inPosition') }}</el-tag>
<el-tag v-if="item.exists == 0" type="danger">{{ $t('message.charging.notInPosition') }}</el-tag>
</div>
<div class="code">电池编号{{ item.batteryNo }}</div>
<div class="code">{{ $t('message.charging.batteryNumber') }}{{ item.batteryNo }}</div>
</div>
<div>
<battery :quantity="parseInt(item.soc == -1 ? 0 : item.soc)" :proIsCharge="item.chargeStatus == 1 ? true : false" :key="item.chargeStatus || item.exists || item.soc"></battery>
</div>
</div>
<div class="tops_info btns">
<el-button size="small" type="warning" @click="handle_remove(item.no, item.chargeStatus)" v-if="item.chargeStatus != 1 && item.exists == 1 && item.amtLock == 0"></el-button>
<el-button size="small" type="warning" @click="handle_remove(item.no, item.chargeStatus)" v-if="item.chargeStatus != 1 && item.exists == 1 && item.amtLock == 0">{{ $t('message.charging.relocate') }}</el-button>
<el-dropdown @command="handleCommand($event, item)">
<el-button type="primary">
操作<el-icon class="el-icon--right"><arrow-down /></el-icon>
{{ $t('message.charging.operation') }}<el-icon class="el-icon--right"><arrow-down /></el-icon>
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item command="a" v-if="item.chargeStatus != 1"></el-dropdown-item>
<el-dropdown-item command="b" v-if="item.chargeStatus != 1"></el-dropdown-item>
<el-dropdown-item command="c">充电停止</el-dropdown-item>
<el-dropdown-item command="a" v-if="item.chargeStatus != 1">{{ $t('message.charging.startCharging') }}</el-dropdown-item>
<el-dropdown-item command="b" v-if="item.chargeStatus != 1">{{ $t('message.charging.setPower') }}</el-dropdown-item>
<el-dropdown-item command="c">{{ $t('message.charging.stopCharging') }}</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
@ -137,28 +137,28 @@
</div>
<div class="info_bottom">
<div>
<span>工作状态:</span>
<span>{{ $t('message.charging.workingStatus') }}:</span>
<span>
<el-tag v-if="item.chargeStatus == 0" type="info"></el-tag>
<el-tag v-if="item.chargeStatus == 1" type="success"></el-tag>
<el-tag v-if="item.chargeStatus == 2" type="danger"></el-tag>
<el-tag v-if="item.chargeStatus == 3" type="danger"></el-tag>
<el-tag v-if="item.chargeStatus == 4" type="warning"></el-tag>
<el-tag v-if="item.chargeStatus == 0" type="info">{{ $t('message.charging.unknown') }}</el-tag>
<el-tag v-if="item.chargeStatus == 1" type="success">{{ $t('message.charging.charging') }}</el-tag>
<el-tag v-if="item.chargeStatus == 2" type="danger">{{ $t('message.charging.noBattery') }}</el-tag>
<el-tag v-if="item.chargeStatus == 3" type="danger">{{ $t('message.charging.disabled') }}</el-tag>
<el-tag v-if="item.chargeStatus == 4" type="warning">{{ $t('message.charging.chargingCompleted') }}</el-tag>
</span>
</div>
<div>
<span> 充电机连接状态: </span>
<span> {{ $t('message.charging.chargerConnectionStatus') }}: </span>
<span>
<el-tag v-if="item.chargeConnectFlag" type="success"></el-tag>
<el-tag v-else type="danger">未连接</el-tag>
<el-tag v-if="item.chargeConnectFlag" type="success">{{ $t('message.charging.connected') }}</el-tag>
<el-tag v-else type="danger">{{ $t('message.charging.disconnected') }}</el-tag>
</span>
</div>
<div>
<span>充电时间:</span>
<span>{{ $t('message.charging.chargingTime') }}:</span>
<span>{{ item.chargingTime }} (min)</span>
</div>
<div>
<span>剩余时间:</span>
<span>{{ $t('message.charging.remainingTime') }}:</span>
<span>{{ item.estimatedRemainingTime }} (min)</span>
</div>
<!-- <div>
@ -166,56 +166,56 @@
<span>{{ item.onceElectricCharge }}(kw.h)</span>
</div> -->
<div>
<span>需求电压:</span>
<span>{{ $t('message.charging.requestedVoltage') }}:</span>
<span>{{ item.bmsNeedVoltage }} (V)</span>
</div>
<div>
<span>需求电流:</span>
<span>{{ $t('message.charging.requestedCurrent') }}:</span>
<span>{{ item.bmsNeedCurrent }} (A)</span>
</div>
<div>
<span>电池电流:</span>
<span>{{ $t('message.charging.batteryCurrent') }}:</span>
<span>{{ item.totalCurrent }} (A)</span>
</div>
<div>
<span>电池最高温度:</span>
<span>{{ $t('message.charging.batteryMaxTemperature') }}:</span>
<span>{{ item.cellTemperatureMax }} (°c)</span>
</div>
<div>
<span>电池最低温度:</span>
<span>{{ $t('message.charging.batteryMinTemperature') }}:</span>
<span>{{ item.cellTemperatureMin }} (°c)</span>
</div>
<div>
<span>充电口1温度:</span>
<span>{{ $t('message.charging.chargingPort1Temperature') }}:</span>
<span>{{ item.chargingInterfaceDetectionOneTemp }} (°c)</span>
</div>
<div>
<span>充电口2温度:</span>
<span>{{ $t('message.charging.chargingPort2Temperature') }}:</span>
<span>{{ item.chargingInterfaceDetectionTwoTemp }} (°c)</span>
</div>
<div>
<span>充电口3温度:</span>
<span>{{ $t('message.charging.chargingPort3Temperature') }}:</span>
<span>{{ item.chargingInterfaceDetectionTheTemp }} (°c)</span>
</div>
<div>
<span>充电口4温度:</span>
<span>{{ $t('message.charging.chargingPort4Temperature') }}:</span>
<span>{{ item.chargingInterfaceDetectionFourTemp }} (°c)</span>
</div>
<div>
<span> 功率:</span>
<span> {{ $t('message.charging.power') }}:</span>
<span> {{ (item.power / 1000).toFixed(2) }} (KW) </span>
</div>
<div>
<span>是否鉴权:</span>
<span>{{ $t('message.charging.authenticationRequired') }}:</span>
<span>
<el-tag v-if="item.isAuthed" type="success"></el-tag>
<el-tag v-else type="danger"></el-tag>
<el-tag v-if="item.isAuthed" type="success">{{ $t('message.charging.isyes') }}</el-tag>
<el-tag v-else type="danger">{{ $t('message.charging.isno') }}</el-tag>
</span>
</div>
</div>
@ -224,11 +224,11 @@
</div>
</el-col>
</el-row>
<el-dialog title="移仓选择" v-model="movedialogVisible" width="20%">
<el-dialog :title="$t('message.charging.relocationSelection')" v-model="movedialogVisible" width="20%">
<div>
<el-form :model="moveruleForm" ref="moveruleFormref">
<el-form-item label="选择移动到的仓位" prop="name" :rules="[{ required: true, message: '不能为空', trigger: 'change' }]">
<el-select v-model="moveruleForm.name" placeholder="请选择" style="width: 100%">
<el-form-item :label="$t('message.charging.selectPositionToMoveTo')" prop="name" :rules="[{ required: true, message: $t('message.system_base_config.is_null'), trigger: 'change' }]">
<el-select v-model="moveruleForm.name" :placeholder="$t('message.system_base_config.Please_choose')" style="width: 100%">
<el-option :label="item.name" :value="item.id" v-for="(item, index) in put_list" :key="index"></el-option>
</el-select>
</el-form-item>
@ -236,22 +236,22 @@
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="resetForm"> </el-button>
<el-button type="primary" @click="submitForm()"> </el-button>
<el-button @click="resetForm">{{ $t('message.system_base_config.cancel') }}</el-button>
<el-button type="primary" @click="submitForm()">{{ $t('message.system_base_config.submit') }}</el-button>
</div>
</template>
</el-dialog>
<el-dialog v-model="dialogFormVisible_power" title="设置充电机功率" width="500">
<el-dialog v-model="dialogFormVisible_power" :title="$t('message.charging.setChargerPower')" width="500">
<el-form :model="form_power" ref="ruleFormRef_power">
<el-form-item label="充电机功率(KW)" prop="power" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-form-item :label="$t('message.charging.chargerPower')(KW)" prop="power" :rules="[{ required: true, message: $t('message.system_base_config.is_null'), trigger: 'blur' }]">
<el-input-number v-model="form_power.power" :min="1" :max="280" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="reset_dialog_power"></el-button>
<el-button type="primary" @click="submit_dialog_power"> </el-button>
<el-button @click="reset_dialog_power">{{ $t('message.system_base_config.cancel') }}</el-button>
<el-button type="primary" @click="submit_dialog_power"> {{ $t('message.system_base_config.submit') }} </el-button>
</div>
</template>
</el-dialog>
@ -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();
});

@ -31,18 +31,18 @@
<template #reference> </template>
</el-popconfirm> -->
<el-card>
<el-button class="btn_swap" style="background: #1fcfd5; color: #fff" @click="dialogFormVisible_charg = true">手动鉴权</el-button>
<el-button class="btn_swap" style="background: #1fcfd5; color: #fff" @click="dialogFormVisible_charg = true">{{ $t('message.swapping.Manual_authentication') }}</el-button>
</el-card>
<el-card v-loading="loading_operation" element-loading-text="操作中...">
<el-card v-loading="loading_operation" :element-loading-text="$t('message.swapping.In_operation')">
<el-popover placement="top" trigger="click">
<template #reference>
<el-button class="btn_swap" style="background: #e2ac47; color: #fff">人工操作</el-button>
<el-button class="btn_swap" style="background: #e2ac47; color: #fff">{{ $t('message.swapping.manual_operation') }}</el-button>
</template>
<div class="flex_center">
<h4>请选择操作</h4>
<h4>{{ $t('message.swapping.Please_choose_action') }}</h4>
<div style="margin-top: 10px">
<el-button type="info" @click="per_dialog_open(2)"></el-button>
<el-button type="success" style="margin-left: unset; margin-top: 5px" v-if="SwapPlcSucc" @click="per_dialog_open(1)"></el-button>
<el-button type="info" @click="per_dialog_open(2)">{{$t('message.swapping.Cancel_manual_replacement')}}</el-button>
<el-button type="success" style="margin-left: unset; margin-top: 5px" v-if="SwapPlcSucc" @click="per_dialog_open(1)">{{$t('message.swapping.Manual_replacement_successful')}}</el-button>
</div>
</div>
</el-popover>
@ -52,44 +52,44 @@
<el-button class="btn_swap" style="background: #1fcfd5; color: #fff">人工断蓝牙</el-button>
</template>
</el-popconfirm> -->
<el-card v-loading="loading_car_lock" element-loading-text="操作中...">
<el-button class="btn_swap" style="background: #332424; color: #fff" @click="open_dialog('车辆上锁')"></el-button>
<el-card v-loading="loading_car_lock" :element-loading-text="$t('message.swapping.In_operation')">
<el-button class="btn_swap" style="background: #332424; color: #fff" @click="open_dialog('车辆上锁')">{{ $t('message.swapping.Vehicle_locked') }}</el-button>
<el-button class="btn_swap" style="background: #1fcfd5; color: #fff" @click="open_dialog('车辆解锁')"></el-button>
<el-button class="btn_swap" style="background: #1fcfd5; color: #fff" @click="open_dialog('车辆解锁')">{{ $t('message.swapping.Vehicle_unlocking') }}</el-button>
</el-card>
<el-card v-loading="isloading_car_lock" element-loading-text="操作中...">
<el-popconfirm title="确定要设置上锁成功吗?" @confirm="isConfirmLockSucc">
<el-card v-loading="isloading_car_lock" :element-loading-text="$t('message.swapping.In_operation')">
<el-popconfirm :title="$t('message.swapping.issetlocked_success')" @confirm="isConfirmLockSucc">
<template #reference>
<el-button class="btn_swap" style="background: #332424; color: #fff">确认上锁成功</el-button>
<el-button class="btn_swap" style="background: #332424; color: #fff">{{ $t('message.swapping.Confirm_successful_locking') }}</el-button>
</template>
</el-popconfirm>
<el-popconfirm title="确定要设置解锁成功吗?" @confirm="isConfirmUnLockSucc">
<el-popconfirm :title="$t('message.swapping.isset_unlock_success')" @confirm="isConfirmUnLockSucc">
<template #reference>
<el-button class="btn_swap" style="background: #1fcfd5; color: #fff">确认解锁成功</el-button>
<el-button class="btn_swap" style="background: #1fcfd5; color: #fff">{{ $t('message.swapping.Confirm_successful_unlocking') }}</el-button>
</template>
</el-popconfirm>
</el-card>
<el-card>
<el-popconfirm title="确定要设置手动换电吗?" @confirm="handlemovement">
<el-popconfirm :title="$t('message.swapping.isset_manual_swp')" @confirm="handlemovement">
<template #reference>
<el-button class="btn_swap" :disabled="isbatter_btn == 2">手动换电</el-button>
<el-button class="btn_swap" :disabled="isbatter_btn == 2">{{ $t('message.swapping.Manual_battery') }}</el-button>
</template>
</el-popconfirm>
<el-popconfirm title="确定要设置自动换电吗?" @confirm="handleautobtn">
<el-popconfirm :title="$t('message.swapping.isset_automatic_swp')" @confirm="handleautobtn">
<template #reference>
<el-button class="btn_swap" :disabled="isbatter_btn == 1">自动换电</el-button>
<el-button class="btn_swap" :disabled="isbatter_btn == 1">{{ $t('message.swapping.automatic_bat_swp') }}</el-button>
</template>
</el-popconfirm>
</el-card>
<el-card>
<el-popconfirm title="确定要设置本地换电吗?" @confirm="handlelocalset(1)">
<el-popconfirm :title="$t('message.swapping.isset_lcoal_bat_swp')" @confirm="handlelocalset(1)">
<template #reference>
<el-button class="btn_swap" :disabled="issetstatus_loc_re == 1">本地换电</el-button>
<el-button class="btn_swap" :disabled="issetstatus_loc_re == 1">{{ $t('message.swapping.local_bat_swp') }}</el-button>
</template>
</el-popconfirm>
<el-popconfirm title="确定要设置远程换电吗?" @confirm="handlelocalset(2)">
<el-popconfirm :title="$t('message.swapping.isset_remote_swp')" @confirm="handlelocalset(2)">
<template #reference>
<el-button class="btn_swap" :disabled="issetstatus_loc_re == 2">远程换电</el-button>
<el-button class="btn_swap" :disabled="issetstatus_loc_re == 2">{{ $t('message.swapping.remote_swp') }}</el-button>
</template>
</el-popconfirm>
</el-card>
@ -99,15 +99,15 @@
<el-row :gutter="10" class="bot_maininfo">
<el-col :span="4">
<div class="left_order">
<div class="first_title">订单数据 / DATA</div>
<div class="first_title">{{$t('message.swapping.Order_data')}} / DATA</div>
<div class="swapper_order">
<div>
<span>换电订单号:</span>
<span>{{$t('message.swapping.Exchange_order_number')}}:</span>
<span style="word-break: break-all">{{ mStationSwapTruckField != null ? mStationSwapTruckField.orderNo : '--' }}</span>
</div>
<div>
<span>车辆VIN码:</span>
<span>{{$t('message.swapping.Vehicle_VIN_code')}}:</span>
<span>{{ mStationSwapTruckField != null ? mStationSwapTruckField.velVin : '--' }}</span>
</div>
<!-- <div>
@ -115,11 +115,11 @@
<span>{{ mStationSwapTruckField != null ? mStationSwapTruckField.velMac : '--' }}</span>
</div> -->
<div>
<span>车型:</span>
<span>{{$t('message.swapping.Vehicle_model')}}:</span>
<span>{{ mStationSwapTruckField != null ? mStationSwapTruckField.velType : '--' }}</span>
</div>
<div>
<span>车牌号:</span>
<span>{{$t('message.swapping.license_plate_number')}}:</span>
<span>{{ mStationSwapTruckField != null ? mStationSwapTruckField.velNo : '--' }}</span>
</div>
<!-- <div>
@ -139,20 +139,20 @@
<div class="bleth_status">
<div>
<div class="content_status">
<span>换电车辆连接状态</span>
<span>{{$t('message.swapping.Connection_vehicles')}}</span>
<div class="public_flex fouth_south">
<span :class="boxConnectFlag ? 'blue_tooth_class' : ''">连接</span>
<span :class="boxConnectFlag == false ? 'blue_tooth_class' : ''">未连接</span>
<span :class="boxConnectFlag ? 'blue_tooth_class' : ''">{{$t('message.swapping.connect')}}</span>
<span :class="boxConnectFlag == false ? 'blue_tooth_class' : ''">{{$t('message.swapping.Not_connected')}}</span>
</div>
</div>
</div>
<div>
<div class="content_status">
<span>PLC模式</span>
<span>{{$t('message.swapping.PLC_mode')}}</span>
<div class="public_flex fouth_south">
<span :class="modelState == 1010 ? 'blue_tooth_class' : ''">自动</span>
<span :class="modelState == 1000 ? 'blue_tooth_class' : ''">手动</span>
<span :class="modelState == 0 ? 'blue_tooth_class' : ''">无效</span>
<span :class="modelState == 1010 ? 'blue_tooth_class' : ''">{{$t('message.system_base_config.auto')}}</span>
<span :class="modelState == 1000 ? 'blue_tooth_class' : ''">{{$t('message.system_base_config.Manual')}}</span>
<span :class="modelState == 0 ? 'blue_tooth_class' : ''">{{$t('message.swapping.invalid')}}</span>
</div>
</div>
</div>
@ -160,7 +160,7 @@
<div class="bleth_status">
<div>
<div class="content_status">
<span>钥匙状态</span>
<span>{{$t('message.swapping.Key_status')}}</span>
<div class="public_flex fouth_south">
<span :class="keyStatus == 2 ? 'blue_tooth_class' : ''">ON</span>
<span :class="keyStatus == 1 ? 'blue_tooth_class' : ''">ACC</span>
@ -170,10 +170,10 @@
</div>
<div>
<div class="content_status">
<span>锁止状态</span>
<span>{{$t('message.swapping.Locked_state')}}</span>
<div class="public_flex fouth_south">
<span :class="lockStatus == 2 ? 'blue_tooth_class' : ''">上锁</span>
<span :class="lockStatus == 1 ? 'blue_tooth_class' : ''">解锁</span>
<span :class="lockStatus == 2 ? 'blue_tooth_class' : ''">{{$t('message.swapping.Lock_up')}}</span>
<span :class="lockStatus == 1 ? 'blue_tooth_class' : ''">{{$t('message.swapping.Unlock')}}</span>
</div>
</div>
</div>
@ -181,21 +181,21 @@
<div class="bleth_status">
<div>
<div class="content_status">
<span>云站连接状态</span>
<span>{{$t('message.swapping.Cloud_Connection_Status')}}</span>
<div class="public_flex">
<span :class="cloudIsConnected ? 'blue_tooth_class' : ''">连接</span>
<span :class="cloudIsConnected == false ? 'blue_tooth_class' : ''">断开</span>
<span :class="cloudIsConnected ? 'blue_tooth_class' : ''">{{$t('message.swapping.connect')}}</span>
<span :class="cloudIsConnected == false ? 'blue_tooth_class' : ''">{{$t('message.swapping.to_break_off')}}</span>
</div>
</div>
</div>
<div>
<div class="content_status" style="flex: 1">
<span>营业状态</span>
<span>{{$t('message.system_base_config.Business_status')}}</span>
<div class="public_flex fouth_south">
<span :class="go_status == '1' ? 'blue_tooth_class' : ''">营业</span>
<span :class="go_status == '3' ? 'blue_tooth_class' : ''">维护</span>
<span :class="go_status == '2' ? 'blue_tooth_class' : ''">歇业</span>
<span :class="go_status == '4' ? 'blue_tooth_class' : ''">暂停</span>
<span :class="go_status == '1' ? 'blue_tooth_class' : ''">{{$t('message.system_base_config.In_operation')}}</span>
<span :class="go_status == '3' ? 'blue_tooth_class' : ''">{{$t('message.system_base_config.maintenance_status')}}</span>
<span :class="go_status == '2' ? 'blue_tooth_class' : ''">{{$t('message.system_base_config.close_business')}}</span>
<span :class="go_status == '4' ? 'blue_tooth_class' : ''">{{$t('message.system_base_config.Suspension')}}</span>
</div>
</div>
</div>
@ -226,11 +226,11 @@
<div class="bleth_status">
<div>
<div class="content_status">
<span>遥本控状态</span>
<span>{{$t('message.swapping.Remote_control_status')}}</span>
<div class="public_flex fouth_south">
<span :class="modelState == 1010 ? 'blue_tooth_class' : ''">远程控制</span>
<span :class="modelState == 1000 ? 'blue_tooth_class' : ''">本地控制</span>
<span :class="modelState == 0 ? 'blue_tooth_class' : ''">无效</span>
<span :class="modelState == 1010 ? 'blue_tooth_class' : ''">{{$t('message.swapping.Remote_control')}}</span>
<span :class="modelState == 1000 ? 'blue_tooth_class' : ''">{{$t('message.swapping.Local_control')}}</span>
<span :class="modelState == 0 ? 'blue_tooth_class' : ''">{{$t('message.swapping.invalid')}}</span>
</div>
</div>
</div>
@ -239,30 +239,30 @@
<div class="batter_nums">
<div>
<span>电池总数</span>
<span>{{$t('message.homepage.btyTotalCount')}}</span>
<span>{{ batteryInfo.batteryTotalCount }}</span>
</div>
<div>
<span>可用换电电池数</span>
<span>{{$t('message.swapping.Number_of_replacements')}}</span>
<span>{{ batteryInfo.usingSwapBatteryCount }}</span>
</div>
</div>
<div class="batter_nums">
<div>
<span>站外灯</span>
<span>{{$t('message.swapping.Outside_station_lights')}}</span>
<div class="power_three public_flex">
<el-popconfirm title="确定要设置站外灯为红色吗?" @confirm="handlelamp(1020)">
<el-popconfirm :title="$t('message.swapping.isset_lights_red')" @confirm="handlelamp(1020)">
<template #reference>
<span style="cursor: pointer" :class="stationInLampSts == 1020 ? 'lamp_red' : ''"></span>
</template>
</el-popconfirm>
<el-popconfirm title="确定要设置站外灯为黄色吗?" @confirm="handlelamp(1040)">
<el-popconfirm :title="$t('message.swapping.isset_lights_yellow')" @confirm="handlelamp(1040)">
<template #reference>
<span style="cursor: pointer" :class="stationInLampSts == 1040 ? 'lamp_yellow' : ''"></span>
</template>
</el-popconfirm>
<el-popconfirm title="确定要设置站外灯为绿色吗?" @confirm="handlelamp(1000)">
<el-popconfirm :title="$t('message.swapping.isset_lights_green')" @confirm="handlelamp(1000)">
<template #reference>
<span style="cursor: pointer" :class="stationInLampSts == 1000 ? 'lamp_green' : ''"></span>
</template>
@ -308,8 +308,8 @@
<!-- -->
<el-dialog v-model="dialogFormVisible" :title="dialog_title" width="500">
<el-form :model="form_car" ref="ruleFormRef">
<el-form-item label="车辆编号" prop="carno" :rules="[{ required: true, message: '不能为空', trigger: 'change' }]">
<el-select v-model="form_car.carno" placeholder="请选择" clearable>
<el-form-item :label="$t('message.swapping.Vehicle_number')" prop="carno" :rules="[{ required: true, message: $t('message.system_base_config.is_null'), trigger: 'change' }]">
<el-select v-model="form_car.carno" :placeholder=" $t('message.system_base_config.Please_choose')" clearable>
<!-- <el-option label="1" value="1" :key="index" /> -->
<el-option :label="item.carNo" :value="item.carNo" v-for="(item, index) in car_list" :key="index" />
</el-select>
@ -317,41 +317,41 @@
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="reset_dialog"></el-button>
<el-button type="primary" @click="submit_dialog"> </el-button>
<el-button @click="reset_dialog">{{ $t('message.system_base_config.cancel') }}</el-button>
<el-button type="primary" @click="submit_dialog"> {{ $t('message.system_base_config.submit') }} </el-button>
</div>
</template>
</el-dialog>
<el-dialog v-model="dialogFormVisible_charg" title="选择充电机" width="500">
<el-dialog v-model="dialogFormVisible_charg" :title="$t('message.swapping.Select_charger')" width="500">
<el-form :model="form_charg" ref="ruleFormRef_charg">
<el-form-item label="充电机编号" prop="code" :rules="[{ required: true, message: '不能为空', trigger: 'change' }]">
<el-select v-model="form_charg.code" placeholder="请选择" clearable>
<el-form-item :label="$t('message.swapping.Charging_machine_number')" prop="code" :rules="[{ required: true, message: $t('message.system_base_config.is_null'), trigger: 'change' }]">
<el-select v-model="form_charg.code" :placeholder="$t('message.system_base_config.Please_choose')" clearable>
<el-option :label="item" :value="item" v-for="(item, index) in charg_list" :key="index" />
</el-select>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="reset_dialog_charg"></el-button>
<el-button type="primary" @click="submit_dialog_charg"> </el-button>
<el-button @click="reset_dialog_charg">{{ $t('message.system_base_config.cancel') }}</el-button>
<el-button type="primary" @click="submit_dialog_charg"> {{ $t('message.system_base_config.submit') }} </el-button>
</div>
</template>
</el-dialog>
<el-dialog v-model="dialogFormVisible_personnel" title="人工操作" width="500">
<el-dialog v-model="dialogFormVisible_personnel" :title="$t('message.swapping.manual_operation')" width="500">
<el-form :model="per_form" ref="per_ruleform" label-width="auto">
<el-form-item label="操作人:" prop="operator" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-form-item :label="$t('message.swapping.Operator')" prop="operator" :rules="[{ required: true, message: $t('message.system_base_config.is_null'), trigger: 'blur' }]">
<el-input v-model="per_form.operator" autocomplete="off" />
</el-form-item>
<el-form-item label="操作原因:" prop="reason" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-form-item :label="$t('message.swapping.Reason_for_operation')" prop="reason" :rules="[{ required: true, message: $t('message.system_base_config.is_null'), trigger: 'blur' }]">
<el-input v-model="per_form.reason" type="textarea" autocomplete="off" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogFormVisible_personnel = false">取消</el-button>
<el-button type="primary" @click="submit_dialog_per"> </el-button>
<el-button @click="dialogFormVisible_personnel = false">{{ $t('message.system_base_config.cancel') }}</el-button>
<el-button type="primary" @click="submit_dialog_per"> {{ $t('message.system_base_config.submit') }} </el-button>
</div>
</template>
</el-dialog>
@ -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'));
}
};

Loading…
Cancel
Save