浏览代码

[Feat 0000]数据中心-设备管理 分站管理 定时任务

bobo04052021@163.com 3 天之前
父节点
当前提交
6dba839cbf

+ 144 - 129
src/views/monitor/quartz/index.vue

@@ -36,150 +36,165 @@
   </div>
 </template>
 <script lang="ts" name="monitor-quartz" setup>
-  import { ref } from 'vue';
-  import { BasicTable, TableAction } from '/@/components/Table';
-  import { useModal } from '/@/components/Modal';
-  import { useListPage } from '/@/hooks/system/useListPage';
-  import { getQuartzList, deleteQuartz, batchDeleteQuartz, executeImmediately, resumeJob, pauseJob, getExportUrl, getImportUrl } from './quartz.api';
-  import { columns, searchFormSchema } from './quartz.data';
-  import QuartzModal from './QuartzModal.vue';
-  import { useMessage } from '/@/hooks/web/useMessage';
+import { ref } from 'vue';
+import { BasicTable, TableAction } from '/@/components/Table';
+import { useModal } from '/@/components/Modal';
+import { useListPage } from '/@/hooks/system/useListPage';
+import {
+  getQuartzList,
+  deleteQuartz,
+  batchDeleteQuartz,
+  executeImmediately,
+  resumeJob,
+  pauseJob,
+  getExportUrl,
+  getImportUrl,
+  collectJob,
+  monitorJob,
+  computeJob,
+} from './quartz.api';
+import { columns, searchFormSchema } from './quartz.data';
+import QuartzModal from './QuartzModal.vue';
+import { useMessage } from '/@/hooks/web/useMessage';
 
-  const { createMessage } = useMessage();
-  const [registerModal, { openModal }] = useModal();
-  // 列表页面公共参数、方法
-  const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
-    designScope: 'quartz-template',
-    tableProps: {
-      title: '任务列表',
-      api: getQuartzList,
-      columns: columns,
-      actionColumn: {
-        width: 180,
-      },
-      formConfig: {
-        labelWidth: 120,
-        schemas: searchFormSchema,
-        fieldMapToTime: [['fieldTime', ['beginDate', 'endDate'], 'YYYY-MM-DD HH:mm:ss']],
-      },
+const { createMessage } = useMessage();
+const [registerModal, { openModal }] = useModal();
+// 列表页面公共参数、方法
+const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
+  designScope: 'quartz-template',
+  tableProps: {
+    title: '任务列表',
+    api: getQuartzList,
+    columns: columns,
+    actionColumn: {
+      width: 180,
     },
-    exportConfig: {
-      name: '定时任务列表',
-      url: getExportUrl,
+    formConfig: {
+      labelWidth: 120,
+      schemas: searchFormSchema,
+      fieldMapToTime: [['fieldTime', ['beginDate', 'endDate'], 'YYYY-MM-DD HH:mm:ss']],
     },
-    importConfig: {
-      url: getImportUrl,
-    },
-  });
+  },
+  exportConfig: {
+    name: '定时任务列表',
+    url: getExportUrl,
+  },
+  importConfig: {
+    url: getImportUrl,
+  },
+});
 
-  const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
+const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
 
