|
@@ -156,201 +156,211 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.$nextTick(() => {
|
|
|
- if (this.menuData && this.menuData.topSolt && this.menuData.topSolt.commonDataGetUrl) {
|
|
|
- this.dataInitLoading = true;
|
|
|
- this.$Get("/static/json/home/" + this.menuData.topSolt.commonDataGetUrl).then(
|
|
|
- res => {
|
|
|
- let listMap = {};
|
|
|
- let tableData = res;
|
|
|
- tableData.forEach(item => {
|
|
|
- if (!listMap[item.name]) {
|
|
|
- // type,data
|
|
|
- let listMap2 = {};
|
|
|
- if (item.data) {
|
|
|
- item.data.forEach(item2 => {
|
|
|
- if (listMap2[item2.type]) {
|
|
|
- listMap2[item2.type]["categoryData"].push(item2.year);
|
|
|
- listMap2[item2.type]["valueData"].push(item2.area);
|
|
|
- } else {
|
|
|
- let listMapItem = {};
|
|
|
- listMapItem["categoryData"] = [item2.year];
|
|
|
- listMapItem["valueData"] = [item2.area];
|
|
|
- listMap2[item2.type] = listMapItem;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- listMap[item.name] = listMap2;
|
|
|
- } else {
|
|
|
- console.error("json文件内容重复,重复街镇:", item.name);
|
|
|
- }
|
|
|
- });
|
|
|
- if (listMap) {
|
|
|
- let categoryData = [];
|
|
|
- for (let listMapKeys in listMap) {
|
|
|
- // type,data
|
|
|
- categoryData = listMap[listMapKeys];
|
|
|
- if (categoryData) {
|
|
|
- if (!listMap["全部"]) {
|
|
|
- listMap["全部"] = {};
|
|
|
- }
|
|
|
- for (let categoryDataKeys in categoryData) {
|
|
|
- if (categoryData[categoryDataKeys]) {
|
|
|
- let categoryDataItemData = categoryData[categoryDataKeys];
|
|
|
- if (listMap["全部"][categoryDataKeys]) {
|
|
|
- categoryDataItemData.valueData.forEach((valueIndexItem, index) => {
|
|
|
- if (listMap["全部"][categoryDataKeys].valueData[index]) {
|
|
|
- listMap["全部"][categoryDataKeys].valueData[index] += Math.floor(valueIndexItem);
|
|
|
- } else {
|
|
|
- listMap["全部"][categoryDataKeys].valueData[index] = Math.floor(valueIndexItem);
|
|
|
- }
|
|
|
- });
|
|
|
+ try {
|
|
|
+ if (this.menuData && this.menuData.topSolt && this.menuData.topSolt.commonDataGetUrl) {
|
|
|
+ this.dataInitLoading = true;
|
|
|
+ this.$Get("/static/json/home/" + this.menuData.topSolt.commonDataGetUrl).then(
|
|
|
+ res => {
|
|
|
+ let listMap = {};
|
|
|
+ let tableData = res;
|
|
|
+ tableData.forEach(item => {
|
|
|
+ if (!listMap[item.name]) {
|
|
|
+ // type,data
|
|
|
+ let listMap2 = {};
|
|
|
+ if (item.data) {
|
|
|
+ item.data.forEach(item2 => {
|
|
|
+ if (listMap2[item2.type]) {
|
|
|
+ listMap2[item2.type]["categoryData"].push(item2.year);
|
|
|
+ listMap2[item2.type]["valueData"].push(item2.area);
|
|
|
} else {
|
|
|
- listMap["全部"][categoryDataKeys] = categoryDataItemData;
|
|
|
+ let listMapItem = {};
|
|
|
+ listMapItem["categoryData"] = [item2.year];
|
|
|
+ listMapItem["valueData"] = [item2.area];
|
|
|
+ listMap2[item2.type] = listMapItem;
|
|
|
}
|
|
|
- }
|
|
|
+ });
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.resData = listMap;
|
|
|
- if (this.resData["全部"]) {
|
|
|
- let _index = 0;
|
|
|
- let sum = 0;
|
|
|
- for (let keys in this.resData["全部"]) {
|
|
|
- this.menuData.topSolt.commonData[_index].title = keys;
|
|
|
- this.menuData.topSolt.commonData[_index].categoryData = this.resData["全部"][keys].categoryData;
|
|
|
- this.menuData.topSolt.commonData[_index].valueData = this.resData["全部"][keys].valueData;
|
|
|
- this.menuData.topSolt.commonData[_index].value =
|
|
|
- this.resData["全部"][keys].valueData[this.resData["全部"][keys].valueData.length - 1];
|
|
|
- sum += this.menuData.topSolt.commonData[_index].value;
|
|
|
- _index++;
|
|
|
- }
|
|
|
- // if (this.menuData.topSolt.commonData[4]) {
|
|
|
- // this.menuData.topSolt.commonData[4].valueData = [sum];
|
|
|
- // }
|
|
|
- }
|
|
|
- this.dataInitLoading = false;
|
|
|
- },
|
|
|
- error => {
|
|
|
- console.log("error:", error, this.menuData);
|
|
|
- this.dataInitLoading = false;
|
|
|
- }
|
|
|
- );
|
|
|
- } else if (
|
|
|
- this.menuData &&
|
|
|
- this.menuData.columnId &&
|
|
|
- this.menuData.commonName !== "SUM" &&
|
|
|
- this.menuData.commonName !== "ALLLIST"
|
|
|
- ) {
|
|
|
- this.dataInitLoading = true;
|
|
|
- let params = new FormData();
|
|
|
- params.append("columnId", this.menuData.columnId);
|
|
|
- if (this.menuData.field) {
|
|
|
- params.append("field", this.menuData.field);
|
|
|
- }
|
|
|
- params.append("states", "2,3");
|
|
|
- params.append("pageSize", this.menuData.pageSize ? this.menuData.pageSize : 999);
|
|
|
- params.append("page", 0);
|
|
|
- if (this.menuData.paramJson) {
|
|
|
- params.append("paramJson", JSON.stringify(this.menuData.paramJson));
|
|
|
- }
|
|
|
- if (this.menuData.sortField) {
|
|
|
- let sortparam = [
|
|
|
- {
|
|
|
- field: this.menuData.sortField.field,
|
|
|
- orderByType: this.menuData.sortField.orderByType
|
|
|
- }
|
|
|
- ];
|
|
|
- params.append("orderBy", JSON.stringify(sortparam));
|
|
|
- }
|
|
|
- this.$Post(this.menuData.getUrl ? this.menuData.getUrl : this.urlsCollection.selectContentList, params).then(
|
|
|
- res => {
|
|
|
- if (this.menuData.commonName && this.menuData.commonName === "TOP" && res.code === 200 && res.content.length > 0) {
|
|
|
- res.content.forEach((item, index) => {
|
|
|
- if (this.menuData.pageSize > index) {
|
|
|
- this.resData[index] = item;
|
|
|
- }
|
|
|
- });
|
|
|
- this.changeHomeSpecialTown();
|
|
|
- } else if (res.code === 200 && res.content.data && res.content.data.length > 0) {
|
|
|
- let listMap = {};
|
|
|
- let tableData = res.content.data;
|
|
|
- tableData.forEach(item => {
|
|
|
- if (listMap[item.street]) {
|
|
|
- listMap[item.street]["categoryData"].push(item.c_years);
|
|
|
- listMap[item.street]["valueData"].push((item.c_float_num / 10000).toFixed(2));
|
|
|
+ listMap[item.name] = listMap2;
|
|
|
} else {
|
|
|
- let listMapItem = {};
|
|
|
- listMapItem["categoryData"] = [item.c_years];
|
|
|
- listMapItem["valueData"] = [(item.c_float_num / 10000).toFixed(2)];
|
|
|
- listMap[item.street] = listMapItem;
|
|
|
+ console.error("json文件内容重复,重复街镇:", item.name);
|
|
|
}
|
|
|
});
|
|
|
if (listMap) {
|
|
|
let categoryData = [];
|
|
|
for (let listMapKeys in listMap) {
|
|
|
- categoryData = listMap[listMapKeys].categoryData;
|
|
|
- if (listMap[listMapKeys].valueData) {
|
|
|
+ categoryData = listMap[listMapKeys];
|
|
|
+ if (categoryData) {
|
|
|
if (!listMap["全部"]) {
|
|
|
- listMap["全部"] = { valueData: [], categoryData: [] };
|
|
|
- }
|
|
|
- listMap[listMapKeys].valueData.forEach((valueIndexItem, index) => {
|
|
|
- if (listMap["全部"].valueData[index]) {
|
|
|
- listMap["全部"].valueData[index] += Number(valueIndexItem);
|
|
|
- } else {
|
|
|
- listMap["全部"].valueData[index] = Number(valueIndexItem);
|
|
|
+ listMap["全部"] = {};
|
|
|
+ for (let categoryDataKeys in categoryData) {
|
|
|
+ if (categoryData[categoryDataKeys]) {
|
|
|
+ let categoryDataItemData = categoryData[categoryDataKeys];
|
|
|
+ if (listMap["全部"][categoryDataKeys]) {
|
|
|
+ categoryDataItemData.valueData.forEach((valueIndexItem, index) => {
|
|
|
+ if (listMap["全部"][categoryDataKeys].valueData[index]) {
|
|
|
+ listMap["全部"][categoryDataKeys].valueData[index] += Math.floor(valueIndexItem);
|
|
|
+ } else {
|
|
|
+ listMap["全部"][categoryDataKeys].valueData[index] = Math.floor(valueIndexItem);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ listMap["全部"][categoryDataKeys] = categoryDataItemData;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- if (listMap["全部"].categoryData.length == 0 && categoryData.length > 0) {
|
|
|
- listMap["全部"].categoryData = categoryData;
|
|
|
+ }
|
|
|
+ this.resData = listMap;
|
|
|
+ if (this.resData["全部"]) {
|
|
|
+ let _index = 0;
|
|
|
+ let sum = 0;
|
|
|
+ for (let keys in this.resData["全部"]) {
|
|
|
+ this.menuData.topSolt.commonData[_index].title = keys;
|
|
|
+ this.menuData.topSolt.commonData[_index].categoryData = this.resData["全部"][keys].categoryData;
|
|
|
+ this.menuData.topSolt.commonData[_index].valueData = this.resData["全部"][keys].valueData;
|
|
|
+ this.menuData.topSolt.commonData[_index].value =
|
|
|
+ this.resData["全部"][keys].valueData[this.resData["全部"][keys].valueData.length - 1];
|
|
|
+ sum += this.menuData.topSolt.commonData[_index].value;
|
|
|
+ _index++;
|
|
|
}
|
|
|
}
|
|
|
- if (listMap["全部"] && listMap["全部"].valueData) {
|
|
|
- listMap["全部"].valueData.forEach((item, index) => {
|
|
|
- listMap["全部"].valueData[index] = item.toFixed(2);
|
|
|
+ this.dataInitLoading = false;
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ console.log("error:", error, this.menuData);
|
|
|
+ this.dataInitLoading = false;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else if (
|
|
|
+ this.menuData &&
|
|
|
+ this.menuData.columnId &&
|
|
|
+ this.menuData.commonName !== "SUM" &&
|
|
|
+ this.menuData.commonName !== "ALLLIST"
|
|
|
+ ) {
|
|
|
+ this.dataInitLoading = true;
|
|
|
+ let params = new FormData();
|
|
|
+ params.append("columnId", this.menuData.columnId);
|
|
|
+ if (this.menuData.field) {
|
|
|
+ params.append("field", this.menuData.field);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.menuData.states) {
|
|
|
+ params.append("states", this.menuData.states);
|
|
|
+ } else {
|
|
|
+ params.append("states", "1,2,3,4");
|
|
|
+ }
|
|
|
+ params.append("pageSize", this.menuData.pageSize ? this.menuData.pageSize : 999);
|
|
|
+ params.append("page", 0);
|
|
|
+ if (this.menuData.paramJson) {
|
|
|
+ params.append("paramJson", JSON.stringify(this.menuData.paramJson));
|
|
|
+ }
|
|
|
+ if (this.menuData.sortField) {
|
|
|
+ let sortparam = [
|
|
|
+ {
|
|
|
+ field: this.menuData.sortField.field,
|
|
|
+ orderByType: this.menuData.sortField.orderByType
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ params.append("orderBy", JSON.stringify(sortparam));
|
|
|
+ }
|
|
|
+ this.$Post(this.menuData.getUrl ? this.menuData.getUrl : this.urlsCollection.selectContentList, params).then(
|
|
|
+ res => {
|
|
|
+ if (
|
|
|
+ this.menuData.commonName &&
|
|
|
+ this.menuData.commonName === "TOP" &&
|
|
|
+ res.code === 200 &&
|
|
|
+ res.content.length > 0
|
|
|
+ ) {
|
|
|
+ res.content.forEach((item, index) => {
|
|
|
+ if (this.menuData.pageSize > index) {
|
|
|
+ this.resData[index] = item;
|
|
|
+ }
|
|
|
});
|
|
|
+ this.changeHomeSpecialTown();
|
|
|
+ } else if (res.code === 200 && res.content.data && res.content.data.length > 0) {
|
|
|
+ let listMap = {};
|
|
|
+ let tableData = res.content.data;
|
|
|
+ tableData.forEach(item => {
|
|
|
+ if (listMap[item.street]) {
|
|
|
+ listMap[item.street]["categoryData"].push(item.c_years);
|
|
|
+ listMap[item.street]["valueData"].push((item.c_float_num / 10000).toFixed(2));
|
|
|
+ } else {
|
|
|
+ let listMapItem = {};
|
|
|
+ listMapItem["categoryData"] = [item.c_years];
|
|
|
+ listMapItem["valueData"] = [(item.c_float_num / 10000).toFixed(2)];
|
|
|
+ listMap[item.street] = listMapItem;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (listMap) {
|
|
|
+ let categoryData = [];
|
|
|
+ for (let listMapKeys in listMap) {
|
|
|
+ categoryData = listMap[listMapKeys].categoryData;
|
|
|
+ if (listMap[listMapKeys].valueData) {
|
|
|
+ if (!listMap["全部"]) {
|
|
|
+ listMap["全部"] = { valueData: [], categoryData: [] };
|
|
|
+ }
|
|
|
+ listMap[listMapKeys].valueData.forEach((valueIndexItem, index) => {
|
|
|
+ if (listMap["全部"].valueData[index]) {
|
|
|
+ listMap["全部"].valueData[index] += Number(valueIndexItem);
|
|
|
+ } else {
|
|
|
+ listMap["全部"].valueData[index] = Number(valueIndexItem);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (listMap["全部"].categoryData.length == 0 && categoryData.length > 0) {
|
|
|
+ listMap["全部"].categoryData = categoryData;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (listMap["全部"] && listMap["全部"].valueData) {
|
|
|
+ listMap["全部"].valueData.forEach((item, index) => {
|
|
|
+ listMap["全部"].valueData[index] = item.toFixed(2);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.resData = listMap;
|
|
|
+ this.changeHomeSpecialTown();
|
|
|
+ } else {
|
|
|
+ this.resData = [];
|
|
|
+ this.changeHomeSpecialTown();
|
|
|
}
|
|
|
- this.resData = listMap;
|
|
|
- this.changeHomeSpecialTown();
|
|
|
- } else {
|
|
|
+ this.dataInitLoading = false;
|
|
|
+ },
|
|
|
+ error => {
|
|
|
this.resData = [];
|
|
|
this.changeHomeSpecialTown();
|
|
|
+ console.log("error:", error, this.menuData);
|
|
|
+ this.dataInitLoading = false;
|
|
|
}
|
|
|
- this.dataInitLoading = false;
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.resData = [];
|
|
|
- this.changeHomeSpecialTown();
|
|
|
- console.log("error:", error, this.menuData);
|
|
|
- this.dataInitLoading = false;
|
|
|
+ );
|
|
|
+ } else if (this.menuData.commonName && this.menuData.commonName === "TOP") {
|
|
|
+ this.topData(this.$store.state.homeSpecialTown);
|
|
|
+ } else if (this.menuData.commonName && this.menuData.commonName === "ALLLIST") {
|
|
|
+ this.allListData(this.$store.state.homeSpecialTown);
|
|
|
+ } else if (this.menuData.commonName && this.menuData.commonName === "SUM") {
|
|
|
+ this.sumData(this.$store.state.homeSpecialTown);
|
|
|
+ }
|
|
|
+ // 只有第一次创建该页面,或刷新页面时。
|
|
|
+ if (this.menuData.menuIndex) {
|
|
|
+ if (this.$ifMenu(this.menuData.menuIndex, this.menuData.subMenuIndex)) {
|
|
|
+ // 立即修改display为block
|
|
|
+ this.$refs.menuCard.style.display = "block";
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.menuCard.style.transform = "translate(0,0)";
|
|
|
+ this.$refs.menuCard.style.opacity = "0.9";
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // 如果不符合,页面创建时就直接隐藏
|
|
|
+ this.$refs.menuCard.style.display = "none";
|
|
|
}
|
|
|
- );
|
|
|
- } else if (this.menuData.commonName && this.menuData.commonName === "TOP") {
|
|
|
- this.topData(this.$store.state.homeSpecialTown);
|
|
|
- } else if (this.menuData.commonName && this.menuData.commonName === "ALLLIST") {
|
|
|
- this.allListData(this.$store.state.homeSpecialTown);
|
|
|
- } else if (this.menuData.commonName && this.menuData.commonName === "SUM") {
|
|
|
- this.sumData(this.$store.state.homeSpecialTown);
|
|
|
- }
|
|
|
- // 只有第一次创建该页面,或刷新页面时。
|
|
|
- if (this.menuData.menuIndex) {
|
|
|
- if (this.$ifMenu(this.menuData.menuIndex, this.menuData.subMenuIndex)) {
|
|
|
- // 立即修改display为block
|
|
|
- this.$refs.menuCard.style.display = "block";
|
|
|
- setTimeout(() => {
|
|
|
- this.$refs.menuCard.style.transform = "translate(0,0)";
|
|
|
- this.$refs.menuCard.style.opacity = "0.9";
|
|
|
- });
|
|
|
- } else {
|
|
|
- // 如果不符合,页面创建时就直接隐藏
|
|
|
- this.$refs.menuCard.style.display = "none";
|
|
|
}
|
|
|
+ // 当容器创建完成时,监听窗口改变大小时间
|
|
|
+ this.$bus.$off("windowOnresize");
|
|
|
+ this.$bus.$on("windowOnresize", this.windowOnresize);
|
|
|
+ } catch (e) {
|
|
|
+ console.log("MenuCard组件mounted出现异常", e);
|
|
|
}
|
|
|
- // 当容器创建完成时,监听窗口改变大小时间
|
|
|
- this.$bus.$off("windowOnresize");
|
|
|
- this.$bus.$on("windowOnresize", this.windowOnresize);
|
|
|
});
|
|
|
},
|
|
|
destroy() {
|
|
@@ -574,47 +584,49 @@ export default {
|
|
|
},
|
|
|
// 切换街镇时
|
|
|
changeHomeSpecialTown() {
|
|
|
- if (this.resData[this.$store.state.homeSpecialTown] && this.menuData.topSolt.commonData) {
|
|
|
- if (this.resData[this.$store.state.homeSpecialTown].categoryData) {
|
|
|
- this.menuData.topSolt.commonData[0].categoryData = this.resData[this.$store.state.homeSpecialTown].categoryData;
|
|
|
- this.menuData.topSolt.commonData[0].valueData = this.resData[this.$store.state.homeSpecialTown].valueData;
|
|
|
- } else {
|
|
|
- let _index = 0;
|
|
|
- // let sum = 0;
|
|
|
- for (let keys in this.resData["全部"]) {
|
|
|
- this.menuData.topSolt.commonData[_index].title = keys;
|
|
|
- this.menuData.topSolt.commonData[_index].categoryData =
|
|
|
- this.resData[this.$store.state.homeSpecialTown][keys].categoryData;
|
|
|
- this.menuData.topSolt.commonData[_index].valueData =
|
|
|
- this.resData[this.$store.state.homeSpecialTown][keys].valueData;
|
|
|
- this.menuData.topSolt.commonData[_index].value =
|
|
|
- this.resData[this.$store.state.homeSpecialTown][keys].valueData[
|
|
|
- this.resData[this.$store.state.homeSpecialTown][keys].valueData.length - 1
|
|
|
- ];
|
|
|
- // sum += this.menuData.topSolt.commonData[_index].value;
|
|
|
- _index++;
|
|
|
+ try {
|
|
|
+ this.dataInitLoading = true;
|
|
|
+ if (this.resData[this.$store.state.homeSpecialTown] && this.menuData.topSolt.commonData) {
|
|
|
+ if (this.resData[this.$store.state.homeSpecialTown].categoryData) {
|
|
|
+ this.menuData.topSolt.commonData[0].categoryData = this.resData[this.$store.state.homeSpecialTown].categoryData;
|
|
|
+ this.menuData.topSolt.commonData[0].valueData = this.resData[this.$store.state.homeSpecialTown].valueData;
|
|
|
+ } else {
|
|
|
+ let _index = 0;
|
|
|
+ for (let keys in this.resData["全部"]) {
|
|
|
+ this.menuData.topSolt.commonData[_index].title = keys;
|
|
|
+ this.menuData.topSolt.commonData[_index].categoryData =
|
|
|
+ this.resData[this.$store.state.homeSpecialTown][keys].categoryData;
|
|
|
+ this.menuData.topSolt.commonData[_index].valueData =
|
|
|
+ this.resData[this.$store.state.homeSpecialTown][keys].valueData;
|
|
|
+ this.menuData.topSolt.commonData[_index].value =
|
|
|
+ this.resData[this.$store.state.homeSpecialTown][keys].valueData[
|
|
|
+ this.resData[this.$store.state.homeSpecialTown][keys].valueData.length - 1
|
|
|
+ ];
|
|
|
+ _index++;
|
|
|
+ }
|
|
|
}
|
|
|
- // if (this.menuData.topSolt.commonData[4]) {
|
|
|
- // this.menuData.topSolt.commonData[4].valueData = [sum];
|
|
|
- // }
|
|
|
+ } else if (this.menuData && this.menuData.commonName && this.menuData.commonName === "TOP") {
|
|
|
+ this.topData(this.$store.state.homeSpecialTown);
|
|
|
+ } else if (this.menuData && this.menuData.commonName && this.menuData.commonName === "SUM") {
|
|
|
+ this.sumData(this.$store.state.homeSpecialTown);
|
|
|
+ } else if (this.menuData && this.menuData.commonName && this.menuData.commonName === "ALLLIST") {
|
|
|
+ this.allListData(this.$store.state.homeSpecialTown);
|
|
|
+ } else if (this.menuData && this.menuData.topSolt && this.menuData.topSolt.commonData) {
|
|
|
+ this.menuData.topSolt.commonData.forEach((item, index) => {
|
|
|
+ this.menuData.topSolt.commonData[index].categoryData = [];
|
|
|
+ this.menuData.topSolt.commonData[index].valueData = [];
|
|
|
+ if (this.menuData.topSolt.commonData[index].valueData) {
|
|
|
+ this.menuData.topSolt.commonData[index].valueData = 0;
|
|
|
+ }
|
|
|
+ if (this.menuData.topSolt.commonData[index].value) {
|
|
|
+ this.menuData.topSolt.commonData[index].value = 0;
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
- } else if (this.menuData && this.menuData.commonName && this.menuData.commonName === "TOP") {
|
|
|
- this.topData(this.$store.state.homeSpecialTown);
|
|
|
- } else if (this.menuData && this.menuData.commonName && this.menuData.commonName === "SUM") {
|
|
|
- this.sumData(this.$store.state.homeSpecialTown);
|
|
|
- } else if (this.menuData && this.menuData.commonName && this.menuData.commonName === "ALLLIST") {
|
|
|
- this.allListData(this.$store.state.homeSpecialTown);
|
|
|
- } else if (this.menuData && this.menuData.topSolt && this.menuData.topSolt.commonData) {
|
|
|
- this.menuData.topSolt.commonData.forEach((item, index) => {
|
|
|
- this.menuData.topSolt.commonData[index].categoryData = [];
|
|
|
- this.menuData.topSolt.commonData[index].valueData = [];
|
|
|
- if (this.menuData.topSolt.commonData[index].valueData) {
|
|
|
- this.menuData.topSolt.commonData[index].valueData = 0;
|
|
|
- }
|
|
|
- if (this.menuData.topSolt.commonData[index].value) {
|
|
|
- this.menuData.topSolt.commonData[index].value = 0;
|
|
|
- }
|
|
|
- });
|
|
|
+ this.dataInitLoading = false;
|
|
|
+ } catch (e) {
|
|
|
+ console.log("MenuCard组件changeHomeSpecialTown出现异常", e);
|
|
|
+ this.dataInitLoading = false;
|
|
|
}
|
|
|
},
|
|
|
// 当用户使用光标切换交互组件时触发
|