corala 1 anno fa
parent
commit
f032b3aa7b
4 ha cambiato i file con 919 aggiunte e 885 eliminazioni
  1. +81
    -0
      src/api/modules/api.js
  2. +14
    -4
      src/views/Customer/label.vue
  3. +764
    -731
      src/views/Template/modelTodo.vue
  4. +60
    -150
      src/views/Template/requiremining.vue

+ 81
- 0
src/api/modules/api.js Vedi File

@@ -1319,5 +1319,86 @@ export function getResultsList(data) {
data: data
})
}
//需求挖掘话术配置- 树图,设置初始选中值及分数回显
export function findSelectedWordMiningTemplate(data) {
return request({
url: `/autoSR/keywords/findSelectedWordMiningTemplate`,
method: 'GET',
data: data
})
}
//需求挖掘话术配置- 编辑提交
export function updateQuestion(data) {
return request({
url: `/autoSR/keywords/updateQuestion`,
method: 'GET',
data: data
})
}
//需求挖掘话术配置-排序提交
export function updateSort(data) {
return request({
url: `/autoSR/marketing/updateSort`,
method: 'POST',
data: data
})
}
//需求挖掘话术配置- 评分保存
export function saveWordTemplate(data) {
return request({
url: `/autoSR/keywords/saveWordTemplate`,
method: 'POST',
data: data
})
}
//需求挖掘话术配置-获取模型数据回显
export function keymodelfindById(data) {
return request({
url: `/autoSR/keymodel/findById`,
method: 'GET',
data: data
})
}
//需求挖掘话术配置-设置话术等级
export function setWordLevel(data) {
return request({
url: `/autoSR/keywords/setWordLevel`,
method: 'GET',
data: data
})
}
//需求挖掘话术配置-添加问题保存
export function addQuestion(data) {
return request({
url: `/autoSR/keywords/addQuestion`,
method: 'POST',
data: data
})
}
//模型提醒
export function todolist(data) {
return request({
url: `/autoSR/todo/list`,
method: 'GET',
data: data
})
}
//需求挖掘话术配置-修改保存标签模型
export function updateKeywordsModel(data) {
return request({
url: `/autoSR/keymodel/updateKeywordsModel`,
method: 'POST',
data: data
})
}
//需求挖掘话术配置-拿问题获取所在的标签数据
export function findKeywordsById(data) {
return request({
url: `/autoSR/keywords/findKeywordsById`,
method: 'GET',
data: data
})
}




+ 14
- 4
src/views/Customer/label.vue Vedi File

