浏览代码

归档完成

xiaochan 8 月之前
父节点
当前提交
8c4b7f67dc

+ 7 - 24
src/api/archive/archive-api.ts

@@ -36,30 +36,6 @@ export function submitTask(data: { patNo: string; times: number }[]) {
   });
 }
 
-export function currentOrganize(patNo: string, times: number) {
-  return requestV2<string>({
-    url: "/thyy/archive/currentOrganize",
-    method: "get",
-    params: { patNo, times },
-  });
-}
-
-export function organizeFiles(patNo: string, times: number) {
-  return requestV2({
-    url: "/thyy/archive/organizeFiles",
-    method: "get",
-    params: { patNo, times },
-  });
-}
-
-export function exitOrganizeFiles(patNo: string, times: number) {
-  return requestV2({
-    url: "/thyy/archive/exitOrganizeFiles",
-    method: "get",
-    params: { patNo, times },
-  });
-}
-
 export function sort(data) {
   return requestV2({
     url: "/thyy/archive/sort",
@@ -99,3 +75,10 @@ export function getAllLog(patNo: string, times: number) {
     params: { patNo, times },
   });
 }
+
+export function getTaskNameList() {
+  return requestV2({
+    url: "/thyy/archive/getTaskNameList",
+    method: "get",
+  });
+}

+ 2 - 2
src/api/inpatient/patient.js

@@ -26,8 +26,8 @@ export function getDrgPatInfo(data) {
 
 /**
  *
- * @param patNo
- * @param times
+ * @param {string} patNo 住院号
+ * @param {number} times
  * @return {Promise<{inpatientNo:string,admissTimes: number}>}
  */
 export function getPatientAll(patNo, times) {

+ 2 - 1
src/components/cy/CyDialog/CyDialogContainer.vue

@@ -1,6 +1,6 @@
 <script setup lang="tsx">
 import { dialogKeyType } from "@/components/cy/CyDialog/index";
-import { useSlots } from "vue";
+import { useAttrs, useSlots } from "vue";
 import { ElButton } from "element-plus";
 
 const root = inject(dialogKeyType);
@@ -8,6 +8,7 @@ const hasFooter = useSlots().footer;
 const emits = defineEmits(["cancel", "confirm"]);
 
 onMounted(() => {
+  console.log(useAttrs());
   root.showFooter = false;
 });
 </script>

+ 9 - 9
src/views/archive/ArchiveAside.vue

@@ -1,6 +1,6 @@
 <script setup lang="tsx">
 import { Document, Files } from "@element-plus/icons-vue";
-import { useArchiveKey } from "@/views/archive/index.tsx";
+import { useArchiveKey } from "@/views/archive/index";
 import { ElMessageBox, ElTree } from "element-plus";
 import * as archiveApi from "@/api/archive/archive-api";
 import { PatientArchive } from "@/api/archive/archive-api";
@@ -10,25 +10,26 @@ import TabsResizer from "@/components/cy/cy-el-tabs/TabsResizer.vue";
 import TabPaneResizer from "@/components/cy/cy-el-tabs/TabPaneResizer.vue";
 import { xcMessage } from "@/utils/xiaochan-element-plus";
 import XEUtils from "xe-utils";
+import useCompRef from "@/utils/useCompRef";
 
 const root = inject(useArchiveKey);
-const treeRef = ref(ElTree);
+const treeRef = useCompRef(ElTree);
 
 const defaultProps = {
   children: "children",
   label: "name",
 };
 
-function handleNodeClick(node: PatientArchive) {
+function handleNodeClick(node: PatientArchive, ...val) {
   if (node.isDir) return;
-  root.mutation.setPdfUrl(node.path);
+  root.mutation.setPdfUrl(node);
 }
 
 function allowDrop(draggingNode, dropNode, type) {
   return !(type === "inner" && dropNode.data.isDir === false);
 }
 
-function innerSort(value: PatientArchive[], parentId) {
+function handleSort(value: PatientArchive[], parentId) {
   const tmp = XEUtils.map(value, (item, index) => {
     item.parentId = parentId;
 
@@ -43,8 +44,7 @@ function innerSort(value: PatientArchive[], parentId) {
   archiveApi
     .sort({
       archives: tmp,
-      patNo: root.store.patInfo.inpatientNo,
-      times: root.store.patInfo.admissTimes,
+      ...root.mutation.getPatNoAndTimes(),
     })
     .then(res => {
       xcMessage.success("排序成功。");
@@ -55,11 +55,11 @@ async function nodeDrop(currentNode: any, dropNode: any, type, event) {
   await nextTick();
 
   if (type === "inner") {
-    innerSort(dropNode.data.children, dropNode.data.id);
+    handleSort(dropNode.data.children, dropNode.data.id);
   } else {
     const isarr = XEUtils.isArray(dropNode.parent.data);
 
-    innerSort(
+    handleSort(
       isarr ? dropNode.parent.data : dropNode.parent.data.children,
       isarr ? null : dropNode.parent.data.id
     );

+ 43 - 0
src/views/archive/ArchiveRun.vue

@@ -0,0 +1,43 @@
+<script setup lang="ts">
+import * as archiveApi from "@/api/archive/archive-api";
+import { BizException, ExceptionEnum } from "@/utils/BizException";
+
+const data = ref([]);
+
+const formData = reactive({
+  passTaskName: [],
+  forceStart: false,
+});
+
+onMounted(async () => {
+  data.value = await archiveApi.getTaskNameList();
+});
+
+defineExpose({
+  confirm: () => {
+    if (formData.passTaskName.length === data.value.length) {
+      BizException(ExceptionEnum.MESSAGE_ERROR, "不能全部跳过");
+    }
+    return formData;
+  },
+});
+</script>
+
+<template>
+  <el-form label-position="top">
+    <el-form-item label="跳过任务">
+      <el-checkbox-group v-model="formData.passTaskName">
+        <el-checkbox v-for="item in data" :value="item" :label="item" />
+      </el-checkbox-group>
+    </el-form-item>
+    <el-form-item label="强制启动">
+      <el-switch
+        v-model="formData.forceStart"
+        active-text="是"
+        inactive-text="否"
+      />
+    </el-form-item>
+  </el-form>
+</template>
+
+<style lang="scss"></style>

+ 9 - 12
src/views/archive/ArchiveUpload.vue

@@ -1,5 +1,4 @@
 <script setup lang="ts">
-import CyDialogContainer from "@/components/cy/CyDialog/CyDialogContainer.vue";
 import { UploadFilled } from "@element-plus/icons-vue";
 import { UploadFile, UploadFiles } from "element-plus";
 
@@ -46,17 +45,15 @@ const bindUpload = {
 </script>
 
 <template>
-  <CyDialogContainer @confirm="confirm">
-    <el-upload class="archive_upload" drag multiple v-bind="bindUpload">
-      <el-icon class="el-icon--upload">
-        <upload-filled />
-      </el-icon>
-      <div class="el-upload__text">将文件拖放到此处或 <em>点击上传</em></div>
-      <template #tip>
-        <div class="el-upload__tip">只能上传pdf文件,可多选</div>
-      </template>
-    </el-upload>
-  </CyDialogContainer>
+  <el-upload class="archive_upload" drag multiple v-bind="bindUpload">
+    <el-icon class="el-icon--upload">
+      <upload-filled />
+    </el-icon>
+    <div class="el-upload__text">将文件拖放到此处或 <em>点击上传</em></div>
+    <template #tip>
+      <div class="el-upload__tip">只能上传pdf文件,可多选</div>
+    </template>
+  </el-upload>
 </template>
 
 <style lang="scss">

+ 14 - 46
src/views/archive/index.tsx

@@ -1,17 +1,14 @@
 import type { InjectionKey, ShallowRef } from "vue";
 import { getPatientAll } from "@/api/inpatient/patient";
 import * as archiveApi from "@/api/archive/archive-api";
-import {
-  getPatientArchives,
-  PatientArchive,
-  submitTask,
-} from "@/api/archive/archive-api";
+import { getPatientArchives, PatientArchive } from "@/api/archive/archive-api";
 import XEUtils from "xe-utils";
 import { useWebSocket } from "@vueuse/core";
 import { useUserStore } from "@/pinia/user-store";
 import { useDialog } from "@/components/cy/CyDialog/index";
 import ArchiveUpload from "./ArchiveUpload.vue";
 import ArchiveAllLog from "@/views/archive/ArchiveAllLog.vue";
+import ArchiveRun from "@/views/archive/ArchiveRun.vue";
 import { ElButton, ElNotification } from "element-plus";
 
 type PatInfo = {
@@ -19,6 +16,7 @@ type PatInfo = {
   admissTimes: number;
   admissDate: string;
   disDate: string;
+  name: string;
 };
 
 type Socket = {
@@ -67,6 +65,7 @@ export const useArchive = () => {
     footerRef: null as ShallowRef<{ scroll: (val: boolean) => void }>,
     mainIframe: null as HTMLIFrameElement,
     mainTabsValue: "pdf",
+    currentNode: {} as PatientArchive,
   });
 
   function notification(message) {
@@ -110,6 +109,7 @@ export const useArchive = () => {
       mutation.logScroll(false);
     },
     change: data => {
+      data = JSON.parse(data);
       if (useUserStore().userInfo.code !== data.code) {
         notification(data.message);
       }
@@ -134,45 +134,17 @@ export const useArchive = () => {
       store.patInfo = res as any;
       this.getData();
     },
-    setPdfUrl(url: string) {
-      store.mainIframe?.contentWindow?.scrollTo(0, 0);
-      store.pdfUrl = "/thyyemrpdfserver" + url;
+    setPdfUrl(node: PatientArchive) {
+      store.currentNode = node;
+      store.pdfUrl = "/thyyemrpdfserver" + node.path;
     },
-    async sort() {
-      function forEach(
-        data: PatientArchive[],
-        fatherLevel: PatientArchive | null = null
-      ) {
-        data.forEach((item, index) => {
-          if (fatherLevel) {
-            item.parentId = fatherLevel.id;
-          } else {
-            item.parentId = null;
-          }
-
-          item.sort = index;
-          if (item.children !== null && item.children.length > 0) {
-            forEach(item.children, item);
-          }
-        });
-      }
-
-      forEach(store.treeList);
-
-      const tmp = {
-        patNo: store.patInfo.inpatientNo,
-        times: store.patInfo.admissTimes,
-        archives: mutation.toTreeArray(),
-      };
-      await archiveApi.sort(tmp);
-    },
-    toTreeArray(): PatientArchive[] {
-      return XEUtils.toTreeArray(XEUtils.cloneDeep(store.treeList), {
-        clear: true,
+    async archiveTask() {
+      const data = await useDialog(ArchiveRun, {
+        dialogProps: { title: "启动参数" },
       });
-    },
-    archiveTask() {
-      submitTask([{ patNo: store.patNo, times: store.times }]);
+      await archiveApi.submitTask([
+        { patNo: store.patNo, times: store.times, ...data },
+      ]);
     },
     clearLog() {
       store.logMessage = [];
@@ -185,11 +157,7 @@ export const useArchive = () => {
       await useDialog(ArchiveUpload, {
         dialogProps: {
           title: "上传文件",
-          closeOnClickModal: false,
-          showClose: false,
-          closeOnPressEscape: false,
         },
-        showCancel: false,
         params: {
           patNo: store.patInfo.inpatientNo,
           times: store.patInfo.admissTimes,

+ 3 - 1
src/views/archive/index.vue

@@ -1,5 +1,5 @@
 <script setup lang="tsx">
-import { useArchive, useArchiveKey } from "@/views/archive/index.tsx";
+import { useArchive, useArchiveKey } from "@/views/archive/index";
 import ArchiveAside from "./ArchiveAside.vue";
 import router from "@/router";
 import XEUtils from "xe-utils";
@@ -26,6 +26,8 @@ watch(
 <template>
   <div class="layout_container">
     <header class="archive_header">
+      姓名:{{ root.store.patInfo.name }}
+      <el-divider direction="vertical" />
       <el-button @click="root.mutation.archiveTask" type="primary" icon="Files"
         >生成pdf
       </el-button>

+ 53 - 26
src/views/view/patient360/hospComp/ViewEmr.vue

@@ -1,47 +1,74 @@
 <template>
   <div class="layout_display_flex">
-    <div>
-      <vxe-table
-          :data="emrData"
-          height="100%"
-          style="width: 100%"
-          @cell-click="rowClick"
+    <div style="width: 400px">
+      <el-tree
+        :data="emrData"
+        :props="{ label: 'name', children: 'children' }"
+        default-expand-all
+        @node-click="nodeClick"
       >
-        <VxeColumn field="emrName" title="名称" width="220px"/>
-      </vxe-table>
+        <template #default="{ node, data }">
+          <el-icon v-if="data.submit">
+            <Lock />
+          </el-icon>
+          <component :is="isItAFolder(data)" />
+          <span :title="fileName(data)">{{ fileName(data) }}</span>
+        </template>
+      </el-tree>
     </div>
     <div style="flex: 1">
-      <div ref="divRef" style="height: 100%;width: 100%"></div>
+      <div ref="divRef" style="height: 100%; width: 100%"></div>
     </div>
   </div>
 </template>
 
 <script setup lang="ts">
-import {emrData} from "../src/hosp";
-import {useEmrInit} from "@/utils/emr/emr-init-v2";
+import { emrData } from "../src/hosp";
+import { useEmrInit } from "@/utils/emr/emr-init-v2";
+import { Document, Folder, Lock } from "@element-plus/icons-vue";
+import { ElIcon } from "element-plus";
+import { stringIsBlank } from "@/utils/blank-utils";
 
-const divRef = ref()
+const divRef = ref();
 
 let editor = null;
-let loadDocument = null
+let loadDocument = null;
 
-function rowClick({row}) {
+const isItAFolder = (data: any) => {
+  return h(ElIcon, null, {
+    default: () => {
+      if (data.type === "category") {
+        return h(Document);
+      } else {
+        return h(Folder);
+      }
+    },
+  });
+};
 
-  loadDocument({documentId: row.emrDocumentId}).then(res => {
-    editor?.setDocument(res, true);
-    editor?.setEditorMode('readonly')
-  })
+const nullToEmpty = val => {
+  return stringIsBlank(val) ? "" : " \\ " + val;
+};
+
+const fileName = val => {
+  return val.name + nullToEmpty(val.createName) + nullToEmpty(val.createDate);
+};
+
+function nodeClick(row) {
+  if (row.type === "category") {
+    loadDocument({ documentId: row.emrDocumentId }).then(res => {
+      editor?.setDocument(res, true);
+      editor?.setEditorMode("readonly");
+    });
+  }
 }
 
 onMounted(() => {
   useEmrInit(divRef.value).then(res => {
-    editor = res.editor
-    loadDocument = res.loadDocument
-  })
-})
-
+    editor = res.editor;
+    loadDocument = res.loadDocument;
+  });
+});
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 221 - 215
src/views/view/patient360/src/hosp.tsx

@@ -1,282 +1,288 @@
-import {MedicalTrack} from "@/views/view/patient360/src/index";
-import requestV2, {AxiosRequestConfigV2} from "@/utils/request-v2";
-import {Ref, ref, reactive, computed} from 'vue'
-import {selectBriefPatInfo, selectChargeList} from "@/api/inpatient/charge-list";
-import {elDateRangeAddTime} from "@/utils/moment-utils";
+import { MedicalTrack } from "@/views/view/patient360/src/index";
+import requestV2, { AxiosRequestConfigV2 } from "@/utils/request-v2";
+import { computed, reactive, Ref, ref } from "vue";
+import {
+  selectBriefPatInfo,
+  selectChargeList,
+} from "@/api/inpatient/charge-list";
+import { elDateRangeAddTime } from "@/utils/moment-utils";
 import CyDialog from "@/components/cy/dialog/src/CyDialog.vue";
 import OrderTable from "@/components/order-table/OrderTable.vue";
 import setDialogToJs from "@/components/js-dialog-comp/useDialogToJs";
 import OrderFeeTable from "@/components/order-table/OrderFeeTable.vue";
 
 function request(options: AxiosRequestConfigV2) {
-    return requestV2({...options, showLoading: false})
+  return requestV2({ ...options, showLoading: false });
 }
 
-export const yzData = ref([])
-export const emrData = ref([])
-export const jySrc = ref('http://172.16.32.178/apps/elims/#/query/report?mode=lis&rightId=1')
-export const jcSrc = ref('http://172.16.32.122:8099/index.htm')
+export const yzData = ref([]);
+export const emrData = ref([]);
+export const jySrc = ref(
+  "http://172.16.32.178/apps/elims/#/query/report?mode=lis&rightId=1"
+);
+export const jcSrc = ref("http://172.16.32.122:8099/index.htm");
 
 interface MedicalTrackHosp extends MedicalTrack {
-    patNo: string;
-    times: number
+  patNo: string;
+  times: number;
 }
 
 export const patInfo = ref<MedicalTrackHosp>({
-    admissDate: "",
-    date: "",
-    deptName: "",
-    disDate: "",
-    outOrHosp: 0,
-    patNo: "",
-    times: 0,
-    uid: ""
-})
+  admissDate: "",
+  date: "",
+  deptName: "",
+  disDate: "",
+  outOrHosp: 0,
+  patNo: "",
+  times: 0,
+  uid: "",
+});
 export const feeQuery = reactive({
-    chargeCode: '',
-    dateRange: [],
-    dateDefault: null
-})
+  chargeCode: "",
+  dateRange: [],
+  dateDefault: null,
+});
 
 export const orderQuery = reactive({
-    dateRange: [],
-})
+  dateRange: [],
+});
 
 interface PatInfo360Data {
-    sheetData: any;
-    yzTemperatureData: any[];
-    yzTemperatureMap: any;
+  sheetData: any;
+  yzTemperatureData: any[];
+  yzTemperatureMap: any;
 
-    // 会诊
-    consultationData: any[]
-    briefPatInfo: any,
-    sumsMap: any,
-    chargeListMap: any,
-    zyFeeDetail: any[]
-    size: {
-        height: number,
-        width: number,
-    }
+  // 会诊
+  consultationData: any[];
+  briefPatInfo: any;
+  sumsMap: any;
+  chargeListMap: any;
+  zyFeeDetail: any[];
+  size: {
+    height: number;
+    width: number;
+  };
 }
 
 export const patInfo360Data: PatInfo360Data = reactive({
-    sheetData: {},
-    yzTemperatureData: [],
-    yzTemperatureMap: {},
-    consultationData: [],
-    briefPatInfo: {},
-    sumsMap: {},
-    chargeListMap: {},
-    zyFeeDetail: [],
-    size: {
-        height: 0,
-        width: 0,
-    }
-})
+  sheetData: {},
+  yzTemperatureData: [],
+  yzTemperatureMap: {},
+  consultationData: [],
+  briefPatInfo: {},
+  sumsMap: {},
+  chargeListMap: {},
+  zyFeeDetail: [],
+  size: {
+    height: 0,
+    width: 0,
+  },
+});
 
-
-export function patInfo360Computed(name: keyof PatInfo360Data, data: Ref<any>, isPatInfo360: boolean) {
-    return computed({
-        get() {
-            if (isPatInfo360) {
-                return patInfo360Data[name]
-            }
-            return data.value
-        },
-        set(val) {
-            if (isPatInfo360) {
-                patInfo360Data[name] = val
-            } else {
-                data.value = val
-            }
-        },
-    })
+export function patInfo360Computed(
+  name: keyof PatInfo360Data,
+  data: Ref<any>,
+  isPatInfo360: boolean
+) {
+  return computed({
+    get() {
+      if (isPatInfo360) {
+        return patInfo360Data[name];
+      }
+      return data.value;
+    },
+    set(val) {
+      if (isPatInfo360) {
+        patInfo360Data[name] = val;
+      } else {
+        data.value = val;
+      }
+    },
+  });
 }
 
-
 function getSheetInfo() {
-    request({
-        method: 'post',
-        url: '/patient360/hosp/getSheetInfo',
-        data: {
-            bah: patInfo.value.patNo,
-            times: patInfo.value.times,
-            inOutFlag: patInfo.value.inTheHospital
-        }
-    }).then((res) => {
-        patInfo360Data.sheetData = res
-    })
+  request({
+    method: "post",
+    url: "/patient360/hosp/getSheetInfo",
+    data: {
+      bah: patInfo.value.patNo,
+      times: patInfo.value.times,
+      inOutFlag: patInfo.value.inTheHospital,
+    },
+  }).then(res => {
+    patInfo360Data.sheetData = res;
+  });
 }
 
 export async function getYzTemperatureData(start: string, end: string) {
-    const param = {
-        startTime: start ?? patInfo.value.admissDate,
-        endTime: end ?? patInfo.value.disDate,
-        patNo: patInfo.value.patNo,
-        times: patInfo.value.times
-    }
-    await get360YzTemperature(param).catch(() => {
-        return {list: [], map: {}}
-    }).then(res => {
-        patInfo360Data.yzTemperatureData = res.list
-        patInfo360Data.yzTemperatureMap = res.map
+  const param = {
+    startTime: start ?? patInfo.value.admissDate,
+    endTime: end ?? patInfo.value.disDate,
+    patNo: patInfo.value.patNo,
+    times: patInfo.value.times,
+  };
+  await get360YzTemperature(param)
+    .catch(() => {
+      return { list: [], map: {} };
     })
+    .then(res => {
+      patInfo360Data.yzTemperatureData = res.list;
+      patInfo360Data.yzTemperatureMap = res.map;
+    });
 }
 
 export function getYz() {
-    const {start, end} = elDateRangeAddTime(orderQuery.dateRange)
-    request({
-        method: 'post',
-        url: '/patient360/hosp/getYz',
-        data: {
-            startTime: start,
-            endTime: end,
-            ...patInfo.value
-        }
-    }).then((res) => {
-        yzData.value = res
-    })
+  const { start, end } = elDateRangeAddTime(orderQuery.dateRange);
+  request({
+    method: "post",
+    url: "/patient360/hosp/getYz",
+    data: {
+      startTime: start,
+      endTime: end,
+      ...patInfo.value,
+    },
+  }).then(res => {
+    yzData.value = res;
+  });
 }
 
 export function get360YzTemperature(data: any) {
-    return request({
-        method: 'post',
-        url: '/patient360/hosp/getYzTemperature',
-        data: data
-    })
+  return request({
+    method: "post",
+    url: "/patient360/hosp/getYzTemperature",
+    data: data,
+  });
 }
 
 function getEmrData() {
-    request({
-        method: 'POST',
-        url: '/patient360/hosp/electronicMedicalRecords',
-        data: {
-            patNo: patInfo.value.patNo,
-            times: patInfo.value.times
-        }
-    }).then(res => {
-        emrData.value = res
-    })
+  request({
+    method: "POST",
+    url: "/patient360/hosp/electronicMedicalRecords",
+    data: {
+      patNo: patInfo.value.patNo,
+      times: patInfo.value.times,
+    },
+  }).then(res => {
+    emrData.value = res;
+  });
 }
 
 function getHzInfo() {
-    request({
-        method: 'get',
-        url: '/patient360/hosp/hzInfo',
-        params: {inpatientNo: patInfo.value.patNo, admissTimes: patInfo.value.times}
-    }).then(res => {
-        patInfo360Data.consultationData = res
-    })
+  request({
+    method: "get",
+    url: "/patient360/hosp/hzInfo",
+    params: {
+      inpatientNo: patInfo.value.patNo,
+      admissTimes: patInfo.value.times,
+    },
+  }).then(res => {
+    patInfo360Data.consultationData = res;
+  });
 }
 
 export function getHzDetails(params) {
-    return request({
-        method: 'get',
-        url: '/patient360/hosp/hzDetails',
-        params: params
-    })
+  return request({
+    method: "get",
+    url: "/patient360/hosp/hzDetails",
+    params: params,
+  });
 }
 
 async function getFyqd() {
-    const data = {
-        patNo: patInfo.value.patNo,
-        times: patInfo.value.times,
-    }
-    await selectBriefPatInfo(data).then(res => {
-        patInfo360Data.briefPatInfo = res
-    })
-    await selectChargeList(data).then(res => {
-        patInfo360Data.chargeListMap = res.chargeList
-        patInfo360Data.sumsMap = res.sumsMap
-    })
+  const data = {
+    patNo: patInfo.value.patNo,
+    times: patInfo.value.times,
+  };
+  await selectBriefPatInfo(data).then(res => {
+    patInfo360Data.briefPatInfo = res;
+  });
+  await selectChargeList(data).then(res => {
+    patInfo360Data.chargeListMap = res.chargeList;
+    patInfo360Data.sumsMap = res.sumsMap;
+  });
 }
 
 export function getZyFeeDetail(clear: boolean = false) {
-    if (clear) {
-        feeQuery.dateRange = [];
-        feeQuery.chargeCode = '';
-        feeQuery.dateDefault = [patInfo.value.admissDate, patInfo.value.disDate ?? new Date()]
-    }
-    request({
-        method: 'post',
-        url: '/patient360/hosp/getZyFeeDetail',
-        data: {
-            patNo: patInfo.value.patNo,
-            times: patInfo.value.times,
-            ...elDateRangeAddTime(feeQuery.dateRange),
-            chargeCodeMx: feeQuery.chargeCode
-        }
-    }).then(res => {
-        patInfo360Data.zyFeeDetail = res
-    });
+  if (clear) {
+    feeQuery.dateRange = [];
+    feeQuery.chargeCode = "";
+    feeQuery.dateDefault = [
+      patInfo.value.admissDate,
+      patInfo.value.disDate ?? new Date(),
+    ];
+  }
+  request({
+    method: "post",
+    url: "/patient360/hosp/getZyFeeDetail",
+    data: {
+      patNo: patInfo.value.patNo,
+      times: patInfo.value.times,
+      ...elDateRangeAddTime(feeQuery.dateRange),
+      chargeCodeMx: feeQuery.chargeCode,
+    },
+  }).then(res => {
+    patInfo360Data.zyFeeDetail = res;
+  });
 }
 
-
 const 打开费用关联的医嘱明细 = {
-    orderNo: '',
-    data: {},
-}
+  orderNo: "",
+  data: {},
+};
 
 interface OrderDetailByOrderNo {
-    yzList: any[];
-    feeList: any[]
+  yzList: any[];
+  feeList: any[];
 }
 
 const open = (data: OrderDetailByOrderNo) => (
-    <CyDialog title="医嘱费用详情"
-              full-screen
-              body-padding="0"
-              ignore-error>
-        {{
-            default({height}: { height: number }) {
-                return [
-                    <OrderTable pat-info360={true}
-                                height={height / 2}
-                                data={data.yzList}/>,
-                    <OrderFeeTable
-                        data={data.feeList}
-                        height={height / 2}
-                    />
-                ]
-            }
-        }}
-
-    </CyDialog>
-)
+  <CyDialog title="医嘱费用详情" full-screen body-padding="0" ignore-error>
+    {{
+      default({ height }: { height: number }) {
+        return [
+          <OrderTable
+            pat-info360={true}
+            height={height / 2}
+            data={data.yzList}
+          />,
+          <OrderFeeTable data={data.feeList} height={height / 2} />,
+        ];
+      },
+    }}
+  </CyDialog>
+);
 
 export async function getOrderDetailByOrderNo(orderNo: string) {
-    let data = {}
-    if (orderNo === 打开费用关联的医嘱明细.orderNo) {
-        data = 打开费用关联的医嘱明细.data
-    } else {
-        await request<OrderDetailByOrderNo>({
-            method: 'get',
-            url: '/patient360/hosp/getOrderDetailByOrderNo',
-            params: {orderNo: orderNo}
-        }).then(res => {
-            data = res
-        })
-    }
-
-    打开费用关联的医嘱明细.orderNo = orderNo
-    打开费用关联的医嘱明细.data = data
-    setDialogToJs(open(data), {}).then(res => {
+  let data = {};
+  if (orderNo === 打开费用关联的医嘱明细.orderNo) {
+    data = 打开费用关联的医嘱明细.data;
+  } else {
+    await request<OrderDetailByOrderNo>({
+      method: "get",
+      url: "/patient360/hosp/getOrderDetailByOrderNo",
+      params: { orderNo: orderNo },
+    }).then(res => {
+      data = res;
+    });
+  }
 
-    })
+  打开费用关联的医嘱明细.orderNo = orderNo;
+  打开费用关联的医嘱明细.data = data;
+  setDialogToJs(open(data), {}).then(res => {});
 }
 
-
 function hosp(medicalTrack: MedicalTrack) {
-    patInfo.value = medicalTrack
-    getYz()
-    getEmrData()
-    getSheetInfo()
-    getYzTemperatureData()
-    getHzInfo()
-    getFyqd();
-    getZyFeeDetail(true)
-    jcSrc.value = `http://172.16.32.122:8099/index.htm?INHOSPITALNUM=${patInfo.value.patNo}`
-    // jySrc.value =
+  patInfo.value = medicalTrack;
+  getYz();
+  getEmrData();
+  getSheetInfo();
+  getYzTemperatureData();
+  getHzInfo();
+  getFyqd();
+  getZyFeeDetail(true);
+  jcSrc.value = `http://172.16.32.122:8099/index.htm?INHOSPITALNUM=${patInfo.value.patNo}`;
+  // jySrc.value =
 }
 
-export default hosp
+export default hosp;