| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="userInfo.usertype" label="用户类型" width="90" /> |
| | | <el-table-column fixed="right" align="right" label="操作" width="140"> |
| | | <el-table-column fixed="right" align="right" label="操作" width="160"> |
| | | <template #header> |
| | | <el-button |
| | | icon="DocumentAdd" |
| | |
| | | @click="editRow(scope)" |
| | | >查看</el-button |
| | | > |
| | | <!-- <el-button |
| | | <el-button |
| | | :loading="scope.row.loading2" |
| | | :type="scope.row.extension1 != '0' ? 'danger' : 'primary'" |
| | | :type="scope.row.userInfo.isenable != '0' ? 'danger' : 'primary'" |
| | | size="small" |
| | | @click="itemActive(scope)" |
| | | >{{ scope.row.extension1 != '0' ? '下线' : '上线' }}</el-button |
| | | > --> |
| | | >{{ scope.row.userInfo.isenable != '0' ? '下线' : '上线' }}</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | }, |
| | | editRow(scope) { |
| | | scope.row.loading1 = true; |
| | | this.loadingStore.loadingStatus.push(() => (scope.row.loading1 = false)); |
| | | this.$router.push(`userEdit/${scope.row.biGuid}`); |
| | | this.loadingStore.pushLoading(() => (scope.row.loading1 = false)); |
| | | this.$router.push(`userEdit/${scope.row.userInfo.guid}`); |
| | | }, |
| | | itemActive(scope) { |
| | | const rb = {}; |
| | | rb.guid = scope.row.guid; |
| | | rb.extension1 = scope.row.extension1 != '0' ? '0' : '1'; |
| | | const msg = scope.row.extension1 != '0' ? '下线' : '上线'; |
| | | const param = { |
| | | guid: scope.row.userInfo.guid, |
| | | isenable: !scope.row.userInfo.isenable |
| | | } |
| | | const msg = scope.row.userInfo.isenable ? '下线' : '上线'; |
| | | useMessageBoxTip({ |
| | | confirmMsg: `确认${msg}该场景?`, |
| | | confirmTitle: msg, |
| | | onConfirm: () => { |
| | | scope.row.loading2 = true; |
| | | return userApi |
| | | .updateScene(rb) |
| | | .updateUserInfo(param) |
| | | .then((res) => { |
| | | if (res == 1) { |
| | | scope.row.extension1 = rb.extension1; |
| | | if (res.success) { |
| | | scope.row.userInfo.isenable = param.isenable; |
| | | } |
| | | }) |
| | | .finally(() => { |