diff --git a/src/api/modules/api.js b/src/api/modules/api.js index 475655f..4c50711 100644 --- a/src/api/modules/api.js +++ b/src/api/modules/api.js @@ -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 }) diff --git a/src/views/Customer/label.vue b/src/views/Customer/label.vue index 9732672..224fe76 100644 --- a/src/views/Customer/label.vue +++ b/src/views/Customer/label.vue @@ -63,7 +63,6 @@ ddeditor(node, data)">编辑 - moxingEdit(node, data)">编辑模型 @@ -74,19 +73,19 @@ 编辑 + moxingEdit(node, data)">编辑模型 删除 - - - 编辑模型 - 编辑 + + 编辑模型 + 删除 @@ -95,8 +94,7 @@ - - + + + + + 增加场景描述有利于标签命中,场景越丰富触达越精准; + 例如:意向面积:120平,场景:我想要一个120平的; + @@ -169,7 +179,7 @@ - + 万元 - - - 类名: + + + 类名: - + + + + 场景描述: + + + + + 增加场景描述有利于标签命中,场景越丰富触达越精准; + 例如:意向面积:120平,场景:我想要一个120平的; - { + 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) { diff --git a/src/views/Template/labelModel.vue b/src/views/Template/labelModel.vue index 445d5e4..866631a 100644 --- a/src/views/Template/labelModel.vue +++ b/src/views/Template/labelModel.vue @@ -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 diff --git a/src/views/Template/modelTodo.vue b/src/views/Template/modelTodo.vue index bb92fb8..8dd3811 100644 --- a/src/views/Template/modelTodo.vue +++ b/src/views/Template/modelTodo.vue @@ -23,7 +23,7 @@ 名称: @@ -39,12 +39,12 @@ 项目名称: - 筛选 + 筛选 @@ -192,7 +192,7 @@ - {{item.label}} + {{item.label}} @@ -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) { diff --git a/src/views/Template/requiremining.vue b/src/views/Template/requiremining.vue index 7715c21..0335f88 100644 --- a/src/views/Template/requiremining.vue +++ b/src/views/Template/requiremining.vue @@ -254,7 +254,7 @@ class="item-input" v-html="item.editValue" :id="'huashuModel'+index"> - 删除 + 删除 @@ -262,7 +262,7 @@ - {{item.label}} + {{item.label}} @@ -273,7 +273,12 @@