index.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <template>
  2. <view class="container">
  3. <!-- 上层部分 -->
  4. <view class="top-bg">
  5. <view class="top-title">靖安县乡村民宿</view>
  6. <!-- 具体数据 -->
  7. <view class="top-list-bg">
  8. <view class="minsuxinsi" v-for="(item,index) in minsu" :key="index">
  9. <view class="list-num">{{item.num}}</view>
  10. <view class="list-txt">{{item.name}}</view>
  11. </view>
  12. </view>
  13. </view>
  14. <!-- 订单状态占比图 -->
  15. <uni-section title="订单状态占比" type="line">
  16. <dingdanzhuangtai class="echarts">
  17. </dingdanzhuangtai>
  18. </uni-section>
  19. <!-- 民宿统计图 -->
  20. <uni-section title="民宿统计" type="line">
  21. <minsutongji class="echarts2">
  22. </minsutongji>
  23. </uni-section>
  24. <!-- 访问量趋势图 -->
  25. <uni-section title="访问量趋势" type="line">
  26. <!-- 切换 -->
  27. <view class="qiehuankuang">
  28. <view :class="{'xuanzhong':xuanzhong==true,'list':xuanzhong==false}">今日</view>
  29. <view class="list">本周</view>
  30. <view class="list">本月</view>
  31. <view class="list">本年</view>
  32. </view>
  33. <fangwenliang class="echarts3">
  34. </fangwenliang>
  35. </uni-section>
  36. <!-- 性别占比图 -->
  37. <uni-section title="性别占比" type="line">
  38. <!-- 切换 -->
  39. <view class="qiehuankuang">
  40. <view :class="{'xuanzhong3':xuanzhong==true,'list3':xuanzhong==false}">今天</view>
  41. <view class="list3">本月</view>
  42. <view class="list3">本年</view>
  43. </view>
  44. <xingbiezhanbi class="echarts4">
  45. </xingbiezhanbi>
  46. </uni-section>
  47. <!-- 年龄占比图 -->
  48. <uni-section title="年龄占比" type="line">
  49. <!-- 切换 -->
  50. <view class="qiehuankuang">
  51. <view :class="{'xuanzhong3':xuanzhong==true,'list3':xuanzhong==false}">今天</view>
  52. <view class="list3">本月</view>
  53. <view class="list3">本年</view>
  54. </view>
  55. <nianlingzhanbi class="echarts5">
  56. </nianlingzhanbi>
  57. </uni-section>
  58. <!-- 订单量排行 -->
  59. <view class="dingdan">
  60. <!-- 订单量排行图 -->
  61. <uni-section title="订单量排行" type="line">
  62. <!-- 切换 -->
  63. <view class="qiehuankuang">
  64. <view :class="{'xuanzhong3':xuanzhong==true,'list3':xuanzhong==false}">今天</view>
  65. <view class="list3">本月</view>
  66. <view class="list3">本年</view>
  67. </view>
  68. <dingdanliang class="dingdanliang">
  69. </dingdanliang>
  70. </uni-section>
  71. <view style="width:100%;height:20px"></view>
  72. <!-- 销售额排行图 -->
  73. <uni-section title="销售额排行" type="line">
  74. <!-- 切换 -->
  75. <view class="qiehuankuang">
  76. <view :class="{'xuanzhong3':xuanzhong==true,'list3':xuanzhong==false}">今天</view>
  77. <view class="list3">本月</view>
  78. <view class="list3">本年</view>
  79. </view>
  80. <xiaoshoue class="xiaoshoue">
  81. </xiaoshoue>
  82. </uni-section>
  83. </view>
  84. </view>
  85. </template>
  86. <script>
  87. import dingdanzhuangtai from '@/components/echarts/dingdanzhuangtai.vue'
  88. import minsutongji from '@/components/echarts/minsutongji.vue'
  89. import fangwenliang from '@/components/echarts/fangwenliang.vue'
  90. import xingbiezhanbi from '@/components/echarts/xingbiezhanbi.vue'
  91. import nianlingzhanbi from '@/components/echarts/nianlingzhanbi.vue'
  92. import dingdanliang from '@/components/liebiao/dingdanliang.vue'
  93. import xiaoshoue from '@/components/liebiao/xiaoshoue.vue'
  94. export default {
  95. components:{
  96. dingdanzhuangtai,
  97. minsutongji,
  98. fangwenliang,
  99. xingbiezhanbi,
  100. nianlingzhanbi,
  101. dingdanliang,
  102. xiaoshoue
  103. },
  104. data() {
  105. return {
  106. minsu:[
  107. {num:68,name:'民宿'},
  108. {num:38,name:'今日访问量'},
  109. {num:20,name:'今日销售额'},
  110. {num:30,name:'今日订单量'},
  111. ],//民宿信息
  112. xuanzhong:true,
  113. }
  114. },
  115. methods: {
  116. }
  117. }
  118. </script>
  119. <style lang="scss" scoped>
  120. .container {
  121. width:100%;
  122. font-size: 14px;
  123. line-height: 24px;
  124. overflow-x:hidden;
  125. }
  126. /* 上层 */
  127. .top-bg{
  128. height:200px;
  129. width:100%;
  130. background:linear-gradient(-61.2185deg, rgb(75, 152, 237) 0%, rgb(72, 198, 239) 100%);;
  131. }
  132. .top-title{
  133. color:#FFFFFF;
  134. font-size:18px;
  135. padding-top:30px;
  136. text-align:center;
  137. }
  138. /* 具体数据 */
  139. .top-list-bg{
  140. width:90%;
  141. height:80px;
  142. background:#FFFFFF;
  143. margin:30px 0 0 20px;
  144. border-radius:5px;
  145. display:flex;
  146. }
  147. .minsuxinsi{
  148. position: relative;
  149. // margin-top: 328rpx;
  150. display: inline-block;
  151. width:25%;
  152. text-align: center;
  153. font-size:24rpx;
  154. }
  155. .list-num{
  156. color:rgb(77, 139, 255);
  157. margin-top: 10px;
  158. }
  159. .list-txt{
  160. margin-top: 5px;
  161. color:rgb(51, 51, 51);
  162. }
  163. // uni-section样式
  164. .uni-section[data-v-f7ca1098] {
  165. background-color: #fff;
  166. margin-top: 20px;
  167. height:280px;
  168. }
  169. .uni-section .uni-section-header__content[data-v-f7ca1098] {
  170. display: flex;
  171. flex-direction: column;
  172. flex: 1;
  173. color: #333;
  174. font-weight: 700;
  175. }
  176. // >>>.uni-section .uni-section-header__content[data-v-f7ca1098] {
  177. // display: flex;
  178. // flex-direction: column;
  179. // flex: 1;
  180. // color: #333;
  181. // font-weight: 700;
  182. // }
  183. // 订单状态图
  184. .echarts{
  185. width:100%;
  186. height:200px;
  187. }
  188. //民宿统计图
  189. .echarts2{
  190. width:100%;
  191. height:280px;
  192. }
  193. //访问量趋势图
  194. .qiehuankuang{
  195. width:225px;
  196. height:30px;
  197. margin:-30px 0 0 160px;
  198. line-height:30px;
  199. display: flex;
  200. font-size:28rpx;
  201. }
  202. .list{
  203. width:25%;
  204. height:100%;
  205. border:1px solid rgba(175, 175, 175, 0.7);
  206. text-align:center;
  207. color: rgb(119, 119, 119)
  208. }
  209. .xuanzhong{
  210. width:25%;
  211. height:100%;
  212. border:1px solid rgb(128, 128, 255);
  213. text-align:center;
  214. background-color:rgb(128, 128, 255);
  215. color:#FFFFFF;
  216. }
  217. // 三等份
  218. .list3{
  219. width:33%;
  220. height:100%;
  221. border:1px solid rgba(175, 175, 175, 0.7);
  222. text-align:center;
  223. color: rgb(119, 119, 119)
  224. }
  225. .xuanzhong3{
  226. width:33%;
  227. height:100%;
  228. border:1px solid rgb(128, 128, 255);
  229. text-align:center;
  230. background-color:rgb(128, 128, 255);
  231. color:#FFFFFF;
  232. }
  233. .echarts3{
  234. width:100%;
  235. height:230px;
  236. }
  237. //性别占比图
  238. .echarts4{
  239. width:100%;
  240. height:230px;
  241. }
  242. //年龄占比图
  243. .echarts5{
  244. width:100%;
  245. height:230px;
  246. }
  247. // 订单量排行
  248. .dingdan{
  249. background-color: #fff;
  250. margin-top: 20px;
  251. height:150%;
  252. }
  253. //订单量排行图
  254. .dingdanliang{
  255. width:100%;
  256. height:100%;
  257. margin-top:10px;
  258. }
  259. // 销售额排行图
  260. .xiaoshoue{
  261. width:100%;
  262. height:100%;
  263. margin-top:10px;
  264. }
  265. </style>