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
384e81b9
Commit
384e81b9
authored
Oct 15, 2024
by
gengchunlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
居民端小程序 随访列表以及系统初始化逻辑
parent
8b0a7d6c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
39 deletions
+67
-39
base.js
src/api/base.js
+6
-0
resident.js
src/api/doctor/resident.js
+0
-1
visit.js
src/api/residentWX/visit.js
+6
-0
ResidentWX.vue
src/residentWX/ResidentWX.vue
+5
-19
index.js
src/residentWX/store/index.js
+7
-1
List.vue
src/residentWX/visit/List.vue
+37
-12
GeneralFUDetail.vue
src/residentWX/visit/detail/GeneralFUDetail.vue
+0
-0
index.js
src/router/index.js
+3
-3
vue.config.js
vue.config.js
+3
-3
No files found.
src/api/base.js
View file @
384e81b9
...
@@ -29,3 +29,8 @@ export function getAreaChild(parentCode, loading = true) {
...
@@ -29,3 +29,8 @@ export function getAreaChild(parentCode, loading = true) {
export
function
getResidentInfo
(
idCard
)
{
export
function
getResidentInfo
(
idCard
)
{
return
fetchBase
({
url
:
`/tumour-admin/v1/h5-app/residents/
${
idCard
}
`
,
loading
:
true
})
return
fetchBase
({
url
:
`/tumour-admin/v1/h5-app/residents/
${
idCard
}
`
,
loading
:
true
})
}
}
// 居民idCard或者tel查询居民信息
export
function
getResidentByInfo
(
params
)
{
return
fetchBase
({
url
:
`/chronic-resident/v1/chronic-residents-record/query-resident-info-by-id-card`
,
body
:
params
,
loading
:
true
})
}
\ No newline at end of file
src/api/doctor/resident.js
View file @
384e81b9
...
@@ -2,7 +2,6 @@ import {fetchBase} from '@/api/doctor/doctorFetch'
...
@@ -2,7 +2,6 @@ import {fetchBase} from '@/api/doctor/doctorFetch'
// 居民档案ID查询居民信息
// 居民档案ID查询居民信息
export
function
queryResidentInfo
(
params
)
{
export
function
queryResidentInfo
(
params
)
{
debugger
return
fetchBase
({
url
:
`/chronic-admin/v1/chronic-residents-record/detailed`
,
body
:
params
,
loading
:
true
})
return
fetchBase
({
url
:
`/chronic-admin/v1/chronic-residents-record/detailed`
,
body
:
params
,
loading
:
true
})
}
}
...
...
src/api/residentWX/visit.js
0 → 100644
View file @
384e81b9
import
{
fetchBase
}
from
'../fetch.js'
// 查询随访列表
export
function
queryVisitList
(
params
)
{
return
fetchBase
({
url
:
`/chronic-resident/v1/chronic-visit-record/page`
,
body
:
params
,
loading
:
true
})
}
\ No newline at end of file
src/residentWX/ResidentWX.vue
View file @
384e81b9
...
@@ -11,10 +11,9 @@
...
@@ -11,10 +11,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getDict
}
from
'@/api/base.js'
import
{
getDict
,
getResidentByInfo
}
from
'@/api/base.js'
import
{
useStore
}
from
'./store/index.js'
import
{
useStore
}
from
'./store/index.js'
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
import
{
queryResidentInfo
}
from
'@/api/doctor/resident'
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -46,13 +45,7 @@ export default {
...
@@ -46,13 +45,7 @@ export default {
},
},
setup
()
{
setup
()
{
const
store
=
useStore
()
const
store
=
useStore
()
const
baseInfo
=
ref
(
null
)
return
{
store
}
return
{
store
,
baseInfo
}
},
provide
()
{
return
{
getBaseInfo
:
()
=>
this
.
baseInfo
}
},
},
created
()
{
created
()
{
this
.
init
()
this
.
init
()
...
@@ -62,17 +55,10 @@ export default {
...
@@ -62,17 +55,10 @@ export default {
console
.
log
(
this
.
visible
)
console
.
log
(
this
.
visible
)
const
res
=
await
getDict
()
const
res
=
await
getDict
()
this
.
store
.
$patch
({
dict
:
res
.
data
||
{}
})
this
.
store
.
$patch
({
dict
:
res
.
data
||
{}
})
const
user
=
await
getResidentByInfo
({
idCard
:
'21100319900901301X'
})
this
.
store
.
$patch
({
userInfo
:
user
.
data
||
{}
})
this
.
visible
=
true
this
.
visible
=
true
await
this
.
load
()
},
load
()
{
const
query
=
{
residentInfoId
:
'2020761970'
}
queryResidentInfo
(
query
).
then
(
res
=>
{
debugger
this
.
baseInfo
=
res
.
data
||
{}
})
},
},
}
}
}
}
...
...
src/residentWX/store/index.js
View file @
384e81b9
...
@@ -4,7 +4,9 @@ export const useStore = defineStore('chronic', {
...
@@ -4,7 +4,9 @@ export const useStore = defineStore('chronic', {
state
:
()
=>
{
state
:
()
=>
{
return
{
return
{
// 字典
// 字典
dict
:
[]
dict
:
[],
//居民信息
userInfo
:
{}
}
}
},
},
getters
:
{},
getters
:
{},
...
@@ -13,6 +15,10 @@ export const useStore = defineStore('chronic', {
...
@@ -13,6 +15,10 @@ export const useStore = defineStore('chronic', {
if
(
!
dict
)
return
[]
if
(
!
dict
)
return
[]
return
this
.
dict
[
dict
]
||
[]
return
this
.
dict
[
dict
]
||
[]
},
},
getUserInfo
(
info
)
{
if
(
!
info
)
return
{}
return
this
.
userInfo
[
info
]
||
[]
},
getDictValue
(
dict
,
value
)
{
getDictValue
(
dict
,
value
)
{
let
array
=
[]
let
array
=
[]
if
(
typeof
dict
===
'string'
)
{
if
(
typeof
dict
===
'string'
)
{
...
...
src/residentWX/visit/List.vue
View file @
384e81b9
<
template
>
<
template
>
<div
class=
'h-full flex flex-col visit'
>
<div
class=
'h-full flex flex-col visit'
>
<van-tabs
v-model:active=
'activeTab'
class=
'shrink-0'
v-if=
'tabList.length'
<div
class=
"p-3 text-black text-center shrink-0 doc-nav-bar"
>
<span>
慢病筛查记录
</span>
</div>
<van-tabs
v-model:active=
'activeTab'
class=
'shrink-0 '
v-if=
'tabList.length'
@
change=
'tabChange'
@
change=
'tabChange'
shrink
>
shrink
>
<van-tab
v-for=
'item in tabList'
:key=
'item.name'
<van-tab
v-for=
'item in tabList'
:key=
'item.name'
...
@@ -68,9 +71,8 @@
...
@@ -68,9 +71,8 @@
<van-divider
class=
'mt-3'
/>
<van-divider
class=
'mt-3'
/>
<span
class=
'px-3 float-bt'
>
<span
class=
"tag tag-red"
v-show=
"item.serveType == '1'"
>
高危筛查
</span>
通用随访
<span
class=
"tag tag-blue"
v-show=
"item.serveType == '2'"
>
专病筛查
</span>
</span>
</div>
</div>
</van-list>
</van-list>
<div
class=
'text-center shrink-0 empty'
v-if=
'!list.length'
>
<div
class=
'text-center shrink-0 empty'
v-if=
'!list.length'
>
...
@@ -87,12 +89,15 @@
...
@@ -87,12 +89,15 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
queryVisitByPage
,
deleteVisit
}
from
'@/api/doctor/generalFU.js'
import
{
deleteVisit
}
from
'@/api/doctor/generalFU.js'
import
{
showConfirmDialog
,
showToast
}
from
'vant'
import
{
showConfirmDialog
,
showToast
}
from
'vant'
import
{
useStore
}
from
'@/residentWX/store'
import
{
queryVisitList
}
from
'@/api/residentWX/visit'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
store
:
useStore
(),
activeTab
:
undefined
,
activeTab
:
undefined
,
list
:
[],
list
:
[],
pagination
:
{
pagination
:
{
...
@@ -106,10 +111,9 @@ export default {
...
@@ -106,10 +111,9 @@ export default {
isRefreshDisable
:
false
isRefreshDisable
:
false
}
}
},
},
inject
:
[
'getBaseInfo'
],
computed
:
{
computed
:
{
baseInfo
()
{
baseInfo
()
{
return
this
.
getBaseInfo
()
||
{}
return
this
.
store
.
userInfo
},
},
chronicTagsArray
()
{
chronicTagsArray
()
{
let
chronicTagsArray
=
this
.
baseInfo
.
chronicTagsArray
||
''
let
chronicTagsArray
=
this
.
baseInfo
.
chronicTagsArray
||
''
...
@@ -117,7 +121,7 @@ export default {
...
@@ -117,7 +121,7 @@ export default {
},
},
tabList
()
{
tabList
()
{
const
list
=
[
const
list
=
[
{
title
:
'全部'
,
name
:
-
1
,
code
:
''
},
{
title
:
'全部'
,
name
:
undefined
,
code
:
undefined
},
{
title
:
'高血压'
,
name
:
1
,
code
:
'1'
},
{
title
:
'高血压'
,
name
:
1
,
code
:
'1'
},
{
title
:
'糖尿病'
,
name
:
2
,
code
:
'2'
},
{
title
:
'糖尿病'
,
name
:
2
,
code
:
'2'
},
{
title
:
'冠心病'
,
name
:
3
,
code
:
'4'
},
{
title
:
'冠心病'
,
name
:
3
,
code
:
'4'
},
...
@@ -126,11 +130,12 @@ export default {
...
@@ -126,11 +130,12 @@ export default {
{
title
:
'慢性肾病'
,
name
:
6
,
code
:
'32'
},
{
title
:
'慢性肾病'
,
name
:
6
,
code
:
'32'
},
{
title
:
'血脂异常'
,
name
:
7
,
code
:
'64'
}
{
title
:
'血脂异常'
,
name
:
7
,
code
:
'64'
}
]
]
return
list
.
filter
(
e
=>
this
.
chronicTagsArray
.
includes
(
e
.
code
))
let
res
=
list
.
filter
(
e
=>
this
.
chronicTagsArray
.
includes
(
e
.
code
))
||
[]
res
.
unshift
(
{
title
:
'全部'
,
name
:
''
,
code
:
''
})
return
res
}
}
},
},
mounted
()
{
mounted
()
{
debugger
const
list
=
this
.
$refs
.
list
const
list
=
this
.
$refs
.
list
list
.
addEventListener
(
'scroll'
,
()
=>
{
list
.
addEventListener
(
'scroll'
,
()
=>
{
if
(
list
.
scrollTop
>
0
)
{
if
(
list
.
scrollTop
>
0
)
{
...
@@ -142,14 +147,15 @@ export default {
...
@@ -142,14 +147,15 @@ export default {
},
},
methods
:
{
methods
:
{
load
(
loading
=
true
)
{
load
(
loading
=
true
)
{
debugger
const
query
=
{
const
query
=
{
residentInfoId
:
this
.
baseInfo
.
residentInfoId
,
residentInfoId
:
this
.
baseInfo
.
residentInfoId
,
serveTypeList
:
[
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
14
],
diseaseType
:
this
.
activeTab
,
diseaseType
:
this
.
activeTab
,
pageIndex
:
this
.
pagination
.
pageIndex
,
pageIndex
:
this
.
pagination
.
pageIndex
,
pageSize
:
this
.
pagination
.
pageSize
pageSize
:
this
.
pagination
.
pageSize
}
}
queryVisitByPage
(
query
,
loading
).
then
(
res
=>
{
queryVisitList
(
query
,
loading
).
then
(
res
=>
{
debugger
this
.
list
=
this
.
list
.
concat
(
res
.
data
.
dataList
||
[])
this
.
list
=
this
.
list
.
concat
(
res
.
data
.
dataList
||
[])
this
.
pagination
.
total
=
res
.
data
.
total
||
0
this
.
pagination
.
total
=
res
.
data
.
total
||
0
this
.
finished
=
this
.
list
.
length
>=
this
.
pagination
.
total
this
.
finished
=
this
.
list
.
length
>=
this
.
pagination
.
total
...
@@ -272,4 +278,23 @@ export default {
...
@@ -272,4 +278,23 @@ export default {
left: 0;
left: 0;
right: 0;
right: 0;
}
}
.tag {
position: absolute;
top: 8px;
right: 8px;
border-radius: 2px;
padding: 4px 8px;
font-size: 12px;
}
.tag-red {
border: 1px solid #FFA39E;
color: #F5222D;
background-color: #FFF1F0;
}
.tag-blue {
border: 1px solid #ADC6FF;
color: #2F54EB;
background-color: #F0F5FF;
}
</
style
>
</
style
>
src/residentWX/visit/detail/
Currency
FUDetail.vue
→
src/residentWX/visit/detail/
General
FUDetail.vue
View file @
384e81b9
File moved
src/router/index.js
View file @
384e81b9
...
@@ -114,9 +114,9 @@ const routes = [
...
@@ -114,9 +114,9 @@ const routes = [
component
:
()
=>
import
(
/* webpackChunkName: "residentWX-visit" */
'@/residentWX/visit/List.vue'
)
component
:
()
=>
import
(
/* webpackChunkName: "residentWX-visit" */
'@/residentWX/visit/List.vue'
)
},
},
{
{
path
:
'visit/
currency
FUDetail/:id'
,
path
:
'visit/
General
FUDetail/:id'
,
name
:
'resident-visit-
currency
FUDetail'
,
name
:
'resident-visit-
General
FUDetail'
,
component
:
()
=>
import
(
/* webpackChunkName: "residentWX-screening" */
'@/residentWX/visit/detail/
Currency
FUDetail.vue'
)
component
:
()
=>
import
(
/* webpackChunkName: "residentWX-screening" */
'@/residentWX/visit/detail/
General
FUDetail.vue'
)
},
},
// 健康指导宣教
// 健康指导宣教
{
{
...
...
vue.config.js
View file @
384e81b9
...
@@ -39,11 +39,11 @@ module.exports = defineConfig({
...
@@ -39,11 +39,11 @@ module.exports = defineConfig({
}
}
},
},
'/chronic-resident'
:
{
'/chronic-resident'
:
{
// target: 'http://192.168.1.43
:8903',
target
:
'http://192.168.1.174
: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