newEvacuationBigPage.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <div class="newEvacuationBigPage">
  3. <new-evacuation-big-data-home
  4. v-if="pageType == 1">
  5. </new-evacuation-big-data-home>
  6. <emergency-evacuation-big
  7. :propsBigData="propsBigData"
  8. v-if="pageType == 2">
  9. </emergency-evacuation-big>
  10. </div>
  11. </template>
  12. <script>
  13. import emergencyEvacuationBig from "@/views/newEvacuationBigData.vue"
  14. import newEvacuationBigDataHome from "@/views/newEvacuationBigDataHome.vue"
  15. export default {
  16. name: 'newEvacuationBigPage',
  17. components: {
  18. newEvacuationBigDataHome,
  19. emergencyEvacuationBig,
  20. },
  21. data() {
  22. return {
  23. pageType:null,
  24. propsBigData:null,
  25. }
  26. },
  27. created() {
  28. if(this.$route.query.subId){
  29. this.$set(this,'pageType',2);
  30. }else{
  31. this.$set(this,'pageType',1);
  32. }
  33. },
  34. methods:{
  35. goPage(type,data){
  36. if(type == 1){
  37. if(this.$route.query.buildId){
  38. delete this.$route.query.buildId;
  39. }
  40. if(this.$route.query.subId){
  41. delete this.$route.query.subId;
  42. }
  43. if(this.$route.query.floorId){
  44. delete this.$route.query.floorId;
  45. }
  46. if(this.$route.query.groupId){
  47. delete this.$route.query.groupId;
  48. }
  49. this.$set(this,'propsBigData',null);
  50. this.$set(this,'pageType',type);
  51. } else if(type == 2){
  52. this.$set(this,'propsBigData',data);
  53. this.$set(this,'pageType',type);
  54. }
  55. },
  56. },
  57. }
  58. </script>
  59. <style scoped lang="scss">
  60. .newPerformEvacuation{
  61. flex:1;
  62. display: flex;
  63. flex-direction: column;
  64. margin:5px 20px 20px 10px;
  65. box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
  66. border-radius:10px;
  67. }
  68. </style>