|
@@ -143,16 +143,43 @@
|
|
|
height: '40px',
|
|
height: '40px',
|
|
|
}"
|
|
}"
|
|
|
class="item-label"
|
|
class="item-label"
|
|
|
- >时间范围</label
|
|
|
|
|
|
|
+ >开始时间</label
|
|
|
>
|
|
>
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
- size="large"
|
|
|
|
|
- v-model="searchForm.dateRange"
|
|
|
|
|
- type="daterange"
|
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
|
- range-separator="至"
|
|
|
|
|
- start-placeholder="开始日期"
|
|
|
|
|
- end-placeholder="结束日期"
|
|
|
|
|
|
|
+ v-model="searchForm.start_time_start"
|
|
|
|
|
+ :type="dateTypeMap[searchForm.dimension]"
|
|
|
|
|
+ :value-format="dateTypeFormatMap[searchForm.dimension]"
|
|
|
|
|
+ placeholder="请选择开始时间"
|
|
|
|
|
+ :picker-options="startPickerOptions"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ alignItems: 'center',
|
|
|
|
|
+ margin: '0 10px 0 0',
|
|
|
|
|
+ display: 'flex',
|
|
|
|
|
+ }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <label
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ margin: '0 10px 0 0',
|
|
|
|
|
+ whiteSpace: 'nowrap',
|
|
|
|
|
+ color: '#666',
|
|
|
|
|
+ display: 'inline-block',
|
|
|
|
|
+ lineHeight: '40px',
|
|
|
|
|
+ fontSize: 'inherit',
|
|
|
|
|
+ fontWeight: '500',
|
|
|
|
|
+ height: '40px',
|
|
|
|
|
+ }"
|
|
|
|
|
+ class="item-label"
|
|
|
|
|
+ >结束时间</label
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="searchForm.end_time_end"
|
|
|
|
|
+ :type="dateTypeMap[searchForm.dimension]"
|
|
|
|
|
+ :value-format="dateTypeFormatMap[searchForm.dimension]"
|
|
|
|
|
+ placeholder="请选择结束时间"
|
|
|
|
|
+ :picker-options="endPickerOptions"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<el-button class="search" type="success" @click="search()">
|
|
<el-button class="search" type="success" @click="search()">
|
|
@@ -251,7 +278,7 @@
|
|
|
{{ scope.row.userGrowthRate + '%' }}
|
|
{{ scope.row.userGrowthRate + '%' }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column :resizable="true" :sortable="true" prop="userCount" label="当前用户数量" />
|
|
|
|
|
|
|
+ <!-- <el-table-column :resizable="true" :sortable="true" prop="userCount" label="当前用户数量" /> -->
|
|
|
<el-table-column :resizable="true" :sortable="true" prop="result" label="预测结果">
|
|
<el-table-column :resizable="true" :sortable="true" prop="result" label="预测结果">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.result == '0' ? '待预测' : scope.row.result == '1' ? '成功' : '失败' }}
|
|
{{ scope.row.result == '0' ? '待预测' : scope.row.result == '1' ? '成功' : '失败' }}
|
|
@@ -349,6 +376,16 @@ export default {
|
|
|
regionId: null,
|
|
regionId: null,
|
|
|
dateRange: [],
|
|
dateRange: [],
|
|
|
},
|
|
},
|
|
|
|
|
+ dateTypeMap: {
|
|
|
|
|
+ daily: 'date',
|
|
|
|
|
+ monthly: 'month',
|
|
|
|
|
+ yearly: 'year',
|
|
|
|
|
+ },
|
|
|
|
|
+ dateTypeFormatMap: {
|
|
|
|
|
+ daily: 'yyyy-MM-dd',
|
|
|
|
|
+ monthly: 'yyyy-MM',
|
|
|
|
|
+ yearly: 'yyyy',
|
|
|
|
|
+ },
|
|
|
dataList: [],
|
|
dataList: [],
|
|
|
pageIndex: 1,
|
|
pageIndex: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
@@ -356,6 +393,20 @@ export default {
|
|
|
dataListLoading: false,
|
|
dataListLoading: false,
|
|
|
dataListSelections: [],
|
|
dataListSelections: [],
|
|
|
layouts: ['prev', 'pager', 'next', 'sizes'],
|
|
layouts: ['prev', 'pager', 'next', 'sizes'],
|
|
|
|
|
+ startPickerOptions: {
|
|
|
|
|
+ disabledDate: time => {
|
|
|
|
|
+ if (!this.searchForm.end_time_end) return false;
|
|
|
|
|
+ const endTime = new Date(this.searchForm.end_time_end);
|
|
|
|
|
+ return time.getTime() > endTime.getTime();
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ endPickerOptions: {
|
|
|
|
|
+ disabledDate: time => {
|
|
|
|
|
+ if (!this.searchForm.start_time_start) return false;
|
|
|
|
|
+ const start = new Date(this.searchForm.start_time_start);
|
|
|
|
|
+ return time.getTime() < start.getTime();
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
async created() {
|
|
async created() {
|
|
@@ -373,8 +424,6 @@ export default {
|
|
|
order: 'desc',
|
|
order: 'desc',
|
|
|
...this.searchForm,
|
|
...this.searchForm,
|
|
|
dimension: this.searchForm.dimension || null,
|
|
dimension: this.searchForm.dimension || null,
|
|
|
- start_time_start: this.searchForm.dateRange[0],
|
|
|
|
|
- end_time_end: this.searchForm.dateRange[1],
|
|
|
|
|
};
|
|
};
|
|
|
this.$http({
|
|
this.$http({
|
|
|
url: '/predict-conf/page',
|
|
url: '/predict-conf/page',
|