feat(performanceEchart): 移除无用组件

This commit is contained in:
woody 2025-08-05 18:06:59 +08:00
parent 4bc1929b30
commit b6fe04ea07
1 changed files with 367 additions and 366 deletions

View File

@ -1,415 +1,416 @@
<template> <template>
<view class="main"> <view class="main">
<view class="top-lists">
<view class="top-lists"> <view
<view v-for="(item, index) in navList" v-show="item.menuKey!=''" :key="index" v-for="(item, index) in navList"
:class="navIndex == index ? 'styles' : ''" class="nav-view" @click="clickHref(index)"> v-show="item.menuKey != ''"
{{ item.name }} :key="index"
</view> :class="navIndex == index ? 'styles' : ''"
</view> class="nav-view"
<view> @click="clickHref(index)"
>
</view> {{ item.name }}
<!-- 业绩分布 !--> </view>
<template> </view>
<view v-if="navIndex==0 && navList[0].menuKey!=''"> <view> </view>
<view v-if='ifDetail==0'> <!-- 业绩分布 !-->
<view> <template>
<performanceDistribution /> <view v-if="navIndex == 0 && navList[0].menuKey != ''">
</view> <view v-if="ifDetail == 0">
<!-- 安置图 --> <view>
<view> <performanceDistribution />
<placement /> </view>
</view> <!-- 安置图 -->
</view> <view>
<view v-else> <placement />
<!-- 月度业绩详情 --> </view>
<view> </view>
<monthPvDetail :placeDept='ifDetail' /> <view v-else>
</view> <!-- 月度业绩详情 -->
<view>
</view> <monthPvDetail :placeDept="ifDetail" />
</view> </view>
</template> </view>
<!-- 安置图 !--> </view>
<!-- <template> </template>
<!-- 安置图 !-->
<!-- <template>
<view v-if="navIndex==1"> <view v-if="navIndex==1">
</view> </view>
</template> --> </template> -->
<!-- 月度新增统计 !--> <!-- 月度新增统计 !-->
<template> <template>
<!-- <view v-if="navIndex==1"> <!-- <view v-if="navIndex==1">
</view> --> </view> -->
</template> </template>
<!-- 月度新增业绩 / 数据查询 !--> <!-- 月度新增业绩 / 数据查询 !-->
<template> <template>
<view v-if="navIndex==1" style="padding-bottom: 20rpx;"> <view v-if="navIndex == 1" style="padding-bottom: 20rpx">
<!-- 首购新增业绩 !--> <!-- 首购新增业绩 !-->
<view> <view>
<fistAddPv /> <fistAddPv />
</view> </view>
<!-- 首购业绩分布 !--> <!-- 首购业绩分布 !-->
<view> <view>
<firstPv></firstPv> <firstPv></firstPv>
</view> </view>
<!-- 复购新增业绩 !--> <!-- 复购新增业绩 !-->
<!-- <view> <!-- <view>
<repAddPv /> <repAddPv />
</view> --> </view> -->
<!-- 复购业绩分布 !--> <!-- 复购业绩分布 !-->
<!-- <view> <!-- <view>
<secondPv></secondPv> <secondPv></secondPv>
</view> --> </view> -->
<!-- 奖衔业绩分布 !--> <!-- 奖衔业绩分布 !-->
<!-- <view> <!-- <view>
<placementPerformance /> <placementPerformance />
</view> --> </view> -->
<!-- 真实业绩分布 !--> <!-- 真实业绩分布 !-->
<!-- <view> <!-- <view>
<realPerformances /> <realPerformances />
</view> --> </view> -->
<!-- 首购新增业绩对比 !--> <!-- 首购新增业绩对比 !-->
<view> <view>
<mounthPvCompare /> <mounthPvCompare />
</view> </view>
<!-- 活跃会员对比 !--> <!-- 活跃会员对比 !-->
<view> <view>
<activeMembers></activeMembers> <activeMembers></activeMembers>
</view> </view>
<!-- 推荐小区分布 !-->
<!-- 推荐小区分布 !--> <!-- <view>
<!-- <view>
<recommendedCommunity /> <recommendedCommunity />
</view> --> </view> -->
<!-- 推荐平均用时 -->
<!-- 推荐平均用时 --> <!-- <view>
<!-- <view>
<recommendTime /> <recommendTime />
</view> --> </view> -->
</view>
</template>
</view> <!-- 直推业绩 !-->
</template> <template>
<view v-if="navIndex == 2">
<!-- 直推业绩 !--> <view class="height-auto-s">
<template> <view style="font-size: 28rpx">{{ '直推业绩' }}</view>
<view v-if="navIndex==2"> <view class="flex-ss">
<view class="height-auto-s"> <view class="time1">
<view style="font-size: 28rpx;">{{'直推业绩'}}</view> <picker
<view class="flex-ss"> :value="query.startDate"
<view class="time1"> fields="month"
<picker :value="query.startDate" fields='month' mode="date" @change="bindDateChange"> mode="date"
<view v-if="query.startDate!=''" class="uni-inputs">{{query.startDate}}</view> @change="bindDateChange"
<view v-else class="uni-input">{{'开始日期'}}</view> >
</picker> <view v-if="query.startDate != ''" class="uni-inputs">{{
</view> query.startDate
<!-- <view class="text_s">{{'至'}}</view> }}</view>
<view v-else class="uni-input">{{ '开始日期' }}</view>
</picker>
</view>
<!-- <view class="text_s">{{'至'}}</view>
<view class="time1" style="margin-right: 0;"> <view class="time1" style="margin-right: 0;">
<picker :value="query.endDate" mode="date" @change="bindDateChange1"> <picker :value="query.endDate" mode="date" @change="bindDateChange1">
<view v-if="query.endDate!=''" class="uni-inputs">{{query.endDate}}</view> <view v-if="query.endDate!=''" class="uni-inputs">{{query.endDate}}</view>
<view v-else class="uni-input">{{'结束日期'}}</view> <view v-else class="uni-input">{{'结束日期'}}</view>
</picker> </picker>
</view> --> </view> -->
</view> </view>
</view> </view>
<!-- 推荐业绩分布 !--> <!-- 推荐业绩分布 !-->
<view> <view>
<recommendPerformance ref="recommends" /> <recommendPerformance ref="recommends" />
</view> </view>
<!-- 等级业绩 !--> <!-- 等级业绩 !-->
<view> <view>
<gradePerformance ref="recommends1" /> <gradePerformance ref="recommends1" />
</view> </view>
</view> </view>
</template> </template>
<!-- 推荐列表 !--> <!-- 推荐列表 !-->
<template> <template>
<view v-if="navIndex==3"> <view v-if="navIndex == 3">
<directList ref="sgsyData" /> <directList ref="sgsyData" />
</view> </view>
</template> </template>
</view>
</view>
</template> </template>
<script> <script>
import * as api from '@/config/login.js' import * as api from '@/config/login.js'
import * as apis from '@/config/market.js' import * as apis from '@/config/market.js'
import { import { setToken } from '@/config/auth.js'
setToken import store from '@/store'
} from '@/config/auth.js' import placement from '@/components/distribution/placement.vue'
import store from '@/store' import placementPerformance from '@/components/distribution/placementPerformance.vue'
import placement from '@/components/distribution/placement.vue' import fistAddPv from '@/components/distribution/fistAddPv.vue'
import placementPerformance from '@/components/distribution/placementPerformance.vue' import mounthPvCompare from '@/components/distribution/mounthPvCompare.vue'
import fistAddPv from '@/components/distribution/fistAddPv.vue' import activeMembers from '@/components/distribution/activeMembers.vue'
import mounthPvCompare from '@/components/distribution/mounthPvCompare.vue' import repAddPv from '@/components/distribution/repAddPv.vue'
import activeMembers from '@/components/distribution/activeMembers.vue' import recommendedCommunity from '@/components/distribution/recommendedCommunity.vue'
import repAddPv from '@/components/distribution/repAddPv.vue' import firstPv from '@/components/distribution/firstPv.vue'
import recommendedCommunity from '@/components/distribution/recommendedCommunity.vue' import secondPv from '@/components/distribution/secondPv.vue'
import firstPv from '@/components/distribution/firstPv.vue' import realPerformances from '@/components/distribution/realPerformances.vue'
import secondPv from '@/components/distribution/secondPv.vue' // import realPerformance from '@/components/distribution/realPerformance.vue'
import realPerformances from '@/components/distribution/realPerformances.vue' import directList from '@/components/distribution/directList.vue'
import realPerformance from '@/components/distribution/realPerformance.vue' import recommendTime from '@/components/distribution/recommendTime.vue'
import directList from '@/components/distribution/directList.vue' import gradePerformance from '@/components/distribution/gradePerformance.vue'
import recommendTime from '@/components/distribution/recommendTime.vue' import recommendPerformance from '@/components/distribution/recommendPerformance.vue'
import gradePerformance from '@/components/distribution/gradePerformance.vue' import performanceDistribution from '@/components/distribution/performanceDistribution.vue'
import recommendPerformance from '@/components/distribution/recommendPerformance.vue' import monthPvDetail from '@/components/distribution/monthPvDetail.vue'
import performanceDistribution from '@/components/distribution/performanceDistribution.vue' export default {
import monthPvDetail from '@/components/distribution/monthPvDetail.vue' components: {
export default { placement,
realPerformances,
placementPerformance,
// realPerformance,
directList,
recommendTime,
gradePerformance,
recommendPerformance,
performanceDistribution,
fistAddPv,
repAddPv,
recommendedCommunity,
firstPv,
secondPv,
mounthPvCompare,
activeMembers,
monthPvDetail,
},
data() {
return {
index: null,
userInfo: [],
query: {
startDate: '',
},
marketList: [
{
text: '奖金来源',
id: 3,
path: '/marketDynamics',
name: 'bonusSource',
isShow: false,
},
],
navList: [
{
name: '月度业绩',
menuKey: '',
value: 'ConsanguinityCheck',
},
{
name: '数据查询',
menuKey: '',
value: 'monthlyPerformance',
},
{
name: '直推业绩',
menuKey: '',
value: 'recommendPerformance',
},
{
name: '推荐列表',
menuKey: '',
value: 'recommendList',
},
components: { // {
placement, // name: "",
realPerformances, // menuKey: "",
placementPerformance, // value: "placementChart"
realPerformance, // },
directList, // {
recommendTime, // name: "",
gradePerformance, // menuKey: "",
recommendPerformance, // value: "monthlyChart"
performanceDistribution, // },
fistAddPv,
repAddPv,
recommendedCommunity,
firstPv,
secondPv,
mounthPvCompare,
activeMembers,
monthPvDetail
},
data() {
return {
index: null,
userInfo: [],
query: {
startDate: '',
},
marketList: [{
text: '奖金来源',
id: 3,
path: "/marketDynamics",
name: 'bonusSource',
isShow: false,
}, ],
navList: [{
name: '月度业绩',
menuKey: "",
value: "ConsanguinityCheck"
},
{
name: '数据查询',
menuKey: "",
value: "monthlyPerformance"
},
{
name: '直推业绩',
menuKey: "",
value: "recommendPerformance"
},
{
name: '推荐列表',
menuKey: "",
value: "recommendList"
},
// { // {
// name: "", // name: '',
// menuKey: "", // menuKey: "",
// value: "placementChart" // value: "recommendTime"
// }, // },
// { ],
// name: "", navIndex: 0,
// menuKey: "", page: {
// value: "monthlyChart" pageSize: 50,
// }, pageNum: 1,
},
ifDetail: '0',
}
},
onLoad(val) {
this.query.startDate = this.getStartTime()
this.ifDetail = val.ifDetail || '0'
// this.query.endDate = this.getEndTime()
this.getMenuLists()
},
methods: {
getStartTime() {
let date = new Date()
date.setDate(1) //
let year = date.getFullYear() //
let month = date.getMonth() + 1 // 0-11+1
month = month > 9 ? month : '0' + month //
// return year + '-' + month + '-' + day
return year + '-' + month
},
// getEndTime() {
// var date = new Date();
// var year = date.getFullYear() //
// var month = date.getMonth() + 1; //
// var day = date.getDate() > 1 ? date.getDate() - 1 : date.getDate(); //
// var hour = date.getHours(); //
// var minutes = date.getMinutes(); //
// var seconds = date.getSeconds() //
// // 0
// if (month >= 1 && month <= 9) {
// month = "0" + month;
// }
// if (day >= 0 && day <= 9) {
// day = "0" + day;
// }
// if (hour >= 0 && hour <= 9) {
// hour = "0" + hour;
// }
// if (minutes >= 0 && minutes <= 9) {
// minutes = "0" + minutes;
// }
// if (seconds >= 0 && seconds <= 9) {
// seconds = "0" + seconds;
// }
// // return year + "-" + month + "-" + day + " "
// return year + "-" + month
// },
bindDateChange(e) {
this.query.startDate = e.detail.value
this.$refs.recommends.upDateCover2(this.query)
this.$refs.recommends1.upDateCover2(this.query)
},
// { async onReachBottom() {
// name: '', if (this.navIndex == 6) {
// menuKey: "", this.page.pageNum + 1
// value: "recommendTime" this.$refs.sgsyData.getDataList((this.page.pageNum += 1))
// }, }
},
], bindPickerChange(e) {
navIndex: 0, this.index = e.detail.value
page: { },
pageSize: 50, clickHref(index) {
pageNum: 1, // let that= this;
}, this.navIndex = index
ifDetail: "0" this.ifDetail = '0'
} },
}, getMenuLists() {
onLoad(val) { api.menuList().then(res => {
res.data.forEach(item => {
this.query.startDate = this.getStartTime() this.navList.forEach(items => {
this.ifDetail = val.ifDetail || "0" if (item.menuKey == items.value) {
// this.query.endDate = this.getEndTime() items.menuKey = item.menuKey
this.getMenuLists() }
}, })
methods: { if (this.marketList[0].name == item.menuKey) {
getStartTime() { this.marketList[0].isShow = true
let date = new Date() }
date.setDate(1) // })
let year = date.getFullYear() // })
let month = date.getMonth() + 1 // 0-11+1 },
month = month > 9 ? month : '0' + month // },
// return year + '-' + month + '-' + day }
return year + "-" + month
},
// getEndTime() {
// var date = new Date();
// var year = date.getFullYear() //
// var month = date.getMonth() + 1; //
// var day = date.getDate() > 1 ? date.getDate() - 1 : date.getDate(); //
// var hour = date.getHours(); //
// var minutes = date.getMinutes(); //
// var seconds = date.getSeconds() //
// // 0
// if (month >= 1 && month <= 9) {
// month = "0" + month;
// }
// if (day >= 0 && day <= 9) {
// day = "0" + day;
// }
// if (hour >= 0 && hour <= 9) {
// hour = "0" + hour;
// }
// if (minutes >= 0 && minutes <= 9) {
// minutes = "0" + minutes;
// }
// if (seconds >= 0 && seconds <= 9) {
// seconds = "0" + seconds;
// }
// // return year + "-" + month + "-" + day + " "
// return year + "-" + month
// },
bindDateChange(e) {
this.query.startDate = e.detail.value
this.$refs.recommends.upDateCover2(this.query)
this.$refs.recommends1.upDateCover2(this.query)
},
async onReachBottom() {
if (this.navIndex == 6) {
this.page.pageNum + 1
this.$refs.sgsyData.getDataList(this.page.pageNum += 1);
}
},
bindPickerChange(e) {
this.index = e.detail.value
},
clickHref(index) {
// let that= this;
this.navIndex = index
this.ifDetail = "0"
},
getMenuLists() {
api.menuList().then((res) => {
res.data.forEach((item) => {
this.navList.forEach((items) => {
if (item.menuKey == items.value) {
items.menuKey = item.menuKey
}
})
if (this.marketList[0].name == item.menuKey) {
this.marketList[0].isShow = true
}
})
})
},
},
}
</script> </script>
<style lang="scss"> <style lang="scss">
.uni-inputs { .uni-inputs {
color: #333; color: #333;
} }
.text_s { .text_s {
font-size: 24rpx; font-size: 24rpx;
color: #333; color: #333;
} }
.height-auto-s { .height-auto-s {
background-color: #fff; background-color: #fff;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 20rpx; margin-top: 20rpx;
padding: 25rpx 60rpx 0 60rpx; padding: 25rpx 60rpx 0 60rpx;
// line-height: 75rpx; // line-height: 75rpx;
} }
.flex-ss { .flex-ss {
display: flex; display: flex;
} }
.time1 { .time1 {
width: 158rpx; width: 158rpx;
// height: 75rpx; // height: 75rpx;
// border-bottom: 1rpx solid #eee; // border-bottom: 1rpx solid #eee;
margin: 0 20rpx 30rpx 20rpx; margin: 0 20rpx 30rpx 20rpx;
color: #999; color: #999;
text-align: center; text-align: center;
font-size: 24rpx; font-size: 24rpx;
/* margin-bottom: 30rpx; */ /* margin-bottom: 30rpx; */
} }
.texts {
color: #333;
font-size: 26rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
/* width:200rpx; */
text-align: right;
}
.select-text {
display: flex;
margin-right: 20rpx;
font-size: 26rpx;
color: #333;
position: relative;
}
.texts { .selIcon {
color: #333; width: 30rpx;
font-size: 26rpx; height: 30rpx;
overflow: hidden; margin: 5rpx 0 0 20rpx;
white-space: nowrap; }
text-overflow: ellipsis;
/* width:200rpx; */
text-align: right;
}
.select-text { page {
display: flex; background-color: #f2f2f2;
margin-right: 20rpx; }
font-size: 26rpx;
color: #333;
position: relative;
}
.selIcon { .styles {
width: 30rpx; border: none !important;
height: 30rpx; color: #fff !important;
margin: 5rpx 0 0 20rpx; background: #d61820;
} }
page { .top-lists {
background-color: #f2f2f2; display: flex;
} flex-wrap: nowrap;
overflow-x: auto;
background-color: #fff;
padding: 20rpx 0;
margin-bottom: 20rpx;
.styles { .nav-view {
border: none !important; min-width: 110rpx;
color: #fff !important; padding: 5rpx 26rpx;
background: #d61820; border-radius: 10rpx;
} border: 2rpx solid #999999;
font-size: 28rpx;
.top-lists { text-align: center;
display: flex; margin: 0 10rpx;
flex-wrap: nowrap; color: #999;
overflow-x: auto; }
background-color: #fff; }
padding: 20rpx 0;
margin-bottom: 20rpx;
.nav-view {
min-width: 110rpx;
padding: 5rpx 26rpx;
border-radius: 10rpx;
border: 2rpx solid #999999;
font-size: 28rpx;
text-align: center;
margin: 0 10rpx;
color: #999;
}
}
</style> </style>