diff --git a/.env.development b/.env.development
index 88cc875..477c818 100644
--- a/.env.development
+++ b/.env.development
@@ -1,4 +1,4 @@
-MP_API_BASE_URL=http://localhost:8080
+MP_API_BASE_URL=http://192.168.137.1:8080
MP_CACHE_PREFIX=development
MP_WX_APP_ID=wx93af55767423938e
MP_CORP_ID=wwe3fb2faa52cf9dfb
diff --git a/components/archive-detail/health-profile-tab.vue b/components/archive-detail/health-profile-tab.vue
index 99e147d..0a65209 100644
--- a/components/archive-detail/health-profile-tab.vue
+++ b/components/archive-detail/health-profile-tab.vue
@@ -30,13 +30,9 @@
-
- 诊断:
- {{ getDiagnosis(r) }}
-
-
- 手术:
- {{ r.surgeryName }}
+
+ {{ l.label }}
+ {{ l.value }}
@@ -47,8 +43,7 @@
暂无数据
@@ -61,8 +56,11 @@
+
diff --git a/components/form-template/form-cell/form-positive-find.vue b/components/form-template/form-cell/form-positive-find.vue
new file mode 100644
index 0000000..7576ef1
--- /dev/null
+++ b/components/form-template/form-cell/form-positive-find.vue
@@ -0,0 +1,168 @@
+
+
+
+
+ {{ name }}
+ *
+
+
+
+
+
+
+
+
+ {{ idx + 1 }}、{{ i.category || '' }}
+ {{ i.opinion || '' }}
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+ 暂无内容,点击右侧 + 添加
+
+
+
+
+
+
+
diff --git a/components/form-template/form-cell/form-textarea.vue b/components/form-template/form-cell/form-textarea.vue
index 2aab1cd..2a6ab4b 100644
--- a/components/form-template/form-cell/form-textarea.vue
+++ b/components/form-template/form-cell/form-textarea.vue
@@ -4,8 +4,16 @@
{{ name }}
-
+
{{ value && value.length ? value.length : 0 }} / {{ wordLimit }}
@@ -38,6 +46,14 @@ const props = defineProps({
wordLimit: {
type: [Number, String],
default: 100
+ },
+ autoHeight: {
+ type: Boolean,
+ default: false
+ },
+ rows: {
+ type: [Number, String],
+ default: 3
}
})
@@ -56,6 +72,13 @@ const wordLimit = computed(() => {
return 100
})
+const textareaStyle = computed(() => {
+ const rowCount = typeof props.rows === 'number' ? props.rows : (Number(props.rows) || 3);
+ // 每行大约42rpx高度(28rpx字体 + 14rpx行距)
+ const minHeight = rowCount * 42;
+ return `min-height: ${minHeight}rpx;`;
+})
+
function change(e) {
emits('change', {
title: props.title,
diff --git a/components/form-template/form-cell/index.vue b/components/form-template/form-cell/index.vue
index 7d2527c..da38666 100644
--- a/components/form-template/form-cell/index.vue
+++ b/components/form-template/form-cell/index.vue
@@ -1,6 +1,20 @@
+
+
{{ t.title }}
@@ -224,7 +224,6 @@ import { storeToRefs } from 'pinia';
import HealthProfileTab from '@/components/archive-detail/health-profile-tab.vue';
import ServiceInfoTab from '@/components/archive-detail/service-info-tab.vue';
import FollowUpManageTab from '@/components/archive-detail/follow-up-manage-tab.vue';
-import { ensureSeed } from '@/components/archive-detail/mock';
import api from '@/utils/api';
import useAccountStore from '@/store/account';
import { hideLoading, loading, toast } from '@/utils/widget';
@@ -245,6 +244,12 @@ const archiveId = ref('');
const tabsScrollTop = ref(0);
const instanceProxy = getCurrentInstance()?.proxy;
+function switchTab(key) {
+ currentTab.value = key;
+ // 切换 tab 后,将页面滚动到顶部,确保 tab 吸顶可见
+ uni.pageScrollTo({ scrollTop: 0, duration: 0 });
+}
+
const archive = ref({
name: '',
sex: '',
@@ -438,7 +443,6 @@ onLoad((options) => {
if (!archiveId.value) {
archiveId.value = String(archive.value.medicalRecordNo || archive.value.outpatientNo || archive.value.inpatientNo || `mock_${Date.now()}`);
}
- ensureSeed(archiveId.value, archive.value);
// 接口兜底:优先用接口刷新档案详情
fetchArchive();
@@ -502,7 +506,8 @@ const idRows = computed(() => {
const createText = computed(() => {
const time = archive.value.createTime ? String(archive.value.createTime) : '';
- const creator = archive.value.creator ? String(archive.value.creator) : '';
+ const rawCreator = archive.value.creator ? String(archive.value.creator) : '';
+ const creator = ['-', '—', '--'].includes(rawCreator.trim()) ? '' : rawCreator.trim();
if (time && creator) return `${time} ${creator}创建`;
if (time) return `${time} 创建`;
return '';
diff --git a/pages/case/visit-record-detail.vue b/pages/case/visit-record-detail.vue
index 1f05e3b..529c736 100644
--- a/pages/case/visit-record-detail.vue
+++ b/pages/case/visit-record-detail.vue
@@ -13,7 +13,10 @@
- 文件上传
+
+ 文件上传
+ (支持≤5M文件,pdf文件格式)
+
@@ -44,12 +47,44 @@
import { computed, reactive, ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import dayjs from 'dayjs';
+import { storeToRefs } from 'pinia';
import FormTemplate from '@/components/form-template/index.vue';
-import { ensureSeed, getCurrentTeamId, getVisitRecord, getVisitRecordTemplate, removeVisitRecord, upsertVisitRecord } from '@/components/archive-detail/mock';
+import { getVisitRecordTemplate } from '@/components/archive-detail/templates';
+import api from '@/utils/api';
+import useAccountStore from '@/store/account';
+import { toast, confirm, loading as uniLoading, hideLoading } from '@/utils/widget';
-const archiveId = ref('');
+const accountStore = useAccountStore();
+const { account, doctorInfo } = storeToRefs(accountStore);
+const { getDoctorInfo } = accountStore;
+
+async function ensureDoctor() {
+ if (doctorInfo.value) return;
+ if (!account.value?.openid) return;
+ try {
+ await getDoctorInfo();
+ } catch {
+ // ignore
+ }
+}
+
+function getUserId() {
+ const d = doctorInfo.value || {};
+ const a = account.value || {};
+ return String(d.userid || d.userId || d.corpUserId || a.userid || a.userId || '') || '';
+}
+
+function getCorpId() {
+ const d = doctorInfo.value || {};
+ const a = account.value || {};
+ const t = uni.getStorageSync('ykt_case_current_team') || {};
+ return String(d.corpId || a.corpId || t.corpId || '') || '';
+}
+
+const memberId = ref('');
const recordId = ref('');
const templateType = ref('');
+const customerName = ref('');
const template = computed(() => getVisitRecordTemplate(templateType.value));
const detail = ref({});
@@ -84,27 +119,67 @@ function ensureFilesField() {
form.files = [];
}
-onLoad((options) => {
- archiveId.value = options?.archiveId ? String(options.archiveId) : '';
- recordId.value = options?.id ? String(options.id) : '';
- templateType.value = options?.type ? String(options.type) : '';
-
- ensureSeed(archiveId.value, { name: options?.name ? String(options.name) : '' });
+onLoad(async (options) => {
+ memberId.value = options?.memberId || options?.archiveId || '';
+ recordId.value = options?.id || '';
+ templateType.value = options?.type || '';
+ customerName.value = decodeURIComponent(options?.customerName || '');
if (recordId.value) {
- const record = getVisitRecord({ archiveId: archiveId.value, id: recordId.value });
- if (record) {
- templateType.value = record.templateType || record.medicalType || templateType.value;
- detail.value = record;
- ensureFilesField();
- return;
+ await getDetail();
+ } else {
+ if (!templateType.value) templateType.value = 'outpatient';
+ ensureFilesField();
+ // 门诊记录默认今日日期
+ if (templateType.value === 'outpatient') {
+ form.visitTime = dayjs().format('YYYY-MM-DD');
+ }
+ // 住院记录默认今日日期
+ if (templateType.value === 'inhospital') {
+ form.inhosDate = dayjs().format('YYYY-MM-DD');
+ }
+ // 体检记录默认今日日期
+ if (templateType.value === 'physicalExaminationTemplate') {
+ form.inspectDate = dayjs().format('YYYY-MM-DD');
}
}
-
- if (!templateType.value) templateType.value = 'outpatient';
- ensureFilesField();
});
+async function getDetail() {
+ if (!recordId.value || !memberId.value) return;
+ await ensureDoctor();
+ const corpId = getCorpId();
+ if (!corpId) return;
+ uniLoading('加载中...');
+ try {
+ const res = await api('getMedicalRecordById', {
+ _id: recordId.value,
+ corpId,
+ memberId: memberId.value,
+ medicalType: templateType.value,
+ });
+ hideLoading();
+ const record = res?.record || res?.data?.record || null;
+ if (res?.success && record) {
+ templateType.value = record.templateType || record.medicalType || templateType.value;
+
+ // 兼容模板字段:wxapp 使用 diagnosis,但接口通常返回 diagnosisName
+ if ((record.medicalType === 'outpatient' || record.medicalType === 'inhospital') && !record.diagnosis && record.diagnosisName) {
+ record.diagnosis = record.diagnosisName;
+ }
+
+ detail.value = record;
+ ensureFilesField();
+ } else {
+ toast(res.message || '加载失败');
+ }
+ } catch (error) {
+ hideLoading();
+ console.error('getDetail error:', error);
+ toast('加载失败');
+ }
+}
+
function onChange({ title, value }) {
form[title] = value;
const item = showItems.value.find((i) => i.title === title);
@@ -118,67 +193,120 @@ function cancel() {
uni.navigateBack();
}
-function save() {
- if (!archiveId.value) {
- uni.showToast({ title: '缺少 archiveId', icon: 'none' });
+async function save() {
+ if (!memberId.value) {
+ toast('缺少患者信息');
return;
}
+ await ensureDoctor();
+ const corpId = getCorpId();
+ const userId = getUserId();
+ if (!corpId || !userId) return toast('缺少用户信息');
if (formRef.value?.verify && !formRef.value.verify()) return;
- // sortTime:尽量用模板中的日期字段
- const timeTitle =
- templateType.value === 'outpatient'
- ? 'visitTime'
- : templateType.value === 'inhospital'
- ? 'inhosDate'
- : templateType.value === 'preConsultation'
- ? 'consultDate'
- : templateType.value === 'physicalExaminationTemplate'
- ? 'inspectDate'
- : '';
- const timeValue = timeTitle ? forms.value[timeTitle] : '';
- const sortTime = timeValue && dayjs(timeValue).isValid() ? dayjs(timeValue).valueOf() : Date.now();
+ const params = {
+ ...form,
+ corpId,
+ memberId: memberId.value,
+ medicalType: templateType.value,
+ };
- upsertVisitRecord({
- archiveId: archiveId.value,
- record: {
- _id: recordId.value || '',
- medicalType: templateType.value,
- templateType: templateType.value,
- tempName: template.value?.templateName || '健康档案',
- sortTime,
- teamId: detail.value?.teamId || getCurrentTeamId(),
- ...form,
- files: fileList.value,
- createTime: detail.value?.createTime || Date.now(),
- creatorName: detail.value?.creatorName || '我',
- },
- });
- uni.$emit('archive-detail:visit-record-changed');
- uni.showToast({ title: '保存成功', icon: 'success' });
- setTimeout(() => uni.navigateBack(), 300);
+ // 门诊/住院:与 mobile 字段对齐(diagnosisName)
+ if ((templateType.value === 'outpatient' || templateType.value === 'inhospital') && form.diagnosis && !form.diagnosisName) {
+ params.diagnosisName = form.diagnosis;
+ }
+
+ if (recordId.value) {
+ params._id = recordId.value;
+ params.userId = userId;
+ } else {
+ params.creator = userId;
+ }
+
+ // sortTime:使用模板中的时间字段
+ const sortTimeKey = template.value?.service?.timeTitle || '';
+ if (sortTimeKey && form[sortTimeKey] && dayjs(form[sortTimeKey]).isValid()) {
+ params.sortTime = dayjs(form[sortTimeKey]).valueOf();
+ } else {
+ params.sortTime = Date.now();
+ }
+
+ uniLoading('保存中...');
+ try {
+ const res = await api(
+ recordId.value ? 'updateMedicalRecord' : 'addMedicalRecord',
+ params
+ );
+ hideLoading();
+ if (res.success) {
+ uni.$emit('archive-detail:visit-record-changed');
+ toast(res.message || '保存成功');
+ setTimeout(() => uni.navigateBack(), 300);
+ } else {
+ toast(res.message || '保存失败');
+ }
+ } catch (error) {
+ hideLoading();
+ console.error('save error:', error);
+ toast('保存失败');
+ }
}
function remove() {
- uni.showModal({
- title: '提示',
- content: '确定删除当前记录?',
- success: (res) => {
- if (!res.confirm) return;
- removeVisitRecord({ archiveId: archiveId.value, id: recordId.value });
- uni.$emit('archive-detail:visit-record-changed');
- uni.showToast({ title: '已删除', icon: 'success' });
- setTimeout(() => uni.navigateBack(), 300);
- },
+ confirm('确定删除当前记录?', async () => {
+ if (!memberId.value || !recordId.value) return toast('缺少必要信息');
+ await ensureDoctor();
+ const corpId = getCorpId();
+ if (!corpId) return toast('缺少必要信息');
+ uniLoading('删除中...');
+ try {
+ const res = await api('removeMedicalRecord', {
+ corpId,
+ memberId: memberId.value,
+ medicalType: templateType.value,
+ _id: recordId.value,
+ });
+ hideLoading();
+ if (res.success) {
+ uni.$emit('archive-detail:visit-record-changed');
+ toast(res.message || '已删除');
+ setTimeout(() => uni.navigateBack(), 300);
+ } else {
+ toast(res.message || '删除失败');
+ }
+ } catch (error) {
+ hideLoading();
+ console.error('remove error:', error);
+ toast('删除失败');
+ }
});
}
function addFiles() {
- uni.chooseImage({
+ const fileConfig = template.value?.templateList?.find(i => i.type === 'files');
+ const maxSize = fileConfig?.maxSize || 5; // MB
+ const accept = fileConfig?.accept || 'pdf';
+
+ uni.chooseMessageFile({
count: 9,
+ type: 'file',
+ extension: [accept],
success: (res) => {
- const paths = Array.isArray(res.tempFilePaths) ? res.tempFilePaths : [];
- const next = paths.map((p) => ({ url: p, name: '' }));
+ const files = Array.isArray(res.tempFiles) ? res.tempFiles : [];
+ const maxBytes = maxSize * 1024 * 1024;
+
+ // 验证文件大小
+ const invalidFiles = files.filter(f => f.size > maxBytes);
+ if (invalidFiles.length > 0) {
+ toast(`文件大小不能超过${maxSize}M`);
+ return;
+ }
+
+ const next = files.map((f) => ({
+ url: f.path,
+ name: f.name || '',
+ size: f.size
+ }));
const cur = Array.isArray(forms.value.files) ? forms.value.files : [];
form.files = [...cur, ...next];
},
@@ -228,57 +356,68 @@ function previewFile(idx) {
.upload-wrap {
background: #fff;
- margin: 10px 14px 0;
- border-radius: 8px;
- padding: 14px;
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
+ padding: 24rpx 30rpx;
+ border-bottom: 1px solid #eee;
}
-.upload-title {
- font-size: 14px;
- font-weight: 700;
+.upload-row {
+ display: flex;
+ align-items: baseline;
+ margin-bottom: 18rpx;
+}
+.upload-label {
+ font-size: 28rpx;
+ line-height: 42rpx;
color: #111827;
- margin-bottom: 10px;
+ flex-shrink: 0;
+}
+.upload-desc {
+ font-size: 24rpx;
+ color: #9ca3af;
+ margin-left: 8rpx;
}
.upload-grid {
display: flex;
flex-wrap: wrap;
- gap: 10px;
+ gap: 18rpx;
}
.upload-item {
- width: 90px;
- height: 70px;
+ width: 180rpx;
+ height: 140rpx;
position: relative;
- border: 1px solid #d1d5db;
+ border: 1px solid #e5e7eb;
+ border-radius: 8rpx;
+ overflow: hidden;
background: #f9fafb;
}
.upload-thumb {
- width: 90px;
- height: 70px;
+ width: 100%;
+ height: 100%;
}
.upload-remove {
position: absolute;
right: 0;
top: 0;
- width: 20px;
- height: 20px;
- line-height: 20px;
+ width: 36rpx;
+ height: 36rpx;
+ line-height: 36rpx;
text-align: center;
background: rgba(0, 0, 0, 0.55);
color: #fff;
- font-size: 14px;
+ font-size: 28rpx;
}
.upload-add {
- width: 90px;
- height: 70px;
- border: 1px dashed #c7c7c7;
+ width: 180rpx;
+ height: 140rpx;
+ border: 1px dashed #d1d5db;
+ border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
- color: #666;
+ color: #9ca3af;
}
.plus {
- font-size: 26px;
- line-height: 26px;
+ font-size: 52rpx;
+ line-height: 52rpx;
}
.footer {
position: fixed;
diff --git a/pages/case/visit-record-view.vue b/pages/case/visit-record-view.vue
index b1900f8..7c9deba 100644
--- a/pages/case/visit-record-view.vue
+++ b/pages/case/visit-record-view.vue
@@ -52,10 +52,13 @@
import { computed, ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import dayjs from 'dayjs';
-import { getVisitRecord, removeVisitRecord } from '@/components/archive-detail/mock';
+import api from '@/utils/api';
+import { loading, hideLoading, toast } from '@/utils/widget';
+import { getVisitRecordTemplate } from '@/components/archive-detail/templates';
const archiveId = ref('');
const id = ref('');
+const medicalType = ref('');
const record = ref({});
const files = computed(() => {
@@ -65,7 +68,38 @@ const files = computed(() => {
const templateType = computed(() => record.value?.templateType || record.value?.medicalType || '');
-const typeLabel = computed(() => record.value?.tempName || '病历');
+const typeLabel = computed(() => record.value?.tempName || getVisitRecordTemplate(templateType.value || medicalType.value)?.templateName || '病历');
+
+function normalizeText(v) {
+ if (Array.isArray(v)) return v.filter((i) => i !== null && i !== undefined && String(i).trim()).join(',');
+ if (v === 0) return '0';
+ return v ? String(v) : '';
+}
+
+function formatPositiveFind(v, { withOpinion = false } = {}) {
+ if (Array.isArray(v)) {
+ const list = v
+ .map((i) => (i && typeof i === 'object' ? { category: i.category, opinion: i.opinion } : null))
+ .filter((i) => i && (i.category || i.opinion));
+ if (!list.length) return '';
+ if (!withOpinion) return list.map((i) => String(i.category || '').trim()).filter(Boolean).join(':');
+ return list
+ .map((i) => {
+ const c = String(i.category || '').trim();
+ const o = String(i.opinion || '').trim();
+ if (c && o) return `${c}:${o}`;
+ return c || o;
+ })
+ .filter(Boolean)
+ .join('\n');
+ }
+ return normalizeText(v);
+}
+
+function getCorpId() {
+ const team = uni.getStorageSync('ykt_case_current_team') || {};
+ return team?.corpId ? String(team.corpId) : '';
+}
const visitDate = computed(() => {
const t = templateType.value;
@@ -78,9 +112,10 @@ const visitDate = computed(() => {
const diagnosisText = computed(() => {
const t = templateType.value;
- if (t === 'preConsultation') return record.value?.chiefComplaint || record.value?.summary || '--';
- if (t === 'physicalExaminationTemplate') return record.value?.positiveFind || record.value?.summary || '--';
- return record.value?.diagnosisName || record.value?.summary || '--';
+ if (t === 'preConsultation') return normalizeText(record.value?.chiefComplaint) || normalizeText(record.value?.summary) || '--';
+ if (t === 'physicalExaminationTemplate') return formatPositiveFind(record.value?.positiveFind) || normalizeText(record.value?.summary) || '--';
+ if (t === 'outpatient' || t === 'inhospital') return normalizeText(record.value?.diagnosisName || record.value?.diagnosis) || normalizeText(record.value?.summary) || '--';
+ return normalizeText(record.value?.diagnosisName || record.value?.diagnosis || record.value?.summary) || '--';
});
const sections = computed(() => {
@@ -118,7 +153,7 @@ const sections = computed(() => {
if (t === 'physicalExaminationTemplate') {
const corp = push('体检机构', record.value?.corpName);
const pkg = push('体检套餐', record.value?.inspectPakageName);
- const positive = push('阳性发现', record.value?.positiveFind);
+ const positive = push('阳性发现及处理意见', formatPositiveFind(record.value?.positiveFind, { withOpinion: true }));
const summary = push('摘要', record.value?.summary);
[corp, pkg, positive, summary].forEach((i) => i && list.push(i));
return list;
@@ -130,26 +165,61 @@ const sections = computed(() => {
const topText = computed(() => {
const time = record.value?.createTime ? dayjs(record.value.createTime).format('YYYY-MM-DD HH:mm') : '';
- const name = record.value?.creatorName ? String(record.value.creatorName) : '';
- return `${time || '--'} ${name || '--'}创建`;
+ const rawName = record.value?.creatorName ? String(record.value.creatorName) : '';
+ const cleanName = ['-', '—', '--'].includes(rawName.trim()) ? '' : rawName.trim();
+ const byCustomer = record.value?.ignore === 'checkIn';
+ const suffix = byCustomer ? '患者自建' : cleanName ? `${cleanName}代建` : record.value?.creator ? '员工代建' : '';
+ return suffix ? `${time || '--'} ${suffix}` : `${time || '--'}`;
});
-onLoad((opt) => {
+onLoad(async (opt) => {
archiveId.value = opt?.archiveId ? String(opt.archiveId) : '';
id.value = opt?.id ? String(opt.id) : '';
- if (!archiveId.value || !id.value) {
- uni.showToast({ title: '参数缺失', icon: 'none' });
+ medicalType.value = opt?.type ? String(opt.type) : '';
+ if (!archiveId.value || !id.value || !medicalType.value) {
+ toast('参数缺失');
setTimeout(() => uni.navigateBack(), 300);
return;
}
- const r = getVisitRecord({ archiveId: archiveId.value, id: id.value });
- if (!r) {
- uni.showToast({ title: '记录不存在', icon: 'none' });
+
+ // 使用真实 API 获取病历记录
+ loading('加载中...');
+ try {
+ const corpId = getCorpId();
+ if (!corpId) {
+ hideLoading();
+ toast('缺少 corpId');
+ setTimeout(() => uni.navigateBack(), 300);
+ return;
+ }
+
+ const res = await api('getMedicalRecordById', {
+ _id: id.value,
+ corpId,
+ memberId: archiveId.value,
+ medicalType: medicalType.value,
+ });
+ hideLoading();
+ const r = res?.record || res?.data?.record || null;
+ if (!res?.success || !r) {
+ toast('记录不存在');
+ setTimeout(() => uni.navigateBack(), 300);
+ return;
+ }
+
+ // 兼容模板字段:wxapp 使用 diagnosis,但接口通常返回 diagnosisName
+ if ((r.medicalType === 'outpatient' || r.medicalType === 'inhospital') && !r.diagnosis && r.diagnosisName) {
+ r.diagnosis = r.diagnosisName;
+ }
+
+ record.value = r;
+ uni.setNavigationBarTitle({ title: String(typeLabel.value || '病历详情') });
+ } catch (error) {
+ hideLoading();
+ console.error('获取病历记录失败:', error);
+ toast('加载失败');
setTimeout(() => uni.navigateBack(), 300);
- return;
}
- record.value = r;
- uni.setNavigationBarTitle({ title: r?.tempName ? String(r.tempName) : '病历详情' });
});
function preview(idx) {
@@ -168,12 +238,26 @@ function remove() {
uni.showModal({
title: '提示',
content: '确定删除当前记录?',
- success: (res) => {
+ success: async (res) => {
if (!res.confirm) return;
- removeVisitRecord({ archiveId: archiveId.value, id: id.value });
- uni.$emit('archive-detail:visit-record-changed');
- uni.showToast({ title: '已删除', icon: 'success' });
- setTimeout(() => uni.navigateBack(), 300);
+
+ loading('删除中...');
+ try {
+ const corpId = getCorpId();
+ if (!corpId) {
+ hideLoading();
+ return toast('缺少 corpId');
+ }
+ await api('removeMedicalRecord', { corpId, memberId: archiveId.value, medicalType: medicalType.value, _id: id.value });
+ hideLoading();
+ uni.$emit('archive-detail:visit-record-changed');
+ toast('已删除');
+ setTimeout(() => uni.navigateBack(), 300);
+ } catch (error) {
+ hideLoading();
+ console.error('删除病历记录失败:', error);
+ toast('删除失败');
+ }
},
});
}
diff --git a/pages/library/diagnosis-list.vue b/pages/library/diagnosis-list.vue
new file mode 100644
index 0000000..07bda93
--- /dev/null
+++ b/pages/library/diagnosis-list.vue
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+ 暂无诊断数据
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/others/edit-positive-find.vue b/pages/others/edit-positive-find.vue
new file mode 100644
index 0000000..f5320a7
--- /dev/null
+++ b/pages/others/edit-positive-find.vue
@@ -0,0 +1,128 @@
+
+
+
+
+ 阳性发现
+
+
+
+
+ 处理意见
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/routes/index.js b/routes/index.js
index c55a31f..94c80dd 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -93,6 +93,14 @@ export default [
path: 'pages/case/plan-execute',
meta: { title: '执行回访计划', login: false },
},
+ {
+ path: 'pages/library/diagnosis-list',
+ meta: { title: '诊断', login: false },
+ },
+ {
+ path: 'pages/others/edit-positive-find',
+ meta: { title: '阳性发现', login: false },
+ },
{
path: 'pages/work/work',
meta: { title: '工作台', login: false }
diff --git a/utils/api.js b/utils/api.js
index e6ea00b..171a88a 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -16,7 +16,9 @@ const urlsConfig = {
},
knowledgeBase: {
- getArticleByIds: 'getArticleByIds'
+ getArticleByIds: 'getArticleByIds',
+ // 诊断库(对齐 ykt-management-mobile/src/api/knowledgeBase.js)
+ getDisease: 'getDisease',
},
member: {
addCustomer: 'add',
@@ -36,6 +38,12 @@ const urlsConfig = {
searchCorpCustomer: 'searchCorpCustomer',
searchCorpCustomerWithFollowTime: 'searchCorpCustomerWithFollowTime',
unbindMiniAppArchive: 'unbindMiniAppArchive',
+ // 健康档案相关接口(对齐 ykt-management-mobile/src/api/member.js)
+ addMedicalRecord: 'addMedicalRecord',
+ getMedicalRecordById: 'getMedicalRecordById',
+ updateMedicalRecord: 'updateMedicalRecord',
+ removeMedicalRecord: 'removeMedicalRecord',
+ getCustomerMedicalRecord: 'getCustomerMedicalRecord',
},
wecom: {
addContactWay: 'addContactWay'