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

uploda

parent 45980e3b
......@@ -3,5 +3,8 @@ module.exports = {
saveHealth:{url:"/healthlog/save/",method:"post",host:"health"},
getHealthEmploee:{url:"/healthemploee",method:"post",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){
/**
* 健康打卡统计
*/
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/1225621052093239296`,
health:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/1227787695263191040`, //测试地址
// health:`http://xuxiaoming.vaiwan.com`
}
return url[name]
......
......@@ -24,7 +24,9 @@ module.exports = [
name:'healthCardStatisticsIndex',
component:()=> import('@/view/healthCard/statistics/index.vue'),
meta:{
title: '健康打卡'
title: '健康打卡',
showTabbar:true,
activeTab:2
}
},
{
......@@ -32,7 +34,9 @@ module.exports = [
name:'healthCardStatisticsChart',
component:()=> import('@/view/healthCard/statistics/chart.vue'),
meta:{
title: '健康打卡'
title: '健康打卡',
showTabbar:true,
activeTab:2
}
},
{
......@@ -40,7 +44,9 @@ module.exports = [
name:'healthCardStatisticsList',
component:()=> import('@/view/healthCard/statistics/list.vue'),
meta:{
title: '健康打卡'
title: '健康打卡',
showTabbar:true,
activeTab:2
}
}
]
......@@ -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 = {
state: {
hdr:{},
dtl:{},
openId:''
openId:'',
baseData:{}
},
mutations: {
saveHealthStatisticsHdr(state,data){
......@@ -16,6 +17,9 @@ const obj = {
},
saveHealthStatisticsOpen(state,data){
state.openId = data;
},
saveHealthBaseData(state,data){
state.baseData = data;
}
},
actions: {
......@@ -28,6 +32,9 @@ const obj = {
saveHealthStatisticsOpen({commit},data){
commit('saveHealthStatisticsOpen',data);
},
saveHealthBaseData({commit},data){
commit('saveHealthBaseData',data)
}
}
};
......
......@@ -28,19 +28,19 @@
<router-view></router-view>
</keep-alive>
</div>
<div class="TABBAR">
<tabbar tabbar-text-active-color="#3e68f3" v-if="showTabbar">
<div class="TABBAR" v-if="showTabbar">
<tabbar tabbar-text-active-color="#3e68f3">
<tabbar-item :selected='activeTab == 0' @on-item-click="clickTabbar(0)">
<img slot="icon" src="./image/home.png">
<img slot="icon-active" src="./image/home_active.png">
<span slot="label" :style="{'color':activeTab == 0 ? '#3e69f3' : '#999999'}">首页</span>
</tabbar-item>
<!-- <tabbar-item :selected='activeTab == 1' @on-item-click="clickTabbar(1)">
<img slot="icon" src="./image/home.png">
<img slot="icon-active" src="./image/home_active.png">
<tabbar-item :selected='activeTab == 1' @on-item-click="clickTabbar(1)">
<img slot="icon" src="./image/return.png">
<img slot="icon-active" src="./image/return_active.png">
<span slot="label" :style="{'color':activeTab == 1 ? '#3e69f3' : '#999999'}">返程</span>
</tabbar-item> -->
<tabbar-item :selected='activeTab == 2' @on-item-click="clickTabbar(2)">
</tabbar-item>
<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-active" src="./image/statistics_active.png">
<span slot="label" :style="{'color':activeTab == 2 ? '#3e69f3' : '#999999'}">统计</span>
......@@ -58,24 +58,47 @@
<script>
import { Tabbar, TabbarItem } from 'vux'
import {mapState} from 'vuex';
export default {
name: 'healthCard',
data () {
return {
activeTab:'2',
showTabbar:false
showTabbar:false,
}
},
computed:{
...mapState({
openId:state => state.healthStatistics.openId,
baseData:state => state.healthStatistics.baseData,
})
},
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:{
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:{
clickTabbar(activeTab){
this.activeTab = activeTab;
if(this.activeTab == activeTab) return false;
switch(activeTab){
case 0:
wx.miniProgram.switchTab({
......@@ -83,6 +106,26 @@ export default {
})
break;
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;
case 3:
wx.miniProgram.switchTab({
......@@ -92,6 +135,20 @@ export default {
default:
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 @@
<template>
<div id="healthCardStatisticsIndex">
<div class="items">
<div class="item" v-for="(item,index) in list" :key="index" @click="routerToChart(item)">
<div class="items" v-if="list.length > 0">
<div class="item" v-for="(item,index) in list" :key="index" @click="routerToChart(item)" >
<div class="HEAD" >
<div class="left">
<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