statisticsDetail.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <template>
  2. <view>
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <!-- 头部信息Start -->
  6. <view class="headers " :style="headerStyle">
  7. <view class="dis a-c j-start " style="padding: 0 15px;">
  8. <u-icon name="arrow-left" size="40" @tap="back"></u-icon>
  9. <text style="margin: auto;">统计</text>
  10. <!-- <view class="headers-right">
  11. <image @click="weChatService" src="/static/image/my/kefu.png" mode="">
  12. </image>
  13. <text>客服</text>
  14. </view> -->
  15. </view>
  16. </view>
  17. <view class="body-box">
  18. <view class="teamStatistics " v-if="directLsit.length>0">
  19. <view class="statisticsTitle">
  20. <view>姓名</view>
  21. <view>级别</view>
  22. <view>发展人数</view>
  23. </view>
  24. <block v-for="(item, index) in directLsit" :key="index">
  25. <view>
  26. <view class="statisticsContent ">
  27. <view>{{ item.userName }}</view>
  28. <view>{{gradeText}}</view>
  29. <view>{{ item.number }}</view>
  30. </view>
  31. </view>
  32. </block>
  33. <!-- <o-empty v-if="directLsit.length==0" /> -->
  34. </view>
  35. <o-empty v-else />
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import {
  41. mapState,
  42. mapMutations
  43. } from "vuex"
  44. export default {
  45. data() {
  46. return {
  47. option: {},
  48. supportStaffUrl: '',
  49. headerStyle: {
  50. backgroundColor: 'transparent',
  51. backgroundImage: 'url("/static/beijing (2).png")',
  52. backgroundSize: 'cover',
  53. backgroundPosition: '',
  54. boxShadow: ''
  55. // 其他样式属性...
  56. },
  57. chineseNumbers: ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'],
  58. directLsit: []
  59. }
  60. },
  61. onLoad(options) {
  62. this.queryData(options.id)
  63. },
  64. computed: {
  65. ...mapState(['userInfo', "userCheckInfo"]),
  66. //匹配等级title
  67. gradeText() {
  68. const gradeMap = {
  69. 1: '创始人',
  70. 2: '管理人',
  71. 3: '合伙人',
  72. 4: '工作室'
  73. }
  74. return gradeMap[this.userInfo.sysUser.grade] || ''
  75. }
  76. },
  77. methods: {
  78. back() {
  79. uni.navigateBack({
  80. delta: 1, // 返回的页面数,如果是1表示返回上一页
  81. success: function() {}
  82. });
  83. },
  84. //点击跳转企业微信客服
  85. weChatService() {
  86. uni.share({
  87. provider: "weixin",
  88. openCustomerServiceChat: true,
  89. customerUrl: this.supportStaffUrl, //企业微信地址
  90. corpid: 'wwfe67d19509d43ec5', //企业id
  91. success: (res) => {},
  92. fail: (err) => {}
  93. });
  94. },
  95. //列表数据
  96. async queryData(partnerIds) {
  97. let res = await this.$http.get('/newAppPartner/selectByIdList?id=' + partnerIds);
  98. if (res.code == '200') {
  99. this.directLsit = res.data.list
  100. }
  101. }
  102. }
  103. }
  104. </script>
  105. <style lang="scss" scoped>
  106. .headers {
  107. position: fixed;
  108. top: 0;
  109. left: 0;
  110. width: 100%;
  111. z-index: 999999;
  112. padding-top: 40px;
  113. height: 85px;
  114. text {
  115. font-size: 18px;
  116. font-weight: bold;
  117. }
  118. }
  119. .body-box {
  120. background: #ffffff;
  121. margin: 100px 15px 15px 15px
  122. }
  123. .statistics-title {
  124. font-size: 16px;
  125. color: #333333;
  126. }
  127. .statistics-title::before {
  128. content: " ";
  129. display: inline-block;
  130. width: 4px;
  131. height: 12px;
  132. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  133. border-radius: 5px 5px 5px 5px;
  134. margin-right: 4px;
  135. margin-top: 2px;
  136. }
  137. .search-data {
  138. color: #666666;
  139. border: 1px solid #EEEEEE;
  140. .active {
  141. color: #FFFFFF;
  142. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  143. }
  144. text {
  145. padding: 5px 6px;
  146. border-left: 1px solid #EEEEEE;
  147. }
  148. text:first-child {
  149. border-left: none
  150. }
  151. }
  152. .statistics-number {
  153. margin: 10px 10px 20px 10px;
  154. background: #FBFBFB;
  155. border-radius: 4px 4px 4px 4px;
  156. text-align: center;
  157. padding: 15px 0;
  158. overflow: hidden;
  159. view {
  160. width: 33.33%;
  161. float: left;
  162. }
  163. text {
  164. display: block;
  165. }
  166. text:first-child {
  167. font-size: 25px;
  168. color: #333333;
  169. }
  170. text:last-child {
  171. font-size: 13px;
  172. color: #999999;
  173. }
  174. }
  175. .statistics-type {
  176. text-align: center;
  177. text {
  178. display: inline-block;
  179. width: 80px;
  180. height: 30px;
  181. line-height: 30px;
  182. text-align: center;
  183. font-size: 16px;
  184. color: #666666;
  185. background: #F4F4F4;
  186. }
  187. .selected {
  188. color: #FFFFFF;
  189. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  190. }
  191. // text:first-child{
  192. // color: #FFFFFF;
  193. // background: linear-gradient( 132deg, #2DD9FF 0%, #2D6DFF 100%);
  194. // }
  195. }
  196. .partner-type {
  197. margin: 10px;
  198. width: 97%;
  199. overflow: hidden;
  200. white-space: nowrap;
  201. text {
  202. display: inline-block;
  203. border-radius: 14px 14px 14px 14px;
  204. font-size: 14px;
  205. color: #666666;
  206. padding: 1px 10px;
  207. background: #F4F4F4;
  208. margin-right: 8px;
  209. }
  210. .selected {
  211. color: #FFFFFF;
  212. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  213. }
  214. }
  215. .teamStatistics {
  216. background: #FFFFFF;
  217. // box-shadow: 0px 4px 10px 0px #DAE3F4;
  218. // border-radius: 2px 2px 2px 2px;
  219. border: 1px solid #C8D8FF;
  220. }
  221. .statisticsContent {
  222. box-sizing: border-box;
  223. height: 70upx;
  224. text-align: center;
  225. line-height: 70upx;
  226. font-size: 26rpx;
  227. color: #666666;
  228. display: flex;
  229. flex-wrap: nowrap;
  230. justify-content: space-around;
  231. view {
  232. text-align: center;
  233. line-height: 70upx;
  234. width: 25%;
  235. font-size: 12px;
  236. }
  237. image {
  238. display: inline-block;
  239. width: 21px;
  240. height: 21px;
  241. vertical-align: middle;
  242. }
  243. }
  244. .statisticsTitle {
  245. display: flex;
  246. flex-wrap: nowrap;
  247. justify-content: space-around;
  248. height: 70upx;
  249. box-sizing: border-box;
  250. line-height: 70upx;
  251. font-size: 24rpx;
  252. color: #232832;
  253. background: linear-gradient(180deg, #DAE0EE 0%, #E9ECF4 100%);
  254. // border-radius: 6px 6px 0 0;
  255. view {
  256. text-align: center;
  257. line-height: 35px;
  258. color: #2D6DFF;
  259. width: 25%;
  260. font-size: 12px;
  261. }
  262. }
  263. .charts-box {
  264. width: 100%;
  265. height: 300px;
  266. }
  267. </style>