|
|
@ -106,7 +106,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import util from '../../common/js/util' |
|
|
|
import NProgress from 'nprogress' |
|
|
|
//import NProgress from 'nprogress' |
|
|
|
import { getUserListPage, removeUser, batchRemoveUser, editUser, addUser } from '../../api/api'; |
|
|
|
|
|
|
|
export default { |
|
|
@ -172,12 +172,12 @@ |
|
|
|
name: this.filters.name |
|
|
|
}; |
|
|
|
this.listLoading = true; |
|
|
|
NProgress.start(); |
|
|
|
//NProgress.start(); |
|
|
|
getUserListPage(para).then((res) => { |
|
|
|
this.total = res.data.total; |
|
|
|
this.users = res.data.users; |
|
|
|
this.listLoading = false; |
|
|
|
NProgress.done(); |
|
|
|
//NProgress.done(); |
|
|
|
}); |
|
|
|
}, |
|
|
|
//删除 |
|
|
@ -186,13 +186,12 @@ |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.listLoading = true; |
|
|
|
NProgress.start(); |
|
|
|
//NProgress.start(); |
|
|
|
let para = { id: row.id }; |
|
|
|
removeUser(para).then((res) => { |
|
|
|
this.listLoading = false; |
|
|
|
NProgress.done(); |
|
|
|
this.$notify({ |
|
|
|
title: '成功', |
|
|
|
//NProgress.done(); |
|
|
|
this.$message({ |
|
|
|
message: '删除成功', |
|
|
|
type: 'success' |
|
|
|
}); |
|
|
@ -224,14 +223,13 @@ |
|
|
|
if (valid) { |
|
|
|
this.$confirm('确认提交吗?', '提示', {}).then(() => { |
|
|
|
this.editLoading = true; |
|
|
|
NProgress.start(); |
|
|
|
//NProgress.start(); |
|
|
|
let para = Object.assign({}, this.editForm); |
|
|
|
para.birth = (!para.birth || para.birth == '') ? '' : util.formatDate.format(new Date(para.birth), 'yyyy-MM-dd'); |
|
|
|
editUser(para).then((res) => { |
|
|
|
this.editLoading = false; |
|
|
|
NProgress.done(); |
|
|
|
this.$notify({ |
|
|
|
title: '成功', |
|
|
|
//NProgress.done(); |
|
|
|
this.$message({ |
|
|
|
message: '提交成功', |
|
|
|
type: 'success' |
|
|
|
}); |
|
|
@ -249,14 +247,13 @@ |
|
|
|
if (valid) { |
|
|
|
this.$confirm('确认提交吗?', '提示', {}).then(() => { |
|
|
|
this.addLoading = true; |
|
|
|
NProgress.start(); |
|
|
|
//NProgress.start(); |
|
|
|
let para = Object.assign({}, this.addForm); |
|
|
|
para.birth = (!para.birth || para.birth == '') ? '' : util.formatDate.format(new Date(para.birth), 'yyyy-MM-dd'); |
|
|
|
addUser(para).then((res) => { |
|
|
|
this.addLoading = false; |
|
|
|
NProgress.done(); |
|
|
|
this.$notify({ |
|
|
|
title: '成功', |
|
|
|
//NProgress.done(); |
|
|
|
this.$message({ |
|
|
|
message: '提交成功', |
|
|
|
type: 'success' |
|
|
|
}); |
|
|
@ -278,13 +275,12 @@ |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.listLoading = true; |
|
|
|
NProgress.start(); |
|
|
|
//NProgress.start(); |
|
|
|
let para = { ids: ids }; |
|
|
|
batchRemoveUser(para).then((res) => { |
|
|
|
this.listLoading = false; |
|
|
|
NProgress.done(); |
|
|
|
this.$notify({ |
|
|
|
title: '成功', |
|
|
|
//NProgress.done(); |
|
|
|
this.$message({ |
|
|
|
message: '删除成功', |
|
|
|
type: 'success' |
|
|
|
}); |
|
|
|