guanqb
2024-02-02 92acee73cbe8d5a230cf45e1146bd594153dc364
九小导出
4 files modified
72 ■■■■ changed files
src/api/publicSecurity/ninePlaceManage.js 10 ●●●●● patch | view | raw | blame | history
src/views/publicSecurity/ninePlaceManage/archivesManage.vue 41 ●●●●● patch | view | raw | blame | history
src/views/publicSecurity/ninePlaceManage/hiddenDangerStatistics.vue 17 ●●●● patch | view | raw | blame | history
src/views/publicSecurity/ninePlaceManage/situationRectification.vue 4 ●●●● patch | view | raw | blame | history
src/api/publicSecurity/ninePlaceManage.js
@@ -27,14 +27,10 @@
}
// 隐患统计
export const getYHTJList = (current, size, params) => {
export const getYHTJList = (params) => {
    return request({
        url: "/api/blade-taskPlaceRectification/taskPlaceRectification/rectificationStatistics",
        method: "get",
        params: {
            current,
            size,
            ...params
        },
        method: "post",
        params
    })
}
src/views/publicSecurity/ninePlaceManage/archivesManage.vue
@@ -14,6 +14,10 @@
                <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')"
                    v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')"></el-button>
            </template>
            <template slot="menuLeft">
                <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
                </el-button>
            </template>
        </avue-crud>
    </basic-container>
</template>
@@ -25,6 +29,21 @@
import {
    getDAGLList
} 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 () {
@@ -48,7 +67,6 @@
                searchShow: true,
                searchMenuSpan: 3,
                menu: false,
                header: false,
                border: true,
                index: true,
                editBtn: false,
@@ -169,6 +187,27 @@
        }
    },
    methods: {
        handleExport () {
            this.$confirm("是否导出档案管理数据?", "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            }).then(() => {
                NProgress.start()
                var data = {
                    ...this.query
                }
                data = Qs.stringify(data)
                exportBlob(
                    `/api/blade-place/place/exportNineType?${this.website.tokenHeader}=${getToken()}&` + data
                ).then(res => {
                    console.log('exportBlob', res)
                    downloadXls(res.data, `档案管理${dateNow()}.xlsx`)
                    NProgress.done()
                })
            })
        },
        showStringDispose (row, type) {
            row[type] = !row[type]
        },
src/views/publicSecurity/ninePlaceManage/hiddenDangerStatistics.vue
@@ -245,7 +245,7 @@
                label
            }).then(
                () => {
                    this.onLoad(this.page)
                    this.onLoad()
                    this.$message({
                        type: "success",
                        message: "操作成功!",
@@ -283,7 +283,7 @@
                label
            }).then(
                () => {
                    this.onLoad(this.page)
                    this.onLoad()
                    this.$message({
                        type: "success",
                        message: "操作成功!",
@@ -308,7 +308,7 @@
                    return removeTask(row)
                })
                .then(() => {
                    this.onLoad(this.page)
                    this.onLoad()
                    this.$message({
                        type: "success",
@@ -319,7 +319,7 @@
        searchReset () {
            this.query = {}
            this.onLoad(this.page)
            this.onLoad()
        },
        searchChange (params, done) {
@@ -330,7 +330,7 @@
                endTime: params.daterange[1],
            } : {}
            this.page.currentPage = 1
            this.onLoad(this.page)
            this.onLoad()
            done()
        },
@@ -359,7 +359,7 @@
                    return remove(this.ids)
                })
                .then(() => {
                    this.onLoad(this.page)
                    this.onLoad()
                    this.$message({
                        type: "success",
                        message: "操作成功!",
@@ -388,7 +388,7 @@
            // this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
        onLoad () {
            this.loading = true
            if (!this.query.startTime) {
                this.query = {
@@ -396,7 +396,8 @@
                    endTime: this.getLastMouth[0],
                }
            }
            getYHTJList(page.currentPage, page.pageSize, this.query).then(res => {
            console.log('onLoad', this.query)
            getYHTJList(this.query).then(res => {
                console.log('getZGQKList', res.data.data)
                const data = res.data.data
                data.forEach(item => {
src/views/publicSecurity/ninePlaceManage/situationRectification.vue
@@ -18,7 +18,7 @@
    mapGetters
} from "vuex"
import {
    getZGQKList, exportZGQKList
    getZGQKList
} from "@/api/publicSecurity/ninePlaceManage"
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
@@ -184,7 +184,7 @@
                    `/api/blade-taskPlaceRectification/taskPlaceRectification/exportRectificationStatistics?${this.website.tokenHeader}=${getToken()}&` + data
                ).then(res => {
                    console.log('exportBlob', res)
                    downloadXls(res.data, `房屋数据表${dateNow()}.xlsx`)
                    downloadXls(res.data, `整改情况${dateNow()}.xlsx`)
                    NProgress.done()
                })
            })