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, "urlCheck" : false,
"es6" : true, "es6" : true,
"postcss" : true, "postcss" : true,
"minified" : false
"minified" : true
}, },
"usingComponents" : true, "usingComponents" : true,
"permission" : {},
"permission" : {
"scope.userLocation" : {
"desc" : "获取地址信息"
}
},
"requiredBackgroundModes" : [ "audio" ], "requiredBackgroundModes" : [ "audio" ],
"plugins" : { "plugins" : {
"WechatSI" : { "WechatSI" : {


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

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


Loading…
Cancel
Save