fix:修改设备告警 能源告警字段 对接 能碳告警
This commit is contained in:
@@ -37,7 +37,9 @@
|
||||
<div style="color: #2778ff">{{ infoObject.alarmTitle }}</div>
|
||||
{{ infoObject.abnormalDescription }}</a-descriptions-item
|
||||
>
|
||||
<a-descriptions-item label="设备信息"> {{ infoObject.deviceInfo }} </a-descriptions-item>
|
||||
<a-descriptions-item label="监测点位">
|
||||
{{ infoObject.monitoringPoints }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="重复次数">
|
||||
{{ infoObject.alarmRepetitions }}
|
||||
</a-descriptions-item>
|
||||
|
@@ -64,7 +64,7 @@
|
||||
const visible = ref(false);
|
||||
const showEdit = ref(true);
|
||||
const infoObject = ref({});
|
||||
const equipmentAlarm = ref({});
|
||||
const energyAlarm = ref({});
|
||||
const stateOptions = ref();
|
||||
const logList = ref([]);
|
||||
const config = ref({
|
||||
@@ -73,19 +73,19 @@
|
||||
});
|
||||
const handleClose = () => {
|
||||
showEdit.value = true;
|
||||
equipmentAlarm.value = {};
|
||||
energyAlarm.value = {};
|
||||
infoObject.value = {};
|
||||
visible.value = false;
|
||||
};
|
||||
const btnClick = () => {
|
||||
delete infoObject.value.createTime;
|
||||
infoObject.value.alarmEquipmentLogId = equipmentAlarm.value.id;
|
||||
if (equipmentAlarm.value.createWorkOrder === 0) {
|
||||
infoObject.value.alarmEnergyConsumptionLogId = energyAlarm.value.id;
|
||||
if (energyAlarm.value.createWorkOrder === 0) {
|
||||
http.post(energyAlarmApi.noCreatOrUpdateLog, infoObject.value).then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
NsMessage.success('操作成功');
|
||||
showEdit.value = true;
|
||||
equipmentAlarm.value = {};
|
||||
energyAlarm.value = {};
|
||||
infoObject.value = {};
|
||||
visible.value = false;
|
||||
emit('logAdd', null);
|
||||
@@ -96,14 +96,14 @@
|
||||
//修改状态
|
||||
const changeShowEdit = () => {
|
||||
// 未生成工单
|
||||
if (equipmentAlarm.value.createWorkOrder === 0) {
|
||||
if (energyAlarm.value.createWorkOrder === 0) {
|
||||
showEdit.value = !showEdit.value;
|
||||
}
|
||||
};
|
||||
const toggle = async (data) => {
|
||||
equipmentAlarm.value = { ...data };
|
||||
energyAlarm.value = { ...data };
|
||||
visible.value = true;
|
||||
if (equipmentAlarm.value.createWorkOrder === 1) {
|
||||
if (energyAlarm.value.createWorkOrder === 1) {
|
||||
stateOptions.value = [
|
||||
{ value: 1, label: '待处理' },
|
||||
{ value: 2, label: '处理中' },
|
||||
@@ -121,8 +121,8 @@
|
||||
}
|
||||
console.log(data, 'data');
|
||||
await http
|
||||
.post(energyAlarmApi.getSelectAlarmEquipmentLogStatusProcess, {
|
||||
alarmEquipmentLogId: data.id,
|
||||
.post(energyAlarmApi.getSelectAlarmEnergyConsumptionLogStatusProcess, {
|
||||
alarmEnergyConsumptionLogId: data.id,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
@@ -149,7 +149,7 @@
|
||||
infoObject,
|
||||
changeShowEdit,
|
||||
showEdit,
|
||||
equipmentAlarm,
|
||||
energyAlarm,
|
||||
stateOptions,
|
||||
btnClick,
|
||||
visible,
|
||||
|
@@ -36,7 +36,7 @@ const tableKeyMap = [
|
||||
},
|
||||
{
|
||||
title: '监测点位',
|
||||
dataIndex: 'deviceInfo',
|
||||
dataIndex: 'monitoringPoints',
|
||||
},
|
||||
{
|
||||
title: '更新时间',
|
||||
|
Reference in New Issue
Block a user