Browse Source

需求挖掘功能

yun
corala 2 years ago
parent
commit
495b816236
2 changed files with 34 additions and 31 deletions
  1. +6
    -2
      manifest.json
  2. +28
    -29
      pages/center/Piabodata/requireminingAnalysis.vue

+ 6
- 2
manifest.json View File

@@ -96,10 +96,14 @@
"urlCheck" : false,
"es6" : true,
"postcss" : true,
"minified" : false
"minified" : true
},
"usingComponents" : true,
"permission" : {},
"permission" : {
"scope.userLocation" : {
"desc" : "获取地址信息"
}
},
"requiredBackgroundModes" : [ "audio" ],
"plugins" : {
"WechatSI" : {


+ 28
- 29
pages/center/Piabodata/requireminingAnalysis.vue View File

@@ -56,7 +56,7 @@
</view>
<view class="uchaserbox">
<qiun-data-charts type="line" :chartData="lineOptsect" :opts="lineOpts" background="none"
:ontouch="true" canvasId="wangxiaohuaerlingilingwuyiba1" :canvas2d="true" />
:ontouch="true" canvasId="wangxiaohuaerlingilingwuyiba2" :canvas2d="true" />
</view>
</view>
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
@@ -69,7 +69,7 @@
type="ring"
:chartData="ringChartData"
:canvas2d="true"
:canvasId="ChartBoxIdwangxiaohuaerlingilingwuyiba1"
canvasId="ChartBoxIdwangxiaohuaerlingilingwuyiba1"
:opts='opts'
background="none" />
</view>
@@ -87,7 +87,7 @@
<view>操作</view>
</view>
<view v-if="total==0" style="color: #999999;width: 100%;height: 500rpx;line-height: 500rpx;text-align: center;" >暂无数据</view>
<view class="tabtd" v-for="(item,i) in sortList" :key="i">
<view class="tabtd" v-for="(item,i) in rankList" :key="i">
<view>
<image v-if="i==0" class="ranking" src="../../../static/images/ranking1.png" mode=""></image>
<image v-else-if="i==1" class="ranking" src="../../../static/images/ranking2.png" mode=""></image>
@@ -150,7 +150,7 @@
guwen: '顾问',
huashu: '业务话术',
showDesc: false,
sortList: [],//排名列表
rankList: [],//排名列表
ringChartData: {
},
// ring图 分布图
@@ -236,8 +236,7 @@
},{
"name": "对比时间",
"data": []
}
]
}]
},
lineOpts: {
yAxis: {
@@ -250,14 +249,13 @@
};
},
onShow() {
// this.LOADING = true
// 获取项目id
// this.houseId = uni.getStorageSync('buildingID').id;
// // 获取员工
// this.getStaffList()
// // 获取团队
// this.getSectionList()
// this.getdata()
this.houseId = uni.getStorageSync('buildingID').id;
// 获取员工
this.getStaffList()
// 获取团队
this.getSectionList()
this.getdata()
},
onReady: function(){
// 获取项目id
@@ -267,19 +265,15 @@
// 获取团队
this.getSectionList()
this.getdata()
// this.getRingData()
// this.getwordMiningAnalyzePercentage()
},
onPullDownRefresh() {
},
methods: {
getdata(){
// 需求挖掘分析-简报
this.wordMiningAnalyze()
// 挖掘趋势图
this.getwordMiningAnalyzePercentage()
//需求挖掘排行
this.getwordMiningRank()
// 挖掘趋势图
this.getwordMiningAnalyzePercentage()
// 需求挖掘f分布图
this.getRingData()
},
@@ -294,9 +288,9 @@
"firstEndDate":!this.activeTotal?this.endDate:''
})
.then(res => {
console.log(res)
// console.log(res)
if(res.length){
this.sortList = res.map(item=>{
this.rankList = res.map(item=>{
return {
name: item.name,
id: item.id,
@@ -304,6 +298,8 @@
selected: item.selected
}
})
}else{
this.rankList = []
}
})
},
@@ -318,7 +314,7 @@
"dateType":this.activeTotal
})
.then(res => {
console.log(res)
// console.log(res)
this.ringChartData = { series: [
{
data: [
@@ -382,6 +378,9 @@
},
// 需求挖掘率趋势图
getwordMiningAnalyzePercentage() {
let categories1 = []
let categories2 = []
let categories3 = []
this.$u.post('/cusLvStatistics/wordMiningAnalyzePercentage', {
"houseId": this.houseId,
"deptId": this.deptVal,
@@ -391,25 +390,25 @@
"firstEndDate":!this.activeTotal?this.endDate:''
})
.then(res => {
let categories1 = []
let categories2 = []
if(res.first&&res.first.length){
categories1 = res.first.map(item=> item.statDate.substring(0,10))
this.lineOptsect.series[0].data=res.first.map(item=> item.wordFraction)
}else{
categories1= []
this.lineOptsect.series[0] = []
this.lineOptsect.series[0].data = []
}
if(res.end&&res.end.length){
this.lineOptsect.series[1].data=res.end.map(item=> item.wordFraction)
categories2 = res.end.map(item => item.statDate.substring(0,10))
}else{
categories2 = []
this.lineOptsect.series[1].data = []
}
let categories3 = []
for(let i=0;i<categories1.length;i++){
categories3.push(categories1[i]+'/'+categories2[i])
}
// console.log(categories3)
this.lineOptsect.categories = categories3
})
},
@@ -450,21 +449,21 @@
},
// 顾问选择
guwenCallback(e){
console.log(e)
// console.log(e)
this.guwenVal = e[0].value
this.guwen = e[0].label
this.getdata()
},
// 部门选择
deptCallback(e){
console.log(e)
// console.log(e)
this.deptVal = e[0].value
this.dept = e[0].label
this.getdata()
},
// 话术选择
huashuCallback(e){
console.log(e)
// console.log(e)
this.huashuVal = e[0].value
this.huashu = e[0].label
this.getdata()


Loading…
Cancel
Save