依据:
在线接诊(兽医)功能需求.md(v1.1)、在线接诊(兽医)技术方案.md(v1.1);布局参考diseaseTreatment/aiDiagnosis/index.vue(左右分栏 IM),数据对接后端 REST。
| 项 | 说明 |
|---|---|
| Vue 路径 | ruoyi-ui/src/views/diseaseTreatment/onlineConsult/vet/index.vue |
| 组件名 | DiseaseTreatmentVetOnlineConsult |
| 菜单配置 | 组件路径:diseaseTreatment/onlineConsult/vet/index |
| 权限前缀 | diseaseTreatment:vetOnlineConsult:list、query、send |
| 项 | 说明 |
|---|---|
| 文件 | ruoyi-ui/src/api/diseaseTreatment/vetOnlineConsult.js |
| Base | /diseaseTreatment/onlineConsult/vet |
| 方法 | HTTP | 说明 |
|---|---|---|
listVetConsultSessions |
GET | /session/list;askerName、contentKeyword、searchMode(仅点击搜索为 true) |
listVetConsultMessages |
GET | /session/{sessionId}/messages;beforeId、pageSize(默认 50) |
sendVetConsultMessage |
POST | /session/{sessionId}/message;Body:msgType、content、mediaDuration(可选) |
searchMode=true,且至少一项非空)、重置(恢复默认近 3 个月列表)。beforeId)。| 规则 | 实现 |
|---|---|
| 默认列表 | 不传 searchMode 或 false;仅近 3 个月 |
| 搜索 | searchMode=true;askerName / contentKeyword 映射后端同名 Query |
| 消息角色 | senderRole=1 问诊人(左),2 兽医(右) |
| 消息类型 | 1 文本、2 图片、3 视频、4 语音 |
| 媒体上传 | 先 POST /common/upload,content 传返回 url |
| 上传限制 | 图 jpg/jpeg/png/gif ≤10MB;视频 mp4/mov ≤50MB;语音 mp3/m4a/wav ≤10MB |
| 近实时 | 选中会话后 2s 轮询 刷新消息与列表(后端 STOMP 就绪后可改为 WebSocket 订阅 /topic/consult/vet/{userId}) |
| 项 | 说明 |
|---|---|
| 语言包 | diseaseTreatment.vetOnlineConsult(lang/zh/diseaseTreatment.js、lang/bo/diseaseTreatment.js) |
| Mixin | diseaseTreatmentLocaleMixin,dtNs = 'vetOnlineConsult' |
| 路径 | 说明 |
|---|---|
src/views/diseaseTreatment/onlineConsult/vet/index.vue |
主页面 |
src/api/diseaseTreatment/vetOnlineConsult.js |
API |
src/mixins/diseaseTreatmentLocaleMixin.js |
文案 |
resource_type=1 且已分配账号),否则列表为空。/app/onlineConsult 创建;后台仅查看与回复。consult_type=1)。