Commit 08bd22bb authored by 张锡奇's avatar 张锡奇

upload

parent 346587ea
module.exports = { module.exports = {
getStatisticalDetails:{url:"/healthlog/",method:"post",host:"health"}, getStatisticalDetails:{url:"/healthlog/",method:"post",host:"health"},
saveHealth:{url:"/healthlog/save/",method:"post",host:"health"}, saveHealth:{url:"/healthlog/save/",method:"post",host:"health"},
getHealthEmploee:{url:"/healthemploee",method:"post",host:"health"},
} }
\ No newline at end of file
...@@ -46,12 +46,12 @@ module.exports = [ ...@@ -46,12 +46,12 @@ module.exports = [
] ]
}, },
{//健康打卡 {//健康打卡
name:"main", name:"healthCard",
component:()=>import("@/view/main.vue"), component:()=>import("@/view/healthCard/index.vue"),
path:"/main", path:"/healthCard",
children:[ children:[
{ {
path:"/healthCard/punchClock", path:"healthCard/punchClock",
name:"punchClock", name:"punchClock",
component:()=>import("@/view/healthCard/punchClock.vue"), component:()=>import("@/view/healthCard/punchClock.vue"),
meta:{ meta:{
...@@ -59,21 +59,12 @@ module.exports = [ ...@@ -59,21 +59,12 @@ module.exports = [
} }
}, },
{ {
path:"/healthCard/punchClockDetail/:id/:openId/:address", path:"punchClockDetail/:id/:openId/:address",
name:"punchClockDetail", name:"punchClockDetail",
component:()=>import("@/view/healthCard/punchClockDetail.vue"), component:()=>import("@/view/healthCard/punchClockDetail.vue"),
meta:{ meta:{
title:"打卡健康" title:"打卡健康"
} }
},
{
path:"/healthCard/punchClockDetail/:millisecond/:openId",
name:"punchClockDetail",
component:()=>import("@/view/healthCard/punchClockDetail.vue"),
meta:{
title:"打卡健康",
readOnly:true
}
} }
] ]
} }
......
...@@ -4,7 +4,8 @@ import Vue from 'vue'; ...@@ -4,7 +4,8 @@ import Vue from 'vue';
const obj = { const obj = {
state: { state: {
hdr:{}, hdr:{},
dtl:{} dtl:{},
openId:''
}, },
mutations: { mutations: {
saveHealthStatisticsHdr(state,data){ saveHealthStatisticsHdr(state,data){
...@@ -13,6 +14,9 @@ const obj = { ...@@ -13,6 +14,9 @@ const obj = {
saveHealthStatisticsDtl(state,data){ saveHealthStatisticsDtl(state,data){
state.dtl = data; state.dtl = data;
}, },
saveHealthStatisticsOpen(state,data){
state.openId = data;
}
}, },
actions: { actions: {
saveHealthStatisticsHdr({commit},data){ saveHealthStatisticsHdr({commit},data){
...@@ -21,6 +25,9 @@ const obj = { ...@@ -21,6 +25,9 @@ const obj = {
saveHealthStatisticsDtl({commit},data){ saveHealthStatisticsDtl({commit},data){
commit('saveHealthStatisticsDtl',data); commit('saveHealthStatisticsDtl',data);
}, },
saveHealthStatisticsOpen({commit},data){
commit('saveHealthStatisticsOpen',data);
},
} }
}; };
......
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
<div><v-radio value="其他" label="其他"/></div> <div><v-radio value="其他" label="其他"/></div>
</v-radio-group> </v-radio-group>
</div> </div>
<div class="list"> <div class="list" v-if="!readOnly">
<div class="tip"><span style="color:red;" v-if="!readOnly">*</span>2. 目前所在城市</div> <div class="tip"><span style="color:red;" >*</span>2. 目前所在城市</div>
<x-address <x-address
:disabled="readOnly" :disabled="readOnly"
@on-hide="logHide" @on-hide="logHide"
...@@ -80,8 +80,8 @@ ...@@ -80,8 +80,8 @@
value-text-align="left" value-text-align="left"
:show.sync="showAddress"/> :show.sync="showAddress"/>
</div> </div>
<div class="list"> <div class="list" v-if="readOnly">
<div class="tip"><span style="color:red;" v-if="!readOnly">*</span>2. 目前所在城市</div> <div class="tip">2. 目前所在城市</div>
<span>{{value.sAddressFull}}</span> <span>{{value.sAddressFull}}</span>
</div> </div>
<div class="list"> <div class="list">
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
<script> <script>
import util from "@/libs/util.js" import util from "@/libs/util.js"
import {mapState} from 'vuex';
import { XAddress,ChinaAddressV4Data,Datetime,XInput } from 'vux' import { XAddress,ChinaAddressV4Data,Datetime,XInput } from 'vux'
export default { export default {
...@@ -179,12 +180,20 @@ export default { ...@@ -179,12 +180,20 @@ export default {
millisecond:"",//毫秒数 millisecond:"",//毫秒数
} }
}, },
created(){ computed:{
this.readOnly=this.$route.meta.readOnly ...mapState({
hdr:state => state.healthStatistics.hdr,
})
},
async activated(){
window.d = this;
this.readOnly=this.$route.query.readOnly
this.value.sCreateAppid=this.$route.params.openId this.value.sCreateAppid=this.$route.params.openId
console.log(this.$route.params.openId)
console.log(this.readOnly)
if(this.readOnly){ if(this.readOnly){
this.millisecond=this.$route.params.millisecond this.millisecond=this.$route.params.millisecond
this.getHealthDate() await this.getHealthDate();
}else{ }else{
this.value.iEmploeeId=this.$route.params.id this.value.iEmploeeId=this.$route.params.id
this.value.sAddressFull=this.$route.params.address this.value.sAddressFull=this.$route.params.address
...@@ -194,13 +203,27 @@ export default { ...@@ -194,13 +203,27 @@ export default {
}, },
methods:{ methods:{
async getHealthDate(){ async getHealthDate(){
var data=[ let res = await this.request('getStatisticalDetails',{
{key:"url",value:"HealthLog"}, data:[
{key:"dDate",value:util.dateFormat(new Date(this.millisecond),"yyyy-MM-dd")}, {key:'url',value:'HealthLog'},
{key:'dDate',value: this.hdr.dDate},
{key:"openid",value:this.value.sCreateAppid} {key:"openid",value:this.value.sCreateAppid}
] ],
var value=await this.request("getStatisticalDetails",data) params:{},
// if() },'加载中',{});
if(res && typeof(res) == 'object'){
this.value = res[0];
for(let x in this.value){
if(util.getType(this.value[x]) == 'boolean'){
if(this.value[x]){
this.value[x] = 1;
}else{
this.value[x] = 0;
}
}
}
this.address = this.value.sAddressFull;
}
}, },
logHide(e){ logHide(e){
......
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
</div> </div>
</div> </div>
<div v-show="activeTab == 1" class="activeTab2" ref="scrollDom" @scroll="scrollToBottom"> <div v-show="activeTab == 1" class="activeTab2" ref="scrollDom" @scroll="scrollToBottom">
<div class="items" v-for="(item,index) in list" :key="index"> <div class="items" v-for="(item,index) in list" :key="index" @click="routerToPunchClockDetail(item)">
<div class="avatar"> <div class="avatar">
<img src="" alt=""> <img src="" alt="">
<span>{{item.sEmploeeName[0]}}</span> <span>{{item.sEmploeeName[0]}}</span>
...@@ -243,7 +243,8 @@ export default { ...@@ -243,7 +243,8 @@ export default {
}, },
computed:{ computed:{
...mapState({ ...mapState({
hdr:state => state.healthStatistics.hdr hdr:state => state.healthStatistics.hdr,
openId:state => state.healthStatistics.openId
}) })
}, },
async mounted(){ async mounted(){
...@@ -518,6 +519,9 @@ export default { ...@@ -518,6 +519,9 @@ export default {
}, },
routerToList(type){ routerToList(type){
this.$router.push({name:'healthCardStatisticsList',params:{type:type}}); this.$router.push({name:'healthCardStatisticsList',params:{type:type}});
},
routerToPunchClockDetail(item){
this.$router.push({name:'punchClockDetail',params:{id:'1',address:'1',openId:this.openId},query:{readOnly:true}})
} }
} }
} }
......
...@@ -141,6 +141,7 @@ export default { ...@@ -141,6 +141,7 @@ export default {
}, },
async mounted(){ async mounted(){
this.openId=this.$route.query.openId; this.openId=this.$route.query.openId;
this.$store.dispatch('saveHealthStatisticsOpen',this.openId);
}, },
async activated(){ async activated(){
window.d = this; window.d = this;
......
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