Commit b00886d2 by 李伟康

提交

1 parent 8d7516fc
......@@ -220,6 +220,7 @@ export default {
const { editGroupText, addState, $message } = this
try {
if (!editGroupText.newGroup) throw '请输入话术组!'
if (addState) {
this.chatGroup.map(e => {
if (e.value == editGroupText.newGroup) throw '该话术组已存在!'
......@@ -233,11 +234,19 @@ export default {
type: 'success'
})
} else {
const { data, message } = await this.$apis.chatLibrary.updateChatGroup(editGroupText)
$message({
message: data ? '修改成功' : message,
type: data ? 'success' : 'error'
})
const { isAdd } = this.chatGroup.find(e => e.value == editGroupText.oldGroup)
if (isAdd) {
$message({
message: '修改成功',
type: 'success'
})
} else {
const { data, message } = await this.$apis.chatLibrary.updateChatGroup(editGroupText)
$message({
message: data ? '修改成功' : message,
type: data ? 'success' : 'error'
})
}
this.chatGroup.find(e => {
if (e.value == editGroupText.oldGroup) {
e.value = editGroupText.newGroup
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!