| | |
| | | :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> |
| | |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import website from '@/config/website' |
| | | import { |
| | | getZGQKList |
| | | } 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 () { |
| | |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menu: false, |
| | | header: false, |
| | | border: true, |
| | | index: true, |
| | | editBtn: false, |
| | |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "场所名称", |
| | | prop: "regionName", |
| | | prop: "placeName", |
| | | align: 'center', |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 76, |
| | | }, { |
| | | label: "地址名称", |
| | | prop: "regionName", |
| | | prop: "addressName", |
| | | align: 'center', |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 96, |
| | | }, { |
| | | label: "场所类别", |
| | | prop: "regionName", |
| | | prop: "nineType", |
| | | align: 'center', |
| | | dicUrl: "/api/blade-system/dict-biz/tree?code=nineType", |
| | | props: { |
| | | label: "title", |
| | | value: "key", |
| | | }, |
| | | type: 'select', |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 96, |
| | | }, { |
| | | label: "存在安全隐患或违法行为", |
| | | prop: "regionName", |
| | | prop: "hiddenDanger", |
| | | align: 'center', |
| | | width: 280 |
| | | }, { |
| | | label: "是否下发《责令改正通知书》或是否处罚", |
| | | prop: "regionName", |
| | | prop: "rectificationNoticeFlag", |
| | | align: 'center', |
| | | }, { |
| | | dicData: [ |
| | | { |
| | | label: "否", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "是", |
| | | value: 2, |
| | | } |
| | | ], |
| | | width: 140 |
| | | }, |
| | | { |
| | | label: "是否整改完毕", |
| | | prop: "regionName", |
| | | prop: "rectificationFlag", |
| | | align: 'center', |
| | | dicData: [ |
| | | { |
| | | label: "否", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "是", |
| | | value: 2, |
| | | } |
| | | ], |
| | | type: 'select', |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 124, |
| | | width: 100 |
| | | }, { |
| | | label: "完成整改时限", |
| | | prop: "regionName", |
| | | prop: "rectificationEndTime", |
| | | align: 'center', |
| | | width: 100 |
| | | }, { |
| | | label: "xx派出所", |
| | | prop: "regionName", |
| | | label: "检查时间", |
| | | prop: "createTime", |
| | | align: 'center', |
| | | width: 100 |
| | | }, { |
| | | label: "派出所名称", |
| | | prop: "deptName", |
| | | align: 'center', |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 106, |
| | | }], |
| | | }, |
| | | data: [] |
| | |
| | | |
| | | }, |
| | | 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 = [] |
| | |
| | | |
| | | onLoad (page, params = {}) { |
| | | this.loading = true |
| | | this.loading = false |
| | | getZGQKList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | console.log('getZGQKList', res.data.data) |
| | | const data = res.data.data |
| | | data.records.forEach(item => { |
| | | item.createTime = item.createTime ? item.createTime.slice(0, 10) : '' |
| | | item.rectificationEndTime = item.rectificationEndTime ? item.rectificationEndTime.slice(0, 10) : '' |
| | | }) |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | } |