Browse Source

人口预警接口修改

feature
mk 1 year ago
parent
commit
ec1364e8d6
  1. 5
      src/views/dataBoard/renfang/warn/building.vue
  2. 97
      src/views/dataBoard/renfang/warn/resi.vue

5
src/views/dataBoard/renfang/warn/building.vue

@ -156,8 +156,9 @@ export default {
this.$router.push({ this.$router.push({
path:"/dataBoard/renfang/warn-resi", path:"/dataBoard/renfang/warn-resi",
query:{ query:{
building_id:item.building_id, building_id:item.buildingId,
resident_type:this.type_id resident_type:this.type_id,
warnCate:this.level
} }
}) })
// this.breadList.push({ // this.breadList.push({

97
src/views/dataBoard/renfang/warn/resi.vue

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

Loading…
Cancel
Save