Browse Source

修改小程序名称

autoSR1012
douzhuo 2 years ago
parent
commit
308f36ee6b
1 changed files with 104 additions and 38 deletions
  1. +104
    -38
      pages/center/Piabodata/TrendAnalysis.vue

+ 104
- 38
pages/center/Piabodata/TrendAnalysis.vue View File

@@ -1,7 +1,7 @@
<template> <template>
<view> <view>
<view class="timetabct"> <view class="timetabct">
<view class="timetabctview">
<view class="timetabctview">
<view :class="{ activecllasscet: activeTotal == 0 }" @click="tabtimetap(0)">7天</view> <view :class="{ activecllasscet: activeTotal == 0 }" @click="tabtimetap(0)">7天</view>
</view> </view>
<view class="timetabctview"> <view class="timetabctview">
@@ -41,7 +41,7 @@
<text style="color: #333333;">{{kanbanlist.duibitime}}</text> <text style="color: #333333;">{{kanbanlist.duibitime}}</text>
</view> </view>
</view> </view>
<!-- 简报 --> <!-- 简报 -->
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="boxzonglan" style="min-height: 100rpx;"> <view class="boxzonglan" style="min-height: 100rpx;">
@@ -61,8 +61,7 @@
<view class="comparesize" v-if="compareFlag&&timepickpickisshow"> <view class="comparesize" v-if="compareFlag&&timepickpickisshow">
<text style="margin-right: 10rpx;">对比:{{index==1?item.num1+'%':item.num1}} </text> <text style="margin-right: 10rpx;">对比:{{index==1?item.num1+'%':item.num1}} </text>
<template v-if="item.num2*1 != 0"> <template v-if="item.num2*1 != 0">
<text
:style="{color:item.num2*1>0?'red':'green'}">
<text :style="{color:item.num2*1>0?'red':'green'}">
{{item.num2}}{{ item.name == '平均执行率' ? "%" : "" }}{{item.num2*1 > 0 ? '↑':'↓'}}</text> {{item.num2}}{{ item.name == '平均执行率' ? "%" : "" }}{{item.num2*1 > 0 ? '↑':'↓'}}</text>
</template> </template>
<template v-else> <template v-else>
@@ -96,6 +95,11 @@




<view class="chart"> <view class="chart">
<view class="marketingBusiness">
<text class="marketingBusinesstext"
@click="showMarketingBusiness = true">{{ marketingBusinessText }}</text>
</view>

<view style="padding: 30rpx;padding-bottom: 20rpx;align-items: center;" v-if="Selectlevel"> <view style="padding: 30rpx;padding-bottom: 20rpx;align-items: center;" v-if="Selectlevel">
<view style="display: flex;align-items: center;border-bottom: 1px solid #C9C9C9;height: 80rpx;"> <view style="display: flex;align-items: center;border-bottom: 1px solid #C9C9C9;height: 80rpx;">
<view>选择一级:</view> <view>选择一级:</view>
@@ -123,7 +127,8 @@
</view> </view>
</view> </view>


<view style="padding: 0 0 40rpx 0;display: flex;align-items: center;justify-content: center;position: relative;z-index: 999999;"
<view
style="padding: 0 0 40rpx 0;display: flex;align-items: center;justify-content: center;position: relative;z-index: 999999;"
v-if="Selecttuandui&&Selecttuanduiobj.name" @click="oninputtap4()"> v-if="Selecttuandui&&Selecttuanduiobj.name" @click="oninputtap4()">
<view class="title2-che" style="width: 220rpx;"> <view class="title2-che" style="width: 220rpx;">
{{Selecttuanduiobj.name}} {{Selecttuanduiobj.name}}
@@ -206,7 +211,7 @@
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar> <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
<newcalendar v-model="totalTimeShow2" :planNum='intervaltime' mode="date" @change="totalTimeChange2"> <newcalendar v-model="totalTimeShow2" :planNum='intervaltime' mode="date" @change="totalTimeChange2">
</newcalendar> </newcalendar>
<!-- 接待时间 -到访时间--> <!-- 接待时间 -到访时间-->
<u-popup v-model="timeshow" mode="bottom"> <u-popup v-model="timeshow" mode="bottom">
<view class="timeview" :style="{ color: activeTotal == 5 ? '#2B6EFF' : '#333333' }" <view class="timeview" :style="{ color: activeTotal == 5 ? '#2B6EFF' : '#333333' }"
@@ -228,12 +233,15 @@
@click="tabtimetap(4, '')"> @click="tabtimetap(4, '')">
自定义</view> 自定义</view>
</u-popup> </u-popup>
<!-- 顾问 --> <!-- 顾问 -->
<u-select v-model="selectshow" :list="freeList" @confirm="actionSelectCallback"></u-select> <u-select v-model="selectshow" :list="freeList" @confirm="actionSelectCallback"></u-select>
<!-- 全部话术 --> <!-- 全部话术 -->
<u-select v-model="huashushow" :list="huashuList" @confirm="actionSelectCallback1"></u-select> <u-select v-model="huashushow" :list="huashuList" @confirm="actionSelectCallback1"></u-select>


