数据报表查询改为 默认天数据查询
This commit is contained in:
parent
7b1e701ee3
commit
eff70e8ab5
|
|
@ -45,26 +45,40 @@
|
|||
<!-- </a-col>-->
|
||||
|
||||
<!-- 统计模式 -->
|
||||
<a-col :xs="24" :sm="12" :md="5" :lg="4">
|
||||
<div class="filter-item">
|
||||
<span class="filter-label">模式</span>
|
||||
<a-select v-model:value="selectedDimension" placeholder="请选择" style="flex: 1; min-width: 0">
|
||||
<a-select-option value="dayhours">日统计</a-select-option>
|
||||
<a-select-option value="monthDays">月统计</a-select-option>
|
||||
<a-select-option value="yearMonth">年统计</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- <a-col :xs="24" :sm="12" :md="5" :lg="4">-->
|
||||
<!-- <div class="filter-item">-->
|
||||
<!-- <span class="filter-label">模式</span>-->
|
||||
<!-- <a-select v-model:value="selectedDimension" placeholder="请选择" style="flex: 1; min-width: 0">-->
|
||||
<!-- <a-select-option value="dayhours">日统计</a-select-option>-->
|
||||
<!-- <a-select-option value="monthDays">月统计</a-select-option>-->
|
||||
<!-- <a-select-option value="yearMonth">年统计</a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
|
||||
<!-- 日期 -->
|
||||
<!-- <a-col :xs="24" :sm="12" :md="6" :lg="5">-->
|
||||
<!-- <div class="filter-item">-->
|
||||
<!-- <span class="filter-label">日期</span>-->
|
||||
<!-- <a-date-picker-->
|
||||
<!-- v-model:value="selectedDate"-->
|
||||
<!-- :format="dateFormat"-->
|
||||
<!-- :picker="pickerType"-->
|
||||
<!-- :placeholder="datePlaceholder"-->
|
||||
<!-- style="flex: 1; min-width: 0"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
|
||||
<a-col :xs="24" :sm="12" :md="6" :lg="5">
|
||||
<div class="filter-item">
|
||||
<span class="filter-label">日期</span>
|
||||
<a-date-picker
|
||||
<a-range-picker
|
||||
range
|
||||
v-model:value="selectedDate"
|
||||
:format="dateFormat"
|
||||
:picker="pickerType"
|
||||
:placeholder="datePlaceholder"
|
||||
:placeholder="['开始日期', '结束日期']"
|
||||
style="flex: 1; min-width: 0"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -188,10 +202,15 @@
|
|||
const params = {
|
||||
stationCode: stationCode,
|
||||
// deployId: deployId,
|
||||
summaryMode: summaryMode || 'dayhours',
|
||||
startTime: startTime,
|
||||
summaryMode: summaryMode || 'customDays',
|
||||
// startTime: startTime,
|
||||
};
|
||||
|
||||
if (startTime && Array.isArray(startTime) && startTime.length === 2) {
|
||||
params.startTime = startTime[0]?.format(dateFormat.value) || null;
|
||||
params.endTime = startTime[1]?.format(dateFormat.value) || null;
|
||||
}
|
||||
|
||||
getDeviceAlertStatistic(params)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
|
|
@ -252,7 +271,7 @@
|
|||
const chartInstances = [];
|
||||
const chartRefs = {};
|
||||
|
||||
const selectedDimension = ref('dayhours');
|
||||
const selectedDimension = ref('customDays');
|
||||
const selectedDate = ref(null);
|
||||
|
||||
// ==================== 根据统计模式动态计算日期格式 ====================
|
||||
|
|
@ -262,6 +281,8 @@
|
|||
return 'YYYY-MM-DD';
|
||||
case 'monthDays':
|
||||
return 'YYYY-MM';
|
||||
case 'customDays':
|
||||
return 'YYYY-MM-DD';
|
||||
case 'yearMonth':
|
||||
return 'YYYY';
|
||||
default:
|
||||
|
|
@ -275,6 +296,8 @@
|
|||
return 'date';
|
||||
case 'monthDays':
|
||||
return 'month';
|
||||
case 'customDays':
|
||||
return 'date';
|
||||
case 'yearMonth':
|
||||
return 'year';
|
||||
default:
|
||||
|
|
@ -288,6 +311,8 @@
|
|||
return '选择日期';
|
||||
case 'monthDays':
|
||||
return '选择月份';
|
||||
case 'customDays':
|
||||
return '选择日期';
|
||||
case 'yearMonth':
|
||||
return '选择年份';
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in New Issue