HomeView.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <div class="home">
  3. <!-- 头部 -->
  4. <header-top>
  5. <span slot="Bigtitle">缙云县疫情防控服务</span>
  6. </header-top>
  7. <!-- 主体 -->
  8. <div class="context">
  9. <!-- 导航 -->
  10. <nav-bar></nav-bar>
  11. <!-- 疫情服务数据 -->
  12. <covid-serve></covid-serve>
  13. <!-- 分页 -->
  14. <van-tabs v-model="active" background="#F7F7F7" line-width="32px">
  15. <van-tab title="今日专报">
  16. <div class="jrzb">
  17. <img class="jrzbimg" src="../assets/image/index/位图.png" alt="" />
  18. </div>
  19. </van-tab>
  20. <van-tab title="最新文件">
  21. <card :poicefilelist="poicefilelist"></card>
  22. </van-tab>
  23. <van-tab title="中高风险地区">
  24. <!-- 风险地区搜索 -->
  25. <!-- 搜索框 -->
  26. <div class="sickarea">
  27. <div class="search">
  28. <van-search
  29. v-model="value"
  30. placeholder="请输入搜索关键词"
  31. @search=""
  32. >
  33. </van-search>
  34. <van-button @click="" type="info">搜索</van-button>
  35. </div>
  36. </div>
  37. <!-- 中高风险地区切换TAP -->
  38. <tap-item></tap-item>
  39. </van-tab>
  40. </van-tabs>
  41. </div>
  42. </div>
  43. </template>
  44. <script>
  45. // 导入 header组件
  46. import HeaderTop from "../components/header/header.vue";
  47. // 导入navbar
  48. import NavBar from "../components/navbar/navbar.vue";
  49. // 导入缙云县疫情服务
  50. import CovidServe from "../components/covidserve/CovidServe.vue";
  51. // 导入 最新文件 循环组件
  52. import Card from '@/components/carditem/card.vue';
  53. // 导入 中高风险地区切换tap
  54. import TapItem from "../components/Tapitem/TapItem.vue"
  55. import { getpoicefile } from "../network/poicefile"
  56. export default {
  57. name: "index",
  58. components: {
  59. HeaderTop,
  60. NavBar,
  61. CovidServe,
  62. TapItem,
  63. Card
  64. },
  65. data() {
  66. return {
  67. // 搜索属性
  68. value: " ",
  69. active: 0,
  70. poicefilelist:[]
  71. };
  72. },
  73. created(){
  74. this.getpoicefile();
  75. },
  76. methods: {
  77. // 搜索方法
  78. // onSearch() {},
  79. getpoicefile() {
  80. getpoicefile("", 0, 1).then((res) => {
  81. console.log(res);
  82. this.poicefilelist.push(...res.data.data);
  83. console.log("file+" + this.poicefilelist);
  84. });
  85. },
  86. }
  87. }
  88. </script>
  89. <style scoped>
  90. .context {
  91. width: 90%;
  92. margin: 0 auto;
  93. }
  94. .jrzbimg {
  95. width: 100%;
  96. }
  97. .jrzb {
  98. margin-top: 3vw;
  99. }
  100. /* button */
  101. .van-button {
  102. height: 32px;
  103. width: 20%;
  104. }
  105. /* tab切换标签 */
  106. /deep/ .van-tabs__line {
  107. background-color: #1677ff;
  108. }
  109. .span.van-tab__text.van-tab__text--ellipsis {
  110. font-size: 16px;
  111. }
  112. /deep/.van-tabs__nav--line {
  113. width: 100%;
  114. }
  115. /deep/.van-tab {
  116. color: rgb(51, 51, 51);
  117. font-size: 16px;
  118. font-weight: bold;
  119. }
  120. /* 搜索框
  121. */
  122. .search {
  123. display: flex;
  124. justify-content: space-evenly;
  125. padding-top: 2vw;
  126. margin-bottom: 5vw;
  127. }
  128. .van-search {
  129. padding: 0px;
  130. width: 80%;
  131. margin-right: 2vw;
  132. background-color: rgba(255, 255, 255, 1);
  133. border: 1px solid rgba(237, 237, 237, 1);
  134. border-radius: 1vw;
  135. }
  136. .van-search .van-cell {
  137. padding: 1px;
  138. }
  139. .van-search__content {
  140. background-color: rgba(255, 255, 255, 1);
  141. }
  142. .van-cell {
  143. font-size: 16px;
  144. line-height: 32px;
  145. height: 32px;
  146. }
  147. /* button */
  148. .van-button {
  149. height: 32px;
  150. width: 20%;
  151. }
  152. </style>