<u-select v-model="showMarketingBusiness" mode="single-column" :list="showMarketingList"
label-name="templateName" value-name="id" @confirm="selectMarketingBusiness"></u-select>

<!-- 加载组件 --> <!-- 加载组件 -->
<loading v-model="LOADING"></loading> <loading v-model="LOADING"></loading>
</view> </view>
@@ -277,12 +285,6 @@
num1: '0', num1: '0',
num2: '0' num2: '0'
}, },
// { // 不需要用
// name: '有效接待',
// num: '10',
// num1: '0',
// num2: '0'
// },
], ],
activeTotal: 0, //时间下标 activeTotal: 0, //时间下标
newactiveTotal: 0, //tab下标 newactiveTotal: 0, //tab下标
@@ -316,7 +318,6 @@
lineOptsect: {}, //图表数据 lineOptsect: {}, //图表数据
Showhiddenunits: false, Showhiddenunits: false,
selectlist: [], selectlist: [],
guwenshow: false,
lopanobj: { lopanobj: {
id: '', id: '',
name: '' name: ''
@@ -351,15 +352,21 @@
tableDate: [], tableDate: [],
guwenFlag: false, guwenFlag: false,
opts: {}, // 配置项为空 opts: {}, // 配置项为空

marketingBusinessText: '请选择销讲业务',
showMarketingBusiness: false, // 展示可选择的销讲业务
showMarketingList: [], // 销讲业务列表
marketingBusiness: '', // 销讲业务
fncMap: ['', 'getAllGuWen', '', 'getAllYiJi', 'getAllErJi'], // 确认后事件合集
}; };


}, },
onLoad(option) { onLoad(option) {
this.LOADING = true this.LOADING = true
this.pamect.houseId = uni.getStorageSync('buildingID').id; this.pamect.houseId = uni.getStorageSync('buildingID').id;
this.init()
this.getFreeList() this.getFreeList()
this.getMarketingBusiness()

if (option.type == 1) { if (option.type == 1) {
this.timepickpickisshow = true this.timepickpickisshow = true
this.pamect.firstStartDate = option.staTime this.pamect.firstStartDate = option.staTime
@@ -367,10 +374,13 @@
this.pamect.lastStartDate = option.staTime1 this.pamect.lastStartDate = option.staTime1
this.pamect.lastEndDate = option.endtime1 this.pamect.lastEndDate = option.endtime1
this.pamect.timeType = '' this.pamect.timeType = ''
this.sheartime1 = `${this.fomatDate(this.pamect.firstStartDate)}-${this.fomatDate(this.pamect.firstEndDate)}`
this.sheartime1 =
`${this.fomatDate(this.pamect.firstStartDate)}-${this.fomatDate(this.pamect.firstEndDate)}`
this.sheartime2 = `${this.fomatDate(this.pamect.lastStartDate)}-${this.fomatDate(this.pamect.lastEndDate)}` this.sheartime2 = `${this.fomatDate(this.pamect.lastStartDate)}-${this.fomatDate(this.pamect.lastEndDate)}`
this.tabxuanxiangtap(3) this.tabxuanxiangtap(3)
this.$forceUpdate() this.$forceUpdate()
} else {
this.init()
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
@@ -414,6 +424,49 @@
// this.screen.agentId = e[0].value; // this.screen.agentId = e[0].value;
// this.counselorName = e[0].label; // this.counselorName = e[0].label;
}, },

// 获取销讲业务模板
getMarketingBusiness() {
this.$u.get("/customer/marketingBusiness", {
houseId: this.pamect.houseId
}).then(res => {
console.log(res)
if (res) {
this.showMarketingList = res
}
})
},

// 选择趋势分析
selectMarketingBusiness(e) {
this.marketingBusinessText = e[0].label
this.marketingBusiness = e[0].value
this[this.fncMap[this.newactiveTotal]]()
},

// 获取顾问
getAllGuWen() {
if (this.pamect.accountId == "") {
this.getguwenlist()
} else {
this.ConsultantDimension()
}
},

// 获取一级
getAllYiJi() {
this.speakingLevel()
},

// 获取二级
getAllErJi() {
if (this.pamect.marketingId == '') {
this.getonsyiji()
} else {
this.aboutEecondary()
}
},

//获取顾问列表 //获取顾问列表
getFreeList() { getFreeList() {
this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", { this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", {
@@ -421,7 +474,7 @@
}).then(res => { }).then(res => {
this.freeList = res; this.freeList = res;
this.huashuList = res; this.huashuList = res;
if(this.freeList.length){
if (this.freeList.length) {
this.freeList.forEach(item => { this.freeList.forEach(item => {
item.label = item.name; item.label = item.name;
item.value = item.accountId item.value = item.accountId
@@ -429,6 +482,7 @@
} }
}) })
}, },

// 时间格式转换 // 时间格式转换
fomatDate(date) { fomatDate(date) {
if (!date) return '--' if (!date) return '--'
@@ -437,6 +491,7 @@
let result = str.split('-') let result = str.split('-')
return `${result[1]}-${result[2]}` return `${result[1]}-${result[2]}`
}, },

//是否对比 //是否对比
checkboxChange() { checkboxChange() {
if (this.newactiveTotal == 3) { if (this.newactiveTotal == 3) {
@@ -471,18 +526,17 @@
this.$u.post("/cusLvStatistics/lyAndcp", this.pamect).then(data => { this.$u.post("/cusLvStatistics/lyAndcp", this.pamect).then(data => {
this.pamect.lastStartDate = data.lastStartDate; this.pamect.lastStartDate = data.lastStartDate;
this.pamect.lastEndDate = data.lastEndDate; this.pamect.lastEndDate = data.lastEndDate;
this.numlist[0].num = data.startSumCustomer||0
this.numlist[1].num = data.startFraction||0
this.numlist[0].num = data.startSumCustomer || 0
this.numlist[1].num = data.startFraction || 0


this.numlist[2].num = Math.floor(data.startSumDuration / 60) || 0; this.numlist[2].num = Math.floor(data.startSumDuration / 60) || 0;
if (data.endSumDuration != null) { if (data.endSumDuration != null) {
this.compareFlag = true this.compareFlag = true
// return
this.numlist[0].num1 = data.endSumCustomer||0
this.numlist[1].num1 = data.endFraction||0
this.numlist[0].num1 = data.endSumCustomer || 0
this.numlist[1].num1 = data.endFraction || 0
this.numlist[2].num1 = Math.floor(data.endSumDuration / 60) || 0; this.numlist[2].num1 = Math.floor(data.endSumDuration / 60) || 0;
this.numlist[0].num2 = data.contrastSumCustomer this.numlist[0].num2 = data.contrastSumCustomer
this.numlist[1].num2 = data.contrastFraction||0
this.numlist[1].num2 = data.contrastFraction || 0
this.numlist[2].num2 = data.contrastSumDuration this.numlist[2].num2 = data.contrastSumDuration
} else { } else {
this.compareFlag = false this.compareFlag = false
@@ -532,7 +586,7 @@
this.$forceUpdate() this.$forceUpdate()
this.LOADING = false this.LOADING = false
}, 1500) }, 1500)
}).catch(e => { }).catch(e => {
this.LOADING = false this.LOADING = false
}) })
@@ -649,15 +703,10 @@
//tab切换 //tab切换
tabxuanxiangtap(index) { tabxuanxiangtap(index) {
this.newactiveTotal = index; this.newactiveTotal = index;
this.guwenshow = false;
this.Selectlevel = false; this.Selectlevel = false;
this.Selecttuandui = false; this.Selecttuandui = false;
this.timepickpickisshow = false; this.timepickpickisshow = false;
this.init() this.init()

if (index == 1) {
this.guwenshow = true;
}
}, },
//项目维度 //项目维度
ProjectDimension() { ProjectDimension() {
@@ -725,7 +774,7 @@
this.$forceUpdate() this.$forceUpdate()
}); });
}, },
//顾问维度 //顾问维度
ConsultantDimension() { ConsultantDimension() {
const that = this; const that = this;
@@ -733,6 +782,9 @@
categories: [], categories: [],
series: [] series: []
}; };
if (this.marketingBusiness) {
this.pamect.marketingBusiness = this.marketingBusiness
}
this.linetype = "radar"; this.linetype = "radar";
this.$u.post("/cusLvStatistics/accFirstLevelContrast", this.pamect).then(data => { this.$u.post("/cusLvStatistics/accFirstLevelContrast", this.pamect).then(data => {
// return // return
@@ -822,7 +874,8 @@
//获取顾问 //获取顾问
getguwenlist() { getguwenlist() {
this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", { this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", {
houseId: this.pamect.houseId
houseId: this.pamect.houseId,
marketingBusiness: this.marketingBusiness,
}).then(data => { }).then(data => {
this.selectlist = []; this.selectlist = [];
if (data.length == 0) { if (data.length == 0) {
@@ -830,10 +883,8 @@
categories: [], categories: [],
series: [] series: []
}; };
this.guwenshow = false;
return return
} else { } else {
this.guwenshow = true;
data.forEach(item => { data.forEach(item => {
this.selectlist.push({ this.selectlist.push({
value: item.accountId, value: item.accountId,
@@ -847,6 +898,7 @@
} }
}) })
}, },

//销讲一级 //销讲一级
speakingLevel() { speakingLevel() {
this.linetype = "radar"; this.linetype = "radar";
@@ -854,6 +906,9 @@
categories: [], categories: [],
series: [] series: []
}; };
if (this.marketingBusiness) {
this.pamect.marketingBusiness = this.marketingBusiness
}
this.$u.post("/cusLvStatistics/firstLevelContrast", this.pamect).then(data => { this.$u.post("/cusLvStatistics/firstLevelContrast", this.pamect).then(data => {
if (data.length == 0) { if (data.length == 0) {
return return
@@ -895,6 +950,9 @@
aboutEecondary() { aboutEecondary() {
this.lineOptsect = {}; this.lineOptsect = {};
this.linetype = "line"; this.linetype = "line";
if (this.marketingBusiness) {
this.pamect.marketingBusiness = this.marketingBusiness
}
this.$u.post("/cusLvStatistics/level2Contrast", this.pamect).then(data => { this.$u.post("/cusLvStatistics/level2Contrast", this.pamect).then(data => {
if (this.pamect.showStatus == 0) { if (this.pamect.showStatus == 0) {
this.lineOptsect = { this.lineOptsect = {
@@ -957,7 +1015,8 @@
//销讲二级:获取一级 //销讲二级:获取一级
getonsyiji() { getonsyiji() {
this.$u.post("/cusLvStatistics/findAllFirstLevel", { this.$u.post("/cusLvStatistics/findAllFirstLevel", {
houseId: this.pamect.houseId
houseId: this.pamect.houseId,
marketingBusiness: this.marketingBusiness,
}).then(data => { }).then(data => {
this.selectlist2 = []; this.selectlist2 = [];
if (data.length == 0) { if (data.length == 0) {
@@ -979,7 +1038,7 @@
this.Selectlevelobj.name = data[0].name; this.Selectlevelobj.name = data[0].name;
this.getonserji(this.Selectlevelobj.id) this.getonserji(this.Selectlevelobj.id)
} }
this.$forceUpdate() this.$forceUpdate()
}) })
}, },
@@ -1469,17 +1528,24 @@
border-right: none; border-right: none;
border-bottom: none; border-bottom: none;
} }

.grid:nth-child(2) { .grid:nth-child(2) {
// border-bottom: none; // border-bottom: none;
} }


.grid:nth-child(3) { .grid:nth-child(3) {
width: 50%; width: 50%;
// border-right: none;
} }
.chart { .chart {
padding: 40rpx 0 20rpx; padding: 40rpx 0 20rpx;
min-height: 50vh; min-height: 50vh;

.marketingBusiness {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
} }
</style> </style>

Loading…
Cancel
Save