安琪酵母(西藏)益生菌信息采集中心智能实验室
longyvfengyun
2023-08-24 91a371d14923904bdf88dd22995f1470eac3f809
src/views/airConditioning/js/runMonitorModule.js
@@ -3,38 +3,47 @@
const runMonitorModule = ()=>{
  const runMonitorData = reactive([
    {
      label: "压缩机运行时间",
      value: 0,
      unit: "H"
    },
    {
      label: "加热需求",
      value: 0,
      unit: "%"
    },
    {
      label: "制冷需求",
      value: 0,
      unit: "%"
    },
    {
      label: "除湿需求",
      value: 0,
      unit: "%"
    },
    {
      label: "回风温度",
      key: "airTemp",
      label: "空调温度",
      value: 0,
      unit: "℃"
    },
    {
      label: "回风湿度",
      key: "airHumid",
      label: "空调湿度",
      value: 0,
      unit: "%"
    },
    {
      key: "commCount",
      label: "通信计数",
      value: 0,
      unit: " "
    },
    {
      key: "commErrCount",
      label: "错误计数",
      value: 0,
      unit: " "
    },
    {
      key: "recordTime",
      label: "记录日期",
      value: 0,
      unit: " "
    }
  ]);
  return {runMonitorData};
  // 设置空调运行参数
  const setRunMonitorData = (data)=>{
    for(let i=0; i<runMonitorData.length; i++) {
      let item = runMonitorData[i];
      item.value = data[item.key]!==undefined?data[item.key]:0;
    }
  }
  return {runMonitorData, setRunMonitorData};
};
export default runMonitorModule;
export default runMonitorModule;