| @@ -778,12 +778,31 @@ | |||||
| return [] | 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) { | clickWajue(item) { | ||||
| if (item.selected == 0) { | |||||
| if (item.isAskQuestions == 0) { | |||||
| this.Pinspeak = false | this.Pinspeak = false | ||||
| uni.navigateTo({ | uni.navigateTo({ | ||||
| url: '/pages/learning/Keywordsearch?customerId=' + this.customerId + "&keyword=" + item | url: '/pages/learning/Keywordsearch?customerId=' + this.customerId + "&keyword=" + item | ||||
| .question + | |||||
| .showFormatExpression + | |||||
| "&skpl=" + "2" + '&UpDateEvent=DETAILS2INIT' | "&skpl=" + "2" + '&UpDateEvent=DETAILS2INIT' | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -817,57 +836,6 @@ | |||||
| this.treelist = res; | 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) { | cbChange(item) { | ||||
| item.checked = !item.checked | item.checked = !item.checked | ||||