|
|
@@ -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: '保存成功', |
|
|
|