+
人房数据
-
@@ -184,10 +220,15 @@ export default {
const customerId = localStorage.getItem("customerId");
let siteconfigElement = window.SITE_CONFIG["menuShujuList"];
//暂时 亿联街道和 微笑崂山显示 社区治理-》多元化菜单
- if ("04c0d396e298f13e57aa5904a657eaa6" != customerId && "3fdd0380deff5b30f45376cdf995d1c1" != customerId) {
+ if (
+ "04c0d396e298f13e57aa5904a657eaa6" != customerId &&
+ "3fdd0380deff5b30f45376cdf995d1c1" != customerId
+ ) {
for (let index in siteconfigElement) {
if (siteconfigElement[index].id == "6") {
- let newMenuArr = siteconfigElement[index].children.filter((item) => item.id !== "duoyuanfuwufenxi");
+ let newMenuArr = siteconfigElement[index].children.filter(
+ (item) => item.id !== "duoyuanfuwufenxi"
+ );
siteconfigElement[index].children = newMenuArr;
}
}
@@ -217,46 +258,51 @@ export default {
params = { orgId: this.value, level: this.getChooseLabel(this.value) };
}
console.log(params);
- this.$http.post(`/gov/org/agency/maporg`, params).then(async ({ data: { data } }) => {
- console.log(data);
- this.value = data.id;
- this.$store.dispatch("chooseArea/chooseName", {
- orgId: data.id,
- level: data.level,
+ this.$http
+ .post(`/gov/org/agency/maporg`, params)
+ .then(async ({ data: { data } }) => {
+ console.log(data);
+ this.value = data.id;
+ this.$store.dispatch("chooseArea/chooseName", {
+ orgId: data.id,
+ level: data.level,
+ });
+ let children = await this.dealTreeData(data.children);
+ if (data.parentId) {
+ this.options = [
+ {
+ ...data,
+ value: data.parentId,
+ label: data.parentName,
+ },
+ {
+ ...data,
+ value: data.id,
+ label: data.name,
+ },
+ ...children,
+ ];
+ } else {
+ this.options = [
+ {
+ ...data,
+ value: data.id,
+ label: data.name,
+ },
+ ...children,
+ ];
+ }
});
- let children = await this.dealTreeData(data.children);
- if (data.parentId) {
- this.options = [
- {
- ...data,
- value: data.parentId,
- label: data.parentName,
- },
- {
- ...data,
- value: data.id,
- label: data.name,
- },
- ...children,
- ];
- } else {
- this.options = [
- {
- ...data,
- value: data.id,
- label: data.name,
- },
- ...children,
- ];
- }
- });
},
dealTreeData(treeData, level = 0) {
const data = treeData.map((item) => ({
...item,
value: item.id,
label: item.name,
- children: item.children && item.children.length ? this.dealTreeData(item.children, level++) : null,
+ children:
+ item.children && item.children.length
+ ? this.dealTreeData(item.children, level++)
+ : null,
}));
return data;
},
@@ -290,7 +336,9 @@ export default {
},
// 通过menuId与动态(菜单)路由进行匹配跳转至指定路由
gotoRouteHandle(menuId, idx) {
- var route = window.SITE_CONFIG["dynamicMenuRoutesShuju"].filter((item) => item.meta.menuId === menuId)[0];
+ var route = window.SITE_CONFIG["dynamicMenuRoutesShuju"].filter(
+ (item) => item.meta.menuId === menuId
+ )[0];
if (route) {
this.$router.push({
name: route.name,
@@ -299,10 +347,12 @@ export default {
}
},
changeCustomerName() {
- this.customerName = localStorage.getItem("customerNameDataBoard") || "数据分析可视化平台";
+ this.customerName =
+ localStorage.getItem("customerNameDataBoard") || "数据分析可视化平台";
},
async getWeatherData() {
- const url = "https://restapi.amap.com/v3/weather/weatherInfo?key=8c87678f34ce9e8e23245c5161991c4e";
+ const url =
+ "https://restapi.amap.com/v3/weather/weatherInfo?key=8c87678f34ce9e8e23245c5161991c4e";
const { data, code, msg } = await requestGet(url, {
city: this.$store.state.user.areaCode,
});
diff --git a/src/views/modules/home/index.vue b/src/views/modules/home/index.vue
index 796364687..540d4a93e 100644
--- a/src/views/modules/home/index.vue
+++ b/src/views/modules/home/index.vue
@@ -278,7 +278,7 @@ export default {
}
},
computed: {
- maxTableHeight () {
+ maxTableHeight() {
// return this.clientHeight - 450;
return 420;
},
@@ -314,14 +314,11 @@ export default {
initChart() {
this.$http.get('/governance/satisfactionOverview/notSatisfactionTrend').then(({data: {data}}) => {
this.myChart = echarts.init(document.getElementById('my_chart'));
- let series = []
- console.log(data,'datadatadata')
- data.series.forEach(item => {
- series.push({
+ let series = data.series.map((item, index) => {
+ return {
...item,
type: 'line',
- stack: 'Total',
- })
+ }
})
let option = {
tooltip: {
@@ -361,15 +358,15 @@ export default {
})
},
- handleWindowResize () {
+ handleWindowResize() {
if (this.myChart) {
this.myChart.resize();
}
},
- searchDataTab (str) {
+ searchDataTab(str) {
this.searchData.type = str;
},
- handleClickCategory (item) {
+ handleClickCategory(item) {
this.$router.push({
name: "base-resi",
params: {
@@ -378,18 +375,18 @@ export default {
});
},
- async readClearOne (item) {
+ async readClearOne(item) {
console.log("item", item)
const url = `/message/intelligentMessage/msg/clearOne/?msgId=${item.id}`
- const { data, code, msg } = await requestPost(url)
+ const {data, code, msg} = await requestPost(url)
if (code == 0) {
this.getNoticeData()
} else if (code >= 8000) {
this.$message.error(msg)
}
},
- handleClickNotice (item) {
- const { msgType, targetId } = item;
+ handleClickNotice(item) {
+ const {msgType, targetId} = item;
this.readClearOne(item)
if (msgType == "community_house") {
this.$refs.fastcall.showHouseInfo(targetId);
@@ -398,13 +395,13 @@ export default {
}
},
- toNoticePage () {
+ toNoticePage() {
this.$router.push({
path: "/main/home-notice",
});
},
- toSearchPage (type, searchKey) {
+ toSearchPage(type, searchKey) {
this.$router.push({
path: "/main/shequ-chaxun"
});
@@ -412,9 +409,9 @@ export default {
localStorage.setItem('homeSearchKey', searchKey)
},
- handleClickSearchBtn (str) {
+ handleClickSearchBtn(str) {
const {
- searchData: { type, searchKey },
+ searchData: {type, searchKey},
} = this;
if (str) {
this.toSearchPage(type, searchKey);
@@ -424,7 +421,7 @@ export default {
this.toSearchPage(type, searchKey);
},
- async getApiData () {
+ async getApiData() {
await this.getOrgData();
this.getWarningList();
this.getZnycList();
@@ -433,14 +430,14 @@ export default {
},
//加载组织数据
- async getOrgData () {
+ async getOrgData() {
const url = "/gov/org/agency/maporg";
let params = {
orgId: "",
level: "",
};
- const { data, code, msg } = await requestPost(url, params);
+ const {data, code, msg} = await requestPost(url, params);
if (code === 0) {
this.orgData = data;
@@ -450,14 +447,14 @@ export default {
},
//加载组织数据
- async getPandectData () {
+ async getPandectData() {
const url = "/actual/base/residentHouseMerge/communityOverview";
let params = {
// orgId: "",
// level: "",
};
- const { data, code, msg } = await requestGet(url, params);
+ const {data, code, msg} = await requestGet(url, params);
if (code === 0) {
if (data) {
@@ -469,13 +466,13 @@ export default {
},
//加载组织数据
- async getNoticeData () {
+ async getNoticeData() {
const url = "/message/intelligentMessage/list";
let params = {
last: "10",
};
- const { data, code, msg } = await requestGet(url, params);
+ const {data, code, msg} = await requestGet(url, params);
if (code === 0) {
if (data) {
@@ -487,7 +484,7 @@ export default {
},
//加载组织数据
- async getWarningList () {
+ async getWarningList() {
const url = "/actual/base/resiCategory/categoryCountList";
let params = {
// id: this.orgData.id,
@@ -495,7 +492,7 @@ export default {
};
this.resiCategory.loading = true;
- const { data, code, msg } = await requestGet(url, params);
+ const {data, code, msg} = await requestGet(url, params);
this.resiCategory.loading = false;
if (code === 0) {
@@ -507,7 +504,7 @@ export default {
name: resiCategoryMap[item.categoryName] || "",
count: item.categoryCount,
per: parseInt(
- (100 * item.categoryCount) / data.resiCount
+ (100 * item.categoryCount) / data.resiCount
),
const: "const",
};
@@ -518,7 +515,7 @@ export default {
}
},
//加载智能预测数据
- async getZnycList () {
+ async getZnycList() {
const url = "/actual/base/resiCategory/intelligentPredictioncategoryCountList";
// const url = "/actual/base/resiCategory/categoryCountList";
let params = {
@@ -527,7 +524,7 @@ export default {
};
this.znycCategory.loading = true;
- const { data, code, msg } = await requestGet(url, params);
+ const {data, code, msg} = await requestGet(url, params);
this.znycCategory.loading = false;
if (code === 0) {