This commit is contained in:
2026-02-28 00:22:05 +08:00
parent 5da820b038
commit b9a0fe8c6e
4 changed files with 96 additions and 10 deletions

View File

@@ -3,7 +3,6 @@
<div class="stats-header">
<div>
<h2 class="page-title">统计报表</h2>
<p class="sub-title">ECharts 可视化报表</p>
</div>
<div class="header-actions">
<t-select v-model="period" :options="periodOptions" style="width: 140px" />

View File

@@ -17,9 +17,11 @@
<t-button size="small" variant="text" @click="openEdit(pet)">
<t-icon name="edit" />
</t-button>
<t-button size="small" variant="text" theme="danger" @click="confirmDelete(pet)">
<t-popconfirm :content="`确定要删除 ${pet.name} 吗?`" @confirm="remove(pet.id)">
<t-button size="small" variant="text" theme="danger">
<t-icon name="delete" />
</t-button>
</t-popconfirm>
</div>
</div>
<div class="pet-body">
@@ -150,12 +152,6 @@ const openEdit = (pet: any) => {
dialogVisible.value = true;
};
const confirmDelete = (pet: any) => {
MessagePlugin.confirm(`确定要删除 ${pet.name} 吗?`, '确认删除', {
onConfirm: () => remove(pet.id)
});
};
const remove = async (id: number) => {
try {
const res = await api.deletePet(id);

View File

@@ -0,0 +1,91 @@
<mxfile host="app.diagrams.net" modified="2026-02-27T16:05:00.000Z" agent="OpenCode" version="24.7.17" type="device">
<diagram id="fig411" name="图4.11 预约挂号界面设计图">
<mxGraphModel dx="1800" dy="1200" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="1000" math="0" shadow="0" background="none">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="10" value="预约挂号界面设计(依据 customer/AppointmentPage.vue" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;strokeWidth=2;fontSize=20;" vertex="1" parent="1"><mxGeometry x="220" y="20" width="1160" height="56" as="geometry"/></mxCell>
<mxCell id="11" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;strokeWidth=2;" vertex="1" parent="1"><mxGeometry x="80" y="100" width="1440" height="800" as="geometry"/></mxCell>
<mxCell id="12" value="CustomerLayout 顶部导航: 首页 | 我的宠物 | 预约挂号 | 检查报告 | 我的订单" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=12;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="80" y="100" width="1440" height="56" as="geometry"/></mxCell>
<mxCell id="13" value="页面标题:预约挂号" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;align=left;spacingLeft=12;" vertex="1" parent="1"><mxGeometry x="110" y="180" width="980" height="48" as="geometry"/></mxCell>
<mxCell id="14" value="按钮:新增预约" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="1210" y="180" width="280" height="48" as="geometry"/></mxCell>
<mxCell id="20" value="预约列表appointments" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="110" y="250" width="940" height="44" as="geometry"/></mxCell>
<mxCell id="21" value="预约卡片:日期(月/日) + 宠物名(getPetName) + 时间(timeSlot) + 备注(remark) + 状态(getStatusText)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="110" y="294" width="940" height="66" as="geometry"/></mxCell>
<mxCell id="22" value="状态为 PENDING 时显示操作按钮:取消" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="110" y="360" width="940" height="48" as="geometry"/></mxCell>
<mxCell id="23" value="空状态:暂无预约记录 + 按钮“立即预约”" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="110" y="408" width="940" height="54" as="geometry"/></mxCell>
<mxCell id="30" value="新增预约弹窗t-dialog: 新增预约)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="1080" y="250" width="410" height="44" as="geometry"/></mxCell>
<mxCell id="31" value="表单项1选择宠物t-select, petOptions" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="1080" y="294" width="410" height="54" as="geometry"/></mxCell>
<mxCell id="32" value="表单项2预约日期t-date-picker" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="1080" y="348" width="410" height="54" as="geometry"/></mxCell>
<mxCell id="33" value="表单项3时间段t-select, timeSlotOptions\n09:00-10:00 ... 17:00-18:00" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="1080" y="402" width="410" height="74" as="geometry"/></mxCell>
<mxCell id="34" value="表单项4备注t-textarea, maxlength=200" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="1080" y="476" width="410" height="54" as="geometry"/></mxCell>
<mxCell id="35" value="确认提交submit() -> createAppointment(payload) -> 状态默认 PENDING" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="1080" y="530" width="410" height="62" as="geometry"/></mxCell>
<mxCell id="40" value="数据加载loadData() 同时请求 appointments 与 pets卡片宠物名来自 pets 映射。" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="110" y="490" width="940" height="52" as="geometry"/></mxCell>
<mxCell id="41" value="路由:/appointments顾客端 | 组件frontend/src/pages/customer/AppointmentPage.vue" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="110" y="840" width="1380" height="42" as="geometry"/></mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="fig412" name="图4.12 药品库存管理界面设计图">
<mxGraphModel dx="1800" dy="1200" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="1000" math="0" shadow="0" background="none">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="110" value="药品库存管理界面设计(依据 DrugPage + StockInPage + StockOutPage" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;strokeWidth=2;fontSize=20;" vertex="1" parent="1"><mxGeometry x="180" y="20" width="1240" height="56" as="geometry"/></mxCell>
<mxCell id="111" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;strokeWidth=2;" vertex="1" parent="1"><mxGeometry x="80" y="100" width="1440" height="800" as="geometry"/></mxCell>
<mxCell id="112" value="MainLayout 左侧菜单(管理员)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="100" y="130" width="260" height="46" as="geometry"/></mxCell>
<mxCell id="113" value="药品管理(/admin/drugs\n入库流水/admin/stock-in\n出库流水/admin/stock-out" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="100" y="176" width="260" height="138" as="geometry"/></mxCell>
<mxCell id="120" value="A. 药品管理页面DrugPage.vue" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="390" y="130" width="1110" height="44" as="geometry"/></mxCell>
<mxCell id="121" value="标题:药品管理 | 查询区:关键词输入 + 查询按钮 + 新增药品按钮" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="390" y="174" width="1110" height="54" as="geometry"/></mxCell>
<mxCell id="122" value="列表t-table columnsID | 名称 | 规格 | 单位 | 库存 | 操作" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="390" y="228" width="1110" height="46" as="geometry"/></mxCell>
<mxCell id="123" value="操作列:编辑 | 删除" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="390" y="274" width="1110" height="44" as="geometry"/></mxCell>
<mxCell id="124" value="新增/编辑弹窗字段:名称、规格、单位、库存、状态(启用/禁用)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="390" y="318" width="1110" height="52" as="geometry"/></mxCell>
<mxCell id="130" value="B. 入库流水页面StockInPage.vue" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="390" y="390" width="540" height="44" as="geometry"/></mxCell>
<mxCell id="131" value="标题:入库流水 | 按钮:刷新、新增入库" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="390" y="434" width="540" height="48" as="geometry"/></mxCell>
<mxCell id="132" value="表格列ID | 药品(drugId映射名称) | 数量 | 入库时间" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="390" y="482" width="540" height="52" as="geometry"/></mxCell>
<mxCell id="133" value="新增入库弹窗字段:药品(t-select) | 数量" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="390" y="534" width="540" height="48" as="geometry"/></mxCell>
<mxCell id="140" value="C. 出库流水页面StockOutPage.vue" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="960" y="390" width="540" height="44" as="geometry"/></mxCell>
<mxCell id="141" value="标题:出库流水 | 按钮:刷新、新增出库" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="960" y="434" width="540" height="48" as="geometry"/></mxCell>
<mxCell id="142" value="表格列ID | 药品(drugId映射名称) | 数量 | 出库时间" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="960" y="482" width="540" height="52" as="geometry"/></mxCell>
<mxCell id="143" value="新增出库弹窗字段:药品(t-select) | 数量" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;" vertex="1" parent="1"><mxGeometry x="960" y="534" width="540" height="48" as="geometry"/></mxCell>
<mxCell id="150" value="路由与组件:/admin/drugs -> DrugPage.vue/admin/stock-in -> StockInPage.vue/admin/stock-out -> StockOutPage.vue" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="100" y="840" width="1400" height="42" as="geometry"/></mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="fig413" name="图4.13 病历书写界面设计图">
<mxGraphModel dx="1800" dy="1200" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="1000" math="0" shadow="0" background="none">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="210" value="病历书写界面设计(依据 MedicalRecordPage.vue" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;strokeWidth=2;fontSize=20;" vertex="1" parent="1"><mxGeometry x="240" y="20" width="1120" height="56" as="geometry"/></mxCell>
<mxCell id="211" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;strokeWidth=2;" vertex="1" parent="1"><mxGeometry x="80" y="100" width="1440" height="800" as="geometry"/></mxCell>
<mxCell id="212" value="MainLayout 左侧菜单(医生/管理员):就诊记录 | 病历管理 | 处方管理" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=10;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="100" y="130" width="300" height="70" as="geometry"/></mxCell>
<mxCell id="220" value="页面标题:病历管理" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="430" y="130" width="1070" height="44" as="geometry"/></mxCell>
<mxCell id="221" value="查询区inline-form就诊ID 输入框 + 查询按钮 + 新增病历按钮" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="430" y="174" width="1070" height="52" as="geometry"/></mxCell>
<mxCell id="222" value="病历列表t-table" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="430" y="246" width="1070" height="42" as="geometry"/></mxCell>
<mxCell id="223" value="列定义ID | 就诊(visitId 插槽显示 getVisitLabel) | 主诉 | 诊断 | 状态(getStatusText) | 操作" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="430" y="288" width="1070" height="58" as="geometry"/></mxCell>
<mxCell id="224" value="操作:编辑 | 删除" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="430" y="346" width="1070" height="42" as="geometry"/></mxCell>
<mxCell id="230" value="新增/编辑病历弹窗t-dialog" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="430" y="410" width="1070" height="42" as="geometry"/></mxCell>
<mxCell id="231" value="字段1就诊IDt-select, visitOptions选项标签=宠物名/医生名)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="430" y="452" width="1070" height="54" as="geometry"/></mxCell>
<mxCell id="232" value="字段2主诉chiefComplaint" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="430" y="506" width="1070" height="46" as="geometry"/></mxCell>
<mxCell id="233" value="字段3诊断diagnosis" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="430" y="552" width="1070" height="46" as="geometry"/></mxCell>
<mxCell id="234" value="字段4状态statusDRAFT=草稿COMPLETED=已完成)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="430" y="598" width="1070" height="50" as="geometry"/></mxCell>
<mxCell id="235" value="确认提交submit() -> createMedicalRecord / updateMedicalRecord保存成功后刷新列表" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=10;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="430" y="648" width="1070" height="56" as="geometry"/></mxCell>
<mxCell id="240" value="辅助数据加载onMounted 时加载 visits、pets、doctors用于就诊下拉标签显示。" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="430" y="724" width="1070" height="46" as="geometry"/></mxCell>
<mxCell id="241" value="路由:/admin/records | 组件frontend/src/pages/MedicalRecordPage.vue" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#000000;align=left;spacingLeft=8;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="100" y="840" width="1400" height="42" as="geometry"/></mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>