hongrunxia 1 giorno fa
parent
commit
2e093dcb54

BIN
src/assets/images/beltFire/plan/1-1.png


BIN
src/assets/images/beltFire/plan/1-2.png


BIN
src/assets/images/beltFire/plan/1-3.png


BIN
src/assets/images/beltFire/plan/1-4.png


BIN
src/assets/images/beltFire/plan/1-5.png


+ 121 - 120
src/views/vent/home/configurable/belt/belt.vue

@@ -28,142 +28,143 @@
   </div>
 </template>
 <script setup lang="ts">
-  import { onMounted, onUnmounted, ref } from 'vue';
-  import customHeader from './components/customHeader-belt.vue';
-  import { useInitConfigs, useInitPage } from '../hooks/useInit';
-  import { testBeltLaneFire } from './configurable.data';
-  import ModuleCommon from './components/ModuleCommon.vue';
-  import SubApp from '/@/components/vent/micro/createSubApp.vue';
-  import History from './components/detail/history.vue';
-  import { getDataHome } from './configurable.api';
+import { onMounted, onUnmounted, ref } from 'vue';
+import customHeader from './components/customHeader-belt.vue';
+import { useInitConfigs, useInitPage } from '../hooks/useInit';
+import { testBeltLaneFire } from './configurable.data';
+import ModuleCommon from './components/ModuleCommon.vue';
+import SubApp from '/@/components/vent/micro/createSubApp.vue';
+import History from './components/detail/history.vue';
+import { getDataHome } from './configurable.api';
 
-  const { configs, devicesTypes, fetchConfigs } = useInitConfigs();
-  const { updateEnhancedConfigs, updateData, data } = useInitPage('矿井全域皮带巷三级防灭火系统');
+const { configs, devicesTypes, fetchConfigs } = useInitConfigs();
+const { updateEnhancedConfigs, updateData, data } = useInitPage('矿井全域皮带巷三级防灭火系统');
 
-  const currentSelectedId = ref<string | number>('');
+const currentSelectedId = ref<string | number>('');
 
-  let timer = null;
-  const showHistory = ref(false);
-  // 接收子组件上报的点击事件,更新全局选中状态
-  const handleItemClick = (item) => {
-    const clickId = item.id;
-    if (!clickId) return;
-    currentSelectedId.value = clickId;
-  };
-  function goToHistory() {
-    showHistory.value = !showHistory.value;
-  }
+let timer = null;
+const showHistory = ref(false);
+// 接收子组件上报的点击事件,更新全局选中状态
+const handleItemClick = (item) => {
+  const clickId = item.id;
+  if (!clickId) return;
+  currentSelectedId.value = clickId;
+  refreshData();
+};
+function goToHistory() {
+  showHistory.value = !showHistory.value;
+}
 
