Browse Source

先提交一下

V1.0
dai 3 years ago
parent
commit
5cd6dd20ff
  1. 10
      src/router/index.js
  2. 28
      src/views/dataBoard/renfang/house/list.vue
  3. 257
      src/views/dataBoard/renfang/resi/analyze.vue
  4. 30
      src/views/dataBoard/renfang/resi/class.vue
  5. 28
      src/views/dataBoard/renfang/resi/list.vue
  6. 29
      src/views/dataBoard/renfang/warn/building.vue
  7. 30
      src/views/dataBoard/renfang/warn/resi.vue

10
src/router/index.js

@ -218,6 +218,16 @@ export const dataBoardRoutes = {
isTab: false,
},
},
{
path: "renfang/resi-analyze",
props: true,
component: () => import("@/views/dataBoard/renfang/resi/analyze"),
name: "dataBoard-renfang-resi-analyze",
meta: {
title: "居民分析列表",
isTab: false,
},
},
{
path: "renfang/house-list",
props: true,

28
src/views/dataBoard/renfang/house/list.vue

@ -159,6 +159,7 @@ export default {
this.breadList[1].meta.title = type_name + "房屋列表";
this.tableTitle = type_name + "房屋列表";
this.getList();
this.getCount();
},
methods: {
@ -233,6 +234,33 @@ export default {
this.$message.error(msg);
}
},
async getList() {
const { org_id, houseType, pageNo, pageSize } = this;
const url = "house_list_total";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id,
type: houseType,
pageNo,
pageSize,
},
},
{
mockId: 63070189,
}
);
if (code === 0) {
this.total = data[0].count;
} else {
this.$message.error(msg);
}
},
},
destroyed() {

257
src/views/dataBoard/renfang/resi/analyze.vue

@ -0,0 +1,257 @@
<template>
<div class="g-pgi">
<!-- 组织路由 -->
<cpt-bread
:separator="'/'"
@tap="handleClickBreadItem"
:breadList="breadList"
></cpt-bread>
<div class="m-title">
<img
class="title_img"
src="@/assets/images/index/list-logo.png"
alt
/>
<div class="tip_title">{{ tableTitle }}</div>
<div class="title_line"></div>
</div>
<div class="g-listbox">
<cpt-tb
:col-list="colList"
:loading="loading"
:header="header"
:list="list"
:total="total"
@handleSizeChange="handleSizeChange"
@handlePageNoChange="handlePageNoChange"
@operate="showInfo"
></cpt-tb>
</div>
<resi-details
@close="displayedResiId = ''"
:resi-id="displayedResiId"
v-if="displayedResiId"
/>
</div>
</template>
<script>
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 getQueryPara from "dai-js/modules/getQueryPara";
export default {
name: "resi-list",
components: {
cptTb,
cptBread,
resiDetails,
},
data() {
return {
breadList: [
{
type: "back",
meta: {
title: "人房总览",
},
},
{
meta: {
title: "居民列表",
},
},
],
tableTitle: "居民列表",
searchName: "",
orgLevel: "",
org_id: "",
resiType: "", //
loading: true,
pageSize: 10,
pageNo: 1,
total: 0,
srcTableData: [],
list: [],
colList: [
{
align: "left",
width: "5%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "20%",
},
{
align: "left",
width: "20%",
},
{
align: "left",
width: "15%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "5%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "10%",
},
],
header: [
"序号",
"姓名",
"所属网格",
"所属房屋",
"手机",
"身份证",
"性别",
"出生日期",
"操作",
],
displayedResiId: "",
};
},
activated() {
this.org_id = getQueryPara("org_id");
this.resiType = getQueryPara("type");
const type_name = getQueryPara("type_name");
this.breadList[1].meta.title = type_name + "居民列表";
this.tableTitle = type_name + "居民列表";
this.getList();
this.getCount();
},
methods: {
handleClickBreadItem({ item }) {
if (item.type == "back") {
this.$router.back();
}
},
handleSearch() {},
showInfo(index) {
let item = this.srcTableData[index];
this.displayedResiId = item.user_id;
},
handlePageNoChange(pageNo) {
this.pageNo = pageNo;
this.getList();
},
handleSizeChange(pageSize) {
this.pageSize = pageSize;
this.getList();
},
async getList() {
const { org_id, resiType, pageNo, pageSize } = this;
this.loading = true;
const url = "resident_analyze_list";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id,
type: resiType,
pageNo,
pageSize,
},
},
{
mockId: 60069169,
}
);
this.loading = false;
if (code === 0) {
this.srcTableData = data;
// this.total = data.total;
this.list = data.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: ["查看"] },
];
});
} else {
this.$message.error(msg);
}
},
async getCount() {
const { org_id, resiType, pageNo, pageSize } = this;
const url = "resident_analyze_list_total";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id,
type: resiType,
pageNo,
pageSize,
},
},
{
mockId: 63070408,
}
);
if (code === 0) {
this.total = data[0].count;
} else {
this.$message.error(msg);
}
},
},
destroyed() {
console.log("我已经离开了!");
},
};
</script>
<style lang="scss" src="@/assets/scss/dataBoard/listBox.scss" scoped></style>

