<el-checkbox v-for="(item,index) in checkall" :label="item.id" :key="index" :checked="item.checked" @change="handleCheck">{{item.value}}</el-checkbox>
data(){
return {
checkall:[
{id:0,value:'地下水水位',checked:true},
{id:1,value:'抽/注水井',checked:false},
{id:2,value:'污染源',checked:false},
{id:3,value:'污染羽',checked:false}
]
}
},
methods: {
handleCheck(value,e){
var id=parseInt(e.target.value);
var check=e.target.checked;
switch (id) {
case 0: //地下水水位
if(check==true){
alert("选中");
//mfOlay.setVisible(true);
}else{
alert("取消");
//mfOlay.setVisible(false);
}
break;
case 1: //抽/注水井
break;
case 2: //污染源
break;
case 3: //污染羽
break;
}
}
}
this.$router.push(url);
this.$router.go(0) //用go刷新