epmet pc工作端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

284 lines
5.8 KiB

<template>
3 years ago
<div class="m-listbox-main">
<!-- 组织路由 -->
<div class="div_top g-bread">
<el-breadcrumb separator-class="el-icon-arrow-right">
3 years ago
<el-breadcrumb-item v-for="item in breadList"
:key="item.path"
:to="{ path: item.path }">
{{ item.meta.title }}
</el-breadcrumb-item>
3 years ago
</el-breadcrumb>
</div>
4 years ago
<div>
3 years ago
<div class="g-listbox">
<cpt-tb :titleName="'居民列表'"
:col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
:total="total"
@handleSizeChange="handleSizeChange"
@handlePageNoChange="handlePageNoChange"
@operate="toEventInfo"></cpt-tb>
</div>
3 years ago
</div>
<people-more v-show="showedMoreInfo"
3 years ago
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";
3 years ago
import cptTb from "@/views/modules/visual/cpts/tb";
export default {
name: "people-list",
components: {
3 years ago
People, ScreenLoading, peopleMore, cptTb
},
data () {
return {
showedMoreInfo: false,
tableTitle: '党员',
searchName: '',
3 years ago
orgLevel: 'search',
orgId: '',
4 years ago
pageSize: 10,
pageNo: 1,
total: 0,
3 years ago
//下钻层级记录
info: {},
3 years ago
breadList: [],
demand: {
loading: true,
colList: [
{
align: "left",
width: "5%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "20%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "8%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "7%",
},
{
align: "left",
width: "20%",
},
{
align: "left",
width: "10%",
},
],
header: [
"序号",
"姓名",
"所属网格",
"所属房屋",
"手机",
"身份证",
"性别",
"出生日期",
"操作",
],
list: [],
},
};
},
activated () {
this.searchName = ''
3 years ago
const { columnName, label, id, level } = this.$route.query
4 years ago
this.orgLevel = level
this.orgId = id
this.searchName = columnName
this.tableTitle = label
this.loadList(id, level)
},
3 years ago
deactivated () {
4 years ago
this.orgLevel = ''
this.orgId = ''
this.pageNo = 1
},
3 years ago
beforeRouteEnter (to, from, next) {
const arr = [{ ...from }, { ...to, meta: { title: '人员列表' } }]
next((vm) => {
vm.breadList = [...arr]
})
},
methods: {
handleSearch () {
},
3 years ago
toEventInfo () {
},
handlePageNoChange (pageNo) {
this.pageNo = pageNo
this.loadList(this.orgId, this.orgLevel)
},
handleSizeChange (pageSize) {
3 years ago
this.pageSize = pageSize
this.loadList(this.orgId, this.orgLevel)
},
async loadList (id, level) {
3 years ago
this.demand.loading = true;
const url = "/epmetuser/icresiuser/searchbycategory"
let params = {
columnName: this.searchName,
id,
level,
3 years ago
pageNo: this.pageNo,
pageSize: this.pageSize,
}
const { data, code, msg } = await requestPost(url, params)
3 years ago
this.demand.loading = false;
if (code === 0) {
3 years ago
this.demand.total = data.total;
this.demand.list = data.list.map((item, index) => {
return [
index + 1,
item.name ? item.name : "--",
item.gridName ? item.gridName : "--",
item.neighborHoodName + item.buildNum ? item.neighborHoodName + item.buildNum : "--",
item.mobile ? item.mobile : "--",
item.idCard ? item.idCard : "--",
item.gender ? item.gender : "--",
item.birthday ? item.birthday : "--",
{ type: "operate", list: ["查看"] },
];
});
} else {
this.$message.error(msg)
}
},
//点击查看
handelToPeople (item) {
3 years ago
this.info = { ...item }
this.showedMoreInfo = true
},
pageCurrentChangeHandle (val) {
this.pageNo = val
4 years ago
this.loadList(this.orgId, this.orgLevel)
},
},
destroyed () {
console.log("我已经离开了!");
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/basicInfoMain.scss"
scoped
></style>
<style
lang="scss"
3 years ago
src="@/assets/scss/modules/board/listBox.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: 100%;
height: 780px;
margin: 0 auto;
}
3 years ago
.pagination {
4 years ago
padding-right: 0;
margin-top: 0;
4 years ago
text-align: right;
}
.g-bread {
3 years ago
padding: 10px 10px 15px;
::v-deep .el-breadcrumb__item {
font-size: 16px;
.el-breadcrumb__inner {
color: #fff;
}
3 years ago
}
::v-deep .el-breadcrumb__item:first-child {
.el-breadcrumb__inner {
color: #a0c3d9;
4 years ago
}
}
3 years ago
}
</style>