@@ -249,13 +249,21 @@
<el-dialog title="新增一级" :visible.sync="dialogVisible2" :center="true" width="400px">
<el-form :model="addForm2">
<el-row :gutter="24">
<el-col :span="24">
<el-form-item
label="名称:"
>
<el-input style="width:300px;" placeholder="名称" v-model="addForm2.name" maxlength="8" autocomplete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-form-item
label="是否必选:"
>
<el-radio-group v-model="addForm2.mustSelected">
<el-radio :label="0">是</el-radio>
<el-radio :label="1">否</el-radio>
</el-radio-group>
</el-form-item>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer" style="border-top:1px solid #eee;padding-top: 20px;display: flex;justify-content: end;">
@@ -402,7 +410,8 @@ export default {
endName: "",
},
addForm2:{
name:''
name:'',
mustSelected:0
},
level: 0,
pid: "",
@@ -663,12 +672,13 @@ export default {
data: {
pid: 0,
name: this.addForm2.name,
mustSelected: this.addForm2.mustSelected,
level:1,
orgCode:orgCode,
},
}).then((res) => {
this.dialogVisible2=false;
this.getHouse()
this.getHouse()
})
}else{
this.$message({


+ 764
- 731
src/views/Template/modelTodo.vue
File diff soppresso perché troppo grande
Vedi File


+ 60
- 150
src/views/Template/requiremining.vue Vedi File

@@ -3,7 +3,7 @@
<div class="content-left">
<div >
<span style="color: red">*</span> 选择楼盘:
<el-select v-model="houseId" size="mini" @change="selectChange" disabled clearable placeholder="请选择">
<el-select v-model="houseId" size="mini" @change="selectChange" clearable placeholder="请选择">
<el-option v-for="item in houseList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
@@ -343,17 +343,11 @@ export default {
},
created() {
this.allTreeListId = [] // 存储的当前树图所有的接单的ID集合,如:[1,3,4,6,7]
this.noIds = []// 左侧树没有,但右侧有的数据id
this.rateMap = new Map()
this.sortMap = new Map()
this.formDataMap = new Map()
},
mounted() {
this.houseId=localStorage.getItem("AitemId");
let menuObj = localStorage.getItem("JumpParams").split(',');
this.menuid = menuObj[0]
this.houseId=localStorage.getItem("houseId");
//获取项目
this.getHouse()
// this.getHouse()
},
computed: {
dragOptions() {
@@ -375,17 +369,13 @@ export default {
this.level1 = data.level1
this.findKeywordsById(data.level1)
// 获取模型数据回显
axios({
url: `${jypath}/zk/keymodel/findById`,
method: 'get',
params: {
houseId: this.houseId,
level: this.level1,
keyType: 0,
questionId: this.questionId,
keywordsId: data.keywordsId
}
}).then(res => {
this.$api.api.findKeywordsById({
houseId: this.houseId,
level: this.level1,
keyType: 0,
questionId: this.questionId,
keywordsId: data.keywordsId
}).then((res) => {
this.moxingVisible = true
if (res.data.res == 1) {
let obj = res.data.obj
@@ -471,11 +461,8 @@ export default {
originalExpression: item.editValue // html,带span标签
}
})
axios({
url: `${jypath}/zk/keymodel/updateKeywordsModel`,
method: 'post',
data: {
id: this.form.id,
this.$api.api.updateKeywordsModel({
id: this.form.id,
questionId: this.questionId,
houseId:this.houseId,
keyType: 0,
@@ -486,8 +473,7 @@ export default {
originalExpression: temp, // html==带span标签
answerList: answerList,
showFormatExpression: text.innerText
}
}).then(data => {
}).then((res) => {
this.cansave = false;
this.moxingVisible = false
if(data.data.res==1){
@@ -500,7 +486,6 @@ export default {
this.cansave = false;
this.moxingVisible = false
})

},
// 确认插入选择的话术
clickOK(){
@@ -667,16 +652,12 @@ export default {
// 拿问题获取所在的标签数据
findKeywordsById(level){
this.wajueList = []
axios({
url: `${jypath}/zk/keywords/findKeywordsById`,
method: 'get',
params: {
houseId: this.houseId,
keyType:0,//挖掘
keywordsId: this.form.keywordsId,
level: level
}
}).then(res => {
this.$api.api.findKeywordsById({
houseId: this.houseId,
keyType:0,//挖掘
keywordsId: this.form.keywordsId,
level: level
}).then((res) => {
if (res.data.res == 1){
console.log(res.data)
this.wajueList = res.data.obj
@@ -745,16 +726,12 @@ export default {
}
if(!this.flag){
this.flag = true
axios({
url: `${jypath}/zk/keywords/addQuestion`,
method: 'post',
data: {
houseId: this.houseId,
level: this.level,
keywordsId: this.frosasd.id,
question: this.dynamicTags.join(';')
}
}).then(res => {
this.$api.api.addQuestion({
houseId: this.houseId,
level: this.level,
keywordsId: this.frosasd.id,
question: this.dynamicTags.join(';')
}).then((res) => {
this.flag = false
if (res.data.res === 1) {
// console.log(res.data)
@@ -776,11 +753,12 @@ export default {
},
// 设置需求话术等级
saveSet() {
axios({
url: `${jypath}/zk/keywords/setWordLevel?houseId=` + this.houseId + '&level=' + this.frosasd.setVal + '&keywordId=' + this.frosasd.id,
method: 'get',
params: {}
}).then(res => {
this.$api.api.setWordLevel({
houseI: this.houseId,
level: this.frosasd.setVal,
keywordId: this.frosasd.id
}).then((res) => {
if (res.data.res === 1) {
// console.log(res.data)
this.$message({
@@ -800,11 +778,10 @@ export default {
},
// 删除问题
remove(node, data) {
axios({
url: `${jypath}/zk/keywords/delQuestion?houseId=` + this.houseId + '&id=' + (data.id).substring(1),
method: 'get',
params: {}
}).then(res => {
this.$api.api.delQuestion({
houseI: this.houseId,
id: (data.id).substring(1)
}).then((res) => {
if (res.data.res === 1) {
console.log(res.data)
this.$message({
@@ -822,13 +799,10 @@ export default {
},
// 获取项目下拉的数据
getHouse() {
axios({
url: `${jypath}/template/getHouse`,
method: 'get',
params: {}
}).then(res => {
if (res.data.res === 1) {
this.houseList = res.data.obj.map(item => {
this.$api.api.findHouseByUser({
orgType: localStorage.getItem("orgType"),
}).then((res) => {
this.houseList = res.data.map(item => {
return {
value: item.id,
label: item.propertyName
@@ -837,23 +811,18 @@ export default {
if (this.houseId == '') {
this.houseId = this.houseList[0].value;
}
this.getTreeData()
this.setInitCheck()
}
this.getTreeData()
this.setInitCheck()
});
},
// 树图,设置初始选中值及分数回显
setInitCheck() {
this.defaultCheck = []
axios({
url: `${jypath}/zk/keywords/findSelectedWordMiningTemplate`,
method: 'get',
params: {
houseId: this.houseId,
selected:0,//selected 0选中 1未选中
menu:this.menuid
}
}).then(res => {
this.$api.api.findSelectedWordMiningTemplate({
houseId: this.houseId,
selected:0,//selected 0选中 1未选中
menu:this.menuid
}).then((res) => {
if (res.data.res === 1) {
let data = res.data.obj.list
data = JSON.stringify(data).replace(/name/g, 'label')
@@ -911,15 +880,11 @@ export default {
},
// 获取层级树
getTreeData() {
axios({
url: `${jypath}/zk/keywords/findSelectedWordMiningTemplate`,
method: 'get',
params: {
houseId: this.houseId,
selected:1,//selected 0选中 1未选中
menu:this.menuid
}
}).then(res => {
this.$api.api.findSelectedWordMiningTemplate({
houseId: this.houseId,
selected:1,//selected 0选中 1未选中
menu:this.menuid
}).then((res) => {
if (res.data.res === 1) {
let data = res.data.obj.list
if(res.data.obj.permitBtn.length){
@@ -1022,15 +987,11 @@ export default {
},
//编辑提交
submiadd() {
axios({
url: `${jypath}/zk/keywords/updateQuestion`,
method: 'get',
params: {
id: this.frosasd.id,
houseId: this.houseId,
question: this.frosasd.name
}
}).then(res => {
this.$api.api.updateQuestion({
id: this.frosasd.id,
houseId: this.houseId,
question: this.frosasd.name
}).then((res) => {
if (res.data.res == 1) {
this.$message({
message: '修改成功',
@@ -1056,7 +1017,6 @@ export default {
//拖拽排序
Peerdrag(before) {
let arr = [];

this.treeList.forEach((item, index) => {
if (before.data.pid == item.pid) {
arr.push(item)
@@ -1101,15 +1061,9 @@ export default {
},
//排序提交
dragSort(list) {
axios({
url: `${jypath}/marketing/updateSort`,
method: 'post',
data: {
children: list
}
}).then(res => {

});
this.$api.api.updateSort({
children: list
}).then((res) => {})
},
//控制那个可拖拽节点
allowDrag(draggingNode, dropNode, type) {
@@ -1153,14 +1107,6 @@ export default {
Deletecategories(item, index) {
if (this.newlist[index].children.length == 0) {
this.newlist.splice(index, 1)
// 取消左侧的勾选
// let number = this.defaultCheck.indexOf(item.id)
// if(number>0){
// this.defaultCheck.splice(number,1)
// }
// // console.log('删除评分一级',item.id)
// // console.log(this.defaultCheck)
// this.$refs.tree.setCheckedKeys(this.defaultCheck)
} else {
this.$message({
message: '请先清空子级',
@@ -1172,15 +1118,6 @@ export default {
Removethesecondary(index, idx, asd) {
if (this.newlist[index].children[idx].children == null || this.newlist[index].children[idx].children.length == 0) {
this.newlist[index].children.splice(idx, 1)
// 取消左侧的勾选
// let number = this.defaultCheck.indexOf(asd.id)
// if(number>0){
// this.defaultCheck.splice(number,1)
// }
// // console.log('删除评分二级')
// // console.log(this.defaultCheck,asd.id)
// this.$refs.tree.setCheckedKeys(this.defaultCheck)

} else {
this.$message({
message: '请先清空子级',
@@ -1191,31 +1128,10 @@ export default {
//删除 二级下的问题
Deletethelevel2(index, idx, indx, sanji) {
this.newlist[index].children[idx].children.splice(indx, 1);
// 取消左侧的勾选
// if((sanji.id+'').indexOf('q')<0){
// sanji.id= 'q'+sanji.id
// }
// console.log(this.defaultCheck)
// let number = this.defaultCheck.indexOf(sanji.id)
// if(number>0){
// this.defaultCheck.splice(number,1)
// }
// console.log('二级下的问题',sanji.id)
// console.log(this.defaultCheck)
// this.$refs.tree.setCheckedKeys(this.defaultCheck)
},
// 删除 一级下的问题,没有二级
Deletethelevel1(index, idx, sanji) {
this.newlist[index].children.splice(idx, 1);
// 取消左侧的勾选
// if((sanji.id+'').indexOf('q')<0){
// sanji.id= 'q'+sanji.id
// }
// let number = this.defaultCheck.indexOf(sanji.id)
// if(number>0){
// this.defaultCheck.splice(number,1)
// }
// this.$refs.tree.setCheckedKeys(this.defaultCheck)
},
// ------获取选中的节点
getCheckedNode() {
@@ -1334,8 +1250,6 @@ export default {
});
return
}
;

//一级
for (var i = 0; i < list.length; i++) {
if (list[i].fraction == '') {
@@ -1485,11 +1399,7 @@ export default {
},
// 评分保存
saveRate(params) {
axios({
url: `${jypath}/zk/keywords/saveWordTemplate`,
method: 'post',
data: params,
}).then(res => {
this.$api.api.saveWordTemplate(params).then((res) => {
if (res.data.res === 1) {
this.$message({
message: '保存成功',


Caricamento…
Annulla
Salva