-  // 数据筛选
-  const filterDataById = (sourceData, clickId: string | number) => {
-    if (!sourceData || !clickId) return sourceData;
-    const id = String(clickId);
-    const monitor = sourceData.monitor_alert?.find((item) => String(item.sysId) === id);
-    const spray = sourceData.spray_control?.find((item) => String(item.sysId) === id);
-    const gate = sourceData.gate_control?.find((item) => String(item.sysId) === id);
-    return {
-      ...sourceData,
-      monitor_alert: monitor ? [monitor] : [],
-      spray_control: spray ? [spray] : [],
-      gate_control: gate ? [gate] : [],
-    };
+// 数据筛选
+const filterDataById = (sourceData, clickId: string | number) => {
+  if (!sourceData || !clickId) return sourceData;
+  const id = String(clickId);
+  const monitor = sourceData.monitor_alert?.find((item) => String(item.sysId) === id);
+  const spray = sourceData.spray_control?.find((item) => String(item.sysId) === id);
+  const gate = sourceData.gate_control?.find((item) => String(item.sysId) === id);
+  return {
+    ...sourceData,
+    monitor_alert: monitor ? [monitor] : [],
+    spray_control: spray ? [spray] : [],
+    gate_control: gate ? [gate] : [],
   };
+};
 
-  function refresh() {
-    fetchConfigs('belt').then(() => {
-      if (!configs.value || configs.value.length === 0) {
-        configs.value = testBeltLaneFire;
-      }
-
-      const dataListStr = configs.value
-        .filter((e) => e.deviceType)
-        .map((e) => e.deviceType)
-        .join(',');
-
-      getDataHome({ dataList: dataListStr }).then((res: any) => {
-        res.spray_control = [
-          {
-            systemName: '东翼胶带运输大巷',
-            sysId: '2028657172566073346',
-            sysList: [{ netstatus: '1', deviceStatus: '1', plsy: '1#区域 1.4MPa', kzms: '手动' }],
-          },
-          {
-            sysId: '2046500718274756609',
-            systemName: '1101胶带运输顺槽',
-            sysList: [{ netstatus: '1', deviceStatus: '1', plqy: '2#区域', plsy: '1.6MPa', kzms: '自动' }],
-          },
-        ];
-        let showData = res;
+function refresh() {
+  fetchConfigs('belt').then(() => {
+    if (!configs.value || configs.value.length === 0) {
+      configs.value = testBeltLaneFire;
+    }
+    refreshData();
+  });
+}
+function refreshData() {
+  const dataListStr = configs.value
+    .filter((e) => e.deviceType)
+    .map((e) => e.deviceType)
+    .join(',');
 
-        if (currentSelectedId.value) {
-          showData = filterDataById(res, currentSelectedId.value);
-        } else {
-          const firstId = res.monitor_alert?.[0]?.sysId;
-          const warnVal = res.monitor_alert?.[0]?.value;
-          if (firstId) {
-            currentSelectedId.value = firstId;
-            showData = filterDataById(res, firstId);
-          }
-        }
+  getDataHome({ dataList: dataListStr }).then((res: any) => {
+    res.spray_control = [
+      {
+        systemName: '东翼胶带运输大巷',
+        sysId: '2028657172566073346',
+        sysList: [{ netstatus: '1', deviceStatus: '1', plsy: '1#区域 1.4MPa', kzms: '手动' }],
+      },
+      {
+        sysId: '2046500718274756609',
+        systemName: '1101胶带运输顺槽',
+        sysList: [{ netstatus: '1', deviceStatus: '1', plqy: '2#区域', plsy: '1.6MPa', kzms: '自动' }],
+      },
+    ];
 
-        updateData(showData);
-      });
-    });
-  }
-  // 轮询
-  function initInterval() {
-    if (timer) clearInterval(timer);
-    timer = setInterval(() => {
-      refresh();
-    }, 5000);
-  }
-  onMounted(() => {
-    refresh();
-    initInterval();
+    let showData = res;
+    if (currentSelectedId.value) {
+      showData = filterDataById(res, currentSelectedId.value);
+    } else {
+      const firstId = res.monitor_alert?.[0]?.sysId;
+      if (firstId) {
+        currentSelectedId.value = firstId;
+        showData = filterDataById(res, firstId);
+      }
+    }
+    updateData(showData);
   });
+}
+// 轮询
+function initInterval() {
+  if (timer) clearInterval(timer);
+  timer = setInterval(() => {
+    refresh();
+  }, 5000);
+}
+onMounted(() => {
+  refresh();
+  initInterval();
+});
 
-  onUnmounted(() => {
-    clearInterval(timer);
-    timer = null;
-  });
+onUnmounted(() => {
+  clearInterval(timer);
+  timer = null;
+});
 </script>
 <style lang="less" scoped>
-  .spray-wrapper {
-    width: 100%;
-    height: 100%;
-    background-image: url('/@/assets/images/beltFire/baseMap.png');
-    background-size: cover;
-  }
+.spray-wrapper {
+  width: 100%;
+  height: 100%;
+  background-image: url('/@/assets/images/beltFire/baseMap.png');
+  background-size: cover;
+}
 
-  #spray3D {
-    pointer-events: all;
-  }
+#spray3D {
+  pointer-events: all;
+}
 
-  .spray-wrapper :deep(.list-item_L .list-item__icon_L) {
-    background-image: url('/@/assets/images/home-container/configurable/minehome/list-icon-file.png');
-  }
-  .spray-wrapper :deep(.list-item_N:nth-child(1)) {
-    background-image: url('/@/assets/images/home-container/configurable/minehome/list-bg-n5.png');
-  }
-  .spray-wrapper :deep(.list-item_N:nth-child(2)) {
-    background-image: url('/@/assets/images/home-container/configurable/minehome/list-bg-n6.png');
-  }
-  .company-home {
-    background: url('/@/assets/images/beltFire/baseMap.png') no-repeat center;
+.spray-wrapper :deep(.list-item_L .list-item__icon_L) {
+  background-image: url('/@/assets/images/home-container/configurable/minehome/list-icon-file.png');
+}
+.spray-wrapper :deep(.list-item_N:nth-child(1)) {
+  background-image: url('/@/assets/images/home-container/configurable/minehome/list-bg-n5.png');
+}
+.spray-wrapper :deep(.list-item_N:nth-child(2)) {
+  background-image: url('/@/assets/images/home-container/configurable/minehome/list-bg-n6.png');
+}
+.company-home {
+  background: url('/@/assets/images/beltFire/baseMap.png') no-repeat center;
+  width: 100%;
+  height: 100%;
+  color: @white;
+  position: relative;
+  .border {
     width: 100%;
-    height: 100%;
-    color: @white;
-    position: relative;
-    .border {
-      width: 100%;
-      height: 94%;
-      background: url('/@/assets/images/beltFire/mainbj.png') no-repeat;
+    height: 94%;
+    background: url('/@/assets/images/beltFire/mainbj.png') no-repeat;
+    background-size: 100% 100%;
+    margin-top: 50px;
+    .test {
+      background: url('./test.png') no-repeat;
       background-size: 100% 100%;
-      margin-top: 50px;
-      .test {
-        background: url('./test.png') no-repeat;
-        background-size: 100% 100%;
-      }
     }
   }
+}
 </style>

+ 1 - 1
src/views/vent/home/configurable/belt/components/customHeader-belt.vue

@@ -95,7 +95,7 @@
     },
     {
       name: '灾变模拟分析',
-      path: '/micro-vent-3dModal/dashboard/analysis?type=sysMonitor&deviceType=sysfireTunnel&sysID=2028657172566073346&deviceid=2028650091184177153&sysType=leather',
+      path: 'micro-vent-3dModal/dashboard/analysis?type=sysMonitor&deviceType=sysfireTunnel&sysID=2028657172566073346&sysType=leatherr',
     },
   ];
   // 下拉框样式

+ 27 - 27
src/views/vent/home/configurable/belt/configurable.data.ts

@@ -606,12 +606,12 @@ export const testBeltNew: Config[] = [
             {
               name: '时间',
               prop: 'time',
-              width: '180px',
+              width: '120px',
             },
             {
               name: '区域',
               prop: 'area',
-              width: '220px',
+              width: '120px',
             },
             {
               name: '预警类型',
@@ -620,19 +620,19 @@ export const testBeltNew: Config[] = [
             },
             {
               name: '处置意见',
-              prop: 'advice',
-              width: '180px',
+              prop: 'adviceAction',
+              width: '80px',
             },
             {
               name: '操作',
               prop: 'action',
               width: '80px',
             },
-            {
-              name: '是否按预案执行',
-              prop: 'isPlanned',
-              width: '180px',
-            },
+            // {
+            //   name: '是否按预案执行',
+            //   prop: 'isPlanned',
+            //   width: '180px',
+            // },
           ],
         },
       ],
