Browse Source

修改挖掘话术执行完成率

newyun
corala 1 year ago
parent
commit
8a4dfb88ef
2 changed files with 87 additions and 43 deletions
  1. +22
    -9
      pages/center/consumer/consumerDetail.vue
  2. +65
    -34
      pages/mine/details2.vue

+ 22
- 9
pages/center/consumer/consumerDetail.vue View File

@@ -212,9 +212,9 @@
<!-- 需求挖掘执行率 --> <!-- 需求挖掘执行率 -->
<view class="xuqiu" v-if="activeTotal==3"> <view class="xuqiu" v-if="activeTotal==3">
<view style="width: 100%;height: 80rpx;border-bottom: 1rpx solid #E0E0E0;display: flex;align-items: center;background: #fff;"> <view style="width: 100%;height: 80rpx;border-bottom: 1rpx solid #E0E0E0;display: flex;align-items: center;background: #fff;">
<view style="flex: 1;font-size: 28rpx;color: #333333;font-weight: 600;text-indent: 20rpx;">指标</view>
<view style="flex: 1;font-size: 28rpx;color: #333333;font-weight: 600;text-indent: 170rpx;">执行率
</view>
<view style="flex: 1;font-size: 28rpx;color: #333333;font-weight: 600;text-indent: 50rpx;">指标</view>
<view style="flex: 1;font-size: 28rpx;color: #333333;font-weight: 600;text-indent: 70rpx;">执行率</view>
<view style="flex: 1;font-size: 28rpx;color: #333333;font-weight: 600;text-indent: 70rpx;">完成</view>
</view> </view>
<!-- 暂无数据 --> <!-- 暂无数据 -->
<view v-if="KeyWordsfractionList.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;"> <view v-if="KeyWordsfractionList.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;">
@@ -229,14 +229,18 @@
<!-- 挖掘执行话术展示 --> <!-- 挖掘执行话术展示 -->
<view class="Level-box" v-else v-for="(item,index) in KeyWordsfractionList" :key="index"> <view class="Level-box" v-else v-for="(item,index) in KeyWordsfractionList" :key="index">
<view class="Level1che" @click="changeshowlevel1(item,1)"> <view class="Level1che" @click="changeshowlevel1(item,1)">
<view class="title1">{{item.name}}</view>
<view class="leve1-jindu">
<view class="title1" style="flex: 1;">{{item.name}}</view>
<!-- <view class="leve1-jindu">
<view class="jindutiao"> <view class="jindutiao">
<view class="huanxing" v-if="item.selected==0" :style="{width: item.fraction+'%'}"></view> <view class="huanxing" v-if="item.selected==0" :style="{width: item.fraction+'%'}"></view>
<view class="huanxing" v-else style="width: 0"></view> <view class="huanxing" v-else style="width: 0"></view>
<view class="text">{{item.selected==0?item.fraction:0}}%</view> <view class="text">{{item.selected==0?item.fraction:0}}%</view>
</view> </view>
</view>
</view> -->
<view class="Level1-middle" style="flex:2;display:flex;">
<view class="item" style="flex:1;text-align:center;">执行{{item.selected==0?item.fraction:0}}%</view>
<view class="item" style="flex:1;text-align:center;">完成{{item.modelSelected==0?item.modelFraction:0}}%</view>
</view>
<view class="jiantobox"> <view class="jiantobox">
<image v-if="!item.show" class="arrow rotatearrow" src="/static/images/down.png" mode="" /> <image v-if="!item.show" class="arrow rotatearrow" src="/static/images/down.png" mode="" />
<image v-else class="arrow" src="/static/images/up.png" mode="" /> <image v-else class="arrow" src="/static/images/up.png" mode="" />
@@ -266,10 +270,18 @@
<view class="hhhbox" v-if="item.show" v-for="(subitem,i) in item.children" :key="i"> <view class="hhhbox" v-if="item.show" v-for="(subitem,i) in item.children" :key="i">
<view class="Level2che" @click="changeshow2(subitem,1)"> <view class="Level2che" @click="changeshow2(subitem,1)">
<view class="title1 u-line-1">{{subitem.name}}</view> <view class="title1 u-line-1">{{subitem.name}}</view>
<view class="leve1-jindu">
<!-- <view class="leve1-jindu">
<view class="zhixing" v-if="!subitem.selected">已执行</view> <view class="zhixing" v-if="!subitem.selected">已执行</view>
<view class="zhixing2" v-else>未执行</view> <view class="zhixing2" v-else>未执行</view>
</view>
</view> -->
<view class="leve1-jindu">
<view class="zhixing" v-if="subitem.selected==0">已执行</view>
<view class="zhixing2" v-else>未执行</view>
</view>
<view class="leve1-jindu">
<view class="zhixing" v-if="subitem.modelSelected==0">已完成</view>
<view class="zhixing2" v-else>未完成</view>
</view>
<view class="jiantobox"> <view class="jiantobox">
<image v-if="!subitem.show" class="arrow rotatearrow" src="/static/images/down.png" <image v-if="!subitem.show" class="arrow rotatearrow" src="/static/images/down.png"
mode="" /> mode="" />
@@ -385,8 +397,9 @@
this.$u.get("/cusLvStatistics/findKeyWordsBycusId?cusId=" + this.customerId).then(res => { this.$u.get("/cusLvStatistics/findKeyWordsBycusId?cusId=" + this.customerId).then(res => {
// console.log(res) // console.log(res)
if(res.length){ if(res.length){
res.forEach(item=>{
res.forEach((item,index)=>{
item.show = false item.show = false
if(index==0){item.show=true}
item.children.forEach(obj=>{ item.children.forEach(obj=>{
obj.show = false obj.show = false
if(obj.questionList.length){ if(obj.questionList.length){


+ 65
- 34
pages/mine/details2.vue View File

@@ -72,7 +72,7 @@
style="font-size: 24rpx;text-align: center;margin-left: 14rpx;">修改角色 style="font-size: 24rpx;text-align: center;margin-left: 14rpx;">修改角色
</view> </view>
</view> </view>
<!-- ----------新加标签标识------------ -->
<!-- ----------对话下方新加话术标签标识------------ -->
<view class="newmark"> <view class="newmark">
<!-- 1 客户画像 2销讲词 3违禁 4 需求挖掘 --> <!-- 1 客户画像 2销讲词 3违禁 4 需求挖掘 -->
<image v-if="(dealTypes(item.types))[0]==1" class="markicon" src="https://static.quhouse.com/37e0de3f8d1c421dac8bf699d5e7992d.png"></image> <image v-if="(dealTypes(item.types))[0]==1" class="markicon" src="https://static.quhouse.com/37e0de3f8d1c421dac8bf699d5e7992d.png"></image>
@@ -269,7 +269,7 @@
<view v-if="methodsisshow" :class="{ activecllasscet: zhixingcenterindex == 1 }" <view v-if="methodsisshow" :class="{ activecllasscet: zhixingcenterindex == 1 }"
@click="recordclick(1)">禁忌执行</view> @click="recordclick(1)">禁忌执行</view>
<view :class="{ activecllasscet: zhixingcenterindex == 2 }" @click="recordclick(2)"> <view :class="{ activecllasscet: zhixingcenterindex == 2 }" @click="recordclick(2)">
需求挖掘率{{KeyWordsfraction||0}}%</view>
需求挖掘率</view>
</view> </view>
<!-- 销讲执行率 --> <!-- 销讲执行率 -->
<view v-if="zhixingcenterindex == 0" class="cenisbox"> <view v-if="zhixingcenterindex == 0" class="cenisbox">
@@ -340,23 +340,24 @@
</view> </view>
<!-- 需求挖掘率 --> <!-- 需求挖掘率 -->
<view v-if="zhixingcenterindex == 2" class="cenisbox"> <view v-if="zhixingcenterindex == 2" class="cenisbox">
<view
style="width: 100%;height: 80rpx;border-bottom: 1rpx solid #E0E0E0;display: flex;align-items: center;">
<view class="top-box">
<view style="width:50%;text-align:center">挖掘执行:{{KeyWordsfraction||0}}%</view>
<view style="width:50%;text-align:center">挖掘成功:{{percent||0}}%</view>
</view>
<view style="width: 100%;height: 80rpx;border-bottom: 1rpx solid #E0E0E0;display: flex;align-items: center;">
<view style="flex: 1;font-size: 28rpx;color: #333333;font-weight: 600;text-indent: 20rpx;">指标 <view style="flex: 1;font-size: 28rpx;color: #333333;font-weight: 600;text-indent: 20rpx;">指标
</view> </view>
<view style="flex: 1;font-size: 28rpx;color: #333333;font-weight: 600;text-indent: 170rpx;">执行率
<view style="flex: 1;font-size: 28rpx;color: #333333;font-weight: 600;text-align:center">执行率
</view>
<view style="flex: 1;font-size: 28rpx;color: #333333;font-weight: 600;text-align:center">完成
</view> </view>
</view> </view>
<view class="Level-box" v-for="(item,index) in KeyWordsfractionList" :key="index"> <view class="Level-box" v-for="(item,index) in KeyWordsfractionList" :key="index">
<view class="Level1che" @click="hangeshow2(item,1)"> <view class="Level1che" @click="hangeshow2(item,1)">
<view class="title1">{{item.name}}</view>
<view class="leve1-jindu">
<view class="jindutiao">
<view class="huanxing" v-if="item.selected==0" :style="{width: item.fraction+'%'}">
</view>
<view class="huanxing" v-else style="width: 0"></view>
<view class="text">{{item.selected==0?item.fraction:0}}%</view>
</view>
<view class="title1" style="flex:1">{{item.showLevel==2?('222'+item.name):item.name}}</view>
<view class="Level1-middle" style="flex:2;display:flex;">
<view class="item" style="flex:1;text-align:center;">执行{{item.selected==0?item.fraction:0}}%</view>
<view class="item" style="flex:1;text-align:center;">完成{{item.modelSelected==0?item.modelFraction:0}}%</view>
</view> </view>
<view class="jiantobox"> <view class="jiantobox">
<image v-if="!item.show" class="arrow rotatearrow" src="/static/images/down.png" <image v-if="!item.show" class="arrow rotatearrow" src="/static/images/down.png"
@@ -389,9 +390,13 @@
<view class="Level2che" @click="hangeshow2(subitem,1)"> <view class="Level2che" @click="hangeshow2(subitem,1)">
<view class="title1 u-line-1">{{subitem.name}}</view> <view class="title1 u-line-1">{{subitem.name}}</view>
<view class="leve1-jindu"> <view class="leve1-jindu">
<view class="zhixing" v-if="!subitem.selected">已执行</view>
<view class="zhixing" v-if="subitem.selected==0">已执行</view>
<view class="zhixing2" v-else>未执行</view> <view class="zhixing2" v-else>未执行</view>
</view> </view>
<view class="leve1-jindu">
<view class="zhixing" v-if="subitem.modelSelected==0">已完成</view>
<view class="zhixing2" v-else>未完成</view>
</view>
<view class="jiantobox"> <view class="jiantobox">
<image v-if="!subitem.show" class="arrow rotatearrow" <image v-if="!subitem.show" class="arrow rotatearrow"
src="/static/images/down.png" mode="" /> src="/static/images/down.png" mode="" />
@@ -453,14 +458,14 @@
<view class="jianbox-cen"> <view class="jianbox-cen">
<view class="jianboxtext">{{item.name}}</view> <view class="jianboxtext">{{item.name}}</view>
<view class="jianboxjian" @click="Acquishow(index)"> <view class="jianboxjian" @click="Acquishow(index)">
<image v-if="item.isshow==false" class="jiantop" src="../../static/images/jiantop.png"
mode=""></image>
<image v-if="item.isshow==true" class="jiantop1"
<image v-if="item.isshow" class="jiantop1"
src="../../static/images/jianbutton.png" mode=""></image> src="../../static/images/jianbutton.png" mode=""></image>
<image v-else class="jiantop" src="../../static/images/jiantop.png"
mode=""></image>
</view> </view>
</view> </view>
<view style="width: 690rpx;margin: 0 auto;display: flex;flex-wrap: wrap;" <view style="width: 690rpx;margin: 0 auto;display: flex;flex-wrap: wrap;"
v-if="item.isshow==true">
v-if="item.isshow">
<view class="sdfsaf" v-if="chend.showType==0" @click="argece(chend)" <view class="sdfsaf" v-if="chend.showType==0" @click="argece(chend)"
v-for="(chend,i) in item.children" :key='i'> v-for="(chend,i) in item.children" :key='i'>
<view class="jiangshang sdfsaf">{{chend.text}}</view> <view class="jiangshang sdfsaf">{{chend.text}}</view>
@@ -478,18 +483,18 @@
v-if="Acquirecustomerintentlist2.length==0"> v-if="Acquirecustomerintentlist2.length==0">
暂无数据 暂无数据
</view> </view>
<view class="jianbox" v-if="Acquirecustomerintentlist2.length!=0"
<view class="jianbox" v-if="Acquirecustomerintentlist2.length"
v-for="(item,index) in Acquirecustomerintentlist2" :key='index'> v-for="(item,index) in Acquirecustomerintentlist2" :key='index'>
<view class="jianbox-cen"> <view class="jianbox-cen">
<view class="jianboxtext">{{item.name}}</view> <view class="jianboxtext">{{item.name}}</view>
<view class="jianboxjian" @click="Acquishow2(index)"> <view class="jianboxjian" @click="Acquishow2(index)">
<image v-if="item.isshow==false" class="jiantop" src="../../static/images/jiantop.png"
mode=""></image>
<image v-if="item.isshow==true" class="jiantop1"
<image v-if="item.isshow" class="jiantop1"
src="../../static/images/jianbutton.png" mode=""></image> src="../../static/images/jianbutton.png" mode=""></image>
<image v-else class="jiantop" src="../../static/images/jiantop.png"
mode=""></image>
</view> </view>
</view> </view>
<view class="bioqianwayl" v-if="item.isshow==true">
<view class="bioqianwayl" v-if="item.isshow">
<view class="jiangshang" v-for="(chend,i) in item.children" :key='i' <view class="jiangshang" v-for="(chend,i) in item.children" :key='i'
v-if="chend.selected==0"> v-if="chend.selected==0">
{{chend.text}} {{chend.text}}
@@ -559,7 +564,6 @@
</template> </template>


<script> <script>
var util = require("../../utils/util.js");
var config = require("../../config"); var config = require("../../config");


import zaudio from '@/components/uniapp-zaudio/zaudio'; import zaudio from '@/components/uniapp-zaudio/zaudio';
@@ -689,6 +693,7 @@
isBand: false, // 阻止二次提交 isBand: false, // 阻止二次提交
refined: false, refined: false,
eqLog: 0, eqLog: 0,
percent: 0
}; };
}, },
computed: { computed: {
@@ -779,10 +784,18 @@
}, },


methods: { methods: {
// 计算挖掘执行的完成率
getPercent(){
let countArr = this.KeyWordsfractionList.filter(item=> item.selected==0)
console.log(countArr)
this.percent = (countArr.length / this.KeyWordsfractionList.length)*100
console.log(this.percent.toFixed(0))
this.percent = this.percent.toFixed(0)

},
dealTypes(type){ dealTypes(type){
if(type){ if(type){
let tem = type.split('-') let tem = type.split('-')
console.log(tem);
return tem return tem
}else{ }else{
return [0,''] return [0,'']
@@ -1447,6 +1460,15 @@
} }
this.$forceUpdate() this.$forceUpdate()
}, },
formatSecond(seconds){
var result = typeof seconds === "string" ? parseFloat(seconds) : seconds;
if (isNaN(result)) return "";
let h = Math.floor(result / 3600) < 10 ? "0" + Math.floor(result / 3600) : Math.floor(result / 3600);
let m = Math.floor((result / 60) % 60) < 10 ? "0" + Math.floor((result / 60) % 60) : Math.floor((result / 60) % 60);
let s = Math.floor(result % 60) < 10 ? "0" + Math.floor(result % 60) : Math.floor(result % 60);
return `${h}:${m}:${s}`;
},




init(info) { init(info) {
@@ -1815,8 +1837,9 @@
this.$u.get("/cusLvStatistics/findKeyWordsBycusId?cusId=" + this.customerId).then(res => { this.$u.get("/cusLvStatistics/findKeyWordsBycusId?cusId=" + this.customerId).then(res => {
// console.log(res) // console.log(res)
if (res.length) { if (res.length) {
res.forEach(item => {
res.forEach((item,index) => {
item.show = false item.show = false
if(index==0){item.show = true}
item.children.forEach(obj => { item.children.forEach(obj => {
obj.show = false obj.show = false
if (obj.questionList.length) { if (obj.questionList.length) {
@@ -1832,6 +1855,7 @@
} }
}) })
this.KeyWordsfractionList = res this.KeyWordsfractionList = res
this.getPercent()
} else { } else {
this.KeyWordsfractionList = [] this.KeyWordsfractionList = []
} }
@@ -1972,7 +1996,7 @@
}, },


getTime(time) { getTime(time) {
return util.formatSecond(time)
return this.formatSecond(time)
}, },


//音频前进回退 //音频前进回退
@@ -2020,7 +2044,6 @@
this.textindex = data.data.data.index; this.textindex = data.data.data.index;
this.toptextindex = data.data.data.index; this.toptextindex = data.data.data.index;
this.dialogList.push(this.newluyinList[data.data.data.index]) this.dialogList.push(this.newluyinList[data.data.data.index])
console.log(newtime)
this.stepPlay(newtime); this.stepPlay(newtime);
} }
}) })
@@ -2389,12 +2412,20 @@
font-size: 30rpx; font-size: 30rpx;
font-weight: 600; font-weight: 600;
} }
} }
} }


.cenisbox { .cenisbox {
flex: 1; flex: 1;
overflow: auto; overflow: auto;
.top-box{
height: 80rpx;
line-height: 80rpx;
display: flex;
color: #2671E2;
border-bottom: 1rpx solid #ccc;
}


.jianbox { .jianbox {
width: 100%; width: 100%;
@@ -2770,8 +2801,8 @@
text-align: center; text-align: center;
height: 36rpx; height: 36rpx;
line-height: 36rpx; line-height: 36rpx;
border-radius: 4rpx;
border: 1rpx solid #3E50E8;
border-radius: 4px;
border: 1px solid #3E50E8;
} }
} }
.tankuangcss { .tankuangcss {
@@ -3080,8 +3111,8 @@
position: relative; position: relative;
} }


.scroll-Y .isGreen .contentInfo .contentMain .content {
background: #2BC805 !important;
color: #FFFFFF;
}
// .scroll-Y .isGreen .contentInfo .contentMain .content {
// background: #2BC805 !important;
// color: #FFFFFF;
// }
</style> </style>

Loading…
Cancel
Save