Commit a963bda2 by 姜鹏凯

update

1 parent f44812c8
...@@ -191,16 +191,7 @@ ...@@ -191,16 +191,7 @@
}, },
deleteFn (data) { deleteFn (data) {
if (data.scenesList && data.scenesList.length) { if (data.scenesList && data.scenesList.length) {
this.$confirm('请删除当前客服下所有关联场景后,再删除当前客服。', '提示', { this.$message.error('请删除当前客服下所有关联场景后,再删除当前客服!')
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
})
.then(() => {
})
.catch(function () { })
} else { } else {
this.$confirm('是否确定删除当前客服?该操作不可恢复,请谨慎操作', '提示', { this.$confirm('是否确定删除当前客服?该操作不可恢复,请谨慎操作', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="showDialog = false">取 消</el-button> <el-button @click="showDialog = false">取 消</el-button>
<el-button type="primary" @click="submitFn">确定</el-button> <el-button type="primary" v-loading="loading" @click="submitFn">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -100,6 +100,7 @@ ...@@ -100,6 +100,7 @@
}, },
data () { data () {
return { return {
loading: false,
clipboard:null, clipboard:null,
loading: false, loading: false,
list: [], list: [],
...@@ -218,16 +219,19 @@ ...@@ -218,16 +219,19 @@
submitFn () { submitFn () {
this.$refs['form'].validate(validate => { this.$refs['form'].validate(validate => {
if (validate) { if (validate) {
this.loading = true
if (this.state === '新建') { if (this.state === '新建') {
addScene(this.form).then(res => { addScene(this.form).then(res => {
this.$message.success('新建成功!') this.$message.success('新建成功!')
this.showDialog = false this.showDialog = false
this.loading = false
this.getData() this.getData()
}) })
} else { } else {
editScene(this.form).then(res => { editScene(this.form).then(res => {
this.$message.success('编辑成功!') this.$message.success('编辑成功!')
this.showDialog = false this.showDialog = false
this.loading = false
this.getData() this.getData()
}) })
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!