xiaochan 1 рік тому
батько
коміт
d55a6f0b4e

+ 8 - 6
src/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru.ts

@@ -75,20 +75,22 @@ export function huoQuYiZhuShuJu(data) {
 }
 
 
-let huoQuXiangMuSignal = null;
-
 export function huoQuXiangMu(code: string, groupNo: string) {
-    huoQuXiangMuSignal && huoQuXiangMuSignal.abort();
-    huoQuXiangMuSignal = new AbortController();
-
     return requestV2({
         url: url + '/huoQuXiangMu',
         method: 'get',
-        signal: huoQuXiangMuSignal.signal,
         params: {code, groupNo},
     })
 }
 
+export function getItemInstructions(code: string) {
+    return requestV2<any[]>({
+        url: url + '/getItemInstructions',
+        method: 'get',
+        params: {code},
+    })
+}
+
 export interface YaoPingJiLiang {
     code: string
     name: string

+ 1 - 5
src/components/cy/tabs/src/CyTabPane.vue

@@ -42,7 +42,7 @@ const pane = reactive({
   props,
   paneName,
   active,
-  setVif(val) {
+  setVif(val: boolean) {
     vif.value = val
   },
   vif: vif
@@ -59,7 +59,3 @@ onUnmounted(() => {
   tabsRoot?.unregisterPane(pane.uid)
 })
 </script>
-
-<style scoped>
-
-</style>

+ 2 - 4
src/components/cy/tabs/src/index.ts

@@ -1,7 +1,6 @@
 import type {
     ComputedRef,
     InjectionKey,
-    Ref,
     Slots,
     UnwrapRef,
     ExtractPropTypes,
@@ -9,7 +8,7 @@ import type {
 import TabsProps, {TabPaneProps} from "@/components/cy/tabs/src/TabsProps";
 
 export type TabsPaneContext = UnwrapRef<{
-    uid: number
+    uid: number | string
     slots: Slots
     props: ExtractPropTypes<typeof TabPaneProps>
     paneName: ComputedRef<string | number | undefined>
@@ -20,11 +19,10 @@ export type TabsPaneContext = UnwrapRef<{
 interface TabsRootContext {
     props: ExtractPropTypes<typeof TabsProps>,
     registerPane: (pane: TabsPaneContext) => void
-    unregisterPane: (uid: string) => void;
+    unregisterPane: (uid: string | number) => void;
     childList: any
 }
 
-
 export const tabsRootContextKey: InjectionKey<TabsRootContext> =
     Symbol('cyTabsRootContextKey')
 

+ 29 - 0
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/ItemInstructions.vue

@@ -0,0 +1,29 @@
+<script setup lang="ts">
+import CyDialog from "@/components/cy/dialog/src/CyDialog.vue";
+import {getItemInstructions} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
+
+const props = defineProps<{
+  code: string
+}>()
+
+const data = ref<any[]>([])
+
+onMounted(() => {
+  getItemInstructions(props.code).then(res => {
+    data.value = res
+  })
+})
+
+</script>
+
+<template>
+  <CyDialog title="项目详情" ignore-error body-width="60%">
+    <el-table :data>
+      <template v-if="data.length > 0"
+                v-for="(value,key) in data[0]"
+      >
+        <el-table-column :prop="key" :label="key"/>
+      </template>
+    </el-table>
+  </CyDialog>
+</template>

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

@@ -18,6 +18,7 @@ import cyRefList from "@/utils/cyRefList";
 import {reportQueryCenterApiByGet} from "@/api/base-data/report-center";
 import {useSystemStore} from "@/pinia/system-store";
 import {TableMethods} from "vxe-table";
+import ItemInstructions from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/ItemInstructions.vue";
 
 export interface PatInfo {
     inpatientNo?: string | null
@@ -906,22 +907,26 @@ export let tableHeader = [
     {label: '药房', prop: 'groupName'},
 ]
 
+function 项目说明书(code: string) {
+    setDialogToJs(ItemInstructions, {code}).then(XEUtils.noop)
+}
 
 export let tableHeaderV2 = ref([
         {
             name: '说明书',
             width: '60',
             render: ({row}: { row: any }) => {
-                if (row.groupNo == '00') {
-                    return null
-                }
                 return h(ElButton,
                     {
                         text: true,
                         type: 'primary',
                         onClick: (e: Event) => {
                             e.stopPropagation();
-                            openDrugManual(row.orderCode, row.serial)
+                            if (row.groupNo == '00') {
+                                return 项目说明书(row.orderCode)
+                            } else {
+                                openDrugManual(row.orderCode, row.serial)
+                            }
                         }
                     },
                     () => '说明书')