8150e0cf by 杨威

目录树双击事件优化

1 parent 6f5f101c
......@@ -211,29 +211,25 @@ export default {
dbclick(item,bsm) {
clearTimeout(this.time);
this.$store.state.newZdbsm = bsm;
//此处不要将$router移到if的外面,因为可能是双击行政区,就不知道去哪儿了
if (item.type == 'zd') {
switch (item.type) {
case 'zd':
this.$store.state.zdbsm = item.bsm;
this.$router.push({
path: '/'+item.type,
query:{
source: 2,
bsm:item.bsm,
auth:this.$route.query.auth ? this.$route.query.auth :'0,1,2'
}
});
}else if(item.type == 'zrz'){
break;
case 'zrz':
this.$store.state.zrzbsm = item.bsm;
this.$router.push({
path: '/'+item.type,
query:{
source: 2,
bsm:item.bsm,
auth:this.$route.query.auth ? this.$route.query.auth :'0,1,2'
}
});
}else if(item.type == 'dz'){
break;
case 'dz':
this.$store.state.dzbsm = item.bsm;
break;
case 'gzw':
this.$store.state.gzwbsm = item.bsm;
break;
default:
break;
}
if(item.type){
this.$router.push({
path: '/'+item.type,
query:{
......