|
@@ -11,6 +11,8 @@ import { t } from '@/i18n';
|
|
|
import { equipmentDetails, getGroupModuleInfo, getPageList, noPaginationDevicesList } from '@/api';
|
|
|
import { VisualModuleType } from '@/constants';
|
|
|
|
|
|
+import { DeviceType } from '../device-work-status/device-card';
|
|
|
+
|
|
|
import DeviceControl from './device-control/DeviceControl.vue';
|
|
|
import DeviceBatchExe from './DeviceBatchExe.vue';
|
|
|
import DeviceCtrlModal from './DeviceCtrlModal.vue';
|
|
@@ -113,16 +115,20 @@ const openEditor = () => {
|
|
|
visual2DEditorRef.value?.showView();
|
|
|
};
|
|
|
|
|
|
+const ctrlDeviceTypes = [DeviceType.冷水主机, DeviceType.冷却塔, DeviceType.冷却泵, DeviceType.冷冻泵];
|
|
|
+
|
|
|
const openDevCtrlModal = (id: number) => {
|
|
|
if (!id) {
|
|
|
- message.error(t('realTimeMonitor.unboundDevice'));
|
|
|
+ // message.error(t('realTimeMonitor.unboundDevice'));
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
handleRequest(async () => {
|
|
|
- deviceInfo.value = await equipmentDetails(id);
|
|
|
+ const data = await equipmentDetails(id);
|
|
|
+ const { deviceQueryVo } = data;
|
|
|
|
|
|
- if (deviceInfo.value.deviceQueryVo) {
|
|
|
+ if (deviceQueryVo && ctrlDeviceTypes.includes(deviceQueryVo.deviceType)) {
|
|
|
+ deviceInfo.value = data;
|
|
|
deviceCtrlModalRef.value?.showView();
|
|
|
}
|
|
|
});
|