From e3b902673bc786bef691cfd073ff6fbb599e2d72 Mon Sep 17 00:00:00 2001 From: corala <18339694416@163.com> Date: Thu, 15 Sep 2022 19:35:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=90=88=E5=B9=B6=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mine/details2.vue | 74 ++++++++++++----------------------------- 1 file changed, 21 insertions(+), 53 deletions(-) diff --git a/pages/mine/details2.vue b/pages/mine/details2.vue index 02a1b5c..2e20502 100644 --- a/pages/mine/details2.vue +++ b/pages/mine/details2.vue @@ -778,12 +778,31 @@ return [] } }, + //挖掘率话术客户标签展示 + getKeywordsList(list) { + let keywords = []; + if (list && list.length) { + keywords = list.map((item) => item.name); + } else { + return "--"; + } + return keywords.join(","); + }, + // 计算挖掘执行的完成率 + 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) + + }, clickWajue(item) { - if (item.selected == 0) { + if (item.isAskQuestions == 0) { this.Pinspeak = false uni.navigateTo({ url: '/pages/learning/Keywordsearch?customerId=' + this.customerId + "&keyword=" + item - .question + + .showFormatExpression + "&skpl=" + "2" + '&UpDateEvent=DETAILS2INIT' }) } @@ -817,57 +836,6 @@ this.treelist = res; }); }, - // 添加挖掘词 - wajueConfirm() { - if (this.thewrongword.length > 20) { - uni.showToast({ - title: '该话术不能超过20个字', - icon: 'none', - duration: 2000 - }); - this.wajueshow = true - return; - } - - this.wajueshow = true - if (!this.flag) { - this.flag = true - uni.request({ - url: config.service.addWordMining, - method: "post", - header: { - 'content-type': 'application/json', - 'Access-Token': uni.getStorageSync('weapp_session_login_data').token - }, - data: { - "houseId": this.buildingID, // 楼盘id - "cusId": this.customerId, //客户id - "question": this.thewrongword, // 问题 - "keywordsId": this.wordBiao.wordBiaoqianId, // 标签id - "level": this.wordBiao.level // 标签等级 - }, - success: (res) => { - // console.log(res) - this.flag = false; - if (res.data.code == 10000) { - uni.showToast({ - title: '添加成功', - icon: 'none', - duration: 2000 - }); - this.wajueshow = false - } else { - uni.showToast({ - title: res.data.message, - icon: 'none', - duration: 2000 - }); - this.wajueshow = false - } - } - }) - } - }, // 选中取反 cbChange(item) { item.checked = !item.checked