| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.portal.data.PLPageDefination; |
| | | import com.vci.corba.portal.data.PLTabPage; |
| | | import com.vci.corba.portal.data.PLUILayout; |
| | | import com.vci.dto.OsBtmTypeDTO; |
| | | import com.vci.dto.UIAuthorDTO; |
| | | import com.vci.pagemodel.PLUILayoutCloneVO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.OsBtmServiceI; |
| | | import com.vci.web.service.UIManagerServiceI; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.xml.crypto.Data; |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping( "/getTabByContextIdAndType") |
| | | @VciBusinessLog(operateName = "根据上下文ID和区域类型,按顺序获取当前区域的tab页") |
| | | public BaseResult<List<PLTabPage>> getTabByContextIdAndType(String contextId, int areaType){ |
| | | public BaseResult<DataGrid> getTabByContextIdAndType(String contextId, int areaType){ |
| | | try { |
| | | return BaseResult.dataList(uiManagerService.getTabByContextIdAndType(contextId,areaType)); |
| | | return BaseResult.dataGrid(uiManagerService.getTabByContextIdAndType(contextId,areaType)); |
| | | }catch (Exception e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "根据上下文ID和区域类型,按顺序获取当前区域的tab时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据角色获取UI/表单/按钮的权限. |
| | | * @param baseQueryObject |
| | | * @return |
| | | */ |
| | | @GetMapping( "/getUIAuthor") |
| | | @VciBusinessLog(operateName = "UI授权(树形结构)") |
| | | public BaseResult getUIAuthor(BaseQueryObject baseQueryObject){ |
| | | try { |
| | | return BaseResult.dataList( uiManagerService.getUIAuthor(baseQueryObject)); |
| | | }catch (Throwable e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "UI授权加载出现错误,原因:" + VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | return BaseResult.fail(exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | /*** |
| | | * @param uiAuthorDTO 勾选的需要保存的数据对象 |
| | | * @return |
| | | */ |
| | | @PostMapping( "/authorizedUI") |
| | | @VciBusinessLog(operateName = "UI授权") |
| | | public BaseResult authorizedUI(UIAuthorDTO uiAuthorDTO){ |
| | | try { |
| | | return uiManagerService.authorizedUI(uiAuthorDTO)?BaseResult.success("授权成功!"):BaseResult.fail("授权失败!"); |
| | | }catch (Throwable e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "UI授权出现错误,原因:" + VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | return BaseResult.fail(exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | } |