newPerformEvacuation.vue 2.1 KB

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