From ebac93569bb69d5ef54b9ae78709ee57b9476875 Mon Sep 17 00:00:00 2001 From: Jafeng <2998840497@qq.com> Date: Thu, 28 May 2026 11:35:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=9A=90=E8=97=8F=E9=97=A8=E8=AF=8A/?= =?UTF-8?q?=E5=85=A5=E9=99=A2=E8=AF=84=E4=BC=B0=E8=A1=A8=E3=80=81=E5=81=A5?= =?UTF-8?q?=E5=BA=B7=E8=AE=B0=E5=BD=95=E6=A8=A1=E6=9D=BF=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archive-detail/health-profile-tab.vue | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/pages/case/components/archive-detail/health-profile-tab.vue b/pages/case/components/archive-detail/health-profile-tab.vue index 4d66aaa..3eaa824 100644 --- a/pages/case/components/archive-detail/health-profile-tab.vue +++ b/pages/case/components/archive-detail/health-profile-tab.vue @@ -99,17 +99,20 @@ const { account, doctorInfo } = storeToRefs(accountStore); const { getDoctorInfo } = accountStore; const FALLBACK_TEMPLATE_TYPES = ['outpatient', 'inhospital', 'preConsultationRecord', 'physicalExaminationTemplate']; +const HIDDEN_TEMPLATE_TYPES = new Set(['healthTemplate']); +const HIDDEN_TEMPLATE_NAMES = new Set(['门诊/入院评估表', '健康记录']); const templates = ref([]); -const selectableTemplates = computed(() => templates.value.filter((i) => i && i.templateType && typeof i.name === 'string' && i.name.trim())); +const visibleTemplates = computed(() => templates.value.filter((i) => i && i.templateType && typeof i.name === 'string' && i.name.trim() && !isHiddenTemplate(i))); +const selectableTemplates = computed(() => visibleTemplates.value); const useActionSheet = computed(() => selectableTemplates.value.length > 0 && selectableTemplates.value.length <= 6); const fabPickerDisabled = computed(() => selectableTemplates.value.length === 0 || useActionSheet.value); const templateMap = computed(() => templates.value.reduce((m, t) => { if (t?.templateType) m[String(t.templateType)] = t; return m; }, {})); -const availableTypes = computed(() => (templates.value.length ? [...templates.value.map((i) => i.templateType), 'surveyFill'] : FALLBACK_TEMPLATE_TYPES)); +const availableTypes = computed(() => (templates.value.length ? [...visibleTemplates.value.map((i) => i.templateType), 'surveyFill'] : FALLBACK_TEMPLATE_TYPES)); -const typeRange = computed(() => [{ name: '全部', value: 'ALL' }, ...templates.value.map((t) => ({ name: t.name, value: t.templateType })), { name: '问卷填写', value: 'surveyFill' }]); +const typeRange = computed(() => [{ name: '全部', value: 'ALL' }, ...visibleTemplates.value.map((t) => ({ name: t.name, value: t.templateType })), { name: '问卷填写', value: 'surveyFill' }]); const currentType = ref({ name: '全部', value: 'ALL' }); const records = ref([]); @@ -152,6 +155,23 @@ function getCorpId() { return String(team.corpId || d.corpId || a.corpId || '') || ''; } +function normalizeTemplateName(name) { + return String(name || '').replace(///g, '/').replace(/\s+/g, '').trim(); +} + +function isHiddenTemplate(template) { + const type = String(template?.templateType || ''); + if (HIDDEN_TEMPLATE_TYPES.has(type)) return true; + return HIDDEN_TEMPLATE_NAMES.has(normalizeTemplateName(template?.name)); +} + +function isHiddenRecord(record) { + const rawType = String(record?.medicalType || record?.rawTemplateType || record?.templateType || ''); + if (isHiddenTemplate({ templateType: rawType, name: record?.tempName || record?.medicalTypeName })) return true; + const temp = templateMap.value[rawType]; + return isHiddenTemplate(temp); +} + async function ensureDoctor() { if (doctorInfo.value) return; if (!account.value?.openid) return; @@ -240,7 +260,7 @@ async function loadVisitTemplates() { if (t && name) m[t] = name; return m; }, {}); - const enabled = list.filter((i) => i && i.templateType !== 'healthTemplate' && i.templateStatus !== 'disable'); + const enabled = list.filter((i) => i && i.templateStatus !== 'disable' && !isHiddenTemplate(i)); const typeList = enabled.map((i) => String(i.templateType || '')).filter(Boolean); if (!typeList.length) return; @@ -466,9 +486,11 @@ async function refreshList() { }); // 未互通时,仅展示本团队数据 + const visibleMapped = mapped.filter((i) => !isHiddenRecord(i)); + records.value = !shareAllTeamsForQuery.value && teamId.value - ? mapped.filter((i) => String(i?.teamId || '') === String(teamId.value)) - : mapped; + ? visibleMapped.filter((i) => String(i?.teamId || '') === String(teamId.value)) + : visibleMapped; const creatorIds = mapped .map(