From 37eef06a3b1aea2a955da21cf521451669218caf Mon Sep 17 00:00:00 2001 From: guanj Date: Tue, 30 Jun 2026 08:36:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8E=B0=E5=9C=BA=E5=8F=8D?= =?UTF-8?q?=E9=A6=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 1 - src/api/statistics/index.ts | 3 +- src/components/datePicker/index.vue | 18 +- src/views/VoltageSag_BJ/components/send.vue | 270 ++++++++++++++------ 4 files changed, 203 insertions(+), 89 deletions(-) diff --git a/components.d.ts b/components.d.ts index fb9d92d..1af1c7a 100644 --- a/components.d.ts +++ b/components.d.ts @@ -35,7 +35,6 @@ declare module '@vue/runtime-core' { ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElPopover: typeof import('element-plus/es')['ElPopover'] - ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRow: typeof import('element-plus/es')['ElRow'] diff --git a/src/api/statistics/index.ts b/src/api/statistics/index.ts index 21ffd03..cf75f8d 100644 --- a/src/api/statistics/index.ts +++ b/src/api/statistics/index.ts @@ -215,7 +215,8 @@ export function eventPage(data: object) { // 获取短信模版 export function messageGenerate(data: object) { return service({ - url: "/accept/messageGenerate", + // url: "/accept/messageGenerate", + url: "/accept/messageGenerateByIds", method: "post", params: data, }); diff --git a/src/components/datePicker/index.vue b/src/components/datePicker/index.vue index 37c0553..6a68b42 100644 --- a/src/components/datePicker/index.vue +++ b/src/components/datePicker/index.vue @@ -61,6 +61,7 @@ interface Props { theCurrentTime?: boolean; setWatch?: boolean; showTime?: boolean; + defaultInterval?: number; } const props = withDefaults(defineProps(), { @@ -68,6 +69,7 @@ const props = withDefaults(defineProps(), { theCurrentTime: true, setWatch: true, showTime: false, + defaultInterval: 3, }); const START_TIME_SUFFIX = " 00:00:00"; @@ -92,7 +94,7 @@ const setRangeValue = (start: string, end: string) => { timeValue.value = formatRangeValue(start, end); }; -const interval = ref(3); +const interval = ref(props.defaultInterval); const timeFlag = ref(1); const count = ref(0); const disabledPicker = ref(true); @@ -139,7 +141,8 @@ const isFutureDate = (time: any) => { return time && time > Date.now(); }; onMounted(() => { - timeChange(3); + interval.value = props.defaultInterval; + timeChange(props.defaultInterval); }); // 选择时间范围 const timeChange = (e: number) => { @@ -565,6 +568,16 @@ const setTheDate = (value: any) => { timeChange(value); }; +const applyCustomRange = (start: string, end: string) => { + interval.value = 5; + disabledPicker.value = false; + backDisabled.value = true; + preDisabled.value = props.nextFlag ? false : true; + count.value = 0; + timeFlag.value = 1; + setRangeValue(start, end); +}; + // 获取时间范围的同比 function getYearOnYear(startDate: string, endDate: string): [string, string] { const startYearAgo = new Date(startDate); @@ -612,6 +625,7 @@ defineExpose({ timeFlag, setTimeOptions, setTheDate, + applyCustomRange, getYearOnYear, getMonthOnMonth, timeChange, diff --git a/src/views/VoltageSag_BJ/components/send.vue b/src/views/VoltageSag_BJ/components/send.vue index 8638846..dec16c5 100644 --- a/src/views/VoltageSag_BJ/components/send.vue +++ b/src/views/VoltageSag_BJ/components/send.vue @@ -1,9 +1,9 @@