<el-date-picker
v-model="aaa"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="e => timeChange(e, doindex)"
/>
// 判断时间是否交叉重复
timeChange(val,index){
let start = []//开始时间
let over = []//结束时间
for(let i = 0; i < this.monthList96.length;i++){
start.push(moment(this.monthList96[i].timeAry[0]).format('YYYY/MM/DD'))
over.push(moment(this.monthList96[i].timeAry[1]).format('YYYY/MM/DD'))
}
start.sort()
over.sort()
console.log(start,over,'开始结束')
for(let i=1;i<start.length;i++){
console.log(start[i],over[i-1])
if ( start[i] <= over[i-1]){
this.$vMessage({
type: 'warning',
message: '所选时间段不能重合'
})
this.monthList96[index].timeAry = []
return
}
}
},