|
@@ -1,103 +1,101 @@
|
|
|
<template>
|
|
|
- <el-dialog v-model="state.dialogVisible" draggable title="短信明细" @close="close" destroy-on-close append-to-body>
|
|
|
- <el-form :model="state.queryParams" ref="ruleFormRef" inline @submit.native.prevent>
|
|
|
- <el-form-item label="市民姓名" prop="PhoneNumber">
|
|
|
- <el-input v-model="state.queryParams.PhoneNumber" placeholder="请填写市民姓名" clearable @keyup.enter="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="联系电话" prop="Label">
|
|
|
- <el-input v-model="state.queryParams.Label" placeholder="请填写市民联系电话" clearable @keyup.enter="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
|
|
|
- <el-button @click="resetQuery(ruleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <ProTable
|
|
|
- ref="proTableRef"
|
|
|
- :columns="columns"
|
|
|
- :data="state.tableData"
|
|
|
- :loading="state.loading"
|
|
|
- :total="state.total"
|
|
|
- v-model:page-index="state.queryParams.PageIndex"
|
|
|
- v-model:page-size="state.queryParams.PageSize"
|
|
|
- :tool-button="false"
|
|
|
- >
|
|
|
- </ProTable>
|
|
|
- </el-dialog>
|
|
|
+ <el-dialog v-model="state.dialogVisible" draggable title="短信明细" @close="close" destroy-on-close append-to-body>
|
|
|
+ <el-form :model="state.queryParams" ref="ruleFormRef" inline @submit.native.prevent>
|
|
|
+ <el-form-item label="市民姓名" prop="PhoneNumber">
|
|
|
+ <el-input v-model="state.queryParams.PhoneNumber" placeholder="请填写市民姓名" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="联系电话" prop="Name">
|
|
|
+ <el-input v-model="state.queryParams.Name" placeholder="请填写市民联系电话" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
|
|
|
+ <el-button @click="resetQuery(ruleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <ProTable
|
|
|
+ ref="proTableRef"
|
|
|
+ :columns="columns"
|
|
|
+ :data="state.tableData"
|
|
|
+ :loading="state.loading"
|
|
|
+ :total="state.total"
|
|
|
+ v-model:page-index="state.queryParams.PageIndex"
|
|
|
+ v-model:page-size="state.queryParams.PageSize"
|
|
|
+ :tool-button="false"
|
|
|
+ >
|
|
|
+ </ProTable>
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="tsx">
|
|
|
-import { computed, nextTick, reactive, ref } from 'vue';
|
|
|
-import { ElMessage, FormInstance } from 'element-plus';
|
|
|
+import { computed, reactive, ref } from 'vue';
|
|
|
+import { FormInstance } from 'element-plus';
|
|
|
+import { smartCallOutSmsDetailQuery } from '@/api/auxiliary/smartCallOut';
|
|
|
|
|
|
// 定义变量内容
|
|
|
const state = reactive<any>({
|
|
|
- dialogVisible: false,
|
|
|
- queryParams: {
|
|
|
- // 查询参数
|
|
|
- PageIndex: 1,
|
|
|
- PageSize: 10,
|
|
|
- PhoneNumber: null,
|
|
|
- Label: null,
|
|
|
- },
|
|
|
- tableData: [],
|
|
|
+ dialogVisible: false,
|
|
|
+ queryParams: {
|
|
|
+ // 查询参数
|
|
|
+ PageIndex: 1,
|
|
|
+ PageSize: 10,
|
|
|
+ PhoneNumber: null,
|
|
|
+ Name: null,
|
|
|
+ },
|
|
|
+ tableData: [],
|
|
|
});
|
|
|
|
|
|
const ruleFormRef = ref<RefType>(null); // 表单ref
|
|
|
/** 搜索按钮操作 */
|
|
|
const handleQuery = () => {
|
|
|
- state.queryParams.PageIndex = 1;
|
|
|
- queryList();
|
|
|
+ state.queryParams.PageIndex = 1;
|
|
|
+ queryList();
|
|
|
};
|
|
|
// 获取列表
|
|
|
const queryList = () => {
|
|
|
- /*state.loading = true;
|
|
|
- citizenList(state.queryParams)
|
|
|
- .then((res) => {
|
|
|
- state.loading = false;
|
|
|
- state.tableData = res.result.items ?? [];
|
|
|
- state.total = res.result.total ?? 0;
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- state.loading = false;
|
|
|
- });*/
|
|
|
+ state.loading = true;
|
|
|
+ smartCallOutSmsDetailQuery(state.queryParams)
|
|
|
+ .then((res) => {
|
|
|
+ state.loading = false;
|
|
|
+ state.tableData = res.result.items ?? [];
|
|
|
+ state.total = res.result.total ?? 0;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ state.loading = false;
|
|
|
+ });
|
|
|
};
|
|
|
// 重置表单
|
|
|
const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
- if (!formEl) return;
|
|
|
- formEl.resetFields();
|
|
|
- queryList();
|
|
|
+ if (!formEl) return;
|
|
|
+ formEl.resetFields();
|
|
|
+ queryList();
|
|
|
};
|
|
|
const proTableRef = ref<RefType>(); // 表格ref
|
|
|
-const canChoose = computed(() => {
|
|
|
- return proTableRef.value?.selectedList.length;
|
|
|
-});
|
|
|
// 表格配置项
|
|
|
const columns = ref<any[]>([
|
|
|
- { prop: 'phoneNumber', label: '市民姓名' },
|
|
|
- { prop: 'label', label: '联系电话' },
|
|
|
+ { prop: 'phoneNumber', label: '市民姓名' },
|
|
|
+ { prop: 'label', label: '联系电话' },
|
|
|
]);
|
|
|
-
|
|
|
-let loading = ref<boolean>(false); // 加载状态
|
|
|
// 打开弹窗
|
|
|
-const openDialog = async () => {
|
|
|
- try {
|
|
|
- state.dialogVisible = true;
|
|
|
- } catch (error) {
|
|
|
- console.log(error);
|
|
|
- }
|
|
|
+const openDialog = async (row:any) => {
|
|
|
+ try {
|
|
|
+ state.dialogVisible = true;
|
|
|
+ state.queryParams.id = row.id;
|
|
|
+ queryList();
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ }
|
|
|
};
|
|
|
// 关闭弹窗
|
|
|
const closeDialog = () => {
|
|
|
- state.dialogVisible = false;
|
|
|
+ state.dialogVisible = false;
|
|
|
};
|
|
|
const close = () => {
|
|
|
- ruleFormRef.value?.resetFields();
|
|
|
- ruleFormRef.value?.resetFields();
|
|
|
+ ruleFormRef.value?.resetFields();
|
|
|
+ ruleFormRef.value?.resetFields();
|
|
|
};
|
|
|
// 暴露变量
|
|
|
defineExpose({
|
|
|
- openDialog,
|
|
|
- closeDialog,
|
|
|
+ openDialog,
|
|
|
+ closeDialog,
|
|
|
});
|
|
|
</script>
|