|
@@ -74,7 +74,6 @@
|
|
|
<div class="menuMainBox_main_top" v-if="menuData.topSolt">
|
|
|
<TagTableCard
|
|
|
v-if="menuData.topSolt.commonName == 'TagTableCard'"
|
|
|
- :getDataUrl="menuData.topSolt.commonDataGetUrl"
|
|
|
:echartData="menuData.topSolt.commonData"
|
|
|
@changeMousemoveIndex="changeMousemoveIndex"
|
|
|
/>
|
|
@@ -138,6 +137,47 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.$nextTick(() => {
|
|
|
+ if (this.menuData && this.menuData.topSolt && this.menuData.topSolt.commonDataGetUrl) {
|
|
|
+ this.$Get("/static/json/home/" + this.menuData.topSolt.commonDataGetUrl).then(
|
|
|
+ res => {
|
|
|
+ this.resData = res;
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ console.log("error:", error, this.menuData);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else if (this.menuData && this.menuData.topSolt && this.menuData.topSolt.columnId) {
|
|
|
+ let params = new FormData();
|
|
|
+ this.countUser = 0;
|
|
|
+ params.append("columnId", this.menuData.topSolt.columnId);
|
|
|
+ params.append("states", "2,3");
|
|
|
+ params.append("pageSize", 999);
|
|
|
+ params.append("page", 0);
|
|
|
+ this.$Post(this.urlsCollection.selectContentList, params).then(
|
|
|
+ res => {
|
|
|
+ if (res.code === 200 && res.content.data.length > 0) {
|
|
|
+ let listMap = {}
|
|
|
+ let tableData = res.content.data;
|
|
|
+ tableData.forEach(item=>{
|
|
|
+ if(listMap[item.street]){
|
|
|
+ console.log("添加数据!");
|
|
|
+ }else{
|
|
|
+ let listMapItem = {};
|
|
|
+ listMapItem['categoryData'] = item.c_year;
|
|
|
+ listMapItem['valueData'] = item.c_year;
|
|
|
+ listMap[item.street] = listMapItem;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log("tableData:", tableData);
|
|
|
+ } else {
|
|
|
+ let tableData = [];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ console.log("error:", error, this.menuData);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
// 只有第一次创建该页面,或刷新页面时。
|
|
|
if (this.menuData.menuIndex) {
|
|
|
if (this.$ifMenu(this.menuData.menuIndex, this.menuData.subMenuIndex)) {
|
|
@@ -187,6 +227,19 @@ export default {
|
|
|
*/
|
|
|
props: ["menuData"],
|
|
|
methods: {
|
|
|
+ // 切换街镇时
|
|
|
+ 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=>{
|
|
|
+
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
// 当用户使用光标切换交互组件时触发
|
|
|
changeMousemoveIndex(index) {
|
|
|
if (this.chartCardDataIndex != index) {
|
|
@@ -316,6 +369,14 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
deep: true
|
|
|
+ },
|
|
|
+ "$store.state.homeSpecialTown": {
|
|
|
+ handler() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.changeHomeSpecialTown();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
}
|
|
|
}
|
|
|
};
|