单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
5个文件已添加
7个文件已修改
5679 ■■■■■ 已修改文件
.env.development 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.production 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package-lock.json 4846 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/turn.png 补丁 | 查看 | 原始文档 | blame | 历史
src/components/doctorAdvice/index.vue 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/doctorAdvice/type.ts 375 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.ts 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/httpApi.ts 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/deviceWindoes2.vue 239 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vite.config.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
New file
@@ -0,0 +1,6 @@
# 本地环境
VITE_ENV=development
VITE_API_BASE_URL=https://testbs.ihemodialysis.com/
VITE_SSE_BASE_URL=http://testbs.ihemodialysis.com/sse/sseEvent/
.env.production
New file
@@ -0,0 +1,6 @@
# 生产环境
VITE_ENV=production
VITE_API_BASE_URL=https://backend.ihemodialysis.com/
VITE_SSE_BASE_URL=https://backend.ihemodialysis.com/sse/sseEvent/
.gitignore
@@ -22,3 +22,7 @@
*.njsproj
*.sln
*.sw?
# 环境变量
# .env.development
# .env.production
package-lock.json
Diff too large
package.json
@@ -5,7 +5,10 @@
  "type": "module",
  "scripts": {
    "dev": "vite",
    "dev:prod": "vite --mode production",
    "build": "vite build",
    "build:test": "vite build --mode development",
    "build:prod": "vite build --mode production",
    "build2": "vue-tsc -b && vite build",
    "preview": "vite preview"
  },
@@ -19,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"
  },
@@ -26,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/assets/turn.png
src/components/doctorAdvice/index.vue
New file
@@ -0,0 +1,186 @@
<template>
  <div class="doctor_advice_container" :style="{ height: height }">
    <div class="doctor_advice_list">
      <div
        v-for="(item, index) in drugOrders"
        :key="index"
        class="doctor_advice_item"
      >
        <div class="doctor_advice_item_name">{{ item.name }}</div>
        <template v-if="item?.children && item.children.length > 0">
          <div
            v-for="(child, childIndex) in item.children"
            :key="childIndex"
            class="doctor_advice_item_sub"
          >
            <img :src="trunImgSrc" alt="" />
            <span>{{ child }}</span>
          </div>
        </template>
      </div>
    </div>
  </div>
