3 changed files with 210 additions and 101 deletions
@ -0,0 +1,179 @@ |
|||||
|
<template> |
||||
|
<div class="m-pop"> |
||||
|
<div class="wrap"> |
||||
|
<div class="btn-close" @click="handleClose"> |
||||
|
<img src="@/assets/img/shuju/people/close.png" /> |
||||
|
</div> |
||||
|
<div class="wrap2"> |
||||
|
<div class="title"> |
||||
|
<span>更多信息</span> |
||||
|
</div> |
||||
|
|
||||
|
<div class="content"> |
||||
|
<div class="tb"> |
||||
|
<el-table |
||||
|
:data="list" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
class="resi-table" |
||||
|
:max-height="maxTableHeight" |
||||
|
> |
||||
|
<el-table-column |
||||
|
label="序号" |
||||
|
type="index" |
||||
|
align="center" |
||||
|
width="50" |
||||
|
/> |
||||
|
<el-table-column prop="residentName" label="姓名"> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="unitName" label="单元"> </el-table-column> |
||||
|
<el-table-column prop="doorName" label="门牌号" width="80"> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="mobile" label="手机"> </el-table-column> |
||||
|
<el-table-column prop="idCard" label="身份证"> </el-table-column> |
||||
|
<el-table-column |
||||
|
fixed="right" |
||||
|
label="操作" |
||||
|
align="center" |
||||
|
width="60" |
||||
|
> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
@click="handlePeopleItem(scope.userId)" |
||||
|
type="text" |
||||
|
size="small" |
||||
|
>查看更多</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
|
||||
|
<div class="pagination"> |
||||
|
<el-pagination |
||||
|
:current-page="pageNo" |
||||
|
:page-size="pageSize" |
||||
|
background |
||||
|
layout="prev, pager, next" |
||||
|
@size-change="pageSizeChangeHandleNew" |
||||
|
@current-change="pageCurrentChangeHandleNew" |
||||
|
:total="total" |
||||
|
> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<people-more |
||||
|
v-if="showedPeopleInfo && currentPepeleId" |
||||
|
:userId="currentPepeleId" |
||||
|
:gridName="gridName" |
||||
|
@close="showedPeopleMoreInfo = false" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import cptCard from "@/views/modules/visual/cpts/card"; |
||||
|
import { requestPost } from "@/js/dai/request"; |
||||
|
import peopleMore from "@/views/modules/shequ/cpts/people-more"; |
||||
|
import { mapGetters } from "vuex"; |
||||
|
|
||||
|
export default { |
||||
|
name: "people-list", |
||||
|
props: { |
||||
|
configId: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
buildingId: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
components: { |
||||
|
cptCard, |
||||
|
}, |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
showedPeopleInfo: false, |
||||
|
currentPepeleId: "", |
||||
|
currentPepeleGridName: "", |
||||
|
|
||||
|
loading: false, |
||||
|
pageNo: 0, |
||||
|
pageSize: 10, |
||||
|
total: 0, |
||||
|
list: [], |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
computed: { |
||||
|
maxTableHeight() { |
||||
|
return this.clientHeight - 450; |
||||
|
return 420; |
||||
|
}, |
||||
|
...mapGetters(["clientHeight"]), |
||||
|
}, |
||||
|
|
||||
|
watch: { |
||||
|
userId() { |
||||
|
this.getApiData(); |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
mounted() { |
||||
|
this.getApiData(); |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
pageSizeChangeHandleNew(val) { |
||||
|
this.pageNo = 1; |
||||
|
this.pageSize = val; |
||||
|
}, |
||||
|
pageCurrentChangeHandleNew(val) { |
||||
|
this.pageNo = val; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
|
||||
|
handlePeopleItem(uid) { |
||||
|
this.currentPepeleId = uid; |
||||
|
|
||||
|
this.showedPeopleInfo = true; |
||||
|
}, |
||||
|
|
||||
|
handleClose() { |
||||
|
this.$emit("close"); |
||||
|
}, |
||||
|
|
||||
|
async getApiData() { |
||||
|
this.getList(); |
||||
|
}, |
||||
|
|
||||
|
async getList() { |
||||
|
const url = "/epmetuser/statsresiwarn/alluserwarnlist"; |
||||
|
let params = { |
||||
|
buildingId: this.buildingId, |
||||
|
configId: this.configId, |
||||
|
pageNo: this.pageNo, |
||||
|
pageSize: this.pageSize, |
||||
|
}; |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params); |
||||
|
|
||||
|
if (code === 0) { |
||||
|
const { list, total } = data; |
||||
|
this.list = list; |
||||
|
this.total = total; |
||||
|
} else { |
||||
|
this.$message.error(msg); |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" src="@/assets/scss/people-info.scss" scoped></style> |
Loading…
Reference in new issue