| | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.portal.data.PLUILayout; |
| | | import com.vci.dto.OsBtmTypeDTO; |
| | | import com.vci.dto.RoleRightDTO; |
| | | import com.vci.dto.UIAuthorDTO; |
| | | import com.vci.pagemodel.PLUILayoutCloneVO; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.Tree; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.OsBtmServiceI; |
| | | import com.vci.web.service.UIManagerServiceI; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * UI定义控制层 |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据角色获取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 selectTreeList 勾选的需要保存的数据对象 |
| | | * @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); |
| | | } |
| | | } |
| | | } |