Merge remote-tracking branch 'origin/master'
| | |
| | | params: params |
| | | }) |
| | | } |
| | | // 分类授权 |
| | | export const batchAddSave = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/codeApplyWebManagementController/batchAddSave', |
| | | method: 'post', |
| | | params: params |
| | | }) |
| | | } |
| | |
| | | |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog :visible.sync="dialogVisible" append-to-body class="avue-dialog avue-dialog--top" title="分类授权" top="-10"> |
| | | <el-dialog :visible.sync="dialogVisible" append-to-body class="avue-dialog avue-dialog--top" title="分类授权" top="-50px"> |
| | | |
| | | <el-row> |
| | | <el-col :span="10"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <div slot="footer" class="dialog-footer" style="height: 50px;line-height: 50px"> |
| | | <el-button type="primary" icon="el-icon-plus" size="small">授 权</el-button> |
| | | <el-button type="primary" icon="el-icon-plus" size="small" @click="empower">授 权</el-button> |
| | | <el-button icon="el-icon-close" size="small" type="danger">重 置</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | <script> |
| | | import {getSysInfoList, sysInfoAdd, sysInfoEdit, sysInfoDel, sysInfoTree} from '@/api/integration/sysInfo.js' |
| | | import {getSysInfoList, sysInfoAdd, sysInfoEdit, sysInfoDel, sysInfoTree,batchAddSave} from '@/api/integration/sysInfo.js' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | checkAll:[], |
| | | //避免缓存 |
| | | reload: Math.random(), |
| | | TreeLoading: false, |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | empower(){ |
| | | batchAddSave({systemOid: this.checkAll.oid, systemId: this.checkAll.id}).then(res=>{ |
| | | console.log(res) |
| | | }) |
| | | }, |
| | | //分类授权多选回调 |
| | | checkChange(row,checked) { |
| | | // console.log(row) |
| | | // if(checked){ |
| | | // |
| | | // } |
| | | if(checked){ |
| | | // console.log('row',row) |
| | | this.checkAll.push(row); |
| | | console.log('checkAll',this.checkAll) |
| | | } |
| | | }, |
| | | //分类授权 |
| | | classifyHandler(row) { |
| | |
| | | }, |
| | | // enter搜索 |
| | | handleEnter() { |
| | | if (this.search[this.selectValue] === '') return |
| | | else this.getDataList() |
| | | |
| | | this.getDataList() |
| | | }, |
| | | // 输入框清空 |
| | | handleClear() { |
| | |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | return R.success("查询成功"); |
| | | } |
| | | |
| | | /** |
| | | * 接口程序授权管理中分类授权功能 |
| | | * @param list 授权选中的数据 |
| | | * @param systemOid 系统的oid |
| | | * @param systemId 系统的id |
| | | * @return |
| | | */ |
| | | @PostMapping( "/batchAddSave") |
| | | public R batchAddSave(@RequestBody List<SystemClassifyRole> list,String systemOid,String systemId){ |
| | | return codeApplyWebManagementService.batchAddSave(list,systemOid,systemId); |
| | | // return R.success("dddd"); |
| | | } |
| | | |
| | | /** |
| | | * 编码分类树查询接口 |
| | | * @param systemOid 系统的oid |
| | | * @param systemId 系统的id |
| | | * @return |
| | | */ |
| | | @GetMapping("/getSystemClassifyRoleTree") |
| | | public List<Tree> getSystemClassifyRoleTree(String systemOid,String systemId){ |
| | | return codeApplyWebManagementService.getSystemClassifyRoleTree(systemOid,systemId); |
| | | } |
| | | |
| | | /** |
| | | * 编码分类树查询接口 |
| | | * @param paramMap systemOid系统的oid,systemId系统的id |
| | | * @return |
| | | */ |
| | | @GetMapping("/getAuthTree") |
| | | public List<Tree> getAuthTree(@RequestParam HashMap<String,String> paramMap){ |
| | | return codeApplyWebManagementService.getAuthTree(paramMap); |
| | | } |
| | | } |
| | |
| | | universalInterfaceI.setThreadLocal(threadLocal); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import org.springframework.web.servlet.mvc.support.RedirectAttributes; |
| | | import org.springframework.web.servlet.view.RedirectView; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.ServletException; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.servlet.http.HttpSession; |
| | | |
| | | import java.io.IOException; |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @GetMapping("/ssoLogin") |
| | | public String oaSsoLogin(HttpServletRequest request) throws IOException { |
| | | public String oaSsoLogin(HttpServletRequest request,HttpServletResponse response, RedirectAttributes redirectAttributes) throws IOException, ServletException { |
| | | String token; |
| | | try { |
| | | token = passwordFreeLoginService.ssoFreeLogin(request); |
| | | }catch (Exception e){ |
| | | throw new ServiceException("单点登录获取token失败:"+e.getMessage()); |
| | | } |
| | | // response.setHeader("tokenInfo",token); |
| | | // response.setCharacterEncoding("utf-8"); |
| | | // response.setContentType("application/json"); |
| | | request.setAttribute("tokenInfo",token); |
| | | //response.sendRedirect(ssoRedirectAddr); |
| | | return "forward:/sso"; |
| | | redirectAttributes.addFlashAttribute("tokenInfo",token); |
| | | return "redirect:"+ssoRedirectAddr; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import org.springblade.core.tool.api.R; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | public interface ICodeApplyWebManagementService extends IService<SystemClassifyRole> { |
| | | R batchAddSave(List<SystemClassifyRole> list,String systemOid,String systemId); |
| | | |
| | | List<Tree> getSystemClassifyRoleTree(String systemOid, String systemId); |
| | | |
| | | List<Tree> getAuthTree(HashMap<String, String> paramMap); |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | |
| | | }); |
| | | return tree; |
| | | } |
| | | |
| | | @Override |
| | | public List<Tree> getAuthTree(HashMap<String, String> paramMap) { |
| | | QueryWrapper<SystemClassifyRole> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("systemOid",paramMap.get("systemOid")); |
| | | wrapper.eq("systemId",paramMap.get("systemId")); |
| | | |
| | | return null; |
| | | } |
| | | } |
| | |
| | | @Override |
| | | public String ssoFreeLogin(ServletRequest servletRequest) throws Exception { |
| | | HttpServletRequest request = (HttpServletRequest) servletRequest; |
| | | // String content = request.getHeader("empCode"); |
| | | String content = "test"; |
| | | // String empCode = Func.isEmpty(request.getHeader("empCode")) ? request.getParameter("empCode"):request.getHeader("empCode"); |
| | | String empCode = "test"; |
| | | // if(Func.isBlank(content)){ |
| | | // throw new ServiceException("未获取到empCode参数"); |
| | | // } |
| | | //加密 |
| | | String str1 = aesEncrypt(content, clientId); |
| | | String str1 = aesEncrypt(empCode, clientId); |
| | | String str2 = aesEncrypt(str1, secretKey); |
| | | |
| | | String enStr1 = aesDecrypt(str2, secretKey); |
| | |
| | | pc.SYSTEMID, |
| | | p.oid CLASSIFYOID, |
| | | p.id CLASSIFYID, |
| | | case when pc.selected is null then false else pc.SELECTED end SELECTED, |
| | | case when pc.selected is null then false when pc.selected = 0 then false else pc.SELECTED end SELECTED, |
| | | p.PARENTCODECLASSIFYOID CLASSPARENTOID |
| | | from PL_CODE_CLASSIFY p , |
| | | PL_CODE_SYSTEM_CLASSIFY_ROLE pc |