mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 03:26:45 +08:00
日历传参
This commit is contained in:
@@ -13,7 +13,7 @@ export default [
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/attendance/Monthly/:obj',
|
||||
path: '/attendance/Monthly',
|
||||
name: 'Monthly',
|
||||
component: monthly,
|
||||
meta: {
|
||||
|
||||
@@ -121,13 +121,14 @@ export default {
|
||||
|
||||
},
|
||||
month(obj) {
|
||||
localStorage.obj = JSON.stringify(this.obj)
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/attendance/Monthly/${JSON.stringify(obj)}`
|
||||
url: location.origin + `/#/attendance/Monthly`
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/attendance/Monthly/${JSON.stringify(obj)}`
|
||||
path: `/attendance/Monthly`
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
@touchend="touchend"
|
||||
></vue-hash-calendar>
|
||||
</div>
|
||||
<div class="footer" v-if="flag!=='4'">
|
||||
<div class="footer" v-if="flagGo!=='4'">
|
||||
<div class="fs12 c-gray-base h30 line-height">班次:正常 09:00-18:00</div>
|
||||
<div class=" h40 flex align-items-c border-gb">
|
||||
<img class="h15 w15 ml15" src="@/assets/images/u20046.png" alt />
|
||||
@@ -34,22 +34,22 @@
|
||||
</div>
|
||||
<div>
|
||||
<div class="fs14 fw500 ml15">
|
||||
打卡时间 <span v-if="flag=='0'">{{goWorkTime}}</span>
|
||||
打卡时间 <span v-if="flagGo=='0'">{{goWorkTime}}</span>
|
||||
<span class="c-gray-base">(上班 时间 {{workTime}})</span>
|
||||
</div>
|
||||
<!-- <img class="w30 h20 ml15" src="@/assets/images/u1213.png" alt /> -->
|
||||
<div class="w41 h18 ml15 bg-blue-dark white fs13 text-center text1" v-if="flag=='0'">{{text}}</div>
|
||||
<div class="w41 h18 ml15 white fs13 text-center text" v-if="flag=='1'||flag=='2'">{{text}}</div>
|
||||
<div class="w41 h18 ml15 bg-blue-dark white fs13 text-center text1" v-if="flagGo=='0'">{{text}}</div>
|
||||
<div class="w41 h18 ml15 white fs13 text-center text" v-if="flagGo=='1'||flagGo=='2'">{{text1}}</div>
|
||||
<div class="fs14 fw500 ml15 mt50">
|
||||
打卡时间 <span v-if="flag=='0'">{{offWorkTime}}</span>
|
||||
打卡时间 <span v-if="flagOff=='0'">{{offWorkTime}}</span>
|
||||
<span class="c-gray-base">(下班 时间 {{workTimeOff}})</span>
|
||||
</div>
|
||||
<div class="w41 h18 ml15 bg-blue-dark white fs13 text-center text1" v-if="flag=='0'">{{text}}</div>
|
||||
<div class="w41 h18 ml15 fs13 text-center text" v-if="flag=='1'||flag=='3'">{{text}}</div>
|
||||
<div class="w41 h18 ml15 bg-blue-dark white fs13 text-center text1" v-if="flagOff=='0'">{{text}}</div>
|
||||
<div class="w41 h18 ml15 fs13 text-center text" v-if="flagOff=='1'||flagOff=='3'">{{text1}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="flag=='4'">
|
||||
<div v-if="flagGo=='4'">
|
||||
今日休息
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,17 +82,20 @@ export default {
|
||||
disable:true,
|
||||
name:'',
|
||||
rest:[],
|
||||
flag:'',
|
||||
flagGo:'',
|
||||
flagOff:'',
|
||||
text:'',
|
||||
text1:'',
|
||||
goWorkTime:'',
|
||||
offWorkTime:'',
|
||||
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.date1=new Date(JSON.parse(this.$route.params.obj).time)
|
||||
this.time=JSON.parse(this.$route.params.obj).time
|
||||
this.name=JSON.parse(this.$route.params.obj).name
|
||||
console.log(JSON.parse(window.localStorage.getItem('obj')).time)
|
||||
this.date1=new Date(JSON.parse(window.localStorage.getItem('obj')).time)
|
||||
this.time=JSON.parse(window.localStorage.getItem('obj')).time
|
||||
this.name=JSON.parse(window.localStorage.getItem('obj')).name
|
||||
this.getMonthDetail1();
|
||||
this.time=utils.formatDate(this.currentDate, 'yyyy-MM-dd')
|
||||
},
|
||||
@@ -116,19 +119,23 @@ export default {
|
||||
this.workTimeOff=res.content.workTimeoff,
|
||||
this.count=res.content.count,
|
||||
this.amount=res.content.amount,
|
||||
this.flag=res.content.flag,
|
||||
this.flagGo=res.content.flagGo,
|
||||
this.flagOff=res.content.flagOff,
|
||||
this.goWorkTime=res.content.goWorkTime,
|
||||
this.offWorkTime=res.content.offWorkTime
|
||||
if(this.flag=='0'){
|
||||
if(this.flagGo=='0'|| this.flagOff=='0'){
|
||||
this.goWorkTime=this.goWorkTime.split(' ')[1]
|
||||
this.offWorkTime=this.offWorkTime.split(' ')[1]
|
||||
this.text='正常'
|
||||
}else if(this.flag=='1'){
|
||||
this.text='缺勤'
|
||||
}else if(this.flag=='2'){
|
||||
this.text='迟到'
|
||||
}else if(this.flag=='3'){
|
||||
this.text='早退'
|
||||
}
|
||||
if(this.flagGo=='1'){
|
||||
this.text1='缺勤'
|
||||
}
|
||||
if(this.flagGo=='2'){
|
||||
this.text1='迟到'
|
||||
}
|
||||
if(this.flagOff=='3'){
|
||||
this.text1='早退'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -147,19 +154,23 @@ export default {
|
||||
this.workTimeOff=res.content.workTimeoff,
|
||||
this.count=res.content.count,
|
||||
this.amount=res.content.amount,
|
||||
this.flag=res.content.flag,
|
||||
this.flagGo=res.content.flagGo,
|
||||
this.flagOff=res.content.flagOff,
|
||||
this.goWorkTime=res.content.goWorkTime,
|
||||
this.offWorkTime=res.content.offWorkTime
|
||||
if(this.flag=='0'){
|
||||
if(this.flagGo=='0'|| this.flagOff=='0'){
|
||||
this.goWorkTime=this.goWorkTime.split(' ')[1]
|
||||
this.offWorkTime=this.offWorkTime.split(' ')[1]
|
||||
this.text='正常'
|
||||
}else if(this.flag=='1'){
|
||||
this.text='缺勤'
|
||||
}else if(this.flag=='2'){
|
||||
this.text='迟到'
|
||||
}else if(this.flag=='3'){
|
||||
this.text='早退'
|
||||
}
|
||||
if(this.flagGo=='1'){
|
||||
this.text1='缺勤'
|
||||
}
|
||||
if(this.flagGo=='2'){
|
||||
this.text1='迟到'
|
||||
}
|
||||
if(this.flagOff=='3'){
|
||||
this.text1='早退'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -182,7 +193,7 @@ export default {
|
||||
let workTime=res.content.rest[i].split(' ')
|
||||
let workTime1=workTime[0]
|
||||
if(Date.parse(workTime1)<Date.parse(utils.formatDate(new Date(), 'yyyy-MM-dd'))){
|
||||
let arr2=res.content.rest.slice(0,i)
|
||||
let arr2=res.content.rest.slice(0,i+1)
|
||||
obj1.date=arr2
|
||||
// console.log(arr2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user