|
@@ -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
|