Browse Source

首页柱状图修改水 --> 其他

Bella 2 năm trước cách đây
mục cha
commit
bdb524b88f

+ 13 - 12
src/components/chart/BarChart.vue

@@ -23,7 +23,7 @@ export default {
         return [];
       },
     },
-    waterValueData: {
+    otherValueData: {
       type: Array,
       default() {
         return [];
@@ -48,8 +48,8 @@ export default {
     this.initEchart(
       this.categoryData,
       this.soilValueData,
-      this.waterValueData,
-      this.forestryValueData
+      this.forestryValueData,
+      this.otherValueData
     );
   },
   watch: {
@@ -58,13 +58,13 @@ export default {
       this.initEchart(
         this.categoryData,
         this.soilValueData,
-        this.waterValueData,
-        this.forestryValueData
+        this.forestryValueData,
+        this.otherValueData
       );
     },
   },
   methods: {
-    initEchart(categoryData, soil, water, forestry) {
+    initEchart(categoryData, soil, forestry, other) {
       if (!this.barChart) {
         this.barChart = echarts.init(this.$refs.barChart);
       }
@@ -140,8 +140,9 @@ export default {
             // }
             // data: [320, 302, 301, 334, 390, 330, 320],
           },
+
           {
-            name: "",
+            name: "林地",
             type: "bar",
             stack: "total",
             // label: {
@@ -150,14 +151,14 @@ export default {
             emphasis: {
               focus: "series",
             },
-            data: water,
+            data: forestry,
             // itemStyle:{
             //   color:"#f00"
             // }
-            // data: [120, 132, 101, 134, 90, 230, 210],
+            // data: [220, 182, 191, 234, 290, 330, 182],
           },
           {
-            name: "林地",
+            name: "其他",
             type: "bar",
             stack: "total",
             // label: {
@@ -166,11 +167,11 @@ export default {
             emphasis: {
               focus: "series",
             },
-            data: forestry,
+            data: other,
             // itemStyle:{
             //   color:"#f00"
             // }
-            // data: [220, 182, 191, 234, 290, 330, 182],
+            // data: [120, 132, 101, 134, 90, 230, 210],
           },
         ],
       };

+ 45 - 38
src/components/common/BottomForm/CustomModelDialog.vue

@@ -350,33 +350,33 @@ export default {
                       }),
               };
             }
-            if (item1.title === "预设模型" && item1.columnList.length > 0) {
-              return {
-                id: `${item1.title}_${item1.id}`,
-                label: item1.title,
-                children:
-                  item1.columnList.length === 0
-                    ? []
-                    : item1.columnList.map((item2) => {
-                        return {
-                          id: `${item2.title}_${item2.id}`,
-                          label: item2.title,
-                          children:
-                            item2.columnList.length === 0
-                              ? []
-                              : item2.columnList.map((item3) => {
-                                  return {
-                                    id: `${item3.title}_${item3.id}`,
-                                    label: item3.title,
-                                    children: [],
-                                    mainType: item1.title,
-                                    columnId: item3.id,
-                                  };
-                                }),
-                        };
-                      }),
-              };
-            }
+            // if (item1.title === "预设模型" && item1.columnList.length > 0) {
+            //   return {
+            //     id: `${item1.title}_${item1.id}`,
+            //     label: item1.title,
+            //     children:
+            //       item1.columnList.length === 0
+            //         ? []
+            //         : item1.columnList.map((item2) => {
+            //             return {
+            //               id: `${item2.title}_${item2.id}`,
+            //               label: item2.title,
+            //               children:
+            //                 item2.columnList.length === 0
+            //                   ? []
+            //                   : item2.columnList.map((item3) => {
+            //                       return {
+            //                         id: `${item3.title}_${item3.id}`,
+            //                         label: item3.title,
+            //                         children: [],
+            //                         mainType: item1.title,
+            //                         columnId: item3.id,
+            //                       };
+            //                     }),
+            //             };
+            //           }),
+            //   };
+            // }
           });
 
           data.forEach((c) => {
@@ -388,7 +388,7 @@ export default {
       });
     },
     transferCheckChange(data, checked) {
-      if (data.mainType === "预设模型" || data.mainType === "所有图层") {
+      if (data.mainType === "所有图层") {
         if (checked) {
           if (!this.checkedKeysArr.includes(data.id)) {
             this.checkedKeysArr.push(data.id);
@@ -464,6 +464,13 @@ export default {
         }
       }
     },
+    transferCheckChange1(data,checked){
+      if(data.mainType === "所有图层"){
+        if(checked){
+          // if
+        }
+      }
+    },
     // 添加模型
     addModel() {
       // 设置需要添加的参数
@@ -637,8 +644,8 @@ export default {
               layerAuthorityMap.get(v) === "有权限"
             ) {
               return {
-                columnName:v.split("_")[0],
-                columnId:v.split("_")[1]
+                columnName: v.split("_")[0],
+                columnId: v.split("_")[1],
               };
             }
           });
@@ -679,19 +686,19 @@ export default {
             columnId: v.split("_")[1],
           };
         });
-        let params = new FormData()
+        let params = new FormData();
         params = {
-          modelId:this.currentModifiedModelId,
-          bindLayer:JSON.stringify(bindLayer)
-        }
-        this.$Post(this.urlsCollection.overlayAnalysis,params).then((res)=>{
-          console.log(res,"res");
-          if(res.code === 200){
+          modelId: this.currentModifiedModelId,
+          bindLayer: JSON.stringify(bindLayer),
+        };
+        this.$Post(this.urlsCollection.overlayAnalysis, params).then((res) => {
+          console.log(res, "res");
+          if (res.code === 200) {
             let address = this.uploadBaseUrl + res.content;
             this.displayOverlayGeometry(address);
             this.modifyModel("alreadyOverlay", bindLayer);
           }
-        })
+        });
         // let bindLayer = newData.join(",");
         // let tagretUrl = `${this.urlsCollection.overlayAnalysis}?modelId=${this.currentModifiedModelId}&bindLayer=${bindLayer}`;
         // this.$Get(tagretUrl).then((res) => {

+ 129 - 240
src/config/common.js

@@ -68,22 +68,21 @@ export const lawType = {
  * 首页地图分类标准;
  */
 export const townData = {
-  A: ["南汇新城镇", "祝桥镇", "川沙新镇", "三林镇", "老港镇"],
-  B: ["书院镇", "新场镇", "航头镇", "惠南镇", "泥城镇", "唐镇", "北蔡镇"],
-  C: [
-    "大团镇",
-    "高东镇",
-    "高行镇",
-    "金桥镇",
-    "周浦镇",
-    "康桥镇",
+  A: [
+    "书院镇",
+    "新场镇",
     "万祥镇",
-    "高桥镇",
-    "张江镇",
+    "老港镇",
     "宣桥镇",
-    "曹路镇",
-    "合庆镇",
+    "航头镇",
+    "泥城镇",
+    "大团镇",
+    "川沙新镇",
+    "南汇新城镇",
+    "祝桥镇",
   ],
+  B: ["惠南镇", "曹路镇", "合庆镇", "张江镇", "高桥镇", "周浦镇", "康桥镇"],
+  C: ["北蔡镇", "唐镇", "高东镇", "三林镇", "高行镇", "金桥镇"],
 };
 
 /**
@@ -568,7 +567,7 @@ export const menuOnLine = {
       gotoPageInfo: {
         index: "2",
         subIndex: "1",
-        name: "土地资源"
+        name: "土地资源",
       },
       topSolt: {
         commonName: "TagTableCard",
@@ -578,75 +577,41 @@ export const menuOnLine = {
             title: "基本农田面积",
             value: 150,
             unit: "公顷",
-            categoryData: [
-              "2019",
-              "2020",
-              "2021"
-            ],
-            valueData: [
-              100,
-              120,
-              150
-            ]
+            categoryData: ["2019", "2020", "2021"],
+            valueData: [100, 120, 150],
           },
           {
             title: "储备土地面积",
             value: 250,
             unit: "公顷",
-            categoryData: [
-              "2019",
-              "2020",
-              "2021"
-            ],
-            valueData: [
-              2000,
-              220,
-              250
-            ]
+            categoryData: ["2019", "2020", "2021"],
+            valueData: [2000, 220, 250],
           },
           {
             title: "减量化面积",
             value: 350,
             unit: "公顷",
-            categoryData: [
-              "2019",
-              "2020",
-              "2021"
-            ],
-            valueData: [
-              300,
-              20,
-              350
-            ]
+            categoryData: ["2019", "2020", "2021"],
+            valueData: [300, 20, 350],
           },
           {
             title: "一般耕地面积",
             value: 450,
             unit: "公顷",
-            categoryData: [
-              "2019",
-              "2020",
-              "2021"
-            ],
-            valueData: [
-              40,
-              420,
-              450
-            ]
+            categoryData: ["2019", "2020", "2021"],
+            valueData: [40, 420, 450],
           },
           {
             type: "tb",
             title: "土地资源面积",
-            valueData: [
-              172
-            ],
-            unit: "公顷"
-          }
-        ]
+            valueData: [172],
+            unit: "公顷",
+          },
+        ],
       },
       bottomSolt: {
-        commonName: "ChartCard"
-      }
+        commonName: "ChartCard",
+      },
     },
     {
       type: "card",
@@ -657,7 +622,7 @@ export const menuOnLine = {
       gotoPageInfo: {
         index: "2",
         subIndex: "2",
-        name: "水资源"
+        name: "水资源",
       },
       topSolt: {
         commonName: "TagCard",
@@ -667,52 +632,28 @@ export const menuOnLine = {
             type: "tb",
             title: "水域面积",
             unit: "公顷",
-            categoryData: [
-              "2019",
-              "2020",
-              "2021"
-            ],
-            valueData: [
-              40,
-              420,
-              654
-            ]
+            categoryData: ["2019", "2020", "2021"],
+            valueData: [40, 420, 654],
           },
           {
             type: "tb",
             title: "区管河道数量",
             unit: "条",
-            categoryData: [
-              "2019",
-              "2020",
-              "2021"
-            ],
-            valueData: [
-              400,
-              420,
-              654
-            ]
+            categoryData: ["2019", "2020", "2021"],
+            valueData: [400, 420, 654],
           },
           {
             type: "tb",
             title: "镇管河道数量",
             unit: "条",
-            categoryData: [
-              "2019",
-              "2020",
-              "2021"
-            ],
-            valueData: [
-              400,
-              40,
-              654
-            ]
-          }
-        ]
+            categoryData: ["2019", "2020", "2021"],
+            valueData: [400, 40, 654],
+          },
+        ],
       },
       bottomSolt: {
-        commonName: "ChartCard"
-      }
+        commonName: "ChartCard",
+      },
     },
     {
       type: "card",
@@ -723,7 +664,7 @@ export const menuOnLine = {
       gotoPageInfo: {
         index: "2",
         subIndex: "3",
-        name: "林地资源"
+        name: "林地资源",
       },
       topSolt: {
         commonName: "TagCard",
@@ -733,38 +674,22 @@ export const menuOnLine = {
             type: "lr",
             title: "林地面积",
             unit: "公顷",
-            categoryData: [
-              "2019",
-              "2020",
-              "2021"
-            ],
-            valueData: [
-              40,
-              420,
-              654
-            ]
+            categoryData: ["2019", "2020", "2021"],
+            valueData: [40, 420, 654],
           },
           {
             type: "lr",
             title: "公益林面积",
             unit: "公顷",
-            categoryData: [
-              "2019",
-              "2020",
-              "2021"
-            ],
-            valueData: [
-              400,
-              420,
-              654
-            ]
-          }
-        ]
+            categoryData: ["2019", "2020", "2021"],
+            valueData: [400, 420, 654],
+          },
+        ],
       },
       bottomSolt: {
-        commonName: "ChartCard"
-      }
-    }
+        commonName: "ChartCard",
+      },
+    },
   ],
   leftW: [
     [
@@ -782,8 +707,8 @@ export const menuOnLine = {
         gotoPageInfo: {
           index: "3",
           subIndex: "",
-          name: "综合分析"
-        }
+          name: "综合分析",
+        },
       },
       {
         type: "imageMenu",
@@ -799,8 +724,8 @@ export const menuOnLine = {
         gotoPageInfo: {
           index: "3",
           subIndex: "",
-          name: "综合分析"
-        }
+          name: "综合分析",
+        },
       },
       {
         type: "imageMenu",
@@ -816,8 +741,8 @@ export const menuOnLine = {
         gotoPageInfo: {
           index: "3",
           subIndex: "",
-          name: "综合分析"
-        }
+          name: "综合分析",
+        },
       },
       {
         type: "imageMenu",
@@ -833,9 +758,9 @@ export const menuOnLine = {
         gotoPageInfo: {
           index: "3",
           subIndex: "",
-          name: "综合分析"
-        }
-      }
+          name: "综合分析",
+        },
+      },
     ],
     [
       {
@@ -852,8 +777,8 @@ export const menuOnLine = {
         gotoPageInfo: {
           index: "3",
           subIndex: "",
-          name: "综合分析"
-        }
+          name: "综合分析",
+        },
       },
       {
         type: "imageMenu",
@@ -869,8 +794,8 @@ export const menuOnLine = {
         gotoPageInfo: {
           index: "3",
           subIndex: "",
-          name: "综合分析"
-        }
+          name: "综合分析",
+        },
       },
       {
         type: "imageMenu",
@@ -886,9 +811,9 @@ export const menuOnLine = {
         gotoPageInfo: {
           index: "3",
           subIndex: "",
-          name: "综合分析"
-        }
-      }
+          name: "综合分析",
+        },
+      },
     ],
     [
       {
@@ -905,8 +830,8 @@ export const menuOnLine = {
         gotoPageInfo: {
           index: "3",
           subIndex: "",
-          name: "综合分析"
-        }
+          name: "综合分析",
+        },
       },
       {
         type: "imageMenu",
@@ -922,10 +847,10 @@ export const menuOnLine = {
         gotoPageInfo: {
           index: "3",
           subIndex: "",
-          name: "综合分析"
-        }
-      }
-    ]
+          name: "综合分析",
+        },
+      },
+    ],
   ],
   main: [
     {
@@ -936,8 +861,8 @@ export const menuOnLine = {
       boxBackground: "rgba(0,39,77,0.6)",
       menuIndex: "1",
       position: "top",
-      minDomWidth: 1500
-    }
+      minDomWidth: 1500,
+    },
   ],
   right: [
     [
@@ -957,13 +882,13 @@ export const menuOnLine = {
               title: "资金投入",
               unit: "万元",
               categoryData: [],
-              valueData: []
-            }
-          ]
+              valueData: [],
+            },
+          ],
         },
         bottomSolt: {
-          commonName: "ChartCard"
-        }
+          commonName: "ChartCard",
+        },
       },
       {
         type: "card",
@@ -981,54 +906,30 @@ export const menuOnLine = {
               title: "资源环境项目",
               value: 172,
               unit: "个",
-              categoryData: [
-                "2019",
-                "2020",
-                "2021"
-              ],
-              valueData: [
-                40,
-                420,
-                172
-              ]
+              categoryData: ["2019", "2020", "2021"],
+              valueData: [40, 420, 172],
             },
             {
               type: "tb",
               title: "自然资源环境项目",
               value: 156,
               unit: "个",
-              categoryData: [
-                "2019",
-                "2020",
-                "2021"
-              ],
-              valueData: [
-                400,
-                420,
-                156
-              ]
+              categoryData: ["2019", "2020", "2021"],
+              valueData: [400, 420, 156],
             },
             {
               type: "tb",
               title: "调查项目",
               value: 188,
               unit: "个",
-              categoryData: [
-                "2019",
-                "2020",
-                "2021"
-              ],
-              valueData: [
-                100,
-                40,
-                188
-              ]
-            }
-          ]
+              categoryData: ["2019", "2020", "2021"],
+              valueData: [100, 40, 188],
+            },
+          ],
         },
         bottomSolt: {
-          commonName: "ChartCard"
-        }
+          commonName: "ChartCard",
+        },
       },
       {
         type: "card",
@@ -1047,32 +948,32 @@ export const menuOnLine = {
         topData: [
           {
             number: 0,
-            c_wtfl: "--"
+            c_wtfl: "--",
           },
           {
             number: 0,
-            c_wtfl: "--"
+            c_wtfl: "--",
           },
           {
             number: 0,
-            c_wtfl: "--"
+            c_wtfl: "--",
           },
           {
             number: 0,
-            c_wtfl: "--"
+            c_wtfl: "--",
           },
           {
             number: 0,
-            c_wtfl: "--"
-          }
+            c_wtfl: "--",
+          },
         ],
         commonName: "TOP",
         gotoPageInfo: {
           index: "5",
           subIndex: "2",
-          name: "频发问题"
-        }
-      }
+          name: "频发问题",
+        },
+      },
     ],
     [
       {
@@ -1088,13 +989,9 @@ export const menuOnLine = {
         pageSize: 5,
         field: "c_zdsjsx",
         commonName: "SUM",
-        categoryData: [
-          "2019",
-          "2020",
-          "2021"
-        ],
+        categoryData: ["2019", "2020", "2021"],
         paramJson: {
-          sj_select: "1"
+          sj_select: "1",
         },
         topSolt: {
           commonName: "TagCard",
@@ -1104,13 +1001,13 @@ export const menuOnLine = {
               title: "土地类疑点",
               unit: "个",
               categoryData: [],
-              valueData: []
-            }
-          ]
+              valueData: [],
+            },
+          ],
         },
         bottomSolt: {
-          commonName: "ChartCard"
-        }
+          commonName: "ChartCard",
+        },
       },
       {
         type: "card",
@@ -1127,11 +1024,11 @@ export const menuOnLine = {
         field: "c_zdsjsx",
         dataType: "all",
         paramJson: {
-          sj_select: "1"
+          sj_select: "1",
         },
         dataSize: 5,
-        topData: []
-      }
+        topData: [],
+      },
     ],
     [
       {
@@ -1147,13 +1044,9 @@ export const menuOnLine = {
         pageSize: 5,
         field: "c_zdsjsx",
         commonName: "SUM",
-        categoryData: [
-          "2019",
-          "2020",
-          "2021"
-        ],
+        categoryData: ["2019", "2020", "2021"],
         paramJson: {
-          sj_select: "2"
+          sj_select: "2",
         },
         topSolt: {
           commonName: "TagCard",
@@ -1163,13 +1056,13 @@ export const menuOnLine = {
               title: "水资源类疑点",
               unit: "个",
               categoryData: [],
-              valueData: []
-            }
-          ]
+              valueData: [],
+            },
+          ],
         },
         bottomSolt: {
-          commonName: "ChartCard"
-        }
+          commonName: "ChartCard",
+        },
       },
       {
         type: "card",
@@ -1186,11 +1079,11 @@ export const menuOnLine = {
         field: "c_zdsjsx",
         dataType: "all",
         paramJson: {
-          sj_select: "2"
+          sj_select: "2",
         },
         dataSize: 5,
-        topData: []
-      }
+        topData: [],
+      },
     ],
     [
       {
@@ -1206,13 +1099,9 @@ export const menuOnLine = {
         pageSize: 5,
         field: "c_zdsjsx",
         commonName: "SUM",
-        categoryData: [
-          "2019",
-          "2020",
-          "2021"
-        ],
+        categoryData: ["2019", "2020", "2021"],
         paramJson: {
-          sj_select: "3"
+          sj_select: "3",
         },
         topSolt: {
           commonName: "TagCard",
@@ -1222,13 +1111,13 @@ export const menuOnLine = {
               title: "林地类疑点",
               unit: "个",
               categoryData: [],
-              valueData: []
-            }
-          ]
+              valueData: [],
+            },
+          ],
         },
         bottomSolt: {
-          commonName: "ChartCard"
-        }
+          commonName: "ChartCard",
+        },
       },
       {
         type: "card",
@@ -1245,11 +1134,11 @@ export const menuOnLine = {
         field: "c_zdsjsx",
         dataType: "all",
         paramJson: {
-          sj_select: "3"
+          sj_select: "3",
         },
         dataSize: 5,
-        topData: []
-      }
-    ]
-  ]
-};
+        topData: [],
+      },
+    ],
+  ],
+};

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 365 - 216
src/views/ComprehensiveAnalysis.vue


+ 122 - 72
src/views/HomeView.vue

@@ -23,7 +23,7 @@
           menuIndex: '2',
           subMenuIndex: '5',
           legendIcon: legendIcon,
-          legendTitle: legendTitle
+          legendTitle: legendTitle,
         }"
       />
       <div class="select-title">所属街道</div>
@@ -41,12 +41,17 @@
               type: 'card',
               title: streetSelectVal + '资源问题',
               titleWidth: 40,
-              boxWidth: '780'
+              boxWidth: '780',
             }"
           >
             <template slot="top">
               <div class="town-problems-top-inner">
-                <TagProblemCard class="problem-item" v-for="n in townCollection" :key="n.name" :data="n" />
+                <TagProblemCard
+                  class="problem-item"
+                  v-for="n in townCollection"
+                  :key="n.name"
+                  :data="n"
+                />
               </div>
             </template>
           </MenuCard>
@@ -65,7 +70,7 @@
               field: 'c_wtfl',
               dataType: 'all',
               dataSize: 10,
-              topData: []
+              topData: [],
             }"
           ></MenuCard>
           <MenuCard
@@ -81,7 +86,7 @@
               field: 'c_wtfl',
               dataType: 'all',
               dataSize: 10,
-              topData: []
+              topData: [],
             }"
           ></MenuCard>
         </div>
@@ -89,7 +94,10 @@
     </div>
 
     <!-- 综合分析 -->
-    <ComprehensiveAnalysis id="ComprehensiveContainer" v-if="$ifMenu('3', '')" />
+    <ComprehensiveAnalysis
+      id="ComprehensiveContainer"
+      v-if="$ifMenu('3', '')"
+    />
 
     <!-- 法律法规 -->
     <LawView id="LawContainer" v-if="$ifMenu('5', '1')" />
@@ -104,7 +112,8 @@
     </div>
     <!-- 左侧菜单列(较宽,两列) -- 疑点筛查 -->
     <div id="leftMenusW" v-for="(item, index) in menus.leftW" :key="index">
-      <MenuCard :menuData="item2" v-for="item2 in item" :key="item2.title"> </MenuCard>
+      <MenuCard :menuData="item2" v-for="item2 in item" :key="item2.title">
+      </MenuCard>
     </div>
     <!-- 中部菜单列 -->
     <div id="mainMenus">
@@ -136,7 +145,7 @@
               class="bar"
               :categoryData="categoryData"
               :soilValueData="soil"
-              :waterValueData="water"
+              :otherValueData="other"
               :forestryValueData="forestry"
               :sourceType="btnChecked"
             />
@@ -150,13 +159,22 @@
           boxHeight: '180',
           menuIndex: '1',
           legendIcon: legendIcon,
-          legendTitle: legendTitle
+          legendTitle: legendTitle,
         }"
       />
     </div>
     <!-- 首页右侧菜单列 -->
-    <div class="rightMenus" v-for="(item, index) in menus.right" :key="'rightBox' + index">
-      <MenuCard :menuData="item2" v-for="(item2, index2) in item" :key="'right' + index2"> </MenuCard>
+    <div
+      class="rightMenus"
+      v-for="(item, index) in menus.right"
+      :key="'rightBox' + index"
+    >
+      <MenuCard
+        :menuData="item2"
+        v-for="(item2, index2) in item"
+        :key="'right' + index2"
+      >
+      </MenuCard>
     </div>
   </div>
 </template>
@@ -201,15 +219,16 @@ export default {
     Legend,
     WholeProcessManagement,
     FrequencyView,
-    LawView
+    LawView,
   },
   data() {
     return {
+      classTextToIndex: {},
       tagCardData3: {
         type: "lr",
         title: "林地面积",
         value: 654,
-        unit: "公顷"
+        unit: "公顷",
       },
       testTitle: "土地资源",
       activeIndex: 1,
@@ -218,61 +237,61 @@ export default {
         left: [],
         leftW: [],
         main: [],
-        right: []
+        right: [],
       },
       // 首页饼图相关
       buttonData: ["A", "B", "C"],
       legendTitle: [
         {
           name: "A类",
-          info: "耕地林地总和占镇域面积约 45%以上,或超过3000公顷"
+          info: "耕地林地总和占镇域面积约 45%以上,或超过3000公顷",
         },
         {
           name: "B类",
-          info: "有一定的自然资源资产(耕地林地总和 900-3000公项)"
+          info: "有一定的自然资源资产(耕地林地总和 900-3000公项)",
         },
         {
           name: "C类",
-          info: "自然资源资产较少(耕地林地总和低于 900公项)"
-        }
+          info: "自然资源资产较少(耕地林地总和低于 900公项)",
+        },
       ],
       // legendData: ["#E565FF", "#0055FF", "#00FFD5"],
       legendIcon: [
         {
           background: "#E565FF",
-          border: "none"
+          border: "none",
         },
         {
           background: "#0055FF",
-          border: "none"
+          border: "none",
         },
         {
           background: "#00FFD5",
-          border: "none"
-        }
+          border: "none",
+        },
       ],
       btnChecked: "A",
       soil: [],
-      water: [],
+      other: [],
       forestry: [],
       categoryData: [],
       AData: {
         soil: [],
-        water: [],
+        other: [],
         forestry: [],
-        categoryData: []
+        categoryData: [],
       },
       BData: {
         soil: [],
-        water: [],
+        other: [],
         forestry: [],
-        categoryData: []
+        categoryData: [],
       },
       CData: {
         soil: [],
-        water: [],
+        other: [],
         forestry: [],
-        categoryData: []
+        categoryData: [],
       },
       streetSelectVal: "全部",
       streetOptions: [],
@@ -281,12 +300,12 @@ export default {
         { name: "土地资源问题", num: 67 },
         { name: "水资源问题", num: 37 },
         { name: "林地资源问题", num: 60 },
-        { name: "生态资源问题", num: 55 }
+        { name: "生态资源问题", num: 55 },
       ],
       // 综合分析
       analysis: {
-        searchInput: ""
-      }
+        searchInput: "",
+      },
     };
   },
   mounted() {
@@ -294,12 +313,27 @@ export default {
     this.selectSelectData("0", "浦东新区行政区划", "associatedItems");
   },
   methods: {
+    classDictQuery(type, cName, keyName) {
+      let params = new FormData();
+      params = {
+        type: type,
+        cName: cName,
+      };
+      this.$Post(this.urlsCollection.selectByCNameAType, params).then((res) => {
+        if (res.code === 200 && res.content.length > 0) {
+          this.classTextToIndex[keyName] = new Map();
+          res.content.forEach((v) => {
+            this.classTextToIndex[keyName].set(v.index + "", v.name);
+          });
+        }
+      });
+    },
     initMenu(menus) {
       if (menus) {
         this.menus = menus;
         setTimeout(() => {
           this.getSourcesData();
-        },300);
+        }, 300);
       }
       // this.menus = menuOnLine;
       // this.getSourcesData();
@@ -313,20 +347,20 @@ export default {
       switch (type) {
         case "A":
           this.soil = this.AData.soil;
-          this.water = this.AData.water;
+          this.other = this.AData.other;
           this.forestry = this.AData.forestry;
           this.categoryData = this.AData.categoryData;
 
           break;
         case "B":
           this.soil = this.BData.soil;
-          this.water = this.BData.water;
+          this.other = this.BData.other;
           this.forestry = this.BData.forestry;
           this.categoryData = this.BData.categoryData;
           break;
         case "C":
           this.soil = this.CData.soil;
-          this.water = this.CData.water;
+          this.other = this.CData.other;
           this.forestry = this.CData.forestry;
           this.categoryData = this.CData.categoryData;
           break;
@@ -338,12 +372,12 @@ export default {
       params.append("type", type);
       params.append("cName", cName);
       this.$Post(this.urlsCollection.selectByCNameAType, params).then(
-        res => {
+        (res) => {
           if (res.code === 200 && res.content.length > 0) {
             this.$store.state.selectSelectDataMap[keyName] = res.content;
           }
         },
-        error => {
+        (error) => {
           this.$message.error(error);
           console.log(error);
         }
@@ -375,47 +409,53 @@ export default {
       let params = new FormData();
       params = {
         columnId: 30,
-        states: 3,
+        states: "0,1,2,3",
         pageSize: 30,
-        page: 0
+        page: 0,
       };
       this.$Post(this.urlsCollection.selectContentList, params)
-        .then(res => {
+        .then((res) => {
           if (res.code === 200 && res.content.data.length > 0) {
             // console.log(res.content.data, "getSourcesData接口获取成功");
             this.soil = [];
-            this.water = [];
+            this.other = [];
             this.forestry = [];
             let data = res.content.data;
             let ADataArr = [];
             let BDataArr = [];
             let CDataArr = [];
-            data.map(v => {
+            data.map((v) => {
               if (v.zy_type === "0") {
                 ADataArr.push({
-                  name: v.title,
+                  name: this.classTextToIndex["浦东新区行政区划"].get(
+                    v.zy_town
+                  ),
                   soil: v.c_land_area,
-                  water: v.c_water_area,
+                  other: v.other_area,
                   forest: v.c_forest_area,
-                  sum: v.c_land_area + v.c_water_area + v.c_forest_area
+                  sum: v.c_land_area + v.other_area + v.c_forest_area,
                 });
               }
               if (v.zy_type === "1") {
                 BDataArr.push({
-                  name: v.title,
+                  name: this.classTextToIndex["浦东新区行政区划"].get(
+                    v.zy_town
+                  ),
                   soil: v.c_land_area,
-                  water: v.c_water_area,
+                  other: v.other_area,
                   forest: v.c_forest_area,
-                  sum: v.c_land_area + v.c_water_area + v.c_forest_area
+                  sum: v.c_land_area + v.other_area + v.c_forest_area,
                 });
               }
               if (v.zy_type === "2") {
                 CDataArr.push({
-                  name: v.title,
+                  name: this.classTextToIndex["浦东新区行政区划"].get(
+                    v.zy_town
+                  ),
                   soil: v.c_land_area,
-                  water: v.c_water_area,
+                  other: v.other_area,
                   forest: v.c_forest_area,
-                  sum: v.c_land_area + v.c_water_area + v.c_forest_area
+                  sum: v.c_land_area + v.other_area + v.c_forest_area,
                 });
               }
             });
@@ -425,22 +465,22 @@ export default {
             CDataArr.sort(publicFun.compare("sum"));
 
             // 按A,B,C分出各自资源的排序数组
-            ADataArr.forEach(item => {
+            ADataArr.forEach((item) => {
               this.AData.soil.push(item.soil);
-              this.AData.water.push(item.water);
+              this.AData.other.push(item.other);
               this.AData.forestry.push(item.forest);
               this.AData.categoryData.push(item.name);
             });
-            BDataArr.forEach(item => {
+            BDataArr.forEach((item) => {
               this.BData.soil.push(item.soil);
-              this.BData.water.push(item.water);
+              this.BData.other.push(item.other);
               this.BData.forestry.push(item.forest);
               this.BData.categoryData.push(item.name);
             });
 
-            CDataArr.forEach(item => {
+            CDataArr.forEach((item) => {
               this.CData.soil.push(item.soil);
-              this.CData.water.push(item.water);
+              this.CData.other.push(item.other);
               this.CData.forestry.push(item.forest);
               this.CData.categoryData.push(item.name);
             });
@@ -450,27 +490,29 @@ export default {
                 this.$refs.barChartRef.initEchart(
                   this.AData.categoryData,
                   this.AData.soil,
-                  this.AData.water,
-                  this.AData.forestry
+                  this.AData.forestry,
+                  this.AData.other
                 );
               }
             });
           }
         })
-        .catch(error => {
+        .catch((error) => {
           console.log(error, "getSourcesData");
         });
-    }
+    },
   },
   created() {
+    this.classDictQuery("0", "浦东新区行政区划", "浦东新区行政区划");
+
     //   // 街道下拉框
     for (let key in street) {
       this.streetOptions.push({
         value: street[key],
-        label: street[key]
+        label: street[key],
       });
     }
-  }
+  },
 };
 </script>
 <style lang="less" scoped>
@@ -748,14 +790,22 @@ export default {
     transform: translate(-50%, -50%) rotate(45deg);
     width: 110px;
     height: 100px;
-    background: linear-gradient(to left, @commonBorderColor, @commonBorderColor) left top no-repeat,
-      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) left top no-repeat,
-      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right top no-repeat,
-      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) right top no-repeat,
-      linear-gradient(to left, @commonBorderColor, @commonBorderColor) left bottom no-repeat,
-      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) left bottom no-repeat,
-      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right bottom no-repeat,
-      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right bottom no-repeat;
+    background: linear-gradient(to left, @commonBorderColor, @commonBorderColor)
+        left top no-repeat,
+      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) left
+        top no-repeat,
+      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right top
+        no-repeat,
+      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) right
+        top no-repeat,
+      linear-gradient(to left, @commonBorderColor, @commonBorderColor) left
+        bottom no-repeat,
+      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) left
+        bottom no-repeat,
+      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right
+        bottom no-repeat,
+      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right
+        bottom no-repeat;
     background-size: 6px 6px, 6px 6px, 6px 6px, 6px 6px;
   }
 }

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác