club-board.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <view class="container clearfix">
  3. <tui-skeleton
  4. v-if="!skeletonShow"
  5. backgroundColor="#fafafa"
  6. borderRadius="10rpx"
  7. :isLoading="true"
  8. :loadingType="5"
  9. />
  10. <template v-else>
  11. <view class="charts-content">
  12. <!-- 机构活跃统计 -->
  13. <view class="charts-box charts-box0" id="charts-box0">
  14. <echart-active
  15. ref="echart-active"
  16. :portraitMap="portraitMap"
  17. v-if="skeletonShow"
  18. />
  19. </view>
  20. <!-- 机构填写咨询记录统计 -->
  21. <view class="charts-box charts-box1" id="charts-box1">
  22. <echart-consult
  23. ref="echart-consult"
  24. :remark="remark"
  25. v-if="skeletonShow"
  26. />
  27. </view>
  28. </view>
  29. </template>
  30. </view>
  31. </template>
  32. <script>
  33. import { mapState, mapMutations } from 'vuex'
  34. import { debounce } from '@/common/config/common.js'
  35. import echartActive from './components/echart-active'
  36. import echartConsult from './components/echart-consult'
  37. import chartMixin from './components/mixins/chart.mixin.js'
  38. const observers = {}
  39. export default {
  40. mixins: [chartMixin],
  41. components: {
  42. echartActive,
  43. echartConsult,
  44. },
  45. data() {
  46. return {
  47. skeletonShow: false,
  48. remark: [],
  49. portraitMap: [],
  50. }
  51. },
  52. onLoad(option) {
  53. this.getLivelyClub()
  54. },
  55. onReady() {
  56. },
  57. methods: {
  58. async getLivelyClub() {
  59. try{
  60. const userInfo = await this.$api.getStorage()
  61. const { data: data } = await this.SellerService.getLivelyClub({ spId: userInfo.serviceProviderId })
  62. this.portraitMap = data.portraitMap
  63. this.remark = data.remark
  64. setTimeout(() => {
  65. this.skeletonShow = true
  66. }, 1000)
  67. }catch(error){
  68. //TODO handle the exception
  69. console.log('error',error)
  70. }
  71. },
  72. },
  73. onShow() {}
  74. }
  75. </script>
  76. <style lang="scss">
  77. page {
  78. background-color: #f5f5f5 !important;
  79. }
  80. .container {
  81. width: 100%;
  82. height: auto;
  83. box-sizing: border-box;
  84. padding: 24rpx;
  85. }
  86. .charts-navbar {
  87. width: 100%;
  88. height: 90rpx;
  89. background-color: #ffffff;
  90. box-sizing: border-box;
  91. padding: 20rpx 0;
  92. display: flex;
  93. position: fixed;
  94. top: 0;
  95. left: 0;
  96. z-index: 9999999;
  97. .nav-item {
  98. display: flex;
  99. flex: 1;
  100. justify-content: center;
  101. align-items: center;
  102. height: 50rpx;
  103. font-size: $font-size-28;
  104. color: $text-color;
  105. position: relative;
  106. float: left;
  107. position: relative;
  108. .line {
  109. width: 60rpx;
  110. height: 2px;
  111. border-radius: 1px;
  112. background: #ffffff;
  113. position: absolute;
  114. bottom: 0;
  115. left: 50%;
  116. margin-left: -30rpx;
  117. }
  118. &.current {
  119. color: $color-system;
  120. .line {
  121. background: $color-system;
  122. }
  123. }
  124. }
  125. }
  126. .charts-content {
  127. width: 100%;
  128. height: auto;
  129. }
  130. .charts-box {
  131. width: 100%;
  132. min-height: 350rpx;
  133. box-sizing: border-box;
  134. padding: 34rpx 24rpx;
  135. background-color: #fff;
  136. margin-bottom: 32rpx;
  137. border-radius: 16rpx;
  138. float: left;
  139. .echart-content {
  140. width: 100%;
  141. .echart-title {
  142. width: 100%;
  143. height: 96rpx;
  144. float: left;
  145. box-sizing: border-box;
  146. .e-name {
  147. float: left;
  148. line-height: 56rpx;
  149. font-size: 30rpx;
  150. color: #333;
  151. }
  152. .e-more {
  153. float: right;
  154. line-height: 56rpx;
  155. font-size: 28rpx;
  156. color: #999999;
  157. }
  158. }
  159. .echart-main {
  160. width: 100%;
  161. min-height: 200rpx;
  162. box-sizing: border-box;
  163. padding: 32rpx 40rpx;
  164. position: relative;
  165. float: left;
  166. background-color: #f7f7f7;
  167. .echart-text {
  168. width: 100%;
  169. line-height: 40rpx;
  170. margin-bottom: 20rpx;
  171. font-size: 28rpx;
  172. color: #333;
  173. float: left;
  174. .label {
  175. color: #999;
  176. text-align-last: justify;
  177. }
  178. }
  179. .echart-next {
  180. width: 100rpx;
  181. height: 100%;
  182. position: absolute;
  183. right: 10rpx;
  184. top: 50%;
  185. font-size: 28rpx;
  186. color: #1890f9;
  187. }
  188. }
  189. .echart-mains {
  190. width: 100%;
  191. min-height: 450rpx;
  192. float: left;
  193. &.demand{
  194. min-height: 200rpx;
  195. }
  196. .echart-mains-none {
  197. width: 100%;
  198. height: 100%;
  199. display: flex;
  200. align-items: center;
  201. justify-content: center;
  202. flex-direction: column;
  203. .none-image {
  204. width: 220rpx;
  205. height: 220rpx;
  206. margin-bottom: 20rpx;
  207. }
  208. .none-text {
  209. font-size: $font-size-28;
  210. color: #999999;
  211. line-height: 44rpx;
  212. }
  213. }
  214. }
  215. }
  216. }
  217. </style>