30
src/views/dataBoard/renfang/resi/class.vue

@ -167,6 +167,7 @@ export default {
this.tableTitle = type_name + "居民列表";
this.getList();
this.getCount();
if (this.type_id == "6") {
this.getSubclass();
}
@ -175,6 +176,7 @@ export default {
watch: {
subclassId() {
this.getList();
this.getCount();
},
},
@ -282,6 +284,34 @@ export default {
this.$message.error(msg);
}
},
async getCount() {
const { org_id, type_id, subclassId, pageNo, pageSize } = this;
const url = "resident_class_list_total";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id,
type_id,
subclassId,
pageNo,
pageSize,
},
},
{
mockId: 63070913,
}
);
if (code === 0) {
this.total = data[0].count;
} else {
this.$message.error(msg);
}
},
},
destroyed() {

28
src/views/dataBoard/renfang/resi/list.vue

@ -147,6 +147,7 @@ export default {
this.tableTitle = type_name + "居民列表";
this.getList();
this.getCount();
},
methods: {
@ -218,6 +219,33 @@ export default {
this.$message.error(msg);
}
},
async getCount() {
const { org_id, resiType, pageNo, pageSize } = this;
const url = "resident_list_total";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id,
type: resiType,
pageNo,
pageSize,
},
},
{
mockId: 63070408,
}
);
if (code === 0) {
this.total = data[0].count;
} else {
this.$message.error(msg);
}
},
},
destroyed() {

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

@ -132,6 +132,7 @@ export default {
type_name + (this.level == "red" ? "红色" : "黄色") + "预警楼栋";
this.breadList[1].meta.title = this.tableTitle;
this.getList();
this.getCount();
},
methods: {
@ -212,6 +213,34 @@ export default {
this.$message.error(msg);
}
},
async getCount() {
const { org_id, type_id, level, pageNo, pageSize } = this;
const url = "resident_warn_building_total";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id,
warn_type: level,
resi_type: type_id,
pageNo,
pageSize,
},
},
{
mockId: 63071730,
}
);
if (code === 0) {
this.total = data[0].count;
} else {
this.$message.error(msg);
}
},
},
destroyed() {

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

@ -123,8 +123,9 @@ export default {
};
},
activated() {
mounted() {
this.getList();
this.getCount();
},
methods: {
@ -188,6 +189,33 @@ export default {
this.$message.error(msg);
}
},
async getCount() {
const { org_id, type_id, pageNo, pageSize } = this;
const url = "resident_class_list_total";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id,
type_id,
pageNo,
pageSize,
},
},
{
mockId: 63071800,
}
);
if (code === 0 && Array.isArray(data) && data.length > 0) {
this.total = data[0].count;
} else {
this.$message.error(msg);
}
},
},
destroyed() {

Loading…
Cancel
Save