|
@@ -130,6 +130,7 @@
|
|
|
import { getToken } from '/@/utils/auth';
|
|
|
import { useUserStore } from '/@/store/modules/user';
|
|
|
import { usePressControl } from '../hooks/useControl';
|
|
|
+ import dayjs from 'dayjs';
|
|
|
// import { Config } from '../../../deviceManager/configurationTable/types';
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -313,23 +314,24 @@
|
|
|
if (data.cmd !== 'topic' || data.topic !== 'warn') return;
|
|
|
if (!data.msgTxt) return;
|
|
|
|
|
|
- const { info = '', type = '', avgPressLogId, date } = JSON.parse(data.msgTxt);
|
|
|
+ const { info = '', type = '', avgPressureLogId, date } = JSON.parse(data.msgTxt);
|
|
|
+ const datestr = dayjs(date).format('YYYY-MM-DD HH:mm:ss');
|
|
|
switch (type) {
|
|
|
case 'o2':
|
|
|
if (warnModal1.value) break;
|
|
|
warnModal1.value = Modal.confirm({
|
|
|
title: data.msgTitle,
|
|
|
- content: h('div', { style: { color: '#fff' } }, [h('p', date), h('p', info)]),
|
|
|
+ content: h('div', { style: { color: '#fff' } }, [h('p', datestr), h('p', info)]),
|
|
|
centered: true,
|
|
|
okText: '下发调节指令',
|
|
|
mask: true,
|
|
|
class: 'balancePress',
|
|
|
async onOk() {
|
|
|
- await autoControl(avgPressLogId);
|
|
|
+ await autoControl(avgPressureLogId);
|
|
|
warnModal1.value = null;
|
|
|
},
|
|
|
async onCancel() {
|
|
|
- await cancelControl(avgPressLogId);
|
|
|
+ await cancelControl(avgPressureLogId);
|
|
|
warnModal1.value = null;
|
|
|
},
|
|
|
});
|
|
@@ -343,17 +345,17 @@
|
|
|
if (warnModal1.value) break;
|
|
|
warnModal1.value = Modal.confirm({
|
|
|
title: data.msgTitle,
|
|
|
- content: h('div', { style: { color: '#fff' } }, [h('p', date), h('p', info)]),
|
|
|
+ content: h('div', { style: { color: '#fff' } }, [h('p', datestr), h('p', info)]),
|
|
|
centered: true,
|
|
|
okText: '下发调节指令',
|
|
|
mask: true,
|
|
|
class: 'balancePress',
|
|
|
async onOk() {
|
|
|
- await autoControl(avgPressLogId);
|
|
|
+ await autoControl(avgPressureLogId);
|
|
|
warnModal1.value = null;
|
|
|
},
|
|
|
async onCancel() {
|
|
|
- await cancelControl(avgPressLogId);
|
|
|
+ await cancelControl(avgPressureLogId);
|
|
|
warnModal1.value = null;
|
|
|
},
|
|
|
});
|