index.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <div class="parimaryExhibtion" :class="{daolanactive:isShow}">
  3. <div class="p-title">
  4. <span>{{current.name}}</span>
  5. </div>
  6. <div class="cad-con"></div>
  7. <ul class="exhi-list">
  8. <li @click="handleItem(item)" v-for="(item,i) in list" :key="i">
  9. {{item.name}}
  10. </li>
  11. </ul>
  12. <div class="daolan" @click="isShow = !isShow ">
  13. <img :src="require('@/assets/images/icon/daolan.png')">
  14. <span>{{isShow?'收起':'展开'}}导览</span>
  15. </div>
  16. </div>
  17. </template>
  18. <script>
  19. export default {
  20. data(){
  21. return{
  22. isShow:true,
  23. list:[
  24. {
  25. id:1,
  26. name:'第一展区 序厅',
  27. pano:"a07c10e319da4914b24158a4baabe748"
  28. },
  29. {
  30. id:2,
  31. name:'第二展区 历史沿革厅',
  32. pano:"22fa6c2e5ed14c14b7f287a0a70b33ae"
  33. },
  34. {
  35. id:3,
  36. name:'第三展区 亲切关怀厅',
  37. pano:'f12d8cf609bb483a80a715a607a1082e'
  38. },
  39. {
  40. id:4,
  41. name:'第四展区 光辉历程厅',
  42. pano:"8857354a3b0e4d748f8b7633be25188f"
  43. },
  44. {
  45. id:5,
  46. name:'第五展区 将星闪耀厅',
  47. pano:"b023f9d4040d4afca849e504f190bef2"
  48. },
  49. {
  50. id:6,
  51. name:'第六展区 丰碑永铸厅',
  52. pano:"ec42a909a05744da85fd0b5d0da6bb19"
  53. }
  54. ],
  55. current:{
  56. id:1,
  57. name:'第一展区 序厅',
  58. pano:"a07c10e319da4914b24158a4baabe748"
  59. }
  60. }
  61. },
  62. methods:{
  63. handleItem(item){
  64. this.current = item
  65. item.pano && player.flyToPano({pano:player.model.panos.index[item.pano]})
  66. }
  67. },
  68. watch:{
  69. isShow(newVal){
  70. let css =newVal? '10px':'-310px'
  71. $('.cad').css({right:css})
  72. }
  73. }
  74. }
  75. </script>
  76. <style lang="less" scoped>
  77. .daolanactive{
  78. transform: translateX(0);
  79. .daolan{
  80. >img{
  81. width: 16px;
  82. transform: rotate(0);
  83. margin-bottom: 4px;
  84. }
  85. }
  86. }
  87. </style>