4.26 消防移仓 暂停继续功能上传

main
shilei 7 months ago
parent 406f1a7ce2
commit 75d093a016

@ -13,8 +13,25 @@
>
</div>
</a-col>
<a-col class="left" :span="4">
<a-col class="left" :span="4" style="position: relative">
<img src="@/assets/imgs/右箭头.png" alt="" />
<div class="posi_top" v-if="f_PositionTransfer == 1000">
消防移仓中...
</div>
<div class="posi_bot" v-if="f_PositionTransfer == 1000">
<el-button
type="danger"
size="small"
@click="handle_ThermalRunawayRemoveBattery_status(1001)"
>暂停</el-button
>
<el-button
type="success"
size="small"
@click="handle_ThermalRunawayRemoveBattery_status(1002)"
>继续</el-button
>
</div>
</a-col>
<a-col class="left" :span="10">
<img src="@/assets/imgs/蓄电池组.png" alt="" />
@ -52,7 +69,11 @@
</template>
<script>
import { getThermalRunawayRemoveBattery } from "@/services/charge_battery/auto";
import {
getThermalRunawayRemoveBattery,
handle_ThermalRunawayRemoveBattery_status,
} from "@/services/charge_battery/auto";
import { handle_GetPLCSwapParamsValue } from "@/services/swapping/index";
export default {
name: "SystemUserIndex",
@ -192,6 +213,8 @@ export default {
},
],
checkbinno: "",
f_PositionTransfer: null,
timer: null,
};
},
created() {},
@ -213,10 +236,51 @@ export default {
// console.log(response, "response");
if (response.data.data) {
this.$message.info("操作成功");
this.timer = setInterval(() => {
this.handle_GetPLCSwapParamsValue();
}, 3000);
} else {
this.$message.error("操作失败,请稍后重试");
}
this.movedrawer = false
this.movedrawer = false;
// this.handle_GetPLCSwapParamsValue();
});
},
handle_GetPLCSwapParamsValue() {
handle_GetPLCSwapParamsValue().then((response) => {
// console.log(response, "response");
this.f_PositionTransfer = response.data.data.f_PositionTransfer;
if (
response.data.data.f_PositionTransfer == 1001 ||
response.data.data.f_PositionTransfer == 1002
) {
clearInterval(this.timer);
this.timer = null;
}
});
},
handle_ThermalRunawayRemoveBattery_status(data) {
let title = "";
switch (data) {
case 1001:
title = "暂停";
break;
case 1002:
title = "继续";
break;
}
this.$confirm({
title: "提示信息",
content: "确定要" + title + "移仓吗?",
onOk: () => {
handle_ThermalRunawayRemoveBattery_status(data).then((result) => {
if (result.data.data) {
this.$message.info("操作成功");
} else {
this.$message.error("操作失败");
}
});
},
});
},
},
@ -306,4 +370,20 @@ export default {
color: #fff;
}
}
.posi_bot,
.posi_top {
width: 100%;
position: absolute;
bottom: -30px;
left: 50%;
transform: translateX(-50%);
}
.posi_top {
bottom: unset;
top: -10px;
color: #000;
font-size: 14px;
font-weight: 600;
font-family: Georgia, "Times New Roman", Times, serif;
}
</style>

