瀏覽代碼

修改小程序名称

autoSR1012
douzhuo 1 年之前
父節點
當前提交
308f36ee6b
共有 1 個檔案被更改,包括 104 行新增38 行删除
  1. +104
    -38
      pages/center/Piabodata/TrendAnalysis.vue

+ 104
- 38
pages/center/Piabodata/TrendAnalysis.vue 查看文件

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


<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="display: flex;align-items: center;border-bottom: 1px solid #C9C9C9;height: 80rpx;">
<view>选择一级:</view>
@@ -123,7 +127,8 @@
</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()">
<view class="title2-che" style="width: 220rpx;">
{{Selecttuanduiobj.name}}
@@ -206,7 +211,7 @@
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
<newcalendar v-model="totalTimeShow2" :planNum='intervaltime' mode="date" @change="totalTimeChange2">
</newcalendar>
<!-- 接待时间 -到访时间-->
<u-popup v-model="timeshow" mode="bottom">
<view class="timeview" :style="{ color: activeTotal == 5 ? '#2B6EFF' : '#333333' }"
@@ -228,12 +233,15 @@
@click="tabtimetap(4, '')">
自定义</view>
</u-popup>
<!-- 顾问 -->
<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="showMarketingBusiness" mode="single-column" :list="showMarketingList"
label-name="templateName" value-name="id" @confirm="selectMarketingBusiness"></u-select>

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

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

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

if (option.type == 1) {
this.timepickpickisshow = true
this.pamect.firstStartDate = option.staTime
@@ -367,10 +374,13 @@
this.pamect.lastStartDate = option.staTime1
this.pamect.lastEndDate = option.endtime1
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.tabxuanxiangtap(3)
this.$forceUpdate()
} else {
this.init()
}
},
onPullDownRefresh() {
@@ -414,6 +424,49 @@
// this.screen.agentId = e[0].value;
// 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() {
this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", {
@@ -421,7 +474,7 @@
}).then(res => {
this.freeList = res;
this.huashuList = res;
if(this.freeList.length){
if (this.freeList.length) {
this.freeList.forEach(item => {
item.label = item.name;
item.value = item.accountId
@@ -429,6 +482,7 @@
}
})
},

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

//是否对比
checkboxChange() {
if (this.newactiveTotal == 3) {
@@ -471,18 +526,17 @@
this.$u.post("/cusLvStatistics/lyAndcp", this.pamect).then(data => {
this.pamect.lastStartDate = data.lastStartDate;
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;
if (data.endSumDuration != null) {
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[0].num2 = data.contrastSumCustomer
this.numlist[1].num2 = data.contrastFraction||0
this.numlist[1].num2 = data.contrastFraction || 0
this.numlist[2].num2 = data.contrastSumDuration
} else {
this.compareFlag = false
@@ -532,7 +586,7 @@
this.$forceUpdate()
this.LOADING = false
}, 1500)
}).catch(e => {
this.LOADING = false
})
@@ -649,15 +703,10 @@
//tab切换
tabxuanxiangtap(index) {
this.newactiveTotal = index;
this.guwenshow = false;
this.Selectlevel = false;
this.Selecttuandui = false;
this.timepickpickisshow = false;
this.init()

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

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

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

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

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

Loading…
取消
儲存