Browse Source

feat: 添加进窗列表导出

main
buaixuexideshitongxue 2 weeks ago
parent
commit
405824c032
  1. 10
      src/api/entryWindow/index.ts
  2. 17
      src/views/entryWindow/index.vue

10
src/api/entryWindow/index.ts

@ -11,3 +11,13 @@ export const recessedData=(body)=>{
body
})
}
export const excelEntryWindowList = (body) => {
return request.post({
url: '/reportProject/excelEntryWindowList',
body,
config: {
excelName: '进退窗项目列表.xlsx'
},
showErrorMsg: true
})
}

17
src/views/entryWindow/index.vue

@ -1,5 +1,5 @@
<script setup>
import {reportPage,recessedData} from '@/api/entryWindow/index'
import {reportPage,recessedData, excelEntryWindowList} from '@/api/entryWindow/index'
import useCatchStore from "@/stores/modules/catch";
import {listPolice} from "@/api/system/police";
import {timeFormat} from "@/utils/util";
@ -14,6 +14,7 @@ const dict = catchStore.getDicts(["procurementMethod"]);
const tableData = ref([])
const ressDialog =ref(false)
const activeTab = ref('all')
const exportLoading = ref(false)
const stageNodeMap = {
pending: ['initial', 'review'],
auditing: ['first', 'second', 'third', 'Lead'],
@ -140,6 +141,19 @@ const getList =async ()=>{
total.value=res.total
loading.value=false
}
const handleExcel = async ()=>{
if (exportLoading.value) return;
try {
exportLoading.value = true;
await excelEntryWindowList(query.value);
} catch (e) {
console.error('导出失败', e);
feedback.msgError("导出失败");
} finally {
exportLoading.value = false;
}
}
//
const reset =()=>{
query.value = createDefaultQuery();
@ -432,6 +446,7 @@ const isAdminShow = ()=>{
</el-form>
<div class="flex end">
<div>
<el-button type="primary" :loading="exportLoading" @click="handleExcel">导出</el-button>
<el-button type="primary" @click="getList">
<template #icon>
<icon name="el-icon-Search"/>

Loading…
Cancel
Save