|
|
|
@ -1,11 +1,12 @@ |
|
|
|
<!--审计预警监督--> |
|
|
|
<!--审计预警监督--> |
|
|
|
<script setup> |
|
|
|
<script setup> |
|
|
|
|
|
|
|
|
|
|
|
import {warningPage} from "@/api/warning/index"; |
|
|
|
import {warningPage, excelWarningList} from "@/api/warning/index"; |
|
|
|
import {timeFormat} from "@/utils/util"; |
|
|
|
import {timeFormat} from "@/utils/util"; |
|
|
|
import {useRoute} from "vue-router"; |
|
|
|
import {useRoute} from "vue-router"; |
|
|
|
const route = useRoute() |
|
|
|
const route = useRoute() |
|
|
|
const loading =ref(false) |
|
|
|
const loading =ref(false) |
|
|
|
|
|
|
|
const exportLoading = ref(false) |
|
|
|
const total =ref(10) |
|
|
|
const total =ref(10) |
|
|
|
const tableData =ref([]) |
|
|
|
const tableData =ref([]) |
|
|
|
const activeTab = ref(route.query.specialArea === 'cwlnt' ? 'cwlnt' : route.query.warningState === '1' ? '1' : '0') |
|
|
|
const activeTab = ref(route.query.specialArea === 'cwlnt' ? 'cwlnt' : route.query.warningState === '1' ? '1' : '0') |
|
|
|
@ -64,6 +65,17 @@ const editFun = (row) =>{ |
|
|
|
query: routeQuery |
|
|
|
query: routeQuery |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const handleExcel = async ()=>{ |
|
|
|
|
|
|
|
if (exportLoading.value) return; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
exportLoading.value = true; |
|
|
|
|
|
|
|
await excelWarningList(query.value); |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
console.error('导出失败', e); |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
exportLoading.value = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
getList() |
|
|
|
getList() |
|
|
|
|
|
|
|
|
|
|
|
watch(()=>route.query.load,(val)=>{ |
|
|
|
watch(()=>route.query.load,(val)=>{ |
|
|
|
@ -133,6 +145,7 @@ watch(()=>route.query.load,(val)=>{ |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<div class="flex end"> |
|
|
|
<div class="flex end"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
|
|
|
|
<el-button type="primary" :loading="exportLoading" @click="handleExcel">导出</el-button> |
|
|
|
<el-button type="primary" @click="getList"> |
|
|
|
<el-button type="primary" @click="getList"> |
|
|
|
<template #icon> |
|
|
|
<template #icon> |
|
|
|
<icon name="el-icon-Search"/> |
|
|
|
<icon name="el-icon-Search"/> |
|
|
|
|