| | |
| | | </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"> |
| | |
| | | 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" |
| | |
| | | font-size: 50px; |
| | | color: #333333; |
| | | color: #ca7070; |
| | | overflow: hidden; |
| | | overflow-y: auto; |
| | | " |
| | | > |
| | | <el-row style="font-size: 30px"> |
| | |
| | | // 创建 Audio 对象,指向 public 目录下的音频文件 |
| | | const alarmSound = new Audio(alertbaojin) |
| | | |
| | | const isHeightSet = ref(false); |
| | | // 控制播放状态的变量 |
| | | const isPlaying = ref(false) |
| | | // 切换播放/暂停的方法 |
| | |
| | | } |
| | | ); |
| | | |
| | | 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) |
| | | } |
| | | }) |
| | | |
| | |
| | | console.log(Date.now() + "DEV"); |
| | | if (dataBody?.透析状态) { |
| | | deviceData.value = dataBody?.透析状态; |
| | | if ('透析单医嘱列表' in dataBody.透析状态) { |
| | | deviceData.value.透析单医嘱列表 = dataBody.透析状态.透析单医嘱列表; |
| | | } |
| | | } else { |
| | | deviceData.value.设备名称 = dataBody.IOT信息.床号; |
| | | deviceData.value.患者姓名 = ""; |
| | |
| | | deviceData.value.属性历史列表 = dataBody?.IOT信息?.属性历史列表; |
| | | console.log(deviceData.value.设备变化); |
| | | deviceData.value.设备状态列表 = dataBody.IOT信息.状态列表; |
| | | if ('透析单医嘱列表' in dataBody.透析状态) { |
| | | deviceData.value.透析单医嘱列表 = dataBody.透析状态.透析单医嘱列表; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | border: 1px solid coral; |
| | | user-select: none; |
| | | .toubu { |
| | | // padding-left: 20px; |
| | | width: 100%; |