Browse Source

分类查看列表,党员导出

shibei_master
13176889840 3 years ago
parent
commit
3e419297a0
  1. 10
      src/router/index.js
  2. 11
      src/views/modules/visual/basicinfo/basicInfoMain.vue
  3. 251
      src/views/modules/visual/basicinfo/peopleList.vue
  4. 55
      src/views/modules/visual/communityParty/party.vue

10
src/router/index.js

@ -128,6 +128,16 @@ export const moduleShujuRoutes = {
isTab: true,
},
},
{
path: "/main-shuju/visual-basicinfo-people-list",
props: true,
component: () => import("@/views/modules/visual/basicinfo/peopleList"),
name: "visual-basicinfo-people-list",
meta: {
title: "人员列表",
isTab: true,
},
},
],
};

11
src/views/modules/visual/basicinfo/basicInfoMain.vue

@ -107,7 +107,7 @@
<div class="list_item">
<div v-for="(colItem,colIndex) in item"
:key="colIndex"
class="list_item_col">
class="list_item_col" @click="handleTo(colItem)">
<img :src="colItem.dataIcon"
alt />
<div class="item_content">
@ -310,6 +310,15 @@ const vueGis = {
},
methods: {
handleTo(item) {
this.$router.push({
path: `/main-shuju/visual-basicinfo-people-list`,
query: {
columnName: item.columnName,
label: item.label
}
});
},
hideAgencyList () {
this.showAgencyList = !this.showAgencyList
// if (this.showAgencyList) {

251
src/views/modules/visual/basicinfo/peopleList.vue

@ -0,0 +1,251 @@
<template>
<div class="div_people_search">
<!-- 组织路由 -->
<div class="div_top g-bread">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item v-for="item in breadList" :key="item.path" :to="{ path: item.path }">
{{ item.meta.title }}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div v-if="orgLevel!=='people'">
<div class="list_box">
<div class="info_tip">
<img src="../../../../assets/img/shuju/title-tip.png"
alt />
<div class="tip_title">{{tableTitle}}</div>
</div>
<div class="warning-table">
<div class="table">
<div class="table-header">
<div class="td td1">序号</div>
<div class="td td1">姓名</div>
<div class="td td3">所属网格</div>
<div class="td td3">所属房屋</div>
<div class="td td2">手机</div>
<div class="td td3">身份证</div>
<div class="td td1">性别</div>
<div class="td td2">出生日期</div>
<div class="td td1">操作</div>
</div>
<div v-if="!loading && tableData.length> 0"
class="table-body">
<div class="table-body-tr"
v-for="(item,index) in tableData"
:key='index'>
<div class="td td1">{{item.sort}} </div>
<div class="td td1">{{item.name}} </div>
<div class="td td3">{{item.gridName}} </div>
<div class="td td3">{{item.neighborHoodName + item.buildNum}} </div>
<!-- <div class="td td1">{{item.buildNum}} </div> -->
<div class="td td2">{{item.mobile}} </div>
<div class="td td3">{{item.idCard}} </div>
<div class="td td1">{{item.gender}} </div>
<div class="td td2">{{item.birthday}} </div>
<div @click="handelToPeople(item)"
class="td td1 btn_detail">{{'查看'}} </div>
</div>
</div>
<div class="table-status"
v-if="loading">
<screen-loading>加载中</screen-loading>
</div>
<div class="table-status"
v-if="tableData.length == 0 && !loading">
<div class="no-data">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
</div>
</div>
</div>
<div class="pagination">
<el-pagination background
layout="prev, pager, next, total"
:current-page="pageNo"
:page-size="pageSize"
:total="total"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</div>
</div>
<!-- <people v-if="orgLevel==='people'"
:uid="selUserId"
ref="ref_people"></people> -->
<people-more v-show="showedMoreInfo"
v-if="info.userId"
:userId="info.userId"
:gridName="info.gridName"
@close="showedMoreInfo = false" />
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import People from "./people";
import ScreenLoading from "@/views/modules/visual/cpts/loading";
import peopleMore from "@/views/modules/visual/basicinfo/cpts/people-more";
export default {
name: "people-list",
components: {
People, ScreenLoading, peopleMore
},
data () {
return {
showedMoreInfo: false,
tableTitle: '党员',
loading: false,
headerList: [],
tableData: [],
searchName: '',
pageSize: 7,
pageNo: 1,
total: 0,
orgLevel: 'search',
selUserId: '',
//
runNum: 0,
runAgencyArray: [],
info: {},
breadList: []
};
},
activated () {
this.searchName = ''
this.tableData = []
const { columnName, label } = this.$route.query
this.searchName = columnName
this.tableTitle = label
this.loadList()
},
beforeRouteEnter(to, from, next) {
const arr = [ {...from }, { ...to, meta: { title: '人员列表'}}]
next((vm) =>{
vm.breadList = [ ...arr ]
})
},
methods: {
handleSearch () {
},
async loadList () {
this.loading = true
const url = "/epmetuser/icresiuser/searchbycategory"
let params = {
columnName: this.searchName,
pageSize: this.pageSize,
pageNo: this.pageNo
}
const { data, code, msg } = await requestPost(url, params)
this.loading = false
if (code === 0) {
this.total = data.total
this.tableData = data.list
} else {
this.$message.error(msg)
}
},
//
handelToPeople (item) {
// this.toSubAgency('people', this.tableData[index].userId)
this.info = { ...item }
this.showedMoreInfo = true
},
pageCurrentChangeHandle (val) {
this.pageNo = val
this.loadList()
},
// type:polygon / people
async toSubAgency (type, userId) {
this.orgLevel = 'people'
this.selUserId = userId
},
//
handleClickBack () {
this.orgLevel = 'search'
},
},
destroyed () {
console.log("我已经离开了!");
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/basicInfoMain.scss"
scoped
></style>
<style
lang="scss"
src="@/assets/scss/modules/visual/searchPerson.scss"
scoped
></style>
<style lang="scss" scoped>
.div_search_list {
.el-input__inner[WarningColor="warning"] {
border-radius: 8px 0 0 8px;
height: 53px;
background-color: #01106800;
border: 2px solid #0082fb;
padding-left: 70px;
font-size: 18px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
}
}
.list_box {
width: 96%;
height: 780px;
margin: 20px auto;
}
.pagination {
margin-top: 0;
}
.g-bread {
padding: 10px 20px;
::v-deep .el-breadcrumb__item {
font-size: 16px;
.el-breadcrumb__inner {
color: #fff;
}
}
}
</style>

55
src/views/modules/visual/communityParty/party.vue

@ -42,6 +42,9 @@
</div>
</div>
<div class="ecahrts-button">
<el-button type="warning" size="small" @click="handleExport('age')">导出</el-button>
</div>
<div class="warning-box-bottom">
<screen-table
:headerList="headerList"
@ -86,6 +89,9 @@
</div>
</div>
</div>
<div class="ecahrts-button">
<el-button type="warning" size="small" @click="handleExport('edu')">导出</el-button>
</div>
<div class="warning-box-bottom">
<screen-table
:headerList="headerEduList"
@ -795,6 +801,45 @@ export default {
this.pageNo = val;
this.getEduList(this.agencyId, this.orgType, this.eduCode)
},
async handleExport(type) {
const urls = {
age: '/epmetuser/icresiuser/partymemberagelist/export',
edu: '/epmetuser/icresiuser/partymembereducationlist/export'
}
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
let params = {
orgId: _arr[0],
orgType: orgType,
code: type == 'age' ? this.ageCode : this.eduCode,
}
// .post('epmetuser/icresiuser/exportExcel', params)
await this.$http({
method: 'POST',
url: urls[type],
responseType: 'blob',
data: params
})
.then(res => {
console.log('resllll', res)
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
})
.catch((err) => {
console.log('获取导出失败', err)
return this.$message.error('网络错误')
})
},
},
};
</script>
@ -1032,4 +1077,14 @@ export default {
padding: 0 30px;
// overflow-y: scroll;
}
.ecahrts-button {
width: 100%;
padding-right: 30px;
text-align: right;
::v-deep .el-button--warning {
background: linear-gradient(90deg, #0863EA, #3B9FFC);
border: 0;
}
}
</style>

Loading…
Cancel
Save