manager.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <view class="manager">
  3. <view class="flex-row justify-center">
  4. <view class="grid">
  5. <view class="flex-col gridItem" @click="navigateToPage('/pages/specialistsList/specialistsList')">
  6. <view class="title flex-row justify-center">
  7. <text>累计专员数量</text>
  8. </view>
  9. <view class="number flex-row justify-center">
  10. <text>{{homeStaticsData.expandUserTotal || 0}}</text>
  11. </view>
  12. </view>
  13. <view class="flex-col gridItem leftBorder" @click="navigateToPage('/pages/todaySpecialistsList/todaySpecialistsList')">
  14. <view class="title flex-row justify-center">
  15. <text>今日新增专员</text>
  16. </view>
  17. <view class="number flex-row justify-center">
  18. <text>{{homeStaticsData.expandUserTotalToday || 0}}</text>
  19. </view>
  20. </view>
  21. <view class="flex-col gridItem leftBorder">
  22. <view class="title flex-row justify-center">
  23. <text>本月任务</text>
  24. </view>
  25. <view class="number flex-row justify-center">
  26. <text>0/0</text>
  27. </view>
  28. </view>
  29. <view class="flex-col gridItem">
  30. <view class="title flex-row justify-center">
  31. <text>累计异业伙伴</text>
  32. </view>
  33. <view class="number flex-row justify-center">
  34. <text>0</text>
  35. </view>
  36. </view>
  37. <view class="flex-col gridItem leftBorder">
  38. <view class="title flex-row justify-center">
  39. <text>累计卖券金额</text>
  40. </view>
  41. <view class="number flex-row justify-center">
  42. <text>0</text>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="flex-row">
  48. <text>选择角色:</text>
  49. <text v-for="i in roleList">{{i.name}}</text>
  50. </view>
  51. <view class="flex-row justify-center">
  52. <view class="qrView" @click="qrCodePopup">
  53. <uv-qrcode ref="qrcode" size="600rpx" :value="qrcodeUrl" :options="options"></uv-qrcode>
  54. </view>
  55. </view>
  56. <uni-popup ref="createQrCodePopup" type="center">
  57. <view class="createQrCodePopup flex-col justify-center">
  58. <view class="flex-row justify-center">
  59. <uv-qrcode ref="qrcode" size="600rpx" :value="qrcodeUrl" :options="options"></uv-qrcode>
  60. </view>
  61. <view class="xoIcon" @click="closePopup">
  62. <u-icon name="close-circle" color="#666" size="35"></u-icon>
  63. </view>
  64. </view>
  65. </uni-popup>
  66. </view>
  67. </template>
  68. <script>
  69. import commonUtils from "../../../common/js/utils/commonUtils";
  70. export default {
  71. props: {
  72. height: {
  73. type: String,
  74. default () {
  75. return ''
  76. }
  77. },
  78. },
  79. data() {
  80. return {
  81. qrcodeUrl:this.$xcxUrl+'?expandUserId={expandUserId}&ruleId={ruleId}&timestamp={timestamp}&type=2&expand1=2',
  82. options: {
  83. // 指定二维码前景,一般可在中间放logo
  84. foregroundImagePadding:2,
  85. foregroundImageBorderRadius:5,
  86. foregroundImageSrc: '/static/logo.png'
  87. },
  88. homeStaticsData:{},
  89. roleList:[]
  90. }
  91. },
  92. created() {
  93. console.log('接收到的高度', this.height)
  94. this.userInfo = uni.getStorageSync('spreadUserInfo')
  95. this.homeStatics()
  96. this.getRoleList()
  97. },
  98. methods: {
  99. formatDate() {
  100. this.qrCreateTime = commonUtils.formatDate(new Date())
  101. },
  102. qrCodePopup(){
  103. this.$refs.createQrCodePopup.open()
  104. },
  105. closePopup(){
  106. this.$refs.createQrCodePopup.close()
  107. },
  108. navigateToPage(url){
  109. uni.navigateTo({
  110. url:url
  111. })
  112. },
  113. getRoleList(){
  114. this.$api.service.getRoleList().then(res=>{
  115. console.log('获取角色列表',res)
  116. this.roleList = res.data.data
  117. })
  118. },
  119. homeStatics(){
  120. this.$api.service.homeStatics({
  121. type:2
  122. }).then(res=>{
  123. console.log('获取首页拓客数据',res)
  124. this.homeStaticsData = res.data.data
  125. })
  126. },
  127. }
  128. }
  129. </script>
  130. <style scoped lang="scss">
  131. @import './index.rpx.css';
  132. </style>