Commit 78868004 by 李伟康

话术库

1 parent d4b16319
......@@ -1878,6 +1878,7 @@
"thread-loader": "^2.1.3",
"url-loader": "^2.2.0",
"vue-loader": "^15.9.2",
"vue-loader-v16": "npm:vue-loader@^16.1.0",
"vue-style-loader": "^4.1.2",
"webpack": "^4.0.0",
"webpack-bundle-analyzer": "^3.8.0",
......@@ -13294,6 +13295,75 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.6.5",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz",
......
......@@ -9,7 +9,7 @@ export default {
method: 'POST',
data: params,
sign: true,
returnAll: true
// returnAll: true
})
},
/**获取话术组列表*/
......
......@@ -78,12 +78,13 @@
<template v-if="editGroupText.newGroup || editState">
<div class="input-box">
<el-input
ref="editInput"
class="input"
v-model="editGroupText.newGroup"
maxlength="10"
placeholder="请输入"
@input="editGroupText.newGroup = $event.replace(emojiReg, '')"
ref="editInput"
@keyup.enter.native="updateChatGroup"
>
<div
slot="suffix"
......@@ -116,12 +117,13 @@
{{ i.value }}
<div class="item-btn">
<i
v-if="!i.isAdd"
class="el-icon-edit"
@click.stop="showEditGroupInput(i.value)"
></i>
<i
class="el-icon-circle-close"
@click.stop="delChatLibrary(i.value)"
@click.stop="delChatLibrary(i)"
></i>
</div>
</div>
......@@ -217,7 +219,7 @@ export default {
this.$refs.editInput.focus()
})
},
/**新增话术组 */
/**新增编辑话术组 */
showEditGroupInput (value) {
this.editGroupText = {
oldGroup: value,
......@@ -238,7 +240,8 @@ export default {
if (!editGroupText.newGroup) throw '请输入话术组!'
if (editState) {
this.chatGroup.unshift({
value: editGroupText.newGroup
value: editGroupText.newGroup,
isAdd: true
})
} else {
const { data, message } = await this.$apis.chatLibrary.updateChatGroup(editGroupText)
......@@ -259,26 +262,40 @@ export default {
}
},
/**删除 */
delChatLibrary (scriptGroup) {
delChatLibrary ({
value,
isAdd
}) {
const { chatForm, chatGroup } = this
this.$confirm('确定要删除此话术组?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: utils.debounce((action) => {
if (action == 'confirm') {
this.$apis.chatLibrary.delChatLibrary({
scriptGroup
if (isAdd) {
this.chatGroup.splice(chatGroup.findIndex(e => e.value == value), 1)
check()
} else this.$apis.chatLibrary.delChatLibrary({
scriptGroup: value
}).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') this.getChatGroup()
if (res.code == '0') {
this.getChatGroup()
check()
}
})
}
}, 500)
})
const check = () => {
if (chatForm.scriptGroup == value) this.chatForm.scriptGroup = ''
}
},
/**选择话术组 */
choose (val) {
this.chatForm.scriptGroup = val
......
......@@ -76,7 +76,7 @@ export default {
return {
CHAT_STATE,
url,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'data.count' },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
// 表格按钮
tableButtonList: [
{
......@@ -115,7 +115,7 @@ export default {
},
getListApi: this.$apis.chatLibrary.getChatLibraryList,
tableParams: {
listName: 'data.data',
listName: 'data',
tableOption: true,
tableColumns: [
{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!