Parcourir la source

编辑模型

newStyle
corala il y a 1 an
Parent
révision
ad3bf96ed7
7 fichiers modifiés avec 314 ajouts et 292 suppressions
  1. +9
    -23
      src/api/modules/api.js
  2. +57
    -24
      src/views/Customer/label.vue
  3. +17
    -17
      src/views/Template/labelModel.vue
  4. +65
    -57
      src/views/Template/modelTodo.vue
  5. +101
    -77
      src/views/Template/requiremining.vue
  6. +24
    -29
      src/views/Template/taboo.vue
  7. +41
    -65
      src/views/building/index.vue

+ 9
- 23
src/api/modules/api.js Voir le fichier

@@ -1319,18 +1319,11 @@ 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`,
url: `/autoSRzk//keywords/updateQuestion`,
method: 'GET',
data: data
})
@@ -1346,7 +1339,7 @@ export function updateSort(data) {
//需求挖掘话术配置- 评分保存
export function saveWordTemplate(data) {
return request({
url: `/autoSR/keywords/saveWordTemplate`,
url: `/autoSR/zk/keywords/saveWordTemplate`,
method: 'POST',
data: data
})
@@ -1354,7 +1347,7 @@ export function saveWordTemplate(data) {
//需求挖掘话术配置-获取模型数据回显
export function keymodelfindById(data) {
return request({
url: `/autoSR/keymodel/findById`,
url: `/autoSR/zk/keymodel/findById`,
method: 'GET',
data: data
})
@@ -1362,7 +1355,7 @@ export function keymodelfindById(data) {
//需求挖掘话术配置-设置话术等级
export function setWordLevel(data) {
return request({
url: `/autoSR/keywords/setWordLevel`,
url: `/autoSR/zk/keywords/setWordLevel`,
method: 'GET',
data: data
})
@@ -1370,23 +1363,16 @@ export function setWordLevel(data) {
//需求挖掘话术配置-添加问题保存
export function addQuestion(data) {
return request({
url: `/autoSR/keywords/addQuestion`,
url: `/autoSR/zk/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`,
url: `/autoSR/zk/keymodel/updateKeywordsModel`,
method: 'POST',
data: data
})
@@ -1394,7 +1380,7 @@ export function updateKeywordsModel(data) {
//需求挖掘话术配置-拿问题获取所在的标签数据
export function findKeywordsById(data) {
return request({
url: `/autoSR/keywords/findKeywordsById`,
url: `/autoSR/zk/keywords/findKeywordsById`,
method: 'GET',
data: data
})


+ 57
- 24
src/views/Customer/label.vue Voir le fichier

@@ -63,7 +63,6 @@
</span>
<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="() => moxingEdit(node, data)">编辑模型</el-button>
</span>
</span>

@@ -74,19 +73,19 @@
</span>
<span style="margin-left: 10px">
<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 style="margin-left: 10px">
<el-button class="remove" type="text" size="mini" @click="remove(node, data)" >删除</el-button>
</span>
</span>

<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">
<el-button class="editorcd" type="text" size="mini" @click="ddeditor(node, data)" >编辑</el-button>
</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">
<el-button class="remove" type="text" size="mini" @click="remove(node, data)" >删除</el-button>
</span>
@@ -95,8 +94,7 @@
</el-tree>
</div>


<el-dialog title="新增" :visible.sync="dialogFormVisible" :center="true" width="400px">
<el-dialog title="新增" :visible.sync="dialogFormVisible" :center="true" width="600px">
<div
v-if="amountintervalname == '意向面积'"
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-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-row>
</el-form>
@@ -169,7 +179,7 @@
</el-dialog>

<!--?编辑弹框?-->
<el-dialog title="编辑" :visible.sync="isshowage" :center="true" width="400px">
<el-dialog title="编辑" :visible.sync="isshowage" :center="true" width="600px">
<div
v-if="amountintervalname == '意向面积'"
style="display: flex; height: 40px; line-height: 40px"
@@ -200,19 +210,33 @@
></span>
<span style="margin-left: 6px">万元</span>
</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 style="width:88%">
<el-input maxlength="8"
v-model="frosasd.name"
placeholder="类名"
type="text"
></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 style="display: flex; justify-content: center; margin-top: 40px">
<button
style="
@@ -408,6 +432,7 @@ export default {
addForm: {
name: "",
endName: "",
sceneDesc: ''
},
addForm2:{
name:'',
@@ -425,6 +450,7 @@ export default {
orgCode: "",
sort: "",
level: "",
desc: ''
},
amountintervalname: "",
isInterval: "",
@@ -436,6 +462,7 @@ export default {
},
created() {
this.yyc_add_level1 = this.permissions["yyc_add_level1"];
this.labelmodelshow = this.permissions["labelmodelshow"]; // 编辑模型按钮权限
},
mounted() {
// 获取项目列表
@@ -577,7 +604,7 @@ export default {
if(text.innerText=='') {this.$message.error('请输入标签模型'); return;}

axios({
url: `${jypath}/zk/keymodel/updateKeywordsModel`,
url: `/autoSR/zk/keymodel/updateKeywordsModel`,
method: 'post',
data: {
id: this.form.id,
@@ -606,25 +633,26 @@ export default {

},
moxingEdit(node, data){
// console.log(data)
console.log(data)
this.level = data.level
this.form.keywordsName = data.endName?data.name+'~'+data.endName:data.name
this.form.keywordsId = data.keywordsId
this.form.sceneDesc = data.desc ||''
// 获取模型数据回显
axios({
url: `${jypath}/zk/keymodel/findById`,
url: `/autoSR/zk/keymodel/findById`,
method: 'get',
params: {
houseId: this.houseId,
level: this.level,
keyType: 2,
keywordsId: data.keywordsId
keywordsId: data.id
}
}).then(res => {
console.log(res)
this.moxingVisible = true
if (res.data.res == 1) {
let obj = res.data.obj
if (res.code == 0) {
let obj = res.data
if(obj!=null){
this.form.distance=obj.distance||10
this.form.originalExpression= obj.originalExpression
@@ -675,6 +703,7 @@ export default {
mustSelected: this.addForm2.mustSelected,
level:1,
orgCode:orgCode,
houseId:this.houseId
},
}).then((res) => {
this.dialogVisible2=false;
@@ -702,7 +731,7 @@ export default {
},
}).then((res) => {
if (res.code == 0) {
console.log(res.data);
// console.log(res.data);
this.treeList = res.data;
}
});
@@ -775,6 +804,8 @@ export default {
level: this.level,
orgCode: this.orgCode,
isInterval: this.isInterval,
houseId:this.houseId,
desc:this.addForm.sceneDesc,
},
}).then((res) => {
if (res.code == 0) {
@@ -813,18 +844,18 @@ export default {
});
});
}
this.zkhousePage()
}
});
},
//删除节点
remove(node, data) {
// console.log(data, "123");
this.deleteId = data.id;
if (data.level == 3) {
this.deleteId = data.id;
this.dialogVisible = true;
} else {
if (data.children.length == 0) {
this.deleteId = data.id;
this.dialogVisible = true;
} else {
this.$message({
@@ -841,6 +872,7 @@ export default {
method: "get",
params: {
id: this.deleteId,
houseId:this.houseId
},
}).then((res) => {
if (res.code == 0) {
@@ -873,6 +905,7 @@ export default {
orgCode: "",
sort: "",
level: "",
desc: ''
};
if (data.isInterval == 0) {
this.frosasd.isInterval = 0;
@@ -893,6 +926,7 @@ export default {
this.frosasd.orgCode = data.orgCode;
this.frosasd.sort = data.sort;
this.frosasd.level = data.level;
this.frosasd.desc = data.desc;
this.isshowage = true;
},
//取消编辑
@@ -939,12 +973,11 @@ export default {
axios({
url: `/autoSR/zk/keywords/update`,
method: "post",
data: this.frosasd,
data: {...this.frosasd,houseId: this.houseId},
}).then((res) => {
if (res.code == 0) {
this.getHouse()
that.isshowage=false;
return
that.treeList.forEach((item, index) => {
item.children.forEach((asd, indexesd) => {
if (asd.id == that.frosasd.id) {


+ 17
- 17
src/views/Template/labelModel.vue Voir le fichier

@@ -236,8 +236,8 @@ export default {
}
},
mounted() {
// this.houseId=localStorage.getItem("AitemId");
// this.getorgCode()
this.houseId=localStorage.getItem("houseId");
this.getorgCode()
},
methods: {
// 校验是否已经选择过此标签
@@ -378,7 +378,7 @@ export default {
// 拿问题获取所在的标签数据
findKeywordsById(keywordsId){
axios({
url: `${jypath}/zk/keywords/findKeywordsById`,
url: `/autoSR/zk/keywords/findKeywordsById`,
method: 'get',
params: {
houseId: this.houseId,
@@ -386,9 +386,9 @@ export default {
level: 1
}
}).then(res => {
if (res.data.res == 1){
if (res.code==0){
// console.log(res.data)
this.wajueList = res.data.obj
this.wajueList = res.data
if(this.wajueList&&this.wajueList.length){
this.wajueList.forEach(item=>{
item.disabled = false
@@ -497,14 +497,14 @@ export default {
confirmButtonText: '确定',
callback: action => {
axios({
url: `${jypath}/zk/keymodel/delKeywordsModel`,
url: `/autoSR/zk/keymodel/delKeywordsModel`,
method: 'get',
params: {
id: item.id,
houseId: this.houseId
}
}).then(data => {
if(data.data.res==1){
if(data.code==0){
this.getorgCode()
}
}).catch((e)=>{
@@ -569,7 +569,7 @@ export default {
})
}
axios({
url: `${jypath}/zk/keymodel/updateKeywordsModel`,
url: `/autoSR/zk/keymodel/updateKeywordsModel`,
method: 'post',
data: {
id: this.form.id,
@@ -585,14 +585,14 @@ export default {
showFormatExpression: text.innerText,
distance: this.form.distance // 距离
}
}).then(data => {
}).then(res => {
this.cansave = 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()
}else{
this.$message.error(data.data.resMsg)
this.$message.error(res.msg)
}
}).catch((e)=>{
this.cansave = false
@@ -611,7 +611,7 @@ export default {
this.loading= true
this.tableData=[];
axios({
url: `${jypath}/zk/keymodel/findKeywordsModel`,
url: `/autoSR/zk/keymodel/findKeywordsModel`,
method: 'get',
params: {
houseId:this.houseId,
@@ -620,11 +620,11 @@ export default {
keywordsName: this.value,
keyType: this.keyType
}
}).then(data => {
}).then(res => {
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)=>{
this.loading= false


+ 65
- 57
src/views/Template/modelTodo.vue Voir le fichier

@@ -23,7 +23,7 @@
名称:
<el-input
placeholder="处理人"
v-model="searchForm.updateUserName"
v-model="searchForm.name"
style="width: 140px"
></el-input>
</div>
@@ -39,12 +39,12 @@
项目名称:
<el-input
placeholder="处理人"
v-model="searchForm.updateUserName"
v-model="searchForm.houseName"
style="width: 140px"
></el-input>
</div>
<div style="margin-left: 20px">
<el-button @click="Screening" type="primary">筛选</el-button>
<el-button @click="searchFun" type="primary">筛选</el-button>
</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>
</div>
<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>
<span slot="footer" class="dialog-footer">
@@ -261,25 +261,27 @@ export default {
};
},
mounted() {
// this.houseId = localStorage.getItem("AitemId");
// this.gettableList()
this.houseId = localStorage.getItem("houseId");
this.gettableList()
},
methods: {
// keytype =0,获取需求挖掘类型的数据回显接口
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;
if (res.data.res == 1) {
let obj = res.data.obj;
if (res.code== 0) {
let obj = res.data;
if (obj != null) {
this.form.distance = obj.distance || 10;
this.form.originalExpression = obj.originalExpression;
@@ -331,17 +333,19 @@ export default {
},
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;
if (res.data.res == 1) {
let obj = res.data.obj;
if (res.code == 0) {
let obj = res.data;
if (obj != null) {
this.form.distance = obj.distance || 10;
this.form.originalExpression = obj.originalExpression || "";
@@ -499,11 +503,11 @@ export default {
.then((res) => {
this.cansave = 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();
} else {
this.$message.error(data.data.resMsg);
this.$message.error(res.msg);
}
})
.catch((e) => {
@@ -650,16 +654,18 @@ export default {
// 拿问题获取所在的标签数据
findKeywordsById(level1Id) {
this.wajueList = [];
this.$api.api
.keymodelfindById({
axios({
url: `/autoSR/zk/keywords/findKeywordsById`,
method: 'get',
params: {
houseId: this.currentHouseId,
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) {
this.wajueList.forEach((item) => {
item.disabled = false;
@@ -707,25 +713,27 @@ export default {
this.searchFun();
},
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) {


+ 101
- 77
src/views/Template/requiremining.vue Voir le fichier

@@ -254,7 +254,7 @@
class="item-input"
v-html="item.editValue"
: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>
@@ -262,7 +262,7 @@
</div>

<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>
<span slot="footer" class="dialog-footer">
@@ -273,7 +273,12 @@
</div>
</template>
<script>
import { mapGetters } from "vuex";
import draggable from 'vuedraggable'
export default {
components: {
draggable,
},
data() {
return {
moxingVisible: false,
@@ -338,18 +343,19 @@ export default {
defaultCheck: [], // 选中的id
deleteId: null, // 要删除的表单节点的ID
menuid:'',
pipeiShow: false
}
},
},
created() {
this.allTreeListId = [] // 存储的当前树图所有的接单的ID集合,如:[1,3,4,6,7]
this.pipeiShow = this.permissions.pipeiShow;
},
mounted() {
this.houseId=localStorage.getItem("houseId");
//获取项目
// this.getHouse()
this.getHouse()
},
computed: {
...mapGetters(["permissions"]),
dragOptions() {
return {
animation: 200,
@@ -362,6 +368,7 @@ export default {
methods: {
// 模型匹配
pipei(node,data){
console.log(data)
this.form.keywordsName = data.question
this.form.keywordsId= data.keywordsId

@@ -369,16 +376,20 @@ export default {
this.level1 = 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
if (res.data.res == 1) {
let obj = res.data.obj
if (res.code===0) {
let obj = res.data
if(obj!=null){
this.form.distance = obj.distance||10
this.form.originalExpression = obj.originalExpression
@@ -600,7 +611,6 @@ export default {
},
//格式化粘贴文本方法
onPaste(event) {

var e = event || window.event
// 阻止默认粘贴
e.preventDefault();
@@ -652,15 +662,19 @@ export default {
// 拿问题获取所在的标签数据
findKeywordsById(level){
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) => {
if (res.data.res == 1){
if (res.code == 0){
console.log(res.data)
this.wajueList = res.data.obj
this.wajueList = res.data
if(this.wajueList&&this.wajueList.length){
this.wajueList.forEach(item=>{
item.disabled = false
@@ -726,17 +740,21 @@ export default {
}
if(!this.flag){
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) => {
this.flag = false
if (res.data.res === 1) {
if (res.code === 0) {
// console.log(res.data)
this.$message({
message: res.data.obj,
message: res.data,
type: 'success'
});
this.dynamicTags = []
@@ -744,7 +762,7 @@ export default {
this.getTreeData()
}else{
this.$message({
message: res.data.resMsg||'添加失败',
message: res.msg||'添加失败',
type: 'error'
});
}
@@ -753,13 +771,16 @@ export default {
},
// 设置需求话术等级
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) => {
if (res.data.res === 1) {
if (res.code===0) {
// console.log(res.data)
this.$message({
message: '设置成功',
@@ -770,27 +791,31 @@ export default {
this.getTreeData()
} else {
this.$message({
message: res.data.resMsg,
message: res.msg,
type: 'error'
});
}
});
})
},
// 删除问题
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) {
@@ -818,16 +843,20 @@ export default {
// 树图,设置初始选中值及分数回显
setInitCheck() {
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.parse(data)
if (res.data.obj.length == 0) {
if (res.data.list.length == 0) {
this.newlist = [];
return;
}
@@ -880,19 +909,15 @@ export default {
},
// 获取层级树
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.parse(data)
data.forEach(item => {
@@ -992,7 +1017,7 @@ export default {
houseId: this.houseId,
question: this.frosasd.name
}).then((res) => {
if (res.data.res == 1) {
if (res.code == 0) {
this.$message({
message: '修改成功',
type: 'success'
@@ -1024,7 +1049,6 @@ export default {
if (item.children.length == 0) {
return
} else {

item.children.forEach((ite, inde) => {
if (before.data.pid == ite.pid) {
arr.push(ite)
@@ -1032,7 +1056,6 @@ export default {
if (ite.children.length == 0) {
return
} else {

ite.children.forEach((it, ins) => {
if (before.data.pid == it.pid) {
arr.push(it)
@@ -1400,14 +1423,14 @@ export default {
// 评分保存
saveRate(params) {
this.$api.api.saveWordTemplate(params).then((res) => {
if (res.data.res === 1) {
if (res.code === 0) {
this.$message({
message: '保存成功',
type: 'success'
});
} else {
this.$message({
message: res.data.resMsg,
message: res.msg,
type: 'warning'
});
}
@@ -1509,6 +1532,7 @@ export default {
}
.rate-box{
width: 60%;
padding-left: 20px;
}
.tip{
margin-left: 30px;


+ 24
- 29
src/views/Template/taboo.vue Voir le fichier

@@ -73,7 +73,7 @@
<el-dialog
:title="editFlag ? '编辑' : '新增'"
:center="true"
width="400px"
width="600px"
:visible.sync="dialogVisible"
@close="$refs.ruleForm.resetFields()"
>
@@ -102,6 +102,7 @@
show-word-limit
clearable
></el-input>
<div>增加场景描述有利于标签命中,场景越丰富触达越精准;例如:送家具 ,场景:现在买房我们送家具;</div>
</el-form-item>
</el-form>
<div
@@ -111,13 +112,9 @@
border-top: 1px solid #eee;
padding-top: 20px;
display: flex;
justify-content: end;
"
>
justify-content: end;">
<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>
</el-dialog>
<el-dialog
@@ -286,6 +283,7 @@ export default {
},

created() {
this.houseId=localStorage.getItem("houseId");
// 获取显隐的列表
this.setTableOption();
this.tem_tab_add = this.permissions["tem_tab_add"];
@@ -299,11 +297,11 @@ export default {
methods: {
// 插入节点
insertTag(item,index){
if(window._range){
this.insertContent("<span contentEditable='false' style='color:red'>"+item.value+"</span><text>&nbsp;</text>");
}else{
this.insertHtmlAtCaret("<span contentEditable='false' style='color:red'>"+item.value+"</span><text>&nbsp;</text>");
}
if(window._range){
this.insertContent("<span contentEditable='false' style='color:red'>"+item.value+"</span><text>&nbsp;</text>");
}else{
this.insertHtmlAtCaret("<span contentEditable='false' style='color:red'>"+item.value+"</span><text>&nbsp;</text>");
}
},
// 处理标签,删除不需要的标签格式
delMark(str) {
@@ -332,7 +330,7 @@ export default {
this.form.id = ''
// 获取模型数据回显
axios({
url: `${jypath}/zk/keymodel/findById`,
url: `/autoSR/zk/keymodel/findById`,
method: 'get',
params: {
houseId: this.houseId,
@@ -341,9 +339,8 @@ export default {
}
}).then(res => {
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){
this.form.distance = obj.distance||10
this.form.originalExpression = obj.originalExpression
@@ -396,7 +393,7 @@ export default {
if(text.innerText=='') {this.$message.error('请输入标签模型'); return;}

axios({
url: `${jypath}/zk/keymodel/updateKeywordsModel`,
url: `/autoSR/zk/keymodel/updateKeywordsModel`,
method: 'post',
data: {
id: this.form.id||"",
@@ -412,13 +409,13 @@ export default {
distance: this.form.distance, // * 距离
desc: this.form.sceneDesc//场景描述
}
}).then(data => {
}).then(res => {
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()
}else{
this.$message.error(data.data.resMsg)
this.$message.error(res.msg)
}
}).catch((e)=>{
this.modelVisible = false
@@ -705,7 +702,7 @@ export default {
type: "warning",
})
.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) {
this.$message({
type: "success",
@@ -715,7 +712,7 @@ export default {
this.words = "";
this.taboofindbypagelist();
} else {
this.$message.error(res.message);
this.$message.error(res.msg);
}
});
})
@@ -761,18 +758,17 @@ export default {
this.page.currentPage = 1;
this.words = "";
this.taboofindbypagelist();
this.$message.success(res.data);
} else {
this.$message.error(res.message);
this.$message.error(res.msg);
}
setTimeout(() => {
this.loadingFlag = false;
console.log("防重");
}, 1);
})
.catch((e) => {
setTimeout(() => {
this.loadingFlag = false;
console.log("防重");
}, 1);
});
} else {
@@ -788,18 +784,17 @@ export default {
this.page.currentPage = 1;
this.words = "";
this.taboofindbypagelist();
this.$message.success(res.data);
} else {
this.$message.error(res.message);
this.$message.error(res.msg);
}
setTimeout(() => {
this.loadingFlag = false;
console.log("防重");
}, 1);
})
.catch((e) => {
setTimeout(() => {
this.loadingFlag = false;
console.log("防重");
}, 1);
});
}


+ 41
- 65
src/views/building/index.vue Voir le fichier

@@ -441,66 +441,14 @@
:disabled="passFlag"
></el-input>
</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
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-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>
</div>
<div
@@ -934,11 +882,8 @@ export default {
offLine: ["08:00", "20:00"], // 离线推送时间段
caseShow: '0', // 优秀案例
tagMatching: '0', // 客户标签匹配
transferLanguage:'',
transferMethod: '',
auditReception:'',
keywordsModelAnswerMatch:'',
keywordsModelQuestionMatch:''
transliterationMethod: '',//转写方式
language:'',//语言
},
ruleForm1: {},
optionsagentId: [],
@@ -947,6 +892,9 @@ export default {
propertyName: [
{ required: true, message: "请填写项目名称", trigger: "change" },
],
transliterationMethod: [
{ required: true, message: "请选择转写方式", trigger: "change" },
],
managerPassword: [
{ required: true, message: "请填写密码", trigger: "blur" },
{
@@ -992,6 +940,8 @@ export default {
agentForm: {
agentId: "",
},
projectlist:[],//转写方式
languageList:[]//语言
};
},
computed: {
@@ -1014,10 +964,11 @@ export default {
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_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_open = this.permissions["cus_build_index_open"];
// 获取转写方式数据
this.findTransferMethod()
},
mounted() {
if (this.$route.query.serviceStatus) {
@@ -1056,8 +1007,33 @@ export default {
this.zkhousePage();
// 获取项目列表
this.zkhousePages();
},
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() {
this.$db.getDataByKey(this.tableIdName).then((res) => {
@@ -1299,7 +1275,7 @@ export default {
this.$api.api
.editZkhouse(this.ruleForm)
.then((res) => {
console.log(res);
// console.log(res);
if (res.code == 0) {
this.dialogVisible = false;
setTimeout(() => {


Chargement…
Annuler
Enregistrer