diff --git a/.env.cldevelopment b/.env.cldevelopment index 476142a..2a32da8 100644 --- a/.env.cldevelopment +++ b/.env.cldevelopment @@ -1 +1 @@ -VUE_APP_BASE_API = 'http://192.168.31.160:9999' \ No newline at end of file +VUE_APP_BASE_API = 'http://192.168.31.161:9999' \ No newline at end of file diff --git a/.env.shdevelopment b/.env.shdevelopment index 43dd154..0448db4 100644 --- a/.env.shdevelopment +++ b/.env.shdevelopment @@ -1 +1 @@ -VUE_APP_BASE_API = 'http://192.168.31.85:9999' \ No newline at end of file +VUE_APP_BASE_API = 'http://192.168.31.86:9999' \ No newline at end of file diff --git a/package.json b/package.json index d932670..cef0a3c 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "pre": "cnpm install || yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ", "dev": "vue-cli-service serve", + "serve": "vue-cli-service serve --mode production", "cl": "vue-cli-service serve --mode cldevelopment", "sh": "vue-cli-service serve --mode shdevelopment", "local": "vue-cli-service serve --mode localdevelopment", diff --git a/src/api/modules/api.js b/src/api/modules/api.js index f2ddc99..a3d81af 100644 --- a/src/api/modules/api.js +++ b/src/api/modules/api.js @@ -302,6 +302,7 @@ export function houseListWhenAddUser(query) { params:query }) } +// 获取项目列表 export function findHouseByUser(query) { return request({ url: '/autoSR/zkhouse/findHouseByUser', diff --git a/src/api/modules/http.js b/src/api/modules/http.js index 89c4a7a..b481463 100644 --- a/src/api/modules/http.js +++ b/src/api/modules/http.js @@ -951,3 +951,135 @@ export function findByRepetitionName(params) { }) } + + +// 无效接待审核列表 +export function InvalidReceptionGetList(params) { + return request({ + url: 'autoSR/audit/reception/getPageList', + method: 'get', + params + }) +} + +// 无效接待原因列表 +export function InvalidReceptionReasonList(params) { + return request({ + url: 'autoSR/audit/reception/invalidList', + method: 'get', + params + }) +} + + +// 添加无效接待原因 +export function InvalidReceptionAddInvalid(params) { + return request({ + url: 'autoSR/audit/reception/addInvalid', + method: 'get', + params + }) +} + +// 删除无效接待原因 +export function InvalidReceptionDelete(params) { + return request({ + url: 'autoSR/audit/reception/delete', + method: 'get', + params + }) +} + +// 删除无效接待原因 +export function InvalidReceptionUpdateSort(params) { + return request({ + url: 'autoSR/audit/reception/updateSort', + method: 'get', + params + }) +} + +// 编辑无效接待原因 +export function InvalidReceptionUpdateInvalid(params) { + return request({ + url: 'autoSR/audit/reception/updateInvalid', + method: 'get', + params + }) +} + + +// 获取当前角色绑定的项目 +export function InvalidFindHouseListByAccount(params) { + return request({ + url: 'autoSR/zkhouse/findHouseListByAccount', + method: 'get', + params + }) +} + + +// 获取无效审核列表的接待详情 +export function InvalidFindReceptionLog(params) { + return request({ + url: 'autoSR/audit/reception/findReceptionLog', + method: 'get', + params + }) +} + +// 获取无效审核列表的录音详情 +export function InvalidFindBycusId(params) { + return request({ + url: 'autoSR/zk/file/findBycusId', + method: 'get', + params + }) +} + + +// 删除接待记录 +export function deleteCS(params) { + return request({ + url: 'autoSR/customer/deleteCS', + method: 'get', + params + }) +} + +// 无效审核状态更改 +export function updateReception(data) { + return request({ + url: 'autoSR/audit/reception/updateReception', + method: 'post', + data + }) +} + +// 部门 +export function getAllDeptName(params) { + return request({ + url: 'autoSR/api/zkAgentPool/getAllDeptName', + method: 'get', + params + }) +} + + +// 顾问 +export function getAllAccountName(params) { + return request({ + url: 'autoSR/api/zkAgentPool/getAllAccountName', + method: 'get', + params + }) +} + +// 顾问 +export function invalidReceptionRank(data) { + return request({ + url: 'autoSR/audit/reception/invalidReceptionRank', + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/src/router/axios.js b/src/router/axios.js index 47ff382..eb2cfe7 100644 --- a/src/router/axios.js +++ b/src/router/axios.js @@ -63,7 +63,7 @@ axios.interceptors.response.use(res => { NProgress.done() const status = Number(res.status) || 200 const message = res.data.msg || errorCode[status] || errorCode['default'] - if (status === 401 || status === 500) { + if ((status === 401 || status === 500) && process.env.NODE_ENV === 'production') { idx++ if(idx==1){ Message({ diff --git a/src/views/Customer/invalidAuditList.vue b/src/views/Customer/invalidAuditList.vue new file mode 100644 index 0000000..30f7894 --- /dev/null +++ b/src/views/Customer/invalidAuditList.vue @@ -0,0 +1,1797 @@ + + + + + 提交时间: + + 全部 + 今日 + 昨日 + 近一周 + + + + + + + 项目: + + + + + + + 关键词: + + + + 筛选 + + 清空筛选条件 + + + + + + + {{ data.title }} + + + + + + + + + + + + + + + + + + + + + + + {{ row.auditStatus | statusText }} + + + + + + + + + + + + 查看 + + + + + + + + + + + + + + + + + + 无效原因:{{ scopeInfo.invalidReason }} + + + 项目名称:{{ scopeInfo.projectName }} + 客户:{{ scopeInfo.name }} {{ scopeInfo.phone }} + 接待顾问:{{ scopeInfo.agentName }} + 接待时间:{{ scopeInfo.assignedTime }} + + + + + + + + + + + + + 上一首 + + 1/1 + + 下一首 + + + + 0.5x + + + 1.0x + + + 1.5x + + + 2.0x + + + + + + + + + + {{ item.name }} + + + + + + + + + {{ item.speaker | toCapital }} + + + + + + + + + + + + + + + 日志记录 + + + + + + + + {{ data.operationDate }} + + + + {{ data.operationUser || "-" }} {{ data.auditOperation }} {{ data.auditStatus | textauditStatus }} + + + 原因: {{ data.auditReason }} + + + + + + + + + + + + 上一条 + + + + 通过 + + + 驳回 + + + + 撤销 + + 下一条 + + 关闭 + + + + + + + + + + + 取消 + 确认 + + + + + + + + + \ No newline at end of file diff --git a/src/views/Customer/label.vue b/src/views/Customer/label.vue index 30cf10c..2f52fc8 100644 --- a/src/views/Customer/label.vue +++ b/src/views/Customer/label.vue @@ -57,37 +57,37 @@ - + 添加二级 - ddeditor(node, data)">编辑 + ddeditor(node, data)">编辑 - + 添加三级 - 编辑 + 编辑 moxingEdit(node, data)">编辑模型 - 删除 + 删除 - 编辑 + 编辑 - 编辑模型 + 编辑模型 - 删除 + 删除 @@ -237,6 +237,15 @@ 例如:意向面积:120平,场景:我想要一个120平的; + + 是否必选: + + + 是 + 否 + + + { + let selection = window.getSelection + ? window.getSelection() + : document.selection; + if (!selection.rangeCount) return; + let range = selection.createRange + ? selection.createRange() + : selection.getRangeAt(0); + window._range = range; + }, + // 回显模型数据,Dialog 的内容是懒渲染的,即在第一次被打开之前,传入的默认 slot 不会被渲染到 DOM 上,so在 open 事件回调中进行 + openModel() { + // this.$nextTick(()=>{ + // let huashuModel = document.getElementById('huashuModel') + // huashuModel.innerHTML = this.form.originalExpression + // }) + }, + //格式化粘贴文本方法 + onPaste(event) { + var e = event || window.event; + // 阻止默认粘贴 + e.preventDefault(); + // 粘贴事件有一个clipboardData的属性,提供了对剪贴板的访问 + // clipboardData的getData(fomat) 从剪贴板获取指定格式的数据 + var text = + (e.originalEvent || e).clipboardData.getData("text/plain") || + prompt("在这里输入文本"); + //清除回车 + text = text.replace(/\[\d+\]|\n|\r/gi, ""); + // 插入 + document.execCommand("insertText", false, text); + }, + myeditorenter(e) { + e.preventDefault(); + }, + // 插入节点 + insertHtmlAtCaret(html) { + document.getElementById("huashuModel").focus(); + var sel, range; + if (window.getSelection) { + // IE9 and non-IE + sel = window.getSelection(); + if (sel.getRangeAt && sel.rangeCount) { + range = sel.getRangeAt(0); + range.deleteContents(); + // Range.createContextualFragment() would be useful here but is + // non-standard and not supported in all browsers (IE9, for one) + var el = document.createElement("div"); + el.innerHTML = html; + var frag = document.createDocumentFragment(), + node, + lastNode; + while ((node = el.firstChild)) { + lastNode = frag.appendChild(node); + } + range.insertNode(frag); + // Preserve the selection + if (lastNode) { + range = range.cloneRange(); + range.setStartAfter(lastNode); + range.collapse(true); + sel.removeAllRanges(); + sel.addRange(range); + } + } + } else if (document.selection && document.selection.type != "Control") { + // IE < 9 + document.selection.createRange().pasteHTML(html); + } + }, + // 点击插入标签 + insertTag(item, index) { + if (window._range) { + this.insertContent( + "" + + item.value + + " " + ); + } else { + this.insertHtmlAtCaret( + "" + + item.value + + " " + ); + } + }, + // 处理标签,删除不需要的标签格式 + delMark(str) { + const hasStr = (str) => { + let index = str.indexOf("<"); + let index1 = str.indexOf(">"); + if (index > 0 && index1 > 0) { + let replaceStr = str.substring(index, index1 + 1); + str = str.replace(replaceStr, ""); + hasStr(str); + } + }; + hasStr(str); + }, + // 处理模型 关键词加#号 + replaceFun(str) { + let temp = str; + temp = temp.replace(/\ \;<\/text>/g, ""); + temp = temp.replace(/\ \;/g, ""); + temp = temp.replace(//g, ""); + temp = temp.replace(/<\/text>/g, ""); + temp = temp.replace( + //g, + " #" + ); // 后台返回是这样的,变了,需要也处理一下 + temp = temp.replace( + //g, + " #" + ); + temp = temp.replace(/<\/span>/g, "#"); + // console.log(temp); + this.delMark(temp); + return temp; + }, + // 模型保存 + saveFun() { + let text = document.getElementById("huashuModel"); + // console.log(text.innerHTML); + // console.log(text.innerText); + let temp = text.innerHTML; + if (this.form.distance == "") { + this.$message.error("请输入距离"); + return; + } + if (text.innerText == "") { + this.$message.error("请输入标签模型"); + return; + } + + axios({ + url: `/autoSR/zk/keymodel/updateKeywordsModel`, + method: "post", + data: { + id: this.form.id, + houseId: this.houseId, + level: this.level, + keywordsId: this.form.keywordsId, + keywordsName: this.form.keywordsName, + answerList: [], + keyType: 2, + formatExpression: this.replaceFun(temp), // 问题表达式 + original: temp, // html数据 + showFormatExpression: text.innerText, + distance: this.form.distance, // * 距离 + }, + }) + .then((data) => { + this.moxingVisible = false; + if (data.code == 0) { + this.$message.success(data.data); + this.getorgCode(); } else { - selection = window.getSelection ? window.getSelection() : document.selection; - range.collapse(false); - let hasR = range.createContextualFragment(str); - let hasR_lastChild = hasR.lastChild; - while (hasR_lastChild && hasR_lastChild.nodeName.toLowerCase() == "br" && hasR_lastChild.previousSibling && hasR_lastChild.previousSibling.nodeName.toLowerCase() == "br") { - let e = hasR_lastChild; - hasR_lastChild = hasR_lastChild.previousSibling; - hasR.removeChild(e); - } - range.insertNode(hasR); - if (hasR_lastChild) { - range.setEndAfter(hasR_lastChild); - range.setStartAfter(hasR_lastChild); - } - selection.removeAllRanges(); - selection.addRange(range); + this.$message.error(data.msg); } - }, - // 失去焦点时保存光标位置 - saveRange: () => { - let selection = window.getSelection ? window.getSelection() : document.selection; - if (!selection.rangeCount) return; - let range = selection.createRange ? selection.createRange() : selection.getRangeAt(0); - window._range = range; - }, - // 回显模型数据,Dialog 的内容是懒渲染的,即在第一次被打开之前,传入的默认 slot 不会被渲染到 DOM 上,so在 open 事件回调中进行 - openModel(){ - // this.$nextTick(()=>{ - // let huashuModel = document.getElementById('huashuModel') - // huashuModel.innerHTML = this.form.originalExpression - // }) - }, - //格式化粘贴文本方法 - onPaste(event) { - var e = event || window.event - // 阻止默认粘贴 - e.preventDefault(); - // 粘贴事件有一个clipboardData的属性,提供了对剪贴板的访问 - // clipboardData的getData(fomat) 从剪贴板获取指定格式的数据 - var text = (e.originalEvent || e).clipboardData.getData('text/plain') || prompt('在这里输入文本'); - //清除回车 - text = text.replace(/\[\d+\]|\n|\r/ig,"") - // 插入 - document.execCommand("insertText", false, text); - }, - myeditorenter(e) { - e.preventDefault(); - }, - // 插入节点 - insertHtmlAtCaret(html) { - document.getElementById('huashuModel').focus(); - var sel, range; - if (window.getSelection) { - // IE9 and non-IE - sel = window.getSelection(); - if (sel.getRangeAt && sel.rangeCount) { - range = sel.getRangeAt(0); - range.deleteContents(); - // Range.createContextualFragment() would be useful here but is - // non-standard and not supported in all browsers (IE9, for one) - var el = document.createElement("div"); - el.innerHTML = html; - var frag = document.createDocumentFragment(), - node, lastNode; - while ((node = el.firstChild)) { - lastNode = frag.appendChild(node); - } - range.insertNode(frag); - // Preserve the selection - if (lastNode) { - range = range.cloneRange(); - range.setStartAfter(lastNode); - range.collapse(true); - sel.removeAllRanges(); - sel.addRange(range); - } + }) + .catch((e) => { + this.moxingVisible = false; + }); + }, + moxingEdit(node, 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: `/autoSR/zk/keymodel/findById`, + method: "get", + params: { + houseId: this.houseId, + level: this.level, + keyType: 2, + keywordsId: data.id, + }, + }) + .then((res) => { + // console.log(res) + this.moxingVisible = true; + if (res.code == 0) { + let obj = res.data; + if (obj != null) { + this.form.distance = obj.distance || 10; + this.form.originalExpression = obj.originalExpression; + this.form.id = obj.id; + // 回显标签模型数据 + if (obj.answerList && obj.answerList.length) { + this.dynamiclist = obj.answerList.map((cont) => { + return { + question: cont.question, + editValue: cont.originalExpression, + }; + }); + // console.log(this.dynamiclist) + } else { + this.dynamiclist = []; } - } else if (document.selection && document.selection.type != "Control") { - // IE < 9 - document.selection.createRange().pasteHTML(html); - } - }, - // 点击插入标签 - insertTag(item,index){ - if(window._range){ - this.insertContent(""+item.value+" "); - }else{ - this.insertHtmlAtCaret(""+item.value+" "); + } else { + this.form.distance = 10; + this.form.originalExpression = this.form.keywordsName; + this.form.id = ""; } - }, - // 处理标签,删除不需要的标签格式 - delMark(str) { - const hasStr = (str) => { - let index = str.indexOf('<') - let index1 = str.indexOf('>') - if(index>0&&index1>0){ - let replaceStr= str.substring(index, index1+1) - str= str.replace(replaceStr,'') - hasStr(str) - } + } else { + this.form.distance = 10; + this.form.originalExpression = this.form.keywordsName; } - hasStr(str) - }, - // 处理模型 关键词加#号 - replaceFun(str){ - let temp = str - temp = temp.replace(/\ \;<\/text>/g,''); - temp = temp.replace(/\ \;/g,''); - temp = temp.replace(//g,''); - temp = temp.replace(/<\/text>/g,''); - temp = temp.replace(//g,' #');// 后台返回是这样的,变了,需要也处理一下 - temp = temp.replace(//g,' #'); - temp = temp.replace(/<\/span>/g,'#') - // console.log(temp); - this.delMark(temp); - return temp - }, - // 模型保存 - saveFun(){ - let text = document.getElementById('huashuModel'); - // console.log(text.innerHTML); - // console.log(text.innerText); - let temp = text.innerHTML - if(this.form.distance=='') {this.$message.error('请输入距离'); return;} - if(text.innerText=='') {this.$message.error('请输入标签模型'); return;} - - axios({ - url: `/autoSR/zk/keymodel/updateKeywordsModel`, - method: 'post', - data: { - id: this.form.id, - houseId: this.houseId, - level: this.level, - keywordsId: this.form.keywordsId, - keywordsName: this.form.keywordsName, - answerList: [], - keyType: 2, - formatExpression: this.replaceFun(temp),// 问题表达式 - original: temp,// html数据 - showFormatExpression: text.innerText, - distance: this.form.distance // * 距离 - } - }).then(data => { - this.moxingVisible = false - if(data.code==0){ - this.$message.success(data.data) - this.getorgCode() - }else{ - this.$message.error(data.msg) - } - }).catch((e)=>{ - this.moxingVisible = false - }) - }, - moxingEdit(node, 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: `/autoSR/zk/keymodel/findById`, - method: 'get', - params: { - houseId: this.houseId, - level: this.level, - keyType: 2, - keywordsId: data.id - } - }).then(res => { - // console.log(res) - this.moxingVisible = true - if (res.code == 0) { - let obj = res.data - if(obj!=null){ - this.form.distance=obj.distance||10 - this.form.originalExpression= obj.originalExpression - this.form.id =obj.id - // 回显标签模型数据 - if(obj.answerList&&obj.answerList.length){ - this.dynamiclist = obj.answerList.map(cont=>{ - return { - question: cont.question, - editValue: cont.originalExpression - } - }) - // console.log(this.dynamiclist) - }else{ - this.dynamiclist = [] - } - }else{ - this.form.distance=10 - this.form.originalExpression= this.form.keywordsName - this.form.id ='' - } - }else{ - this.form.distance = 10 - this.form.originalExpression = this.form.keywordsName - } - this.$nextTick(()=>{ - let huashuModel = document.getElementById('huashuModel') - huashuModel.innerHTML = this.form.originalExpression - }) - }).catch((e)=>{ - this.moxingVisible = true - }) - }, - addclick(){ - var orgCode=''; - if(localStorage.getItem("orgType") == 3){ - orgCode=localStorage.getItem("orgCode") - }else{ - orgCode= this.orgCodes + this.$nextTick(() => { + let huashuModel = document.getElementById("huashuModel"); + huashuModel.innerHTML = this.form.originalExpression; + }); + }) + .catch((e) => { + this.moxingVisible = true; + }); + }, + addclick() { + var orgCode = ""; + if (localStorage.getItem("orgType") == 3) { + orgCode = localStorage.getItem("orgCode"); + } else { + orgCode = this.orgCodes; } - if (this.addForm2.name != "") { - axios({ + if (this.addForm2.name != "") { + axios({ url: `/autoSR/zk/keywords/add`, method: "post", data: { pid: 0, name: this.addForm2.name, mustSelected: this.addForm2.mustSelected, - level:1, - orgCode:orgCode, - houseId:this.houseId + level: 1, + orgCode: orgCode, + houseId: this.houseId, }, }).then((res) => { - if(res.code ==0){ - this.dialogVisible2=false; - this.getHouse() - }else{ + if (res.code == 0) { + this.dialogVisible2 = false; + this.getHouse(); + } else { this.$message({ - message: res.msg||'添加失败', + message: res.msg || "添加失败", type: "error", }); } - }) - }else{ + }); + } else { this.$message({ message: "内容不能为空", type: "warning", @@ -722,9 +773,9 @@ export default { return; } }, - append1(){ - this.addForm2.name=''; - this.dialogVisible2=true; + append1() { + this.addForm2.name = ""; + this.dialogVisible2 = true; }, // 获取模板数据 getHouse() { @@ -746,7 +797,7 @@ export default { this.amountintervalname = data.name; this.addForm.name = ""; this.addForm.endName = ""; - this.addForm.sceneDesc = ''; + this.addForm.sceneDesc = ""; this.pid = data.id; this.level = data.level + 1; this.orgCode = data.orgCode; @@ -761,11 +812,11 @@ export default { this.dialogFormVisible = true; }, houseChange() { - this.houseList.map(item=>{ - if(item.id==this.houseId){ - this.orgCodes=item.orgCode; + this.houseList.map((item) => { + if (item.id == this.houseId) { + this.orgCodes = item.orgCode; } - }) + }); console.log(this.orgCodes); this.getHouse(); }, @@ -810,8 +861,8 @@ export default { level: this.level, orgCode: this.orgCode, isInterval: this.isInterval, - houseId:this.houseId, - desc:this.addForm.sceneDesc, + houseId: this.houseId, + desc: this.addForm.sceneDesc, }, }).then((res) => { if (res.code == 0) { @@ -850,7 +901,7 @@ export default { }); }); } - this.zkhousePage() + this.zkhousePage(); } }); }, @@ -878,7 +929,7 @@ export default { method: "get", params: { id: this.deleteId, - houseId:this.houseId + houseId: this.houseId, }, }).then((res) => { if (res.code == 0) { @@ -902,6 +953,7 @@ export default { }, //编辑 ddeditor(node, data) { + console.log(data, "adjklsajdlk"); this.frosasd = { name: "", endName: "", @@ -911,7 +963,8 @@ export default { orgCode: "", sort: "", level: "", - desc: '' + desc: "", + mustSelected: 1, }; if (data.isInterval == 0) { this.frosasd.isInterval = 0; @@ -926,6 +979,9 @@ export default { this.frosasd.endName = ""; this.frosasd.isInterval = 1; } + if (data.level == 1) { + this.frosasd.mustSelected = data.mustSelected; + } this.frosasd.id = data.id; this.frosasd.name = data.name; this.frosasd.pid = data.pid; @@ -967,7 +1023,7 @@ export default { this.houseId = localStorage.getItem("houseId"); } else { this.houseId = res.data[0].id; - this.orgCodes=res.data[0].orgCode; + this.orgCodes = res.data[0].orgCode; } // this.houseId = res.data[0].id; // 列表获取 @@ -979,11 +1035,11 @@ export default { axios({ url: `/autoSR/zk/keywords/update`, method: "post", - data: {...this.frosasd,houseId: this.houseId}, + data: { ...this.frosasd, houseId: this.houseId }, }).then((res) => { if (res.code == 0) { - this.getHouse() - that.isshowage=false; + this.getHouse(); + that.isshowage = false; that.treeList.forEach((item, index) => { item.children.forEach((asd, indexesd) => { if (asd.id == that.frosasd.id) { @@ -1031,18 +1087,18 @@ export default { \ No newline at end of file diff --git a/src/views/Template/invalidReception.vue b/src/views/Template/invalidReception.vue new file mode 100644 index 0000000..2c191dc --- /dev/null +++ b/src/views/Template/invalidReception.vue @@ -0,0 +1,488 @@ + + + + + + 新增 + + + + + + + + + + + + + 编辑 + 删除 + + + + + + + + + + + + + + + + + 请将此无效的接待转移到以下无效原因中 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/building/index.vue b/src/views/building/index.vue index e5612cf..b04e996 100644 --- a/src/views/building/index.vue +++ b/src/views/building/index.vue @@ -374,6 +374,13 @@ + + + 审核 + 不审核 + + +
+ 无效原因:{{ scopeInfo.invalidReason }} +
+ 项目名称:{{ scopeInfo.projectName }} + 客户:{{ scopeInfo.name }} {{ scopeInfo.phone }} + 接待顾问:{{ scopeInfo.agentName }} + 接待时间:{{ scopeInfo.assignedTime }} +