添加已发短信查询接口

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

View File

@@ -1,10 +1,30 @@
<template> <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="formBox">
<div class="formLeft"> <div class="formLeft">
<datePicker ref="datePickerRef" /> <datePicker
<span>发送结果 </span> :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 <el-select
size="small" size="small"
v-model="state" v-model="state"
@@ -32,7 +52,8 @@
</div> </div>
<div class="tableBox"> <div class="tableBox">
<el-table <el-table
:scrollbar-always-on="true" :data="tableData" :scrollbar-always-on="true"
:data="tableData"
height="500px" height="500px"
size="small" size="small"
stripe stripe
@@ -104,7 +125,7 @@ import { ElMessage } from "element-plus";
import datePicker from "@/components/datePicker/index.vue"; import datePicker from "@/components/datePicker/index.vue";
import { Search, Download } from "@element-plus/icons-vue"; import { Search, Download } from "@element-plus/icons-vue";
import table2excel from "js-table2excel"; import table2excel from "js-table2excel";
const emit= defineEmits(["close"]); const emit = defineEmits(["close"]);
const machineVisible = ref(false); const machineVisible = ref(false);
const title = ref("已发送短信查询"); const title = ref("已发送短信查询");
const datePickerRef = ref(); const datePickerRef = ref();
@@ -124,14 +145,15 @@ const inquire = () => {
searchBeginTime: datePickerRef.value.timeValue[0], searchBeginTime: datePickerRef.value.timeValue[0],
searchEndTime: datePickerRef.value.timeValue[1], searchEndTime: datePickerRef.value.timeValue[1],
sendResult: state.value, sendResult: state.value,
searchValue: searchValue.value,
}).then((res) => { }).then((res) => {
total.value = res.data.total; total.value = res.data.total;
tableData.value = res.data.records; tableData.value = res.data.records;
loading.value = false; loading.value = false;
}); });
}; };
const searchValue = ref("");
const open = (text: string, data?: any) => { const open = (text: string, data?: any) => {
machineVisible.value = true; machineVisible.value = true;
nextTick(() => { nextTick(() => {
inquire(); inquire();
@@ -183,6 +205,7 @@ const exportTable = () => {
searchBeginTime: datePickerRef.value.timeValue[0], searchBeginTime: datePickerRef.value.timeValue[0],
searchEndTime: datePickerRef.value.timeValue[1], searchEndTime: datePickerRef.value.timeValue[1],
sendResult: state.value, sendResult: state.value,
searchValue: searchValue.value,
}).then((res) => { }).then((res) => {
setTimeout(() => { setTimeout(() => {
table2excel( table2excel(
@@ -197,7 +220,7 @@ const exportTable = () => {
}; };
const handleClose = () => { const handleClose = () => {
emit("close", false); emit("close", false);
} };
defineExpose({ open }); defineExpose({ open });
</script> </script>

View File

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