|
@@ -132,6 +132,7 @@ export default {
|
|
components: { TagTableCard, ChartCard, TagCard },
|
|
components: { TagTableCard, ChartCard, TagCard },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ resData: [],
|
|
chartCardDataIndex: 0
|
|
chartCardDataIndex: 0
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -140,7 +141,7 @@ export default {
|
|
if (this.menuData && this.menuData.topSolt && this.menuData.topSolt.commonDataGetUrl) {
|
|
if (this.menuData && this.menuData.topSolt && this.menuData.topSolt.commonDataGetUrl) {
|
|
this.$Get("/static/json/home/" + this.menuData.topSolt.commonDataGetUrl).then(
|
|
this.$Get("/static/json/home/" + this.menuData.topSolt.commonDataGetUrl).then(
|
|
res => {
|
|
res => {
|
|
- this.resData = res;
|
|
|
|
|
|
+ // this.resData = res;
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
console.log("error:", error, this.menuData);
|
|
console.log("error:", error, this.menuData);
|
|
@@ -153,6 +154,8 @@ export default {
|
|
params.append("states", "2,3");
|
|
params.append("states", "2,3");
|
|
params.append("pageSize", 999);
|
|
params.append("pageSize", 999);
|
|
params.append("page", 0);
|
|
params.append("page", 0);
|
|
|
|
+ let sortparam = [{ field: "c_years", orderByType: 1 }];
|
|
|
|
+ params.append("orderBy", JSON.stringify(sortparam));
|
|
this.$Post(this.urlsCollection.selectContentList, params).then(
|
|
this.$Post(this.urlsCollection.selectContentList, params).then(
|
|
res => {
|
|
res => {
|
|
if (res.code === 200 && res.content.data.length > 0) {
|
|
if (res.code === 200 && res.content.data.length > 0) {
|
|
@@ -160,17 +163,18 @@ export default {
|
|
let tableData = res.content.data;
|
|
let tableData = res.content.data;
|
|
tableData.forEach(item=>{
|
|
tableData.forEach(item=>{
|
|
if(listMap[item.street]){
|
|
if(listMap[item.street]){
|
|
- console.log("添加数据!");
|
|
|
|
|
|
+ listMap[item.street]['categoryData'].push(item.c_years);
|
|
|
|
+ listMap[item.street]['valueData'].push((item.c_float_num / 10000).toFixed(2));
|
|
}else{
|
|
}else{
|
|
let listMapItem = {};
|
|
let listMapItem = {};
|
|
- listMapItem['categoryData'] = item.c_year;
|
|
|
|
- listMapItem['valueData'] = item.c_year;
|
|
|
|
|
|
+ listMapItem['categoryData'] = [item.c_years];
|
|
|
|
+ listMapItem['valueData'] = [(item.c_float_num / 10000).toFixed(2)];
|
|
listMap[item.street] = listMapItem;
|
|
listMap[item.street] = listMapItem;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- console.log("tableData:", tableData);
|
|
|
|
|
|
+ this.resData = listMap;
|
|
} else {
|
|
} else {
|
|
- let tableData = [];
|
|
|
|
|
|
+ this.resData = [];
|
|
}
|
|
}
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
@@ -229,15 +233,10 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
// 切换街镇时
|
|
// 切换街镇时
|
|
changeHomeSpecialTown() {
|
|
changeHomeSpecialTown() {
|
|
- if (this.resData) {
|
|
|
|
- this.resData.forEach(item => {
|
|
|
|
- if (this.$store.state.homeSpecialTown == item.name && item.data.length > 0) {
|
|
|
|
- this.$message.info("土地资源数据开始解析!");
|
|
|
|
- // item.data.forEach(dataItem=>{
|
|
|
|
-
|
|
|
|
- // })
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ if (this.resData[this.$store.state.homeSpecialTown]) {
|
|
|
|
+ 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;
|
|
|
|
+ console.log(this.menuData,this.resData,this.$store.state.homeSpecialTown)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 当用户使用光标切换交互组件时触发
|
|
// 当用户使用光标切换交互组件时触发
|