+
+
+

+
数字社区
+
-
-
-
-
-

-
人口预警
-
+
+
+

+
人口预警
+
-
-
-
-
-
-
-

-
人口分析
+
+
+
+
+
+

+
人口分析
+
-
+
+
@@ -338,94 +345,172 @@ import jmgl from "@/views/dataBoard/renfang/cpts/jmgl";
import rkfx from "@/views/dataBoard/renfang/cpts/rkfx";
import rkyj from "@/views/dataBoard/renfang/cpts/rkyj";
import szsq from "@/views/dataBoard/renfang/cpts/szsq";
+import cptLoading from "@/views/dataBoard/cpts/loading";
+import cptBread from "@/views/dataBoard/cpts/bread";
import { requestPostBi } from "@/js/dai/request-bipass";
import { requestPost } from "@/js/dai/request";
import getQueryPara from "dai-js/modules/getQueryPara";
export default {
- components: { gridMap, fwgl, jmgl, rkfx, rkyj, szsq },
+ components: { gridMap, fwgl, jmgl, rkfx, rkyj, szsq, cptLoading, cptBread },
data() {
return {
+ loading: false,
+
orgData: {}, //当前组织对象
orgId: "",
orgLevel: "",
- subAgencyArray: [],
- warningData: [],
+ breadList: [
+ {
+ orgId: "",
+ orgLevel: "",
+ meta: { title: "人防总览" },
+ },
+ ],
+
+ resiCategoryData: [],
searchModule: {
displayedCard: false,
keyword: "",
- resultTab: "all", // all resi
+ resultTab: "0", // 0所有 1,居民;2,小区;3,楼栋;4,房屋
result: [
- {
- id: 1,
- title: "四季景园",
- },
- {
- id: 11,
- title: "四季景园-四号楼",
- },
- {
- id: 1111,
- title: "四季景园-四号楼-1单元",
- },
- {
- id: 111111,
- title: "四季景园-四号楼-1单元-101",
- },
- {
- id: 12342,
- title: "四季景园-2单元",
- },
- {
- id: 133,
- title: "四季景园-2单元-2号楼-201",
- },
- {
- id: 122,
- title: "四季景园2",
- },
- {
- id: 1312,
- title: "四季景园4",
- },
+ // {
+ // id: 1,
+ // title: "四季景园",
+ // },
],
},
perInfo: {
- unused_count: 10,
- lease_count: 10,
- house_count: 100,
- org_id: "10001",
- self_dwelling_count: 10,
+ unemployed_ratio: "--",
+ crowd_ratio: "--",
+ volunteer_ratio: "--",
+ month_update_ratio: "--",
+ aged_ratio: "--",
+ teenagers_ratio: "--",
},
};
},
- async mounted() {
- const queryOrgId = getQueryPara("orgId");
- const queryOrgLevel = getQueryPara("orgLevel");
- console.log("orgId", queryOrgId);
- if (queryOrgId) {
- this.orgId = queryOrgId;
- this.orgLevel = queryOrgLevel || "agency";
- }
- //加载组织数据
- await this.loadOrgData();
- this.getWarningList();
- this.getPerInfo();
+ mounted() {
+ this.init();
+ },
+
+ watch: {
+ $route() {
+ this.init();
+ },
},
+
methods: {
- clickAgencyItem() {},
+ async init() {
+ const queryOrgId = getQueryPara("orgId");
+ const queryOrgLevel = getQueryPara("orgLevel");
+ console.log("orgId", queryOrgId);
+ if (queryOrgId) {
+ this.orgId = queryOrgId;
+ this.orgLevel = queryOrgLevel || "agency";
+ } else {
+ this.orgId = this.$store.state.user.agencyId;
+ this.orgLevel = "agency";
+ }
+
+ //加载组织数据
+ this.loading = false;
+ await this.loadOrgData();
+ this.getResiCategoryData();
+ this.getPerInfo();
+
+ this.loading = true;
+ },
- handleSearch() {
+ clickBreadItem(item, index) {
+ console.log(item);
+ const { breadList } = this;
+ if (index + 1 == breadList.length) return;
+ breadList = breadList.slice(0, index);
+ this.breadList = breadList;
+ },
+
+ clickAgencyItem(item) {
+ console.log(item);
+ this.$router.push({
+ path: "/dataBoard/renfang/index",
+ query: { orgId: item.id, orgLevel: item.level },
+ });
+ // this.init();
+ },
+
+ // 点击搜索结果条目,在地图上显示点和详情弹窗
+ handleClickSearchItem(item) {
+ console.log("handleClickSearchItem", item);
+ if (!item.longitude) {
+ return this.$message.error("请先设置坐标");
+ }
+ this.$refs.map.setDotMarker(item, [
+ parseFloat(item.longitude),
+ parseFloat(item.latitude),
+ ]);
+ },
+
+ // 根据类别搜索
+ async handleSearch() {
+ this.searchModule.result = [];
console.log(this.searchModule);
+ const { searchModule } = this;
+
+ const url = [
+ "search_all",
+ "search_resident",
+ "search_village",
+ "search_building",
+ "search_house",
+ ][searchModule.resultTab];
+
+ const { data, code, msg } = await requestPostBi(
+ url,
+ {
+ queryParam: {
+ org_id: this.orgData.id,
+ name: this.searchModule.keyword,
+ },
+ },
+ {
+ mockId: 60048078,
+ }
+ );
+
+ if (code === 0) {
+ this.searchModule.result = data.map((item) => {
+ let type = item.type || searchModule.resultTab;
+ let title = "";
+ if (type == "1") {
+ title = item.user_name;
+ } else if (type == "2") {
+ title = item.village_name;
+ } else if (type == "3") {
+ title = item.village_name + "-" + item.building_name;
+ } else if (type == "4") {
+ title =
+ item.building + "-" + item.unit + "-" + item.door;
+ }
+ return {
+ title,
+ type,
+ ...item,
+ };
+ });
+ } else {
+ this.$message.error(msg);
+ }
},
+
//地图上居民分类百分比数据 ps:感觉有点重复显示
async getPerInfo() {
- console.log('=========================getPerInfo')
+ console.log("=========================getPerInfo");
const url = "house_view";
const { data, code, msg } = await requestPostBi(
@@ -436,7 +521,7 @@ export default {
},
},
{
- mockId: 60810589,
+ mockId: 61167746,
}
);
@@ -447,23 +532,32 @@ export default {
}
},
- //加载组织数据
- async getWarningList() {
- const url = "/epmetuser/statsresiwarn/list";
- let params = {
- id: this.orgData.id,
- level: "agency",
- };
+ //居民分类分析数据
+ async getResiCategoryData() {
+ console.log("=========================getResiCategoryData");
+ const url = "resident_class_statics";
- const { data, code, msg } = await requestPost(url, params);
+ const { data, code, msg } = await requestPostBi(
+ url,
+ {
+ queryParam: {
+ org_id: this.orgData.id,
+ },
+ },
+ {
+ mockId: 60031937,
+ }
+ );
if (code === 0) {
- this.warningData = data.map((item) => {
+ this.resiCategoryData = data.map((item) => {
return {
- code: item.columnName,
+ code: item.label,
name: item.label,
count: item.count,
- const: "const",
+ ratio: item.ratio,
+ growth: item.growth,
+ growthAbs: Math.abs(item.growth),
};
});
} else {
@@ -471,6 +565,31 @@ export default {
}
},
+ //获取地图上显示的组织数据
+ async getMapData() {
+ console.log("=========================getMapData");
+ const url = "org_map";
+
+ const { data, code, msg } = await requestPostBi(
+ url,
+ {
+ queryParam: {
+ org_id: this.orgData.id,
+ },
+ },
+ {
+ mockId: 60810589,
+ }
+ );
+
+ if (code === 0) {
+ let info = data[0];
+ this.orgData = info;
+ } else {
+ this.$message.error(msg);
+ }
+ },
+
//加载组织数据
async loadOrgData() {
const url = "/gov/org/agency/maporg";
@@ -485,11 +604,6 @@ export default {
this.orgData = data;
this.orgId = this.orgData.id;
this.orgLevel = this.orgData.level;
- if (data.children && data.children.length > 0) {
- this.subAgencyArray = data.children;
- } else {
- this.subAgencyArray = [];
- }
} else {
this.$message.error(msg);
}
diff --git a/src/views/modules/customer/feedback/DetailForm.vue b/src/views/modules/customer/feedback/DetailForm.vue
index 8c76efdc2..3ac48322d 100644
--- a/src/views/modules/customer/feedback/DetailForm.vue
+++ b/src/views/modules/customer/feedback/DetailForm.vue
@@ -520,7 +520,7 @@ export default {
}
-