|
@@ -6,68 +6,66 @@
|
|
<view class="headers " :style="headerStyle">
|
|
<view class="headers " :style="headerStyle">
|
|
<view class="dis a-c j-c">
|
|
<view class="dis a-c j-c">
|
|
<text>统计</text>
|
|
<text>统计</text>
|
|
- <!-- <view class="headers-right">
|
|
|
|
- <image @click="weChatService" src="/static/image/my/kefu.png" mode="">
|
|
|
|
- </image>
|
|
|
|
- <text>客服</text>
|
|
|
|
- </view> -->
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="body-box" style="margin-top: 100px" v-if="type == 1 && level!==5">
|
|
|
|
|
|
+ <view class="body-box" style="margin-top: 100px">
|
|
<view class=" dis j-s a-c" style="padding: 10px 10px 0 0;">
|
|
<view class=" dis j-s a-c" style="padding: 10px 10px 0 0;">
|
|
<view class="statistics-title">新增人员汇总统计</view>
|
|
<view class="statistics-title">新增人员汇总统计</view>
|
|
- <year @queryData="queryData" @time="getTime"></year>
|
|
|
|
-
|
|
|
|
|
|
+ <!-- 时间快捷选择 -->
|
|
|
|
+ <view class="quickSwitchDate dis a-c j-c ">
|
|
|
|
+ <view class="tab" :class="{active:summaryDateIndex==index}" v-for="(item,index) in quickSwitchDate"
|
|
|
|
+ :key="index" @click="SwitchDateclick(item,index)">
|
|
|
|
+ {{item.name}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 人员汇总 -->
|
|
<view class="statistics-number ">
|
|
<view class="statistics-number ">
|
|
- <view v-if="level <= 4">
|
|
|
|
- <text>{{ echartsList.onePartnerNum || 0 }}</text>
|
|
|
|
- <text>管理人</text>
|
|
|
|
- </view>
|
|
|
|
- <view v-if="level <= 3">
|
|
|
|
- <text>{{ echartsList.twoPartnerNum || 0 }}</text>
|
|
|
|
- <text>合伙人</text>
|
|
|
|
- </view>
|
|
|
|
- <view v-if="level <= 2">
|
|
|
|
- <text>{{ echartsList.threePartnerNum || 0 }}</text>
|
|
|
|
- <text>工作室</text>
|
|
|
|
- </view>
|
|
|
|
- <view v-if="level == 1">
|
|
|
|
- <text>{{ echartsList.fourPartnerNum || 0 }}</text>
|
|
|
|
- <text>团队</text>
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- <text>{{ echartsList.workSum || 0 }}</text>
|
|
|
|
- <text>业务员</text>
|
|
|
|
|
|
+ <view v-for="(item,index) in statistics" :key="index">
|
|
|
|
+ <text>{{ item.count }}</text>
|
|
|
|
+ <text>{{item.gradeName}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="partner-type dis">
|
|
<view class="partner-type dis">
|
|
<view style="width: 650px;overflow-x: auto;">
|
|
<view style="width: 650px;overflow-x: auto;">
|
|
- <text :class="typeStatistics == val.value ? 'selected' : ''" v-for="val in partnerTypeOption"
|
|
|
|
- :key="val.value" @click="getPartnerType(val.value)">{{ val.lable }}</text>
|
|
|
|
|
|
+ <text :class="summarygrade == val.grade ? 'selected' : ''" v-for="(val,index) in partnerTypeOption"
|
|
|
|
+ :key="index" @click="getPartnerType(val,val.grade)">{{ val.gradeName }}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <o-empty v-if="echartsList.countUserNumVoList && echartsList.countUserNumVoList.length == 0"
|
|
|
|
- height="20vh" />
|
|
|
|
|
|
+ <o-empty v-if=" chartData1.categories && chartData1.categories.length==0" height="20vh" />
|
|
<qiun-data-charts v-else type="area" :ontouch="true" :opts="opts1" :chartData="chartData1" />
|
|
<qiun-data-charts v-else type="area" :ontouch="true" :opts="opts1" :chartData="chartData1" />
|
|
</view>
|
|
</view>
|
|
- <view class="body-box" v-if="type == 1 && level!==5">
|
|
|
|
|
|
+ <view class="body-box">
|
|
<view class=" dis j-s a-c" style="padding: 10px 10px 0 0;">
|
|
<view class=" dis j-s a-c" style="padding: 10px 10px 0 0;">
|
|
<view class="statistics-title">新增人员占比分析</view>
|
|
<view class="statistics-title">新增人员占比分析</view>
|
|
- <year @queryData="analysisQueryData" @time="getTime"></year>
|
|
|
|
-
|
|
|
|
|
|
+ <!-- 时间快捷选择 -->
|
|
|
|
+ <view class="quickSwitchDate dis a-c j-c ">
|
|
|
|
+ <view class="tab" :class="{active:ratioDateIndex==index}" v-for="(item,index) in quickSwitchDate"
|
|
|
|
+ :key="index" @click="SwitchDateclick1(item,index)">
|
|
|
|
+ {{item.name}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <leverStaff @getPartnerType="getPartnerType2"></leverStaff>
|
|
|
|
- <o-empty v-if="!echartsList2.newProportion && !echartsList2.oldProportion" height="20vh" />
|
|
|
|
- <view v-else class="charts-box" style="height: 200px;">
|
|
|
|
|
|
+ <view class="partner-type dis">
|
|
|
|
+ <view style="width: 650px;overflow-x: auto;">
|
|
|
|
+ <text :class="ratiograde == val.grade ? 'selected' : ''" v-for="(val,index) in partnerTypeOption1"
|
|
|
|
+ :key="index" @click="getPartnerType2(val,val.grade)">{{ val.gradeName }}</text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="charts-box" style="height: 200px;">
|
|
<qiun-data-charts type="ring" :eopts="ringOpts" :chartData="chartsDataPie2" />
|
|
<qiun-data-charts type="ring" :eopts="ringOpts" :chartData="chartsDataPie2" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="body-box" style="padding-bottom: 10px;" v-if="type == 1 && level!==5">
|
|
|
|
|
|
+ <view class="body-box" style="padding-bottom: 10px;">
|
|
<view class=" dis j-s a-c" style="padding: 10px 10px 0 0;">
|
|
<view class=" dis j-s a-c" style="padding: 10px 10px 0 0;">
|
|
<view class="statistics-title">排名</view>
|
|
<view class="statistics-title">排名</view>
|
|
</view>
|
|
</view>
|
|
- <leverStaff @getPartnerType="getPartnerType3"></leverStaff>
|
|
|
|
|
|
+ <view class="partner-type dis">
|
|
|
|
+ <view style="width: 650px;overflow-x: auto;">
|
|
|
|
+ <text :class="rankgrade == val.grade ? 'selected' : ''" v-for="(val,index) in personRankingOption"
|
|
|
|
+ :key="index" @click="getPartnerType3(val,val.grade)">{{ val.gradeName }}</text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
<view class="teamStatistics ">
|
|
<view class="teamStatistics ">
|
|
<view class="statisticsTitle">
|
|
<view class="statisticsTitle">
|
|
<view>排名</view>
|
|
<view>排名</view>
|
|
@@ -85,90 +83,49 @@
|
|
<text v-else>{{ index + 1 }}</text>
|
|
<text v-else>{{ index + 1 }}</text>
|
|
</view>
|
|
</view>
|
|
<view>{{ item.userName }}</view>
|
|
<view>{{ item.userName }}</view>
|
|
- <view>{{ item.deptManNum }}</view>
|
|
|
|
- <view style="color:#739EFF " @click="directDetail(item)">查看</view>
|
|
|
|
|
|
+ <view>{{ item.number }}</view>
|
|
|
|
+ <view style="color:#739EFF;" @click="directDetail(item.id)">查看</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</block>
|
|
- <!-- <o-empty v-if="directLsit.length==0" /> -->
|
|
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="body-box" style="margin-top: 100px;" v-if="type == 1&& level==5">
|
|
|
|
- <view class=" dis j-s a-c" style="padding: 10px 10px 0 0;">
|
|
|
|
- <view class="statistics-title">新增人员汇总统计</view>
|
|
|
|
- <year @queryData="queryData" @time="getTime"></year>
|
|
|
|
-
|
|
|
|
- </view>
|
|
|
|
- <view class="statistics-number ">
|
|
|
|
- <view>
|
|
|
|
- <text>{{ echartsList.workSum || 0 }}</text>
|
|
|
|
- <text>工作室</text>
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- <text>{{ echartsList.deptSum || 0 }}</text>
|
|
|
|
- <text>团队</text>
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- <text>{{ echartsList.deptManSum || 0 }}</text>
|
|
|
|
- <text>代理人</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="statistics-type">
|
|
|
|
- <text :class="typeStatistics == 1 ? 'selected' : ''" @click="getStatistics(1)">工作室</text>
|
|
|
|
- <text :class="typeStatistics == 2 ? 'selected' : ''" @click="getStatistics(2)">团队</text>
|
|
|
|
- <text :class="typeStatistics == 3 ? 'selected' : ''" @click="getStatistics(3)">代理人</text>
|
|
|
|
- </view>
|
|
|
|
- <o-empty v-if="echartsList.countUserNumVoList && echartsList.countUserNumVoList.length == 0"
|
|
|
|
- height="20vh" />
|
|
|
|
- <qiun-data-charts v-else type="area" :opts="opts1" :chartData="chartData1" />
|
|
|
|
- </view>
|
|
|
|
- <view class="body-box" style="margin-top: 100px;" v-if="type == 2">
|
|
|
|
- <view class=" dis j-s a-c" style="padding: 10px 10px 0 0;">
|
|
|
|
- <view class="statistics-title">新增人员汇总统计</view>
|
|
|
|
- <year @queryData="queryData" @time="getTime"></year>
|
|
|
|
-
|
|
|
|
- </view>
|
|
|
|
- <view class="statistics-number ">
|
|
|
|
- <view>
|
|
|
|
- <text>{{ echartsList.countSum || 0 }}</text>
|
|
|
|
- <text>新增人员</text>
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- <text>{{ echartsList.deptSum || 0 }}</text>
|
|
|
|
- <text>团队</text>
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- <text>{{ echartsList.deptManSum || 0 }}</text>
|
|
|
|
- <text>代理人</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="statistics-type">
|
|
|
|
- <text :class="typeStatistics == 1 ? 'selected' : ''" @click="getStatistics(1)">团队</text>
|
|
|
|
- <text :class="typeStatistics == 2 ? 'selected' : ''" @click="getStatistics(2)">代理人</text>
|
|
|
|
- </view>
|
|
|
|
- <o-empty v-if="echartsList.countUserNumVoList && echartsList.countUserNumVoList.length == 0"
|
|
|
|
- height="20vh" />
|
|
|
|
- <qiun-data-charts v-else type="area" :opts="opts1" :chartData="chartData1" :ontouch="true" />
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
mapState,
|
|
mapState,
|
|
} from "vuex"
|
|
} from "vuex"
|
|
- import leverStaff from "../components/leverStaff.vue"
|
|
|
|
- import year from "../components/year.vue"
|
|
|
|
|
|
+ import levertab from "../components/leverStaff.vue" //等级切换组件
|
|
|
|
+ import tabDate from "../components/year.vue" //日期快捷选择
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
- leverStaff,
|
|
|
|
- year
|
|
|
|
|
|
+ levertab,
|
|
|
|
+ tabDate
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- beginTime: '',
|
|
|
|
- endTime: '',
|
|
|
|
|
|
+ statistics: [], //各等级人员统计
|
|
|
|
+ summaryDateIndex: 1, //人员
|
|
|
|
+ ratioDateIndex: 1, //汇总
|
|
|
|
+ summarygrade: null, //汇总选中等级
|
|
|
|
+ ratiograde: null, //占比选中等级
|
|
|
|
+ rankgrade: null, //排名选中等级
|
|
|
|
+ summaryCountCycle: "Week", //汇总日期选择
|
|
|
|
+ ratioCountCycle: "Week", //占比日期选择
|
|
|
|
+ quickSwitchDate: [{
|
|
|
|
+ name: "日",
|
|
|
|
+ value: "Day"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: "周",
|
|
|
|
+ value: "Week"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: "月",
|
|
|
|
+ value: "Month"
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
ringOpts: {
|
|
ringOpts: {
|
|
color: ['#02CDFF ', '#2D97FF'],
|
|
color: ['#02CDFF ', '#2D97FF'],
|
|
legend: {
|
|
legend: {
|
|
@@ -176,7 +133,7 @@
|
|
},
|
|
},
|
|
dataLabel: true,
|
|
dataLabel: true,
|
|
},
|
|
},
|
|
- chartsDataPie2: {},
|
|
|
|
|
|
+ chartsDataPie2: {}, //图表2显示
|
|
echartsList2: {},
|
|
echartsList2: {},
|
|
level: '',
|
|
level: '',
|
|
type: null,
|
|
type: null,
|
|
@@ -205,22 +162,11 @@
|
|
}],
|
|
}],
|
|
echartsList: {},
|
|
echartsList: {},
|
|
analysisEchartsList: {},
|
|
analysisEchartsList: {},
|
|
- partnerTypeOption: [{
|
|
|
|
- lable: '一级合伙人',
|
|
|
|
- value: '1'
|
|
|
|
- }, {
|
|
|
|
- lable: '二级合伙人',
|
|
|
|
- value: '2'
|
|
|
|
- }, {
|
|
|
|
- lable: '三级合伙人',
|
|
|
|
- value: '3'
|
|
|
|
- }, {
|
|
|
|
- lable: '四级合伙人',
|
|
|
|
- value: '4'
|
|
|
|
- }, ],
|
|
|
|
- // optsMax:10,
|
|
|
|
-
|
|
|
|
- opts1: {
|
|
|
|
|
|
+ partnerTypeOption: [],
|
|
|
|
+ partnerTypeOption1: [], //人员占比数据
|
|
|
|
+ personRankingOption: [], //人员排名集合
|
|
|
|
+ directLsit: [], //排名列表数据
|
|
|
|
+ opts1: { //图表1配置参数
|
|
enableScroll: true,
|
|
enableScroll: true,
|
|
padding: [15, 10, 15, 0],
|
|
padding: [15, 10, 15, 0],
|
|
legend: {
|
|
legend: {
|
|
@@ -253,7 +199,6 @@
|
|
},
|
|
},
|
|
},
|
|
},
|
|
chartData1: {},
|
|
chartData1: {},
|
|
- directLsit: []
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -261,167 +206,139 @@
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
this.level = this.userInfo.sysUser.level
|
|
this.level = this.userInfo.sysUser.level
|
|
- if (this.level == 2) {
|
|
|
|
- this.partnerTypeOption = this.partnerTypeOption.slice(0, -1);
|
|
|
|
- }
|
|
|
|
- if (this.level == 3) {
|
|
|
|
- this.partnerTypeOption = this.partnerTypeOption.slice(0, -2);
|
|
|
|
- }
|
|
|
|
- if (this.level == 4) {
|
|
|
|
- this.partnerTypeOption = this.partnerTypeOption.slice(0, 1);
|
|
|
|
- }
|
|
|
|
this.$http.get('/sys/qy/wechat/find/picture').then(res => {
|
|
this.$http.get('/sys/qy/wechat/find/picture').then(res => {
|
|
this.supportStaffUrl = res.data.supportStaffUrl
|
|
this.supportStaffUrl = res.data.supportStaffUrl
|
|
})
|
|
})
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
this.type = uni.getStorageSync('type')
|
|
this.type = uni.getStorageSync('type')
|
|
- // if(this.type ==2){
|
|
|
|
- // this.queryData({type:1})
|
|
|
|
- // }
|
|
|
|
- // else{
|
|
|
|
- // this.queryData({type:1})
|
|
|
|
- // }
|
|
|
|
- this.queryData()
|
|
|
|
- if (this.type == 1 && this.level !== 5) {
|
|
|
|
- this.analysisQueryData()
|
|
|
|
- this.rankingQueryData()
|
|
|
|
- }
|
|
|
|
|
|
+ this.newPersonCount() //图表1
|
|
|
|
+ this.newPersonRatioAnalysis() //图表2
|
|
|
|
+ this.personRanking() //排名
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //汇总日期切换
|
|
|
|
+ SwitchDateclick(item, index) {
|
|
|
|
+ this.summaryDateIndex = index;
|
|
|
|
+ this.summaryCountCycle = item.value;
|
|
|
|
+ this.newPersonCount();
|
|
|
|
+ },
|
|
|
|
+ //占比日期切换
|
|
|
|
+ SwitchDateclick1(item, index) {
|
|
|
|
+ this.ratioDateIndex = index;
|
|
|
|
+ this.ratioCountCycle = item.value;
|
|
|
|
+ this.newPersonRatioAnalysis()
|
|
|
|
+ },
|
|
canvasInit(canvas, width, height) {
|
|
canvasInit(canvas, width, height) {
|
|
// 初始化画布
|
|
// 初始化画布
|
|
this.canvas2d = canvas;
|
|
this.canvas2d = canvas;
|
|
},
|
|
},
|
|
directDetail(val) {
|
|
directDetail(val) {
|
|
|
|
+ console.log(val);
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: "/pages/statistics/statisticsDetail?key=" + encodeURIComponent(JSON.stringify(val
|
|
|
|
- .partnerIds))
|
|
|
|
|
|
+ url: "/pages/statistics/statisticsDetail?id=" + val,
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- getPartnerType2(type) {
|
|
|
|
- this.typeStatistics2 = type
|
|
|
|
- this.analysisQueryData()
|
|
|
|
- },
|
|
|
|
- getPartnerType3(type) {
|
|
|
|
- this.typeStatistics3 = type
|
|
|
|
- this.rankingQueryData()
|
|
|
|
|
|
+ //人员汇总数据切换
|
|
|
|
+ getPartnerType(item, type) {
|
|
|
|
+ this.summarygrade = type;
|
|
|
|
+ let rualit = {
|
|
|
|
+ categories: item.data.dataTime,
|
|
|
|
+ series: [{
|
|
|
|
+ name: "人数",
|
|
|
|
+ // type: "line",
|
|
|
|
+ data: item.data.data
|
|
|
|
+ }]
|
|
|
|
+ };
|
|
|
|
+ this.chartData1 = JSON.parse(JSON.stringify(rualit)); //更新图表数据
|
|
},
|
|
},
|
|
- getPartnerType(type) {
|
|
|
|
- this.typeStatistics = type
|
|
|
|
- this.queryData()
|
|
|
|
- },
|
|
|
|
- getStatistics(type) {
|
|
|
|
- // uni.navigateTo({
|
|
|
|
- // url: "/pages/tools/achievement/achievement"
|
|
|
|
- // })
|
|
|
|
- // this.studioType=type
|
|
|
|
- this.typeStatistics = type
|
|
|
|
- this.queryData()
|
|
|
|
|
|
+ //人员占比图数据切换
|
|
|
|
+ getPartnerType2(item, type) {
|
|
|
|
+ this.ratiograde = type;
|
|
|
|
+ this.chartsDataPie2 = {
|
|
|
|
+ series: [{
|
|
|
|
+ "data": [{
|
|
|
|
+ name: `新增`,
|
|
|
|
+ value: item.data.newNum,
|
|
|
|
+ labelText: `${item.data.newNum?'新增:'+item.data.newNum+'%':'新增:0%'}`
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: "历史",
|
|
|
|
+ value: item.data.number,
|
|
|
|
+ labelText: `${item.data.number?'历史:'+item.data.number+'%':'历史:0%'}`
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }]
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- //点击跳转企业微信客服
|
|
|
|
- weChatService() {
|
|
|
|
- uni.share({
|
|
|
|
- provider: "weixin",
|
|
|
|
- openCustomerServiceChat: true,
|
|
|
|
- customerUrl: this.supportStaffUrl, //企业微信地址
|
|
|
|
- corpid: 'wwfe67d19509d43ec5', //企业id
|
|
|
|
- success: (res) => {},
|
|
|
|
- fail: (err) => {}
|
|
|
|
- });
|
|
|
|
|
|
+ //人员排名数据切换
|
|
|
|
+ getPartnerType3(item, type) {
|
|
|
|
+ this.rankgrade = type;
|
|
|
|
+ this.directLsit = item.data;
|
|
},
|
|
},
|
|
-
|
|
|
|
- async analysisQueryData() {
|
|
|
|
|
|
+ //图表2
|
|
|
|
+ async newPersonRatioAnalysis() {
|
|
let params = {
|
|
let params = {
|
|
- beginTime: this.beginTime,
|
|
|
|
- endTime: this.endTime,
|
|
|
|
- type: this.typeStatistics2,
|
|
|
|
|
|
+ countCycle: this.ratioCountCycle || 'Week',
|
|
}
|
|
}
|
|
- let res = await this.$http.post('/APPPartner/getPartnerProportion', params);
|
|
|
|
|
|
+ let res = await this.$http.post('/newAppPartner/userCountProportionVo', params);
|
|
if (res.code == '200') {
|
|
if (res.code == '200') {
|
|
- this.echartsList2 = res.data
|
|
|
|
|
|
+ this.partnerTypeOption1 = res.data
|
|
|
|
+ this.ratiograde = this.partnerTypeOption1[0].grade; //默认获取最高身份等级
|
|
this.chartsDataPie2 = {
|
|
this.chartsDataPie2 = {
|
|
series: [{
|
|
series: [{
|
|
"data": [{
|
|
"data": [{
|
|
name: `新增`,
|
|
name: `新增`,
|
|
- value: res.data.newProportion,
|
|
|
|
- labelText: `${res.data.newProportion?'新增:'+res.data.newProportion+'%':'新增:0%'}`
|
|
|
|
|
|
+ value: res.data[0].data.newNum,
|
|
|
|
+ labelText: `${res.data[0].data.newNum?'新增:'+res.data[0].data.newNum+'%':'新增:0%'}`
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "历史",
|
|
name: "历史",
|
|
- value: res.data.oldProportion,
|
|
|
|
- labelText: `${res.data.oldProportion?'历史:'+res.data.oldProportion+'%':'历史:0%'}`
|
|
|
|
|
|
+ value: res.data[0].data.number,
|
|
|
|
+ labelText: `${res.data[0].data.number?'历史:'+res.data[0].data.number+'%':'历史:0%'}`
|
|
}
|
|
}
|
|
]
|
|
]
|
|
- // "data": [
|
|
|
|
- // { name: `新增`, value: res.data.newProportion?res.data.newProportion:0},
|
|
|
|
- // { name: "历史", value: res.data.oldProportion?res.data.oldProportion:0}
|
|
|
|
- // ]
|
|
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async rankingQueryData() {
|
|
|
|
- let params = {
|
|
|
|
- type: this.typeStatistics3,
|
|
|
|
- }
|
|
|
|
- let res = await this.$http.get('/APPPartner/getLevelPartner', params);
|
|
|
|
-
|
|
|
|
|
|
+ //排名
|
|
|
|
+ async personRanking() {
|
|
|
|
+ let res = await this.$http.post('/newAppPartner/userCountRankingVo', {});
|
|
if (res.code == '200') {
|
|
if (res.code == '200') {
|
|
- this.directLsit = res.data
|
|
|
|
|
|
+ this.personRankingOption = res.data;
|
|
|
|
+ this.directLsit = res.data[0].data;
|
|
|
|
+ this.rankgrade = this.personRankingOption[0].grade; //默认获取最高身份等级
|
|
}
|
|
}
|
|
},
|
|
},
|
|
getTime(beginTime, endTime) {
|
|
getTime(beginTime, endTime) {
|
|
this.beginTime = beginTime
|
|
this.beginTime = beginTime
|
|
this.endTime = endTime
|
|
this.endTime = endTime
|
|
},
|
|
},
|
|
- async queryData() {
|
|
|
|
|
|
+ //图表1
|
|
|
|
+ async newPersonCount() {
|
|
let params = {
|
|
let params = {
|
|
- beginTime: this.beginTime,
|
|
|
|
- endTime: this.endTime,
|
|
|
|
- type: this.typeStatistics,
|
|
|
|
- }
|
|
|
|
- let res = {}
|
|
|
|
- if (this.type == 1 && this.level !== 5) {
|
|
|
|
- res = await this.$http.post('/APPPartner/getPartnerCount', params);
|
|
|
|
- } else if (this.type == 1 && this.level == 5) {
|
|
|
|
- params = {
|
|
|
|
- beginTime: this.beginTime,
|
|
|
|
- endTime: this.endTime,
|
|
|
|
- number: this.typeStatistics,
|
|
|
|
- }
|
|
|
|
- res = await this.$http.post('/APPPartner/getFivePartnerCount', params);
|
|
|
|
- } else {
|
|
|
|
- res = await this.$http.post('/APPPartner/getCountUser', params);
|
|
|
|
|
|
+ countCycle: this.summaryCountCycle || 'Week',
|
|
}
|
|
}
|
|
|
|
+ let res = await this.$http.post('/newAppPartner/userCountStatisticsVo', params);
|
|
if (res.code == '200') {
|
|
if (res.code == '200') {
|
|
- this.echartsList = res.data
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- if (res.data.countUserNumVoList && res.data.countUserNumVoList.length > 0) {
|
|
|
|
- let dateList = res.data.countUserNumVoList.map(function(item) {
|
|
|
|
- // return item.time.split(" ")[1] ? item.time.split(" ")[1] + ':00' : item.time.split(" ")[0]
|
|
|
|
- return item.time
|
|
|
|
- });
|
|
|
|
- let valueList = res.data.countUserNumVoList.map(function(item) {
|
|
|
|
- return item.countNum;
|
|
|
|
- });
|
|
|
|
- let rualit = {
|
|
|
|
- categories: dateList,
|
|
|
|
- series: [{
|
|
|
|
- name: "人数",
|
|
|
|
- // type: "line",
|
|
|
|
- data: valueList
|
|
|
|
- }]
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- this.chartData1 = JSON.parse(JSON.stringify(rualit));
|
|
|
|
- } else {
|
|
|
|
- this.echartsList.countUserNumVoList = []
|
|
|
|
- }
|
|
|
|
|
|
+ this.statistics = res.data.vo1; //统计
|
|
|
|
+ this.partnerTypeOption = res.data.vo2; //图表数据
|
|
|
|
+
|
|
|
|
+ let rualit = {
|
|
|
|
+ categories: this.partnerTypeOption[0].data.dataTime,
|
|
|
|
+ series: [{
|
|
|
|
+ name: "人数",
|
|
|
|
+ // type: "line",
|
|
|
|
+ data: this.partnerTypeOption[0].data.data
|
|
|
|
+ }]
|
|
|
|
+ };
|
|
|
|
+ this.chartData1 = JSON.parse(JSON.stringify(rualit)); //默认显示最高等级数据
|
|
|
|
+ console.log(this.chartData1);
|
|
|
|
+ this.summarygrade = this.partnerTypeOption[0].grade; //默认获取最高身份等级
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -486,24 +403,24 @@
|
|
margin-top: 2px;
|
|
margin-top: 2px;
|
|
}
|
|
}
|
|
|
|
|
|
- .search-data {
|
|
|
|
- color: #666666;
|
|
|
|
- border: 1px solid #EEEEEE;
|
|
|
|
|
|
+ .quickSwitchDate {
|
|
|
|
+ border: 1rpx solid #eee;
|
|
|
|
+ border-radius: 4rpx;
|
|
|
|
+
|
|
|
|
+ .tab {
|
|
|
|
+ padding: 6rpx 12rpx;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ font-size: 27rpx;
|
|
|
|
+ color: #666;
|
|
|
|
+ }
|
|
|
|
|
|
.active {
|
|
.active {
|
|
color: #FFFFFF;
|
|
color: #FFFFFF;
|
|
background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
|
|
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 {
|
|
.statistics-number {
|
|
margin: 10px 10px 20px 10px;
|
|
margin: 10px 10px 20px 10px;
|