1、编码规则增加显示所有者列,高级查询中增加所有者;
2、用户管理界面添加停用启用按钮。
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const updateUserStatus = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-user/updateUserStatus', |
| | | method: 'post', |
| | | data: params |
| | | }) |
| | | } |
| | |
| | | // searchSpan: 5, |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "所有者", |
| | | prop: "ownerText", |
| | | display: false, |
| | | }, |
| | | ] |
| | | } |
| | |
| | | if (JSON.stringify(conditionMaps) != "{}") { |
| | | if (this.advancedQueryParam.currentOpen == "codeRule") { |
| | | this.query = conditionMaps; |
| | | // console.log(this.query); |
| | | this.onLoad(this.page); |
| | | } else { |
| | | this.sendGridCodeBasicSec(conditionMaps, true); |
| | |
| | | queryField: "lcStatus", |
| | | comboxKey: "codeSearchLCStatus", |
| | | }, |
| | | { |
| | | data: [], |
| | | title: "所有者", |
| | | fieldType: "text", |
| | | queryField: "ownerText", |
| | | }, |
| | | ]; |
| | | } else { |
| | | this.advancedQueryParam.options = [ |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | gridCodeRule(page.currentPage, page.pageSize, params).then((res) => { |
| | | gridCodeRule( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign({},params,this.query), |
| | | ).then((res) => { |
| | | //console.log(res.data); |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | |
| | | 配置密码策略 |
| | | </el-button> |
| | | <el-button v-if="userInfo.role_name.includes('admin')" |
| | | icon="el-icon-coordinate" |
| | | plain |
| | | size="small" |
| | | type="info" |
| | | @click="handleLock">账号解封 |
| | | icon="el-icon-coordinate" |
| | | plain |
| | | size="small" |
| | | type="info" |
| | | @click="handleLock">账号解封 |
| | | </el-button> |
| | | <el-button v-if="userInfo.role_name.includes('admin')" |
| | | icon="el-icon-upload2" |
| | | plain |
| | | size="small" |
| | | type="success" |
| | | @click="handleImport">导入 |
| | | icon="el-icon-upload2" |
| | | plain |
| | | size="small" |
| | | type="success" |
| | | @click="handleImport">导入 |
| | | </el-button> |
| | | <el-button v-if="userInfo.role_name.includes('admin')" |
| | | icon="el-icon-download" |
| | | plain |
| | | size="small" |
| | | type="warning" |
| | | @click="handleExport">导出 |
| | | icon="el-icon-download" |
| | | plain |
| | | size="small" |
| | | type="warning" |
| | | @click="handleExport">导出 |
| | | </el-button> |
| | | <el-button size="small" |
| | | type="warning" |
| | | icon="el-icon-setting" |
| | | @click="updateUserStatus"> |
| | | 账号停/启用 |
| | | </el-button> |
| | | </template> |
| | | <template slot="tenantName" |
| | |
| | | node-key="id" |
| | | show-checkbox> |
| | | </el-tree> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="roleBox = false">取 消</el-button> |
| | | <el-button type="primary" |
| | |
| | | </el-dialog> |
| | | <!-- 设置密码策略弹出框--> |
| | | <el-dialog |
| | | :before-close="handleClose" |
| | | :visible.sync="passVisible" |
| | | class="passdialog" |
| | | append-to-body |
| | |
| | | updatePlatform, |
| | | add, |
| | | grant, |
| | | resetPassword, unlock |
| | | resetPassword, |
| | | unlock, |
| | | updateUserStatus |
| | | } from "@/api/system/user"; |
| | | import {exportBlob} from "@/api/common"; |
| | | import {getDeptTree, getDeptLazyTree, updateUserStatus} from "@/api/system/dept"; |
| | | import {getDeptTree, getDeptLazyTree} from "@/api/system/dept"; |
| | | import {getRoleTree} from "@/api/system/role"; |
| | | import {getPostList} from "@/api/system/post"; |
| | | import {mapGetters} from "vuex"; |
| | |
| | | message: "请选择用户平台", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "状态", |
| | | display: false, |
| | | sortable:true, |
| | | html:true, |
| | | prop: "userStatus", |
| | | formatter : function (row, column) { |
| | | return row.userStatus == 0 ? '<i class="el-icon-check" style="color: #32cd32;font-size: 20px;font-weight: 800"></i>' : '<i class="el-icon-close" style="color: #ff0000;font-size: 20px;font-weight: 800"></i>' |
| | | } |
| | | }, |
| | | ], |
| | | group: [ |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | updateUserStatus({userid:'1702600796324032513',status:true}).then(res=>{ |
| | | console.log(res) |
| | | }) |
| | | this.selecload() |
| | | const arr=JSON.parse(localStorage.getItem("updataid")) |
| | | if(arr.user_id != '0' && arr.tenant_id !== '000000'){ |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | beOpen(done,type){ |
| | | console.log(done,type) |
| | | |
| | | // beOpen(done,type){ |
| | | // console.log(done,type) |
| | | // }, |
| | | // 用户停用启用状态 |
| | | /** 修改用户状态 */ |
| | | updateUserStatus(){ |
| | | let list = this.selectionList; |
| | | if(func.isEmpty(list)){ |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "请至少选择一条用户数据!" |
| | | }); |
| | | return; |
| | | } |
| | | if(func.isAttrInconsistent(list,"userStatus")){ |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "批量操作用户状态时,请选择用户状态一致的数据!" |
| | | }); |
| | | return; |
| | | } |
| | | let userIds = func.joinedString(list,"id"); |
| | | let status = list[0].userStatus == 1 ? true:false; |
| | | updateUserStatus(userIds,status).then(res=>{ |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.onLoad(this.page); |
| | | }) |
| | | }, |
| | | //esc取消键操作 |
| | | handleClose(done) { |
| | | /*handleClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | .then(() => { |
| | | done(); |
| | |
| | | done(); |
| | | }); |
| | | |
| | | }, |
| | | },*/ |
| | | //点击配置密码策略 |
| | | handlepass(){ |
| | | if (this.selectionList.length === 0) { |
| | |
| | | */ |
| | | private String basicSecTypes; |
| | | |
| | | /** |
| | | * 所有者在界面显示内容(账号(用户名)) |
| | | */ |
| | | private String ownerText; |
| | | |
| | | } |
| | |
| | | */ |
| | | private Long strategyUpdateStatus; |
| | | |
| | | /*** |
| | | /** |
| | | * 账号是否停用 0为启用,1为停用 |
| | | */ |
| | | private Integer userStatus; |
| | |
| | | * 拓展信息 |
| | | */ |
| | | private String userExt; |
| | | |
| | | /*** |
| | | * 账号是否停用 0为启用,1为启用 |
| | | */ |
| | | private Integer userStatus; |
| | | |
| | | /*** |
| | | * 账号是否停用 0为启用,1为启用 |
| | | */ |
| | | private String userStatus_text; |
| | | private String userStatusText; |
| | | } |
| | |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.WebUtil; |
| | | import com.vci.ubcs.system.cache.NacosConfigCache; |
| | | import com.vci.ubcs.system.entity.Strategy; |
| | | import com.vci.ubcs.system.feign.ISysClient; |
| | | import com.vci.ubcs.system.user.entity.User; |
| | | import com.vci.ubcs.system.user.feign.IUserClient; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | |
| | | private ICodeFixedValueService codeFixedValueService; |
| | | |
| | | /** |
| | | * 系统服务 |
| | | */ |
| | | @Resource |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @param conidtionMap |
| | |
| | | @Override |
| | | public IPage<CodeRuleVO> gridCodeRule(Query query, Map<String,Object> conidtionMap) throws VciBaseException { |
| | | //如果等于自己配置的管理组租户id和管理组超管账号,就不需要按照规则所有者来进行查询 |
| | | if(!(AuthUtil.getTenantId().equals(NacosConfigCache.getAdminUserInfo().getTenantId()) |
| | | /*if(!(AuthUtil.getTenantId().equals(NacosConfigCache.getAdminUserInfo().getTenantId()) |
| | | && AuthUtil.getUserId().toString().equals(NacosConfigCache.getAdminUserInfo().getUserId().toString())) |
| | | ){ |
| | | // 按照规则所有者来查询 |
| | | conidtionMap.put("owner",AuthUtil.getUserId().toString()); |
| | | } |
| | | }*/ |
| | | IPage<CodeRule> codeRuleIPage = this.codeRuleMapper.selectPage(Condition.getPage(query), UBCSCondition.getQueryWrapper(conidtionMap, CodeRule.class)); |
| | | //do转vo同时setLcStatusText生命周期值,并包装成分页对象返回 |
| | | return CodeRuleWrapper.build().pageVO(codeRuleIPage); |
| | |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(codeRule, MdmBtmTypeConstant.CODE_RULE); |
| | | codeRule.setLctid(CODE_RULE_LC); |
| | | codeRule.setLcStatus(FRAMEWORK_RELEASE_EDITING); |
| | | codeRule.setOwnerText(AuthUtil.getUserAccount()+"("+AuthUtil.getNickName()+")"); |
| | | return R.status(codeRuleMapper.insert(codeRule)>0); |
| | | } |
| | | |
| | |
| | | revisionModelUtil.copyFromDTOIgnore(codeRuleDTO, codeRule); |
| | | if(!codeRule.getOwner().equals(codeRuleDTO.getOwner())){ |
| | | codeRule.setOwner(codeRuleDTO.getOwner()); |
| | | R<User> userR = userClient.userInfoById(Func.toLong(codeRuleDTO.getOwner())); |
| | | if(!userR.isSuccess() || Func.isEmpty(userR.getData())){ |
| | | codeRule.setOwnerText(codeRuleDTO.getOwner()); |
| | | }else{ |
| | | codeRule.setOwnerText(userR.getData().getAccount()+"("+userR.getData().getRealName()+")"); |
| | | } |
| | | } |
| | | DefaultAttrAssimtUtil.updateDefaultAttrAssimt(codeRule); |
| | | return R.status(codeRuleMapper.updateById(codeRule)>0); |
| | |
| | | |
| | | @PostMapping("/save") |
| | | public R saveConfig(@RequestBody MdmCountConfigVO mdmCountConfigVO){ |
| | | return R.status(countConfigService.saveMdmCountConfig(mdmCountConfigVO)); |
| | | return countConfigService.saveMdmCountConfig(mdmCountConfigVO); |
| | | } |
| | | |
| | | |
| | |
| | | * @param mdmCountConfigVO |
| | | * @return |
| | | */ |
| | | boolean saveMdmCountConfig(MdmCountConfigVO mdmCountConfigVO); |
| | | R saveMdmCountConfig(MdmCountConfigVO mdmCountConfigVO); |
| | | |
| | | /** |
| | | * 获取当前用户有那些主数据统计配置在首页 |
| | |
| | | import com.vci.ubcs.system.vo.MdmCountConfigVO; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean saveMdmCountConfig(MdmCountConfigVO mdmCountConfigVO) throws ServiceException{ |
| | | public R saveMdmCountConfig(MdmCountConfigVO mdmCountConfigVO) throws ServiceException{ |
| | | if(Func.isEmpty(mdmCountConfigVO) || Func.isBlank(mdmCountConfigVO.getUserId().toString())){ |
| | | throw new ServiceException("主数据统计配置保存时缺少必填参数!"); |
| | | } |
| | | boolean res = false; |
| | | if (mdmCountConfigVO.getMdmNameList().isEmpty()) { |
| | | return true; |
| | | if(mdmCountConfigVO.getMdmNameList().isEmpty()) { |
| | | return R.status(false); |
| | | } |
| | | if(mdmCountConfigVO.getMdmNameList().size() > 7){ |
| | | return R.fail("显示的主数据配置项最多为8项"); |
| | | } |
| | | boolean res = false; |
| | | try { |
| | | String mdmNames = mdmCountConfigVO.getMdmNameList().stream().collect(Collectors.joining(",")); |
| | | MdmCountConfig mdmCountConfigDB = getMdmCountConfig(mdmCountConfigVO.getUserId().toString()); |
| | |
| | | }catch (Exception e){ |
| | | throw new ServiceException("配置保存失败,原因:"+e.getCause()); |
| | | } |
| | | return res; |
| | | return R.status(res); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取到指定身份权限的用户列表 |
| | | * 修改用户状态 停用/启用 |
| | | * @param userIds userId集合 |
| | | * @param status 停用/启用 true:启用,false:停用 |
| | | * @param status 停用/启用; true:启用,false:停用 |
| | | * @return |
| | | */ |
| | | @PostMapping("/updateUserStatus") |
| | | @ApiOperationSupport(order = 21) |
| | | @ApiOperation(value = "获取到指定身份权限的用户列表", notes = "传入userId集合") |
| | | public R<Boolean> updateUserStatus(String userIds,boolean status){ |
| | | public R<Boolean> updateUserStatus(@Valid @RequestParam("userIds") String userIds,boolean status){ |
| | | if (StringUtil.isBlank(userIds)) { |
| | | return R.fail("请至少选择一个用户"); |
| | | } |
| | | return R.status(userService.updateUserStatus(userIds,status)); |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateUserStatus(String userIds, boolean status) { |
| | | Integer user_status=0; |
| | | Integer userStatus = 0; |
| | | if(!status){ |
| | | user_status=1; |
| | | userStatus = 1; |
| | | } |
| | | return this.update(Wrappers.<User>lambdaUpdate().in(User::getId, Func.toLongList(userIds)).set(User::getUserStatus,user_status)); |
| | | return this.update(Wrappers.<User>lambdaUpdate().in(User::getId, Func.toLongList(userIds)).set(User::getUserStatus,userStatus)); |
| | | } |
| | | |
| | | /** |
| | |
| | | userVO.setSexName(DictCache.getValue(DictEnum.SEX, user.getSex())); |
| | | userVO.setUserTypeName(DictCache.getValue(DictEnum.USER_TYPE, user.getUserType())); |
| | | userVO.setUserStatus(user.getUserStatus()); |
| | | userVO.setUserStatus_text(DictCache.getValue(DictEnum.USER_STATUS,user.getUserStatus()));//用户状态 |
| | | userVO.setUserStatusText(DictCache.getValue(DictEnum.USER_STATUS,user.getUserStatus()));//用户状态 |
| | | return userVO; |
| | | } |
| | | |
| | | } |