@ -52,9 +52,24 @@
/>
</div>
<div>
<a-button type="primary" style="margin-left: 10px" @click="SetLightTime"></a-button>
<a-button type="primary" style="margin-left: 10px" @click="SetLight_handle('1000')"></a-button>
<a-button type="danger" style="margin-left: 10px" @click="SetLight_handle('1001')"></a-button>
<a-button
type="primary"
style="margin-left: 10px"
@click="SetLightTime"
>保存</a-button
>
<a-button
type="primary"
style="margin-left: 10px"
@click="SetLight_handle('1000')"
>开启</a-button
>
<a-button
type="danger"
style="margin-left: 10px"
@click="SetLight_handle('1001')"
>关闭</a-button
>
</div>
</a-card>
</a-col>
@ -113,7 +128,7 @@
</a-col>
</a-row>
<a-row :gutter="20" >
<a-row :gutter="20">
<!-- <a-col :span="12">
<a-card title="换电运营模式">
<div class="form-item">
@ -180,15 +195,43 @@
</a-card>
</a-col>
</a-row> -->
<a-row :gutter="20" style="margin-top: 20px">
<a-col :span="24">
<a-card title="选包策略">
<div
v-for="(item, index) in strategy_list"
class="form-item"
:key="index"
>
<label class="label">选包名称</label>
<a-input v-model="item.name" :disabled="true" style="width: 200px" />
<label class="label">是否启用</label>
<el-select
v-model="item.enabled"
placeholder="请选择"
style="width: 120px"
>
<el-option label="启用" :value="true"></el-option>
<el-option label="禁用" :value="false"></el-option>
</el-select>
<label class="label">限制值</label>
<a-input-number v-model="item.limitValue" />
<a-button
type="primary"
style="margin-left: 10px"
@click="handle_UpdateLimitValueById(item)"
>保存</a-button
>
</div>
</a-card>
</a-col>
</a-row>
<a-card title="电价配置" style="margin-top: 20px">
<div class="form-item">
<!-- <label class="label">默认价格</label>
<a-input-number v-model="ElectPrice.defaultElecPrices" /> -->
<a-button
type="danger"
style="margin-left: 20px"
@click="post_array"
<a-button type="danger" style="margin-left: 20px" @click="post_array"
>下发</a-button
>
<!-- <a-button
@ -387,7 +430,9 @@ import {
exitUpdateStationElecPriceInfo,
handleSetOperationStatusChangeMode,
handleDistributeElecPriceForCharge,
handleLightControl
handleLightControl,
handle_SelectBinRule_getall,
handle_UpdateLimitValueById,
} from "@/services/system/base_config";
export default {
@ -446,6 +491,7 @@ export default {
},
],
all_Times: [],
strategy_list: [],
};
},
created() {
@ -468,6 +514,23 @@ export default {
this.StationElecPriceInfoList();
// this.SmartChargingInfoList()
// this.SohStrategyInfoList()
this.handle_SelectBinRule_getall();
},
handle_UpdateLimitValueById(data) {
handle_UpdateLimitValueById(data).then((response) => {
if (response.data.success) {
this.$message.info("保存成功");
} else {
this.$message.error(response.data.msg);
}
this.handle_SelectBinRule_getall();
});
},
handle_SelectBinRule_getall() {
handle_SelectBinRule_getall().then((response) => {
// console.log(response,'---');
this.strategy_list = response.data.data;
});
},
SohStrategyInfoList() {
GetSohStrategyInfoList().then((result) => {
@ -688,7 +751,7 @@ export default {
});
},
SetLight_handle(val) {
let str = val == 1000? '确定要开启吗?': '确定要关闭吗?'
let str = val == 1000 ? "确定要开启吗?" : "确定要关闭吗?";
this.$confirm({
title: "提示信息",
content: str,

@ -60,6 +60,9 @@ module.exports = {
ShowHomeScreenInfoShow: `${BASE_URL}/ShowHomeScreenInfoShow`, // 大屏车辆信息8111
TCgRealTimeDisplay: `${second_url}/TCgRealTimeDisplay`, // 充电功率控制 7242
GetChargingDeviceStatus: `${second_url}/ChrgMonitor/GetChargingDeviceStatus`, // 充电桩 7242
SelectBinRule_getall: `${BASE_URL}/SelectBinRule/GetAll`, // 选包策略 7242
UpdateLimitValueById: `${BASE_URL}/SelectBinRule/UpdateLimitValueById`, // 设置选包策略 7242
ThermalRunawayRemoveBattery_status: `${BASE_URL}/BatteryMonitor/ThermalRunawayRemoveBattery/setStatus`, // 消防移仓暂停继续
GetBattPerStatusCount: `${BASE_URL}/SwapMonitor/GetBattPerStatusCount`, // 换电大屏数据

@ -11,7 +11,8 @@ import {
Chrgllonitor_moving,
GetChargMonitorChargBinOption,
ThermalRunawayRemoveBattery,
ChrgMonitor_QueryAlarm
ChrgMonitor_QueryAlarm,
ThermalRunawayRemoveBattery_status
} from '@/services/api'
import {
request,
@ -73,6 +74,11 @@ export async function getThermalRunawayRemoveBattery(data) {
export async function handle_ChrgMonitor_QueryAlarm() {
return request(ChrgMonitor_QueryAlarm, METHOD.POST)
}
export async function handle_ThermalRunawayRemoveBattery_status(data) {
return request(ThermalRunawayRemoveBattery_status + '/' + data, METHOD.GET)
}
export default {
index
}

@ -23,7 +23,9 @@ import {
UpdateStationElecPriceInfo,
SetOperationStatusChangeMode,
DistributeElecPriceForCharge,
LightControl
LightControl,
SelectBinRule_getall,
UpdateLimitValueById
} from '@/services/api'
import {
@ -132,4 +134,13 @@ export async function handleSetOperationStatusChangeMode(data) {
export async function handleLightControl(val) {
return request(LightControl + '?lampCmd=' + val, METHOD.POST)
}
export async function handle_SelectBinRule_getall() {
return request(SelectBinRule_getall, METHOD.GET)
}
export async function handle_UpdateLimitValueById(data) {
return request(UpdateLimitValueById, METHOD.POST, data)
}
Loading…
Cancel
Save