mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-19 05:36:44 +08:00
高亮显示
This commit is contained in:
@@ -86,14 +86,17 @@ export default {
|
||||
text:'',
|
||||
goWorkTime:'',
|
||||
offWorkTime:'',
|
||||
|
||||
flag:''
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this. isShowCalendar=true,
|
||||
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
|
||||
setTimeout(()=>{
|
||||
this.getMonthDetail1();
|
||||
},1000)
|
||||
this.time=utils.formatDate(this.currentDate, 'yyyy-MM-dd')
|
||||
},
|
||||
methods: {
|
||||
@@ -120,8 +123,8 @@ export default {
|
||||
this.goWorkTime=res.content.goWorkTime,
|
||||
this.offWorkTime=res.content.offWorkTime
|
||||
if(this.flag=='0'){
|
||||
this.goWorkTime=this.goWorkTime.split(' ')[0]
|
||||
this.offWorkTime=this.offWorkTime.split(' ')[0]
|
||||
this.goWorkTime=this.goWorkTime.split(' ')[1]
|
||||
this.offWorkTime=this.offWorkTime.split(' ')[1]
|
||||
this.text='正常'
|
||||
}else if(this.flag=='1'){
|
||||
this.text='缺勤'
|
||||
@@ -151,8 +154,8 @@ export default {
|
||||
this.goWorkTime=res.content.goWorkTime,
|
||||
this.offWorkTime=res.content.offWorkTime
|
||||
if(this.flag=='0'){
|
||||
this.goWorkTime=this.goWorkTime.split(' ')[0]
|
||||
this.offWorkTime=this.offWorkTime.split(' ')[0]
|
||||
this.goWorkTime=this.goWorkTime.split(' ')[1]
|
||||
this.offWorkTime=this.offWorkTime.split(' ')[1]
|
||||
this.text='正常'
|
||||
}else if(this.flag=='1'){
|
||||
this.text='缺勤'
|
||||
@@ -172,7 +175,7 @@ export default {
|
||||
}
|
||||
if(Date.parse(this.time)<=Date.parse(utils.formatDate(new Date(), 'yyyy-MM-dd'))){
|
||||
getMonthDetail(date).then(res=>{
|
||||
// console.log(res)
|
||||
console.log(res)
|
||||
if(res.result == 0){
|
||||
let arr1=[]
|
||||
let obj1={}
|
||||
@@ -181,15 +184,13 @@ export default {
|
||||
for(let i=0;i<res.content.rest.length;i++){
|
||||
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)
|
||||
if(Date.parse(workTime1)<=Date.parse(utils.formatDate(new Date(), 'yyyy-MM-dd'))){
|
||||
let arr2=res.content.rest.slice(0,i+1)
|
||||
obj1.date=arr2
|
||||
// console.log(arr2)
|
||||
}
|
||||
}
|
||||
arr1.push(obj1)
|
||||
// console.log(obj1)
|
||||
// this.mask=arr1
|
||||
console.log(arr1)
|
||||
let arr=arr1
|
||||
let obj={}
|
||||
let date=[]
|
||||
@@ -199,14 +200,10 @@ export default {
|
||||
let workTime=res.content.normal[t].split(' ')
|
||||
let workTime1=workTime[0]
|
||||
date.push(workTime1)
|
||||
// console.log(date)
|
||||
obj.date=date
|
||||
}
|
||||
arr.push(obj)
|
||||
// arr3=arr3.concat(arr1,arr)
|
||||
|
||||
this.mask=arr
|
||||
// console.log(this.mask)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -239,11 +239,6 @@ export default {
|
||||
width: 154px;
|
||||
}
|
||||
}
|
||||
.main-table {
|
||||
tr:nth-child(even) div {
|
||||
// border: 1px solid #ccc;
|
||||
}
|
||||
}
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
|
||||
@@ -32,10 +32,11 @@
|
||||
<span v-if="Name!==''">{{Name}}></span><span class="red">{{unitName}}</span>
|
||||
</div>
|
||||
<div class="flex align-items-c h86 content1 bg-white mt10" v-if="mask=='1'">
|
||||
<div class="w40 h60 ml15 text-center" v-for="item in headerList" :key='item'>
|
||||
<div @click="(InfoDetails(item.agentCode))">
|
||||
<div class="w40 h60 ml15 text-center relative" v-for="(item, index) in headerList" :key="index">
|
||||
<div @click="(InfoDetails(index))">
|
||||
<!-- <img v-if="item.agentHeadUrl!==null" class="h40 w40" :src="item.agentHeadUrl" alt /> -->
|
||||
<img class="h40 w40" src="@/assets/images/u188.png" alt />
|
||||
<div :class="[item.isShowImg?'active':'']"></div>
|
||||
<div class="fs13">{{item.agentName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -127,7 +128,8 @@ export default {
|
||||
headerList: [],
|
||||
unitName: '',
|
||||
Name:'',
|
||||
code:''
|
||||
code:'',
|
||||
isShowImg:true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -264,9 +266,13 @@ export default {
|
||||
getPerformanceHeader1() {
|
||||
let date = {}
|
||||
getPerformanceHeader(date).then((res) => {
|
||||
console.log(res)
|
||||
console.log("=="+res)
|
||||
if (res.result == 0) {
|
||||
for(let i=0;i<res.content.length;i++){
|
||||
res.content[i].isShowImg=true
|
||||
}
|
||||
this.headerList = res.content
|
||||
console.log(this.headerList)
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -278,6 +284,10 @@ export default {
|
||||
getHeader(code).then(res=>{
|
||||
console.log(res)
|
||||
if (res.result == 0) {
|
||||
for(let i=0;i<res.content.length;i++){
|
||||
res.content[i].isShowImg=true
|
||||
res.content[0].isShowImg=false
|
||||
}
|
||||
this.headerList = res.content
|
||||
}
|
||||
})
|
||||
@@ -301,10 +311,15 @@ export default {
|
||||
},
|
||||
//点击头像
|
||||
InfoDetails(item) {
|
||||
// console.log(item)
|
||||
console.log(item)
|
||||
for(let i=0;i<this.headerList.length;i++){
|
||||
this.headerList[i].isShowImg=true
|
||||
}
|
||||
this.headerList[item].isShowImg=false
|
||||
|
||||
let code = {
|
||||
date: this.timeCode,
|
||||
agentCode: item,
|
||||
agentCode: this.headerList[item].agentCode,
|
||||
}
|
||||
getPerformanceDetail(code).then((res) => {
|
||||
console.log(res)
|
||||
@@ -334,4 +349,14 @@ export default {
|
||||
width: 100%;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.active{
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
z-index: 100;
|
||||
background: #ccc;
|
||||
opacity: 0.5;
|
||||
top: 0px;
|
||||
border-radius: 20px;
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user