|
@@ -78,6 +78,14 @@
|
|
|
>用户编辑</el-button
|
|
>用户编辑</el-button
|
|
|
>
|
|
>
|
|
|
<el-button
|
|
<el-button
|
|
|
|
|
+ size='small'
|
|
|
|
|
+ v-if="item.user_have_type == '1'"
|
|
|
|
|
+ type="success"
|
|
|
|
|
+ @click="delUser(item.id, item.username)"
|
|
|
|
|
+ plain
|
|
|
|
|
+ >删除用户</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button
|
|
|
type="success"
|
|
type="success"
|
|
|
@click="resetPassword(item.id, item.username)"
|
|
@click="resetPassword(item.id, item.username)"
|
|
|
plain
|
|
plain
|
|
@@ -383,6 +391,37 @@ export default {
|
|
|
this.editUserForm.user_area = value[1];
|
|
this.editUserForm.user_area = value[1];
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ // 删除普通用户
|
|
|
|
|
+ delUser(id,name){
|
|
|
|
|
+ this.$confirm('删除用户, 是否继续?', '警告', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ this.$axios({
|
|
|
|
|
+ method: "POST",
|
|
|
|
|
+ url: "/del_user",
|
|
|
|
|
+ data: this.qs.stringify({
|
|
|
|
|
+ userid: id,
|
|
|
|
|
+ }),
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.data == 1) {
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'error',
|
|
|
|
|
+ message: res.data
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'info',
|
|
|
|
|
+ message: '已取消删除'
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
//密码重置
|
|
//密码重置
|
|
|
resetPassword(id, name) {
|
|
resetPassword(id, name) {
|
|
|
this.resetPassForm.id = id;
|
|
this.resetPassForm.id = id;
|