| | |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="启用" min-width="5"> |
| | | <template slot-scope="scope"> |
| | | <el-switch class="switchStyle" v-model="scope.row.status" active-text="开" inactive-text="关" |
| | | active-color="#3fef9a" inactive-color="#000212" @change="handleChangeStatus(scope.row)"> |
| | | <!-- active-text="开" inactive-text="关" --> |
| | | <el-switch class="switchStyle" v-model="scope.row.status" |
| | | active-color="#3fef9a" inactive-color="#000212" disabled> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <!-- <span>删除</span> --> |
| | | <span @click="handleUpdate(scope.row)">权限设置</span> |
| | | <span class="line">|</span> |
| | | <span @click="handleStop(scope.row)">停用</span> |
| | | <span @click="handleChangeStatus(scope.row)">{{scope.row.status === true ?'停用':'启用' }}</span> |
| | | <span class="line">|</span> |
| | | <span @click="handleDelete([scope.row.id])">删除</span> |
| | | </div> |
| | |
| | | // 修改用户状态 |
| | | handleChangeStatus(obj) { |
| | | let { id, status } = obj; |
| | | status == true ? status = 1 : status = 0; |
| | | console.log(id, status); |
| | | status == true ? status = 0 : status = 1; |
| | | this.$axios.post(`/sccg/role/updateStatus/` + id + '?status=' + status).then(res => { |
| | | console.log(res); |
| | | if(res.code ===200){ |
| | | this.search(); |
| | | } |
| | | }) |
| | | }, |
| | | handleStop(obj) { |
| | | // let { id, status } = obj; |
| | | // status == true ? status = 1 : status = 0; |
| | | // console.log(id, status); |
| | | // this.$axios.post(`/sccg/role/updateStatus/` + id + '?status=' + status).then(res => { |
| | | // this.getUserList(); |
| | | // }) |
| | | }, |
| | | // 获取用户列表 |
| | | getUserList() { |
| | |
| | | .then(_ => { |
| | | this.dialogUpdate = false; |
| | | this.dialogCreate = false; |
| | | this.updateFlag = false; |
| | | done(); |
| | | }) |
| | | .catch(_ => { }); |