@@ -1319,18 +1319,11 @@ export function getResultsList(data) { | |||||
data: data | data: data | ||||
}) | }) | ||||
} | } | ||||
//需求挖掘话术配置- 树图,设置初始选中值及分数回显 | |||||
export function findSelectedWordMiningTemplate(data) { | |||||
return request({ | |||||
url: `/autoSR/keywords/findSelectedWordMiningTemplate`, | |||||
method: 'GET', | |||||
data: data | |||||
}) | |||||
} | |||||
//需求挖掘话术配置- 编辑提交 | //需求挖掘话术配置- 编辑提交 | ||||
export function updateQuestion(data) { | export function updateQuestion(data) { | ||||
return request({ | return request({ | ||||
url: `/autoSR/keywords/updateQuestion`, | |||||
url: `/autoSRzk//keywords/updateQuestion`, | |||||
method: 'GET', | method: 'GET', | ||||
data: data | data: data | ||||
}) | }) | ||||
@@ -1346,7 +1339,7 @@ export function updateSort(data) { | |||||
//需求挖掘话术配置- 评分保存 | //需求挖掘话术配置- 评分保存 | ||||
export function saveWordTemplate(data) { | export function saveWordTemplate(data) { | ||||
return request({ | return request({ | ||||
url: `/autoSR/keywords/saveWordTemplate`, | |||||
url: `/autoSR/zk/keywords/saveWordTemplate`, | |||||
method: 'POST', | method: 'POST', | ||||
data: data | data: data | ||||
}) | }) | ||||
@@ -1354,7 +1347,7 @@ export function saveWordTemplate(data) { | |||||
//需求挖掘话术配置-获取模型数据回显 | //需求挖掘话术配置-获取模型数据回显 | ||||
export function keymodelfindById(data) { | export function keymodelfindById(data) { | ||||
return request({ | return request({ | ||||
url: `/autoSR/keymodel/findById`, | |||||
url: `/autoSR/zk/keymodel/findById`, | |||||
method: 'GET', | method: 'GET', | ||||
data: data | data: data | ||||
}) | }) | ||||
@@ -1362,7 +1355,7 @@ export function keymodelfindById(data) { | |||||
//需求挖掘话术配置-设置话术等级 | //需求挖掘话术配置-设置话术等级 | ||||
export function setWordLevel(data) { | export function setWordLevel(data) { | ||||
return request({ | return request({ | ||||
url: `/autoSR/keywords/setWordLevel`, | |||||
url: `/autoSR/zk/keywords/setWordLevel`, | |||||
method: 'GET', | method: 'GET', | ||||
data: data | data: data | ||||
}) | }) | ||||
@@ -1370,23 +1363,16 @@ export function setWordLevel(data) { | |||||
//需求挖掘话术配置-添加问题保存 | //需求挖掘话术配置-添加问题保存 | ||||
export function addQuestion(data) { | export function addQuestion(data) { | ||||
return request({ | return request({ | ||||
url: `/autoSR/keywords/addQuestion`, | |||||
url: `/autoSR/zk/keywords/addQuestion`, | |||||
method: 'POST', | method: 'POST', | ||||
data: data | data: data | ||||
}) | }) | ||||
} | } | ||||
//模型提醒 | |||||
export function todolist(data) { | |||||
return request({ | |||||
url: `/autoSR/todo/list`, | |||||
method: 'GET', | |||||
data: data | |||||
}) | |||||
} | |||||
//需求挖掘话术配置-修改保存标签模型 | //需求挖掘话术配置-修改保存标签模型 | ||||
export function updateKeywordsModel(data) { | export function updateKeywordsModel(data) { | ||||
return request({ | return request({ | ||||
url: `/autoSR/keymodel/updateKeywordsModel`, | |||||
url: `/autoSR/zk/keymodel/updateKeywordsModel`, | |||||
method: 'POST', | method: 'POST', | ||||
data: data | data: data | ||||
}) | }) | ||||
@@ -1394,7 +1380,7 @@ export function updateKeywordsModel(data) { | |||||
//需求挖掘话术配置-拿问题获取所在的标签数据 | //需求挖掘话术配置-拿问题获取所在的标签数据 | ||||
export function findKeywordsById(data) { | export function findKeywordsById(data) { | ||||
return request({ | return request({ | ||||
url: `/autoSR/keywords/findKeywordsById`, | |||||
url: `/autoSR/zk/keywords/findKeywordsById`, | |||||
method: 'GET', | method: 'GET', | ||||
data: data | data: data | ||||
}) | }) | ||||
@@ -63,7 +63,6 @@ | |||||
</span> | </span> | ||||
<span style="margin-left: 10px" v-if="data.isInterval!=0"> | <span style="margin-left: 10px" v-if="data.isInterval!=0"> | ||||
<el-button class="editor" type="text" size="mini" @click="() => ddeditor(node, data)">编辑</el-button> | <el-button class="editor" type="text" size="mini" @click="() => ddeditor(node, data)">编辑</el-button> | ||||
<el-button class="editor" type="text" size="mini" @click="() => moxingEdit(node, data)">编辑模型</el-button> | |||||
</span> | </span> | ||||
</span> | </span> | ||||
@@ -74,19 +73,19 @@ | |||||
</span> | </span> | ||||
<span style="margin-left: 10px"> | <span style="margin-left: 10px"> | ||||
<el-button class="editorcd" type="text" size="mini" @click="ddeditor(node, data)">编辑</el-button> | <el-button class="editorcd" type="text" size="mini" @click="ddeditor(node, data)">编辑</el-button> | ||||
<el-button class="editor" v-if="labelmodelshow" type="text" size="mini" @click="() => moxingEdit(node, data)">编辑模型</el-button> | |||||
</span> | </span> | ||||
<span style="margin-left: 10px"> | <span style="margin-left: 10px"> | ||||
<el-button class="remove" type="text" size="mini" @click="remove(node, data)" >删除</el-button> | <el-button class="remove" type="text" size="mini" @click="remove(node, data)" >删除</el-button> | ||||
</span> | </span> | ||||
</span> | </span> | ||||
<span v-if="data.level == 3" style="display: flex; align-items: center" > | <span v-if="data.level == 3" style="display: flex; align-items: center" > | ||||
<span style="margin-left: 10px"> | |||||
<el-button class="editorcd" type="text" size="mini" @click="moxingEdit(node, data)" >编辑模型</el-button> | |||||
</span> | |||||
<span style="margin-left: 10px"> | <span style="margin-left: 10px"> | ||||
<el-button class="editorcd" type="text" size="mini" @click="ddeditor(node, data)" >编辑</el-button> | <el-button class="editorcd" type="text" size="mini" @click="ddeditor(node, data)" >编辑</el-button> | ||||
</span> | </span> | ||||
<span style="margin-left: 10px" v-if="labelmodelshow"> | |||||
<el-button class="editorcd" type="text" size="mini" @click="moxingEdit(node, data)" >编辑模型</el-button> | |||||
</span> | |||||
<span style="margin-left: 10px"> | <span style="margin-left: 10px"> | ||||
<el-button class="remove" type="text" size="mini" @click="remove(node, data)" >删除</el-button> | <el-button class="remove" type="text" size="mini" @click="remove(node, data)" >删除</el-button> | ||||
</span> | </span> | ||||
@@ -95,8 +94,7 @@ | |||||
</el-tree> | </el-tree> | ||||
</div> | </div> | ||||
<el-dialog title="新增" :visible.sync="dialogFormVisible" :center="true" width="400px"> | |||||
<el-dialog title="新增" :visible.sync="dialogFormVisible" :center="true" width="600px"> | |||||
<div | <div | ||||
v-if="amountintervalname == '意向面积'" | v-if="amountintervalname == '意向面积'" | ||||
style="display: flex; height: 40px; line-height: 40px" | style="display: flex; height: 40px; line-height: 40px" | ||||
@@ -151,6 +149,18 @@ | |||||
> | > | ||||
<el-input v-model="addForm.name" placeholder="三级名称" maxlength="8" autocomplete="off"></el-input> | <el-input v-model="addForm.name" placeholder="三级名称" maxlength="8" autocomplete="off"></el-input> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="场景描述:" :label-width="formLabelWidth" v-if="level==2||level==3"> | |||||
<el-input | |||||
type="textarea" | |||||
maxlength="100" | |||||
show-word-limit | |||||
:autosize="{ minRows: 4, maxRows: 8}" | |||||
placeholder="请输入内容" | |||||
v-model="addForm.sceneDesc"> | |||||
</el-input> | |||||
<div>增加场景描述有利于标签命中,场景越丰富触达越精准; | |||||
例如:意向面积:120平,场景:我想要一个120平的;</div> | |||||
</el-form-item> | |||||
</el-col> | </el-col> | ||||
</el-row> | </el-row> | ||||
</el-form> | </el-form> | ||||
@@ -169,7 +179,7 @@ | |||||
</el-dialog> | </el-dialog> | ||||
<!--?编辑弹框?--> | <!--?编辑弹框?--> | ||||
<el-dialog title="编辑" :visible.sync="isshowage" :center="true" width="400px"> | |||||
<el-dialog title="编辑" :visible.sync="isshowage" :center="true" width="600px"> | |||||
<div | <div | ||||
v-if="amountintervalname == '意向面积'" | v-if="amountintervalname == '意向面积'" | ||||
style="display: flex; height: 40px; line-height: 40px" | style="display: flex; height: 40px; line-height: 40px" | ||||
@@ -200,19 +210,33 @@ | |||||
></span> | ></span> | ||||
<span style="margin-left: 6px">万元</span> | <span style="margin-left: 6px">万元</span> | ||||
</div> | </div> | ||||
<div v-else style="display: flex; align-items: center; height: 40px"> | |||||
<div style="height: 30px; line-height: 30px"> | |||||
类名: | |||||
<div v-else style="display: flex;align-items: center;height: 40px;"> | |||||
<div style="width:90px"> | |||||
类名: | |||||
</div> | </div> | ||||
<div style="width:88%"> | |||||
<el-input maxlength="8" | <el-input maxlength="8" | ||||
v-model="frosasd.name" | v-model="frosasd.name" | ||||
placeholder="类名" | placeholder="类名" | ||||
type="text" | type="text" | ||||
></el-input> | ></el-input> | ||||
</div> | |||||
<div style="display: flex; align-items: center;margin-top:20px" v-if="frosasd.level==2||frosasd.level==3"> | |||||
<div style="width:105px"> | |||||
场景描述: | |||||
</div> | |||||
<div> | |||||
<el-input | |||||
type="textarea" | |||||
maxlength="100" | |||||
show-word-limit | |||||
:autosize="{ minRows: 4, maxRows: 8}" | |||||
placeholder="请输入内容" | |||||
v-model="frosasd.desc"> | |||||
</el-input> | |||||
<div>增加场景描述有利于标签命中,场景越丰富触达越精准; | |||||
例如:意向面积:120平,场景:我想要一个120平的;</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div style="display: flex; justify-content: center; margin-top: 40px"> | <div style="display: flex; justify-content: center; margin-top: 40px"> | ||||
<button | <button | ||||
style=" | style=" | ||||
@@ -408,6 +432,7 @@ export default { | |||||
addForm: { | addForm: { | ||||
name: "", | name: "", | ||||
endName: "", | endName: "", | ||||
sceneDesc: '' | |||||
}, | }, | ||||
addForm2:{ | addForm2:{ | ||||
name:'', | name:'', | ||||
@@ -425,6 +450,7 @@ export default { | |||||
orgCode: "", | orgCode: "", | ||||
sort: "", | sort: "", | ||||
level: "", | level: "", | ||||
desc: '' | |||||
}, | }, | ||||
amountintervalname: "", | amountintervalname: "", | ||||
isInterval: "", | isInterval: "", | ||||
@@ -436,6 +462,7 @@ export default { | |||||
}, | }, | ||||
created() { | created() { | ||||
this.yyc_add_level1 = this.permissions["yyc_add_level1"]; | this.yyc_add_level1 = this.permissions["yyc_add_level1"]; | ||||
this.labelmodelshow = this.permissions["labelmodelshow"]; // 编辑模型按钮权限 | |||||
}, | }, | ||||
mounted() { | mounted() { | ||||
// 获取项目列表 | // 获取项目列表 | ||||
@@ -577,7 +604,7 @@ export default { | |||||
if(text.innerText=='') {this.$message.error('请输入标签模型'); return;} | if(text.innerText=='') {this.$message.error('请输入标签模型'); return;} | ||||
axios({ | axios({ | ||||
url: `${jypath}/zk/keymodel/updateKeywordsModel`, | |||||
url: `/autoSR/zk/keymodel/updateKeywordsModel`, | |||||
method: 'post', | method: 'post', | ||||
data: { | data: { | ||||
id: this.form.id, | id: this.form.id, | ||||
@@ -606,25 +633,26 @@ export default { | |||||
}, | }, | ||||
moxingEdit(node, data){ | moxingEdit(node, data){ | ||||
// console.log(data) | |||||
console.log(data) | |||||
this.level = data.level | this.level = data.level | ||||
this.form.keywordsName = data.endName?data.name+'~'+data.endName:data.name | this.form.keywordsName = data.endName?data.name+'~'+data.endName:data.name | ||||
this.form.keywordsId = data.keywordsId | this.form.keywordsId = data.keywordsId | ||||
this.form.sceneDesc = data.desc ||'' | this.form.sceneDesc = data.desc ||'' | ||||
// 获取模型数据回显 | // 获取模型数据回显 | ||||
axios({ | axios({ | ||||
url: `${jypath}/zk/keymodel/findById`, | |||||
url: `/autoSR/zk/keymodel/findById`, | |||||
method: 'get', | method: 'get', | ||||
params: { | params: { | ||||
houseId: this.houseId, | houseId: this.houseId, | ||||
level: this.level, | level: this.level, | ||||
keyType: 2, | keyType: 2, | ||||
keywordsId: data.keywordsId | |||||
keywordsId: data.id | |||||
} | } | ||||
}).then(res => { | }).then(res => { | ||||
console.log(res) | |||||
this.moxingVisible = true | this.moxingVisible = true | ||||
if (res.data.res == 1) { | |||||
let obj = res.data.obj | |||||
if (res.code == 0) { | |||||
let obj = res.data | |||||
if(obj!=null){ | if(obj!=null){ | ||||
this.form.distance=obj.distance||10 | this.form.distance=obj.distance||10 | ||||
this.form.originalExpression= obj.originalExpression | this.form.originalExpression= obj.originalExpression | ||||
@@ -675,6 +703,7 @@ export default { | |||||
mustSelected: this.addForm2.mustSelected, | mustSelected: this.addForm2.mustSelected, | ||||
level:1, | level:1, | ||||
orgCode:orgCode, | orgCode:orgCode, | ||||
houseId:this.houseId | |||||
}, | }, | ||||
}).then((res) => { | }).then((res) => { | ||||
this.dialogVisible2=false; | this.dialogVisible2=false; | ||||
@@ -702,7 +731,7 @@ export default { | |||||
}, | }, | ||||
}).then((res) => { | }).then((res) => { | ||||
if (res.code == 0) { | if (res.code == 0) { | ||||
console.log(res.data); | |||||
// console.log(res.data); | |||||
this.treeList = res.data; | this.treeList = res.data; | ||||
} | } | ||||
}); | }); | ||||
@@ -775,6 +804,8 @@ export default { | |||||
level: this.level, | level: this.level, | ||||
orgCode: this.orgCode, | orgCode: this.orgCode, | ||||
isInterval: this.isInterval, | isInterval: this.isInterval, | ||||
houseId:this.houseId, | |||||
desc:this.addForm.sceneDesc, | |||||
}, | }, | ||||
}).then((res) => { | }).then((res) => { | ||||
if (res.code == 0) { | if (res.code == 0) { | ||||
@@ -813,18 +844,18 @@ export default { | |||||
}); | }); | ||||
}); | }); | ||||
} | } | ||||
this.zkhousePage() | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
//删除节点 | //删除节点 | ||||
remove(node, data) { | remove(node, data) { | ||||
// console.log(data, "123"); | // console.log(data, "123"); | ||||
this.deleteId = data.id; | |||||
if (data.level == 3) { | if (data.level == 3) { | ||||
this.deleteId = data.id; | |||||
this.dialogVisible = true; | this.dialogVisible = true; | ||||
} else { | } else { | ||||
if (data.children.length == 0) { | if (data.children.length == 0) { | ||||
this.deleteId = data.id; | |||||
this.dialogVisible = true; | this.dialogVisible = true; | ||||
} else { | } else { | ||||
this.$message({ | this.$message({ | ||||
@@ -841,6 +872,7 @@ export default { | |||||
method: "get", | method: "get", | ||||
params: { | params: { | ||||
id: this.deleteId, | id: this.deleteId, | ||||
houseId:this.houseId | |||||
}, | }, | ||||
}).then((res) => { | }).then((res) => { | ||||
if (res.code == 0) { | if (res.code == 0) { | ||||
@@ -873,6 +905,7 @@ export default { | |||||
orgCode: "", | orgCode: "", | ||||
sort: "", | sort: "", | ||||
level: "", | level: "", | ||||
desc: '' | |||||
}; | }; | ||||
if (data.isInterval == 0) { | if (data.isInterval == 0) { | ||||
this.frosasd.isInterval = 0; | this.frosasd.isInterval = 0; | ||||
@@ -893,6 +926,7 @@ export default { | |||||
this.frosasd.orgCode = data.orgCode; | this.frosasd.orgCode = data.orgCode; | ||||
this.frosasd.sort = data.sort; | this.frosasd.sort = data.sort; | ||||
this.frosasd.level = data.level; | this.frosasd.level = data.level; | ||||
this.frosasd.desc = data.desc; | |||||
this.isshowage = true; | this.isshowage = true; | ||||
}, | }, | ||||
//取消编辑 | //取消编辑 | ||||
@@ -939,12 +973,11 @@ export default { | |||||
axios({ | axios({ | ||||
url: `/autoSR/zk/keywords/update`, | url: `/autoSR/zk/keywords/update`, | ||||
method: "post", | method: "post", | ||||
data: this.frosasd, | |||||
data: {...this.frosasd,houseId: this.houseId}, | |||||
}).then((res) => { | }).then((res) => { | ||||
if (res.code == 0) { | if (res.code == 0) { | ||||
this.getHouse() | this.getHouse() | ||||
that.isshowage=false; | that.isshowage=false; | ||||
return | |||||
that.treeList.forEach((item, index) => { | that.treeList.forEach((item, index) => { | ||||
item.children.forEach((asd, indexesd) => { | item.children.forEach((asd, indexesd) => { | ||||
if (asd.id == that.frosasd.id) { | if (asd.id == that.frosasd.id) { | ||||
@@ -236,8 +236,8 @@ export default { | |||||
} | } | ||||
}, | }, | ||||
mounted() { | mounted() { | ||||
// this.houseId=localStorage.getItem("AitemId"); | |||||
// this.getorgCode() | |||||
this.houseId=localStorage.getItem("houseId"); | |||||
this.getorgCode() | |||||
}, | }, | ||||
methods: { | methods: { | ||||
// 校验是否已经选择过此标签 | // 校验是否已经选择过此标签 | ||||
@@ -378,7 +378,7 @@ export default { | |||||
// 拿问题获取所在的标签数据 | // 拿问题获取所在的标签数据 | ||||
findKeywordsById(keywordsId){ | findKeywordsById(keywordsId){ | ||||
axios({ | axios({ | ||||
url: `${jypath}/zk/keywords/findKeywordsById`, | |||||
url: `/autoSR/zk/keywords/findKeywordsById`, | |||||
method: 'get', | method: 'get', | ||||
params: { | params: { | ||||
houseId: this.houseId, | houseId: this.houseId, | ||||
@@ -386,9 +386,9 @@ export default { | |||||
level: 1 | level: 1 | ||||
} | } | ||||
}).then(res => { | }).then(res => { | ||||
if (res.data.res == 1){ | |||||
if (res.code==0){ | |||||
// console.log(res.data) | // console.log(res.data) | ||||
this.wajueList = res.data.obj | |||||
this.wajueList = res.data | |||||
if(this.wajueList&&this.wajueList.length){ | if(this.wajueList&&this.wajueList.length){ | ||||
this.wajueList.forEach(item=>{ | this.wajueList.forEach(item=>{ | ||||
item.disabled = false | item.disabled = false | ||||
@@ -497,14 +497,14 @@ export default { | |||||
confirmButtonText: '确定', | confirmButtonText: '确定', | ||||
callback: action => { | callback: action => { | ||||
axios({ | axios({ | ||||
url: `${jypath}/zk/keymodel/delKeywordsModel`, | |||||
url: `/autoSR/zk/keymodel/delKeywordsModel`, | |||||
method: 'get', | method: 'get', | ||||
params: { | params: { | ||||
id: item.id, | id: item.id, | ||||
houseId: this.houseId | houseId: this.houseId | ||||
} | } | ||||
}).then(data => { | }).then(data => { | ||||
if(data.data.res==1){ | |||||
if(data.code==0){ | |||||
this.getorgCode() | this.getorgCode() | ||||
} | } | ||||
}).catch((e)=>{ | }).catch((e)=>{ | ||||
@@ -569,7 +569,7 @@ export default { | |||||
}) | }) | ||||
} | } | ||||
axios({ | axios({ | ||||
url: `${jypath}/zk/keymodel/updateKeywordsModel`, | |||||
url: `/autoSR/zk/keymodel/updateKeywordsModel`, | |||||
method: 'post', | method: 'post', | ||||
data: { | data: { | ||||
id: this.form.id, | id: this.form.id, | ||||
@@ -585,14 +585,14 @@ export default { | |||||
showFormatExpression: text.innerText, | showFormatExpression: text.innerText, | ||||
distance: this.form.distance // 距离 | distance: this.form.distance // 距离 | ||||
} | } | ||||
}).then(data => { | |||||
}).then(res => { | |||||
this.cansave = false | this.cansave = false | ||||
this.dialogVisible = false | this.dialogVisible = false | ||||
if(data.data.res==1){ | |||||
this.$message.success(data.data.obj) | |||||
if(res.code==0){ | |||||
this.$message.success(res.data) | |||||
this.getorgCode() | this.getorgCode() | ||||
}else{ | }else{ | ||||
this.$message.error(data.data.resMsg) | |||||
this.$message.error(res.msg) | |||||
} | } | ||||
}).catch((e)=>{ | }).catch((e)=>{ | ||||
this.cansave = false | this.cansave = false | ||||
@@ -611,7 +611,7 @@ export default { | |||||
this.loading= true | this.loading= true | ||||
this.tableData=[]; | this.tableData=[]; | ||||
axios({ | axios({ | ||||
url: `${jypath}/zk/keymodel/findKeywordsModel`, | |||||
url: `/autoSR/zk/keymodel/findKeywordsModel`, | |||||
method: 'get', | method: 'get', | ||||
params: { | params: { | ||||
houseId:this.houseId, | houseId:this.houseId, | ||||
@@ -620,11 +620,11 @@ export default { | |||||
keywordsName: this.value, | keywordsName: this.value, | ||||
keyType: this.keyType | keyType: this.keyType | ||||
} | } | ||||
}).then(data => { | |||||
}).then(res => { | |||||
this.loading= false | this.loading= false | ||||
if(data.data.res==1){ | |||||
this.tableData=data.data.obj.results; | |||||
this.total=data.data.obj.totalRecord; | |||||
if(res.code==0){ | |||||
this.tableData=res.data.results; | |||||
this.total=res.data.totalRecord; | |||||
} | } | ||||
}).catch((e)=>{ | }).catch((e)=>{ | ||||
this.loading= false | this.loading= false | ||||
@@ -23,7 +23,7 @@ | |||||
名称: | 名称: | ||||
<el-input | <el-input | ||||
placeholder="处理人" | placeholder="处理人" | ||||
v-model="searchForm.updateUserName" | |||||
v-model="searchForm.name" | |||||
style="width: 140px" | style="width: 140px" | ||||
></el-input> | ></el-input> | ||||
</div> | </div> | ||||
@@ -39,12 +39,12 @@ | |||||
项目名称: | 项目名称: | ||||
<el-input | <el-input | ||||
placeholder="处理人" | placeholder="处理人" | ||||
v-model="searchForm.updateUserName" | |||||
v-model="searchForm.houseName" | |||||
style="width: 140px" | style="width: 140px" | ||||
></el-input> | ></el-input> | ||||
</div> | </div> | ||||
<div style="margin-left: 20px"> | <div style="margin-left: 20px"> | ||||
<el-button @click="Screening" type="primary">筛选</el-button> | |||||
<el-button @click="searchFun" type="primary">筛选</el-button> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -192,7 +192,7 @@ | |||||
<el-button :disabled="dynamiclist.length==wajueList.length" v-if="keyType==0" @click="addItemFun" icon="el-icon-plus" type="primary" size="mini" style="width: 120px;margin:20px 0;"></el-button> | <el-button :disabled="dynamiclist.length==wajueList.length" v-if="keyType==0" @click="addItemFun" icon="el-icon-plus" type="primary" size="mini" style="width: 120px;margin:20px 0;"></el-button> | ||||
</div> | </div> | ||||
<el-form-item label="插入节点:"> | <el-form-item label="插入节点:"> | ||||
<el-button size="mini" type="primary" plain style="margin-left:8px;" v-for="(item,index) in taglist" :key="index" @click="insertTag(item,index)">{{item.label}}</el-button> | |||||
<el-button size="mini" type="primary" style="margin-left:8px;" v-for="(item,index) in taglist" :key="index" @click="insertTag(item,index)">{{item.label}}</el-button> | |||||
</el-form-item> | </el-form-item> | ||||
</el-form> | </el-form> | ||||
<span slot="footer" class="dialog-footer"> | <span slot="footer" class="dialog-footer"> | ||||
@@ -261,25 +261,27 @@ export default { | |||||
}; | }; | ||||
}, | }, | ||||
mounted() { | mounted() { | ||||
// this.houseId = localStorage.getItem("AitemId"); | |||||
// this.gettableList() | |||||
this.houseId = localStorage.getItem("houseId"); | |||||
this.gettableList() | |||||
}, | }, | ||||
methods: { | methods: { | ||||
// keytype =0,获取需求挖掘类型的数据回显接口 | // keytype =0,获取需求挖掘类型的数据回显接口 | ||||
wajuehuixian() { | wajuehuixian() { | ||||
// 获取模型数据回显 | // 获取模型数据回显 | ||||
this.$api.api | |||||
.keymodelfindById({ | |||||
houseId: this.currentHouseId, | |||||
level: this.level, | |||||
keyType: 0, | |||||
questionId: this.questionId, | |||||
keywordsId: this.form.keywordsId, | |||||
}) | |||||
.then((res) => { | |||||
axios({ | |||||
url: `/autoSR/zk/keymodel/findById`, | |||||
method: 'get', | |||||
params: { | |||||
houseId: this.currentHouseId, | |||||
level: this.level, | |||||
keyType: 0, | |||||
questionId: this.questionId, | |||||
keywordsId: this.form.keywordsId | |||||
} | |||||
}).then((res) => { | |||||
this.dialogVisible = true; | this.dialogVisible = true; | ||||
if (res.data.res == 1) { | |||||
let obj = res.data.obj; | |||||
if (res.code== 0) { | |||||
let obj = res.data; | |||||
if (obj != null) { | if (obj != null) { | ||||
this.form.distance = obj.distance || 10; | this.form.distance = obj.distance || 10; | ||||
this.form.originalExpression = obj.originalExpression; | this.form.originalExpression = obj.originalExpression; | ||||
@@ -331,17 +333,19 @@ export default { | |||||
}, | }, | ||||
otherhuixian(type) { | otherhuixian(type) { | ||||
// 获取模型数据回显 | // 获取模型数据回显 | ||||
this.$api.api | |||||
.keymodelfindById({ | |||||
houseId: this.currentHouseId, | |||||
level: type == 3 ? 1 : this.level, | |||||
keyType: type, | |||||
keywordsId: this.form.keywordsId, | |||||
}) | |||||
.then((res) => { | |||||
axios({ | |||||
url: `/autoSR/zk/keymodel/findById`, | |||||
method: 'get', | |||||
params: { | |||||
houseId: this.currentHouseId, | |||||
level: type==3?1:this.level, | |||||
keyType: type, | |||||
keywordsId: this.form.keywordsId | |||||
} | |||||
}).then((res) => { | |||||
this.dialogVisible = true; | this.dialogVisible = true; | ||||
if (res.data.res == 1) { | |||||
let obj = res.data.obj; | |||||
if (res.code == 0) { | |||||
let obj = res.data; | |||||
if (obj != null) { | if (obj != null) { | ||||
this.form.distance = obj.distance || 10; | this.form.distance = obj.distance || 10; | ||||
this.form.originalExpression = obj.originalExpression || ""; | this.form.originalExpression = obj.originalExpression || ""; | ||||
@@ -499,11 +503,11 @@ export default { | |||||
.then((res) => { | .then((res) => { | ||||
this.cansave = false; | this.cansave = false; | ||||
this.dialogVisible = false; | this.dialogVisible = false; | ||||
if (data.data.res == 1) { | |||||
this.$message.success(data.data.obj); | |||||
if (res.code == 0) { | |||||
this.$message.success(res.data); | |||||
this.gettableList(); | this.gettableList(); | ||||
} else { | } else { | ||||
this.$message.error(data.data.resMsg); | |||||
this.$message.error(res.msg); | |||||
} | } | ||||
}) | }) | ||||
.catch((e) => { | .catch((e) => { | ||||
@@ -650,16 +654,18 @@ export default { | |||||
// 拿问题获取所在的标签数据 | // 拿问题获取所在的标签数据 | ||||
findKeywordsById(level1Id) { | findKeywordsById(level1Id) { | ||||
this.wajueList = []; | this.wajueList = []; | ||||
this.$api.api | |||||
.keymodelfindById({ | |||||
axios({ | |||||
url: `/autoSR/zk/keywords/findKeywordsById`, | |||||
method: 'get', | |||||
params: { | |||||
houseId: this.currentHouseId, | houseId: this.currentHouseId, | ||||
keywordsId: level1Id, | keywordsId: level1Id, | ||||
level: 1, | |||||
}) | |||||
.then((res) => { | |||||
if (res.data.res == 1) { | |||||
console.log(res.data); | |||||
this.wajueList = res.data.obj; | |||||
level: 1 | |||||
} | |||||
}).then((res) => { | |||||
if (res.code == 0) { | |||||
console.log(res); | |||||
this.wajueList = res.data; | |||||
if (this.wajueList && this.wajueList.length) { | if (this.wajueList && this.wajueList.length) { | ||||
this.wajueList.forEach((item) => { | this.wajueList.forEach((item) => { | ||||
item.disabled = false; | item.disabled = false; | ||||
@@ -707,25 +713,27 @@ export default { | |||||
this.searchFun(); | this.searchFun(); | ||||
}, | }, | ||||
gettableList() { | gettableList() { | ||||
this.$api.api | |||||
.todolist({ | |||||
pageNum: this.pageNum, | |||||
pageSize: this.pageSize, | |||||
houseName: this.searchForm.houseName, | |||||
updateUserName: this.searchForm.updateUserName, | |||||
name: this.searchForm.name, | |||||
status: this.type, //status 状态 0已处理 1未处理 | |||||
startTime: this.searchForm.startTime, | |||||
endTime: this.searchForm.endTime, | |||||
}) | |||||
.then((res) => { | |||||
console.log(data); | |||||
if (data.data.res == 1) { | |||||
this.tableData = data.data.obj.results || []; | |||||
this.total = data.data.obj.totalRecord; | |||||
} else { | |||||
this.tableData = []; | |||||
} | |||||
axios({ | |||||
url: `/autoSR/zk/todo/list`, | |||||
method: "get", | |||||
params: { | |||||
pageNum: this.pageNum, | |||||
pageSize: this.pageSize, | |||||
houseName: this.searchForm.houseName, | |||||
updateUserName: this.searchForm.updateUserName, | |||||
name: this.searchForm.name, | |||||
status: this.type, //status 状态 0已处理 1未处理 | |||||
startTime: this.searchForm.startTime, | |||||
endTime: this.searchForm.endTime, | |||||
}, | |||||
}).then((res) => { | |||||
// console.log(res) | |||||
if(res.code==0){ | |||||
this.tableData = res.data.results || []; | |||||
this.total = res.data.totalRecord; | |||||
} else { | |||||
this.tableData = []; | |||||
} | |||||
}); | }); | ||||
}, | }, | ||||
handleSizeChange(val) { | handleSizeChange(val) { | ||||
@@ -254,7 +254,7 @@ | |||||
class="item-input" | class="item-input" | ||||
v-html="item.editValue" | v-html="item.editValue" | ||||
:id="'huashuModel'+index"></div> | :id="'huashuModel'+index"></div> | ||||
<el-button size="small" plain type="primary" @click="delItemFun(index)">删除</el-button> | |||||
<el-button size="small" type="primary" @click="delItemFun(index)">删除</el-button> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div> | <div> | ||||
@@ -262,7 +262,7 @@ | |||||
</div> | </div> | ||||
<el-form-item label="插入节点:"> | <el-form-item label="插入节点:"> | ||||
<el-button size="mini" type="primary" plain style="margin-left:8px;" v-for="(item,index) in taglist" :key="index" @click="insertTag(item,index)">{{item.label}}</el-button> | |||||
<el-button size="mini" type="primary" style="margin-left:8px;" v-for="(item,index) in taglist" :key="index" @click="insertTag(item,index)">{{item.label}}</el-button> | |||||
</el-form-item> | </el-form-item> | ||||
</el-form> | </el-form> | ||||
<span slot="footer" class="dialog-footer"> | <span slot="footer" class="dialog-footer"> | ||||
@@ -273,7 +273,12 @@ | |||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import { mapGetters } from "vuex"; | |||||
import draggable from 'vuedraggable' | |||||
export default { | export default { | ||||
components: { | |||||
draggable, | |||||
}, | |||||
data() { | data() { | ||||
return { | return { | ||||
moxingVisible: false, | moxingVisible: false, | ||||
@@ -338,18 +343,19 @@ export default { | |||||
defaultCheck: [], // 选中的id | defaultCheck: [], // 选中的id | ||||
deleteId: null, // 要删除的表单节点的ID | deleteId: null, // 要删除的表单节点的ID | ||||
menuid:'', | menuid:'', | ||||
pipeiShow: false | |||||
} | } | ||||
}, | |||||
}, | |||||
created() { | created() { | ||||
this.allTreeListId = [] // 存储的当前树图所有的接单的ID集合,如:[1,3,4,6,7] | this.allTreeListId = [] // 存储的当前树图所有的接单的ID集合,如:[1,3,4,6,7] | ||||
this.pipeiShow = this.permissions.pipeiShow; | |||||
}, | }, | ||||
mounted() { | mounted() { | ||||
this.houseId=localStorage.getItem("houseId"); | this.houseId=localStorage.getItem("houseId"); | ||||
//获取项目 | //获取项目 | ||||
// this.getHouse() | |||||
this.getHouse() | |||||
}, | }, | ||||
computed: { | computed: { | ||||
...mapGetters(["permissions"]), | |||||
dragOptions() { | dragOptions() { | ||||
return { | return { | ||||
animation: 200, | animation: 200, | ||||
@@ -362,6 +368,7 @@ export default { | |||||
methods: { | methods: { | ||||
// 模型匹配 | // 模型匹配 | ||||
pipei(node,data){ | pipei(node,data){ | ||||
console.log(data) | |||||
this.form.keywordsName = data.question | this.form.keywordsName = data.question | ||||
this.form.keywordsId= data.keywordsId | this.form.keywordsId= data.keywordsId | ||||
@@ -369,16 +376,20 @@ export default { | |||||
this.level1 = data.level1 | this.level1 = data.level1 | ||||
this.findKeywordsById(data.level1) | this.findKeywordsById(data.level1) | ||||
// 获取模型数据回显 | // 获取模型数据回显 | ||||
this.$api.api.findKeywordsById({ | |||||
houseId: this.houseId, | |||||
level: this.level1, | |||||
keyType: 0, | |||||
questionId: this.questionId, | |||||
keywordsId: data.keywordsId | |||||
}).then((res) => { | |||||
axios({ | |||||
url: `/autoSR/zk/keymodel/findById`, | |||||
method: "get", | |||||
params: { | |||||
houseId: this.houseId, | |||||
level: this.level1, | |||||
keyType: 0, | |||||
questionId: this.questionId, | |||||
keywordsId: data.keywordsId | |||||
}, | |||||
}).then((res) => { | |||||
this.moxingVisible = true | this.moxingVisible = true | ||||
if (res.data.res == 1) { | |||||
let obj = res.data.obj | |||||
if (res.code===0) { | |||||
let obj = res.data | |||||
if(obj!=null){ | if(obj!=null){ | ||||
this.form.distance = obj.distance||10 | this.form.distance = obj.distance||10 | ||||
this.form.originalExpression = obj.originalExpression | this.form.originalExpression = obj.originalExpression | ||||
@@ -600,7 +611,6 @@ export default { | |||||
}, | }, | ||||
//格式化粘贴文本方法 | //格式化粘贴文本方法 | ||||
onPaste(event) { | onPaste(event) { | ||||
var e = event || window.event | var e = event || window.event | ||||
// 阻止默认粘贴 | // 阻止默认粘贴 | ||||
e.preventDefault(); | e.preventDefault(); | ||||
@@ -652,15 +662,19 @@ export default { | |||||
// 拿问题获取所在的标签数据 | // 拿问题获取所在的标签数据 | ||||
findKeywordsById(level){ | findKeywordsById(level){ | ||||
this.wajueList = [] | this.wajueList = [] | ||||
this.$api.api.findKeywordsById({ | |||||
houseId: this.houseId, | |||||
keyType:0,//挖掘 | |||||
keywordsId: this.form.keywordsId, | |||||
level: level | |||||
axios({ | |||||
url: `/autoSR/zk/keywords/findKeywordsById`, | |||||
method: 'get', | |||||
params: { | |||||
houseId: this.houseId, | |||||
keyType:0, //挖掘 | |||||
keywordsId: this.form.keywordsId, | |||||
level: level | |||||
} | |||||
}).then((res) => { | }).then((res) => { | ||||
if (res.data.res == 1){ | |||||
if (res.code == 0){ | |||||
console.log(res.data) | console.log(res.data) | ||||
this.wajueList = res.data.obj | |||||
this.wajueList = res.data | |||||
if(this.wajueList&&this.wajueList.length){ | if(this.wajueList&&this.wajueList.length){ | ||||
this.wajueList.forEach(item=>{ | this.wajueList.forEach(item=>{ | ||||
item.disabled = false | item.disabled = false | ||||
@@ -726,17 +740,21 @@ export default { | |||||
} | } | ||||
if(!this.flag){ | if(!this.flag){ | ||||
this.flag = true | this.flag = true | ||||
this.$api.api.addQuestion({ | |||||
houseId: this.houseId, | |||||
level: this.level, | |||||
keywordsId: this.frosasd.id, | |||||
question: this.dynamicTags.join(';') | |||||
axios({ | |||||
url: `/autoSR/zk/keywords/addQuestion`, | |||||
method: 'post', | |||||
data: { | |||||
houseId: this.houseId, | |||||
level: this.level, | |||||
keywordsId: this.frosasd.id, | |||||
question: this.dynamicTags.join(';') | |||||
} | |||||
}).then((res) => { | }).then((res) => { | ||||
this.flag = false | this.flag = false | ||||
if (res.data.res === 1) { | |||||
if (res.code === 0) { | |||||
// console.log(res.data) | // console.log(res.data) | ||||
this.$message({ | this.$message({ | ||||
message: res.data.obj, | |||||
message: res.data, | |||||
type: 'success' | type: 'success' | ||||
}); | }); | ||||
this.dynamicTags = [] | this.dynamicTags = [] | ||||
@@ -744,7 +762,7 @@ export default { | |||||
this.getTreeData() | this.getTreeData() | ||||
}else{ | }else{ | ||||
this.$message({ | this.$message({ | ||||
message: res.data.resMsg||'添加失败', | |||||
message: res.msg||'添加失败', | |||||
type: 'error' | type: 'error' | ||||
}); | }); | ||||
} | } | ||||
@@ -753,13 +771,16 @@ export default { | |||||
}, | }, | ||||
// 设置需求话术等级 | // 设置需求话术等级 | ||||
saveSet() { | saveSet() { | ||||
this.$api.api.setWordLevel({ | |||||
houseI: this.houseId, | |||||
level: this.frosasd.setVal, | |||||
keywordId: this.frosasd.id | |||||
axios({ | |||||
url: `/autoSR/zk/keywords/setWordLevel`, | |||||
method: "get", | |||||
params: { | |||||
houseI: this.houseId, | |||||
level: this.frosasd.setVal, | |||||
keywordId: this.frosasd.id | |||||
}, | |||||
}).then((res) => { | }).then((res) => { | ||||
if (res.data.res === 1) { | |||||
if (res.code===0) { | |||||
// console.log(res.data) | // console.log(res.data) | ||||
this.$message({ | this.$message({ | ||||
message: '设置成功', | message: '设置成功', | ||||
@@ -770,27 +791,31 @@ export default { | |||||
this.getTreeData() | this.getTreeData() | ||||
} else { | } else { | ||||
this.$message({ | this.$message({ | ||||
message: res.data.resMsg, | |||||
message: res.msg, | |||||
type: 'error' | type: 'error' | ||||
}); | }); | ||||
} | } | ||||
}); | |||||
}) | |||||
}, | }, | ||||
// 删除问题 | // 删除问题 | ||||
remove(node, data) { | remove(node, data) { | ||||
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({ | |||||
message: res.data.obj, | |||||
type: 'success' | |||||
}); | |||||
this.getTreeData() | |||||
} | |||||
}); | |||||
axios({ | |||||
url: `/autoSR/zk/keywords/delQuestion`, | |||||
method: 'get', | |||||
params: { | |||||
houseId: this.houseId, | |||||
id: (data.id).substring(1) | |||||
} | |||||
}).then(res => { | |||||
if (res.code === 0) { | |||||
console.log(res.data) | |||||
this.$message({ | |||||
message: res.data, | |||||
type: 'success' | |||||
}); | |||||
this.getTreeData() | |||||
} | |||||
}); | |||||
}, | }, | ||||
// 项目选择 | // 项目选择 | ||||
selectChange(e) { | selectChange(e) { | ||||
@@ -818,16 +843,20 @@ export default { | |||||
// 树图,设置初始选中值及分数回显 | // 树图,设置初始选中值及分数回显 | ||||
setInitCheck() { | setInitCheck() { | ||||
this.defaultCheck = [] | this.defaultCheck = [] | ||||
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 | |||||
axios({ | |||||
url: `/autoSR/zk/keywords/findSelectedWordMiningTemplate`, | |||||
method: "get", | |||||
params: { | |||||
houseId: this.houseId, | |||||
selected:0,//selected 0选中 1未选中 | |||||
}, | |||||
}).then((res) => { | |||||
console.log(res) | |||||
if(res.code==0){ | |||||
let data = res.data.list | |||||
data = JSON.stringify(data).replace(/name/g, 'label') | data = JSON.stringify(data).replace(/name/g, 'label') | ||||
data = JSON.parse(data) | data = JSON.parse(data) | ||||
if (res.data.obj.length == 0) { | |||||
if (res.data.list.length == 0) { | |||||
this.newlist = []; | this.newlist = []; | ||||
return; | return; | ||||
} | } | ||||
@@ -880,19 +909,15 @@ export default { | |||||
}, | }, | ||||
// 获取层级树 | // 获取层级树 | ||||
getTreeData() { | getTreeData() { | ||||
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){ | |||||
let permitList = res.data.obj.permitBtn.map(item=>item.name=='标签匹配模型') | |||||
this.pipeiShow = permitList.length?true:false | |||||
}else{ | |||||
this.pipeiShow = false | |||||
} | |||||
axios({ | |||||
url: `/autoSR/zk/keywords/findSelectedWordMiningTemplate`, | |||||
method: "get", | |||||
params: { | |||||
houseId: this.houseId, | |||||
selected:1,//selected 0选中 1未选中 | |||||
}}).then((res) => { | |||||
if (res.code === 0) { | |||||
let data = res.data.list | |||||
data = JSON.stringify(data).replace(/name/g, 'label') | data = JSON.stringify(data).replace(/name/g, 'label') | ||||
data = JSON.parse(data) | data = JSON.parse(data) | ||||
data.forEach(item => { | data.forEach(item => { | ||||
@@ -992,7 +1017,7 @@ export default { | |||||
houseId: this.houseId, | houseId: this.houseId, | ||||
question: this.frosasd.name | question: this.frosasd.name | ||||
}).then((res) => { | }).then((res) => { | ||||
if (res.data.res == 1) { | |||||
if (res.code == 0) { | |||||
this.$message({ | this.$message({ | ||||
message: '修改成功', | message: '修改成功', | ||||
type: 'success' | type: 'success' | ||||
@@ -1024,7 +1049,6 @@ export default { | |||||
if (item.children.length == 0) { | if (item.children.length == 0) { | ||||
return | return | ||||
} else { | } else { | ||||
item.children.forEach((ite, inde) => { | item.children.forEach((ite, inde) => { | ||||
if (before.data.pid == ite.pid) { | if (before.data.pid == ite.pid) { | ||||
arr.push(ite) | arr.push(ite) | ||||
@@ -1032,7 +1056,6 @@ export default { | |||||
if (ite.children.length == 0) { | if (ite.children.length == 0) { | ||||
return | return | ||||
} else { | } else { | ||||
ite.children.forEach((it, ins) => { | ite.children.forEach((it, ins) => { | ||||
if (before.data.pid == it.pid) { | if (before.data.pid == it.pid) { | ||||
arr.push(it) | arr.push(it) | ||||
@@ -1400,14 +1423,14 @@ export default { | |||||
// 评分保存 | // 评分保存 | ||||
saveRate(params) { | saveRate(params) { | ||||
this.$api.api.saveWordTemplate(params).then((res) => { | this.$api.api.saveWordTemplate(params).then((res) => { | ||||
if (res.data.res === 1) { | |||||
if (res.code === 0) { | |||||
this.$message({ | this.$message({ | ||||
message: '保存成功', | message: '保存成功', | ||||
type: 'success' | type: 'success' | ||||
}); | }); | ||||
} else { | } else { | ||||
this.$message({ | this.$message({ | ||||
message: res.data.resMsg, | |||||
message: res.msg, | |||||
type: 'warning' | type: 'warning' | ||||
}); | }); | ||||
} | } | ||||
@@ -1509,6 +1532,7 @@ export default { | |||||
} | } | ||||
.rate-box{ | .rate-box{ | ||||
width: 60%; | width: 60%; | ||||
padding-left: 20px; | |||||
} | } | ||||
.tip{ | .tip{ | ||||
margin-left: 30px; | margin-left: 30px; | ||||
@@ -73,7 +73,7 @@ | |||||
<el-dialog | <el-dialog | ||||
:title="editFlag ? '编辑' : '新增'" | :title="editFlag ? '编辑' : '新增'" | ||||
:center="true" | :center="true" | ||||
width="400px" | |||||
width="600px" | |||||
:visible.sync="dialogVisible" | :visible.sync="dialogVisible" | ||||
@close="$refs.ruleForm.resetFields()" | @close="$refs.ruleForm.resetFields()" | ||||
> | > | ||||
@@ -102,6 +102,7 @@ | |||||
show-word-limit | show-word-limit | ||||
clearable | clearable | ||||
></el-input> | ></el-input> | ||||
<div>增加场景描述有利于标签命中,场景越丰富触达越精准;例如:送家具 ,场景:现在买房我们送家具;</div> | |||||
</el-form-item> | </el-form-item> | ||||
</el-form> | </el-form> | ||||
<div | <div | ||||
@@ -111,13 +112,9 @@ | |||||
border-top: 1px solid #eee; | border-top: 1px solid #eee; | ||||
padding-top: 20px; | padding-top: 20px; | ||||
display: flex; | display: flex; | ||||
justify-content: end; | |||||
" | |||||
> | |||||
justify-content: end;"> | |||||
<el-button @click="dialogVisible = false">取 消</el-button> | <el-button @click="dialogVisible = false">取 消</el-button> | ||||
<el-button type="primary" :loading="loadingFlag" @click="editor()" | |||||
>保存</el-button | |||||
> | |||||
<el-button type="primary" :loading="loadingFlag" @click="editor()">保存</el-button > | |||||
</div> | </div> | ||||
</el-dialog> | </el-dialog> | ||||
<el-dialog | <el-dialog | ||||
@@ -286,6 +283,7 @@ export default { | |||||
}, | }, | ||||
created() { | created() { | ||||
this.houseId=localStorage.getItem("houseId"); | |||||
// 获取显隐的列表 | // 获取显隐的列表 | ||||
this.setTableOption(); | this.setTableOption(); | ||||
this.tem_tab_add = this.permissions["tem_tab_add"]; | this.tem_tab_add = this.permissions["tem_tab_add"]; | ||||
@@ -299,11 +297,11 @@ export default { | |||||
methods: { | methods: { | ||||
// 插入节点 | // 插入节点 | ||||
insertTag(item,index){ | insertTag(item,index){ | ||||
if(window._range){ | |||||
this.insertContent("<span contentEditable='false' style='color:red'>"+item.value+"</span><text> </text>"); | |||||
}else{ | |||||
this.insertHtmlAtCaret("<span contentEditable='false' style='color:red'>"+item.value+"</span><text> </text>"); | |||||
} | |||||
if(window._range){ | |||||
this.insertContent("<span contentEditable='false' style='color:red'>"+item.value+"</span><text> </text>"); | |||||
}else{ | |||||
this.insertHtmlAtCaret("<span contentEditable='false' style='color:red'>"+item.value+"</span><text> </text>"); | |||||
} | |||||
}, | }, | ||||
// 处理标签,删除不需要的标签格式 | // 处理标签,删除不需要的标签格式 | ||||
delMark(str) { | delMark(str) { | ||||
@@ -332,7 +330,7 @@ export default { | |||||
this.form.id = '' | this.form.id = '' | ||||
// 获取模型数据回显 | // 获取模型数据回显 | ||||
axios({ | axios({ | ||||
url: `${jypath}/zk/keymodel/findById`, | |||||
url: `/autoSR/zk/keymodel/findById`, | |||||
method: 'get', | method: 'get', | ||||
params: { | params: { | ||||
houseId: this.houseId, | houseId: this.houseId, | ||||
@@ -341,9 +339,8 @@ export default { | |||||
} | } | ||||
}).then(res => { | }).then(res => { | ||||
this.modelVisible = true | this.modelVisible = true | ||||
if (res.data.res == 1) { | |||||
let obj = res.data.obj | |||||
console.log(obj) | |||||
if (res.code == 0) { | |||||
let obj = res.data | |||||
if(obj!=null){ | if(obj!=null){ | ||||
this.form.distance = obj.distance||10 | this.form.distance = obj.distance||10 | ||||
this.form.originalExpression = obj.originalExpression | this.form.originalExpression = obj.originalExpression | ||||
@@ -396,7 +393,7 @@ export default { | |||||
if(text.innerText=='') {this.$message.error('请输入标签模型'); return;} | if(text.innerText=='') {this.$message.error('请输入标签模型'); return;} | ||||
axios({ | axios({ | ||||
url: `${jypath}/zk/keymodel/updateKeywordsModel`, | |||||
url: `/autoSR/zk/keymodel/updateKeywordsModel`, | |||||
method: 'post', | method: 'post', | ||||
data: { | data: { | ||||
id: this.form.id||"", | id: this.form.id||"", | ||||
@@ -412,13 +409,13 @@ export default { | |||||
distance: this.form.distance, // * 距离 | distance: this.form.distance, // * 距离 | ||||
desc: this.form.sceneDesc//场景描述 | desc: this.form.sceneDesc//场景描述 | ||||
} | } | ||||
}).then(data => { | |||||
}).then(res => { | |||||
this.dialogVmodelVisibleisible = false | this.dialogVmodelVisibleisible = false | ||||
if(data.data.res==1){ | |||||
this.$message.success(data.data.obj) | |||||
if(res.code==0){ | |||||
this.$message.success(res.data) | |||||
this.getorgCode() | this.getorgCode() | ||||
}else{ | }else{ | ||||
this.$message.error(data.data.resMsg) | |||||
this.$message.error(res.msg) | |||||
} | } | ||||
}).catch((e)=>{ | }).catch((e)=>{ | ||||
this.modelVisible = false | this.modelVisible = false | ||||
@@ -705,7 +702,7 @@ export default { | |||||
type: "warning", | type: "warning", | ||||
}) | }) | ||||
.then(() => { | .then(() => { | ||||
this.$api.http.taboodelete({ id: item.id }).then((res) => { | |||||
this.$api.http.taboodelete({ id: item.id,houseId:this.houseId }).then((res) => { | |||||
if (res.code == 0) { | if (res.code == 0) { | ||||
this.$message({ | this.$message({ | ||||
type: "success", | type: "success", | ||||
@@ -715,7 +712,7 @@ export default { | |||||
this.words = ""; | this.words = ""; | ||||
this.taboofindbypagelist(); | this.taboofindbypagelist(); | ||||
} else { | } else { | ||||
this.$message.error(res.message); | |||||
this.$message.error(res.msg); | |||||
} | } | ||||
}); | }); | ||||
}) | }) | ||||
@@ -761,18 +758,17 @@ export default { | |||||
this.page.currentPage = 1; | this.page.currentPage = 1; | ||||
this.words = ""; | this.words = ""; | ||||
this.taboofindbypagelist(); | this.taboofindbypagelist(); | ||||
this.$message.success(res.data); | |||||
} else { | } else { | ||||
this.$message.error(res.message); | |||||
this.$message.error(res.msg); | |||||
} | } | ||||
setTimeout(() => { | setTimeout(() => { | ||||
this.loadingFlag = false; | this.loadingFlag = false; | ||||
console.log("防重"); | |||||
}, 1); | }, 1); | ||||
}) | }) | ||||
.catch((e) => { | .catch((e) => { | ||||
setTimeout(() => { | setTimeout(() => { | ||||
this.loadingFlag = false; | this.loadingFlag = false; | ||||
console.log("防重"); | |||||
}, 1); | }, 1); | ||||
}); | }); | ||||
} else { | } else { | ||||
@@ -788,18 +784,17 @@ export default { | |||||
this.page.currentPage = 1; | this.page.currentPage = 1; | ||||
this.words = ""; | this.words = ""; | ||||
this.taboofindbypagelist(); | this.taboofindbypagelist(); | ||||
this.$message.success(res.data); | |||||
} else { | } else { | ||||
this.$message.error(res.message); | |||||
this.$message.error(res.msg); | |||||
} | } | ||||
setTimeout(() => { | setTimeout(() => { | ||||
this.loadingFlag = false; | this.loadingFlag = false; | ||||
console.log("防重"); | |||||
}, 1); | }, 1); | ||||
}) | }) | ||||
.catch((e) => { | .catch((e) => { | ||||
setTimeout(() => { | setTimeout(() => { | ||||
this.loadingFlag = false; | this.loadingFlag = false; | ||||
console.log("防重"); | |||||
}, 1); | }, 1); | ||||
}); | }); | ||||
} | } | ||||
@@ -441,66 +441,14 @@ | |||||
:disabled="passFlag" | :disabled="passFlag" | ||||
></el-input> | ></el-input> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item | |||||
label="转写方式" | |||||
prop="transferMethod" | |||||
> | |||||
<el-select | |||||
style="width: 300px" | |||||
v-model="ruleForm.transferMethod" | |||||
filterable | |||||
placeholder="转写方式" | |||||
> | |||||
<el-option | |||||
v-for="item in orgList" | |||||
:key="item.id" | |||||
:label="item.name" | |||||
:value="item.orgCode" | |||||
> | |||||
</el-option> | |||||
<el-form-item label="转写方式" prop="transliterationMethod"> | |||||
<el-select style="width:120px" v-model="ruleForm.transliterationMethod" placeholder="请选择项目" @change="changeFun"> | |||||
<el-option v-for="(item,index) in projectlist" :label="item.name" :key="index" :value="item.code"></el-option> | |||||
</el-select> | </el-select> | ||||
<el-select | |||||
style="width: 300px" | |||||
v-model="ruleForm.transferLanguage" | |||||
filterable | |||||
placeholder="语言" | |||||
> | |||||
<el-option | |||||
v-for="item in orgList" | |||||
:key="item.id" | |||||
:label="item.name" | |||||
:value="item.orgCode" | |||||
> | |||||
</el-option> | |||||
<el-select style="width:120px" v-model="ruleForm.language" placeholder="请选择语种"> | |||||
<el-option v-for="(item,index) in languageList" :label="item.name" :key="index" :value="item.code"></el-option> | |||||
</el-select> | </el-select> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item | |||||
label="无效接待审核" | |||||
prop="auditReception" | |||||
> | |||||
<el-radio-group v-model="ruleForm.auditReception"> | |||||
<el-radio :label="0">审核</el-radio> | |||||
<el-radio :label="1">不审核</el-radio> | |||||
</el-radio-group> | |||||
</el-form-item> | |||||
<el-form-item | |||||
label="挖掘话术匹配" | |||||
prop="keywordsModelQuestionMatch" | |||||
> | |||||
<el-radio-group v-model="ruleForm.keywordsModelQuestionMatch"> | |||||
<el-radio :label="0">全部话术</el-radio> | |||||
<el-radio :label="1">顾问话术</el-radio> | |||||
</el-radio-group> | |||||
</el-form-item> | |||||
<el-form-item | |||||
label="挖掘回答匹配" | |||||
prop="keywordsModelAnswerMatch" | |||||
> | |||||
<el-radio-group v-model="ruleForm.keywordsModelAnswerMatch"> | |||||
<el-radio :label="0">下一句话</el-radio> | |||||
<el-radio :label="1">最近客户话术</el-radio> | |||||
</el-radio-group> | |||||
</el-form-item> | |||||
</el-form> | </el-form> | ||||
</div> | </div> | ||||
<div | <div | ||||
@@ -934,11 +882,8 @@ export default { | |||||
offLine: ["08:00", "20:00"], // 离线推送时间段 | offLine: ["08:00", "20:00"], // 离线推送时间段 | ||||
caseShow: '0', // 优秀案例 | caseShow: '0', // 优秀案例 | ||||
tagMatching: '0', // 客户标签匹配 | tagMatching: '0', // 客户标签匹配 | ||||
transferLanguage:'', | |||||
transferMethod: '', | |||||
auditReception:'', | |||||
keywordsModelAnswerMatch:'', | |||||
keywordsModelQuestionMatch:'' | |||||
transliterationMethod: '',//转写方式 | |||||
language:'',//语言 | |||||
}, | }, | ||||
ruleForm1: {}, | ruleForm1: {}, | ||||
optionsagentId: [], | optionsagentId: [], | ||||
@@ -947,6 +892,9 @@ export default { | |||||
propertyName: [ | propertyName: [ | ||||
{ required: true, message: "请填写项目名称", trigger: "change" }, | { required: true, message: "请填写项目名称", trigger: "change" }, | ||||
], | ], | ||||
transliterationMethod: [ | |||||
{ required: true, message: "请选择转写方式", trigger: "change" }, | |||||
], | |||||
managerPassword: [ | managerPassword: [ | ||||
{ required: true, message: "请填写密码", trigger: "blur" }, | { required: true, message: "请填写密码", trigger: "blur" }, | ||||
{ | { | ||||
@@ -992,6 +940,8 @@ export default { | |||||
agentForm: { | agentForm: { | ||||
agentId: "", | agentId: "", | ||||
}, | }, | ||||
projectlist:[],//转写方式 | |||||
languageList:[]//语言 | |||||
}; | }; | ||||
}, | }, | ||||
computed: { | computed: { | ||||
@@ -1014,10 +964,11 @@ export default { | |||||
this.cus_build_index_change = this.permissions["cus_build_index_change"]; | this.cus_build_index_change = this.permissions["cus_build_index_change"]; | ||||
this.cus_build_index_sys = this.permissions["cus_build_index_sys"]; | this.cus_build_index_sys = this.permissions["cus_build_index_sys"]; | ||||
this.cus_build_index_agent = this.permissions["cus_build_index_agent"]; | this.cus_build_index_agent = this.permissions["cus_build_index_agent"]; | ||||
this.cus_build_index_bindAgent = | |||||
this.permissions["cus_build_index_bindAgent"]; | |||||
this.cus_build_index_bindAgent = this.permissions["cus_build_index_bindAgent"]; | |||||
this.cus_build_index_del = this.permissions["cus_build_index_del"]; | this.cus_build_index_del = this.permissions["cus_build_index_del"]; | ||||
this.cus_build_index_open = this.permissions["cus_build_index_open"]; | this.cus_build_index_open = this.permissions["cus_build_index_open"]; | ||||
// 获取转写方式数据 | |||||
this.findTransferMethod() | |||||
}, | }, | ||||
mounted() { | mounted() { | ||||
if (this.$route.query.serviceStatus) { | if (this.$route.query.serviceStatus) { | ||||
@@ -1056,8 +1007,33 @@ export default { | |||||
this.zkhousePage(); | this.zkhousePage(); | ||||
// 获取项目列表 | // 获取项目列表 | ||||
this.zkhousePages(); | this.zkhousePages(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
changeFun(value){ | |||||
// console.log(value) | |||||
this.ruleForm.language = '' | |||||
this.projectlist.forEach(item=>{ | |||||
if(item.code==value){ | |||||
this.languageList = item.list | |||||
} | |||||
}) | |||||
}, | |||||
// 转写方式 | |||||
findTransferMethod(){ | |||||
axios({ | |||||
url: `autoSR/zkhouse/findTransferMethod`, | |||||
method: "get", | |||||
data: { | |||||
}, | |||||
}).then((res) => { | |||||
// console.log(res) | |||||
if(res.code==0){ | |||||
this.projectlist = res.data||[] | |||||
this.languageList = res.data&&res.data[0].list||[] | |||||
} | |||||
}); | |||||
}, | |||||
// 获取当前页面的显隐 | // 获取当前页面的显隐 | ||||
setTableOption() { | setTableOption() { | ||||
this.$db.getDataByKey(this.tableIdName).then((res) => { | this.$db.getDataByKey(this.tableIdName).then((res) => { | ||||
@@ -1299,7 +1275,7 @@ export default { | |||||
this.$api.api | this.$api.api | ||||
.editZkhouse(this.ruleForm) | .editZkhouse(this.ruleForm) | ||||
.then((res) => { | .then((res) => { | ||||
console.log(res); | |||||
// console.log(res); | |||||
if (res.code == 0) { | if (res.code == 0) { | ||||
this.dialogVisible = false; | this.dialogVisible = false; | ||||
setTimeout(() => { | setTimeout(() => { | ||||