首页 > 代码库 > 给echart初始化的dom节点绑定时间获取点击的值渲染省市区

给echart初始化的dom节点绑定时间获取点击的值渲染省市区

this.drawMap().on(‘click‘, function (params) {				
		            var province = params.name;
		             that.mapStatus = province;
		           if(province=="北京"||province=="天津"||province=="长春"||province=="长沙"||province=="杭州"||province=="昆明"||province=="成都"){
		           		  that.showProvince(province);
							
		           		 
		           		  console.log(that.mapStatus)
		           }else if(province.indexOf("区")!=-1){
		           		alert(province)
		           }
		          else{
		           	that.$notify({
				          title: ‘警告‘,
				          message: ‘此区域暂无数据,换个区域尝试一下‘,
				          type: ‘warning‘,
				          top:100
				        });		           
		          }		            
		        });	

  

给echart初始化的dom节点绑定时间获取点击的值渲染省市区