|
|
@@ -2,14 +2,6 @@
|
|
|
* @Author: fxs bjnsfxs@163.com
|
|
|
* @Date: 2024-11-29
|
|
|
* @LastEditors: fxs bjnsfxs@163.com
|
|
|
- * @LastEditTime: 2024-12-07
|
|
|
- * @Description:
|
|
|
- *
|
|
|
--->
|
|
|
-<!--
|
|
|
- * @Author: fxs bjnsfxs@163.com
|
|
|
- * @Date: 2024-11-29
|
|
|
- * @LastEditors: fxs bjnsfxs@163.com
|
|
|
* @LastEditTime: 2024-12-03
|
|
|
* @Description:
|
|
|
*
|
|
|
@@ -34,7 +26,12 @@ import TableFilterForm from '@/components/table/TableFilterForm/TableFilterForm.
|
|
|
import { useTableChart } from '@/hooks/useTableChart.ts'
|
|
|
import { usePage } from '@/hooks/usePage.ts'
|
|
|
import PieBorderRadius from '@/components/echarts/PieBorderRadius.vue'
|
|
|
-import { createDateRange, formatDate } from '@/utils/common'
|
|
|
+import {
|
|
|
+ createDateRange,
|
|
|
+ formatDate,
|
|
|
+ getRangeTimestamps,
|
|
|
+ resetTimeToMidnight
|
|
|
+} from '@/utils/common'
|
|
|
import { FieldSpecialEffectType, TextType } from '@/types/tableText.ts'
|
|
|
import { useAnalysis } from '@/hooks/useAnalysis.ts'
|
|
|
|
|
|
@@ -236,22 +233,22 @@ const filterInfo = reactive<Array<QueryInfo>>([
|
|
|
otherOption: adTypeOptions,
|
|
|
default: '',
|
|
|
clearable: true
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'createTime',
|
|
|
- label: '创建时间',
|
|
|
- type: FilterType.DATE,
|
|
|
- placeholder: '选择日期',
|
|
|
- otherOption: {
|
|
|
- dataRange: true
|
|
|
- }
|
|
|
}
|
|
|
+ // {
|
|
|
+ // name: 'createTime',
|
|
|
+ // label: '创建时间',
|
|
|
+ // type: FilterType.DATE,
|
|
|
+ // placeholder: '选择日期',
|
|
|
+ // otherOption: {
|
|
|
+ // dataRange: true
|
|
|
+ // }
|
|
|
+ // }
|
|
|
])
|
|
|
|
|
|
const headerCardInfo: HeaderCardProps = {
|
|
|
// title: '广告数据(正式服数据)',
|
|
|
title: '广告数据',
|
|
|
- openDateSelect: false
|
|
|
+ openDateSelect: true
|
|
|
}
|
|
|
|
|
|
interface ChartQuery {
|
|
|
@@ -304,6 +301,20 @@ const updateAllReq = (pf: string[], gid: string) => {
|
|
|
// updateReqConfig(keepDataTableInfo.requestConfig, { pf, gid })
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 更新请求配置
|
|
|
+ * @param {*} date 新的日期
|
|
|
+ */
|
|
|
+const changeDate = (date: Array<Date>) => {
|
|
|
+ updateReqConfig(requestConfig, {
|
|
|
+ startTime: resetTimeToMidnight(date[0]),
|
|
|
+ endTime: resetTimeToMidnight(date[1])
|
|
|
+ })
|
|
|
+ const timeRange = getRangeTimestamps(date).map((item) => item.toString())
|
|
|
+ queryFormData.value.createTime = [timeRange[0], timeRange[1]]
|
|
|
+ updateChartData()
|
|
|
+}
|
|
|
+
|
|
|
const { watchPageChange } = usePage()
|
|
|
|
|
|
const backupSelect = reactive([])
|
|
|
@@ -331,6 +342,7 @@ const { updateChartData, chartOptions } = useTableChart(
|
|
|
:title="headerCardInfo.title"
|
|
|
:open-date-select="headerCardInfo.openDateSelect"
|
|
|
:is-radio="isRadioPf"
|
|
|
+ @change-date="changeDate"
|
|
|
></HeaderCard>
|
|
|
</div>
|
|
|
<div class="adTableContent">
|