123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- <template>
- <view>
- <!-- 公共组件-每个页面必须引入 -->
- <public-module></public-module>
- <!-- 头部信息Start -->
- <view class="headers " :style="headerStyle">
- <view class="dis a-c j-start " style="padding: 0 15px;">
- <u-icon name="arrow-left" size="40" @tap="back"></u-icon>
- <text style="margin: auto;">统计</text>
- <!-- <view class="headers-right">
- <image @click="weChatService" src="/static/image/my/kefu.png" mode="">
- </image>
- <text>客服</text>
- </view> -->
- </view>
- </view>
- <view class="body-box">
- <view class="teamStatistics " v-if="directLsit.length>0">
- <view class="statisticsTitle">
- <view>姓名</view>
- <view>级别</view>
- <view>发展人数</view>
- </view>
- <block v-for="(item, index) in directLsit" :key="index">
- <view>
- <view class="statisticsContent ">
- <view>{{ item.userName }}</view>
- <view>{{gradeText}}</view>
- <view>{{ item.number }}</view>
- </view>
- </view>
- </block>
- <!-- <o-empty v-if="directLsit.length==0" /> -->
- </view>
- <o-empty v-else />
- </view>
- </view>
- </template>
- <script>
- import {
- mapState,
- mapMutations
- } from "vuex"
- export default {
- data() {
- return {
- option: {},
- supportStaffUrl: '',
- headerStyle: {
- backgroundColor: 'transparent',
- backgroundImage: 'url("/static/beijing (2).png")',
- backgroundSize: 'cover',
- backgroundPosition: '',
- boxShadow: ''
- // 其他样式属性...
- },
- chineseNumbers: ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'],
- directLsit: []
- }
- },
- onLoad(options) {
- this.queryData(options.id)
- },
- computed: {
- ...mapState(['userInfo', "userCheckInfo"]),
- //匹配等级title
- gradeText() {
- const gradeMap = {
- 1: '创始人',
- 2: '管理人',
- 3: '合伙人',
- 4: '工作室'
- }
- return gradeMap[this.userInfo.sysUser.grade] || ''
- }
- },
- methods: {
- back() {
- uni.navigateBack({
- delta: 1, // 返回的页面数,如果是1表示返回上一页
- success: function() {}
- });
- },
- //点击跳转企业微信客服
- weChatService() {
- uni.share({
- provider: "weixin",
- openCustomerServiceChat: true,
- customerUrl: this.supportStaffUrl, //企业微信地址
- corpid: 'wwfe67d19509d43ec5', //企业id
- success: (res) => {},
- fail: (err) => {}
- });
- },
- //列表数据
- async queryData(partnerIds) {
- let res = await this.$http.get('/newAppPartner/selectByIdList?id=' + partnerIds);
- if (res.code == '200') {
- this.directLsit = res.data.list
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .headers {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- z-index: 999999;
- padding-top: 40px;
- height: 85px;
- text {
- font-size: 18px;
- font-weight: bold;
- }
- }
- .body-box {
- background: #ffffff;
- margin: 100px 15px 15px 15px
- }
- .statistics-title {
- font-size: 16px;
- color: #333333;
- }
- .statistics-title::before {
- content: " ";
- display: inline-block;
- width: 4px;
- height: 12px;
- background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
- border-radius: 5px 5px 5px 5px;
- margin-right: 4px;
- margin-top: 2px;
- }
- .search-data {
- color: #666666;
- border: 1px solid #EEEEEE;
- .active {
- color: #FFFFFF;
- background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
- }
- text {
- padding: 5px 6px;
- border-left: 1px solid #EEEEEE;
- }
- text:first-child {
- border-left: none
- }
- }
- .statistics-number {
- margin: 10px 10px 20px 10px;
- background: #FBFBFB;
- border-radius: 4px 4px 4px 4px;
- text-align: center;
- padding: 15px 0;
- overflow: hidden;
- view {
- width: 33.33%;
- float: left;
- }
- text {
- display: block;
- }
- text:first-child {
- font-size: 25px;
- color: #333333;
- }
- text:last-child {
- font-size: 13px;
- color: #999999;
- }
- }
- .statistics-type {
- text-align: center;
- text {
- display: inline-block;
- width: 80px;
- height: 30px;
- line-height: 30px;
- text-align: center;
- font-size: 16px;
- color: #666666;
- background: #F4F4F4;
- }
- .selected {
- color: #FFFFFF;
- background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
- }
- // text:first-child{
- // color: #FFFFFF;
- // background: linear-gradient( 132deg, #2DD9FF 0%, #2D6DFF 100%);
- // }
- }
- .partner-type {
- margin: 10px;
- width: 97%;
- overflow: hidden;
- white-space: nowrap;
- text {
- display: inline-block;
- border-radius: 14px 14px 14px 14px;
- font-size: 14px;
- color: #666666;
- padding: 1px 10px;
- background: #F4F4F4;
- margin-right: 8px;
- }
- .selected {
- color: #FFFFFF;
- background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
- }
- }
- .teamStatistics {
- background: #FFFFFF;
- // box-shadow: 0px 4px 10px 0px #DAE3F4;
- // border-radius: 2px 2px 2px 2px;
- border: 1px solid #C8D8FF;
- }
- .statisticsContent {
- box-sizing: border-box;
- height: 70upx;
- text-align: center;
- line-height: 70upx;
- font-size: 26rpx;
- color: #666666;
- display: flex;
- flex-wrap: nowrap;
- justify-content: space-around;
- view {
- text-align: center;
- line-height: 70upx;
- width: 25%;
- font-size: 12px;
- }
- image {
- display: inline-block;
- width: 21px;
- height: 21px;
- vertical-align: middle;
- }
- }
- .statisticsTitle {
- display: flex;
- flex-wrap: nowrap;
- justify-content: space-around;
- height: 70upx;
- box-sizing: border-box;
- line-height: 70upx;
- font-size: 24rpx;
- color: #232832;
- background: linear-gradient(180deg, #DAE0EE 0%, #E9ECF4 100%);
- // border-radius: 6px 6px 0 0;
- view {
- text-align: center;
- line-height: 35px;
- color: #2D6DFF;
- width: 25%;
- font-size: 12px;
- }
- }
- .charts-box {
- width: 100%;
- height: 300px;
- }
- </style>
|