Commit 4965553f authored by liuyang's avatar liuyang

用户管理增删改查功能完成

parent db31f240
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
var userIds = id ? [id] : this.dataListSelections.map(item => { var userIds = id ? [id] : this.dataListSelections.map(item => {
return item.userId return item.id
}) })
this.$confirm(`确定对[id=${userIds.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', { this.$confirm(`确定对[id=${userIds.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -166,7 +166,9 @@ ...@@ -166,7 +166,9 @@
method: 'post', method: 'post',
data: this.$http.adornData(userIds, false) data: this.$http.adornData(userIds, false)
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 200) { if(data){
this.$message.error(data.message);
}else{
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
...@@ -175,9 +177,8 @@ ...@@ -175,9 +177,8 @@
this.getDataList() this.getDataList()
} }
}) })
} else {
this.$message.error(data.msg)
} }
}) })
}).catch(() => {}) }).catch(() => {})
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment