feat(share-detail): 添加分摊导出按钮

This commit is contained in:
dj
2025-04-02 00:02:49 +08:00
parent 1e29e6bdc4
commit 4dc5ca40ee

View File

@@ -1,5 +1,7 @@
<template>
<!-- <fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px"></fvSearchForm>-->
<!-- <el-button color="#DED0B2" style="float: left;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>-->
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick" style="margin-top: 15px">
<template #empty>
<el-empty description="暂无数据"/>
@@ -12,6 +14,7 @@ import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {toThousands} from '@/utils/changePrice.js'
import { getSubCompOpt } from '@/api/user/user.js';
import {reactive, ref} from "vue";
import {shareExportExcel} from "@/api/expense-manage";
const router = useRouter()
const route = useRoute()
const searchConfig = reactive([
@@ -129,6 +132,17 @@ const tableConfig = reactive({
open :false,
}
})
// const exportTable = () => {
// shareExportExcel().then(res => {
// console.log(res)
// let fileName = `科技研发项目工时及成本分摊汇总表.xlsx`
// const blob = new Blob([res.data])
// let a = document.createElement('a')
// a.href = URL.createObjectURL(blob)
// a.download = fileName
// a.click()
// })
// }
const search = (val) => {
tableConfig.params = {...val}
tableIns.value.refresh()