Vue.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>Document</title>
  8. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  9. <link rel="stylesheet" href="main.css">
  10. <link rel="stylesheet" href="reset.css">
  11. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp"
  12. crossorigin="anonymous">
  13. </head>
  14. <body class="color__grey">
  15. <div id='app'>
  16. <nav class="navbar navbar-dark sticky-top flex-md-nowrap p-2">
  17. <a class="navbar-brand col-sm-3 col-md-2 mr-0" href="#">行銷日曆</a>
  18. </nav>
  19. <div class="container-fluid">
  20. <div class="row">
  21. <nav class="col-md-2 d-none d-md-block bg-light sidebar">
  22. <div class="sidebar-sticky">
  23. <ul class="nav flex-column">
  24. <li class="nav-item">
  25. <a class="nav-link" href="#">
  26. <i class="fas fa-comment-dots"></i>
  27. 近一季行銷建議
  28. </a>
  29. </li>
  30. <li class="nav-item">
  31. <a class="nav-link" href="#">
  32. <i class="fas fa-users"></i>
  33. 客群瀏覽
  34. </a>
  35. </li>
  36. <li class="nav-item">
  37. <a class="nav-link" href="#">
  38. <i class="fas fa-quote-left"></i>
  39. 關鍵字建議
  40. </a>
  41. </li>
  42. </ul>
  43. </div>
  44. </nav>
  45. <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
  46. <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pb-2 mb-3">
  47. <h1 class="h2">近一季行銷建議</h1>
  48. <div class="d-flex">
  49. <span>季數</span>
  50. <select class="custom-select" v-model='selected'>
  51. <option value="0">Q1</option>
  52. <option value="1">Q2</option>
  53. <option value="2">Q3</option>
  54. <option value="3">Q4</option>
  55. </select>
  56. </div>
  57. </div>
  58. <div class="table-responsive mb-3" v-for="(month, i) in month" :key="i" v-if='selected == i'>
  59. <table class="table">
  60. <thead>
  61. <tr>
  62. <td>客群</td>
  63. <th scope="col" width='320'>{{ month[0] }}</th>
  64. <th scope="col" width='320'>{{ month[1] }}</th>
  65. <th scope="col" width='320'>{{ month[2] }}</th>
  66. </tr>
  67. </thead>
  68. <tbody>
  69. <tr v-for="(item ,k) in user_groups">
  70. <th>客群-{{ item.group_chinese_name }}</th>
  71. <td v-for="t in item.trends[i]">
  72. <button type="button" class="btn__kw" data-toggle="modal" data-target="#exampleModalCenter" @click.prevent="showModal(item.suggests)">關鍵字</button>
  73. <div class="highTrend dark-1 p-2 mt-2" v-if="check(t.times, item)">Popular</div>
  74. </td>
  75. </tr>
  76. </tbody>
  77. </table>
  78. </div>
  79. </main>
  80. </div>
  81. </div>
  82. <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenter" aria-hidden="true">
  83. <div class="modal-dialog modal-dialog-centered" role="document">
  84. <div class="modal-content">
  85. <div class="modal-header border-0">
  86. <h5 class="modal-title" id="exampleModalLongTitle">關鍵字群</h5>
  87. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  88. <span aria-hidden="true">&times;</span>
  89. </button>
  90. </div>
  91. <div class="modal-body">
  92. <div>
  93. <template v-for="word in tempkeywords">
  94. <span class="badge badge-warning">{{ word }}</span>
  95. </template>
  96. </div>
  97. </div>
  98. <div class="modal-footer border-0">
  99. <button type="button" class="btn btn-secondary" data-dismiss="modal">關閉</button>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. <!-- <footer class="footer text-center p-4 bg-white">
  106. <div class="text-muted"> © 2021 Copyright: Googo Website Traffic</div>
  107. </footer> -->
  108. <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  109. <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
  110. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
  111. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  112. <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.16/vue.js"></script>
  113. <script src="vuedata.js"></script>
  114. </body>
  115. </html>