From 88caa98940a7492a5c202ae4a4e645eb38dce07b Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Tue, 27 Sep 2022 15:59:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=BE=85=E6=AC=A1?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/center/records/index.vue | 4 + pages/mine/details2.vue | 558 ++++++++++++++++++++++----------- 2 files changed, 380 insertions(+), 182 deletions(-) diff --git a/pages/center/records/index.vue b/pages/center/records/index.vue index 6356932..d9ecd52 100644 --- a/pages/center/records/index.vue +++ b/pages/center/records/index.vue @@ -180,6 +180,10 @@ @click="screenvisivalidInvalid(2)"> 无录音 + + 无效(未审核) + diff --git a/pages/mine/details2.vue b/pages/mine/details2.vue index a7b2cfa..8f14834 100644 --- a/pages/mine/details2.vue +++ b/pages/mine/details2.vue @@ -70,20 +70,26 @@ - - - - - - - - {{dealword(subitem)[1]}} + + + + + + + {{dealword(subitem)[1]}} + @@ -114,17 +120,24 @@ 更多 - + + - 接待信息 + + 接待信息 + @@ -159,16 +172,16 @@ 常错词: - + 正确词: - + @@ -326,7 +339,8 @@ 挖掘执行:{{KeyWordsfraction||0}}% 挖掘成功:{{percent||0}}% - + 指标 执行率 @@ -340,10 +354,11 @@ {{item.name}} 执行{{item.fraction || 0}}% - 已匹配({{ + 已匹配({{ item.keywordsList&&item.keywordsList.length }}) - 未匹配 + 未匹配 - - - - 客户标签:{{ getKeywordsList(item.keywordsList) }} - 话术内容: - 暂无话术 - - - {{inc+1}}.{{che.showFormatExpression}} - - - - - - - - - - + + + + + 客户标签:{{ getKeywordsList(item.keywordsList) }} + 话术内容: + 暂无话术 + + + {{inc+1}}.{{che.showFormatExpression}} + + + + + + + + + + @@ -395,7 +410,8 @@ - 客户标签:{{ getKeywordsList(subitem.keywordsList) }} + + 客户标签:{{ getKeywordsList(subitem.keywordsList) }} 话术内容: 暂无话术 {{item.name}} - - + - - + + {{chend.text}} @@ -475,10 +488,9 @@ {{item.name}} - - + @@ -544,6 +556,38 @@ + + + + 修改次数 + + + + 本次属于客户第几次到访 + + + - + + + + + + + + + + + 注意:客户没有第一次到访记录,该客户所有的接待销讲执行率,不参与统计 + + + + + 取消 + 确认 + + + + + @@ -668,7 +712,14 @@ isBand: false, // 阻止二次提交 refined: false, eqLog: 0, - percent: 0 + percent: 0, + + showVisit: false, // 操作框 + visitParams: { + id: '', + projectId: uni.getStorageSync('buildingID').id, // 当前项目id + visitRecordNum: 1, // 默认到访次数 + }, }; }, computed: { @@ -677,6 +728,27 @@ return this.getTime(e); } }, + + // 获取距离 + getAllImgStyle() { + let position = 70 + if (this.Menulistisshow) { + position += 70 + } + + if (this.eqLog != -1) { + position += 70 + } + + if (this.userlistobj.visitRecord == 1 && this.checkAuthority('修改到访次数')) { + position += 70 + } + + return { + height: `${position}rpx`, + top: `-${position+20}rpx` + } + } }, onLoad(options) { this.LOADING = true @@ -684,6 +756,7 @@ this.eqLog = menu.findIndex(item => item.name == '设备日志'); this.status = options.status; this.customerId = options.customerId; + this.visitParams.id = options.customerId; this.KeyWordsfraction = options.wordFraction == 'undefined' ? 0 : options.wordFraction; this.itemobj = uni.getStorageSync('searchobj'); this.stateisshow = options.stateisshow; @@ -758,43 +831,77 @@ }, methods: { - // 对话加命中标签 - dealTypes(type){ - if(type){ + // 加减 + reduce() { + if (this.visitParams.visitRecordNum == 1) { + uni.showToast({ + title: '不能再减了~', + duration: 2000 + }); + return + } + this.visitParams.visitRecordNum-- + }, + + add() { + this.visitParams.visitRecordNum++ + }, + + // 取消 + cancelVisitRecord() { + this.visitParams.visitRecordNum = 1 + this.showVisit = false + }, + + // 确定 + changeVisitRecord() { + this.$u.post('/customer/updateVisitRecord', this.visitParams).then(res => { + this.cancelVisitRecord() + }).catch(res => { + uni.showToast({ + title: '操作失败,请稍候重试!', + duration: 2000 + }); + }) + }, + + // 对话加命中标签 + dealTypes(type) { + if (type) { let tem = type.substring(1).split(',') return tem - }else{ + } else { return [] - } - }, - // 对话加命中标签 - dealword(type){ - if(type){ - let a = type.split('-') - let rest = type.substring(2).split('-').join(',') - let arr =[a[0],rest] - return arr - }else{ - return [] } - }, - //挖掘率话术客户标签展示 - getKeywordsList(list) { - let keywords = []; - if (list && list.length) { - keywords = list.map((item) => item.name); - } else { - return "--"; - } - return keywords.join(","); - }, + }, + // 对话加命中标签 + dealword(type) { + if (type) { + let a = type.split('-') + let rest = type.substring(2).split('-').join(',') + let arr = [a[0], rest] + return arr + } else { + 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) + 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) + this.percent = (countArr.length / this.KeyWordsfractionList.length) * 100 + // console.log(this.percent.toFixed(0)) + this.percent = this.percent.toFixed(0) }, clickWajue(item) { @@ -884,7 +991,7 @@ roletab() { // let itso=this.dialogList[this.csdFileindex].message[this.roletiaoshu]; let itso = Object.assign({}, this.dialogList[this.csdFileindex].message[this.roletiaoshu]); - + itso.onebest = itso.onebest.replace(/<.*?>/ig, ""); this.$u.post("/corpus/updateRole", { corpusId: this.luyinList[this.csdFileindex].id, @@ -959,6 +1066,7 @@ }) } }, + //获取用户信息 gituserlist() { this.$u.get("/matchKeywords/personalReceptionRecord", { @@ -969,8 +1077,6 @@ }) }, - - Acquishow2(i) { this.Acquirecustomerintentlist2[i].isshow = !this.Acquirecustomerintentlist2[i].isshow; }, @@ -1085,38 +1191,44 @@ }, //标记 alllogo() { - var that = this; let msg = ''; if (this.userlistobj.validInvalid != 0) { - msg = '是否标记为"有效录音"?'; + if (this.userlistobj.validInvalid == 0 || this.userlistobj.validInvalid == 1) { + msg = '是否标记为"有效录音"?'; + } else { + msg = '是否撤销"无效(待审核)"?'; + } uni.showModal({ title: '提示', content: msg, - success: function(res) { - that.isBand = true - if (that.noClick) { - that.noClick = false; + success: (res) => { + this.isBand = true + if (this.noClick) { + this.noClick = false; if (res.confirm) { let parames = { - id: that.customerId, + id: this.customerId, validInvalid: '', - invalidReason: 0 + invalidReason: 0, } - if (that.userlistobj.validInvalid == 0) { + if (this.userlistobj.validInvalid == 0) { parames.validInvalid = 1; - } else { + } else if (this.userlistobj.validInvalid == 1) { parames.validInvalid = 0; + } else if (this.userlistobj.validInvalid == 2) { + parames.auditReception = 1 + parames.validInvalid = 1; } - that.$u.post("/customer/updateValidInvalid", parames).then(res => { + this.$u.post("/customer/updateValidInvalid", parames).then(res => { console.log(res) - that.isBand = false - that.Thetapeidisshow = false; + this.isBand = false + this.Thetapeidisshow = false; }).catch(e => { - that.isBand = false + this.isBand = false }) } setTimeout(() => { - that.noClick = true; + this.noClick = true; }, 2000) } else { // 这里是重复点击的判断 @@ -1180,7 +1292,6 @@ } else { this.Acquirecustomerintent2() } - this.intention = true; } }, @@ -1386,15 +1497,16 @@ } 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}`; - }, + 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) { @@ -1477,16 +1589,14 @@ }, // 取消全部加精 notappick() { - var that = this; uni.showModal({ title: '提示', content: '确认取消加精?', - success: function(res) { + success: (res) => { if (res.confirm) { - console.log('用户点击确定'); uni.request({ - url: config.service.delATD + "?carId=" + that.customerId + '&itemId=' + - that.buildingID, + url: config.service.delATD + "?carId=" + this.customerId + '&itemId=' + + this.buildingID, method: "GET", header: { 'content-type': 'application/json', @@ -1495,7 +1605,7 @@ }, success: (data) => { if (data.data.code == 10000) { - that.status = 1 + this.status = 1 uni.showToast({ title: '取消成功', duration: 2000 @@ -1516,17 +1626,16 @@ }, //全部加精 tappick(i) { - var that = this; uni.showModal({ title: '提示', content: '确认加精?', - success: function(res) { + success: (res) => { if (res.confirm) { console.log('用户点击确定'); let objdata = { - "carId": that.customerId, //客户id + "carId": this.customerId, //客户id "status": 0, - "itemId": that.buildingID, + "itemId": this.buildingID, } uni.request({ url: config.service.addATD, @@ -1539,7 +1648,7 @@ data: objdata, success: (data) => { if (data.data.code == 10000) { - that.status = 0 + this.status = 0 uni.showToast({ title: '加精成功', duration: 2000 @@ -1564,11 +1673,11 @@ this.biaoqianindex = index; this.biaoqianid = this.biaoqianlist[index].id }, + //复制 clickcopy() { - var that = this; uni.setClipboardData({ - data: that.thewrongword, + data: this.thewrongword, success: () => { this.cancelBeast() this.$forceUpdate(); @@ -1605,7 +1714,7 @@ translateHtmlContent: this.messagelisy, id: uni.getStorageSync('buildingID').id } - + let sas = this.textItself.replace(this.thewrongword, this.reswrongword) console.log(sas) this.dialogList[this.argtextindex1].message[this.argtextindex2].onebest = sas @@ -1643,7 +1752,7 @@ //取消加入常错词 Cancelout() { - this.thewrongword = '' + this.thewrongword = '' this.isshow2 = false; this.cancelBeast() }, @@ -1765,14 +1874,16 @@ this.$u.get("/cusLvStatistics/findKeyWordsBycusId?cusId=" + this.customerId).then(res => { // console.log(res) if (res.length) { - res.forEach((item,index) => { + res.forEach((item, index) => { item.show = false - if(index==0){item.show = true} - item.children.forEach((obj,i) => { + if (index == 0) { + item.show = true + } + item.children.forEach((obj, i) => { obj.show = false if (i == 0 && index == 0) { - obj.show = true; - } + obj.show = true; + } }) }) this.KeyWordsfractionList = res @@ -2016,7 +2127,7 @@ -