This commit is contained in:
2026-01-26 19:54:57 +08:00
parent ba26f616ba
commit 13d206f497
6 changed files with 155 additions and 45 deletions

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :model-value="modelValue" title="预警总数" width="70%" @close="closeDialog" destroy-on-close append-to-body>
<el-dialog :model-value="modelValue" :title="title" width="70%" @close="closeDialog" destroy-on-close append-to-body>
<div style="height: 60vh; overflow: auto;">
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
@ -61,13 +61,16 @@ import { qcckGet, qcckPost } from "@/api/qcckApi.js";
import { ref, reactive, getCurrentInstance, watch } from "vue";
import {timeValidate} from '@/utils/tools.js'
const { proxy } = getCurrentInstance()
const { D_BZ_YJJB, D_GS_ZDQT_YJLB, D_BZ_YJLX } = proxy.$dict("D_BZ_YJJB", "D_GS_ZDQT_YJLB", "D_BZ_YJLX"); //获取字典数据
const props = defineProps({
modelValue: {
type: Boolean,
default: false
},
type: {
type: String,
default: ''
},
dict: {
type: Object,
default: () => ({})
@ -89,9 +92,10 @@ const searchConfiger = ref([
},
]);
const emit = defineEmits(['update:modelValue'])
let today = new Date();
let startOfDay = new Date(today.getFullYear(), today.getMonth(), today.getDate());
let endOfDay = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 23, 59, 59, 999);
const title = ref('')
let today = new Date();
let startOfDay = new Date(today.getFullYear(), today.getMonth(), today.getDate());
let endOfDay = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 23, 59, 59, 999);
const closeDialog = () => {
emit('update:modelValue', false)
}
@ -138,6 +142,7 @@ const onSearch = (val) => {
}
watch(() => props.modelValue, (val) => {
if (val) {
title.value = props.type == 'wqs' ? '未签收预警' : props.type == 'yfk' ? '已反馈预警' : '预警总数'
// 获取今天的开始时间和结束时间
parameter.value = {startTime:timeValidate(startOfDay), endTime:timeValidate(endOfDay)}
changePage()
@ -150,10 +155,14 @@ pageData.tableConfiger.loading = true;
const promes = {
...parameter.value,
yjjbList:parameter.value.yjjbList? [parameter.value.yjjbList] : [],
yjlxList: ['01'],
yjlxList: ['01'],
pageCurrent: pageData.pageConfiger.pageCurrent,
pageSize: pageData.pageConfiger.pageSize
}
if(props.type == 'wqs') promes.czzt = '01';
if(props.type == 'yfk') promes.czzt = '03';
qcckPost(promes, '/mosty-gsxt/tbYjxx/getPageAllList').then((res) => {
pageData.total = res.total || 0;
pageData.tableConfiger.loading = false;