fix:修改字段 对接设备告警
This commit is contained in:
@@ -67,6 +67,7 @@
|
||||
const equipmentAlarm = ref({});
|
||||
const stateOptions = ref();
|
||||
const logList = ref([]);
|
||||
const formRef = ref();
|
||||
const config = ref({
|
||||
size: logList.value.length,
|
||||
dataSource: logList.value,
|
||||
@@ -94,22 +95,26 @@
|
||||
equipmentAlarm.value = {};
|
||||
infoObject.value = {};
|
||||
visible.value = false;
|
||||
config.value.dataSource = [];
|
||||
logList.value = [];
|
||||
};
|
||||
const btnClick = () => {
|
||||
delete infoObject.value.createTime;
|
||||
infoObject.value.alarmEquipmentLogId = equipmentAlarm.value.id;
|
||||
if (equipmentAlarm.value.createWorkOrder === 0) {
|
||||
http.post(equipmentAlarmApi.noCreatOrUpdateLog, infoObject.value).then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
NsMessage.success('操作成功');
|
||||
showEdit.value = true;
|
||||
equipmentAlarm.value = {};
|
||||
infoObject.value = {};
|
||||
visible.value = false;
|
||||
emit('logAdd', null);
|
||||
}
|
||||
});
|
||||
}
|
||||
formRef.value.validate().then(() => {
|
||||
delete infoObject.value.createTime;
|
||||
infoObject.value.alarmEquipmentLogId = equipmentAlarm.value.id;
|
||||
if (equipmentAlarm.value.createWorkOrder === 0) {
|
||||
http.post(equipmentAlarmApi.noCreatOrUpdateLog, infoObject.value).then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
NsMessage.success('操作成功');
|
||||
showEdit.value = true;
|
||||
equipmentAlarm.value = {};
|
||||
infoObject.value = {};
|
||||
visible.value = false;
|
||||
emit('logAdd', null);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
//修改状态
|
||||
const changeShowEdit = () => {
|
||||
@@ -137,7 +142,6 @@
|
||||
{ value: 5, label: '已关闭' },
|
||||
];
|
||||
}
|
||||
console.log(data, 'data');
|
||||
await http
|
||||
.post(equipmentAlarmApi.getSelectAlarmEquipmentLogStatusProcess, {
|
||||
alarmEquipmentLogId: data.id,
|
||||
@@ -166,6 +170,7 @@
|
||||
return {
|
||||
infoObject,
|
||||
rules,
|
||||
formRef,
|
||||
changeShowEdit,
|
||||
showEdit,
|
||||
equipmentAlarm,
|
||||
|
Reference in New Issue
Block a user