Commit 84215b5e authored by IvyXia123's avatar IvyXia123

待回访修改

parent ab965617
......@@ -9,9 +9,9 @@
</div>
<div class="list-yi">
<div class="list-content" v-for="item in infoData" @click="listContentClick(item.time)">
<div>{{ item.day }}</div>
<div>{{ item.num }}</div>
<div style="color: #409EFF;padding-bottom: 4px;">{{ item.weekday }}</div>
<div :class="[ item.state == 1 ? 'active' : '' ]">{{ item.day }}</div>
<div :class="[ item.state == 1 ? 'active' : '' ]">{{ item.num }}</div>
<div :class="['weekday-color', item.state == 1 ? 'active' : '' ]">{{ item.weekday }}</div>
</div>
</div>
</el-card>
......@@ -105,11 +105,11 @@
infoDataChild: [], // 详情数据
infoLoading: true, // 外层loading
infoLoadingDialog: true, // 详情loading
realTime: '', // 日历model
fromTimer: '', // 详情时间
formLabelWidth: '120px',
remarks: '',
handleSelectionValue: []
handleSelectionValue: [],
realTime: ''
}
},
props: {
......@@ -131,19 +131,25 @@
this.infoLoading = true;
getVisitcalendarApi(this.customerO.id).then(res => {
this.infoLoading = false;
let infoTimeData = []
let infoTimeData = [];
this.realTime = new Date().getFullYear() + '-' + this.add0(new Date().getMonth() + 1) + '-' + this.add0(new Date().getDate())
Object.keys(res.weekday).map((item, index) => {
let timeStamp = new Date(Object.keys(res.visit_count)[index]).valueOf(),
dataDay = new Date(this.realTime).valueOf()
infoTimeData.push({
day: item,
time: Object.keys(res.visit_count)[index],
num: Object.values(res.visit_count)[index],
weekday: Object.values(res.weekday)[index]
weekday: Object.values(res.weekday)[index],
state: timeStamp === dataDay ? 1 : 2
})
})
this.infoData = infoTimeData
})
},
add0(n) {
return n < 10 ? '0' + n : n
},
/**
* 点击详情
* @param time {String}
......@@ -200,5 +206,16 @@
text-align: center;
float: left;
cursor: pointer;
.weekday-color {
color: #409EFF;
padding-bottom: 4px;
}
.active {
color: red;
}
}
</style>
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