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,
|
||||
|
@@ -1,4 +1,9 @@
|
||||
import { equipmentAlarmApi } from '/@/api/alarmManagement/equipmentAlarm';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const orgId = ref('');
|
||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||
orgId.value = result;
|
||||
|
||||
const tableKeyMap = [
|
||||
{
|
||||
@@ -20,18 +25,23 @@ const tableKeyMap = [
|
||||
{
|
||||
title: '优先级',
|
||||
dataIndex: 'priority',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'alarmLogState',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '错误码',
|
||||
dataIndex: 'errorCode',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '设备信息',
|
||||
dataIndex: 'deviceInfo',
|
||||
width: 400,
|
||||
// textEllipsis: true,
|
||||
},
|
||||
{
|
||||
title: '更新时间',
|
||||
@@ -40,6 +50,7 @@ const tableKeyMap = [
|
||||
{
|
||||
title: '重复次数',
|
||||
dataIndex: 'alarmRepetitions',
|
||||
width: 80,
|
||||
},
|
||||
];
|
||||
export const notificationtableConfig = (look: any, status: any) => {
|
||||
@@ -155,6 +166,7 @@ export const notificationtableConfig = (look: any, status: any) => {
|
||||
},
|
||||
],
|
||||
},
|
||||
params: { orgId: orgId.value },
|
||||
// pagination: { pageSizeOptions: false },
|
||||
rowKey: 'id',
|
||||
};
|
||||
|
Reference in New Issue
Block a user