|
|
|
@ -1,6 +1,6 @@ |
|
|
|
<script setup> |
|
|
|
<script setup> |
|
|
|
import useCatchStore from "@/stores/modules/catch"; |
|
|
|
import useCatchStore from "@/stores/modules/catch"; |
|
|
|
import {getPageConditionVo} from "@/api/report/index"; |
|
|
|
import {excelConditionVo, getPageConditionVo} from "@/api/report/index"; |
|
|
|
import {timeFormat} from "@/utils/util"; |
|
|
|
import {timeFormat} from "@/utils/util"; |
|
|
|
import {getFlowNodeValue} from "@/enums/flowEnums"; |
|
|
|
import {getFlowNodeValue} from "@/enums/flowEnums"; |
|
|
|
import feedback from "@/utils/feedback"; |
|
|
|
import feedback from "@/utils/feedback"; |
|
|
|
@ -10,6 +10,7 @@ const router = useRouter(); |
|
|
|
|
|
|
|
|
|
|
|
const total = ref(10) |
|
|
|
const total = ref(10) |
|
|
|
const loading =ref(false) |
|
|
|
const loading =ref(false) |
|
|
|
|
|
|
|
const exportLoading = ref(false) |
|
|
|
const catchStore = useCatchStore(); |
|
|
|
const catchStore = useCatchStore(); |
|
|
|
const dict = catchStore.getDicts(["procurementMethod"]); |
|
|
|
const dict = catchStore.getDicts(["procurementMethod"]); |
|
|
|
const dictNode = ref([ |
|
|
|
const dictNode = ref([ |
|
|
|
@ -69,8 +70,18 @@ const handleClick =(val)=>{ |
|
|
|
getList() |
|
|
|
getList() |
|
|
|
} |
|
|
|
} |
|
|
|
const handleExcel =async ()=>{ |
|
|
|
const handleExcel =async ()=>{ |
|
|
|
// await feedback.confirm("确定要导出数据吗"); |
|
|
|
if (exportLoading.value) return; // 防止重复点击 |
|
|
|
window.open(`${BASE_PATH}/reportProject/excelConditionVo?` + new URLSearchParams(query.value).toString()) |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
exportLoading.value = true; |
|
|
|
|
|
|
|
await excelConditionVo(query.value); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
console.error('导出失败', e); |
|
|
|
|
|
|
|
feedback.msgError("导出失败"); |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
exportLoading.value = false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
onMounted(()=>{ |
|
|
|
onMounted(()=>{ |
|
|
|
getList() |
|
|
|
getList() |
|
|
|
@ -171,8 +182,13 @@ onMounted(()=>{ |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
<div class="flex end"> |
|
|
|
<div class="flex end"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" @click="handleExcel">导出</el-button> |
|
|
|
<el-button |
|
|
|
<el-button type="primary" @click="getList"> |
|
|
|
type="primary" |
|
|
|
|
|
|
|
:loading="exportLoading" |
|
|
|
|
|
|
|
@click="handleExcel" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
导出 |
|
|
|
|
|
|
|
</el-button> <el-button type="primary" @click="getList"> |
|
|
|
<template #icon> |
|
|
|
<template #icon> |
|
|
|
<icon name="el-icon-Search"/> |
|
|
|
<icon name="el-icon-Search"/> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|