添加已发短信查询接口

This commit is contained in:
guanj
2025-11-12 14:35:16 +08:00
parent 80ed66a2b0
commit 6a1a7eb218
3 changed files with 46 additions and 14 deletions

View File

@@ -58,11 +58,13 @@ const emit = defineEmits(["timeChangeInfo"]);
interface Props {
nextFlag?: boolean;
theCurrentTime?: boolean;
setWatch?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
nextFlag: false,
theCurrentTime: true,
setWatch: true,
});
const interval = ref(3);
@@ -573,8 +575,10 @@ function formatDate(date: Date): string {
}
watch(timeValue, async (newVal) => {
if (props.setWatch) {
await store.dispatch("setTimeType", { type: interval, value: newVal });
await emit("timeChangeInfo");
}
});
defineExpose({

View File

@@ -1,10 +1,30 @@
<template>
<!--短信查询-->
<el-dialog :close-on-click-modal="false" draggable v-model="machineVisible" :title="title" width="1200px" :before-close="handleClose">
<el-dialog
:close-on-click-modal="false"
draggable
v-model="machineVisible"
:title="title"
width="1200px"
:before-close="handleClose"
>
<div class="formBox">
<div class="formLeft">
<datePicker ref="datePickerRef" />
<span>发送结果 </span>
<datePicker
:setWatch="false"
ref="datePickerRef"
style="width: 470px"
/>
<span>关键字搜索 </span>
<el-input
size="small"
v-model="searchValue"
placeholder="请输入关键字"
clearable
style="width: 130px"
></el-input>
<span class="ml20">发送结果 </span>
<el-select
size="small"
v-model="state"
@@ -32,7 +52,8 @@
</div>
<div class="tableBox">
<el-table
:scrollbar-always-on="true" :data="tableData"
:scrollbar-always-on="true"
:data="tableData"
height="500px"
size="small"
stripe
@@ -124,14 +145,15 @@ const inquire = () => {
searchBeginTime: datePickerRef.value.timeValue[0],
searchEndTime: datePickerRef.value.timeValue[1],
sendResult: state.value,
searchValue: searchValue.value,
}).then((res) => {
total.value = res.data.total;
tableData.value = res.data.records;
loading.value = false;
});
};
const searchValue = ref("");
const open = (text: string, data?: any) => {
machineVisible.value = true;
nextTick(() => {
inquire();
@@ -183,6 +205,7 @@ const exportTable = () => {
searchBeginTime: datePickerRef.value.timeValue[0],
searchEndTime: datePickerRef.value.timeValue[1],
sendResult: state.value,
searchValue: searchValue.value,
}).then((res) => {
setTimeout(() => {
table2excel(
@@ -197,7 +220,7 @@ const exportTable = () => {
};
const handleClose = () => {
emit("close", false);
}
};
defineExpose({ open });
</script>

View File

@@ -54,11 +54,8 @@
</el-icon>
<template #dropdown>
<el-dropdown-menu>
<!-- <el-dropdown-item @click="handleClick('1')"
>已发送短信查询</el-dropdown-item
>
<el-dropdown-item @click="handleClick('2')"
<!-- <el-dropdown-item @click="handleClick('2')"
>模拟短信发送</el-dropdown-item
> -->
<el-dropdown-item @click="handleClick('3')"
@@ -70,6 +67,10 @@
<el-dropdown-item @click="handleClick('5')"
>台账导出</el-dropdown-item
>
<el-dropdown-item @click="handleClick('1')"
>已发送短信查询</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
@@ -292,6 +293,10 @@ const handleClick = (type: string) => {
smsQueriesFlag.value = true;
setTimeout(() => {
if (type === "1") {
smsQueriesRef.value.open("已发送短信查询");
}
if (type === "3") {
ConfigRef.value.open("系统配置");
}