Commit 09a9ae13 authored by songrui's avatar songrui

咨询列表修改

parent ec26d6dc
......@@ -7,9 +7,6 @@
<div style="color: #8C8C8C;" class="py-2 px-3">以下为您提供慢病筛查的专家,可向其进行慢病咨询</div>
<div class="grow flex">
<div class="h-full list-l">
<div class="p-3 active">
咨询过的专家
</div>
<div v-for="item in orgList" :key="item.unitId"
:class="['p-3', { 'active': item.unitId === activeOrg.unitId }]"
@click="onOrgChange(item)">
......@@ -28,6 +25,10 @@
@click="toSession(item)">咨询医生</van-button>
</div>
</div>
<div class='text-center shrink-0 empty' v-if='!innerDoctorList.length'>
<img src='@/assets/image/doctor/empty.png' alt='' style='width: 1.2rem;'>
<p>暂无数据</p>
</div>
</div>
</div>
</div>
......@@ -45,6 +46,8 @@ export default {
store: useStore(),
orgList: [],
doctorList: [],
// 沟通过的医生列表
recordList: [],
activeOrg: {}
}
},
......@@ -53,6 +56,9 @@ export default {
return this.store.userInfo
},
innerDoctorList() {
if (this.activeOrg.unitId === 'record') {
return this.recordList
}
return this.doctorList.filter(e => e.unitId === this.activeOrg.unitId)
}
},
......@@ -76,10 +82,11 @@ export default {
unitName: e.unitName
})
})
this.orgList = orgList
if (orgList.length) {
this.activeOrg = orgList[0]
}
this.orgList = [{
unitId: 'record',
unitName: '咨询过的专家'
}].concat(orgList)
this.activeOrg = this.orgList[0]
})
},
onOrgChange(item) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment