单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
zhangchen
2025-07-25 fdb05f0921b4e74d92101a7ff972244012b1f8a8
src/views/mobile/bedsideAuxiliaryScreen/pages/UnderTreatment.vue
@@ -318,9 +318,11 @@
      </div>
    </div>
  </div>
  <!-- 定时任务 -->
  <ScheduledTaskDialog ref="scheduledTaskDialogRef" />
</template>
<script lang="ts" setup name="UnderTreatment">
import { computed, ref, onMounted, onBeforeUnmount, watch } from "vue";
import { computed, ref, onMounted, onBeforeUnmount, watch, defineAsyncComponent } from "vue";
import * as echarts from "echarts";
import dayjs from "dayjs";
@@ -331,6 +333,9 @@
import DoctorAdvice from "../components/DoctorAdvice/index.vue";
// @ts-ignore
import BlockBotttom from "../components/BlockBotttom.vue";
const ScheduledTaskDialog = defineAsyncComponent(
  () => import("../components/ScheduledTask.vue")
);
import { useBedsideAuxiliaryScreenStore } from "@/store/bedsideAuxiliaryScreen";
import {
  formatSubstituteMode,
@@ -364,6 +369,9 @@
const props = defineProps<Props>();
const bedsideAuxiliaryScreenStore = useBedsideAuxiliaryScreenStore();
const scheduledTaskDialogRef = ref<any>(null);
// ktv趋势图的
const ktvListEchartRef = ref<HTMLElement | null>(null);
@@ -410,6 +418,14 @@
  { deep: true }
);
watch(
  () => props.height,
  () => {
    generateKtvListEchart(pageData.value.ktvList);
    generatBloodPressureAndPulseEchart(pageData.value.monitoringRecord);
  }
);
/** 生成ktv趋势图 */
const generateKtvListEchart = (ktvList: KtvItem[]) => {
  if (!ktvListEchartRef.value) return;
@@ -454,7 +470,7 @@
          color: "#70CAAE",
        },
        itemStyle: {
          color: "#70CAAE",
          color: (params: any) => getColor(params.value),
        },
      },
    ],
@@ -464,6 +480,12 @@
  };
  chart.setOption(option, true); // 第二个参数为 true 表示全量更新
};
const getColor = (val: number) => {
  if (val < 1.2) return "#FE0201"; // 红色
  if (val <= 1.6) return "#70CAAE"; // 绿色
  return "#FE6500"; // 橙色
};
/** 生成血压脉搏趋势图 */
@@ -491,9 +513,9 @@
  const option = {
    grid: [
  { top: "5%", height: "28%", left: 40, right: 20, containLabel: true },
  { top: "35%", height: "28%", left: 40, right: 20, containLabel: true },
  { top: "65%", height: "28%", left: 40, right: 20, containLabel: true },
      { top: "5%", height: "28%", left: 40, right: 20, containLabel: true },
      { top: "35%", height: "28%", left: 40, right: 20, containLabel: true },
      { top: "65%", height: "28%", left: 40, right: 20, containLabel: true },
    ],
    tooltip: {
      trigger: "axis",
@@ -630,7 +652,10 @@
};
/** 定时任务 */
const onScheduledTasksClick = () => {};
const onScheduledTasksClick = () => {
  if (!bedsideAuxiliaryScreenStore.deviceCode || !bedsideAuxiliaryScreenStore.deviceData.deviceCode) return ElMessage.warning('未初始化或正在进行初始化操作中');
  scheduledTaskDialogRef.value?.openDialog();
};
/** 叫号 */
const onCallBumberClick = () => {