| | |
| | | <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="handleToManager(scope.row)">设为警员</el-button> |
| | | <el-button type="text" size="medium" @click="updateStatus(scope.row.id,scope.row.status)"> |
| | | {{ scope.row.status == 1 ? "禁用" : "启用" }} |
| | | </el-button> |
| | | <el-popconfirm |
| | | title="确定删除吗?" |
| | | @confirm="removeuser(scope.row.id)" |
| | | > |
| | | <el-button type="text" style="margin-left: 5px;color: red" slot="reference">删除</el-button> |
| | | </el-popconfirm> |
| | | |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import { |
| | | getPublicityList, |
| | | addPublicityList, |
| | | toManager |
| | | toManager, deleteUser |
| | | } from '@/api/User' |
| | | |
| | | |
| | |
| | | name: "User", |
| | | data() { |
| | | return { |
| | | |
| | | visible:false, |
| | | rules: { |
| | | nickName: [{ |
| | | required: true, |
| | |
| | | // ); |
| | | // } |
| | | // }, |
| | | |
| | | removeuser(id){ |
| | | console.log(id) |
| | | deleteUser(id).then(res=>{ |
| | | console.log(res) |
| | | this.init() |
| | | }) |
| | | }, |
| | | //编辑 |
| | | details(val) { |
| | | this.detailsVisible = true; |
| | |
| | | //查询 |
| | | search() { |
| | | let param = {} |
| | | param.current = this.queryInfo.current |
| | | param.realName = this.queryInfo.realName |
| | | param.nickName = this.queryInfo.nickName |
| | | param.size = this.queryInfo.size |