| | |
| | | :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-scope="{row, size}" slot="principalIdCard"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'principalIdCardflag')"> |
| | | {{ textDispose(row, 'principalIdCardflag', 'principalIdCard') }} |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="principalPhone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')" |
| | | v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')"> |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="policePhone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'policePhoneflag')" |
| | | v-text="textDispose(row, 'policePhoneflag', 'policePhone')"> |
| | | </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> |
| | |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import website from '@/config/website' |
| | | 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 () { |
| | |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menu: false, |
| | | header: false, |
| | | border: true, |
| | | index: true, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "地区", |
| | | prop: "regionName", |
| | | align: 'center', |
| | | }, { |
| | | label: "场所名称", |
| | | prop: "regionName", |
| | | prop: "placeName", |
| | | align: 'center', |
| | | search: true, |
| | | searchSpan: 3, |
| | | // searchLabelWidth: 96, |
| | | width: 156, |
| | | searchPlaceholder: '请输入' |
| | | }, { |
| | | label: "场所地址", |
| | | prop: "regionName", |
| | | prop: "location", |
| | | align: 'center', |
| | | }, { |
| | | }, |
| | | { |
| | | 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: 3, |
| | | // searchLabelWidth: 96, |
| | | searchPlaceholder: '请选择' |
| | | }, { |
| | | label: "场所负责人", |
| | | prop: "regionName", |
| | | prop: "principal", |
| | | align: 'center', |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 96, |
| | | width: 110, |
| | | searchPlaceholder: '请输入负责人' |
| | | }, { |
| | | label: "身份证信息", |
| | | prop: "regionName", |
| | | prop: "principalIdCard", |
| | | align: 'center', |
| | | slot: true, |
| | | width: 160 |
| | | }, { |
| | | label: "联系方式", |
| | | prop: "regionName", |
| | | prop: "principalPhone", |
| | | align: 'center', |
| | | slot: true, |
| | | width: 120 |
| | | }, { |
| | | label: "地区", |
| | | prop: "townStreetName", |
| | | align: 'center', |
| | | search: true, |
| | | searchSpan: 3, |
| | | searchLabelWidth: 46, |
| | | labelWidth: 120, |
| | | width: 156, |
| | | searchPlaceholder: '请输入地区' |
| | | }, { |
| | | label: "辖区派出所", |
| | | prop: "regionName", |
| | | prop: "deptName", |
| | | align: 'center', |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 96, |
| | | searchPlaceholder: '请输入辖区派出所' |
| | | }, { |
| | | label: "责任民警", |
| | | prop: "regionName", |
| | | prop: "policeName", |
| | | align: 'center', |
| | | search: true, |
| | | searchSpan: 4, |
| | | // searchLabelWidth: 96, |
| | | width: 110, |
| | | searchPlaceholder: '请输入责任民警' |
| | | }, { |
| | | label: "责任民警联系方式", |
| | | prop: "regionName", |
| | | prop: "policePhone", |
| | | align: 'center', |
| | | slot: true, |
| | | width: 120 |
| | | }], |
| | | }, |
| | | data: [] |
| | |
| | | return ids.join(",") |
| | | }, |
| | | |
| | | textDispose () { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | 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-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] |
| | | }, |
| | | |
| | | rowSave (row, done, loading) { |
| | | if (row.imageUrls.length > 0) { |
| | | var urls = [] |
| | |
| | | |
| | | onLoad (page, params = {}) { |
| | | this.loading = true |
| | | this.loading = false |
| | | getDAGLList(page.currentPage, page.pageSize, { ...Object.assign(params, this.query), isNine: 1 }).then(res => { |
| | | console.log('getDAGLList', res.data.data.records) |
| | | const data = { |
| | | ...res.data.data, |
| | | records: res.data.data.records.map(item => { |
| | | return { |
| | | ...item, |
| | | 'principalIdCardflag': false, |
| | | 'principalPhoneflag': false, |
| | | 'policePhoneflag': false |
| | | } |
| | | }) |
| | | } |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | |
| | | // :deep(.el-form-item__content) { |
| | | // text-align: left !important; |
| | | // } |
| | | |
| | | // :deep(.avue-form__menu--center .el-button) { |
| | | // margin: 0 5px 0 0; |
| | | // } |
| | | </style> |