@@ -1115,12 +1115,12 @@ export const testSpary: Config[] = [
             {
               name: '时间',
               prop: 'time',
-              width: '180px',
+              width: '120px',
             },
             {
               name: '区域',
               prop: 'area',
-              width: '220px',
+              width: '120px',
             },
             {
               name: '预警类型',
@@ -1129,19 +1129,19 @@ export const testSpary: Config[] = [
             },
             {
               name: '处置意见',
-              prop: 'advice',
-              width: '180px',
+              prop: 'adviceAction',
+              width: '80px',
             },
             {
               name: '操作',
               prop: 'action',
               width: '80px',
             },
-            {
-              name: '是否按预案执行',
-              prop: 'isPlanned',
-              width: '180px',
-            },
+            // {
+            //   name: '是否按预案执行',
+            //   prop: 'isPlanned',
+            //   width: '180px',
+            // },
           ],
         },
       ],
@@ -1464,12 +1464,12 @@ export const testYjkf: Config[] = [
             {
               name: '时间',
               prop: 'time',
-              width: '180px',
+              width: '120px',
             },
             {
               name: '区域',
               prop: 'area',
-              width: '220px',
+              width: '120px',
             },
             {
               name: '预警类型',
@@ -1478,19 +1478,19 @@ export const testYjkf: Config[] = [
             },
             {
               name: '处置意见',
-              prop: 'advice',
-              width: '180px',
+              prop: 'adviceAction',
+              width: '80px',
             },
             {
               name: '操作',
               prop: 'action',
               width: '80px',
             },
-            {
-              name: '是否按预案执行',
-              prop: 'isPlanned',
-              width: '180px',
-            },
+            // {
+            //   name: '是否按预案执行',
+            //   prop: 'isPlanned',
+            //   width: '180px',
+            // },
           ],
         },
       ],

