|  | @@ -51,12 +51,35 @@ export default {
 | 
											
												
													
														|  |              title: "",
 |  |              title: "",
 | 
											
												
													
														|  |              active_dableData: null,
 |  |              active_dableData: null,
 | 
											
												
													
														|  |              tableData: null,
 |  |              tableData: null,
 | 
											
												
													
														|  | 
 |  | +            layersData: {},
 | 
											
												
													
														|  |          };
 |  |          };
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      methods: {
 |  |      methods: {
 | 
											
												
													
														|  |          async draw_vector_server(jscType){
 |  |          async draw_vector_server(jscType){
 | 
											
												
													
														|  |              let res = await QueryOne({ jscType, id: "4602" });
 |  |              let res = await QueryOne({ jscType, id: "4602" });
 | 
											
												
													
														|  | -            tdsy.addLayer({ ...res.data, title: this.title });
 |  | 
 | 
											
												
													
														|  | 
 |  | +            this.layersData = { ...res.data, title: this.title }
 | 
											
												
													
														|  | 
 |  | +            tdsy.addLayer(this.layersData);
 | 
											
												
													
														|  | 
 |  | +            this.Getlayers(res.data.url)
 | 
											
												
													
														|  | 
 |  | +        },
 | 
											
												
													
														|  | 
 |  | +        async Getlayers(mapurl) {
 | 
											
												
													
														|  | 
 |  | +            let url = `${mapurl}/layers.json`;
 | 
											
												
													
														|  | 
 |  | +            let res = await axios.get(url);
 | 
											
												
													
														|  | 
 |  | +            let layers = res.data[0].subLayers.layers;
 | 
											
												
													
														|  | 
 |  | +            if(layers.length > 0)
 | 
											
												
													
														|  | 
 |  | +              this.layersData.layerName = layers[0].name
 | 
											
												
													
														|  | 
 |  | +        },
 | 
											
												
													
														|  | 
 |  | +        async setLayerStatus(item) {
 | 
											
												
													
														|  | 
 |  | +            if(this.layersData.layerName){
 | 
											
												
													
														|  | 
 |  | +                var params_gh = {
 | 
											
												
													
														|  | 
 |  | +                    layerName: this.layersData.layerName,
 | 
											
												
													
														|  | 
 |  | +                    isVisible: true,
 | 
											
												
													
														|  | 
 |  | +                    displayFilter: `xmmc = '${item['项目名称']}'`
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +                console.log(params_gh,'params_gh')
 | 
											
												
													
														|  | 
 |  | +                tdsy.superProvider.setLayerStatusParameters([params_gh],150000,item.id)
 | 
											
												
													
														|  | 
 |  | +            }else{
 | 
											
												
													
														|  | 
 |  | +                Message.error('缺少图层名称,设置失败')
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  |          },
 |  |          },
 | 
											
												
													
														|  |          multiPolygonToPolygons(multiPolygon) {
 |  |          multiPolygonToPolygons(multiPolygon) {
 | 
											
												
													
														|  |              const polygons = [];
 |  |              const polygons = [];
 | 
											
										
											
												
													
														|  | @@ -198,10 +221,15 @@ export default {
 | 
											
												
													
														|  |          go(item) {
 |  |          go(item) {
 | 
											
												
													
														|  |              if(!item.geom){
 |  |              if(!item.geom){
 | 
											
												
													
														|  |                  this.$message.warning( "缺少定位图斑" );
 |  |                  this.$message.warning( "缺少定位图斑" );
 | 
											
												
													
														|  | 
 |  | +            }else{
 | 
											
												
													
														|  | 
 |  | +               if(this.cockpit_vector.mapType) {
 | 
											
												
													
														|  | 
 |  | +                this.setLayerStatus(item)
 | 
											
												
													
														|  | 
 |  | +               }
 | 
											
												
													
														|  | 
 |  | +               else 
 | 
											
												
													
														|  | 
 |  | +               this.addpolygon(item)
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |              store.setVectordataid(item.dataid)
 |  |              store.setVectordataid(item.dataid)
 | 
											
												
													
														|  |              let arr = [];
 |  |              let arr = [];
 | 
											
												
													
														|  | -            const that = this;
 |  | 
 | 
											
												
													
														|  |              // BoxCommonVector_entity = new Cesium.CustomDataSource("BoxCommonVector_entity");
 |  |              // BoxCommonVector_entity = new Cesium.CustomDataSource("BoxCommonVector_entity");
 | 
											
												
													
														|  |              // viewer.dataSources.add(BoxCommonVector_entity);
 |  |              // viewer.dataSources.add(BoxCommonVector_entity);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -212,11 +240,14 @@ export default {
 | 
											
												
													
														|  |                      "value": item[key],
 |  |                      "value": item[key],
 | 
											
												
													
														|  |                  });
 |  |                  });
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -                if (key == 'geom') {
 |  | 
 | 
											
												
													
														|  | -                    console.log();
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +            });
 | 
											
												
													
														|  | 
 |  | +            store.state.vectorData = arr
 | 
											
												
													
														|  | 
 |  | +            store.setActiveToolBar(9);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -                    let geojson = item[key];
 |  | 
 | 
											
												
													
														|  | 
 |  | +        },
 | 
											
												
													
														|  | 
 |  | +        addpolygon(item){
 | 
											
												
													
														|  | 
 |  | +                    const that = this;
 | 
											
												
													
														|  | 
 |  | +                    let geojson = item.geom;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                      if (geojson.type == 'MultiPolygon') {
 |  |                      if (geojson.type == 'MultiPolygon') {
 | 
											
												
													
														|  |                          this.build_data(geojson);
 |  |                          this.build_data(geojson);
 | 
											
										
											
												
													
														|  | @@ -293,16 +324,6 @@ export default {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                      }, 6000)
 |  |                      }, 6000)
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -                }
 |  | 
 | 
											
												
													
														|  | -            });
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -            store.state.vectorData = arr
 |  | 
 | 
											
												
													
														|  | -            store.setActiveToolBar(9);
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |          },
 |  |          },
 | 
											
												
													
														|  |          change_witch() {
 |  |          change_witch() {
 | 
											
												
													
														|  |              this.get_search(this.state);
 |  |              this.get_search(this.state);
 |