| | |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click.stop="rowDeleteHandler(row)">删除</el-button> |
| | | <el-button size="small" type="text" @click.stop="stopUserHandler(row)"> |
| | | <span v-if="row.status === 0" style="color: #fa3434"><i class="el-icon-video-pause"></i> 停用</span> |
| | | <span v-if="row.status === 1" style="color: #55b61d"><i class="el-icon-video-pause"></i> 启用</span> |
| | | <span v-if="row.status === 1" style="color: #55b61d"><i class="el-icon-video-play"></i> 启用</span> |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | |
| | | // 新增 |
| | | rowSaveHandler(row, done) { |
| | | rowSaveHandler(row, done,loading) { |
| | | if (row.password != row.confirmPassword) { |
| | | this.$message.error('请检查两次密码是否输入一致!') |
| | | return this.$refs.userCrud.$refs.dialogForm.$refs.tableForm.allDisabled = false; |
| | |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | done() |
| | | } |
| | | }).catch(err => { |
| | | loading() |
| | | console.log(err); |
| | | }) |
| | | done() |
| | | }, |
| | | |
| | | // 操作栏编辑 |
| | |
| | | }, |
| | | |
| | | // 编辑 |
| | | rowUpdateHandler(row, index, done) { |
| | | rowUpdateHandler(row, index, done,loading) { |
| | | if (row.password != row.confirmPassword) { |
| | | this.$message.error('请检查两次密码是否输入一致!') |
| | | return this.$refs.userCrud.$refs.dialogForm.$refs.tableForm.allDisabled = false; |
| | |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | done() |
| | | } |
| | | }).catch(err => { |
| | | loading() |
| | | console.log(err); |
| | | }); |
| | | done() |
| | | }, |
| | | |
| | | // 删除 |
| | |
| | | let params = { |
| | | ids: row.oid |
| | | } |
| | | |
| | | this.$confirm('您确定要删除当前的成员吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteUser(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | } |
| | | }).catch(err => { |
| | | console.log(err); |
| | | }) |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 多选删除 |