Browse Source

检查申请可以写部位了

xiaochan 2 months ago
parent
commit
987300188b

+ 8 - 0
src/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing.ts

@@ -124,6 +124,14 @@ export function biaoBenApi(name) {
   });
 }
 
+export function buWeiShuJu(name) {
+  return requestV2({
+    url: url + "buWeiShuJu",
+    method: "get",
+    params: { name },
+  });
+}
+
 export function viewInspectionItemDetails(orderCode, isCheck) {
   return requestV2({
     url: url + "viewInspectionItemDetails",

+ 155 - 138
src/components/cy/combo-grid/src/CyComboGridProps.ts

@@ -1,142 +1,159 @@
-import {PropType} from 'vue'
+import { PropType } from "vue";
 
-declare type TableHeader =
-    {
-        code: string,
-        name: string,
-        title?: string,
-        field?: string,
-        width?: string | number | undefined,
-        render?: (value: { row: any, rowIndex: number }) => any
-    }
+declare type TableHeader = {
+  code: string;
+  name: string;
+  title?: string;
+  field?: string;
+  width?: string | number | undefined;
+  render?: (value: { row: any; rowIndex: number }) => any;
+};
 
 const CyComboGridProps = {
-    modelValue: {
-        type: [Object, String, Array, Number] as PropType<string | any[] | object>,
-    },
-    rowClick: {
-        type: Function as PropType<(row: any) => any>,
-    },
-    keyField: {
-        type: String,
-        default: 'value'
-    },
-    data: {
-        type: Array,
-    },
-    placement: {
-        type: String,
-        default: 'bottom-start'
-    },
-    teleported: {
-        type: Boolean,
-        default: true,
-    },
-    select: {
-        type: Boolean,
-        default: true,
-    },
-    effect: {
-        type: String as PropType<'light' | 'dark'>,
-        default: 'light'
-    },
-    tableHeader: {
-        type: Array as PropType<TableHeader[]>,
-        default: () => [
-            {code: 'value', name: '编码', width: '125px'},
-            {code: 'label', name: '名称', width: '135px'}
-        ],
-    },
-    remoteMethod: {
-        type: Function as PropType<(value: string) => null | Promise<any[] | unknown>>,
-    },
-    debounce: {
-        type: Number,
-        default: 300,
-    },
-    disabled: {
-        type: Boolean,
-        default: false,
-    },
-    clearable: {
-        type: Boolean,
-        default: false,
-    },
-    value: {
-        type: String
-    },
-    label: {
-        type: String
-    },
-    valueLabel: {
-        type: String
-    },
-    placeholder: {
-        type: String,
-        default: "可编码,拼音,五笔,名称搜索",
-    },
-    multiple: {
-        type: Boolean,
-        default: false,
-    },
-    collapseTags: {
-        type: Boolean,
-        default: false
-    },
-    maxCollapseTags: {
-        type: Number,
-        default: 1
-    },
-    sortable: {
-        type: Boolean,
-        default: false,
-    },
-    tableWidth: {
-        type: [String],
-        default: '100%'
-    },
-    rowHeight: {
-        type: Number,
-        default: 24
-    },
-    fallbackPlacements: {
-        type: Array as PropType<unknown | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end'>,
-        default: ['bottom-start', 'top-start', 'left', 'right']
-    },
-    rightTableValueWidth: {
-        type: [String],
-        default: '80'
-    },
-    rightTableLabelWidth: {
-        type: [String],
-        default: '120'
-    },
-    arrayAdditionallyFields: {
-        type: [Array],
-        default: null
-    },
-    prefabricationOptions: {
-        type: Array,
-        default: null
-    },
-    leftTable: {
-        type: Object as PropType<{ valueWidth: string | number, labelWidth: string | number }[]>,
-        default: {
-            valueWidth: '80',
-            labelWidth: '120'
-        }
-    },
-    showTableHeader: {
-        type: Boolean,
-        default: true
-    },
-    loading: {
-        type: Boolean,
-        default: false
-    },
-    localSearchKey: {
-        type: Array,
-    }
-}
+  modelValue: {
+    type: [Object, String, Array, Number] as PropType<string | any[] | object>,
+  },
+  rowClick: {
+    type: Function as PropType<(row: any) => any>,
+  },
+  keyField: {
+    type: String,
+    default: "value",
+  },
+  data: {
+    type: Array,
+  },
+  placement: {
+    type: String,
+    default: "bottom-start",
+  },
+  teleported: {
+    type: Boolean,
+    default: true,
+  },
+  select: {
+    type: Boolean,
+    default: true,
+  },
+  effect: {
+    type: String as PropType<"light" | "dark">,
+    default: "light",
+  },
+  tableHeader: {
+    type: Array as PropType<TableHeader[]>,
+    default: () => [
+      { code: "value", name: "编码", width: "125px" },
+      { code: "label", name: "名称", width: "135px" },
+    ],
+  },
+  remoteMethod: {
+    type: Function as PropType<
+      (value: string) => null | Promise<any[] | unknown>
+    >,
+  },
+  debounce: {
+    type: Number,
+    default: 300,
+  },
+  disabled: {
+    type: Boolean,
+    default: false,
+  },
+  clearable: {
+    type: Boolean,
+    default: false,
+  },
+  value: {
+    type: String,
+  },
+  label: {
+    type: String,
+  },
+  valueLabel: {
+    type: String,
+  },
+  placeholder: {
+    type: String,
+    default: "可编码,拼音,五笔,名称搜索",
+  },
+  multiple: {
+    type: Boolean,
+    default: false,
+  },
+  collapseTags: {
+    type: Boolean,
+    default: false,
+  },
+  maxCollapseTags: {
+    type: Number,
+    default: 1,
+  },
+  sortable: {
+    type: Boolean,
+    default: false,
+  },
+  tableWidth: {
+    type: [String],
+    default: "100%",
+  },
+  rowHeight: {
+    type: Number,
+    default: 24,
+  },
+  fallbackPlacements: {
+    type: Array as PropType<
+      | unknown
+      | "top"
+      | "top-start"
+      | "top-end"
+      | "bottom"
+      | "bottom-start"
+      | "bottom-end"
+      | "left"
+      | "left-start"
+      | "left-end"
+      | "right"
+      | "right-start"
+      | "right-end"
+    >,
+    default: ["bottom-start", "top-start", "left", "right"],
+  },
+  rightTableValueWidth: {
+    type: [String],
+    default: "80",
+  },
+  rightTableLabelWidth: {
+    type: [String],
+    default: "120",
+  },
+  arrayAdditionallyFields: {
+    type: [Array],
+    default: null,
+  },
+  prefabricationOptions: {
+    type: Array,
+    default: null,
+  },
+  leftTable: {
+    type: Object as PropType<
+      { valueWidth: string | number; labelWidth: string | number }[]
+    >,
+    default: {
+      valueWidth: "80",
+      labelWidth: "120",
+    },
+  },
+  showTableHeader: {
+    type: Boolean,
+    default: true,
+  },
+  loading: {
+    type: Boolean,
+    default: false,
+  },
+  localSearchKey: {
+    type: Array<string>,
+  },
+};
 
-export default CyComboGridProps
+export default CyComboGridProps;

+ 5 - 5
src/components/cy/combo-grid/src/index.ts

@@ -5,7 +5,7 @@ import {
   useFormItemInputId,
   useNamespace,
 } from "element-plus";
-import { useCompRef } from "@/utils/useCompRef";
+import { useCompRef, useVxeTableRef } from "@/utils/useCompRef";
 import XEUtils, {
   filter,
   isArray,
@@ -76,7 +76,7 @@ export default function UesComboGrid(props: CyComboGridOptionsV2, emits: any) {
   const inputRef = ref<HTMLInputElement | null>(null);
   const tooltipRef = useCompRef(ElTooltip);
   const expanded = ref(false);
-  const tableRef = ref<null>(null);
+  const tableRef = useVxeTableRef();
   const calculatorRef = ref<HTMLElement | null>(null);
   const selectionRef = ref<HTMLElement | null>(null);
   const collapseItemRef = ref<HTMLElement | null>(null);
@@ -544,9 +544,9 @@ export default function UesComboGrid(props: CyComboGridOptionsV2, emits: any) {
   };
 
   function columnsTableSortable() {
-    const el = (detailsTableRaf.value!["$el"] as HTMLDivElement).querySelector(
-      ".vxe-table--body tbody"
-    );
+    const el: HTMLElement = (
+      detailsTableRaf.value!["$el"] as HTMLDivElement
+    ).querySelector(".vxe-table--body tbody");
     const ops = {
       handle: ".vxe-body--row",
       onEnd: function ({

+ 5 - 0
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/aside/CheckApplicationHistory.vue

@@ -18,6 +18,11 @@
       prop="receiveFlagName"
       width="80"
     ></el-table-column>
+    <el-table-column
+      label="部位"
+      prop="inspectStuffName"
+      width="80"
+    ></el-table-column>
     <el-table-column label="时间" prop="startTime"></el-table-column>
     <el-table-column label="操作" width="120">
       <template #default="{ row, $index }">

+ 7 - 1
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/PrintCheckList.vue

@@ -4,6 +4,7 @@ import env from "@/utils/setting";
 import { cptSex } from "@/utils/computed";
 import JsBarcode from "jsbarcode";
 import { useVuePrint } from "@/utils/cy-use/useVuePrint";
+import { stringNotBlank } from "@/utils/blank-utils";
 
 const data = ref([]);
 
@@ -131,7 +132,12 @@ defineExpose({
             <td style="height: 40px; width: 40%">
               <img :src="tmpItem.qrCode" style="height: 100%; width: 100%" />
             </td>
-            <td>{{ tmpItem.itemName }}</td>
+            <td>
+              {{ tmpItem.itemName }}
+              <span v-if="stringNotBlank(tmpItem.inspectStuffName)"
+                >({{ tmpItem.inspectStuffName }})</span
+              >
+            </td>
           </tr>
         </tbody>
       </table>

+ 4 - 0
src/utils/cyRefList.ts

@@ -44,6 +44,10 @@ function cyRefList<T = any>(
 
   const listProxy = {
     push: function (...items: T[]) {
+      if (errMsg == null) {
+        sendListening(items).then(r => {});
+        return list.value.push(...items);
+      }
       const msgList: string[] = [];
       items.forEach((item: T) => {
         let key: string;

+ 1 - 1
src/utils/useCompRef.ts

@@ -18,7 +18,7 @@ export function useCompShallowRef<T extends abstract new (...args: any) => any>(
 }
 
 export function useVxeTableRef<T = any>() {
-  return ref<VxeTableInstance<T>>();
+  return shallowRef<VxeTableInstance<T>>();
 }
 
 export default useCompRef;

+ 1 - 0
src/utils/websocket.ts

@@ -28,6 +28,7 @@ export function sendAMessage(name, data) {
 export const socketErrDialog = ref(false);
 
 export function initWebSocket() {
+  closeWebSocket();
   const userStore = useUserStore().userInfo;
 
   const url = `${env.VITE_SOCKET_V2}/intergrationPlatform/${userStore.code}`;

+ 130 - 109
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JianChaJianYanTable.vue

@@ -1,213 +1,234 @@
 <script setup lang="ts">
 import {
   biaoBenApi,
+  buWeiShuJu,
   diagnosisInOurHospital,
 } from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
-import {computed} from "vue";
-import {useVModels} from "@vueuse/core";
+import { computed } from "vue";
+import { useVModels } from "@vueuse/core";
 import CyFlex from "@/components/cy/flex/src/CyFlex.vue";
 import SystemDeptSelect from "@/components/system/dept-select/SystemDeptSelect.vue";
 import CyComboGrid from "@/components/cy/combo-grid/src/CyComboGrid.vue";
-import {useUserStore} from "@/pinia/user-store";
+import { useUserStore } from "@/pinia/user-store";
 
 const props = defineProps({
   data: {
     type: Array,
-    default: []
+    default: [],
   },
   isCheck: {
     type: Boolean,
-    default: false
+    default: false,
   },
   publicData: {
     type: Object,
-    default: {}
-  }
-})
-
+    default: {},
+  },
+});
 
-const emits = defineEmits(['delClick', 'update:publicData'])
-const {data, isCheck, publicData} = useVModels(props, emits)
+const emits = defineEmits(["delClick", "update:publicData"]);
+const { data, isCheck, publicData } = useVModels(props, emits);
 
 const deleteInspectionCheck = (index, code) => {
-  emits('delClick', index)
-}
+  emits("delClick", index);
+};
 
-const PATHOLOGY = '038'
+const PATHOLOGY = "038";
 
 const needPublicData = computed(() => {
   if (isCheck.value) {
-    return true
+    return true;
   } else {
     for (let i = 0; i < data.value.length; i++) {
       let item = data.value[i];
       if (item.classes === PATHOLOGY) {
-        return true
+        return true;
       }
     }
   }
-})
+});
 
-const enterPadding = (val) => {
+const enterPadding = val => {
   data.value.forEach(item => {
     if (item.classes !== PATHOLOGY) {
-      item.reqComment = val
+      item.reqComment = val;
     }
-  })
-}
-
+  });
+};
 
-const userInfo = useUserStore().userInfo
+const userInfo = useUserStore().userInfo;
 
 const showStartTime = () => {
-  return userInfo.deptCode === '1160000' || userInfo.deptCode === '3100000'
-}
-
+  return userInfo.deptCode === "1160000" || userInfo.deptCode === "3100000";
+};
 </script>
 
 <template>
   <CyFlex content-size>
     <template #header>
-      <el-row :gutter="5"
-              v-show="needPublicData">
+      <el-row :gutter="5" v-show="needPublicData">
         <el-col :span="12">
           病史摘要:
-          <el-input v-model="publicData.reqComment"
-                    :rows="2" maxlength="125"
-                    show-word-limit
-                    type="textarea"/>
+          <el-input
+            v-model="publicData.reqComment"
+            :rows="2"
+            maxlength="125"
+            show-word-limit
+            type="textarea"
+          />
         </el-col>
 
         <el-col :span="12">
           体征信息:
-          <el-input v-model="publicData.reqTzComment"
-                    :rows="2" maxlength="125"
-                    show-word-limit
-                    type="textarea"/>
+          <el-input
+            v-model="publicData.reqTzComment"
+            :rows="2"
+            maxlength="125"
+            show-word-limit
+            type="textarea"
+          />
         </el-col>
 
         <el-col :span="12">
           相关辅检结果:
-          <el-input v-model="publicData.reqOtherResult"
-                    :rows="2"
-                    maxlength="125"
-                    show-word-limit
-                    type="textarea"/>
+          <el-input
+            v-model="publicData.reqOtherResult"
+            :rows="2"
+            maxlength="125"
+            show-word-limit
+            type="textarea"
+          />
         </el-col>
 
         <el-col :span="12">
           临床诊断:
-          <br>
-          <CyComboGrid v-model="publicData"
-                       value="diagCode"
-                       label="diagText"
-                       :remote-method="diagnosisInOurHospital"/>
+          <br />
+          <CyComboGrid
+            v-model="publicData"
+            value="diagCode"
+            label="diagText"
+            :remote-method="diagnosisInOurHospital"
+          />
         </el-col>
       </el-row>
     </template>
 
-    <template #default="{height}">
-      <el-table :data="data"
-                style="width: 100%"
-                :height="height">
+    <template #default="{ height }">
+      <el-table :data="data" style="width: 100%" :height="height">
         <el-table-column label="操作" fixed="left" width="60">
           <template #default="scope">
-            <el-button icon="Delete" type="danger"
-                       @click="deleteInspectionCheck(scope.$index, scope.row.orderCode)"></el-button>
+            <el-button
+              icon="Delete"
+              type="danger"
+              @click="deleteInspectionCheck(scope.$index, scope.row.orderCode)"
+            ></el-button>
           </template>
         </el-table-column>
-        <el-table-column label="医嘱时间" prop="startTime" width="180" v-if="showStartTime()">
+        <el-table-column
+          label="医嘱时间"
+          prop="startTime"
+          width="180"
+          v-if="showStartTime()"
+        >
           <template #default="scope">
             <el-date-picker
-                style="width: 150px;"
-                type="datetime"
-                v-model="scope.row.startTime"
-                value-format="YYYY-MM-DD HH:mm:ss"
+              style="width: 150px"
+              type="datetime"
+              v-model="scope.row.startTime"
+              value-format="YYYY-MM-DD HH:mm:ss"
             />
           </template>
         </el-table-column>
-        <el-table-column label="项目名称"
-                         width="100"
-                         prop="orderName"
-                         show-overflow-tooltip>
+        <el-table-column
+          label="项目名称"
+          width="100"
+          prop="orderName"
+          show-overflow-tooltip
+        >
         </el-table-column>
         <el-table-column label="执行科室" prop="execDeptName" width="100">
           <template #default="scope">
             <SystemDeptSelect
-                style="width: 100%"
-                v-model="scope.row"
-                value="execDept"
-                label="execDeptName"/>
+              style="width: 100%"
+              v-model="scope.row"
+              value="execDept"
+              label="execDeptName"
+            />
           </template>
         </el-table-column>
-        <el-table-column label="标本"
-                         v-if="!isCheck"
-                         prop="inspectStuffName" width="90">
+        <el-table-column
+          :label="isCheck ? '部位' : '标本'"
+          prop="inspectStuffName"
+          width="90"
+        >
           <template #default="scope">
             <CyComboGrid
-                style="width: 100%"
-                v-model="scope.row"
-                :remote-method="biaoBenApi"
-                value="inspectStuff"
-                label="inspectStuffName"/>
+              style="width: 100%"
+              v-model="scope.row"
+              :remote-method="isCheck ? buWeiShuJu : biaoBenApi"
+              value="inspectStuff"
+              label="inspectStuffName"
+            />
           </template>
         </el-table-column>
-        <el-table-column label="申请说明"
-                         width="220px"
-                         v-if="!isCheck">
+        <el-table-column label="申请说明" width="220px" v-if="!isCheck">
           <template #default="scope">
-            <el-input v-model="scope.row.reqComment"
-                      @keydown.enter.prevent="enterPadding(scope.row.reqComment)"
-                      :disabled="scope.row.classes === PATHOLOGY"
-                      maxlength="125"/>
+            <el-input
+              v-model="scope.row.reqComment"
+              @keydown.enter.prevent="enterPadding(scope.row.reqComment)"
+              :disabled="scope.row.classes === PATHOLOGY"
+              maxlength="125"
+            />
           </template>
         </el-table-column>
         <el-table-column label="急诊" width="90">
           <template #default="scope">
             <el-switch
-                v-model="scope.row.jzFlag"
-                :active-value="1"
-                :inactive-value="0"
-                active-color="#13ce66"
-                active-text="是"
-                inactive-color="#ff4949"
-                inactive-text="否">
+              v-model="scope.row.jzFlag"
+              :active-value="1"
+              :inactive-value="0"
+              active-color="#13ce66"
+              active-text="是"
+              inactive-color="#ff4949"
+              inactive-text="否"
+            >
             </el-switch>
           </template>
         </el-table-column>
         <el-table-column label="自费" width="90">
           <template #default="scope">
             <el-switch
-                v-model="scope.row.ybSelfFlag"
-                :active-value="1"
-                :inactive-value="0"
-                active-color="#13ce66"
-                active-text="是"
-                inactive-color="#ff4949"
-                inactive-text="否">
+              v-model="scope.row.ybSelfFlag"
+              :active-value="1"
+              :inactive-value="0"
+              active-color="#13ce66"
+              active-text="是"
+              inactive-color="#ff4949"
+              inactive-text="否"
+            >
             </el-switch>
           </template>
         </el-table-column>
-        <el-table-column label="数量" prop="quantity" width="90" v-if="!isCheck">
+        <el-table-column
+          label="数量"
+          prop="quantity"
+          width="90"
+          v-if="!isCheck"
+        >
           <template #default="scope">
-            <el-input-number :step="1"
-                             :disabled="scope.row.classes !== PATHOLOGY"
-                             v-model="scope.row.quantity"
-                             :min="1"
-                             style="width: 77px"
-                             :controls="false"/>
+            <el-input-number
+              :step="1"
+              :disabled="scope.row.classes !== PATHOLOGY"
+              v-model="scope.row.quantity"
+              :min="1"
+              style="width: 77px"
+              :controls="false"
+            />
           </template>
         </el-table-column>
       </el-table>
-
     </template>
-
-
   </CyFlex>
-
-
 </template>
 
-<style scoped lang="scss">
-
-</style>
+<style scoped lang="scss"></style>

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

@@ -778,7 +778,7 @@ export declare type AddJcParams = {
 };
 
 // 添加检查申请
-export const [jcList, jcProxy] = cyRefList<AddJcParams>("orderCode");
+export const [jcList, jcProxy] = cyRefList<AddJcParams>("orderCode", null);
 // 添加检查申请
 export const [jyList, jyProxy] = cyRefList<{ orderCode: string }>("orderCode");