xiaochan vor 2 Wochen
Ursprung
Commit
cbc9c14338

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

@@ -141,6 +141,13 @@ export function viewInspectionItemDetails(orderCode, isCheck) {
   });
 }
 
+export function selectBuWeiAll() {
+  return requestV2<any[]>({
+    url: url + "selectBuWeiAll",
+    method: "get",
+  });
+}
+
 export function shanChuJianChaJianYan(reqNo, patNo, times) {
   return requestV2({
     url: url + "shanChuJianChaJianYan",

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

@@ -107,5 +107,3 @@ const deleteRequest = index => {
   jcProxy.delIndex(index);
 };
 </script>
-
-<style scoped lang="scss"></style>

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

@@ -1,8 +1,8 @@
 <script setup lang="ts">
 import {
   biaoBenApi,
-  buWeiShuJu,
   diagnosisInOurHospital,
+  selectBuWeiAll,
 } from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
 import { computed } from "vue";
 import { useVModels } from "@vueuse/core";
@@ -10,6 +10,8 @@ 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 XEUtils from "xe-utils";
+import { stringIsBlank } from "@/utils/blank-utils";
 
 const props = defineProps({
   data: {
@@ -26,14 +28,11 @@ const props = defineProps({
   },
 });
 
-const tableHeader = [
-  { code: "value", name: "编码", width: "50px" },
-  { code: "label", name: "名称", width: "120px" },
-];
-
 const emits = defineEmits(["delClick", "update:publicData"]);
 const { data, isCheck, publicData } = useVModels(props, emits);
 
+const buWeiShuJu = ref({});
+
 const deleteInspectionCheck = (index, code) => {
   emits("delClick", index);
 };
@@ -66,6 +65,36 @@ const userInfo = useUserStore().userInfo;
 const showStartTime = () => {
   return userInfo.deptCode === "1160000" || userInfo.deptCode === "3100000";
 };
+
+function computerPart(row) {
+  const code = "code" + row.orderType;
+  if (buWeiShuJu.value[code]) {
+    return buWeiShuJu.value[code];
+  } else {
+    return buWeiShuJu.value["all"];
+  }
+}
+
+onMounted(() => {
+  if (isCheck.value) {
+    selectBuWeiAll().then(res => {
+      if (res && res.length > 0) {
+        const tmp = {};
+        XEUtils.arrayEach(res, item => {
+          const code = stringIsBlank(item.parentCode)
+            ? "all"
+            : "code" + item.parentCode;
+          if (tmp[code] && tmp[code].length > 0) {
+            tmp[code].push(item);
+          } else {
+            tmp[code] = [item];
+          }
+        });
+        buWeiShuJu.value = tmp;
+      }
+    });
+  }
+});
 </script>
 
 <template>
@@ -172,7 +201,7 @@ const showStartTime = () => {
               v-model="scope.row"
               value="inspectPart"
               label="inspectPartName"
-              :remoteMethod="buWeiShuJu"
+              :data="computerPart(scope.row)"
               style="width: 100%"
             />
             <CyComboGrid