diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-domain/index.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-domain/index.vue index 2b0307f0..e113cf37 100644 --- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-domain/index.vue +++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-domain/index.vue @@ -27,7 +27,8 @@ const timeMode = ref('month'); const selectedYear = ref(String(new Date().getFullYear())); const selectedQuarter = ref(Math.ceil((new Date().getMonth() + 1) / 3)); const selectedMonth = ref(''); -const customRange = ref([]); // 自定义时段 [beginTime, endTime] +const customBeginTime = ref(''); +const customEndTime = ref(''); // 季度选项 const quarterOptions = [ @@ -65,12 +66,12 @@ const buildTimeParams = () => { }; } if (timeMode.value === 'custom') { - if (!customRange.value || customRange.value.length !== 2) { + if (!customBeginTime.value || !customEndTime.value) { return { beginTime: undefined, endTime: undefined }; } return { - beginTime: customRange.value[0], - endTime: customRange.value[1] + beginTime: customBeginTime.value, + endTime: customEndTime.value }; } // 月度:未选月份则不按时间过滤 @@ -150,7 +151,8 @@ const handleReset = () => { selectedYear.value = String(n.getFullYear()); selectedQuarter.value = Math.ceil((n.getMonth() + 1) / 3); selectedMonth.value = ''; - customRange.value = []; + customBeginTime.value = ''; + customEndTime.value = ''; getList(); }; @@ -322,16 +324,10 @@ onMounted(() => { - - + + + - + 搜索 diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-enforcer/index.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-enforcer/index.vue index 9eaf71c4..f317f428 100644 --- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-enforcer/index.vue +++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-enforcer/index.vue @@ -30,7 +30,8 @@ const selectedQuarter = ref(Math.ceil((new Date().getMonth() + 1) / 3)); const selectedMonth = ref( `${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, '0')}` ); -const customRange = ref([]); // 自定义时段 [beginTime, endTime] +const customBeginTime = ref(''); +const customEndTime = ref(''); // 季度选项 const quarterOptions = [ @@ -66,10 +67,10 @@ const buildTimeParams = () => { }; } if (timeMode.value === 'custom') { - if (!customRange.value || customRange.value.length !== 2) { + if (!customBeginTime.value || !customEndTime.value) { return { beginTime: undefined, endTime: undefined }; } - return { beginTime: customRange.value[0], endTime: customRange.value[1] }; + return { beginTime: customBeginTime.value, endTime: customEndTime.value }; } // 月度:未选月份则不按时间过滤 if (!selectedMonth.value) { @@ -159,7 +160,8 @@ const handleReset = () => { selectedYear.value = String(n.getFullYear()); selectedQuarter.value = Math.ceil((n.getMonth() + 1) / 3); selectedMonth.value = `${n.getFullYear()}-${String(n.getMonth() + 1).padStart(2, '0')}`; - customRange.value = []; + customBeginTime.value = ''; + customEndTime.value = ''; getList(); }; @@ -351,16 +353,10 @@ onUnmounted(() => { style="width: 150px" /> - - + + + - + 搜索 diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-field/index.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-field/index.vue index a1090bd8..c1fccf57 100644 --- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-field/index.vue +++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/trend/scan-field/index.vue @@ -25,6 +25,8 @@ const queryParams = reactive({ year: String(new Date().getFullYear()), quarter: Math.ceil((new Date().getMonth() + 1) / 3) as number, month: String(new Date().getMonth() + 1).padStart(2, '0') as string, + beginTime: undefined as string | undefined, + endTime: undefined as string | undefined, orderByColumn: '' as string, isAsc: '' as string }); @@ -50,9 +52,6 @@ const yearOptions = (() => { return Array.from({ length: 5 }, (_, i) => String(curr - i)); })(); -/** 自定义时段 [startTime, endTime] */ -const customRange = ref([]); - // ======================== 字典 ======================== const areaOptions = ref([]); const fieldOptions = ref([]); @@ -102,11 +101,11 @@ const buildTimeParams = (): ScanTimeParams => { return queryParams.month ? { year, month: queryParams.month } : { year }; } if (queryParams.periodType === 'custom') { - // 自定义:未选区间则不传时间参数 - if (!customRange.value || customRange.value.length !== 2) { + // 自定义:未选完整区间则不传时间参数 + if (!queryParams.beginTime || !queryParams.endTime) { return {}; } - return { startTime: customRange.value[0], endTime: customRange.value[1] }; + return { startTime: queryParams.beginTime, endTime: queryParams.endTime }; } return { year }; }; @@ -157,7 +156,8 @@ const handleReset = () => { queryParams.year = String(n.getFullYear()); queryParams.quarter = Math.ceil((n.getMonth() + 1) / 3); queryParams.month = String(n.getMonth() + 1).padStart(2, '0'); - customRange.value = []; + queryParams.beginTime = undefined; + queryParams.endTime = undefined; queryParams.orderByColumn = ''; queryParams.isAsc = ''; currentPage.value = 1; @@ -398,16 +398,10 @@ onUnmounted(() => { /> - - + + + - + 搜索 @@ -566,10 +560,6 @@ onUnmounted(() => { width: 120px; margin-left: 4px; } - - .custom-range { - width: 260px; - } } .table-panel {