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 @@