Commit 035c5ad2 authored by 张锡奇's avatar 张锡奇

uploda

parent 45980e3b
...@@ -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
...@@ -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]
......
...@@ -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
...@@ -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)
}
} }
}; };
......
...@@ -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.
...@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment