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