Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
frontend-h5
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songrui
frontend-h5
Commits
bb0aafea
Commit
bb0aafea
authored
Nov 04, 2024
by
songrui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
专家在线咨询查询修改
parent
4537d996
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
166 additions
and
27 deletions
+166
-27
nim.js
src/api/residentWX/nim.js
+1
-1
Index.vue
src/residentWX/nim/Index.vue
+18
-23
Index_.vue
src/residentWX/nim/Index_.vue
+144
-0
vue.config.js
vue.config.js
+3
-3
No files found.
src/api/residentWX/nim.js
View file @
bb0aafea
...
@@ -2,7 +2,7 @@ import { fetchBase } from '../fetch.js'
...
@@ -2,7 +2,7 @@ import { fetchBase } from '../fetch.js'
// 根据居民ID查询服务医生
// 根据居民ID查询服务医生
export
function
getServiceDoc
(
params
)
{
export
function
getServiceDoc
(
params
)
{
return
fetchBase
({
url
:
`/chronic-resident/v1/chronic-visit-record/service-doctor`
,
body
:
params
,
loading
:
true
})
return
fetchBase
({
url
:
`/chronic-resident/v1/chronic-visit-record/service-doctor
-info
`
,
body
:
params
,
loading
:
true
})
}
}
// 获取IM账号信息
// 获取IM账号信息
...
...
src/residentWX/nim/Index.vue
View file @
bb0aafea
...
@@ -7,19 +7,19 @@
...
@@ -7,19 +7,19 @@
<div
style=
"color: #8C8C8C;"
class=
"py-2 px-3"
>
以下为您提供慢病筛查的专家,可向其进行慢病咨询
</div>
<div
style=
"color: #8C8C8C;"
class=
"py-2 px-3"
>
以下为您提供慢病筛查的专家,可向其进行慢病咨询
</div>
<div
class=
"grow flex"
>
<div
class=
"grow flex"
>
<div
class=
"h-full list-l"
>
<div
class=
"h-full list-l"
>
<div
v-for=
"item in orgList"
:key=
"item
.unitId
"
<div
v-for=
"item in orgList"
:key=
"item"
:class=
"['p-3',
{ 'active': item
.unitId === activeOrg.unitId
}]"
:class=
"['p-3',
{ 'active': item
=== activeOrg
}]"
@click="onOrgChange(item)">
@click="onOrgChange(item)">
<span>
{{
item
.
unitName
||
'-'
}}
</span>
<span>
{{
item
||
'-'
}}
</span>
</div>
</div>
</div>
</div>
<div
class=
"h-full p-3 list-r"
>
<div
class=
"h-full p-3 list-r"
>
<div
class=
"mb-3 p-4 card"
v-for=
"item in innerDoctorList"
:key=
"item.
identityCar
d"
>
<div
class=
"mb-3 p-4 card"
v-for=
"item in innerDoctorList"
:key=
"item.
serviceDoctorI
d"
>
<div
class=
"mb-3"
>
<div
class=
"mb-3"
>
<span
class=
"text-16 mr-2 font-semibold"
>
{{
item
.
s
taff
Name
}}
</span>
<span
class=
"text-16 mr-2 font-semibold"
>
{{
item
.
s
erviceDoctor
Name
}}
</span>
<span>
{{
item
.
o
fficeName
||
'-'
}}
</span>
<span>
{{
item
.
serviceO
fficeName
||
'-'
}}
</span>
</div>
</div>
<div
class=
"mb-3"
>
{{
item
.
u
nitName
||
'-'
}}
</div>
<div
class=
"mb-3"
>
{{
item
.
serviceU
nitName
||
'-'
}}
</div>
<div>
<div>
<van-button
plain
round
type=
"primary"
<van-button
plain
round
type=
"primary"
@
click=
"toSession(item)"
>
咨询医生
</van-button>
@
click=
"toSession(item)"
>
咨询医生
</van-button>
...
@@ -56,10 +56,10 @@ export default {
...
@@ -56,10 +56,10 @@ export default {
return
this
.
store
.
userInfo
return
this
.
store
.
userInfo
},
},
innerDoctorList
()
{
innerDoctorList
()
{
if
(
this
.
activeOrg
.
unitId
===
'record
'
)
{
if
(
this
.
activeOrg
===
'咨询过的专家
'
)
{
return
this
.
recordList
return
this
.
recordList
}
}
return
this
.
doctorList
.
filter
(
e
=>
e
.
unitId
===
this
.
activeOrg
.
unitId
)
return
this
.
doctorList
.
filter
(
e
=>
e
.
serviceUnitName
===
this
.
activeOrg
)
}
}
},
},
created
()
{
created
()
{
...
@@ -72,25 +72,20 @@ export default {
...
@@ -72,25 +72,20 @@ export default {
},
},
load
()
{
load
()
{
getServiceDoc
({
residentInfoId
:
this
.
userInfo
.
residentInfoId
}).
then
(
res
=>
{
getServiceDoc
({
residentInfoId
:
this
.
userInfo
.
residentInfoId
}).
then
(
res
=>
{
const
list
=
res
.
data
||
[]
const
result
=
res
.
data
||
{}
const
orgList
=
[]
const
orgList
=
[]
this
.
doctorList
=
list
let
doctorList
=
[]
list
.
forEach
(
e
=>
{
Reflect
.
ownKeys
(
result
).
forEach
(
key
=>
{
if
(
orgList
.
some
(
e
=>
e
.
unitId
===
e
.
unitId
))
return
orgList
.
push
(
key
)
orgList
.
push
({
doctorList
=
doctorList
.
concat
(
result
[
key
])
unitId
:
e
.
unitId
,
unitName
:
e
.
unitName
})
})
})
this
.
orgList
=
[{
this
.
doctorList
=
doctorList
unitId
:
'record'
,
this
.
orgList
=
[
'咨询过的专家'
].
concat
(
orgList
)
unitName
:
'咨询过的专家'
}].
concat
(
orgList
)
this
.
activeOrg
=
this
.
orgList
[
0
]
this
.
activeOrg
=
this
.
orgList
[
0
]
})
})
},
},
onOrgChange
(
item
)
{
onOrgChange
(
item
)
{
this
.
activeOrg
=
item
||
{}
this
.
activeOrg
=
item
||
''
},
},
// 聊天页面
// 聊天页面
toSession
(
item
=
{})
{
toSession
(
item
=
{})
{
...
@@ -102,7 +97,7 @@ export default {
...
@@ -102,7 +97,7 @@ export default {
this
.
$router
.
push
({
this
.
$router
.
push
({
path
,
path
,
query
:
{
query
:
{
name
:
item
.
s
taff
Name
name
:
item
.
s
erviceDoctor
Name
}
}
})
})
}
}
...
...
src/residentWX/nim/Index_.vue
0 → 100644
View file @
bb0aafea
<
template
>
<div
class=
"flex flex-col nim-index"
style=
"height: 100vh"
>
<div
class=
"py-2 px-3 text-black text-center shrink-0 doc-nav-bar"
v-if=
'showNav()'
>
<span>
专家在线咨询
</span>
</div>
<img
src=
"@/assets/image/residentWX/banner.png"
alt=
""
class=
"shrink-0 w-full"
>
<div
style=
"color: #8C8C8C;"
class=
"py-2 px-3"
>
以下为您提供慢病筛查的专家,可向其进行慢病咨询
</div>
<div
class=
"grow flex"
>
<div
class=
"h-full list-l"
>
<div
v-for=
"item in orgList"
:key=
"item.unitId"
:class=
"['p-3',
{ 'active': item.unitId === activeOrg.unitId }]"
@click="onOrgChange(item)">
<span>
{{
item
.
unitName
||
'-'
}}
</span>
</div>
</div>
<div
class=
"h-full p-3 list-r"
>
<div
class=
"mb-3 p-4 card"
v-for=
"item in innerDoctorList"
:key=
"item.identityCard"
>
<div
class=
"mb-3"
>
<span
class=
"text-16 mr-2 font-semibold"
>
{{
item
.
staffName
}}
</span>
<span>
{{
item
.
officeName
||
'-'
}}
</span>
</div>
<div
class=
"mb-3"
>
{{
item
.
unitName
||
'-'
}}
</div>
<div>
<van-button
plain
round
type=
"primary"
@
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>
</
template
>
<
script
>
import
{
useStore
}
from
'@/residentWX/store'
import
{
getServiceDoc
}
from
'@/api/residentWX/nim.js'
import
{
showFailToast
}
from
'vant'
export
default
{
inject
:[
'showNav'
],
data
()
{
return
{
store
:
useStore
(),
orgList
:
[],
doctorList
:
[],
// 沟通过的医生列表
recordList
:
[],
activeOrg
:
{}
}
},
computed
:
{
userInfo
()
{
return
this
.
store
.
userInfo
},
innerDoctorList
()
{
if
(
this
.
activeOrg
.
unitId
===
'record'
)
{
return
this
.
recordList
}
return
this
.
doctorList
.
filter
(
e
=>
e
.
unitId
===
this
.
activeOrg
.
unitId
)
}
},
created
()
{
this
.
init
()
},
methods
:
{
init
()
{
console
.
log
(
this
.
userInfo
)
this
.
load
()
},
load
()
{
getServiceDoc
({
residentInfoId
:
this
.
userInfo
.
residentInfoId
}).
then
(
res
=>
{
const
list
=
res
.
data
||
[]
const
orgList
=
[]
this
.
doctorList
=
list
list
.
forEach
(
e
=>
{
if
(
orgList
.
some
(
e
=>
e
.
unitId
===
e
.
unitId
))
return
orgList
.
push
({
unitId
:
e
.
unitId
,
unitName
:
e
.
unitName
})
})
this
.
orgList
=
[{
unitId
:
'record'
,
unitName
:
'咨询过的专家'
}].
concat
(
orgList
)
this
.
activeOrg
=
this
.
orgList
[
0
]
})
},
onOrgChange
(
item
)
{
this
.
activeOrg
=
item
||
{}
},
// 聊天页面
toSession
(
item
=
{})
{
if
(
!
item
.
identityCard
)
{
showFailToast
(
'缺失医生信息'
)
return
}
const
path
=
`/residentWX/nim/
${
item
.
identityCard
}
`
this
.
$router
.
push
({
path
,
query
:
{
name
:
item
.
staffName
}
})
}
},
}
</
script
>
<
style
lang=
"less"
scoped
>
@import url('../utils/common.less');
.nim-index {
background: #f8fafc;
}
.list-l {
width: 35%;
background: transparent;
>div {
line-height: 1.5;
}
.active {
background-color: #fff;
}
}
.list-r {
width: 65%;
background: #fff;
.card {
background-color: #E4E8EE;
background: linear-gradient(to bottom, #E5F3FF 0%, #E9FAFC 100%);
border-radius: 8px;
border: 1px solid #E4E8EE;
.van-button {
height: 26px;
line-height: 26px;
font-size: 14px;
}
}
}
</
style
>
vue.config.js
View file @
bb0aafea
...
@@ -39,11 +39,11 @@ module.exports = defineConfig({
...
@@ -39,11 +39,11 @@ module.exports = defineConfig({
}
}
},
},
'/chronic-resident'
:
{
'/chronic-resident'
:
{
// target: 'http://192.168.1.187
:8903',
target
:
'http://192.168.1.145
:8903'
,
target
:
'https://beta-tumour.zmnyjk.com'
,
//
target: 'https://beta-tumour.zmnyjk.com',
changOrigin
:
true
,
changOrigin
:
true
,
pathRewrite
:
{
pathRewrite
:
{
'^/chronic-resident'
:
'/
chronic-resident
'
'^/chronic-resident'
:
'/'
}
}
}
}
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment