单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
zhangchen
2025-09-24 3b2e941a83ad49d3167df864a5a06a81ef944470
src/views/mobile/bedsideAuxiliaryScreen/pages/UnderTreatment.vue
@@ -241,7 +241,7 @@
            header-class-name="mini-header"
          >
            <div class="progress-box">
              <div class="item-num">
              <div class="item-num item-num-2">
                {{ jgTime4(pageData.dialysisDuration) }}/{{
                  pageData.prescriptionDialysisDurationHour
                }}:{{ pageData.prescriptionDialysisDurationMin }}
@@ -256,6 +256,7 @@
                backgroundColor="#D6DEF1"
                borderRadius="50%"
              />
              <div class="cftsl-text">当前时间:<span class="">{{ time }}</span></div>
            </div>
          </Card>
          <Card
@@ -304,20 +305,20 @@
            @click="() => onScheduledTasksClick()"
            class="btn"
          />
          <BlockBotttom
          <!-- <BlockBotttom
            :icon="jiaoHaoImg"
            text="叫号"
            backgroundColor="#20C6B6"
            @click="() => onCallBumberClick()"
            class="btn"
          />
          <BlockBotttom
          /> -->
          <!-- <BlockBotttom
            :icon="addImg"
            text="添加记录"
            backgroundColor="#409EFF"
            @click="() => onAddRecordClick()"
            class="btn"
          />
          /> -->
          <BlockBotttom
            v-if="!whetherDialysisHasBeenEnded"
            :icon="kaiShiImg"
@@ -331,6 +332,8 @@
    </div>
    <!-- 定时任务 -->
    <ScheduledTaskDialog ref="scheduledTaskDialogRef" />
    <!-- 结束透析组件 -->
    <EndDialysis ref="endDialysisRef" />
  </div>
</template>
<script lang="ts" setup name="UnderTreatment">
@@ -355,6 +358,7 @@
const ScheduledTaskDialog = defineAsyncComponent(
  () => import("../components/ScheduledTask.vue")
);
const EndDialysis = defineAsyncComponent(() => import("../components/EndDialysis/index.vue"));
import { useBedsideAuxiliaryScreenStore } from "@/store/bedsideAuxiliaryScreen";
import {
  formatSubstituteMode,
@@ -390,11 +394,15 @@
const bedsideAuxiliaryScreenStore = useBedsideAuxiliaryScreenStore();
const scheduledTaskDialogRef = ref<any>(null);
const endDialysisRef = ref<any>(null);
// ktv趋势图的
const ktvListEchartRef = ref<HTMLElement | null>(null);
// 血压脉搏趋势图的
const bloodPressureAndPulseEchartRef = ref<HTMLElement | null>(null);
const time = ref(dayjs().format("HH:mm"))
let timer: number | undefined
const pageData = computed(() => {
  return Object.assign(bedsideAuxiliaryScreenStore.deviceData.underTreatment, {
@@ -419,6 +427,8 @@
    +bedsideAuxiliaryScreenStore.deviceData.treatmentStatus >= EMedStatus.END
  );
});
watch(
  () => pageData.value.ktvList,
@@ -785,19 +795,31 @@
/** 结束透析 */
const onEndClick = () => {
  ElMessage({
    message: "功能开发中,敬请期待!",
    type: "warning",
  });
  if (
    !bedsideAuxiliaryScreenStore.deviceCode ||
    !bedsideAuxiliaryScreenStore.deviceData.deviceCode
  )
    return ElMessage.warning("未初始化或正在进行初始化操作中");
  if (!bedsideAuxiliaryScreenStore.userInfo?.token)
    return ElMessage.warning("请登录");
  endDialysisRef.value?.openDialog();
};
onMounted(() => {
  // 生成ktv趋势图
  generateKtvListEchart(pageData.value.ktvList);
  generatBloodPressureAndPulseEchart(pageData.value.monitoringRecord);
  // 初始化
  time.value = dayjs().format("HH:mm")
  // 每分钟刷新一次
  timer = window.setInterval(() => {
    time.value = dayjs().format("HH:mm")
  }, 1000 * 1)
});
onBeforeUnmount(() => {
  if (timer) clearInterval(timer)
  // 销毁图表实例
  if (ktvListEchartRef.value) {
    const chart = echarts.getInstanceByDom(ktvListEchartRef.value);
@@ -980,7 +1002,7 @@
    }
  }
  .progress-box {
.progress-box {
    display: flex;
    align-items: center;
    flex-direction: column;