index-data.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <template>
  2. <view class="index-data" :style="{ display: SHOW ? 'flex' : 'none' }">
  3. <custom-nav :title="title" noback></custom-nav>
  4. <veiw v-if="logged" class="content">
  5. <view class="total">
  6. <image src="../../static/icon/data-card.png" class="position-center"></image>
  7. <view class="total-text position-center">
  8. <text class="text">累计业绩(元)</text>
  9. <text class="num">35,000元</text>
  10. </view>
  11. </view>
  12. <view class="storage">
  13. <view class="storage-item">
  14. <text class="storage-text">200件</text>
  15. <text class="storage-num">我的库存</text>
  16. </view>
  17. <view class="line"></view>
  18. <view class="storage-item">
  19. <text class="storage-text">100件</text>
  20. <text class="storage-num">下级库存</text>
  21. </view>
  22. </view>
  23. <view class="income">
  24. <view class="nav">
  25. <text class="nav-text">本月营收情况</text>
  26. <text class="nav-more">
  27. <text class="more">更多</text>
  28. <text class="cuIcon-right"></text>
  29. </text>
  30. </view>
  31. <view class="data">
  32. <view class="chart">
  33. <chart-progress :chartData="chartData" width="210" height="210" title="总业绩" :value="'2000元'" />
  34. </view>
  35. <view class="data-nums">
  36. <view class="data-item">
  37. <text class="data-text">本月业绩</text>
  38. <text class="data-num">2,000元</text>
  39. </view>
  40. <view class="data-item">
  41. <text class="data-text">本月业绩</text>
  42. <text class="data-num">2,000元</text>
  43. </view>
  44. <view class="data-item">
  45. <text class="data-text">本月业绩</text>
  46. <text class="data-num">2,000元</text>
  47. </view>
  48. <view class="data-item">
  49. <text class="data-text">本月业绩</text>
  50. <text class="data-num">2,000元</text>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="team">
  56. <view class="nav">
  57. <text class="nav-text">本月新增团队成员</text>
  58. <text class="nav-more">
  59. <text class="more">更多</text>
  60. <text class="cuIcon-right"></text>
  61. </text>
  62. </view>
  63. <view class="data">
  64. <view class="chart">
  65. <chart-progress :chartData="chartData" width="210" height="210" title="总人数" :value="'20人'" />
  66. </view>
  67. <view class="data-nums">
  68. <view class="data-item">
  69. <text class="data-text">新增总数</text>
  70. <text class="data-num">20人</text>
  71. </view>
  72. <view class="data-item">
  73. <text class="data-text">销售主管</text>
  74. <text class="data-num">20人</text>
  75. </view>
  76. <view class="data-item">
  77. <text class="data-text">销售经理</text>
  78. <text class="data-num">20人</text>
  79. </view>
  80. <view class="data-item">
  81. <text class="data-text">直属下级</text>
  82. <text class="data-num">20人</text>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. <view class="rank"></view>
  88. <view class="tabbar"></view>
  89. </veiw>
  90. <view v-else class="login-btn">
  91. <navigator url="../../pages/login-reg/login-reg">登录/注册</navigator>
  92. </view>
  93. </view>
  94. </template>
  95. <script>
  96. import chartProgress from '../charts/chart-progress.vue'
  97. export default {
  98. components: {
  99. chartProgress
  100. },
  101. data() {
  102. return {
  103. title: '数据',
  104. chartData: {
  105. series: [
  106. {
  107. name: '正确率',
  108. data: 0.29,
  109. color: '#F76454'
  110. }
  111. ]
  112. }
  113. }
  114. },
  115. computed: {
  116. SHOW(){ return this.$store.state.app.index_tabbar_index === 1 },
  117. logged() { return this.$store.state.app.token.length === 0 ? false : true }
  118. },
  119. watch: {
  120. SHOW: {
  121. handler(val) {
  122. if (val) {}
  123. },
  124. immediate: true
  125. }
  126. }
  127. }
  128. </script>
  129. <style lang="scss" scoped>
  130. .index-data {
  131. @include page();
  132. .content {
  133. .total {
  134. @include flex();
  135. height: 336rpx;
  136. position: relative;
  137. background: $app-base-bg;
  138. image {
  139. z-index: 0;
  140. width: 706rpx;
  141. height: 316rpx;
  142. }
  143. .total-text {
  144. @include flex(column);
  145. .text {
  146. color: #FFFFFF;
  147. font-size: 32rpx;
  148. }
  149. .num {
  150. color: #FFFFFF;
  151. font-size: 70rpx;
  152. margin-top: 60rpx;
  153. }
  154. }
  155. }
  156. .storage {
  157. height: 160rpx;
  158. background: #FFFFFF;
  159. @include flex();
  160. justify-content: space-between;
  161. .storage-item {
  162. @include flex(column);
  163. flex: 1;
  164. height: 100%;
  165. .storage-text {
  166. font-size: 32rpx;
  167. color: $app-base-color;
  168. }
  169. .storage-num {
  170. font-size: 26rpx;
  171. margin-top: 20rpx;
  172. }
  173. }
  174. .line {
  175. width: 1rpx;
  176. height: 100rpx;
  177. background: #F2F2F2;
  178. }
  179. }
  180. .income, .team {
  181. height: 360rpx;
  182. background: #FFFFFF;
  183. border-top: 10rpx solid $app-base-bg;
  184. .nav {
  185. @include flex();
  186. height: 90rpx;
  187. padding: 0 30rpx;
  188. font-size: 32rpx;
  189. box-sizing: border-box;
  190. justify-content: space-between;
  191. border-bottom: 1rpx solid $app-base-bg;
  192. .nav-more {
  193. color: $app-sec-text-color;
  194. .more {
  195. font-size: 26rpx;
  196. margin-right: 8rpx;
  197. }
  198. }
  199. }
  200. .data {
  201. @include flex();
  202. height: 270rpx;
  203. padding: 30rpx 60rpx;
  204. box-sizing: border-box;
  205. justify-content: space-between;
  206. .chart {
  207. height: 100%;
  208. width: 210rpx;
  209. }
  210. .data-nums {
  211. @include flex(column);
  212. height: 100%;
  213. width: 280rpx;
  214. .data-item {
  215. @include flex();
  216. flex: 1;
  217. width: 100%;
  218. font-size: 26rpx;
  219. justify-content: space-between;
  220. .data-num {
  221. color: $app-base-color;
  222. }
  223. }
  224. }
  225. }
  226. }
  227. .rank {
  228. height: 360rpx;
  229. background: #FFFFFF;
  230. border-top: 10rpx solid $app-base-bg;
  231. }
  232. .tabbar {
  233. height: $app-tabbar-height;
  234. }
  235. }
  236. }
  237. </style>