+ 4 - 4
src/views/vent/home/configurable/components/belt/ComplexListBelt.vue

@@ -40,10 +40,9 @@ const props = withDefaults(
   }
 );
 const alarmMap: Record<string | number, string> = {
-  '101': '绿色预警',
-  '102': '蓝色预警',
-  '103': '黄色预警',
-  '104': '橙色预警',
+  '102': '黄色预警',
+  '103': '橙色预警',
+  '104': '红色预警',
   '201': '报警',
   '0': '正常',
   '1001': '网络中断',
@@ -60,6 +59,7 @@ onMounted(() => {});
 
 .list {
   padding-left: 20px;
+  padding-top: 20px;
   background-repeat: no-repeat;
   position: relative;
   display: flex;

+ 155 - 0
src/views/vent/home/configurable/components/belt/ExecuteAdvice.vue

@@ -0,0 +1,155 @@
+<template>
+  <div class="modal-overlay" @click.self="close" v-if="visible">
+    <div class="modal-container">
+      <div class="dialog-header">
+        <span>处置意见</span>
+      </div>
+      <div class="dialog-body">
+        <div class="device-list" v-if="data && data.length">
+          <div class="device-item" v-for="(item, index) in data" :key="item.id"> {{ index + 1 }}:{{ item.devicePos }} - {{ item.monitorName }} </div>
+        </div>
+        <div class="device-list" v-else>
+          <div class="device-item"> 暂无数据 </div>
+        </div>
+      </div>
+
+      <div class="close-btn" @click="close">
+        <img src="@/assets/images/beltFire/fireMonitor/close.svg" alt="" />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script lang="ts" setup>
+import { ref, watch, defineProps, defineEmits } from 'vue';
+import { defHttp } from '/@/utils/http/axios';
+const props = defineProps({
+  visible: {
+    type: Boolean,
+    default: false,
+  },
+  data: {
+    type: Array,
+    default: () => [],
+  },
+});
+const emit = defineEmits(['update:visible']);
+const close = () => {
+  emit('update:visible', false);
+};
+</script>
+
+<style scoped lang="less">
+.modal-overlay {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 999;
+  background: rgba(0, 0, 0, 0.5);
+}
+
+.modal-container {
+  width: 50%;
+  max-width: 450px;
+  min-height: 200px;
+  background: url('/@/assets/images/beltFire/plan/1-5.png') no-repeat;
+  background-size: 100% 100%;
+  border-radius: 6px;
+  color: #fff;
+  position: relative;
+  padding: 20px;
+}
+
+.dialog-header {
+  text-align: center;
+  color: #fff;
+  background: url('/@/assets/images/beltFire/fireMonitor/historyTitle.png') no-repeat;
+  background-size: 100% 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  span {
+    font-size: 15px;
+    color: #fff;
+    font-family: 'douyuFont';
+  }
+}
+
+.dialog-body {
+  padding: 0px 15px;
+  margin-top: 10px;
+}
+.title {
+  padding: 5px 0;
+  text-align: center;
+  font-size: 16px;
+  color: #fff;
+  background: url('/@/assets/images/beltFire/plan/1-1.png') no-repeat;
+  background-size: 100% 100%;
+}
+.device-list {
+  margin-top: 10px;
+  margin-bottom: 10px;
+  background: url('/@/assets/images/beltFire/plan/1-2.png') no-repeat;
+  background-size: 100% 100%;
+  padding-left: 10px;
+  padding-bottom: 10px;
+  position: relative;
+  &::after {
+    content: '';
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    width: 100%;
+    height: 6px;
+    background: url('/@/assets/images/beltFire/plan/1-3.png') no-repeat center;
+    background-size: 100% auto;
+    z-index: 1;
+  }
+}
+.device-item {
+  padding: 8px 0;
+  font-size: 14px;
+  border: none;
+}
+.password-row {
+  display: flex;
+  align-items: center;
+  gap: 10px;
+  margin-top: 15px;
+  input {
+    flex: 1;
+    padding: 8px 12px;
+    border-radius: 4px;
+    border: none;
+    background: url('/@/assets/images/beltFire/plan/1-4.png') no-repeat;
+    background-size: 100% 100%;
+    color: #fff;
+    outline: none;
+  }
+  button {
+    white-space: nowrap;
+    background: #1ba5aa !important;
+  }
+}
+
+.close-btn {
+  position: absolute;
+  top: -12px;
+  right: -20px;
+  width: 30px;
+  height: 30px;
+  cursor: pointer;
+  z-index: 10;
+  img {
+    width: 100%;
+    height: 100%;
+    display: block;
+  }
+}
+</style>

+ 84 - 53
src/views/vent/home/configurable/components/belt/ExecutePlan.vue

@@ -1,24 +1,23 @@
 <template>
-  <div class="modal-overlay" @click.self="close">
+  <div class="modal-overlay" @click.self="close" v-if="visible">
     <div class="modal-container">
       <div class="dialog-header">
-        <h3>执行预案</h3>
+        <span>执行预案</span>
       </div>
       <div class="dialog-body">
+        <div class="title">执行步骤</div>
         <!-- 展示设备列表 -->
         <div class="device-list" v-if="data && data.length">
-          <div class="device-item" v-for="item in data" :key="item.id"> {{ item.devicePos }} - {{ item.monitorName }} </div>
+          <div class="device-item" v-for="(item, index) in data" :key="item.id">
+            Step {{ index + 1 }}:{{ item.devicePos }} - {{ item.monitorName }}
+          </div>
         </div>
-
-        <div class="password-box">
-          <span>授权密码:</span>
-          <input v-model="password" type="password" placeholder="请输入操作密码" @keyup.enter="confirm" />
+        <div class="password-row">
+          <input v-model="password" type="password" placeholder="请输入操作密码" class="password" @keyup.enter="confirm" />
+          <a-button type="primary" @click="confirm">确认执行</a-button>
         </div>
       </div>
-      <div class="dialog-footer">
-        <a-button @click="close">取消</a-button>
-        <a-button type="primary" @click="confirm">确认执行</a-button>
-      </div>
+
       <div class="close-btn" @click="close">
         <img src="@/assets/images/beltFire/fireMonitor/close.svg" alt="" />
       </div>
@@ -29,6 +28,13 @@
 <script lang="ts" setup>
 import { ref, watch, defineProps, defineEmits } from 'vue';
 import { message } from 'ant-design-vue';
+import { defHttp } from '/@/utils/http/axios';
+const edit = (params) => {
+  defHttp.post({
+    url: '/ventanaly-device/safety/managesysAutoLog/edit',
+    params,
+  });
+};
 const props = defineProps({
   visible: {
     type: Boolean,
@@ -40,18 +46,16 @@ const props = defineProps({
   },
 });
 const emit = defineEmits(['update:visible']);
+const close = () => {
+  emit('update:visible', false);
+  password.value = '';
+};
 
 // 密码
 const password = ref('');
 
-// 关闭弹窗
-function closeModal() {
-  emit('update:visible', false);
-  password.value = '';
-}
-
 // 确认执行
-const confirm = () => {
+const confirm = async () => {
   if (!password.value) {
     message.warning('请输入授权密码!');
     return;
@@ -62,21 +66,21 @@ const confirm = () => {
   }
   const params = {
     monitorType: 1,
-    alarmLogId: props.data[0].alarmId,
+    alarmLogId: props.data.map((item) => item.alarmId).join(','),
     alarmList: props.data.map((item) => item.id).join(','),
     password: password.value,
   };
 
-  message.success('确认执行');
-  close();
-};
-
-watch(
-  () => props.visible,
-  (val) => {
-    if (val) password.value = '';
+  try {
+    // 调用接口
+    await edit(params);
+    message.success('执行成功!');
+    close();
+  } catch (err) {
+    message.error('执行失败:' + err);
+    console.error('接口报错:', err);
   }
-);
+};
 </script>
 
 <style scoped lang="less">
@@ -90,13 +94,14 @@ watch(
   align-items: center;
   justify-content: center;
   z-index: 999;
+  background: rgba(0, 0, 0, 0.5);
 }
 
 .modal-container {
   width: 50%;
-  max-width: 580px;
-  min-height: 40vh;
-  background: url('/@/assets/images/beltFire/fireMonitor/modalBorder.png') no-repeat;
+  max-width: 450px;
+  min-height: 320px;
+  background: url('/@/assets/images/beltFire/plan/1-5.png') no-repeat;
   background-size: 100% 100%;
   border-radius: 6px;
   color: #fff;
@@ -107,35 +112,59 @@ watch(
 }
 
 .dialog-header {
-  padding: 20px 24px;
   text-align: center;
   color: #fff;
   background: url('/@/assets/images/beltFire/fireMonitor/historyTitle.png') no-repeat;
-  background-size: 100% 40%;
-  h3 {
-    margin: 5px;
-    font-size: 18px;
+  background-size: 100% 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  span {
+    font-size: 15px;
     color: #fff;
-    margin-top: -35px;
     font-family: 'douyuFont';
   }
 }
 
 .dialog-body {
   flex: 1;
-  padding: 10px 0;
+  padding: 0px 15px;
+  margin-top: 10px;
+}
+.title {
+  padding: 5px 0;
+  text-align: center;
+  font-size: 16px;
+  color: #fff;
+  background: url('/@/assets/images/beltFire/plan/1-1.png') no-repeat;
+  background-size: 100% 100%;
 }
-
 .device-list {
-  margin-bottom: 20px;
+  margin-top: 10px;
+  margin-bottom: 10px;
+  background: url('/@/assets/images/beltFire/plan/1-2.png') no-repeat;
+  background-size: 100% 100%;
+  padding-left: 10px;
+  padding-bottom: 10px;
+  position: relative;
+  &::after {
+    content: '';
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    width: 100%;
+    height: 6px;
+    background: url('/@/assets/images/beltFire/plan/1-3.png') no-repeat center;
+    background-size: 100% auto;
+    z-index: 1;
+  }
 }
 .device-item {
   padding: 8px 0;
   font-size: 14px;
-  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
+  border: none;
 }
-
-.password-box {
+.password-row {
   display: flex;
   align-items: center;
   gap: 10px;
@@ -144,18 +173,20 @@ watch(
     flex: 1;
     padding: 8px 12px;
     border-radius: 4px;
-    border: 1px solid #ccc;
-    background: rgba(0, 0, 0, 0.3);
-    color: #fff;
+    border: none;
+    background: url('/@/assets/images/beltFire/plan/1-4.png') no-repeat;
+    background-size: 100% 100%;
+    color: #ffff;
     outline: none;
+    &::placeholder {
+      color: #ffffff !important;
+      opacity: 0.8;
+    }
+  }
+  button {
+    white-space: nowrap;
+    background: #1ba5aa !important;
   }
-}
-
-.dialog-footer {
-  display: flex;
-  justify-content: center;
-  gap: 20px;
-  padding-top: 15px;
 }
 
 .close-btn {

+ 11 - 2
src/views/vent/home/configurable/components/belt/WarningResultList.vue

@@ -30,6 +30,9 @@
               <template v-else-if="col.prop === 'action'">
                 <a-button type="primary" style="background-color: #286d9f !important; border-radius: 5px" @click="openModel(row)">执行预案</a-button>
               </template>
+              <template v-else-if="col.prop === 'adviceAction'">
+                <span style="text-align: center; cursor: pointer; display: inline-block" @click="openModel1(row)">查看</span>
+              </template>
               <template v-else>
                 <span v-if="col.render" v-html="col.render(row, index)"></span>
                 <span v-else-if="col.prop === 'status'">
@@ -43,12 +46,14 @@
       </table>
     </div>
   </div>
-  <!-- <ExecutePlan v-model="visible" :data="planData"></ExecutePlan> -->
+  <ExecutePlan v-model:visible="visible" :data="planData"></ExecutePlan>
+  <ExecuteAdvice v-model:visible="visible1" :data="planData"></ExecuteAdvice>
 </template>
 
 <script setup lang="ts">
 import { onMounted, ref } from 'vue';
 import ExecutePlan from './ExecutePlan.vue';
+import ExecuteAdvice from './ExecuteAdvice.vue';
 const props = defineProps<{
   config: {
     tableReadFrom: string;
@@ -68,6 +73,7 @@ const props = defineProps<{
   };
 }>();
 const visible = ref(false);
+const visible1 = ref(false);
 const planData = ref([]);
 function getStatusText(status) {
   const map = {
@@ -90,10 +96,13 @@ const handleSwitchChange = (row: any) => {
   console.log('当前值:', row.isPlanned);
 };
 function openModel(row) {
-  console.log(row, '=====data');
   planData.value = row.alarmRecords['1'];
   visible.value = true;
 }
+function openModel1(row) {
+  planData.value = row.alarmRecords['1'];
+  visible1.value = true;
+}
 onMounted(() => {});
 </script>
 

+ 2 - 2
src/views/vent/home/configurable/components/content.vue

@@ -518,12 +518,12 @@ const layoutConfig = computed(() => {
       case 'table': {
         const cfg = table.shift();
         if (!cfg) break;
-        // const data = getData(refData, cfg.readFrom, cfg.parser);
+        const data = getData(refData, cfg.readFrom, cfg.parser);
         arr.push({
           ...cfg,
           ...item,
           columns: cfg.columns,
-          data: refData,
+          data: data,
         });
         break;
       }