|
@@ -74,10 +74,11 @@
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="btn">
|
|
<div class="btn">
|
|
|
- <el-button type="success" @click="edit(item)" plain
|
|
|
|
|
|
|
+ <el-button type="success" @click="edit(item)" plain size='small'
|
|
|
>用户编辑</el-button
|
|
>用户编辑</el-button
|
|
|
>
|
|
>
|
|
|
<el-button
|
|
<el-button
|
|
|
|
|
+ size='small'
|
|
|
v-if="item.user_have_type == '1'"
|
|
v-if="item.user_have_type == '1'"
|
|
|
type="success"
|
|
type="success"
|
|
|
@click="allotEquip(item.id, item.username)"
|
|
@click="allotEquip(item.id, item.username)"
|
|
@@ -85,6 +86,15 @@
|
|
|
>分配设备</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
|
|
|
|
|
+ size='small'
|
|
|
type="success"
|
|
type="success"
|
|
|
@click="resetPassword(item.id, item.username)"
|
|
@click="resetPassword(item.id, item.username)"
|
|
|
plain
|
|
plain
|
|
@@ -388,6 +398,37 @@ export default {
|
|
|
allotEquip(id,name){
|
|
allotEquip(id,name){
|
|
|
window.location.href = 'allot?uname='+name;
|
|
window.location.href = 'allot?uname='+name;
|
|
|
},
|
|
},
|
|
|
|
|
+ // 删除普通用户
|
|
|
|
|
+ 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;
|
|
@@ -519,12 +560,12 @@ export default {
|
|
|
justify-content: space-around;
|
|
justify-content: space-around;
|
|
|
button {
|
|
button {
|
|
|
// flex: 1;
|
|
// flex: 1;
|
|
|
- margin: 0 8px;
|
|
|
|
|
|
|
+ // margin: 0 8px;
|
|
|
border: 1px solid #17bb89;
|
|
border: 1px solid #17bb89;
|
|
|
color: #17bb89;
|
|
color: #17bb89;
|
|
|
- // border-radius: 4px;
|
|
|
|
|
- // font-size: 12px;
|
|
|
|
|
- // padding: 5px 5px;
|
|
|
|
|
|
|
+ // // border-radius: 4px;
|
|
|
|
|
+ // // font-size: 12px;
|
|
|
|
|
+ // // padding: 5px 5px;
|
|
|
background: #fff;
|
|
background: #fff;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
i {
|
|
i {
|