|
@@ -13,15 +13,13 @@
|
|
</view> -->
|
|
</view> -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="body-box" style="margin-top: 100px" v-if="type == 1">
|
|
|
|
|
|
+ <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=" dis j-s a-c" style="padding: 10px 10px 0 0;">
|
|
<view class="statistics-title">新增人员汇总统计</view>
|
|
<view class="statistics-title">新增人员汇总统计</view>
|
|
- <view class="search-data">
|
|
|
|
- <text v-for="(val, index) in year" :key="index" :class="val.startShow ? 'active' : ''"
|
|
|
|
- @click="onSeachYear(val, index, 1)">{{ val.lable }}</text>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <year @queryData="queryData" @time="getTime"></year>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
- <view class="statistics-number ">
|
|
|
|
|
|
+ <view class="statistics-number ">
|
|
<view v-if="level <= 4">
|
|
<view v-if="level <= 4">
|
|
<text>{{ echartsList.onePartnerNum || 0 }}</text>
|
|
<text>{{ echartsList.onePartnerNum || 0 }}</text>
|
|
<text>一级合伙人</text>
|
|
<text>一级合伙人</text>
|
|
@@ -77,21 +75,20 @@
|
|
<qiun-data-charts v-else type="area" :opts="opts1" :chartData="chartData1" />
|
|
<qiun-data-charts v-else type="area" :opts="opts1" :chartData="chartData1" />
|
|
|
|
|
|
</view>
|
|
</view>
|
|
- <view class="body-box" v-if="type == 1">
|
|
|
|
|
|
+ <view class="body-box" v-if="type == 1 && level!==5">
|
|
<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 class="search-data">
|
|
|
|
- <text v-for="(val, index) in year" :key="index" :class="val.startShow ? 'active' : ''"
|
|
|
|
- @click="onSeachYear(val, index, 2)">{{ val.lable }}</text>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <year @queryData="analysisQueryData" @time="getTime"></year>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
<leverStaff @getPartnerType="getPartnerType2"></leverStaff>
|
|
<leverStaff @getPartnerType="getPartnerType2"></leverStaff>
|
|
- <!-- <o-empty v-if="echartsList.countUserNumVoList && echartsList.countUserNumVoList.length==0" height="20vh" /> -->
|
|
|
|
- <view class="charts-box" style="height: 200px;">
|
|
|
|
|
|
+ <o-empty v-if="!echartsList2.newProportion && !echartsList2.oldProportion" height="20vh" />
|
|
|
|
+ <view v-else 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">
|
|
|
|
|
|
+ <view class="body-box" style="padding-bottom: 10px;" v-if="type == 1 && level!==5">
|
|
<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>
|
|
@@ -122,13 +119,39 @@
|
|
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="body-box" style="margin-top: 100px;" v-if="type == 2">
|
|
|
|
|
|
+ <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=" dis j-s a-c" style="padding: 10px 10px 0 0;">
|
|
<view class="statistics-title">新增人员汇总统计</view>
|
|
<view class="statistics-title">新增人员汇总统计</view>
|
|
- <view class="search-data">
|
|
|
|
- <text v-for="(val, index) in year" :key="index" :class="val.startShow ? 'active' : ''"
|
|
|
|
- @click="onSeachYear(val, index, 1)">{{ val.lable }}</text>
|
|
|
|
|
|
+ <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>
|
|
|
|
+ <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>
|
|
<view class="statistics-number ">
|
|
<view class="statistics-number ">
|
|
<view>
|
|
<view>
|
|
@@ -159,9 +182,11 @@ import {
|
|
mapState,
|
|
mapState,
|
|
} from "vuex"
|
|
} from "vuex"
|
|
import leverStaff from "../components/leverStaff.vue"
|
|
import leverStaff from "../components/leverStaff.vue"
|
|
|
|
+import year from "../components/year.vue"
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
- leverStaff
|
|
|
|
|
|
+ leverStaff,
|
|
|
|
+ year
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -175,6 +200,7 @@ export default {
|
|
dataLabel: true,
|
|
dataLabel: true,
|
|
},
|
|
},
|
|
chartsDataPie2: {},
|
|
chartsDataPie2: {},
|
|
|
|
+ echartsList2:{},
|
|
level: '',
|
|
level: '',
|
|
type: null,
|
|
type: null,
|
|
typeStatistics: 1,
|
|
typeStatistics: 1,
|
|
@@ -281,7 +307,7 @@ export default {
|
|
// this.queryData({type:1})
|
|
// this.queryData({type:1})
|
|
// }
|
|
// }
|
|
this.queryData()
|
|
this.queryData()
|
|
- if (this.type == 1) {
|
|
|
|
|
|
+ if (this.type == 1 && this.level!==5) {
|
|
this.analysisQueryData()
|
|
this.analysisQueryData()
|
|
this.rankingQueryData()
|
|
this.rankingQueryData()
|
|
}
|
|
}
|
|
@@ -324,67 +350,7 @@ export default {
|
|
fail: (err) => { }
|
|
fail: (err) => { }
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- onSeachYear(val, index, type) {
|
|
|
|
- this.year.map((value, i) => i === index ? value.startShow = !value.startShow : value.startShow = false);
|
|
|
|
- let now = new Date();
|
|
|
|
- let year = now.getFullYear();
|
|
|
|
- let month = now.getMonth() + 1; // 月份是从0开始的,所以需要加1
|
|
|
|
- let day = now.getDate();
|
|
|
|
- if (index == 0 && val.startShow) {
|
|
|
|
- let theDay = `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
|
|
|
|
- this.beginTime = theDay + ' 00:00:01'
|
|
|
|
- this.endTime = theDay + ' 23:59:59'
|
|
|
|
- type == 1 ? this.queryData() : this.analysisQueryData()
|
|
|
|
- }
|
|
|
|
- else if (index == 1 && val.startShow) {
|
|
|
|
- let dayOfWeek = now.getDay();
|
|
|
|
- let firstDayOfWeek = new Date(year, now.getMonth(), day - dayOfWeek + 1);
|
|
|
|
- let lastDayOfWeek = new Date(year, now.getMonth(), day + (7 - dayOfWeek));
|
|
|
|
- let monday = this.formatDate(firstDayOfWeek);
|
|
|
|
- let sunday = this.formatDate(lastDayOfWeek);
|
|
|
|
- this.beginTime = monday + ' 00:00:01'
|
|
|
|
- this.endTime = sunday + ' 23:59:59'
|
|
|
|
- type == 1 ? this.queryData() : this.analysisQueryData()
|
|
|
|
- }
|
|
|
|
- else if (index == 2 && val.startShow) {
|
|
|
|
- this.beginTime = this.getCurrentMonthFirst() + ' 00:00:01'
|
|
|
|
- this.endTime = this.getCurrentMonthLast() + ' 23:59:59'
|
|
|
|
- type == 1 ? this.queryData() : this.analysisQueryData()
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- this.beginTime = ''
|
|
|
|
- this.endTime = ''
|
|
|
|
- type == 1 ? this.queryData() : this.analysisQueryData()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- formatDate(date) {
|
|
|
|
- let year = date.getFullYear();
|
|
|
|
- let month = date.getMonth() + 1;
|
|
|
|
- let day = date.getDate();
|
|
|
|
- month = month < 10 ? '0' + month : month;
|
|
|
|
- day = day < 10 ? '0' + day : day;
|
|
|
|
- return year + '-' + month + '-' + day;
|
|
|
|
- },
|
|
|
|
- getCurrentMonthFirst() {
|
|
|
|
- // 获取当月第一天数据
|
|
|
|
- let date = new Date()
|
|
|
|
- date.setDate(1)
|
|
|
|
- let month = parseInt(date.getMonth() + 1)
|
|
|
|
- let day = date.getDate()
|
|
|
|
- if (month < 10) month = '0' + month
|
|
|
|
- if (day < 10) day = '0' + day
|
|
|
|
- return date.getFullYear() + '-' + month + '-' + day
|
|
|
|
- },
|
|
|
|
- getCurrentMonthLast() {
|
|
|
|
- // 获取当月最后一天数据
|
|
|
|
- let date = new Date()
|
|
|
|
- let year = date.getFullYear()
|
|
|
|
- let month = date.getMonth() + 1
|
|
|
|
- month = month < 10 ? '0' + month : month
|
|
|
|
- let day = new Date(year, month, 0)
|
|
|
|
- return year + '-' + month + '-' + day.getDate()
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
async analysisQueryData() {
|
|
async analysisQueryData() {
|
|
let params = {
|
|
let params = {
|
|
beginTime: this.beginTime,
|
|
beginTime: this.beginTime,
|
|
@@ -392,7 +358,8 @@ export default {
|
|
type: this.typeStatistics2,
|
|
type: this.typeStatistics2,
|
|
}
|
|
}
|
|
let res = await this.$http.post('/APPPartner/getPartnerProportion', params);
|
|
let res = await this.$http.post('/APPPartner/getPartnerProportion', params);
|
|
- if (res.code == '200') {
|
|
|
|
|
|
+ if (res.code == '200' ) {
|
|
|
|
+ this.echartsList2=res.data
|
|
this.chartsDataPie2 = {
|
|
this.chartsDataPie2 = {
|
|
series: [{
|
|
series: [{
|
|
// "data": [
|
|
// "data": [
|
|
@@ -402,8 +369,8 @@ export default {
|
|
// { name: "历史", value: res.data.oldProportion, labelText: `历史:${res.data.oldProportion}%` }
|
|
// { name: "历史", value: res.data.oldProportion, labelText: `历史:${res.data.oldProportion}%` }
|
|
// ]
|
|
// ]
|
|
"data": [
|
|
"data": [
|
|
- { name: `新增`, value: res.data.newProportion},
|
|
|
|
- { name: "历史", value: res.data.oldProportion}
|
|
|
|
|
|
+ { name: `新增`, value: res.data.newProportion?res.data.newProportion:0},
|
|
|
|
+ { name: "历史", value: res.data.oldProportion?res.data.oldProportion:0}
|
|
]
|
|
]
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
@@ -420,6 +387,10 @@ export default {
|
|
this.directLsit = res.data
|
|
this.directLsit = res.data
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ getTime(beginTime,endTime){
|
|
|
|
+ this.beginTime=beginTime
|
|
|
|
+ this.endTime=endTime
|
|
|
|
+ },
|
|
async queryData() {
|
|
async queryData() {
|
|
let params = {
|
|
let params = {
|
|
beginTime: this.beginTime,
|
|
beginTime: this.beginTime,
|
|
@@ -427,8 +398,15 @@ export default {
|
|
type: this.typeStatistics,
|
|
type: this.typeStatistics,
|
|
}
|
|
}
|
|
let res = {}
|
|
let res = {}
|
|
- if (this.type == 1) {
|
|
|
|
|
|
+ if (this.type == 1 &&this.level!==5) {
|
|
res = await this.$http.post('/APPPartner/getPartnerCount', params);
|
|
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 {
|
|
else {
|
|
res = await this.$http.post('/APPPartner/getCountUser', params);
|
|
res = await this.$http.post('/APPPartner/getCountUser', params);
|