Browse Source

人口分析的二级列表的部分绑定

feature
duanliangtao 2 years ago
parent
commit
2903a2b2cb
  1. 3
      src/views/dataBoard/renfang/cpts/rkfx.vue
  2. 132
      src/views/dataBoard/renfang/resi/analyze.vue

3
src/views/dataBoard/renfang/cpts/rkfx.vue

@ -147,6 +147,9 @@ export default {
}, },
// //
async getInfo() { async getInfo() {
if(this.orgId==""){
return;
}
const url = "/actual/base/peopleRoomOverview/getresidentAnalyze"; const url = "/actual/base/peopleRoomOverview/getresidentAnalyze";
this.$refs.pieChart.showLoading(); this.$refs.pieChart.showLoading();
const { const {

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

@ -38,7 +38,7 @@
import cptTb from "@/views/dataBoard/cpts/tb"; 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 {requestPost} from "@/js/dai/request";
import getQueryPara from "dai-js/modules/getQueryPara"; import getQueryPara from "dai-js/modules/getQueryPara";
export default { export default {
@ -80,6 +80,9 @@ export default {
srcTableData: [], srcTableData: [],
list: [], list: [],
query: {
},
colList: [ colList: [
{ {
align: "left", align: "left",
@ -144,7 +147,6 @@ export default {
this.pageNo = 1; this.pageNo = 1;
this.getList(); this.getList();
this.getCount();
}, },
methods: { methods: {
@ -176,18 +178,20 @@ export default {
const { org_id, resiType, pageNo, pageSize } = this; const { org_id, resiType, pageNo, pageSize } = this;
this.loading = true; this.loading = true;
const url = "resident_analyze_list"; const url = "/actual/base/residentBaseInfo/page";
const { data, code, msg } = await requestPostBi( //resiType
url, this.getQueryByResiType(resiType);
{
queryParam: { this.query = {
org_id, ...this.query,
type: resiType, agencyId:org_id,
pageNo, pageNo,
pageSize, pageSize,
}, };
},
const { data, code, msg } = await requestPost(
url,this.query,
{ {
// mockId: 60069169, // mockId: 60069169,
} }
@ -196,20 +200,19 @@ export default {
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.map((item, index) => { this.list = data.list.map((item, index) => {
return [ return [
index + 1, index + 1,
item.user_name ? item.user_name : "--", item.name ? item.name : "--",
item.grid ? item.grid : "--", item.gridName ? item.gridName : "--",
item.house ? item.house : "--", item.homeName ? item.homeName : "--",
item.telephone ? item.telephone : "--", item.mobile ? item.mobile : "--",
item.idcard ? item.idcard : "--", item.idNum ? item.idNum : "--",
item.gender ? item.gender : "--", item.gender === "1" ? "男" : (item.gender === "2" ? "女" : "--"),
item.birthday ? item.birthday : "--", item.birthday ? item.birthday : "--",
{ type: "operate", list: ["查看"] }, { type: "operate", list: ["查看"] },
]; ];
}); });
@ -218,32 +221,67 @@ export default {
} }
}, },
async getCount() { getQueryByResiType(resiType){
const { org_id, resiType, pageNo, pageSize } = this; if(resiType == "male_count"){
this.query = {gender:"1" };
const url = "resident_analyze_list_total"; }else if (resiType == "female_count") {
this.query = {gender:"2" };
const { data, code, msg } = await requestPostBi( }else if (resiType == "local_count") {
url, this.query = {localResidenceFlag:"1" };
{ }else if (resiType == "field_count") {
queryParam: { this.query = {localResidenceFlag:"0" };
org_id, }else if (resiType == "resi_y_house_y_count") {
type: resiType, this.query = {householdSituation:"rhyz" };
pageNo, }else if (resiType == "resi_y_house_n_count") {
pageSize, this.query = {householdSituation:"rzhbz" };
}, }else if (resiType == "resi_n_house_y_count") {
}, this.query = {householdSituation:"hzrbz" };
{ }else if (resiType == "age50_count") {
// mockId: 63070408, this.query = {gender:"2" };
} }else if (resiType == "age5059_count") {
); this.query = {gender:"2" };
}else if (resiType == "age6069_count") {
if (code === 0) { this.query = {gender:"2" };
this.total = parseInt(data[0].count); }else if (resiType == "age7079_count") {
} else { this.query = {gender:"2" };
this.$message.error(msg); }else if (resiType == "age80_count") {
} this.query = {gender:"2" };
}, }else if (resiType == "culture_count") {
this.query = {gender:"2" };
}else if (resiType == "committee_count") {
this.query = {gender:"2" };
}else if (resiType == "capable_count") {
this.query = {gender:"2" };
}else if (resiType == "friend_count") {
this.query = {gender:"2" };
}else if (resiType == "agent_count") {
this.query = {gender:"2" };
}else if (resiType == "mediator_count") {
this.query = {gender:"2" };
}else if (resiType == "collector_count") {
this.query = {gender:"2" };
}else if (resiType == "security_count") {
this.query = {gender:"2" };
}else if (resiType == "party_mem_count") {
this.query = {gender:"2" };
}else if (resiType == "primary_count") {
this.query = {cultureLevel:"0",categoryKey:"PARTY_FLAG"};
}else if (resiType == "junior_high_count") {
this.query = {cultureLevel:"1",categoryKey:"PARTY_FLAG"};
}else if (resiType == "second_speci_count") {
this.query = {cultureLevel:"2",categoryKey:"PARTY_FLAG"};
}else if (resiType == "high_school_count") {
this.query = {cultureLevel:"3",categoryKey:"PARTY_FLAG"};
}else if (resiType == "junior_college_count") {
this.query = {cultureLevel:"4",categoryKey:"PARTY_FLAG"};
}else if (resiType == "undergrad_count") {
this.query = {cultureLevel:"5",categoryKey:"PARTY_FLAG"};
}else if (resiType == "master_count") {
this.query = {cultureLevel:"6",categoryKey:"PARTY_FLAG"};
}else if (resiType == "doctor_count") {
this.query = {cultureLevel:"7",categoryKey:"PARTY_FLAG"};
}
},
}, },
destroyed() { destroyed() {

Loading…
Cancel
Save