Commit a963bda2 by 姜鹏凯

update

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