# 我的预约(专家)— 前端技术方案 > 依据:`我的预约(专家)功能需求.md`、`我的预约(专家)技术方案.md`;列表布局参考 `diseaseTreatment/myAppointment/vet/index.vue`(双 card + 分页)。 --- ## 1. 页面与路由 | 项 | 说明 | | --- | --- | | **Vue 路径** | `ruoyi-ui/src/views/techService/myAppointment/expert/index.vue` | | **组件名** | `TechServiceExpertMyAppointment` | | **菜单配置** | 组件路径:`techService/myAppointment/expert/index` | | **权限前缀** | `techService:expertMyAppointment:list`、`query`、`confirm`、`reject`、`complete`、`reviewList` | **准入**:登录账号须在「畜牧科技资源管理」绑定**专家**资源(`resource_type=004005` 且已分配账号),否则列表为空。 --- ## 2. API 模块 | 项 | 说明 | | --- | --- | | **文件** | `ruoyi-ui/src/api/techService/expertMyAppointment.js` | | **Base** | `/techService/myAppointment/expert` | | 方法 | HTTP | 说明 | | --- | --- | --- | | `listExpertMyAppointment` | GET | `/list`;Query 小驼峰 | | `getExpertMyAppointment` | GET | `/{id}` 详情(已完成可含评价星级与 summary) | | `confirmExpertMyAppointment` | POST | `/confirm/{id}` | | `rejectExpertMyAppointment` | POST | `/reject/{id}`;Body:`rejectReason` | | `completeExpertMyAppointment` | POST | `/complete/{id}` | | `listExpertMyAppointmentReviews` | GET | `/reviewList/{id}`;仅已完成 | **列表 Query**:`appointeeName`、`startDate`、`endDate`、`status`(0~4)、`pageNum`、`pageSize`(默认 20)。 --- ## 3. 页面结构 1. **筛选区**:预约人、预约日期范围、状态;搜索、重置。 2. **列表**:预约人、日期、时段、电话、地址、需求、状态 Tag、拒绝理由、操作。 3. **查看详情**:`el-descriptions`;已拒绝展示拒绝理由;**已完成**展示评价区(三星级 + 综合评价,无数据时「暂无评价」)。 4. **待确认**:确认接诊、拒绝接诊(拒绝理由 1~100 字)。 5. **已完成**:列表与详情内「查看评价」→ 评价列表弹窗(评价人、时间、综合评价)。 --- ## 4. 业务规则(前端) | 规则 | 实现 | | --- | --- | | 状态 | `0` 待确认、`1` 已确认、`2` 已拒绝、`3` 已取消、`4` 已完成 | | 操作可见 | 待确认:确认/拒绝;已确认:完成接诊;已完成:查看评价 | | 时段展示 | `timeStart + '~' + timeEnd` | | 状态文案 | 优先 `statusLabel`;否则 `expertMyAppointment.status0~4` | | 状态 Tag | 待确认 warning、已确认 success、已拒绝 danger、已取消 info、已完成默认 | | 详情评价 | `punctualityScore`、`attitudeScore`、`guidanceScore` 用 `el-rate` 只读;`summary` 文本 | | 评价列表 | `GET reviewList/{id}`;空表展示「暂无评价」 | | 日期校验 | 开始日期不得晚于结束日期 | --- ## 5. 与兽医端差异 | 项 | 专家(本文档) | 兽医 | | --- | --- | --- | | 业务域 | 牧业养殖科技服务 | 牧业疫病诊疗服务 | | API Base | `/techService/myAppointment/expert` | `/diseaseTreatment/myAppointment/vet` | | 资源表 | `biz_tech_resource` | `biz_medical_resource` | | 查看评价 | ✓ | ✗ | | 详情评价区 | ✓(已完成) | ✗ | --- ## 6. 国际化 | 项 | 说明 | | --- | --- | | **语言包** | `techService.expertMyAppointment`(`lang/zh/techService.js`、`lang/bo/techService.js`) | | **Mixin** | `techServiceLocaleMixin`,`tsNs = 'expertMyAppointment'`;`expertAppointmentStatusText` / `expertAppointmentStatusTagType` | --- ## 7. 文件清单 | 路径 | 说明 | | --- | --- | | `src/views/techService/myAppointment/expert/index.vue` | 主页面 | | `src/api/techService/expertMyAppointment.js` | API | | `src/mixins/techServiceLocaleMixin.js` | 预约状态文案/Tag | | `src/lang/zh/techService.js` | 中文 | | `src/lang/bo/techService.js` | 藏文 | --- ## 8. 联调说明 - 账号须已绑定专家科技资源(角色 **`exp`**,常见 `role_id=101`)。 - 确认/拒绝仅对 `status=0` 有效。 - 查看评价仅对 `status=4`;评价由移动端写入,后台只读。 - 菜单配置组件路径与上述权限按钮后可见。