Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WX_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
godwithdh
WX_h5
Commits
035c5ad2
Commit
035c5ad2
authored
5 years ago
by
张锡奇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uploda
parent
45980e3b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
521 additions
and
19 deletions
+521
-19
healthApi.js
src/libs/healthApi.js
+4
-1
host.js
src/libs/host.js
+2
-2
health.js
src/router/health.js
+26
-3
statistics.js
src/store/modules/health/statistics.js
+8
-1
return.png
src/view/healthCard/image/return.png
+0
-0
return_active.png
src/view/healthCard/image/return_active.png
+0
-0
index.vue
src/view/healthCard/index.vue
+67
-10
index.vue
src/view/healthCard/returnTrack/index.vue
+412
-0
index.vue
src/view/healthCard/statistics/index.vue
+2
-2
No files found.
src/libs/healthApi.js
View file @
035c5ad2
...
@@ -3,5 +3,8 @@ module.exports = {
...
@@ -3,5 +3,8 @@ module.exports = {
saveHealth
:{
url
:
"/healthlog/save/"
,
method
:
"post"
,
host
:
"health"
},
saveHealth
:{
url
:
"/healthlog/save/"
,
method
:
"post"
,
host
:
"health"
},
getHealthEmploee
:{
url
:
"/healthemploee"
,
method
:
"post"
,
host
:
"health"
},
getHealthEmploee
:{
url
:
"/healthemploee"
,
method
:
"post"
,
host
:
"health"
},
getExcel
:{
url
:
"/sendmessage/excel/"
,
method
:
"get"
,
host
:
"health"
},
getExcel
:{
url
:
"/sendmessage/excel/"
,
method
:
"get"
,
host
:
"health"
},
getHealthbacklog
:{
url
:
"/healthbacklog/"
,
method
:
"post"
,
host
:
"health"
},
saveHealthbacklog
:{
url
:
"/healthbacklog/save/"
,
method
:
"post"
,
host
:
"health"
},
getHealthcompany
:{
url
:
"/healthcompany/"
,
method
:
"post"
,
host
:
"health"
},
saveHealthemploee
:{
url
:
"/healthemploee/save/"
,
method
:
"post"
,
host
:
"health"
},
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/libs/host.js
View file @
035c5ad2
...
@@ -31,8 +31,8 @@ function urlFun(name){
...
@@ -31,8 +31,8 @@ function urlFun(name){
/**
/**
* 健康打卡统计
* 健康打卡统计
*/
*/
health
:
`https://weixin.huansi.net/apiproxy/huansi/service/proxy/1225621052093239296`
,
//
health:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/1225621052093239296`,
//
health:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/1227787695263191040`, //测试地址
health
:
`https://weixin.huansi.net/apiproxy/huansi/service/proxy/1227787695263191040`
,
//测试地址
// health:`http://xuxiaoming.vaiwan.com`
// health:`http://xuxiaoming.vaiwan.com`
}
}
return
url
[
name
]
return
url
[
name
]
...
...
This diff is collapsed.
Click to expand it.
src/router/health.js
View file @
035c5ad2
...
@@ -24,7 +24,9 @@ module.exports = [
...
@@ -24,7 +24,9 @@ module.exports = [
name
:
'healthCardStatisticsIndex'
,
name
:
'healthCardStatisticsIndex'
,
component
:()
=>
import
(
'@/view/healthCard/statistics/index.vue'
),
component
:()
=>
import
(
'@/view/healthCard/statistics/index.vue'
),
meta
:{
meta
:{
title
:
'健康打卡'
title
:
'健康打卡'
,
showTabbar
:
true
,
activeTab
:
2
}
}
},
},
{
{
...
@@ -32,7 +34,9 @@ module.exports = [
...
@@ -32,7 +34,9 @@ module.exports = [
name
:
'healthCardStatisticsChart'
,
name
:
'healthCardStatisticsChart'
,
component
:()
=>
import
(
'@/view/healthCard/statistics/chart.vue'
),
component
:()
=>
import
(
'@/view/healthCard/statistics/chart.vue'
),
meta
:{
meta
:{
title
:
'健康打卡'
title
:
'健康打卡'
,
showTabbar
:
true
,
activeTab
:
2
}
}
},
},
{
{
...
@@ -40,7 +44,9 @@ module.exports = [
...
@@ -40,7 +44,9 @@ module.exports = [
name
:
'healthCardStatisticsList'
,
name
:
'healthCardStatisticsList'
,
component
:()
=>
import
(
'@/view/healthCard/statistics/list.vue'
),
component
:()
=>
import
(
'@/view/healthCard/statistics/list.vue'
),
meta
:{
meta
:{
title
:
'健康打卡'
title
:
'健康打卡'
,
showTabbar
:
true
,
activeTab
:
2
}
}
}
}
]
]
...
@@ -67,5 +73,22 @@ module.exports = [
...
@@ -67,5 +73,22 @@ module.exports = [
}
}
}
}
]
]
},
{
//返程
name
:
'healthCard'
,
component
:
()
=>
import
(
'@/view/healthCard/index.vue'
),
path
:
'/healthCard'
,
children
:[
{
path
:
'returnTrack/index/:iEmploeeId/:iCompanyId'
,
name
:
'healthCardReturnTrack'
,
component
:()
=>
import
(
'@/view/healthCard/returnTrack/index.vue'
),
meta
:{
title
:
'返程'
,
showTabbar
:
true
,
activeTab
:
1
}
},
]
}
}
]
]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/store/modules/health/statistics.js
View file @
035c5ad2
...
@@ -5,7 +5,8 @@ const obj = {
...
@@ -5,7 +5,8 @@ const obj = {
state
:
{
state
:
{
hdr
:{},
hdr
:{},
dtl
:{},
dtl
:{},
openId
:
''
openId
:
''
,
baseData
:{}
},
},
mutations
:
{
mutations
:
{
saveHealthStatisticsHdr
(
state
,
data
){
saveHealthStatisticsHdr
(
state
,
data
){
...
@@ -16,6 +17,9 @@ const obj = {
...
@@ -16,6 +17,9 @@ const obj = {
},
},
saveHealthStatisticsOpen
(
state
,
data
){
saveHealthStatisticsOpen
(
state
,
data
){
state
.
openId
=
data
;
state
.
openId
=
data
;
},
saveHealthBaseData
(
state
,
data
){
state
.
baseData
=
data
;
}
}
},
},
actions
:
{
actions
:
{
...
@@ -28,6 +32,9 @@ const obj = {
...
@@ -28,6 +32,9 @@ const obj = {
saveHealthStatisticsOpen
({
commit
},
data
){
saveHealthStatisticsOpen
({
commit
},
data
){
commit
(
'saveHealthStatisticsOpen'
,
data
);
commit
(
'saveHealthStatisticsOpen'
,
data
);
},
},
saveHealthBaseData
({
commit
},
data
){
commit
(
'saveHealthBaseData'
,
data
)
}
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/view/healthCard/image/return.png
0 → 100644
View file @
035c5ad2
6.54 KB
This diff is collapsed.
Click to expand it.
src/view/healthCard/image/return_active.png
0 → 100644
View file @
035c5ad2
6.76 KB
This diff is collapsed.
Click to expand it.
src/view/healthCard/index.vue
View file @
035c5ad2
...
@@ -28,19 +28,19 @@
...
@@ -28,19 +28,19 @@
<router-view></router-view>
<router-view></router-view>
</keep-alive>
</keep-alive>
</div>
</div>
<div
class=
"TABBAR"
>
<div
class=
"TABBAR"
v-if=
"showTabbar"
>
<tabbar
tabbar-text-active-color=
"#3e68f3"
v-if=
"showTabbar"
>
<tabbar
tabbar-text-active-color=
"#3e68f3"
>
<tabbar-item
:selected=
'activeTab == 0'
@
on-item-click=
"clickTabbar(0)"
>
<tabbar-item
:selected=
'activeTab == 0'
@
on-item-click=
"clickTabbar(0)"
>
<img
slot=
"icon"
src=
"./image/home.png"
>
<img
slot=
"icon"
src=
"./image/home.png"
>
<img
slot=
"icon-active"
src=
"./image/home_active.png"
>
<img
slot=
"icon-active"
src=
"./image/home_active.png"
>
<span
slot=
"label"
:style=
"
{'color':activeTab == 0 ? '#3e69f3' : '#999999'}">首页
</span>
<span
slot=
"label"
:style=
"
{'color':activeTab == 0 ? '#3e69f3' : '#999999'}">首页
</span>
</tabbar-item>
</tabbar-item>
<
!--
<
tabbar-item
:selected=
'activeTab == 1'
@
on-item-click=
"clickTabbar(1)"
>
<tabbar-item
:selected=
'activeTab == 1'
@
on-item-click=
"clickTabbar(1)"
>
<img
slot=
"icon"
src=
"./image/
home
.png"
>
<img
slot=
"icon"
src=
"./image/
return
.png"
>
<img
slot=
"icon-active"
src=
"./image/
home
_active.png"
>
<img
slot=
"icon-active"
src=
"./image/
return
_active.png"
>
<span
slot=
"label"
:style=
"
{'color':activeTab == 1 ? '#3e69f3' : '#999999'}">返程
</span>
<span
slot=
"label"
:style=
"
{'color':activeTab == 1 ? '#3e69f3' : '#999999'}">返程
</span>
</tabbar-item>
-->
</tabbar-item>
<tabbar-item
:selected=
'activeTab == 2'
@
on-item-click=
"clickTabbar(2)"
>
<tabbar-item
:selected=
'activeTab == 2'
@
on-item-click=
"clickTabbar(2)"
v-if=
"baseData.bAdminUsers || baseData.bSystem == 1"
>
<img
slot=
"icon"
src=
"./image/statistics.png"
>
<img
slot=
"icon"
src=
"./image/statistics.png"
>
<img
slot=
"icon-active"
src=
"./image/statistics_active.png"
>
<img
slot=
"icon-active"
src=
"./image/statistics_active.png"
>
<span
slot=
"label"
:style=
"
{'color':activeTab == 2 ? '#3e69f3' : '#999999'}">统计
</span>
<span
slot=
"label"
:style=
"
{'color':activeTab == 2 ? '#3e69f3' : '#999999'}">统计
</span>
...
@@ -58,24 +58,47 @@
...
@@ -58,24 +58,47 @@
<
script
>
<
script
>
import
{
Tabbar
,
TabbarItem
}
from
'vux'
import
{
Tabbar
,
TabbarItem
}
from
'vux'
import
{
mapState
}
from
'vuex'
;
export
default
{
export
default
{
name
:
'healthCard'
,
name
:
'healthCard'
,
data
()
{
data
()
{
return
{
return
{
activeTab
:
'2'
,
activeTab
:
'2'
,
showTabbar
:
false
showTabbar
:
false
,
}
}
},
},
computed
:{
...
mapState
({
openId
:
state
=>
state
.
healthStatistics
.
openId
,
baseData
:
state
=>
state
.
healthStatistics
.
baseData
,
})
},
created
(){
created
(){
this
.
showTabbar
=
this
.
$route
.
path
.
indexOf
(
'/healthCard/statistics'
)
==
-
1
?
false
:
true
;
window
.
d
=
this
;
this
.
showTabbar
=
this
.
$route
.
meta
.
showTabbar
;
this
.
activeTab
=
this
.
$route
.
meta
.
activeTab
;
},
},
components
:{
components
:{
Tabbar
,
TabbarItem
Tabbar
,
TabbarItem
},
},
watch
:{
$route
(
to
,
from
){
this
.
showTabbar
=
this
.
$route
.
meta
.
showTabbar
;
this
.
activeTab
=
this
.
$route
.
meta
.
activeTab
;
},
'openId'
:{
deep
:
true
,
handler
:
function
(
newV
,
oldV
){
if
(
newV
!=
oldV
){
this
.
getHealthcompany
();
}
}
}
},
methods
:{
methods
:{
clickTabbar
(
activeTab
){
clickTabbar
(
activeTab
){
this
.
activeTab
=
activeTab
;
if
(
this
.
activeTab
==
activeTab
)
return
false
;
switch
(
activeTab
){
switch
(
activeTab
){
case
0
:
case
0
:
wx
.
miniProgram
.
switchTab
({
wx
.
miniProgram
.
switchTab
({
...
@@ -83,6 +106,26 @@ export default {
...
@@ -83,6 +106,26 @@ export default {
})
})
break
;
break
;
case
1
:
case
1
:
this
.
$router
.
push
({
name
:
'healthCardReturnTrack'
,
params
:{
iEmploeeId
:
this
.
baseData
.
iEmploeeId
,
iCompanyId
:
this
.
baseData
.
iCompanyId
,
},
query
:{
openId
:
this
.
baseData
.
openId
}
})
break
;
case
2
:
this
.
$router
.
push
({
name
:
'healthCardStatisticsIndex'
,
query
:{
iEmploeeId
:
this
.
baseData
.
iEmploeeId
,
iCompanyId
:
this
.
baseData
.
iCompanyId
,
openId
:
this
.
baseData
.
openId
}
})
break
;
break
;
case
3
:
case
3
:
wx
.
miniProgram
.
switchTab
({
wx
.
miniProgram
.
switchTab
({
...
@@ -92,6 +135,20 @@ export default {
...
@@ -92,6 +135,20 @@ export default {
default
:
default
:
break
;
break
;
}
}
this
.
activeTab
=
activeTab
;
},
async
getHealthcompany
(){
let
result
=
await
this
.
request
(
'getHealthcompany'
,{
data
:[
{
key
:
"url"
,
value
:
"check_bhavecompany"
},
{
key
:
"openid"
,
value
:
this
.
openId
}
]
})
if
(
result
&&
result
.
length
>
0
){
result
[
0
].
iEmploeeId
=
result
[
0
].
iIden
;
result
[
0
].
openId
=
result
[
0
].
sCreateAppid
;
this
.
$store
.
dispatch
(
'saveHealthBaseData'
,
result
[
0
]);
}
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/view/healthCard/returnTrack/index.vue
0 → 100644
View file @
035c5ad2
This diff is collapsed.
Click to expand it.
src/view/healthCard/statistics/index.vue
View file @
035c5ad2
...
@@ -106,8 +106,8 @@
...
@@ -106,8 +106,8 @@
<
template
>
<
template
>
<div
id=
"healthCardStatisticsIndex"
>
<div
id=
"healthCardStatisticsIndex"
>
<div
class=
"items"
>
<div
class=
"items"
v-if=
"list.length > 0"
>
<div
class=
"item"
v-for=
"(item,index) in list"
:key=
"index"
@
click=
"routerToChart(item)"
>
<div
class=
"item"
v-for=
"(item,index) in list"
:key=
"index"
@
click=
"routerToChart(item)"
>
<div
class=
"HEAD"
>
<div
class=
"HEAD"
>
<div
class=
"left"
>
<div
class=
"left"
>
<span>
{{
item
.
iAllJoin
}}
/
{{
item
.
iAll
}}
</span>
<span>
{{
item
.
iAllJoin
}}
/
{{
item
.
iAll
}}
</span>
...
...
This diff is collapsed.
Click to expand it.
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