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:{
220 source: 2,
221 bsm:item.bsm,
222 auth:this.$route.query.auth ? this.$route.query.auth :'0,1,2'
223 }
224 });
225 }else if(item.type == 'zrz'){
226 this.$store.state.zrzbsm = item.bsm; 219 this.$store.state.zrzbsm = item.bsm;
227 this.$router.push({ 220 break;
228 path: '/'+item.type, 221 case 'dz':
229 query:{
230 source: 2,
231 bsm:item.bsm,
232 auth:this.$route.query.auth ? this.$route.query.auth :'0,1,2'
233 }
234 });
235 }else if(item.type == 'dz'){
236 this.$store.state.dzbsm = item.bsm; 222 this.$store.state.dzbsm = item.bsm;
223 break;
224 case 'gzw':
225 this.$store.state.gzwbsm = item.bsm;
226 break;
227
228 default:
229 break;
230 }
231
232 if(item.type){
237 this.$router.push({ 233 this.$router.push({
238 path: '/'+item.type, 234 path: '/'+item.type,
239 query:{ 235 query:{
......