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
e1ee5b93
Commit
e1ee5b93
authored
Feb 20, 2020
by
godwithdh
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://47.110.145.204:8085/godwithdh/wx_h5
parents
cec9787d
db733ec4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
504 additions
and
411 deletions
+504
-411
App.vue
src/App.vue
+1
-1
health.js
src/router/health.js
+1
-1
index.vue
src/view/healthCard/index.vue
+2
-1
chart.vue
src/view/healthCard/returnTrack/chart.vue
+138
-113
index.vue
src/view/healthCard/returnTrack/index.vue
+72
-24
index.vue
src/view/healthCard/statistics/index.vue
+181
-109
temp.vue
src/view/healthCard/statistics/temp.vue
+109
-162
No files found.
src/App.vue
View file @
e1ee5b93
<
template
>
<
template
>
<div
id=
"app"
>
<div
id=
"app"
>
<v-app>
<v-app>
<keep-alive>
<keep-alive
>
<router-view
v-wechat-title=
"$route.meta.title"
/>
<router-view
v-wechat-title=
"$route.meta.title"
/>
</keep-alive>
</keep-alive>
</v-app>
</v-app>
...
...
src/router/health.js
View file @
e1ee5b93
...
@@ -96,7 +96,7 @@ module.exports = [
...
@@ -96,7 +96,7 @@ module.exports = [
meta
:{
meta
:{
title
:
'返程统计'
,
title
:
'返程统计'
,
showTabbar
:
true
,
showTabbar
:
true
,
activeTab
:
1
activeTab
:
2
}
}
},
},
]
]
...
...
src/view/healthCard/index.vue
View file @
e1ee5b93
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<div
class=
"vApp"
>
<div
class=
"vApp"
>
<div
class=
"keepAlive"
>
<div
class=
"keepAlive"
>
<keep-alive>
<keep-alive>
<router-view></router-view>
<router-view
></router-view>
</keep-alive>
</keep-alive>
</div>
</div>
<div
class=
"TABBAR"
v-if=
"showTabbar"
>
<div
class=
"TABBAR"
v-if=
"showTabbar"
>
...
@@ -147,6 +147,7 @@ export default {
...
@@ -147,6 +147,7 @@ export default {
if
(
result
&&
result
.
length
>
0
){
if
(
result
&&
result
.
length
>
0
){
result
[
0
].
iEmploeeId
=
result
[
0
].
iIden
;
result
[
0
].
iEmploeeId
=
result
[
0
].
iIden
;
result
[
0
].
openId
=
result
[
0
].
sCreateAppid
;
result
[
0
].
openId
=
result
[
0
].
sCreateAppid
;
result
[
0
].
bBackFromother
=
result
[
0
].
bBackFromother
?
'true'
:
'false'
;
this
.
$store
.
dispatch
(
'saveHealthBaseData'
,
result
[
0
]);
this
.
$store
.
dispatch
(
'saveHealthBaseData'
,
result
[
0
]);
}
}
}
}
...
...
src/view/healthCard/returnTrack/chart.vue
View file @
e1ee5b93
This diff is collapsed.
Click to expand it.
src/view/healthCard/returnTrack/index.vue
View file @
e1ee5b93
...
@@ -149,24 +149,24 @@
...
@@ -149,24 +149,24 @@
</
style
>
</
style
>
<
template
>
<
template
>
<div
id=
"healthCardReturnTrack"
>
<div
id=
"healthCardReturnTrack"
>
<div
class=
"editArea"
v-if=
"showEditArea"
>
<div
class=
"editArea"
v-if=
"showEditArea
&& !readOnly
"
>
<i
class=
'iconfont icon-banben'
></i>
<i
class=
'iconfont icon-banben'
></i>
<span>
表单已填写
</span>
<span>
表单已填写
</span>
<div
class=
"editBtn"
>
<div
class=
"editBtn"
>
<span
@
click=
"edit"
>
我要修改
</span>
<span
@
click=
"edit"
>
我要修改
</span>
</div>
</div>
</div>
</div>
<div
class=
"iCard"
:style=
"
{'margin-bottom':'10px','margin-top':showEditArea ? '0' : '8px'}">
<div
class=
"iCard"
:style=
"
{'margin-bottom':'10px','margin-top':showEditArea
&&
!readOnly
? '0' : '8px'}">
<div
class=
"list"
>
<div
class=
"list"
>
<div
class=
"tip"
>
1. 是否从其他城市返回
<span
style=
"color:red;"
>
*
</span></div>
<div
class=
"tip"
>
1. 是否从其他城市返回
<span
style=
"color:red;"
>
*
</span></div>
<v-radio-group
v-model=
"baseData.bBackFromother"
:disabled=
"
!!baseData.bBackFromother
"
@
change=
"changeRadio"
>
<v-radio-group
v-model=
"baseData.bBackFromother"
:disabled=
"
baseData.bBackFromother == 'true' ? (showEditArea || submitForm.length > 0) : showEditArea
"
@
change=
"changeRadio"
>
<div
style=
"margin-bottom:10px;"
><v-radio
value=
"
1
"
label=
"从其他城市返回"
/></div>
<div
style=
"margin-bottom:10px;"
><v-radio
value=
"
true
"
label=
"从其他城市返回"
/></div>
<div><v-radio
value=
"
0
"
label=
"一直在工作地,无需返程"
/></div>
<div><v-radio
value=
"
false
"
label=
"一直在工作地,无需返程"
/></div>
</v-radio-group>
</v-radio-group>
</div>
</div>
</div>
</div>
<div
class=
"CONTENT"
v-if=
"baseData.bBackFromother"
>
<div
class=
"CONTENT"
v-if=
"baseData.bBackFromother"
>
<div
v-for=
"(item,index) in
filterS
ubmitForm"
:key=
"index"
>
<div
v-for=
"(item,index) in
s
ubmitForm"
:key=
"index"
>
<div
class=
"deleteArea"
>
<div
class=
"deleteArea"
>
<span
style=
"color:#3399ff;"
>
返回统计(
{{
index
+
1
}}
)
</span>
<span
style=
"color:#3399ff;"
>
返回统计(
{{
index
+
1
}}
)
</span>
<span
style=
"color:#ff6600;"
@
click=
"del(index)"
v-if=
"!showEditArea"
>
删除
</span>
<span
style=
"color:#ff6600;"
@
click=
"del(index)"
v-if=
"!showEditArea"
>
删除
</span>
...
@@ -242,7 +242,7 @@
...
@@ -242,7 +242,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"addBtn"
@
click=
"add"
v-if=
"!showEditArea"
>
<div
class=
"addBtn"
@
click=
"add"
v-if=
"!showEditArea
&& baseData.bBackFromother == 'true'
"
>
<i
class=
'iconfont icon-jia1'
></i>
<i
class=
'iconfont icon-jia1'
></i>
</div>
</div>
</div>
</div>
...
@@ -279,33 +279,70 @@ export default {
...
@@ -279,33 +279,70 @@ export default {
submitForm
:[],
submitForm
:[],
isDisabled
:
false
,
isDisabled
:
false
,
isOtherCityReturn
:
''
,
isOtherCityReturn
:
''
,
list
:
list
()
list
:
list
(),
baseData
:{},
readOnly
:
false
}
}
},
},
computed
:{
computed
:{
...
mapState
({
...
mapState
({
baseData
:
state
=>
state
.
healthStatistics
.
baseData
,
}),
})
filterSubmitForm
(){
return
this
.
submitForm
.
filter
(
x
=>
x
.
iStatus
!=
3
);
}
},
},
async
activated
(){
async
activated
(){
if
(
window
.
history
&&
window
.
history
.
pushState
)
{
// 往历史记录里面添加一条新的当前页面的url
history
.
pushState
(
null
,
null
,
document
.
URL
);
// 给 popstate 绑定一个方法 监听页面刷新
window
.
addEventListener
(
'popstate'
,
this
.
backChange
,
false
);
//false阻止默认事件
}
window
.
d
=
this
;
window
.
d
=
this
;
this
.
$store
.
dispatch
(
'saveHealthStatisticsOpen'
,
this
.
$route
.
query
.
openId
);
this
.
$store
.
dispatch
(
'saveHealthStatisticsOpen'
,
this
.
$route
.
query
.
openId
);
if
(
this
.
$route
.
query
.
hasOwnProperty
(
'readOnly'
)){
this
.
readOnly
=
this
.
$route
.
query
.
readOnly
;
}
else
{
this
.
readOnly
=
false
;
}
await
this
.
getHealthcompany
();
await
this
.
getHealthData
();
await
this
.
getHealthData
();
},
},
methods
:{
methods
:{
async
getHealthcompany
(){
let
result
=
await
this
.
request
(
'getHealthcompany'
,{
data
:[
{
key
:
"url"
,
value
:
"check_bhavecompany"
},
{
key
:
"openid"
,
value
:
this
.
$route
.
query
.
openId
}
]
})
if
(
result
&&
result
.
length
>
0
){
result
[
0
].
iEmploeeId
=
result
[
0
].
iIden
;
result
[
0
].
openId
=
result
[
0
].
sCreateAppid
;
result
[
0
].
bBackFromother
=
result
[
0
].
bBackFromother
?
'true'
:
'false'
;
this
.
baseData
=
result
[
0
];
}
},
backChange
()
{
const
that
=
this
;
wx
.
miniProgram
.
switchTab
({
url
:
'/pages/home'
})
},
changeRadio
(
e
){
changeRadio
(
e
){
let
data
=
util
.
deepClone
(
this
.
baseData
);
let
data
=
util
.
deepClone
(
this
.
baseData
);
this
.
request
(
'saveHealthemploee'
,{
this
.
request
(
'saveHealthemploee'
,{
data
:{
data
:{
iIden
:
data
.
iIden
,
iIden
:
data
.
iIden
,
iStatus
:
2
,
iStatus
:
2
,
bBackFromother
:
e
==
'
1
'
?
true
:
false
bBackFromother
:
e
==
'
true
'
?
true
:
false
}
}
}).
then
(
res
=>
{
}).
then
(
res
=>
{
data
.
bBackFromother
=
e
;
data
.
bBackFromother
=
e
;
if
(
e
==
'true'
){
let
data
=
list
();
data
.
iCompanyId
=
this
.
baseData
.
iCompanyId
;
data
.
iEmploeeId
=
this
.
baseData
.
iEmploeeId
;
this
.
submitForm
.
push
(
data
);
}
this
.
$store
.
dispatch
(
'saveHealthBaseData'
,
data
);
this
.
$store
.
dispatch
(
'saveHealthBaseData'
,
data
);
})
})
},
},
...
@@ -313,7 +350,7 @@ export default {
...
@@ -313,7 +350,7 @@ export default {
let
res
=
await
this
.
request
(
'getHealthbacklog'
,{
let
res
=
await
this
.
request
(
'getHealthbacklog'
,{
data
:[
data
:[
{
key
:
'url'
,
value
:
'HealthBackLog'
},
{
key
:
'url'
,
value
:
'HealthBackLog'
},
{
key
:
'iEmploeeId'
,
value
:
this
.
$route
.
params
.
iEmploeeId
},
{
key
:
'iEmploeeId'
,
value
:
this
.
baseData
.
iEmploeeId
},
],
],
params
:{},
params
:{},
},
'加载中'
,{});
},
'加载中'
,{});
...
@@ -327,17 +364,19 @@ export default {
...
@@ -327,17 +364,19 @@ export default {
this
.
isDisabled
=
true
;
this
.
isDisabled
=
true
;
this
.
showEditArea
=
true
;
this
.
showEditArea
=
true
;
}
else
{
}
else
{
let
data
=
list
();
if
(
this
.
baseData
.
bBackFromother
==
'true'
){
data
.
iCompanyId
=
this
.
$route
.
params
.
iCompanyId
;
let
data
=
list
();
data
.
iEmploeeId
=
this
.
$route
.
params
.
iEmploeeId
;
data
.
iCompanyId
=
this
.
baseData
.
iCompanyId
;
this
.
submitForm
.
push
(
data
);
data
.
iEmploeeId
=
this
.
baseData
.
iEmploeeId
;
this
.
submitForm
.
push
(
data
);
}
}
}
}
}
},
},
add
(){
add
(){
let
data
=
list
();
let
data
=
list
();
data
.
iCompanyId
=
this
.
$route
.
params
.
iCompanyId
;
data
.
iCompanyId
=
this
.
baseData
.
iCompanyId
;
data
.
iEmploeeId
=
this
.
$route
.
params
.
iEmploeeId
;
data
.
iEmploeeId
=
this
.
baseData
.
iEmploeeId
;
this
.
submitForm
.
push
(
data
);
this
.
submitForm
.
push
(
data
);
},
},
edit
(){
edit
(){
...
@@ -369,13 +408,19 @@ export default {
...
@@ -369,13 +408,19 @@ export default {
del
(
index
){
del
(
index
){
this
.
$vux
.
confirm
.
show
({
this
.
$vux
.
confirm
.
show
({
title
:
"提示"
,
title
:
"提示"
,
content
:
'是否删除?'
,
content
:
'
该数据将永久删除,
是否删除?'
,
showCancelButton
:
true
,
showCancelButton
:
true
,
onConfirm
:()
=>
{
onConfirm
:
async
()
=>
{
if
(
this
.
submitForm
[
index
].
iStatus
==
1
){
if
(
this
.
submitForm
[
index
].
iStatus
==
1
){
this
.
submitForm
.
splice
(
index
,
1
);
this
.
submitForm
.
splice
(
index
,
1
);
}
else
if
(
this
.
submitForm
[
index
].
iStatus
==
2
){
}
else
if
(
this
.
submitForm
[
index
].
iStatus
==
2
){
this
.
submitForm
[
index
].
iStatus
=
3
;
let
res
=
await
this
.
request
(
'saveHealthbacklog'
,{
data
:[
Object
.
assign
(
this
.
submitForm
[
index
],{
iStatus
:
3
})],
params
:{},
},
'加载中'
,{});
if
(
res
.
iStatus
==
1
){
this
.
submitForm
.
splice
(
index
,
1
);
}
}
}
},
},
onCancel
()
{}
onCancel
()
{}
...
@@ -411,5 +456,8 @@ export default {
...
@@ -411,5 +456,8 @@ export default {
return
true
;
return
true
;
}
}
},
},
deactivated
(){
window
.
removeEventListener
(
'popstate'
,
this
.
backChange
,
false
);
//false阻止默认事件
}
}
}
</
script
>
</
script
>
\ No newline at end of file
src/view/healthCard/statistics/index.vue
View file @
e1ee5b93
This diff is collapsed.
Click to expand it.
src/view/healthCard/statistics/temp.vue
View file @
e1ee5b93
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