newEvacuationBigPage.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. console.log('type',type)
  37. console.log('data',data)
  38. if(type == 1){
  39. if(this.$route.query.buildId){
  40. delete this.$route.query.buildId;
  41. }
  42. if(this.$route.query.subId){
  43. delete this.$route.query.subId;
  44. }
  45. if(this.$route.query.floorId){
  46. delete this.$route.query.floorId;
  47. }
  48. if(this.$route.query.groupId){
  49. delete this.$route.query.groupId;
  50. }
  51. this.$set(this,'propsBigData',null);
  52. this.$set(this,'pageType',type);
  53. } else if(type == 2){
  54. this.$set(this,'propsBigData',data);
  55. this.$set(this,'pageType',type);
  56. }
  57. },
  58. },
  59. }
  60. </script>
  61. <style scoped lang="scss">
  62. .newPerformEvacuation{
  63. flex:1;
  64. display: flex;
  65. flex-direction: column;
  66. margin:5px 20px 20px 10px;
  67. box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
  68. border-radius:10px;
  69. }
  70. </style>