Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
contraceptives_app
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
ynby
contraceptives_app
Commits
f70ccb26
Commit
f70ccb26
authored
Oct 23, 2020
by
gengchunlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
扫一扫修改
parent
05b02f17
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
71 additions
and
51 deletions
+71
-51
api.js
src/utils/api.js
+2
-2
choiceContraceptives.vue
src/views/choiceContraceptives.vue
+27
-14
collectRecords.vue
src/views/collectRecords.vue
+5
-2
myMap.vue
src/views/myMap.vue
+22
-28
receiveSuccess.vue
src/views/receiveSuccess.vue
+5
-2
returnVisit.vue
src/views/returnVisit.vue
+5
-1
siteDetails.vue
src/views/siteDetails.vue
+5
-2
No files found.
src/utils/api.js
View file @
f70ccb26
...
@@ -35,7 +35,7 @@ export const getStockInfo = params => {
...
@@ -35,7 +35,7 @@ export const getStockInfo = params => {
return
apiInstance
.
get
(
`/stock-info/v1/stock-info/stock-basic-info/basic-info`
,
{
params
})
return
apiInstance
.
get
(
`/stock-info/v1/stock-info/stock-basic-info/basic-info`
,
{
params
})
}
}
//
用户领取次数
//
判断用户首次领取是否已填随访
export
const
getUserReceiveNum
=
params
=>
{
export
const
getUserReceiveNum
=
params
=>
{
return
apiInstance
.
get
(
`/stock-info/v1/stock-info/stock-provide-record/number/
${
params
.
residentId
}
`
,
{
params
})
return
apiInstance
.
get
(
`/stock-info/v1/stock-info/stock-provide-record/number/
${
params
.
residentId
}
`
,
{
params
})
}
}
...
@@ -46,6 +46,6 @@ export const addVisitRecord = params => {
...
@@ -46,6 +46,6 @@ export const addVisitRecord = params => {
}
}
//确认领取药具
//确认领取药具
export
const
getMedical
=
params
=>
{
export
const
addMedicalRecord
=
params
=>
{
return
apiInstance
.
post
(
`/stock-info/v1/stock-info/stock-provide-record`
,
params
)
return
apiInstance
.
post
(
`/stock-info/v1/stock-info/stock-provide-record`
,
params
)
}
}
src/views/choiceContraceptives.vue
View file @
f70ccb26
<
template
>
<
template
>
<div
class=
"choiceContraceptives"
>
<div
class=
"choiceContraceptives"
>
<mt-header
title=
"选择药具"
>
<mt-header
title=
"选择药具"
>
<
router-link
to=
"/"
slot=
"left
"
>
<
div
slot=
"left"
@
click=
"goBack
"
>
<mt-button
icon=
"back"
></mt-button>
<mt-button
icon=
"back"
></mt-button>
</
router-link
>
</
div
>
</mt-header>
</mt-header>
<div
class=
"content-list"
v-if=
"!noDataShow"
>
<div
class=
"content-list"
v-if=
"!noDataShow"
>
<div
<div
...
@@ -53,9 +53,9 @@
...
@@ -53,9 +53,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getMedical
,
getStockInfo
}
from
"../utils/api"
;
import
{
addMedicalRecord
,
getStockInfo
}
from
"../utils/api"
;
import
{
callMobile
}
from
"../utils/common"
;
import
{
callMobile
}
from
"../utils/common"
;
import
{
MessageBox
}
from
'mint-ui'
;
export
default
{
export
default
{
name
:
"choiceContraceptives"
,
name
:
"choiceContraceptives"
,
data
(){
data
(){
...
@@ -75,13 +75,8 @@
...
@@ -75,13 +75,8 @@
methods
:{
methods
:{
getStockListInfo
(
callBack
)
{
getStockListInfo
(
callBack
)
{
this
.
routerDetail
=
JSON
.
parse
(
this
.
$route
.
query
.
info
)
this
.
routerDetail
=
JSON
.
parse
(
this
.
$route
.
query
.
info
)
Toast
({
message
:
'测试'
+
this
.
routerDetail
,
position
:
'bottom'
,
duration
:
5000
});
let
par
=
{
let
par
=
{
relationId
:
4
,
relationId
:
this
.
routerDetail
,
...
this
.
param
...
this
.
param
}
}
getStockInfo
(
par
).
then
(({
data
=
{}})
=>
{
getStockInfo
(
par
).
then
(({
data
=
{}})
=>
{
...
@@ -110,16 +105,34 @@
...
@@ -110,16 +105,34 @@
backHome
(){
backHome
(){
callMobile
(
"goIndex"
,
{});
callMobile
(
"goIndex"
,
{});
},
},
goBack
()
{
window
.
history
.
go
(
-
1
)
},
receiveContraceptives
(){
receiveContraceptives
(){
let
pars
=
JSON
.
parse
(
this
.
checkedMedical
)
let
pars
=
JSON
.
parse
(
this
.
checkedMedical
)
let
info
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'mobileTokenIno'
))
const
{
phone
=
''
,
userId
=
''
}
=
info
const
{
id
,
...
other
}
=
pars
let
par
=
{
let
par
=
{
residentId
:
1
,
residentId
:
userId
,
networkId
:
4
,
telephone
:
phone
,
...
pars
networkId
:
this
.
routerDetail
,
...
other
}
}
getMedical
(
par
).
then
(({
data
})
=>
{
addMedicalRecord
(
par
).
then
(({
data
})
=>
{
if
(
data
.
code
==
'SUCCESS'
)
{
if
(
data
.
code
==
'SUCCESS'
)
{
Toast
({
message
:
'领取成功!'
,
position
:
'bottom'
,
duration
:
2000
});
this
.
$router
.
push
(
"/receiveSuccess"
);
this
.
$router
.
push
(
"/receiveSuccess"
);
}
else
{
Toast
({
message
:
'系统异常,请联系管理员!'
,
position
:
'bottom'
,
duration
:
2000
});
}
}
})
})
...
...
src/views/collectRecords.vue
View file @
f70ccb26
<
template
>
<
template
>
<div>
<div>
<mt-header
title=
"领取记录"
>
<mt-header
title=
"领取记录"
>
<
router-link
to=
"/"
slot=
"left
"
>
<
div
slot=
"left"
@
click=
"goBack
"
>
<mt-button
icon=
"back"
></mt-button>
<mt-button
icon=
"back"
></mt-button>
</
router-link
>
</
div
>
</mt-header>
</mt-header>
<div>
<div>
...
@@ -103,6 +103,9 @@
...
@@ -103,6 +103,9 @@
this
.
getRecordInfo
()
this
.
getRecordInfo
()
}
}
},
},
goBack
()
{
window
.
history
.
go
(
-
1
)
},
beforeDestroy
()
{
beforeDestroy
()
{
this
.
detailInfo
=
[]
this
.
detailInfo
=
[]
}
}
...
...
src/views/myMap.vue
View file @
f70ccb26
<
template
>
<
template
>
<div
class=
"myMap"
>
<div
class=
"myMap"
>
<mt-header
title=
"药具领取"
>
<mt-header
title=
"药具领取"
>
<
router-link
to=
"/"
slot=
"left
"
>
<
div
slot=
"left"
@
click=
"toRealHome
"
>
<mt-button
icon=
"back"
></mt-button>
<mt-button
icon=
"back"
></mt-button>
</
router-link
>
</
div
>
</mt-header>
</mt-header>
<div
id=
"map-container"
class=
"containerMap"
></div>
<div
id=
"map-container"
class=
"containerMap"
></div>
<div
class=
"scanCode"
>
<div
class=
"scanCode"
>
...
@@ -39,10 +39,9 @@
...
@@ -39,10 +39,9 @@
import
closeImg
from
'../assets/img/close.png'
;
import
closeImg
from
'../assets/img/close.png'
;
import
presonImg
from
'../assets/img/preson.png'
;
import
presonImg
from
'../assets/img/preson.png'
;
import
sharpImg
from
'../assets/img/sharp.png'
;
import
sharpImg
from
'../assets/img/sharp.png'
;
import
{
MessageBox
}
from
'mint-ui'
;
import
{
getNetworkInfo
,
getUserReceiveNum
}
from
'../utils/api'
;
import
{
getNetworkInfo
,
getUserReceiveNum
}
from
'../utils/api'
;
import
{
callMobile
,
getQueryVariable
}
from
"../utils/common"
;
import
{
callMobile
,
getQueryVariable
}
from
"../utils/common"
;
import
{
Toast
}
from
'mint-ui'
;
import
{
MessageBox
}
from
'mint-ui'
;
export
default
{
export
default
{
name
:
"myMap"
,
name
:
"myMap"
,
data
()
{
data
()
{
...
@@ -60,10 +59,10 @@
...
@@ -60,10 +59,10 @@
mounted
()
{
mounted
()
{
this
.
createMap
();
this
.
createMap
();
// 将qrcodeContent方法绑定到window下面,提供给外部调用
// 将qrcodeContent方法绑定到window下面,提供给外部调用
document
.
addEventListener
(
"qrcodeContent"
,
this
.
subscanQRCallBack
);
let
vm
=
this
},
window
[
'qrcodeContent'
]
=
(
result
)
=>
{
beforeDestroy
()
{
//销毁
vm
.
subscanQRCallBack
(
result
)
document
.
removeEventListener
(
"qrcodeContent"
,
this
.
subscanQRCallBack
);
}
},
},
methods
:
{
methods
:
{
// 接收url后的数据
// 接收url后的数据
...
@@ -79,29 +78,24 @@
...
@@ -79,29 +78,24 @@
window
.
sessionStorage
.
setItem
(
'mobileTokenIno'
,
JSON
.
stringify
(
mobileTokenIno
))
window
.
sessionStorage
.
setItem
(
'mobileTokenIno'
,
JSON
.
stringify
(
mobileTokenIno
))
},
},
ScanCode
()
{
ScanCode
()
{
callMobile
(
"qrcode"
,
{});
let
info
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'mobileTokenIno'
))
},
const
{
phone
=
''
,
userId
=
''
}
=
info
async
subscanQRCallBack
(
result
){
let
par
=
{
telephone
:
phone
,
residentId
:
userId
}
//居民id
/*先判断是否有没有回访的领取记录*/
getUserReceiveNum
(
par
).
then
(({
data
})
=>
{
let
par
=
{
residentId
:
1
}
//居民id
if
(
data
.
data
==
true
)
{
await
getUserReceiveNum
(
par
).
then
(({
data
})
=>
{
callMobile
(
"qrcode"
,
{});
this
.
recordNum
=
data
.
data
}
else
{
})
this
.
$router
.
push
(
`/returnVisit`
);
Toast
({
}
message
:
'ceshi'
+
this
.
recordNum
,
position
:
'top'
,
duration
:
100000
});
if
(
this
.
recordNum
=
0
)
{
this
.
$router
.
push
({
path
:
`/choiceContraceptives`
,
query
:{
info
:
result
}});
}
else
{
this
.
$router
.
push
({
path
:
`/returnVisit`
,
query
:{
info
:
result
}});
}
})
},
subscanQRCallBack
(
result
){
this
.
$router
.
push
({
path
:
`/choiceContraceptives`
,
query
:{
info
:
result
}});
},
},
toCollectRecords
()
{
toCollectRecords
()
{
this
.
$router
.
push
({
path
:
`/returnVisit`
,
query
:{
info
:
4
}});
// this.$router.push({path: `/choiceContraceptives`,query:{info:1986
}});
//
this.$router.push('/collectRecords');
this
.
$router
.
push
(
'/collectRecords'
);
},
},
toRealHome
()
{
toRealHome
()
{
callMobile
(
"goIndex"
,
{});
callMobile
(
"goIndex"
,
{});
...
...
src/views/receiveSuccess.vue
View file @
f70ccb26
<
template
>
<
template
>
<div>
<div>
<mt-header
title=
"领取成功"
>
<mt-header
title=
"领取成功"
>
<
router-link
to=
"/"
slot=
"left
"
>
<
div
slot=
"left"
@
click=
"goBack
"
>
<mt-button
icon=
"back"
></mt-button>
<mt-button
icon=
"back"
></mt-button>
</
router-link
>
</
div
>
</mt-header>
</mt-header>
<div
class=
"success-img"
>
<div
class=
"success-img"
>
<img
src=
"../assets/img/receiveSuccess.png"
/>
<img
src=
"../assets/img/receiveSuccess.png"
/>
...
@@ -23,6 +23,9 @@
...
@@ -23,6 +23,9 @@
export
default
{
export
default
{
name
:
"receiveSuccess"
,
name
:
"receiveSuccess"
,
methods
:{
methods
:{
goBack
()
{
window
.
history
.
go
(
-
1
)
},
backHome
(){
backHome
(){
callMobile
(
"goIndex"
,
{});
callMobile
(
"goIndex"
,
{});
}
}
...
...
src/views/returnVisit.vue
View file @
f70ccb26
...
@@ -122,7 +122,11 @@
...
@@ -122,7 +122,11 @@
/*验证完毕*/
/*验证完毕*/
if
(
flag
){
if
(
flag
){
let
badInfo
=
this
.
formData
.
badReaction
.
join
()
let
badInfo
=
this
.
formData
.
badReaction
.
join
()
let
info
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'mobileTokenIno'
))
const
{
phone
=
''
,
userId
=
''
}
=
info
let
par
=
{
let
par
=
{
residentId
:
userId
,
telephone
:
phone
,
satisfied
:
this
.
formData
.
isAgree
,
satisfied
:
this
.
formData
.
isAgree
,
satisfiedReason
:
this
.
formData
.
disagreeReason
,
satisfiedReason
:
this
.
formData
.
disagreeReason
,
bad
:
this
.
formData
.
isBadReaction
,
bad
:
this
.
formData
.
isBadReaction
,
...
@@ -136,7 +140,7 @@
...
@@ -136,7 +140,7 @@
position
:
'bottom'
,
position
:
'bottom'
,
duration
:
2000
duration
:
2000
});
});
this
.
$router
.
push
(
"/"
);
window
.
history
.
go
(
-
1
)
}
else
{
}
else
{
Toast
({
Toast
({
message
:
'失败,请联系管理员!'
,
message
:
'失败,请联系管理员!'
,
...
...
src/views/siteDetails.vue
View file @
f70ccb26
<
template
>
<
template
>
<div
class=
"siteDetails"
>
<div
class=
"siteDetails"
>
<mt-header
title=
"网点详情"
>
<mt-header
title=
"网点详情"
>
<
router-link
to=
"/"
slot=
"left
"
>
<
div
slot=
"left"
@
click=
"goBack
"
>
<mt-button
icon=
"back"
></mt-button>
<mt-button
icon=
"back"
></mt-button>
</
router-link
>
</
div
>
</mt-header>
</mt-header>
<div
class=
"siteDetailInfo"
>
<div
class=
"siteDetailInfo"
>
<div
class=
"siteName"
>
{{
siteDetail
.
netName
}}
</div>
<div
class=
"siteName"
>
{{
siteDetail
.
netName
}}
</div>
...
@@ -147,6 +147,9 @@
...
@@ -147,6 +147,9 @@
clickPhone
()
{
clickPhone
()
{
console
.
log
(
456
);
console
.
log
(
456
);
},
},
goBack
()
{
window
.
history
.
go
(
-
1
)
},
getDistance
(
latFrom
,
lngFrom
,
latTo
,
lngTo
)
{
getDistance
(
latFrom
,
lngFrom
,
latTo
,
lngTo
)
{
var
rad
=
function
(
d
)
{
//计算角度
var
rad
=
function
(
d
)
{
//计算角度
return
d
*
Math
.
PI
/
180.0
;
return
d
*
Math
.
PI
/
180.0
;
...
...
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