Commit 84215b5e authored by IvyXia123's avatar IvyXia123

待回访修改

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