Commit 48faa9fd by chenyu

update: update

parent ebaa218e
......@@ -10,14 +10,14 @@
<div v-else class="pb20" style="overflow:hidden;">
<div class="flex_between">
<div>
<el-date-picker :disabled="loading" :clearable="false" :pickerOptions="pickerOptions" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="onSearch"></el-date-picker>
<el-date-picker :disabled="loading" :clearable="false" :pickerOptions="pickerOptions" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="onSearch" @click.native="minDate = null"></el-date-picker>
<el-input v-model="listParams.searchParam" :style="setInputWidth()" :placeholder="placeholder" clearable @change="onSearch"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-select v-if="$route.params.type === 'sms'" class="dm-select" v-model="listParams.channelType" clearable placeholder="选择类型" @change="onSearch">
<el-option label="会员验证码" value="1"></el-option>
<el-option label="导购验证码" value="2"></el-option>
</el-select>
<select-depart v-if="isMoreAccount && config.showAllDepartment" :data="deparment" @load="load" @getDepartId="getDepartId" @remote-search="remoteSearch" :loading="deparment.loading" />
<span class="fz12 gray">* 此处仅支持筛选近半年的统计数据</span>
<span class="fz12 gray">* 此处仅支持筛选近半年的统计数据,最大查询区间为1个月</span>
</div>
<el-button v-if="$getButtonLimit($buttonCode.marketingCounsumeExport)" :limit-code="$buttonCode.marketingCounsumeExport" type="primary" class="btn h32" @click="exportDialog.dialogVisible = true"><i class="iconfont icon-xiazai" style="marginRight:6px;fontSize:14px" />导出</el-button>
</div>
......@@ -323,15 +323,19 @@ export default {
// 只能筛选半年之内得数据,并且最大跨度为一个月
const halfYearBefore = Date.now() - 6 * 30 * 24 * 60 * 60 * 1000;
const oneMothods = 30 * 24 * 60 * 60 * 1000;
const curTime = this.minDate.getTime();
const min = curTime - oneMothods > halfYearBefore ? curTime - oneMothods : halfYearBefore;
return val.getTime() > curTime + oneMothods || val.getTime() < min;
if (this.minDate) {
const curTime = this.minDate.getTime();
const min = curTime - oneMothods > halfYearBefore ? curTime - oneMothods : halfYearBefore;
return val.getTime() > curTime + oneMothods || val.getTime() < min || val.getTime() > this.maxDate;
}
return val.getTime() <= halfYearBefore || val.getTime() > this.maxDate;
},
onPick: ({ maxDate, minDate }) => {
this.minDate = minDate;
}
},
minDate: new Date(Date.now()),
maxDate: new Date(),
videoListParams: {
currentPage: 1,
pageSize: 20,
......
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