|
|
@ -29,6 +29,7 @@ |
|
|
|
<resi-details |
|
|
|
@close="displayedResiId = ''" |
|
|
|
:resi-id="displayedResiId" |
|
|
|
:popupShow="popupShow" |
|
|
|
v-if="displayedResiId" |
|
|
|
/> |
|
|
|
</div> |
|
|
@ -39,6 +40,8 @@ import cptTb from "@/views/dataBoard/cpts/tb"; |
|
|
|
import cptBread from "@/views/dataBoard/renfang/cpts/bread"; |
|
|
|
import resiDetails from "@/views/dataBoard/cpts/resi-details"; |
|
|
|
import { requestPostBi } from "@/js/dai/request-bipass"; |
|
|
|
import { requestPost } from "@/js/dai/request"; |
|
|
|
|
|
|
|
import getQueryPara from "dai-js/modules/getQueryPara"; |
|
|
|
|
|
|
|
export default { |
|
|
@ -63,6 +66,8 @@ export default { |
|
|
|
|
|
|
|
data() { |
|
|
|
return { |
|
|
|
warnCate:null, |
|
|
|
|
|
|
|
tableTitle: "预警人员列表", |
|
|
|
searchName: "", |
|
|
|
|
|
|
@ -150,6 +155,8 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
|
|
|
|
popupShow:false |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
@ -157,14 +164,16 @@ export default { |
|
|
|
activated() { |
|
|
|
this.building_id = getQueryPara("building_id"); |
|
|
|
this.resident_type = getQueryPara('resident_type') |
|
|
|
this.warnCate = getQueryPara('warnCate') |
|
|
|
this.pageNo = 1; |
|
|
|
this.getList(); |
|
|
|
this.getCount(); |
|
|
|
// this.getCount(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
showInfo(index) { |
|
|
|
let item = this.srcTableData[index]; |
|
|
|
this.displayedResiId = item.user_id; |
|
|
|
this.displayedResiId = item.resiId; |
|
|
|
this.popupShow = true; |
|
|
|
}, |
|
|
|
|
|
|
|
handlePageNoChange(pageNo) { |
|
|
@ -179,79 +188,37 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
async getList() { |
|
|
|
const { resident_type, building_id, pageNo, pageSize } = this; |
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
const url = "building_resident_list"; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPostBi( |
|
|
|
url, |
|
|
|
{ |
|
|
|
queryParam: { |
|
|
|
resident_type, |
|
|
|
building_id, |
|
|
|
pageNo, |
|
|
|
pageSize, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
// mockId: 60069169, |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
const { resident_type, building_id, pageNo, pageSize ,warnCate} = this; |
|
|
|
let params = { |
|
|
|
buildId:building_id, |
|
|
|
categoryKey:resident_type, |
|
|
|
pageNo, |
|
|
|
pageSize, |
|
|
|
warnCate |
|
|
|
}; |
|
|
|
let url = '/actual/base/peopleRoomOverview/warnBuildingResiInfo' |
|
|
|
const { data, code, msg } = await requestPost(url,params); |
|
|
|
this.loading = false; |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.srcTableData = data; |
|
|
|
// this.total = data.total; |
|
|
|
|
|
|
|
this.list = data.map((item, index) => { |
|
|
|
this.srcTableData = data.list; |
|
|
|
this.total = data.total; |
|
|
|
this.list = data.list.map((item, index) => { |
|
|
|
return [ |
|
|
|
index + 1, |
|
|
|
item.user_name ? item.user_name : "--", |
|
|
|
item.grid ? item.grid : "--", |
|
|
|
item.house ? item.house : "--", |
|
|
|
item.telephone ? item.telephone : "--", |
|
|
|
item.idcard ? item.idcard : "--", |
|
|
|
item.gender ? item.gender : "--", |
|
|
|
item.birthday ? item.birthday : "--", |
|
|
|
|
|
|
|
{ type: "operate", list: ["查看"] }, |
|
|
|
item.resiName ? item.resiName : "--", |
|
|
|
item.gridName ? item.gridName : "--", |
|
|
|
item.fullName ? item.fullName : "--", |
|
|
|
item.mobile ? item.mobile : "--", |
|
|
|
item.idNum ? item.idNum : "--", |
|
|
|
item.gender?item.gender=='2'?'女':'男' :'--', |
|
|
|
item.birthday?item.birthday:'--', |
|
|
|
{ type: "operate", list: ["查看人员"] }, |
|
|
|
]; |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async getCount() { |
|
|
|
const { resident_type, building_id, pageNo, pageSize } = this; |
|
|
|
|
|
|
|
const url = "building_resident_list_total"; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPostBi( |
|
|
|
url, |
|
|
|
{ |
|
|
|
queryParam: { |
|
|
|
resident_type, |
|
|
|
building_id, |
|
|
|
pageNo, |
|
|
|
pageSize, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
// mockId: 63071800, |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
if (Array.isArray(data) && data.length > 0) { |
|
|
|
this.total = parseInt(data[0].count); |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
handleClickBreadItem({ item }) { |
|
|
|
if (item.type == "back") { |
|
|
|
this.$router.push({ |
|
|
|