zhongrj
2024-02-20 68f3c1b1714d4942c0c534aea2fedecbaa641561
交易导出接入
1 files modified
37 ■■■■■ changed files
src/views/publicSecurity/positionManage/TransactRegist.vue 37 ●●●●● patch | view | raw | blame | history
src/views/publicSecurity/positionManage/TransactRegist.vue
@@ -66,7 +66,21 @@
    update,
    add,
} from "@/api/task/labelReporting"
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import Qs from "qs"
import {
    exportBlob
} from "@/api/common"
import {
    getToken
} from '@/util/auth'
import {
    downloadXls
} from "@/util/util"
import {
    dateNow
} from "@/util/date"
import {
    mapGetters
} from "vuex"
@@ -387,6 +401,27 @@
        }
    },
    methods: {
        handleExport () {
            this.$confirm("是否导出交易登记数据?", "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            }).then(() => {
                NProgress.start()
                var data = {
                    ...this.query
                }
                // data.isNine = 1
                data = Qs.stringify(data)
                exportBlob(
                    `/api/blade-taskLabelReportingEvent/taskLabelReportingEvent/export-taskLabelReportingEvent?${this.website.tokenHeader}=${getToken()}&` + data
                ).then(res => {
                    console.log('exportBlob', res)
                    downloadXls(res.data, `交易登记${dateNow()}.xlsx`)
                    NProgress.done()
                })
            })
        },
        // 弹窗关闭回调
        handleClose () {
            this.cancelAudit()