单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
zhangchen
2025-06-27 31a7b66e97d7d9f267c152e6d36683ad774dcc65
ID2556-修复异常指标超出问题
4个文件已修改
4905 ■■■■■ 已修改文件
package-lock.json 4846 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/deviceWindoes2.vue 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package-lock.json
Diff too large
package.json
@@ -22,6 +22,7 @@
    "qs": "^6.14.0",
    "speak-tts": "^2.0.8",
    "vant": "^3.4.3",
    "vconsole": "^3.15.1",
    "vue": "^3.5.13",
    "vue-router": "^4.0.13"
  },
@@ -29,7 +30,9 @@
    "@vitejs/plugin-vue": "^5.2.1",
    "@vue/compiler-sfc": "^3.5.13",
    "@vue/tsconfig": "^0.7.0",
    "install": "^0.13.0",
    "less": "^4.2.1",
    "npm": "^11.4.2",
    "typescript": "~5.6.2",
    "vite": "^6.0.5",
    "vue-tsc": "^2.2.0"
src/main.ts
@@ -6,10 +6,12 @@
import './style.css'
import router from './router';
import App from './App.vue'
import VConsole from 'vconsole'
if (import.meta.env.VITE_ENV === 'development') {
// 如果需要在手机平板上打开控制台,安装一个这个
// import VConsole from 'vconsole'
// const vConsole = new VConsole()
// console.log('vConsole is ready.')
    const vConsole = new VConsole()
}
createApp(App).use(router).use(ElementPlus).use(Vant).mount('#app')
src/views/deviceWindoes2.vue
@@ -79,7 +79,7 @@
          </div>
        </el-row>
      </div>
      <el-carousel v-if="contentHeight > 0" height="auto" :autoplay="false" motion-blur :initial-index="0">
      <el-carousel v-if="contentHeight > 0" height="auto" :autoplay="false" motion-blur :initial-index="0" always="always">
        <el-carousel-item :style="{ height: (contentHeight - 10) + 'px' }">
          <div class="chongjian" style="height: 50%">
            <el-row :gutter="20" style="height: 100%; padding: 20px 20px 10px 20px">
@@ -478,9 +478,11 @@
                          font-size: 50px;
                          color: #333333;
                          color: #ca7070;
                          overflow: hidden;
                          overflow-y: auto;
                        "
                      >
                        <el-row style="font-size: 30px">
                        <el-row style="font-size: 30px; overflow: hidden;">
                          <el-col
                            v-for="(row, index) in deviceData.异常检验指标"
                            :span="8"
@@ -860,6 +862,8 @@
                            font-size: 50px;
                            color: #333333;
                            color: #ca7070;
                            overflow: hidden;
                            overflow-y: auto;
                          "
                        >
                          <el-row style="font-size: 30px">
@@ -1693,6 +1697,7 @@
// 创建 Audio 对象,指向 public 目录下的音频文件
const alarmSound = new Audio(alertbaojin)
const isHeightSet = ref(false);
// 控制播放状态的变量
const isPlaying = ref(false)
// 切换播放/暂停的方法
@@ -2257,17 +2262,29 @@
  }
);
watch(() => deviceData.value.患者姓名, (newVal: string) => {
  console.log("患者姓名变化:", newVal);
  if (newVal) {
    contentHeight.value = 0; // 重置高度
watch(() => deviceData.value.患者姓名, (newVal: string, oldVal: string) => {
  console.log("患者姓名变化:", newVal)
  if (newVal && oldVal !== newVal) {
    isHeightSet.value = false // 重置标识
    contentHeight.value = 0;  // 清空高度,强制更新 el-carousel
    setTimeout(() => {
    const windowHeight = window.innerHeight
    const toubu = document.getElementById('toubu')
    const toubuHeight = toubu ? toubu.offsetHeight : 0
    contentHeight.value = windowHeight - toubuHeight
    console.log("contentHeight.value: ", contentHeight.value)
    }, 500);
      if (isHeightSet.value) return // 如果已设置过就不重复执行
      const windowHeight = window.innerHeight
      const toubu = document.getElementById('toubu')
      const toubuHeight = toubu ? toubu.offsetHeight : 0
      const newHeight = windowHeight - toubuHeight
      if (newHeight !== contentHeight.value) {
        contentHeight.value = newHeight
        console.log("更新 contentHeight.value: ", contentHeight.value)
      }
      isHeightSet.value = true
    }, 500)
  }
})
@@ -2348,6 +2365,9 @@
            console.log(Date.now() + "DEV");
            if (dataBody?.透析状态) {
              deviceData.value = dataBody?.透析状态;
              if ('透析单医嘱列表' in dataBody.透析状态) {
                deviceData.value.透析单医嘱列表 = dataBody.透析状态.透析单医嘱列表;
              }
            } else {
              deviceData.value.设备名称 = dataBody.IOT信息.床号;
              deviceData.value.患者姓名 = "";
@@ -2361,9 +2381,6 @@
            deviceData.value.属性历史列表 = dataBody?.IOT信息?.属性历史列表;
            console.log(deviceData.value.设备变化);
            deviceData.value.设备状态列表 = dataBody.IOT信息.状态列表;
            if ('透析单医嘱列表' in dataBody.透析状态) {
              deviceData.value.透析单医嘱列表 = dataBody.透析状态.透析单医嘱列表;
            }
          }
        }
      }
@@ -2951,6 +2968,7 @@
  width: 100%;
  height: 100%;
  border: 1px solid coral;
  user-select: none;
  .toubu {
    // padding-left: 20px;
    width: 100%;