1
guanqb
2024-02-02 d2be196da480346d1f111ca1f02b9852694aa2ca
src/views/publicSecurity/ninePlaceManage/situationRectification.vue
@@ -5,6 +5,10 @@
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
            <template slot="menuLeft">
                <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
                </el-button>
            </template>
        </avue-crud>
    </basic-container>
</template>
@@ -14,8 +18,23 @@
    mapGetters
} from "vuex"
import {
    getZGQKList
    getZGQKList, exportZGQKList
} from "@/api/publicSecurity/ninePlaceManage"
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"
export default {
    data () {
@@ -39,7 +58,6 @@
                searchShow: true,
                searchMenuSpan: 3,
                menu: false,
                header: false,
                border: true,
                index: true,
                editBtn: false,
@@ -151,6 +169,27 @@
    },
    methods: {
        handleExport () {
            this.$confirm("是否导出整改情况数据?", "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            }).then(() => {
                NProgress.start()
                var data = {
                    ...this.query
                }
                data = Qs.stringify(data)
                exportBlob(
                    `/api/blade-taskPlaceRectification/taskPlaceRectification/exportRectificationStatistics?${this.website.tokenHeader}=${getToken()}&` + data
                ).then(res => {
                    console.log('exportBlob', res)
                    downloadXls(res.data, `房屋数据表${dateNow()}.xlsx`)
                    NProgress.done()
                })
            })
        },
        rowSave (row, done, loading) {
            if (row.imageUrls.length > 0) {
                var urls = []