|
@@ -114,7 +114,7 @@
|
|
|
</a-spin>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
- import { ref, onMounted, onUnmounted, defineProps } from 'vue';
|
|
|
+ import { ref, onMounted, onUnmounted, defineProps, h } from 'vue';
|
|
|
import { mountedThree, destroy, setModelType, updateText, play } from '../balancePress.threejs';
|
|
|
import { list } from '../balancePress.api';
|
|
|
import ModuleCommon from '../../../home/configurable/components/ModuleCommon.vue';
|
|
@@ -214,8 +214,18 @@
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- const { avePressSetting, avePressLinkage, gateLinkage, formData, getAvePress, changePassword, linkageControl, settingControl, autoControl } =
|
|
|
- usePressControl();
|
|
|
+ const {
|
|
|
+ avePressSetting,
|
|
|
+ avePressLinkage,
|
|
|
+ gateLinkage,
|
|
|
+ formData,
|
|
|
+ getAvePress,
|
|
|
+ changePassword,
|
|
|
+ linkageControl,
|
|
|
+ settingControl,
|
|
|
+ autoControl,
|
|
|
+ cancelControl,
|
|
|
+ } = usePressControl();
|
|
|
|
|
|
const modalVisible = ref(false);
|
|
|
|
|
@@ -303,22 +313,23 @@
|
|
|
if (data.cmd !== 'topic' || data.topic !== 'warn') return;
|
|
|
if (!data.msgTxt) return;
|
|
|
|
|
|
- const { info = '', type = '' } = JSON.parse(data.msgTxt);
|
|
|
+ const { info = '', type = '', avgPressLogId, date } = JSON.parse(data.msgTxt);
|
|
|
switch (type) {
|
|
|
case 'o2':
|
|
|
if (warnModal1.value) break;
|
|
|
warnModal1.value = Modal.confirm({
|
|
|
title: data.msgTitle,
|
|
|
- content: info,
|
|
|
+ content: h('div', { style: { color: '#fff' } }, [h('p', date), h('p', info)]),
|
|
|
centered: true,
|
|
|
okText: '下发调节指令',
|
|
|
mask: true,
|
|
|
class: 'balancePress',
|
|
|
async onOk() {
|
|
|
- await autoControl();
|
|
|
+ await autoControl(avgPressLogId);
|
|
|
warnModal1.value = null;
|
|
|
},
|
|
|
- onCancel: () => {
|
|
|
+ async onCancel() {
|
|
|
+ await cancelControl(avgPressLogId);
|
|
|
warnModal1.value = null;
|
|
|
},
|
|
|
});
|
|
@@ -332,16 +343,17 @@
|
|
|
if (warnModal1.value) break;
|
|
|
warnModal1.value = Modal.confirm({
|
|
|
title: data.msgTitle,
|
|
|
- content: info,
|
|
|
+ content: h('div', { style: { color: '#fff' } }, [h('p', date), h('p', info)]),
|
|
|
centered: true,
|
|
|
okText: '下发调节指令',
|
|
|
mask: true,
|
|
|
class: 'balancePress',
|
|
|
async onOk() {
|
|
|
- await autoControl();
|
|
|
+ await autoControl(avgPressLogId);
|
|
|
warnModal1.value = null;
|
|
|
},
|
|
|
- onCancel: () => {
|
|
|
+ async onCancel() {
|
|
|
+ await cancelControl(avgPressLogId);
|
|
|
warnModal1.value = null;
|
|
|
},
|
|
|
});
|