|  | @@ -1,10 +1,18 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  |    <div>
 | 
	
		
			
				|  |  | -    <div class="input-card content-window-card" ref="infoBox" v-if="infoBoxData" v-show="infoBoxData">
 | 
	
		
			
				|  |  | -      <div style="padding:7px 0px 0px 0px;">
 | 
	
		
			
				|  |  | -        <h4>{{infoBoxData.properties.name}}</h4>
 | 
	
		
			
				|  |  | +    <div
 | 
	
		
			
				|  |  | +      class="input-card content-window-card"
 | 
	
		
			
				|  |  | +      ref="infoBox"
 | 
	
		
			
				|  |  | +      v-if="infoBoxData"
 | 
	
		
			
				|  |  | +      v-show="infoBoxData"
 | 
	
		
			
				|  |  | +    >
 | 
	
		
			
				|  |  | +      <div style="padding: 7px 0px 0px 0px">
 | 
	
		
			
				|  |  | +        <h4>{{ infoBoxData.properties.name }}</h4>
 | 
	
		
			
				|  |  |          <p class="input-item">完成率: {{ infoBoxData.baseItem.完成率 }}%</p>
 | 
	
		
			
				|  |  | -        <p class="input-item">移栽面积 {{ infoBoxData.baseItem.面积 }}平方米 移栽数量 {{ infoBoxData.baseItem.已种植 }}</p>
 | 
	
		
			
				|  |  | +        <p class="input-item">
 | 
	
		
			
				|  |  | +          移栽面积 {{ infoBoxData.baseItem.面积 }}平方米 移栽数量
 | 
	
		
			
				|  |  | +          {{ infoBoxData.baseItem.已种植 }}
 | 
	
		
			
				|  |  | +        </p>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |      <div id="container" class="g-bg1"></div>
 | 
	
	
		
			
				|  | @@ -25,7 +33,7 @@ export default {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    computed: {},
 | 
	
		
			
				|  |  | -  async created() { },
 | 
	
		
			
				|  |  | +  async created() {},
 | 
	
		
			
				|  |  |    mounted() {
 | 
	
		
			
				|  |  |      this.initAMap()
 | 
	
		
			
				|  |  |    },
 | 
	
	
		
			
				|  | @@ -36,15 +44,15 @@ export default {
 | 
	
		
			
				|  |  |      async initAMap() {
 | 
	
		
			
				|  |  |        const vm = this
 | 
	
		
			
				|  |  |        let infoWindow
 | 
	
		
			
				|  |  | -      //在指定位置打开信息窗体
 | 
	
		
			
				|  |  | +      // 在指定位置打开信息窗体
 | 
	
		
			
				|  |  |        function openInfo() {
 | 
	
		
			
				|  |  |          const item = vm.infoBoxData
 | 
	
		
			
				|  |  |          const { center } = item.properties
 | 
	
		
			
				|  |  |          infoWindow = new AMap.InfoWindow({
 | 
	
		
			
				|  |  |            content: vm.$refs.infoBox,
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        infoWindow.open(map, center || map.getCenter());
 | 
	
		
			
				|  |  | +        infoWindow.open(map, center || map.getCenter())
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        window._AMapSecurityConfig = {
 | 
	
		
			
				|  |  |          securityJsCode: `a2017cdc059be6c03b430a3185098003`,
 | 
	
	
		
			
				|  | @@ -134,9 +142,13 @@ export default {
 | 
	
		
			
				|  |  |            window.map.setFeatures([`point`]) // 单一种类要素显示
 | 
	
		
			
				|  |  |            const baseList = await this.$http.get(`/api/base`)
 | 
	
		
			
				|  |  |            let list = mapOfTongren.features.map((item) => {
 | 
	
		
			
				|  |  | -            const baseItem = baseList.find((baseItem) => String(baseItem.区域编码) === String(item.properties.adcode)) || {}
 | 
	
		
			
				|  |  | +            const baseItem =
 | 
	
		
			
				|  |  | +              baseList.find(
 | 
	
		
			
				|  |  | +                (baseItem) =>
 | 
	
		
			
				|  |  | +                  String(baseItem.名称) === String(item.properties.name)
 | 
	
		
			
				|  |  | +              ) || {}
 | 
	
		
			
				|  |  |              item.baseItem = baseItem
 | 
	
		
			
				|  |  | -            return item 
 | 
	
		
			
				|  |  | +            return item
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  |            list.forEach((item) => {
 | 
	
		
			
				|  |  |              addPolygon(item)
 |