1、修改从其他规则克隆规则时排序号未重排的bug。
2、为密码策略管理、用户管理、部门管理界面增加按钮权限控制
| | |
| | | if (!this.tipsMessage(this.selectionBasicList)) { |
| | | return; |
| | | } |
| | | if (this.selectionBasicList[0].lcStatus != "Editing") { |
| | | if (this.selectionList.at(-1).lcStatus != "Editing") { |
| | | this.$message.warning('编码规则状态不是"编辑中",不允许删除码段!'); |
| | | return; |
| | | } |
| | |
| | | type="text" |
| | | size="small" |
| | | icon="el-icon-edit" |
| | | v-if="permission.password.password_edit" |
| | | v-if="permissionList.editBtn" |
| | | @click="handleEdit(row, index)" |
| | | > |
| | | 编辑 |
| | |
| | | type="text" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | v-if="permission.password.password_delete" |
| | | v-if="permissionList.delBtn" |
| | | @click="handleDel(row, index)" |
| | | > |
| | | 删除 |
| | |
| | | }, |
| | | computed:{ |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.password.password_add, false), |
| | | //viewBtn: this.vaildData(this.permission.password.user_view, false), |
| | | delBtn: this.vaildData(this.permission.password.password_delete, false), |
| | | editBtn: this.vaildData(this.permission.password.password_edit, false), |
| | | }; |
| | | }, |
| | | platformPermissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.password.password_add, false), |
| | | //viewBtn: this.vaildData(this.permission.password.user_view, false), |
| | | delBtn: this.vaildData(this.permission.password.password_delete, false), |
| | | editBtn: this.vaildData(this.permission.password.password_edit, false), |
| | | }; |
| | | }, |
| | | option(){ |
| | | return{ |
| | | headerAlign: 'center', |
| | |
| | | border: true, |
| | | index: true, |
| | | rowKey:'id', |
| | | addBtn:this.permission.password.password_add, |
| | | addBtn:this.permissionList.addBtn, |
| | | editBtn:false, |
| | | height:700, |
| | | delBtn:false, |
| | |
| | | }] |
| | | } |
| | | ], |
| | | |
| | | } |
| | | } |
| | | }, |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :page.sync="page" |
| | | :page.sync="page" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | ref="crud" |
| | |
| | | @on-load="onLoad" |
| | | @tree-load="treeLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | v-if="permission.dept_delete" |
| | | plain |
| | | @click="handleDelete">删 除 |
| | | <el-button v-if="permissionList.delBtn" |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | @click="handleDelete"> |
| | | 删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button |
| | | <el-button v-if="permissionList.addChildBtn" |
| | | type="text" |
| | | icon="el-icon-circle-plus-outline" |
| | | size="small" |
| | | @click.stop="handleAdd(scope.row,scope.index)" |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | >新增子项 |
| | | @click.stop="handleAdd(scope.row,scope.index)"> |
| | | 新增子项 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | |
| | | height:'auto', |
| | | maxHeight:600, |
| | | columnBtn:false, |
| | | // simplePage: true, |
| | | //simplePage: true, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | tree: true, |
| | |
| | | index: true, |
| | | selection: true, |
| | | viewBtn: true, |
| | | editBtn: true, |
| | | delBtn: true, |
| | | menuWidth: 300, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, //行选中时高亮 |
| | |
| | | data: [] |
| | | }; |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.dept_add, false), |
| | | viewBtn: this.vaildData(this.permission.dept_view, false), |
| | | delBtn: this.vaildData(this.permission.dept_delete, false), |
| | | editBtn: this.vaildData(this.permission.dept_edit, false) |
| | | addBtn: this.vaildData(this.permission.dept.dept_add, false), |
| | | viewBtn: this.vaildData(this.permission.dept.dept_view, false), |
| | | delBtn: this.vaildData(this.permission.dept.dept_delete, false), |
| | | editBtn: this.vaildData(this.permission.dept.dept_edit, false), |
| | | addChildBtn: this.vaildData(this.permission.dept.dept_add_child,false), |
| | | }; |
| | | }, |
| | | ids() { |
| | |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button v-if="permission.user_delete" |
| | | <el-button v-if="permissionList.delBtn" |
| | | icon="el-icon-delete" |
| | | plain |
| | | size="small" |
| | | type="danger" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | <el-button v-if="permission.user_role" |
| | | <el-button v-if="permissionList.roleBtn" |
| | | icon="el-icon-user" |
| | | plain |
| | | size="small" |
| | | type="info" |
| | | @click="handleGrant">角色配置 |
| | | </el-button> |
| | | <el-button v-if="permission.user_reset" |
| | | <el-button v-if="permissionList.resetBtn" |
| | | icon="el-icon-refresh" |
| | | plain |
| | | size="small" |
| | | type="info" |
| | | @click="handleReset">密码重置 |
| | | </el-button> |
| | | <el-button size="small" |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | <el-button v-if="permissionList.pwdStrategyBtn" |
| | | size="small" |
| | | type="success" |
| | | icon="el-icon-setting" |
| | | @click="handlepass"> |
| | | 配置密码策略 |
| | | </el-button> |
| | | <el-button v-if="userInfo.role_name.includes('admin')" |
| | | <el-button v-if="permissionList.unsealBtn" |
| | | icon="el-icon-coordinate" |
| | | plain |
| | | size="small" |
| | | type="info" |
| | | @click="handleLock">账号解封 |
| | | </el-button> |
| | | <el-button v-if="userInfo.role_name.includes('admin')" |
| | | <el-button v-if="permissionList.importBtn" |
| | | icon="el-icon-upload2" |
| | | plain |
| | | size="small" |
| | | type="success" |
| | | @click="handleImport">导入 |
| | | </el-button> |
| | | <el-button v-if="userInfo.role_name.includes('admin')" |
| | | <el-button v-if="permissionList.exportBtn" |
| | | icon="el-icon-download" |
| | | plain |
| | | size="small" |
| | | type="warning" |
| | | @click="handleExport">导出 |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button v-if="permissionList.deactEnBtn" |
| | | size="small" |
| | | type="warning" |
| | | icon="el-icon-setting" |
| | | @click="updateUserStatus"> |
| | |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | /* 下面这三个属性默认设置为true, |
| | | 实际根据permissionList中对照的属性进行控制的 */ |
| | | viewBtn: true, |
| | | editBtn: true, |
| | | delBtn: true, |
| | | dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, //行选中时高亮 |
| | |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | /** 按钮显示隐藏控制 */ |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.user.user_add, false), |
| | |
| | | unsealBtn: this.vaildData(this.permission.user.user_unseal,false), |
| | | }; |
| | | }, |
| | | platformPermissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.user.user_add, false), |
| | | viewBtn: this.vaildData(this.permission.user.user_view, false), |
| | | delBtn: this.vaildData(this.permission.user.user_delete, false), |
| | | editBtn: this.vaildData(this.permission.user.user_edit, false), |
| | | deactEnBtn: this.vaildData(this.permission.user.user_deact_en,false), |
| | | exportBtn: this.vaildData(this.permission.user.user_export,false), |
| | | pwdStrategyBtn: this.vaildData(this.permission.user.user_pwd_strategy,false), |
| | | importBtn: this.vaildData(this.permission.user.user_import,false), |
| | | resetBtn: this.vaildData(this.permission.user.user_reset,false), |
| | | roleBtn: this.vaildData(this.permission.user.user_role,false), |
| | | unsealBtn: this.vaildData(this.permission.user.user_unseal,false), |
| | | }; |
| | | }, |
| | | // platformPermissionList() { |
| | | // return { |
| | | // addBtn: this.vaildData(this.permission.user.user_add, false), |
| | | // viewBtn: this.vaildData(this.permission.user.user_view, false), |
| | | // delBtn: this.vaildData(this.permission.user.user_delete, false), |
| | | // editBtn: this.vaildData(this.permission.user.user_edit, false), |
| | | // deactEnBtn: this.vaildData(this.permission.user.user_deact_en,false), |
| | | // exportBtn: this.vaildData(this.permission.user.user_export,false), |
| | | // pwdStrategyBtn: this.vaildData(this.permission.user.user_pwd_strategy,false), |
| | | // importBtn: this.vaildData(this.permission.user.user_import,false), |
| | | // resetBtn: this.vaildData(this.permission.user.user_reset,false), |
| | | // roleBtn: this.vaildData(this.permission.user.user_role,false), |
| | | // unsealBtn: this.vaildData(this.permission.user.user_unseal,false), |
| | | // }; |
| | | // }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | |
| | | } |
| | | List<CodeBasicSec> createList = new ArrayList<>(); |
| | | List<CodeBasicSec> basicSecDOS = codeBasicSecMapper.selectBatchIds(oidList); |
| | | /* 需要注意的是克隆过来的码段需要对orderNum进行排序,否则会出现排序乱跳的情况 |
| | | 实现方式是查询出该规则下根据orderNum排序后的最后一个码段 */ |
| | | LambdaQueryWrapper<CodeBasicSec> lastBasicWrapper = Wrappers.<CodeBasicSec>query() |
| | | .lambda().orderByDesc(CodeBasicSec::getOrderNum) |
| | | .eq(CodeBasicSec::getPkCodeRule,pkCodeRule) |
| | | .last("limit 1"); |
| | | CodeBasicSec lastCodeBasicSec = codeBasicSecMapper.selectOne(lastBasicWrapper); |
| | | // 排序号从这儿开始排 |
| | | int orderNum = Func.isEmpty(lastCodeBasicSec.getOrderNum()) ? 0:lastCodeBasicSec.getOrderNum(); |
| | | if(basicSecDOS.isEmpty()){ |
| | | return R.fail("克隆的码段信息不存在!"); |
| | | } |
| | |
| | | String oldBasicOid = newSecDO.getOid(); |
| | | newSecDO.setId(newSecDO.getId()); |
| | | newSecDO.setName(newSecDO.getName()); |
| | | orderNum++; |
| | | newSecDO.setOrderNum(orderNum); |
| | | newSecDO.setPkCodeRule(pkCodeRule); |
| | | // 判断是否是分类码段,业务逻辑稍微复杂一点所以需要先提出来单独处理 |
| | | if(newSecDO.getSecType().equals(CodeSecTypeEnum.CODE_CLASSIFY_SEC.getValue())){ |