8150e0cf by 杨威

目录树双击事件优化

1 parent 6f5f101c
...@@ -211,29 +211,25 @@ export default { ...@@ -211,29 +211,25 @@ export default {
211 dbclick(item,bsm) { 211 dbclick(item,bsm) {
212 clearTimeout(this.time); 212 clearTimeout(this.time);
213 this.$store.state.newZdbsm = bsm; 213 this.$store.state.newZdbsm = bsm;
214 //此处不要将$router移到if的外面,因为可能是双击行政区,就不知道去哪儿了 214 switch (item.type) {
215 if (item.type == 'zd') { 215 case 'zd':
216 this.$store.state.zdbsm = item.bsm; 216 this.$store.state.zdbsm = item.bsm;
217 this.$router.push({ 217 break;
218 path: '/'+item.type, 218 case 'zrz':
219 query:{ 219 this.$store.state.zrzbsm = item.bsm;
220 source: 2, 220 break;
221 bsm:item.bsm, 221 case 'dz':
222 auth:this.$route.query.auth ? this.$route.query.auth :'0,1,2' 222 this.$store.state.dzbsm = item.bsm;
223 } 223 break;
224 }); 224 case 'gzw':
225 }else if(item.type == 'zrz'){ 225 this.$store.state.gzwbsm = item.bsm;
226 this.$store.state.zrzbsm = item.bsm; 226 break;
227 this.$router.push({ 227
228 path: '/'+item.type, 228 default:
229 query:{ 229 break;
230 source: 2, 230 }
231 bsm:item.bsm, 231
232 auth:this.$route.query.auth ? this.$route.query.auth :'0,1,2' 232 if(item.type){
233 }
234 });
235 }else if(item.type == 'dz'){
236 this.$store.state.dzbsm = item.bsm;
237 this.$router.push({ 233 this.$router.push({
238 path: '/'+item.type, 234 path: '/'+item.type,
239 query:{ 235 query:{
......