xiaochan il y a 2 ans
Parent
commit
c48df7fc70

+ 2 - 10
src/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru.ts

@@ -66,16 +66,6 @@ export function confirmOrders(data) {
     })
 }
 
-
-export function getParentOrders(patNo, times) {
-    return requestV2({
-        url: url + '/getParentOrders',
-        method: 'get',
-        params: {patNo, times},
-    })
-}
-
-
 export function huoQuHuanZheXinXi(inpatientNo) {
     return requestV2({
         url: url + '/huoQuHuanZheXinXi',
@@ -161,6 +151,7 @@ export function huoQuFeiYongXinXi(queryCode: string) {
 export function getFrequency() {
     return requestV2({
         url: '/yiZhuLuRu/getFrequency',
+        showLoading: false,
         method: 'get',
     })
 }
@@ -168,6 +159,7 @@ export function getFrequency() {
 export function getSupplyType() {
     return requestV2({
         url: '/yiZhuLuRu/getSupplyType',
+        showLoading: false,
         method: 'get',
     })
 }

+ 0 - 19
src/utils/common.js

@@ -1,19 +0,0 @@
-/**
- * @description 复制
- * @param {*} id DOM ID
- */
-import {ElMessage} from "element-plus";
-
-export function copyDomText(id) {
-    const node = document.getElementById(id)
-    if (node) {
-        let createRange = document.createRange()
-        createRange.selectNodeContents(document.getElementById(id))
-        const selection = document.getSelection()
-        selection.removeAllRanges()
-        selection.addRange(createRange)
-        document.execCommand('Copy')
-        selection.removeAllRanges()
-        ElMessage.success("已复制模板名称。")
-    }
-}

+ 2 - 0
src/utils/mitt.ts

@@ -28,3 +28,5 @@ class EventBus<T extends Record<string, (...args: any[]) => any>> {
 }
 
 export default EventBus;
+
+

+ 4 - 4
src/utils/public.ts

@@ -66,14 +66,14 @@ export const compareVersion = (v1: string, v2: string): number => {
 }
 
 export const chineseEncrypt = {
-    encrypt: (val) => {
-        if (XEUtils.isEmpty(val)) {
+    encrypt: (val: string): string => {
+        if (!val) {
             return "";
         }
         return encodeURI(JSON.stringify(val))
     },
-    decrypt: (val) => {
-        if (XEUtils.isEmpty(val)) {
+    decrypt: (val: string): string | any => {
+        if (!val) {
             return "";
         }
         return JSON.parse(decodeURI(val))

+ 2 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init.ts

@@ -34,7 +34,7 @@ export const emrConfig = ref({
 
 
 // 默认查询的是全部的患者  state == 1 自己科室的患者
-export function getEmrUrl(patNo, times, state = 3) {
+export function getEmrUrl(patNo: string, times: number, state: number = 3): string {
     let query = {
         patNo,
         times,
@@ -52,7 +52,7 @@ export function getEmrUrl(patNo, times, state = 3) {
  * @param state
  * @returns {string}
  */
-export function getInEmrUrl(patNo, times, state = 2) {
+export function getInEmrUrl(patNo: string, times: number, state: number = 2) {
     let query = {
         patNo, times, state: 2
     }

+ 40 - 4
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.ts

@@ -6,7 +6,7 @@ import {nextTick, Ref, ref} from "vue";
 import {getServerDateApi} from "../../../../api/public-api";
 import {getFormatDatetime} from "../../../../utils/date";
 import {isDev} from "../../../../utils/public";
-import {huoQuYiZhuShuJu} from "../../../../api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
+import {getFrequency, getSupplyType, huoQuYiZhuShuJu} from "../../../../api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
 import EventBus from "../../../../utils/mitt";
 import XEUtils from 'xe-utils'
 import {computed} from 'vue'
@@ -58,6 +58,13 @@ export const geiYaoFangShiData = ref([])
 // 频率
 export const yaoPinPingLvData = ref([])
 
+getSupplyType().then(res => {
+    geiYaoFangShiData.value = res
+})
+getFrequency().then(res => {
+    yaoPinPingLvData.value = res
+})
+
 export function youWuXuanZheHuanZhe() {
     if (stringIsBlank(huanZheXinXi.value.inpatientNo)) {
         ElMessage({
@@ -778,10 +785,10 @@ export const clearAssociate = () => {
         actOrderNo: null,
         associatedGroup: []
     }
-    for (let i = 0, len = yzData.value.length; i < len; i++) {
-        let item = yzData.value[i]
+
+    XEUtils.lastEach(yzData.value, (item: YzType) => {
         item.associationFlag = false
-    }
+    })
 }
 
 export const drugManual = ref({
@@ -853,6 +860,35 @@ export interface YzMitt {
     queryFeeByOrderNo: (data: YzType) => void
 }
 
+// type YzMitt = {
+//     openDoctorAuthoriztion: (drugCode: string) => Promise<{
+//         code: string
+//     }>,
+//     jySave: () => void,
+//     jySaveTemplate: () => void
+//     upperDoctorSetting: (data: any) => void
+//     tableScroll: (val: number) => void
+//     clearSelected: () => void
+//     scrollEndAndTwinkle: (val: any) => Promise<void>,
+//     setOrderNoTwinkle: (val: number) => Promise<void>,
+//     getSelectedData: () => YzType[],
+//     toAddAnOrder: () => Promise<boolean>,
+//     duplicateAndPaste: () => void
+//     openTheOrderPopUpWindow: () => void,
+//     emptyTheWorkbench: () => void
+//     copy: (actOrderNo: number, frequCode: string) => void,
+//     paste: () => void
+//     allowReplication: () => boolean,
+//     deleteAnOrderByOrderNo: (data: YzType, clearOrNot: boolean) => void
+//     queryYz: (tableScrollTop?: boolean) => Promise<any>,
+//     confirmMedicalAdvice: () => void,
+//     allergen: () => void,
+//     clickOnTheOrderTemplate: () => void,
+//     clickAssociate: (data: YzType) => Promise<void>
+//     rowClick: (data: YzType) => void
+//     queryFeeByOrderNo: (data: YzType) => void
+// }
+
 export const yzMitt = new EventBus<YzMitt>();
 
 export const yzSize = ref({

+ 0 - 6
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -373,12 +373,6 @@ onMounted(async () => {
   yzMitt.on('clickAssociate', clickAssociate)
   yzMitt.on('rowClick', rowClick)
 
-  getSupplyType().then(res => {
-    geiYaoFangShiData.value = res
-  })
-  getFrequency().then(res => {
-    yaoPinPingLvData.value = res
-  })
   await sleep(200)
   zkList.value = await getTheTransferList()
 })