list.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <div>
  3. <!-- <BSTList v-if="type==1"/>
  4. <HXYList v-else-if="type==2"/> -->
  5. </div>
  6. </template>
  7. <script>
  8. // import BSTList from '@/views/leadMatch/roomList/BSTlist';
  9. // import HXYList from '@/views/leadMatch/roomList/HXYlist';
  10. export default {
  11. data(){
  12. return{
  13. type:null //1倍思特 2华信源
  14. }
  15. },
  16. beforeRouteEnter(to,form,next){
  17. console.log(to);
  18. if(to.query.version==0||to.query.version==1){
  19. next('/cms/leadMatch/roomList/BSTlist');
  20. }else if(to.query.version == 2){
  21. next('/cms/leadMatch/roomList/HXYlist')
  22. }else{
  23. next('/cms/leadMatch/roomList/BSTlist');
  24. }
  25. }
  26. // created(){
  27. // this.axios.post('/api/get_cut_order_type').then(res=>{
  28. // this.type = res.data;
  29. // })
  30. // },
  31. // beforeRouteLeave(to, from, next) {
  32. // if (
  33. // to.path == "/cms/leadMatch/roomList/HXYedit" ||
  34. // to.path == "/cms/leadMatch/roomList/BSTedit"
  35. // ) {
  36. // from.meta.keepAlive = false;
  37. // next();
  38. // } else {
  39. // localStorage.removeItem("list");
  40. // localStorage.removeItem("pageSize");
  41. // localStorage.removeItem("pageIndex");
  42. // localStorage.removeItem("searchList");
  43. // from.meta.keepAlive = false;
  44. // next();
  45. // }
  46. // },
  47. // components:{
  48. // BSTList,
  49. // HXYList
  50. // }
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. </style>