# 我的预约(兽医)— 前端技术方案 > 依据:`我的预约(兽医)功能需求.md`、`我的预约(兽医)技术方案.md`;列表布局参考 `tradeMarket/entryIsolation/index.vue`(双 card + 分页)。 --- ## 1. 页面与路由 | 项 | 说明 | | --- | --- | | **Vue 路径** | `ruoyi-ui/src/views/diseaseTreatment/myAppointment/vet/index.vue` | | **组件名** | `DiseaseTreatmentVetMyAppointment` | | **菜单配置** | 组件路径:`diseaseTreatment/myAppointment/vet/index` | | **权限前缀** | `diseaseTreatment:vetMyAppointment:list`、`query`、`confirm`、`reject`、`complete` | --- ## 2. API 模块 | 项 | 说明 | | --- | --- | | **文件** | `ruoyi-ui/src/api/diseaseTreatment/vetMyAppointment.js` | | **Base** | `/diseaseTreatment/myAppointment/vet` | | 方法 | HTTP | 说明 | | --- | --- | --- | | `listVetMyAppointment` | GET | `/list`;Query 小驼峰 | | `getVetMyAppointment` | GET | `/{id}` 详情 | | `confirmVetMyAppointment` | POST | `/confirm/{id}` | | `rejectVetMyAppointment` | POST | `/reject/{id}`;Body:`rejectReason`(1~100 字) | | `completeVetMyAppointment` | POST | `/complete/{id}` | **列表 Query**:`appointeeName`、`startDate`、`endDate`、`status`、`pageNum`、`pageSize`(默认 20)。 --- ## 3. 页面结构 1. **筛选区**:预约人、预约日期范围、状态;搜索、重置。 2. **列表**:预约人、日期、时段、电话、地址、需求、状态(Tag)、拒绝理由、操作。 3. **查看详情**:`el-descriptions` 弹窗;已拒绝展示拒绝理由;已确认/拒绝展示对应时间。 4. **待确认操作**:列表与详情内「确认接诊」「拒绝接诊」;拒绝弹窗填写理由。 **与专家端差异**:兽医端**无**「查看评价」入口与评价字段展示。 --- ## 4. 业务规则(前端) | 规则 | 实现 | | --- | --- | | 状态 | `0` 待确认、`1` 已确认、`2` 已拒绝、`3` 已取消、`4` 已完成 | | 操作可见 | `status === 0` 显示确认/拒绝;`status === 1` 或 `canComplete === true` 显示完成接诊 | | 时段展示 | `timeStart + '~' + timeEnd` | | 状态文案 | 优先 `statusLabel`;否则 i18n `vetMyAppointment.status0~4` | | 状态 Tag | 待确认 warning、已确认 success、已拒绝 danger、已取消 info、已完成默认 | --- ## 5. 国际化 | 项 | 说明 | | --- | --- | | **语言包** | `diseaseTreatment.vetMyAppointment`(`lang/zh`、`lang/bo`) | | **Mixin** | `diseaseTreatmentLocaleMixin`,页面 `dtNs = 'vetMyAppointment'`;`vetAppointmentStatusText` / `vetAppointmentStatusTagType` 在 mixin 中复用 | --- ## 6. 文件清单 | 路径 | 说明 | | --- | --- | | `src/views/diseaseTreatment/myAppointment/vet/index.vue` | 主页面 | | `src/api/diseaseTreatment/vetMyAppointment.js` | API | | `src/mixins/diseaseTreatmentLocaleMixin.js` | 预约状态文案/Tag | | `src/lang/zh/diseaseTreatment.js` | 中文 | | `src/lang/bo/diseaseTreatment.js` | 藏文 | --- ## 7. 联调说明 - 登录账号须在「畜牧医疗资源管理」绑定兽医资源(`resource_type=1` 且已分配账号),否则列表为空。 - 预约由移动端或牧户端创建;后台仅查看与确认/拒绝。 - 菜单需在若依后台配置组件路径与按钮权限后可见。