</template>
<script lang="ts">
import { PropType, computed } from "vue";
import type { Order } from "./type";
import trunImgSrc from "../../assets/turn.png";
export default {
  name: "DoctorAdvice",
  props: {
    // 容器的高度
    height: {
      type: String,
      default: '100%',
    },
    // 医嘱列表
    list: {
      type: Array as PropType<Order[]>,
      default: () => [],
    },
  },
  setup(props) {
    const drugOrders = computed(() => {
      // 格式化主医嘱数据(浅拷贝)
      const formatList = props.list
        .filter((e) => e.orderIsSub !== 1)
        .map((e) => ({ ...e }));
      // 处理子医嘱并挂载到对应主医嘱上
      props.list.forEach((e) => {
        if (e.orderIsSub === 1) {
          const i = formatList.findIndex((v) => v.code === e.orderMainCode);
          if (i !== -1) {
            if (!formatList[i].subDrugOrders) {
              formatList[i].subDrugOrders = [];
            }
            formatList[i].subDrugOrders.push(e);
          }
        }
      });
      // 构建显示用的 name 和子医嘱 children
      return formatList.map((order) => {
        let name = "";
        if (order.orderNameInfo) {
          name = order.orderNameInfo.itemName || "";
          const drugSpec = order.orderNameInfo.feeDrugInfo?.drugSpec;
          if (drugSpec) {
            name += ` (${drugSpec})`;
          }
        }
        if (order.orderUsage && order.orderUsage !== 0) {
          name += ` ${order.orderUsage}${
            order.orderNameInfo?.feeDrugInfo?.drugUnitName || ""
          }`;
        }
        if (order.orderCount) {
          name += ` ${order.orderCount}`;
          const pkgUnit = order.orderNameInfo?.feeDrugInfo?.drugPackageUnitName;
          if (pkgUnit) {
            name += pkgUnit;
          }
        }
        if (order.orderFromInfo?.dictText) {
          name += ` ${order.orderFromInfo.dictText}`;
        }
        if (order.orderFreqInfo?.dictText) {
          name += ` ${order.orderFreqInfo.dictText}`;
        }
        const children: string[] = [];
        if (order.subDrugOrders?.length) {
          order.subDrugOrders.forEach((child: any) => {
            let subName = child.orderNameInfo?.itemName || "";
            const childSpec = child.orderNameInfo?.feeDrugInfo?.drugSpec;
            if (childSpec) {
              subName += ` (${childSpec})`;
            }
            if (child.orderUsage) {
              const unit = child.orderNameInfo?.feeDrugInfo?.drugUnitName || "";
              subName += ` ${child.orderUsage}${unit}`;
            }
            if (child.orderCount) {
              const pkgUnit =
                child.orderNameInfo?.feeDrugInfo?.drugPackageUnitName;
              if (pkgUnit) {
                subName += ` ${child.orderCount}${pkgUnit}`;
              }
            }
            children.push(subName);
          });
        }
        return {
          name,
          children,
        };
      });
    });
    return {
      drugOrders,
      trunImgSrc,
    };
  },
};
</script>
<style scoped>
.doctor_advice_container {
  padding: 20px;
  box-sizing: border-box;
}
.doctor_advice_container .doctor_advice_list {
  box-sizing: border-box;
  height: 100%;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  overflow-y: auto;
}
.doctor_advice_container .doctor_advice_item {
  box-sizing: border-box;
  padding: 12px 24px;
  border-bottom: 2px solid #e6e5e5;
}
.doctor_advice_container .doctor_advice_item:last-child {
  box-sizing: border-box;
  border-bottom: none;
}
.doctor_advice_container .doctor_advice_item .doctor_advice_item_name {
  box-sizing: border-box;
  font-weight: 400;
  font-size: 26px;
  color: #333333;
  line-height: 35px;
  text-align: left;
  font-style: normal;
}
.doctor_advice_container .doctor_advice_item_sub {
  padding-left: 15px;
  font-weight: 400;
  font-size: 26px;
  color: #777777;
  line-height: 35px;
  text-align: left;
  font-style: normal;
}
.doctor_advice_container .doctor_advice_item_sub img {
  width: 24px;
  height: 24px;
  margin-right: 5px;
}
</style>
src/components/doctorAdvice/type.ts
New file
@@ -0,0 +1,375 @@
export interface Order {
    orderType: number;
    code: string;
    orderFreq: string;
    orderDoctor: string;
    confirmUserInfo: any | null;
    remark: string | null;
    isConfirm: number;
    isDeleted: number;
    orderExecuteCheckUser: any | null;
    orderIsSub: number;
    orderExecuteTime: any | null;
    id: number;
    recordCode: string;
    deletedTime: any | null;
    orderExecutePatient: any | null;
    orderExecuteUser: any | null;
    orderName: string;
    orderExecuteCheckUserInfo: any | null;
    subDrugOrders: any | null;
    orderSort: number;
    orderCount: number;
    hisOrderNo: string | null;
    updateUser: any | null;
    confirmTime: any | null;
    confirmUser: any | null;
    updateTime: number;
    orderDoctorInfo: UserDoctorInfo;
    orderMainCode: string | null;
    createTime: number;
    orderFreqInfo: OrderFreqInfo;
    orderNameInfo: OrderNameInfo;
    createUser: any | null;
    orderFrom: string;
    orderUsage: number;
    orderIsSpin: number;
    orderExecuteUserInfo: any | null;
    orderFromInfo: OrderFromInfo;
    orderStartTime: number;
}
interface UserDoctorInfo {
    isRecvAlarmEmail: number;
    prepareWorkMedicineStat: any | null;
    userDegree: any | null;
    isRecvAlarmWechat: number;
    listReadyRows: any | null;
    selectedFieldsInInventory2OutPage: any | null;
    currentClientInfo: any | null;
    signedInCountByDa: any | null;
    selectFieldsInShangjiCanshuPage: any | null;
    relatedClients: any | null;
    userWorkState: any | null;
    userIdentityCode: any | null;
    clientInfos: any | null;
    userMobile: string;
    id: number;
    loginWechatMpId: any | null;
    userIsTongluDoctor: number;
    canModifyHistoryHms: boolean;
    是否自动出库至二级默认仓库: any | null;
    userGoDepartment: any | null;
    userRfid: any | null;
    userGraduateTime: any | null;
    管理员能看到的客户列表: any | null;
    userSortOrder: number;
    userCustomSetting: string;
    hisCode: any | null;
    isRecvAlarm: any | null;
    selectedFieldsInCleanStatPage: any | null;
    排班时段选择项: any | null;
    userVsRoleList: any | null;
    userPassword: string;
    code: string;
    userSignPicUrl: any | null;
    userFromDepartment: any | null;
    roles: any | null;
    userAvatar: any | null;
    userNo: string;
    admin: boolean;
    remark: string;
    userAdmin: boolean;
    checkVersionCode: string;
    selectedFieldsInMedStat2: any | null;
    userTitle: string;
    isDeleted: number;
    nurse: boolean;
    canDeleteHistoryHms: boolean;
    userEmail: string;
    deletedTime: any | null;
    userWorkTimeFrom: any | null;
    prepareWorkMedicine: any | null;
    clientVsUserList: any | null;
    isValid: number;
    teamState: any | null;
    updateUser: number;
    updateTime: number;
    隐藏自备药: any | null;
    userName: string;
    selectFieldsInTodayOrderPage: any | null;
    isShow: number;
    doctor: boolean;
    isValidForClient: number;
    loginWechatUnionId: any | null;
    userGoDate: any | null;
    createTime: number;
    userInDate: any | null;
    clientCode: any | null;
    selectedFieldsInInventory2QueryPage: any | null;
    signedInCountByStatistics: any | null;
    createUser: number;
    userGender: number;
    userPinyin: string;
    listStatInfo: any | null;
}
interface OrderFreqInfo {
    code: string;
    dictIsCustom: number;
    updateUser: any | null;
    remark: any | null;
    updateTime: number;
    dictNo: string;
    dictType: string;
    dictIsEnable: number;
    isDeleted: number;
    createTime: number;
    hisCode: any | null;
    sortOrder: number;
    createUser: number;
    id: number;
    deletedTime: any | null;
    dictText: string;
}
interface OrderNameInfo {
    itemAgent: any | null;
    itemPermissionCode: any | null;
    inventoryItemTypeInfo: InventoryItemTypeInfo;
    itemIsUse: number;
    itemIsRestrictUse: number;
    itemCode: string;
    itemHisType: any | null;
    itemUnit: any | null;
    suntopItemCode: any | null;
    itemOutPrice: number;
    itemFactoryInfo: any | null;
    itemName: string;
    itemCommonUseInBothSide: any | null;
    id: number;
    当前使用量: any | null;
    剩余总量: any | null;
    storageCode: any | null;
    入库总量: any | null;
    透析器国网上报: DialyzerReport;
    hisCode: any | null;
    itemIsOutToPatient: number;
    itemSalePrice: number;
    itemIsReUse: number;
    itemPackageUnit: any | null;
    inStorageCountInfo: any | null;
    itemPackageUnitName: string;
    itemIsFavor: number;
    itemSpec: string;
    itemYibaoPrice: any | null;
    inventoryTypeCode: string;
    code: string;
    itemLicenseCode: any | null;
    itemAgentInfo: any | null;
    itemOperator: any | null;
    remark: any | null;
    批号对象列表: any | null;
    isDeleted: number;
    itemIsEnableManage: number;
    deletedTime: any | null;
    itemIsUseAsXt: number;
    itemName2: string;
    inventoryItemType: number;
    itemMoMaterial: any | null;
    itemMoArea: number;
    itemPinyin: string;
    itemTxqCleanRate: any | null;
    inventoryTypeName: any | null;
    itemSortOrder: number;
    updateUser: any | null;
    updateTime: number;
    结存: any | null;
    isShow: number;
    itemFactory: any | null;
    feeDrugInfo: FeeDrugInfo;
    itemOperatorInfo: any | null;
    itemPackageCount: any | null;
    createTime: number;
    clientCode: string;
    itemExtendJson: string;
    itemPeriodAlarmDays: number;
    itemRestrictUseRemark: any | null;
    createUser: number;
    itemUnitInfo: any | null;
    itemInPrice: number;
    itemInventoryAlarmCount: number;
    itemYibaoCode: any | null;
}
interface InventoryItemTypeInfo {
    code: string;
    typeName: string;
    updateUser: any | null;
    remark: any | null;
    updateTime: number;
    typeCategory: number;
    isShow: boolean;
    isDeleted: number;
    isEditable: number;
    createTime: number;
    clientCode: any | null;
    sortOrder: number;
    createUser: any | null;
    id: number;
    deletedTime: any | null;
}
interface DialyzerReport {
    eSA_促红素种类: string;
    抗凝剂_低分子肝素首剂量_IU: string;
    抗凝剂_总剂量: string;
    透析器透析膜: string;
    铁剂_其它静脉种类: string;
    eSA_用药方式: any[]; // 根据实际元素类型替换 any
    eSA_静脉剂量单位: string;
    铁剂_静脉剂量周: string;
    抗凝剂_枸橼酸钠速率每小时_ml: string;
    抗凝剂_阿加曲班追加速率_IU每小时: string;
    抗凝剂_肝素追加速率_mg每小时: string;
    透析器使用: string;
    抗凝剂_低分子肝素单位: string;
    抗凝剂_肝素首剂量_mg: string;
    抗凝剂_枸橼酸钠_其它钠浓度: string;
    抗凝剂_追加剂量: string;
    抗凝剂_其它抗凝剂: string;
    透析器类型: string;
    抗凝剂_阿加曲班_追加时间小时: string;
    抗凝剂_阿加曲班追加速率_mg每小时: string;
    抗凝剂_低分子肝素首剂量_mg: string;
    抗凝剂_阿加曲班首剂量_mg: string;
    透析器通量: string;
    抗凝剂_肝素首剂量_IU: string;
    铁剂_静脉种类: string;
    药品类型: string;
    eSA_皮下剂量: string;
    铁剂_口服剂量日: string;
    eSA_静脉剂量: string;
    抗凝剂_种类: string;
    抗凝剂_阿加曲班_追加时间分钟: string;
    eSA_促红素名称: string;
    抗凝剂_低分子肝素类型: string;
    铁剂_给药方式: string;
    抗凝剂_首剂量: string;
    抗凝剂_低分子肝素总剂量: string;
    抗凝剂_低分子肝素追加时间: string;
    抗凝剂_低分子肝素追加剂量_mg: string;
    抗凝剂_肝素_追加时间小时: string;
    铁剂_其它口服种类: string;
    抗凝剂_阿加曲班首剂量_IU: string;
    抗凝剂_枸橼酸钠_使用时间小时: string;
    抗凝剂_肝素_追加时间分钟: string;
    抗凝剂_枸橼酸钠浓度百分比: string;
    抗凝剂_肝素单位: string;
    抗凝剂_阿加曲班单位: string;
    eSA_皮下剂量单位: string;
    抗高血压药_分类: any[];
    抗凝剂_枸橼酸钠_使用时间分钟: string;
    抗凝剂_肝素追加速率_IU每小时: string;
    铁剂_口服种类: string;
    透析器膜面积: string;
    抗凝剂_是否使用华法林: string;
    抗凝剂_低分子肝素追加剂量_IU: string;
    eSA_其它促红素说明: string;
    铁剂_口服剂量单位: string;
    铁剂_静脉剂量单位: string;
}
interface FeeDrugInfo {
    drugBarcode: string;
    drugIsNeedTest: number;
    drugUsePeriodName: string;
    drugProduceLocation: string;
    drugPriceYibao: number;
    drugUseTypeName: string;
    drugPermissionCode: string;
    drugCategory: number;
    drugPackageType: number;
    drugPackageUnitAlias: string;
    drugSpec: string;
    drugAntibioticLevel: number;
    drugJixing: string;
    drugHisCode: any | null;
    drugInventoryPackageTypeName: any | null;
    drugBenweiCode: string;
    id: number;
    drugUseMethodName: string;
    drugIsFavor: number;
    drugPackageUnitName: string;
    drugPackageSum: number;
    drugSortOrder: number;
    drugYibaoCode: string;
    inventoryItemDetailCode: string;
    drugName2: string;
    drugUseUnitName: string;
    drugUnit: string;
    drugUsePeriod: string;
    drugInventoryPackageCount: number;
    drugUseMethod: string;
    drugName: string;
    drugUseUnit: string;
    drugInventoryPackageType: string;
    drugUseOnetime: string;
    code: string;
    drugCode: string;
    drugPackageUnit: string;
    drugProduceFactoryName: any | null;
    drugYlCode: string;
    remark: string;
    drugLimitUseText: string;
    drugProduceFactory: string;
    drugUnitName: string;
    isDeleted: number;
    drugInventoryAlertDays: number;
    drugPriceIn: number;
    drugStatus: number;
    drugPriceCategory: number;
    drugVsDiagnoseName: any | null;
    drugSyncPrice: number;
    deletedTime: any | null;
    drugPackageUnitAliasName: string;
    drugPinyin: string;
    drugVsDiagnose: string;
    drugGansuUseLimit: any | null;
    drugProperty: string;
    drugJixingName: string;
    drugPriceSale: number;
    updateUser: any | null;
    drugTransfer1: any | null;
    updateTime: number;
    drugTransfer2: any | null;
    drugUseType: string;
    drugLimitUseType: number;
    drugInventoryAlertValidDays: number;
    createTime: number;
    createUser: any | null;
    drugMonitorCode: string;
    drugPlusPercent: number;
    drugInHospitalUseType: number;
    drugSpecialProperty: number;
    drugBaseType: number;
}
interface OrderFromInfo {
    code: string;
    dictIsCustom: number;
    updateUser: any | null;
    remark: any | null;
    updateTime: number;
    dictNo: string;
    dictType: string;
    dictIsEnable: number;
    isDeleted: number;
    createTime: number;
    hisCode: any | null;
    sortOrder: number;
    createUser: any | null;
    id: number;
    deletedTime: any | null;
    dictText: string;
}
src/main.ts
@@ -6,5 +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') {
// 如果需要在手机平板上打开控制台,安装一个这个
    const vConsole = new VConsole()
}
createApp(App).use(router).use(ElementPlus).use(Vant).mount('#app')
src/utils/httpApi.ts
@@ -14,8 +14,9 @@
    message: string;
}
const apiBaseUrl = 'https://backend.ihemodialysis.com'; // 替换为你的API基础URL
// const apiBaseUrl = 'https://backend.ihemodialysis.com'; // 替换为你的API基础URL
// const apiBaseUrl = 'https://testbs.ihemodialysis.com'; // 替换为你的API基础URL
const apiBaseUrl = import.meta.env.VITE_API_BASE_URL;
export const setTimeoutAlert = async (requestData: SetTimeoutAlertRequest): Promise<ApiResponse> => {
    try {
src/views/deviceWindoes2.vue
@@ -1,7 +1,9 @@
<template>
  <div class="divice">
    <!-- {{数据初始化}} -->
    <div class="youzhiliao" style="height: 100%" v-if="deviceData.患者姓名">
    <el-carousel v-show="deviceData.患者姓名 && pageHeight > 0" height="auto" :autoplay="false" motion-blur :initial-index="0" always="always">
      <el-carousel-item  :style="{ height: pageHeight + 'px'}">
      <div class="youzhiliao" style="height: 100%" >
      <div class="toubu" style="height: 11%">
        <el-row
          v-if="deviceData.患者姓名 !== ''"
@@ -24,22 +26,33 @@
          <span
            class="grid-container"
            @click="initTupiao"
            style="margin-left: 5%; font-size: 350%; height: 100%"
            style="margin-left: 2%; font-size: 200%; height: 100%"
            >{{ deviceData.患者姓名 }}
          </span>
          <span
            class="grid-container"
            v-if="deviceData.年龄 !== null"
            style="margin-left: 5%; font-size: 300%; height: 100%"
            style="margin-left: 2%; font-size: 200%; height: 100%"
            >{{ deviceData.年龄 }}岁</span
          >
          <span
            class="grid-container"
            style="margin-left: 5%; font-size: 300%; height: 100%"
            style="margin-left: 2%; font-size: 200%; height: 100%"
            >{{ deviceData.性别 }}</span
          >
          <span
            class="grid-container"
            style="margin-left: 2%; font-size: 200%; height: 100%"
            >{{ patientSourceAndCode }}</span
          >
          <span
          v-if="deviceData.签到号"
            class="grid-container"
            style="margin-left: 2%; font-size: 200%; height: 100%"
            >{{ deviceData.签到号 }}</span
          >
          <div
            style="
              position: absolute;
@@ -475,6 +488,7 @@
                      font-weight: 600;
                      color: #333333;
                      color: #ca7070;
                      overflow-y: auto;
                    "
                  >
                    <el-row style="font-size: 20px">
@@ -857,13 +871,14 @@
                        font-size: 50px;
                        color: #333333;
                        color: #ca7070;
                        overflow-y: auto;
                      "
                    >
                      <el-row style="font-size: 20px">
                        <el-col
                          v-for="(row, index) in deviceData.异常检验指标"
                          :span="12"
                          style="font-weight: 700"
                          style="font-weight: 700;"
                          :key="index"
                        >
                          {{ getItemName(row?.项目名称) }}
@@ -918,7 +933,7 @@
                  referrerpolicy="no-referrer"
                  src="https://lanhu-oss.lanhuapp.com/SketchPng7d7c4e66d2f3fb56cb7c93cf3b359782ee05a12117f39e9b1836bff686aca428"
                />
                <span
                  class="text-group_3"
                  v-if="isinitXy && Number(deviceData.透析状态) >= 1"
@@ -1088,7 +1103,101 @@
        </el-row>
      </div>
    </div>
    <div v-else style="height: 100%">
      </el-carousel-item>
      <el-carousel-item :style="{ height: pageHeight + 'px'}">
        <div class="toubu" style="height: 11%">
        <el-row
          v-if="deviceData.患者姓名 !== ''"
          style="
            font-weight: 900;
            color: #ffffff;
            width: 100%;
            height: 100%;
            line-height: 100%;
            padding: 20px;
            position: relative;
          "
        >
          <span
            class="grid-container"
            style="font-size: 300%; height: 100%"
            v-if="deviceData.设备名称 !== null"
            >{{ deviceData.设备名称 }}
          </span>
          <span
            class="grid-container"
            @click="initTupiao"
            style="margin-left: 2%; font-size: 200%; height: 100%"
            >{{ deviceData.患者姓名 }}
          </span>
          <span
            class="grid-container"
            v-if="deviceData.年龄 !== null"
            style="margin-left: 2%; font-size: 200%; height: 100%"
            >{{ deviceData.年龄 }}岁</span
          >
          <span
            class="grid-container"
            style="margin-left: 2%; font-size: 200%; height: 100%"
            >{{ deviceData.性别 }}</span
          >
          <span
            class="grid-container"
            style="margin-left: 2%; font-size: 200%; height: 100%"
            >{{ patientSourceAndCode }}</span
          >
          <span
          v-if="deviceData.签到号"
            class="grid-container"
            style="margin-left: 2%; font-size: 200%; height: 100%"
            >{{ deviceData.签到号 }}</span
          >
          <div
            style="
              position: absolute;
              top: 0;
              right: 0;
              display: flex;
              align-items: center;
              justify-content: flex-end;
              padding: 5px;
              height: 100%;
            "
          >
            <div
              class="grid-container"
              style="display: flex; align-items: center; padding-right: 20px"
            >
              <span
                style="
                  display: inline-block;
                  margin-right: 15px;
                  font-size: 30px;
                  color: #f56c6c;
                "
                >{{ 倒计时显示 }}</span
              >
              <span style="display: inline-block; margin-right: 15px">
                <img @click="dingshiShow" :src="dingshi" alt="Image 1" />
              </span>
              <span style="display: inline-block">
                <img
                  @click="centerDialogVisible = true"
                  :src="shezhi"
                  alt="Image 2"
                />
              </span>
            </div>
          </div>
        </el-row>
      </div>
        <DoctorAdvice :height="'89%'" :list="deviceData.透析单医嘱列表" />
      </el-carousel-item>
    </el-carousel>
    <div v-show="!deviceData.患者姓名" style="height: 100%">
      <div class="toubu" style="height: 11%">
        <el-row
          style="
@@ -1107,7 +1216,7 @@
            v-if="deviceData.设备名称 !== null"
            >{{ deviceData.设备名称 }}
          </span>
          <div
            style="
              position: absolute;
@@ -1144,7 +1253,7 @@
                  "
                  >{{ 倒计时显示 }}</span
                >
                <span style="display: inline-block; margin-right: 15px">
                  <img @click="dingshiShow" :src="dingshi" alt="Image 1" />
                </span>
@@ -1294,7 +1403,7 @@
                </div>
              </div>
              <!-- <div class="container-weiqiandao" >
                  <div class="item-weiqiandao" style="background: #E5EEFF;border-radius: 8px;height: 100%;">
                    <div class="container-cord" style="height: 30px;">
                      <img style="width: 25px;" referrerpolicy="no-referrer" :src="tsl"
@@ -1578,7 +1687,7 @@
                <span class="text-gray-500">分钟 </span>
              </el-col>
            </el-form-item>
            <el-form-item label="提醒内容:">
              <el-input
                v-if="!formInline.selectOpen"
@@ -1674,7 +1783,7 @@
import tdddbaojing from "../assets/tzddd.mp3";
import tzxllbaojing from "../assets/tzxll.mp3";
import cgbaojing from "../assets/cg.mp3";
import {
  computed,
  getCurrentInstance,
@@ -1689,6 +1798,7 @@
import * as echarts from "echarts";
import { jgTime4 } from "../utils/formatTime";
import { setTimeoutAlert } from "../utils/httpApi";
import DoctorAdvice from '../components/doctorAdvice/index.vue';
// 创建 Audio 对象,指向 public 目录下的音频文件
const alarmSound = new Audio(alertbaojin); //一般报警声音
const alarmSoundCXY = new Audio(cxybaojing); //测血压报警
@@ -1703,7 +1813,7 @@
alarmSoundTZxll.loop = true; // 循环播放
const alarmSoundCG = new Audio(cgbaojing); //冲管
alarmSoundCG.loop = true; // 循环播放
// 控制播放状态的变量
const isPlaying = ref(false);
// 切换播放/暂停的方法
@@ -1778,7 +1888,7 @@
const sseData = ref({});
// sse状态
const readyState = ref({ key: 0, value: "正在链接中" });
const deviceCode = ref("");
const shishiTime = ref(new Date());
//有没有推送过血压如果有 就一直会显示血压数据
@@ -1797,9 +1907,13 @@
  selectType: "",
  selectOpen: false,
});
const 当前客户耗材集合 = ref({});
const deviceData = ref({
  患者来源: null,
  患者门诊住院号: '',
  签到号: '',
  透析单医嘱列表: [],
  iot_传输时间: "2025-01-10 19:15:24",
  iot_当前脱水量: 2.04,
  iot_脱水目标量: 3.3,
@@ -1974,6 +2088,7 @@
const wd = ref("");
const ls = ref("");
const ddd = ref("");
const pageHeight = ref(0);
const isShowXY = computed(() => {
  if (床旁血压计.value.zuihouTime > shishiTime.value) {
    return true;
@@ -1981,6 +2096,18 @@
    return false;
  }
});
const patientSourceAndCode = computed(() => {
  let res = '';
  if (deviceData.value.患者来源 === null) {
    return ''
  } else {
    res = deviceData.value.患者来源 === 1 ? '住院号:' : '门诊号:';
    res += deviceData.value.患者门诊住院号;
  }
  return res;
})
watch(
  () => isShowXY.value,
  () => {
@@ -2042,7 +2169,7 @@
  });
  // centerDialogVisible2.value=false
};
// 状态颜色
const zhuangtaiColor = computed(() => {
  const list = deviceData.value.设备状态列表;
@@ -2101,7 +2228,7 @@
      }
    });
  }
  return zhuantaiStr;
});
const isbaioji = computed(() => {
@@ -2142,7 +2269,7 @@
  backgroundSize: "cover", // 根据需要调整
  backgroundPosition: "center", // 根据需要调整
};
watch(
  () => txzt.value,
  () => {
@@ -2189,13 +2316,13 @@
  let hours = Math.floor(totalSeconds / 3600);
  let minutes = Math.floor((totalSeconds % 3600) / 60);
  let seconds = totalSeconds % 60;
  // 补零函数
  const pad = (num) => String(num).padStart(2, "0");
  return `${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;
};
const 倒计时 = ref(-100);
const 倒计时显示 = ref("00:00:00");
const 倒计时告警文本 = ref("");
@@ -2259,6 +2386,8 @@
    centerDialogVisible.value = true;
  }
  intervalId = setInterval(updateTime, 1000);
  const height = window.innerHeight;
  pageHeight.value = height;
});
// 在组件卸载前清除定时器,防止内存泄漏
onBeforeUnmount(() => {
@@ -2266,7 +2395,7 @@
    clearInterval(intervalId);
  }
});
const saveSet = () => {
  if (deviceCode.value) {
    centerDialogVisible.value = false;
@@ -2277,7 +2406,7 @@
    ElMessage.warning("请先输入设备编号");
  }
};
/**
 * 刷新页面
 */
@@ -2287,10 +2416,10 @@
const onFileChange = async (event: Event) => {
  const inputElement = event.target as HTMLInputElement;
  if (!inputElement.files || inputElement.files.length === 0) return;
  const file = inputElement.files[0];
  const reader = new FileReader();
  reader.onload = async (e) => {
    if (e.target && typeof e.target.result === "string") {
      try {
@@ -2318,7 +2447,7 @@
      }
    }
  };
  reader.readAsDataURL(file);
};
const shaoma = () => {};
@@ -2339,7 +2468,7 @@
  // http://testbs.ihemodialysis.com/sse/sseEvent
  // const test='http://testbs.ihemodialysis.com/sse/sseEvent/'
  数据初始化.value = true;
  const test = "https://backend.ihemodialysis.com/sse/sseEvent/";
  const test = import.meta.env.VITE_SSE_BASE_URL;
  const stateArr = [
    { key: 0, value: "正在链接中" },
    { key: 1, value: "已经链接并且可以通讯" },
@@ -2409,6 +2538,21 @@
            console.log(Date.now() + "DEV");
            if (dataBody?.透析状态) {
              deviceData.value = dataBody?.透析状态;
              if ('透析单医嘱列表' in dataBody.透析状态 && dataBody.透析状态?.透析单医嘱列表) {
                deviceData.value.透析单医嘱列表 = dataBody.透析状态.透析单医嘱列表;
              } else {
                deviceData.value.透析单医嘱列表 = []
              }
              if ('患者来源' in dataBody.透析状态) {
                deviceData.value.患者来源 = dataBody.透析状态.患者来源;
              } else {
                deviceData.value.患者来源 = null
              }
              if ('患者门诊住院号' in dataBody.透析状态) {
                deviceData.value.患者门诊住院号 = dataBody.透析状态.患者门诊住院号;
              } else {
                deviceData.value.患者门诊住院号 = ''
              }
            } else {
              deviceData.value.设备名称 = dataBody.IOT信息.床号;
              deviceData.value.患者姓名 = "";
@@ -2416,9 +2560,9 @@
                当前客户耗材集合.value = dataBody?.使用耗材字典;
              }
            }
            deviceData.value.设备变化 = Date.now() + "DEV";
            deviceData.value.属性历史列表 = dataBody?.IOT信息?.属性历史列表;
            console.log(deviceData.value.设备变化);
            deviceData.value.设备状态列表 = dataBody.IOT信息.状态列表;
@@ -2498,7 +2642,7 @@
          ],
        },
      },
      {
        name: "",
        type: "line",
@@ -2674,7 +2818,7 @@
        const myChart = echarts.init(
          proxy.$refs["echartsDiv" + deviceData.value.设备编号]
        );
        const option = {
          backgroundColor:
            床旁血压计.value.zuihouTime > shishiTime.value
@@ -2731,7 +2875,7 @@
          tbdata1.push(Number(wdMode?.finalText));
          wd.value = Number(wdMode?.finalText);
        }
        // 血液流速
        const xymode = e.属性列表.find((l) => {
          return l.identifierText === "血液流速";
@@ -2740,7 +2884,7 @@
          tbdata2.push(Number(xymode?.finalText));
          ls.value = Number(xymode?.finalText);
        }
        // 电导度
        const dddMode = e.属性列表.find((l) => {
          return l.identifierText === "透析液电导度";
@@ -2890,7 +3034,7 @@
    } catch (e) {
      console.log("图标渲染异常异常");
    }
    console.log(deviceData.value);
  }
};
@@ -2929,6 +3073,7 @@
  width: 100%;
  height: 100%;
  border: 1px solid coral;
  user-select: none;
  .toubu {
    // padding-left: 20px;
    width: 100%;
@@ -2983,17 +3128,17 @@
    // border-bottom:8px solid red ;
  }
}
/* 应用闪烁动画 */
.blink {
  // float: left; /* 让div浮动到左边 */
  width: 100%;
  height: 100%;
  animation: blink 2s infinite; /* 每秒闪烁一次,无限次数 */
  //   border-left:5px solid red ;
  //   border-right:5px solid red ;
  //   background: red;
  cursor: pointer;
  //  margin-bottom: 100%;
@@ -3020,7 +3165,7 @@
  align-items: center; /* 垂直居中 */
  height: 100vh; /* 根据需要调整高度 */
}
.centered-text {
  font-weight: 600;
  /* 其他样式 */
@@ -3046,7 +3191,7 @@
  height: 100%;
  gap: 10px; /* 调整这个值来设置间隔 */
}
.item-weiqiandao {
  flex: 1; /* 确保每个子 div 占据相同的高度 */
  background-color: lightblue; /* 可以根据需要调整背景颜色 */
@@ -3081,7 +3226,7 @@
  width: 100%; /* 设置一个具体的宽度或确保有继承宽度 */
  font-weight: 600;
}
.right-div {
  width: 50px; /* 固定宽度 */
  font-size: 16px;
@@ -3094,27 +3239,27 @@
  height: 100%;
  overflow-y: auto; /* 当内容超出容器高度时,垂直方向上显示滚动条 */
}
/* 可选:给ul设置一些样式 */
.scrollable-container ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.scrollable-container li {
  // padding: 4px;
  font-weight: 600;
  // border-bottom: 1px solid #ddd;
}
.cont_parent {
  height: 100%;
  display: grid;
  grid-template-rows: repeat(3, 1fr); /* 将容器划分为3行,每行占1份 */
  gap: 5px; /* 子元素之间的间隙(可选) */
}
.cont_child {
  border: 1px solid #ccc;
  padding: 10px;
@@ -3133,7 +3278,7 @@
.custom-dialog {
  border-radius: 10px;
}
.my-header {
  background-color: #ff6b6b; /* 标题背景颜色 */
  color: white; /* 标题文字颜色 */
@@ -3148,4 +3293,4 @@
  padding: 0;
  padding-bottom: 10px;
}
</style>
</style>
vite.config.ts
@@ -6,6 +6,7 @@
  server: {
    port: 3034, // 指定端口号为 3000
    strictPort: true, // 如果端口被占用,则抛出错误而不是尝试下一个可用端口
    host: true // 允许通过ip访问,要不然平板测试不了
  },
  resolve: {
    alias: {