소스 검색

修改常错词textarea

newyun
corala 1 년 전
부모
커밋
6618b6ee6b
1개의 변경된 파일101개의 추가작업 그리고 38개의 파일을 삭제
  1. +101
    -38
      pages/mine/details2.vue

+ 101
- 38
pages/mine/details2.vue 파일 보기

@@ -59,7 +59,7 @@
<view @click="clickcopy()"
style="width: 60rpx;font-size: 24rpx;text-align: center;margin-left: 24rpx;">复制
</view>
<view @click="Oftenthewrongword()"
<view @click="Oftenthewrongword(item)"
style="width: 80rpx;font-size: 24rpx;text-align: center;margin-left: 22rpx;">常错词
</view>
<view v-if="jiaoseshow" @click="Addtheessence()"
@@ -159,14 +159,16 @@
<view class="tian-view">
<view class="tian-view-t2" style="margin-left: 20rpx;">
常错词:<view class="word1">
<u-input :auto-height="true" type="textarea" v-model="thewrongword" :border="false" placeholder="请输入" />
<u-input v-if="isshow2" :auto-height="true" type="textarea" v-model="thewrongword" :border="false"
:custom-style="customStyle" placeholder="请输入" />
</view>
</view>
</view>
<view class="tian-view">
<view class="tian-view-t2" style="margin-left: 20rpx;">
正确词:<view class="word1">
<u-input :auto-height="true" type="textarea" v-model="reswrongword" :border="false" placeholder="请输入" />
<u-input v-if="isshow2" :auto-height="true" type="textarea" v-model="reswrongword" :border="false"
:custom-style="customStyle" placeholder="请输入" />
</view>
</view>
</view>
@@ -756,7 +758,7 @@
},

methods: {
// 对话加命中标签
// 对话加命中标签
dealTypes(type){
if(type){
let tem = type.substring(1).split(',')
@@ -776,34 +778,95 @@
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.isAskQuestions==0){
clickWajue(item) {
if (item.selected == 0) {
this.Pinspeak = false
uni.navigateTo({
url: '/pages/learning/Keywordsearch?customerId=' + this.customerId + "&keyword=" + item.showFormatExpression +
url: '/pages/learning/Keywordsearch?customerId=' + this.customerId + "&keyword=" + item
.question +
"&skpl=" + "2" + '&UpDateEvent=DETAILS2INIT'
})
}
})
}
},
//获取画像标签
getWordMiningList() {
this.treelist = [];
this.$u.get("/corpus/findSelectedWordMiningTemplate", {
houseId: this.buildingID,
selected: 0
})
.then((res) => {
// console.log(res)
if (res.length) {
res.forEach(item => {
item.value = item.id;
item.label = item.name;
if (item.children.length) {
item.children.forEach(subitem => {
subitem.value = subitem.id;
subitem.label = subitem.name;
})
} else {
item.children = [{
value: 'default' + item.id,
label: '--'
}]
}
})
}
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) {
@@ -1616,9 +1679,12 @@
this.cancelBeast()
},
//加入长错词
Oftenthewrongword() {
Oftenthewrongword(item) {
this.reswrongword = "";
this.isshow2 = true;
this.$nextTick(() => {
this.thewrongword = item.onebest.replace(/<.*?>/ig, "");
})
},
//加精华
Addtheessence() {
@@ -1712,8 +1778,8 @@
this.duihuawenjianid = this.luyinList[this.csdFileindex].id;
this.dialogList[i].message[index].isshow = !this.dialogList[i].message[index].isshow;
this.textItself = item.onebest;
let onebest = item.onebest;
this.thewrongword = onebest.replace(/<.*?>/ig, "");
// let onebest = item.onebest;
// this.thewrongword = onebest.replace(/<.*?>/ig, "");
this.messagelisy = this.dialogList[i].message
this.argtextindex1 = i;
this.argtextindex2 = index;
@@ -1980,7 +2046,7 @@
</script>


<style lang="scss" scoped>
<style lang="scss" >
.box {
width: 100%;
height: 100vh;
@@ -2769,12 +2835,8 @@
}

.word1 {
height: 80rpx;
min-height: 80rpx;
flex: 1;

/deep/ textarea {
max-height: 80rpx !important;
}
}
}
}
@@ -2950,6 +3012,7 @@
}
}
}

.jiantobox {
width: 30rpx;


불러오는 중...
취소
저장