-  /**
-   * 操作列定义
-   * @param record
-   */
-  function getActions(record) {
-    return [
-      {
-        label: '启动',
-        popConfirm: {
-          title: '是否启动选中任务?',
-          confirm: handlerResume.bind(null, record),
-        },
-        ifShow: (_action) => {
-          return record.status == -1;
-        },
+/**
+ * 操作列定义
+ * @param record
+ */
+function getActions(record) {
+  return [
+    {
+      label: '启动',
+      popConfirm: {
+        title: '是否启动选中任务?',
+        confirm: handlerResume.bind(null, record),
       },
-      {
-        label: '停止',
-        popConfirm: {
-          title: '是否暂停选中任务?',
-          confirm: handlerPause.bind(null, record),
-        },
-        ifShow: (_action) => {
-          return record.status == 0;
-        },
+      ifShow: (_action) => {
+        return record.status == -1;
       },
-    ];
-  }
-
-  /**
-   * 下拉操作栏
-   */
-  function getDropDownAction(record) {
-    return [
-      {
-        label: '立即执行',
-        popConfirm: {
-          title: '是否立即执行任务?',
-          confirm: handlerExecute.bind(null, record),
-        },
+    },
+    {
+      label: '停止',
+      popConfirm: {
+        title: '是否暂停选中任务?',
+        confirm: handlerPause.bind(null, record),
+      },
+      ifShow: (_action) => {
+        return record.status == 0;
       },
-      {
-        label: '编辑',
-        onClick: handleEdit.bind(null, record),
+    },
+  ];
+}
+
+/**
+ * 下拉操作栏
+ */
+function getDropDownAction(record) {
+  return [
+    {
+      label: '立即执行',
+      popConfirm: {
+        title: '是否立即执行任务?',
+        confirm: handlerExecute.bind(null, record),
       },
-      {
-        label: '删除',
-        popConfirm: {
-          title: '是否确认删除',
-          confirm: handleDelete.bind(null, record),
-        },
+    },
+    {
+      label: '编辑',
+      onClick: handleEdit.bind(null, record),
+    },
+    {
+      label: '删除',
+      popConfirm: {
+        title: '是否确认删除',
+        confirm: handleDelete.bind(null, record),
       },
-    ];
-  }
+    },
+  ];
+}
 
-  /**
-   * 新增事件
-   */
-  function handleAdd() {
-    openModal(true, {
-      isUpdate: false,
-    });
-  }
+/**
+ * 新增事件
+ */
+function handleAdd() {
+  openModal(true, {
+    isUpdate: false,
+  });
+}
 
-  /**
-   * 编辑事件
-   */
-  function handleEdit(record) {
-    openModal(true, {
-      record,
-      isUpdate: true,
-    });
-  }
+/**
+ * 编辑事件
+ */
+function handleEdit(record) {
+  openModal(true, {
+    record,
+    isUpdate: true,
+  });
+}
 
-  /**
-   * 删除事件
-   */
-  async function handleDelete(record) {
-    await deleteQuartz({ id: record.id }, reload);
-  }
+/**
+ * 删除事件
+ */
+async function handleDelete(record) {
+  await deleteQuartz({ id: record.id }, reload);
+}
 
-  /**
-   * 立即执行
-   */
-  async function handlerExecute(record) {
-    await executeImmediately({ id: record.id }, reload);
-  }
+/**
+ * 立即执行
+ */
+async function handlerExecute(record) {
+  await executeImmediately({ id: record.id }, reload);
+}
 
-  /**
-   * 暂停
-   */
-  async function handlerPause(record) {
-    await pauseJob({ id: record.id }, reload);
-  }
+/**
+ * 暂停
+ */
+async function handlerPause(record) {
+  await pauseJob({ id: record.id }, reload);
+}
 
-  /**
-   * 启动
-   */
-  async function handlerResume(record) {
-    await resumeJob({ id: record.id }, reload);
-  }
+/**
+ * 启动
+ */
+async function handlerResume(record) {
+  // if (record.ntype === 'dataCenter') {
+  console.log(record.ntype, '类型');
+  // await collectJob({ id: record.id }, reload);
+  // } else await resumeJob({ id: record.id }, reload);
+}
 
-  /**
-   * 批量删除事件
-   */
-  async function batchHandleDelete() {
-    await batchDeleteQuartz({ ids: selectedRowKeys.value }, reload);
-  }
+/**
+ * 批量删除事件
+ */
+async function batchHandleDelete() {
+  await batchDeleteQuartz({ ids: selectedRowKeys.value }, reload);
+}
 </script>

+ 33 - 0
src/views/monitor/quartz/quartz.api.ts

@@ -13,6 +13,10 @@ enum Api {
   importExcelUrl = '/ventanaly/quartzJob/importExcel',
   execute = '/ventanaly/quartzJob/execute',
   deleteBatch = '/ventanaly/quartzJob/deleteBatch',
+  //数据中心  启动  停止   立即执行接口
+  collect = '/collect/quartzJob',
+  compute = '/compute/quartzJob',
+  monitor = '/ventanaly/quartzJob',
 }
 
 /**
@@ -88,6 +92,35 @@ export const executeImmediately = (params, handleSuccess) => {
   });
 };
 
+/**
+ * 数据中心---启动
+ * @param params
+ */
+export const collectJob = (params, handleSuccess) => {
+  return defHttp.get({ url: Api.collect, params }).then(() => {
+    handleSuccess();
+  });
+};
+
+/**
+ * 数据中心---暂停
+ * @param params
+ */
+export const computeJob = (params, handleSuccess) => {
+  return defHttp.get({ url: Api.compute, params }).then(() => {
+    handleSuccess();
+  });
+};
+
+/**
+ * 数据中心---立即执行
+ * @param params
+ */
+export const monitorJob = (params, handleSuccess) => {
+  return defHttp.get({ url: Api.monitor, params }).then(() => {
+    handleSuccess();
+  });
+};
 /**
  * 批量删除任务
  * @param params

+ 9 - 0
src/views/monitor/quartz/quartz.data.ts

@@ -67,6 +67,15 @@ export const formSchema: FormSchema[] = [
     component: 'Input',
     required: true,
   },
+  {
+    label: '系统类型',
+    field: 'jobSysType',
+    component: 'JDictSelectTag',
+    componentProps: {
+      dictCode: 'jobSysType',
+      placeholder: '请选择系统类型',
+    },
+  },
   {
     field: 'cronExpression',
     label: 'Cron表达式',

+ 6 - 61
src/views/vent/dataCenter/deviceCenter/device.api.ts

@@ -1,67 +1,12 @@
 import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
-  list = '/monitor/device',
-  baseList = '/safety/ventanalyDeviceInfo/list',
-  // deviceTypeList = '/safety/ventanalyDeviceInfo/DeviceKind/query',
-  // deviceTypeList = '/sys/dict/DeviceKind/queryBySystem',
   deviceTypeList = '/safety/ventanalyDeviceInfo/DeviceKind/queryBySystem',
-  itemList = '/sys/dictItem/list',
-  devPosition = '/sys/dict/getDictItems/devPosVisible',
-  getDepartmentInfo = '/monitor/getDepartmentInfo',
-  listdays = '/safety/ventanalyMonitorData/listdays',
-  getHistoryData = '/monitor/history/getHistoryData',
-  safetyDeviceList = '/monitor/codeDict',
-  exportXlsUrl = '/monitor/exportXls',
-  queryNowGasInsInfo = '/safety/gasDayReport/queryNowGasInsInfo', //查询当前各班瓦斯巡检信息
-  queryNowGasSta = '/safety/gasDayReport/queryNowGasSta',
-  queryReportData = '/safety/reportLocalData/queryReportData', //查询瓦斯日报列表
-  getDeviceListBySubId = '/safety/ventanalyDeviceInfo/getDeviceListBySubId', //查询分站
-  getDeviceHistoryData = '/safety/ventanalyMonitorData/getRealHistoryData', //查询设备历史数据
-  getRegulation = '/monitor/getDeviceRegulation',
+  deviceList = '/compute/deviceData/getDeviceAll',
+  devMonitorList = '/compute/deviceData/getDeviceMonitorInfo',
 }
-//分站全部列表
-export const getListAll = () => defHttp.post({ url: Api.getDeviceListBySubId });
-/**
- * 列表接口
- * @param params
- */
-export const list = (params) => defHttp.post({ url: Api.list, params });
-
-/**
- * 保存或者更新用户
- * @param params
- */
-export const getDeviceList = (params) => defHttp.get({ url: Api.baseList, params });
-
 export const getDeviceTypeList = (params) => defHttp.get({ url: Api.deviceTypeList, params });
-
-export const itemList = (params) => defHttp.get({ url: Api.itemList, params });
-export const devPosition = (params) => defHttp.get({ url: Api.devPosition, params });
-
-export const getDepartmentInfo = (params) => defHttp.get({ url: Api.getDepartmentInfo, params });
-
-export const listdays = (params) => defHttp.get({ url: Api.listdays, params });
-export const getHistoryData = (params) => defHttp.post({ url: Api.getHistoryData, params });
-export const safetyDeviceList = (params) => defHttp.post({ url: Api.safetyDeviceList, params });
-export const queryNowGasInsInfo = (params) => defHttp.post({ url: Api.queryNowGasInsInfo, params });
-
-export const getExportUrl = Api.exportXlsUrl;
-/**
- * 列表接口
- * @param params
- */
-export const queryNowGasSta = (params) => defHttp.post({ url: Api.queryNowGasSta, params });
-/**
- * 瓦斯日报列表
- * @param params
- */
-export const queryReportData = (params) => defHttp.post({ url: Api.queryReportData, params });
-
-/**
- * 设备历史数据接口
- * @param params
- */
-export const getDeviceHistoryData = (params) => defHttp.post({ url: Api.getDeviceHistoryData, data: params });
-
-export const getRegulation = (params) => defHttp.post({ url: Api.getRegulation, params });
+//根据设备类型获取设备列表
+export const getDeviceListByType = (params) => defHttp.post({ url: Api.deviceList, params });
+//根据设备id获取设备监控数据
+export const getDevMonitorListById = (params) => defHttp.post({ url: Api.devMonitorList, params });

文件差异内容过多而无法显示
+ 1045 - 98
src/views/vent/dataCenter/deviceCenter/index.vue


+ 9 - 62
src/views/vent/dataCenter/stationCenter/device.api.ts

@@ -1,67 +1,14 @@
 import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
-  list = '/monitor/device',
-  baseList = '/safety/ventanalyDeviceInfo/list',
-  // deviceTypeList = '/safety/ventanalyDeviceInfo/DeviceKind/query',
-  // deviceTypeList = '/sys/dict/DeviceKind/queryBySystem',
+  subStationList = '/safety/ventanalySubStation/alllist',
   deviceTypeList = '/safety/ventanalyDeviceInfo/DeviceKind/queryBySystem',
-  itemList = '/sys/dictItem/list',
-  devPosition = '/sys/dict/getDictItems/devPosVisible',
-  getDepartmentInfo = '/monitor/getDepartmentInfo',
-  listdays = '/safety/ventanalyMonitorData/listdays',
-  getHistoryData = '/monitor/history/getHistoryData',
-  safetyDeviceList = '/monitor/codeDict',
-  exportXlsUrl = '/monitor/exportXls',
-  queryNowGasInsInfo = '/safety/gasDayReport/queryNowGasInsInfo', //查询当前各班瓦斯巡检信息
-  queryNowGasSta = '/safety/gasDayReport/queryNowGasSta',
-  queryReportData = '/safety/reportLocalData/queryReportData', //查询瓦斯日报列表
-  getDeviceListBySubId = '/safety/ventanalyDeviceInfo/getDeviceListBySubId', //查询分站
-  getDeviceHistoryData = '/safety/ventanalyMonitorData/getRealHistoryData', //查询设备历史数据
-  getRegulation = '/monitor/getDeviceRegulation',
+  deviceList = '/compute/deviceData/getDeviceAll',
+  devMonitorList = '/compute/deviceData/getDeviceMonitorInfo',
 }
-//分站全部列表
-export const getListAll = () => defHttp.post({ url: Api.getDeviceListBySubId });
-/**
- * 列表接口
- * @param params
- */
-export const list = (params) => defHttp.post({ url: Api.list, params });
-
-/**
- * 保存或者更新用户
- * @param params
- */
-export const getDeviceList = (params) => defHttp.get({ url: Api.baseList, params });
-
-export const getDeviceTypeList = (params) => defHttp.get({ url: Api.deviceTypeList, params });
-
-export const itemList = (params) => defHttp.get({ url: Api.itemList, params });
-export const devPosition = (params) => defHttp.get({ url: Api.devPosition, params });
-
-export const getDepartmentInfo = (params) => defHttp.get({ url: Api.getDepartmentInfo, params });
-
-export const listdays = (params) => defHttp.get({ url: Api.listdays, params });
-export const getHistoryData = (params) => defHttp.post({ url: Api.getHistoryData, params });
-export const safetyDeviceList = (params) => defHttp.post({ url: Api.safetyDeviceList, params });
-export const queryNowGasInsInfo = (params) => defHttp.post({ url: Api.queryNowGasInsInfo, params });
-
-export const getExportUrl = Api.exportXlsUrl;
-/**
- * 列表接口
- * @param params
- */
-export const queryNowGasSta = (params) => defHttp.post({ url: Api.queryNowGasSta, params });
-/**
- * 瓦斯日报列表
- * @param params
- */
-export const queryReportData = (params) => defHttp.post({ url: Api.queryReportData, params });
-
-/**
- * 设备历史数据接口
- * @param params
- */
-export const getDeviceHistoryData = (params) => defHttp.post({ url: Api.getDeviceHistoryData, data: params });
-
-export const getRegulation = (params) => defHttp.post({ url: Api.getRegulation, params });
+// 分站查询接口
+export const subStationList = (params) => defHttp.get({ url: Api.subStationList, params });
+//根据设备类型获取设备列表
+export const getDeviceListByType = (params) => defHttp.post({ url: Api.deviceList, params });
+//根据设备id获取设备监控数据
+export const getDevMonitorListById = (params) => defHttp.post({ url: Api.devMonitorList, params });

+ 928 - 100
src/views/vent/dataCenter/stationCenter/index.vue

@@ -81,7 +81,7 @@
 </template>
 
 <script setup lang="ts">
-import { ref, nextTick, reactive, onMounted, onUnmounted, inject } from 'vue';
+import { ref, nextTick, computed, reactive, onMounted, onUnmounted, inject } from 'vue';
 import { usePermission } from '/@/hooks/web/usePermission';
 import customHeader from '/@/components/vent/customHeader.vue';
 import { AesEncryption } from '/@/utils/cipher';
@@ -89,6 +89,7 @@ import { loginCipher } from '/@/settings/encryptionSetting';
 import { message, TreeProps } from 'ant-design-vue';
 import { list, getDeviceList, getDeviceTypeList, devPosition, getDepartmentInfo, getExportUrl, getRegulation } from './device.api';
 import { DownOutlined, RightOutlined } from '@ant-design/icons-vue';
+import { subStationList } from './device.api';
 
 const { hasPermission } = usePermission();
 let activeKey = ref('device');
@@ -96,44 +97,37 @@ const treeData = ref<TreeProps['treeData']>([]);
 const selectedKeys = ref<string[]>([]);
 const expandedKeys = ref<string[]>([]);
 const systemID = ref(''); // 系统监测时,系统id
+let cardList = ref<any[]>(); //分站列表
+let openNum = ref(0);
+let clsoeNum = ref(0);
+
+// 分页配置
+const pagination = reactive({
+  current: 1,
+  pageSize: 10,
+  total: computed(() => deviceList.value.length),
+  showSizeChanger: true,
+  pageSizeOptions: ['10', '20', '50'],
+  onChange: (page, size) => {
+    pagination.current = page;
+    pagination.pageSize = size;
+  },
+  onShowSizeChange: (current, size) => {
+    pagination.current = 1;
+    pagination.pageSize = size;
+  },
+});
 //树形菜单选择事件
 const onSelect: TreeProps['onSelect'] = (keys, e) => {};
-// 获取树形菜单数据
-async function getDeviceType(sysType?) {
-  if (treeData.value?.length > 0) return;
-  const result = await getDeviceTypeList({});
-  if (result.length > 0) {
-    const dataSource = <TreeProps['treeData']>[];
-    let key = '0';
-    const getData = (resultList, dataSourceList, keyVal) => {
-      resultList.forEach((item, index) => {
-        if (item.deviceType != 'sys' && item.children && item.children.length > 0) {
-          const children = getData(item.children, [], `${keyVal}-${index}`);
-          // 判断关键阻力路线
-          if (item.itemValue.startsWith(sysType) && children[0]) {
-            systemID.value = item.children[0]['itemValue'];
-          }
-
-          dataSourceList.push({
-            children: children,
-            title: item.itemText,
-            key: `${keyVal}-${index}`,
-            type: item.itemValue,
-            parentKey: `${keyVal}`,
-          });
-        } else {
-          dataSourceList.push({
-            children: [],
-            title: item.itemText,
-            key: `${keyVal}-${index}`,
-            type: item.itemValue,
-            parentKey: `${keyVal}`,
-          });
-        }
-      });
-      return dataSourceList;
-    };
-    treeData.value = getData(result, dataSource, key);
+//获取分站信息
+async function getSubStationList() {
+  let res = await subStationList({ strtype: 'modbus' });
+  if (res.length != 0) {
+    cardList.value = res;
+    openNum.value = cardList.value?.filter((v) => v.linkstatus == 1)['length'];
+    clsoeNum.value = cardList.value?.filter((v) => v.linkstatus == 0)['length'];
+  } else {
+    cardList.value = [];
   }
 }
 // 设备数据结构
@@ -163,6 +157,201 @@ const expandedRowKeys = ref([]);
 
 // 加载状态映射
 const loadingMap = reactive({});
+// 根据选择设备获取设备列表
+async function getDeviceList(deviceTypeVal?) {
+  // if (!deviceTypeVal) return;
+  const params: any = {
+    devKind: deviceTypeVal,
+  };
+  const result = {
+    records: [
+      {
+        id: '1965325207547695105',
+        strname: '束管1',
+        strinstallpos: '束管1',
+        devicekind: 'bundletube',
+        strtype: 'bundletube_auto',
+        typename: null,
+        flength: null,
+        fsectarea: null,
+        planedVa: null,
+        regulation: null,
+        elevation: null,
+        nsubstationid: '1696417397868986370',
+        stationname: '调试http协议',
+        strremark: null,
+        createBy: 'admin',
+        createTime: '2025-09-09 16:03:38',
+        updateBy: null,
+        updateTime: null,
+        isSelfDevice: 0,
+        status: 1,
+        monitorflag: 1,
+        testflag: 0,
+        sysOrgCode: 'A02A02',
+        orgCode: 'A02',
+        readData: {},
+        linkInfo: null,
+        stationids: null,
+        password: null,
+        strserno: 'sg001',
+        devgroup: null,
+        panel: null,
+        coalseam: null,
+        other1: null,
+        other2: null,
+        other3: null,
+        other4: null,
+        info: {},
+        linkId: null,
+        addrIndex: null,
+        standCode: null,
+        stationtype: null,
+        otherInfo: null,
+        programList: null,
+        debugFlag: 0,
+        orderNum: 0,
+        insType: null,
+        disTeamId: null,
+        isSensor: null,
+        nameEarly: null,
+        nameNoon: null,
+        nameNight: null,
+        disTeamName: null,
+        gasCheckTaskId: null,
+        isExistGasCheckTask: null,
+        netStatus: null,
+        devicekind_dictText: '束管监测',
+        isSelfDevice_dictText: '其他厂家',
+        monitorflag_dictText: '监测',
+        testflag_dictText: '否',
+      },
+      {
+        id: '1965325207568666626',
+        strname: '束管2',
+        strinstallpos: '束管2',
+        devicekind: 'bundletube',
+        strtype: 'bundletube_auto',
+        typename: null,
+        flength: null,
+        fsectarea: null,
+        planedVa: null,
+        regulation: null,
+        elevation: null,
+        nsubstationid: '1696417397868986370',
+        stationname: '调试http协议',
+        strremark: null,
+        createBy: 'admin',
+        createTime: '2025-09-09 16:03:38',
+        updateBy: null,
+        updateTime: null,
+        isSelfDevice: 0,
+        status: 1,
+        monitorflag: 1,
+        testflag: 0,
+        sysOrgCode: 'A02A02',
+        orgCode: 'A02',
+        readData: {},
+        linkInfo: null,
+        stationids: null,
+        password: null,
+        strserno: 'sg002',
+        devgroup: null,
+        panel: null,
+        coalseam: null,
+        other1: null,
+        other2: null,
+        other3: null,
+        other4: null,
+        info: {},
+        linkId: null,
+        addrIndex: null,
+        standCode: null,
+        stationtype: null,
+        otherInfo: null,
+        programList: null,
+        debugFlag: 0,
+        orderNum: 0,
+        insType: null,
+        disTeamId: null,
+        isSensor: null,
+        nameEarly: null,
+        nameNoon: null,
+        nameNight: null,
+        disTeamName: null,
+        gasCheckTaskId: null,
+        isExistGasCheckTask: null,
+        netStatus: null,
+        devicekind_dictText: '束管监测',
+        isSelfDevice_dictText: '其他厂家',
+        monitorflag_dictText: '监测',
+        testflag_dictText: '否',
+      },
+      {
+        id: '1965325207568666627',
+        strname: '束管3',
+        strinstallpos: '束管3',
+        devicekind: 'bundletube',
+        strtype: 'bundletube_auto',
+        typename: null,
+        flength: null,
+        fsectarea: null,
+        planedVa: null,
+        regulation: null,
+        elevation: null,
+        nsubstationid: '1696417397868986370',
+        stationname: '调试http协议',
+        strremark: null,
+        createBy: 'admin',
+        createTime: '2025-09-09 16:03:38',
+        updateBy: null,
+        updateTime: null,
+        isSelfDevice: 0,
+        status: 1,
+        monitorflag: 1,
+        testflag: 0,
+        sysOrgCode: 'A02A02',
+        orgCode: 'A02',
+        readData: {},
+        linkInfo: null,
+        stationids: null,
+        password: null,
+        strserno: 'sg003',
+        devgroup: null,
+        panel: null,
+        coalseam: null,
+        other1: null,
+        other2: null,
+        other3: null,
+        other4: null,
+        info: {},
+        linkId: null,
+        addrIndex: null,
+        standCode: null,
+        stationtype: null,
+        otherInfo: null,
+        programList: null,
+        debugFlag: 0,
+        orderNum: 0,
+        insType: null,
+        disTeamId: null,
+        isSensor: null,
+        nameEarly: null,
+        nameNoon: null,
+        nameNight: null,
+        disTeamName: null,
+        gasCheckTaskId: null,
+        isExistGasCheckTask: null,
+        netStatus: null,
+        devicekind_dictText: '束管监测',
+        isSelfDevice_dictText: '其他厂家',
+        monitorflag_dictText: '监测',
+        testflag_dictText: '否',
+      },
+    ],
+  };
+  deviceList.value = result.records;
+}
 
 // 外层表格列配置
 const outerColumns = [
@@ -170,16 +359,25 @@ const outerColumns = [
     title: '设备ID',
     dataIndex: 'id',
     key: 'id',
+    align: 'center',
   },
   {
-    title: '设备名称',
-    dataIndex: 'name',
-    key: 'name',
+    title: '安装位置',
+    dataIndex: 'strinstallpos',
+    key: 'strinstallpos',
+    align: 'center',
+  },
+  {
+    title: '设备类型',
+    dataIndex: 'devicekind_dictText',
+    key: 'devicekind_dictText',
+    align: 'center',
   },
   {
     title: '状态',
-    dataIndex: 'status',
-    key: 'status',
+    dataIndex: 'netStatus',
+    key: 'netStatus',
+    align: 'center',
     customRender: ({ text }) => {
       text = '在线';
       return `${text}`;
@@ -190,34 +388,37 @@ const outerColumns = [
 // 内层表格列配置
 const innerColumns = [
   {
-    title: '监测字段',
-    dataIndex: 'field',
-    key: 'field',
-    width: '40%',
+    title: '地址',
+    dataIndex: 'plcAddr',
+    key: 'plcAddr',
+    align: 'center',
   },
   {
-    title: '当前值',
+    title: '数据code',
+    dataIndex: 'valueCode',
+    align: 'center',
+    key: 'valueCode',
+  },
+  {
+    title: '数据名称',
+    dataIndex: 'valueName',
+    align: 'center',
+    key: 'valueName',
+  },
+  {
+    title: '数据值',
     dataIndex: 'value',
+    align: 'center',
     key: 'value',
-    width: '30%',
   },
   {
-    title: '单位',
-    dataIndex: 'unit',
-    key: 'unit',
-    width: '30%',
+    title: '时间',
+    dataIndex: 'time',
+    align: 'center',
+    key: 'time',
   },
 ];
 
-// 分页配置
-const pagination = reactive({
-  current: 1,
-  pageSize: 10,
-  total: 3,
-  showSizeChanger: true,
-  pageSizeOptions: ['10', '20', '50'],
-});
-
 // 切换展开状态
 const toggleExpand = (deviceId) => {
   const index = expandedRowKeys.value.indexOf(deviceId);
@@ -235,48 +436,675 @@ const toggleExpand = (deviceId) => {
 const loadMonitoringData = async (deviceId) => {
   const device = deviceList.value.find((d) => d.id === deviceId);
 
-  if (device && device.monitoringFields.length === 0) {
-    loadingMap[deviceId] = true;
-    try {
-      // 模拟API请求
-      await new Promise((resolve) => setTimeout(resolve, 800));
-      // 根据设备ID加载对应数据
-      device.monitoringFields = mockFetchMonitoringData(deviceId);
-    } catch (error) {
-      console.error(`加载设备 ${deviceId} 数据失败:`, error);
-    } finally {
-      loadingMap[deviceId] = false;
-    }
+  loadingMap[deviceId] = true;
+  try {
+    const result = {
+      msgType: null,
+      deviceID: '1965325207568666627',
+      deviceType: 'bundletube_auto',
+      typeName: '束管监测',
+      kindtypeName: '束管监测',
+      deviceName: '束管3',
+      devicePos: '束管3',
+      subStationID: '1696417397868986370',
+      monitorflag: 1,
+      testflag: 0,
+      fsectarea: null,
+      planedVa: null,
+      regulation: null,
+      elevation: null,
+      subStationName: '调试http协议束管',
+      subStationIP: 'http://192.168.1.88:10930/compute/testDta/getSgList',
+      subStationPort: '8930',
+      subStationType: 'http',
+      addrIndex: null,
+      standCode: null,
+      sysOrgCode: 'A02A02',
+      orgCode: 'A02',
+      stationids: null,
+      bakids: null,
+      limits: null,
+      cameras: [],
+      summaryHour: [],
+      summaryDay: [],
+      history: [],
+      majorpath: {},
+      info: null,
+      netStatus: null,
+      frontGateOpenCtrl: null,
+      rearGateOpenCtrl: null,
+      readTime: '2025-10-30 14:31:32',
+      lastSummaryDate: null,
+      paramid: null,
+      readData: {
+        coval: {
+          id: 1611236056970682378,
+          saveid: 0,
+          valueCode: 'coval',
+          valueName: '一氧化碳',
+          value: '12.50',
+          hourNum: null,
+          dayNum: null,
+          hourAvg: null,
+          hourMax: null,
+          hourMin: null,
+          dayAvg: null,
+          dayMax: null,
+          dayMin: null,
+          hourMaxTime: null,
+          dayMaxTime: null,
+          hourMinTime: null,
+          dayMinTime: null,
+          dictset: null,
+          summaryDate: null,
+          valueType: 4,
+          maxVal: null,
+          minVal: null,
+          limitlevels: [
+            {
+              id: null,
+              limitid: null,
+              devicekind: null,
+              devicetype: null,
+              deviceid: null,
+              eventid: null,
+              eventname: null,
+              monitorcode: 'coval',
+              valuetype: 2,
+              alarmType: null,
+              relatedCode: null,
+              fmin: null,
+              fmax: -10000.00000999999974737875163555145263671875,
+              leveltype: 10000,
+              datakind: null,
+              timelength: null,
+              des: '一氧化碳低于限值',
+              maxDeviceid: null,
+              minDeviceid: null,
+              maxCode: null,
+              minCode: null,
+              isVoice: null,
+              isCxVoice: null,
+              voiceFre: null,
+            },
+            {
+              id: null,
+              limitid: null,
+              devicekind: null,
+              devicetype: null,
+              deviceid: null,
+              eventid: null,
+              eventname: null,
+              monitorcode: 'coval',
+              valuetype: 2,
+              alarmType: null,
+              relatedCode: null,
+              fmin: 1000.000009999999974752427078783512115478515625,
+              fmax: 1000000,
+              leveltype: 10000,
+              datakind: null,
+              timelength: null,
+              des: '一氧化碳高于限值',
+              maxDeviceid: null,
+              minDeviceid: null,
+              maxCode: null,
+              minCode: null,
+              isVoice: null,
+              isCxVoice: null,
+              voiceFre: null,
+            },
+          ],
+          warnFlag: null,
+          time: '2025-10-30 14:31:32',
+          timelength: null,
+          warnInfo: '读取数据为空',
+          warnRank: null,
+          saveflag: 1,
+          spaceSave: null,
+          avgflag: 1,
+          warnKindType: null,
+          isVoice: null,
+          isCxVoice: null,
+          voiceFre: null,
+          plcAddr: 'co',
+          lastSummaryDate: null,
+        },
+        ch2val: {
+          id: 1611236056970682382,
+          saveid: 0,
+          valueCode: 'ch2val',
+          valueName: '乙烯',
+          value: '0.00',
+          hourNum: null,
+          dayNum: null,
+          hourAvg: null,
+          hourMax: null,
+          hourMin: null,
+          dayAvg: null,
+          dayMax: null,
+          dayMin: null,
+          hourMaxTime: null,
+          dayMaxTime: null,
+          hourMinTime: null,
+          dayMinTime: null,
+          dictset: null,
+          summaryDate: null,
+          valueType: 4,
+          maxVal: null,
+          minVal: null,
+          limitlevels: [
+            {
+              id: null,
+              limitid: null,
+              devicekind: null,
+              devicetype: null,
+              deviceid: null,
+              eventid: null,
+              eventname: null,
+              monitorcode: 'ch2val',
+              valuetype: 2,
+              alarmType: null,
+              relatedCode: null,
+              fmin: null,
+              fmax: -10000.00000999999974737875163555145263671875,
+              leveltype: 10000,
+              datakind: null,
+              timelength: null,
+              des: '乙烯低于限值',
+              maxDeviceid: null,
+              minDeviceid: null,
+              maxCode: null,
+              minCode: null,
+              isVoice: null,
+              isCxVoice: null,
+              voiceFre: null,
+            },
+            {
+              id: null,
+              limitid: null,
+              devicekind: null,
+              devicetype: null,
+              deviceid: null,
+              eventid: null,
+              eventname: null,
+              monitorcode: 'ch2val',
+              valuetype: 2,
+              alarmType: null,
+              relatedCode: null,
+              fmin: 1000.000009999999974752427078783512115478515625,
+              fmax: 1000000,
+              leveltype: 10000,
+              datakind: null,
+              timelength: null,
+              des: '乙烯高于限值',
+              maxDeviceid: null,
+              minDeviceid: null,
+              maxCode: null,
+              minCode: null,
+              isVoice: null,
+              isCxVoice: null,
+              voiceFre: null,
+            },
+          ],
+          warnFlag: null,
+          time: '2025-10-30 14:31:32',
+          timelength: null,
+          warnInfo: '读取数据为空',
+          warnRank: null,
+          saveflag: 1,
+          spaceSave: null,
+          avgflag: 1,
+          warnKindType: null,
+          isVoice: null,
+          isCxVoice: null,
+          voiceFre: null,
+          plcAddr: 'ch2',
+          lastSummaryDate: null,
+        },
+        gasval: {
+          id: 1611236056970682380,
+          saveid: 0,
+          valueCode: 'gasval',
+          valueName: '甲烷',
+          value: '0.40',
+          hourNum: null,
+          dayNum: null,
+          hourAvg: null,
+          hourMax: null,
+          hourMin: null,
+          dayAvg: null,
+          dayMax: null,
+          dayMin: null,
+          hourMaxTime: null,
+          dayMaxTime: null,
+          hourMinTime: null,
+          dayMinTime: null,
+          dictset: null,
+          summaryDate: null,
+          valueType: 4,
+          maxVal: null,
+          minVal: null,
+          limitlevels: [
+            {
+              id: null,
+              limitid: null,
+              devicekind: null,
+              devicetype: null,
+              deviceid: null,
+              eventid: null,
+              eventname: null,
+              monitorcode: 'gasval',
+              valuetype: 2,
+              alarmType: null,
+              relatedCode: null,
+              fmin: null,
+              fmax: -10000.00000999999974737875163555145263671875,
+              leveltype: 10000,
+              datakind: null,
+              timelength: null,
+              des: '甲烷低于限值',
+              maxDeviceid: null,
+              minDeviceid: null,
+              maxCode: null,
+              minCode: null,
+              isVoice: null,
+              isCxVoice: null,
+              voiceFre: null,
+            },
+            {
+              id: null,
+              limitid: null,
+              devicekind: null,
+              devicetype: null,
+              deviceid: null,
+              eventid: null,
+              eventname: null,
+              monitorcode: 'gasval',
+              valuetype: 2,
+              alarmType: null,
+              relatedCode: null,
+              fmin: 1000.000009999999974752427078783512115478515625,
+              fmax: 1000000,
+              leveltype: 10000,
+              datakind: null,
+              timelength: null,
+              des: '甲烷高于限值',
+              maxDeviceid: null,
+              minDeviceid: null,
+              maxCode: null,
+              minCode: null,
+              isVoice: null,
+              isCxVoice: null,
+              voiceFre: null,
+            },
+          ],
+          warnFlag: null,
+          time: '2025-10-30 14:31:32',
+          timelength: null,
+          warnInfo: '读取数据为空',
+          warnRank: null,
+          saveflag: 1,
+          spaceSave: null,
+          avgflag: 1,
+          warnKindType: null,
+          isVoice: null,
+          isCxVoice: null,
+          voiceFre: null,
+          plcAddr: 'ch4',
+          lastSummaryDate: null,
+        },
+        chval: {
+          id: 1611236056970682381,
+          saveid: 0,
+          valueCode: 'chval',
+          valueName: '乙炔',
+          value: '0.00',
+          hourNum: null,
+          dayNum: null,
+          hourAvg: null,
+          hourMax: null,
+          hourMin: null,
+          dayAvg: null,
+          dayMax: null,
+          dayMin: null,
+          hourMaxTime: null,
+          dayMaxTime: null,
+          hourMinTime: null,
+          dayMinTime: null,
+          dictset: null,
+          summaryDate: null,
+          valueType: 4,
+          maxVal: null,
+          minVal: null,
+          limitlevels: [
+            {
+              id: null,
+              limitid: null,
+              devicekind: null,
+              devicetype: null,
+              deviceid: null,
+              eventid: null,
+              eventname: null,
+              monitorcode: 'chval',
+              valuetype: 2,
+              alarmType: null,
+              relatedCode: null,
+              fmin: null,
+              fmax: -10000.00000999999974737875163555145263671875,
+              leveltype: 10000,
+              datakind: null,
+              timelength: null,
+              des: '乙炔低于限值',
+              maxDeviceid: null,
+              minDeviceid: null,
+              maxCode: null,
+              minCode: null,
+              isVoice: null,
+              isCxVoice: null,
+              voiceFre: null,
+            },
+            {
+              id: null,
+              limitid: null,
+              devicekind: null,
+              devicetype: null,
+              deviceid: null,
+              eventid: null,
+              eventname: null,
+              monitorcode: 'chval',
+              valuetype: 2,
+              alarmType: null,
+              relatedCode: null,
+              fmin: 1000.000009999999974752427078783512115478515625,
+              fmax: 1000000,
+              leveltype: 10000,
+              datakind: null,
+              timelength: null,
+              des: '乙炔高于限值',
+              maxDeviceid: null,
+              minDeviceid: null,
+              maxCode: null,
+              minCode: null,
+              isVoice: null,
+              isCxVoice: null,
+              voiceFre: null,
+            },
+          ],
+          warnFlag: null,
+          time: '2025-10-30 14:31:32',
+          timelength: null,
+          warnInfo: '读取数据为空',
+          warnRank: null,
+          saveflag: 1,
+          spaceSave: null,
+          avgflag: 1,
+          warnKindType: null,
+          isVoice: null,
+          isCxVoice: null,
+          voiceFre: null,
+          plcAddr: 'c2h2',
+          lastSummaryDate: null,
+        },
+        o2val: {
+          id: 1611236056970683001,
+          saveid: 0,
+          valueCode: 'o2val',
+          valueName: '氧气',
+          value: '19.96',
+          hourNum: null,
+          dayNum: null,
+          hourAvg: null,
+          hourMax: null,
+          hourMin: null,
+          dayAvg: null,
+          dayMax: null,
+          dayMin: null,
+          hourMaxTime: null,
+          dayMaxTime: null,
+          hourMinTime: null,
+          dayMinTime: null,
+          dictset: null,
+          summaryDate: null,
+          valueType: 4,
+          maxVal: null,
+          minVal: null,
+          limitlevels: [
+            {
+              id: null,
+              limitid: null,
+              devicekind: null,
+              devicetype: null,
+              deviceid: null,
+              eventid: null,
+              eventname: null,
+              monitorcode: 'o2val',
+              valuetype: 2,
+              alarmType: null,
+              relatedCode: null,
+              fmin: null,
+              fmax: -10000.00000999999974737875163555145263671875,
+              leveltype: 10000,
+              datakind: null,
+              timelength: null,
+              des: '氧气低于限值',
+              maxDeviceid: null,
+              minDeviceid: null,
+              maxCode: null,
+              minCode: null,
+              isVoice: null,
+              isCxVoice: null,
+              voiceFre: null,
+            },
+            {
+              id: null,
+              limitid: null,
+              devicekind: null,
+              devicetype: null,
+              deviceid: null,
+              eventid: null,
+              eventname: null,
+              monitorcode: 'o2val',
+              valuetype: 2,
+              alarmType: null,
+              relatedCode: null,
+              fmin: 1000.000009999999974752427078783512115478515625,
+              fmax: 1000000,
+              leveltype: 10000,
+              datakind: null,
+              timelength: null,
+              des: '氧气高于限值',
+              maxDeviceid: null,
+              minDeviceid: null,
+              maxCode: null,
+              minCode: null,
+              isVoice: null,
+              isCxVoice: null,
+              voiceFre: null,
+            },
+          ],
+          warnFlag: null,
+          time: '2025-10-30 14:31:32',
+          timelength: null,
+          warnInfo: '读取数据为空',
+          warnRank: null,
+          saveflag: 1,
+          spaceSave: null,
+          avgflag: 1,
+          warnKindType: null,
+          isVoice: null,
+          isCxVoice: null,
+          voiceFre: null,
+          plcAddr: 'o2',
+          lastSummaryDate: null,
+        },
+        co2val: {
+          id: 1611236056970682379,
+          saveid: 0,
+          valueCode: 'co2val',
+          valueName: '二氧化碳',
+          value: '0.22',
+          hourNum: null,
+          dayNum: null,
+          hourAvg: null,
+          hourMax: null,
+          hourMin: null,
+          dayAvg: null,
+          dayMax: null,
+          dayMin: null,
+          hourMaxTime: null,
+          dayMaxTime: null,
+          hourMinTime: null,
+          dayMinTime: null,
+          dictset: null,
+          summaryDate: null,
+          valueType: 4,
+          maxVal: null,
+          minVal: null,
+          limitlevels: [
+            {
+              id: null,
+              limitid: null,
+              devicekind: null,
+              devicetype: null,
+              deviceid: null,
+              eventid: null,
+              eventname: null,
+              monitorcode: 'co2val',
+              valuetype: 2,
+              alarmType: null,
+              relatedCode: null,
+              fmin: null,
+              fmax: -10000.00000999999974737875163555145263671875,
+              leveltype: 10000,
+              datakind: null,
+              timelength: null,
+              des: '二氧化碳低于限值',
+              maxDeviceid: null,
+              minDeviceid: null,
+              maxCode: null,
+              minCode: null,
+              isVoice: null,
+              isCxVoice: null,
+              voiceFre: null,
+            },
+            {
+              id: null,
+              limitid: null,
+              devicekind: null,
+              devicetype: null,
+              deviceid: null,
+              eventid: null,
+              eventname: null,
+              monitorcode: 'co2val',
+              valuetype: 2,
+              alarmType: null,
+              relatedCode: null,
+              fmin: 1000.000009999999974752427078783512115478515625,
+              fmax: 1000000,
+              leveltype: 10000,
+              datakind: null,
+              timelength: null,
+              des: '二氧化碳高于限值',
+              maxDeviceid: null,
+              minDeviceid: null,
+              maxCode: null,
+              minCode: null,
+              isVoice: null,
+              isCxVoice: null,
+              voiceFre: null,
+            },
+          ],
+          warnFlag: null,
+          time: '2025-10-30 14:31:32',
+          timelength: null,
+          warnInfo: '读取数据为空',
+          warnRank: null,
+          saveflag: 1,
+          spaceSave: null,
+          avgflag: 1,
+          warnKindType: null,
+          isVoice: null,
+          isCxVoice: null,
+          voiceFre: null,
+          plcAddr: 'co2',
+          lastSummaryDate: null,
+        },
+        deviceStatus: {
+          id: 1611236056970682466,
+          saveid: 0,
+          valueCode: 'deviceStatus',
+          valueName: '运行状态',
+          value: '',
+          hourNum: null,
+          dayNum: null,
+          hourAvg: null,
+          hourMax: null,
+          hourMin: null,
+          dayAvg: null,
+          dayMax: null,
+          dayMin: null,
+          hourMaxTime: null,
+          dayMaxTime: null,
+          hourMinTime: null,
+          dayMinTime: null,
+          dictset: null,
+          summaryDate: null,
+          valueType: 3,
+          maxVal: null,
+          minVal: null,
+          limitlevels: [],
+          warnFlag: null,
+          time: '2025-10-30 14:31:32',
+          timelength: null,
+          warnInfo: null,
+          warnRank: null,
+          saveflag: 1,
+          spaceSave: null,
+          avgflag: null,
+          warnKindType: null,
+          isVoice: null,
+          isCxVoice: null,
+          voiceFre: null,
+          plcAddr: 'M49.0',
+          lastSummaryDate: null,
+        },
+      },
+      oldData: {},
+      oldreadTime: null,
+      fclearwidth: null,
+      fperheight: null,
+      nwindow: null,
+      nwindownum: null,
+      sign: null,
+      isRun: null,
+      saveflag: null,
+      spaceSave: 0,
+      linkInfo: null,
+      linkId: null,
+      bakflag: null,
+      password: null,
+      strserno: 'sg003',
+      strRemark: null,
+      other1: null,
+      other2: null,
+      other3: null,
+      sysKind: 'fireS',
+      orderNum: 0,
+      dtype: 'bundletube',
+      nfrontPluseCircle: null,
+      nbackPluseCircle: null,
+    };
+    monitorList.value = Object.values(result.readData);
+  } catch (error) {
+    console.error(`加载设备 ${deviceId} 数据失败:`, error);
+  } finally {
+    loadingMap[deviceId] = false;
   }
-};
-
-// 值样式分类
-const getValueClass = (value) => {
-  if (value > 30) return 'high-value';
-  if (value < 10) return 'low-value';
-  return 'normal-value';
-};
-
-// 模拟API获取监测数据
-const mockFetchMonitoringData = (deviceId) => {
-  const dataMap = {
-    D001: [
-      { field: '模拟数据', value: (Math.random() * 10).toFixed(2), unit: '1' },
-      { field: '模拟数据', value: (Math.random() * 10).toFixed(2), unit: '1' },
-    ],
-    D002: [
-      { field: '模拟数据', value: (Math.random() * 10).toFixed(2), unit: '1' },
-      { field: '模拟数据', value: (Math.random() * 10).toFixed(2), unit: '1' },
-    ],
-    D003: [
-      { field: '模拟数据', value: (Math.random() * 10).toFixed(2), unit: '1' },
-      { field: '模拟数据', value: (Math.random() * 10).toFixed(2), unit: '1' },
-    ],
-  };
-  return dataMap[deviceId] || [];
+  // const result = await getDevMonitorListById({ deviceId });
 };
 onMounted(async () => {
-  getDeviceType();
+  getSubStationList();
+  getDeviceList();
 });
 onUnmounted(() => {});
 </script>

部分文件因为文件数量过多而无法显示