| | |
| | | <el-table-column label="操作" align="conter"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="medium" @click="details(scope.row)">编辑</el-button> |
| | | <el-button type="text" size="medium" @click="reset(scope.row.id)">重置密码</el-button> |
| | | <el-button type="text" size="medium" @click="remove(scope.row.id)" style="color:#ff0000">删除 |
| | | <!-- <el-button type="text" size="medium" @click="reset(scope.row.id)">重置密码</el-button>--> |
| | | <!-- <el-button type="text" size="medium" @click="remove(scope.row.id)" style="color:#ff0000">删除--> |
| | | <el-button type="text" size="medium" @click="updateStatus(scope.row.id,scope.row.status)">{{scope.row.status==1?"禁用":"启用"}} |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | }, |
| | | methods: |
| | | { |
| | | //删除 |
| | | remove(val) { |
| | | //更新用户状态 |
| | | updateStatus(id,status) { |
| | | var _this = this; |
| | | this.$confirm('确认删除?').then(() => { |
| | | _this.$http.delete('/api/user', { params: { id: val } }).then(res => { |
| | | this.$confirm('确认修改账户状态吗?').then(() => { |
| | | _this.$http.get('/api/user/status', { params: { id: id ,status:status} }).then(res => { |
| | | _this.$message({ |
| | | message: '删除成功', |
| | | message: '修改成功', |
| | | type: 'success' |
| | | }) |
| | | this.search(); |
| | |
| | | ::v-deep(.el-table thead) { |
| | | color: #000000; |
| | | } |
| | | </style> |
| | | </style> |