| | |
| | | import com.vci.web.enumpck.UIComponentTypeEnum; |
| | | import com.vci.web.enumpck.UIFieldTypeEnum; |
| | | import com.vci.web.enumpck.UILayoutAreaTypeEnum; |
| | | import com.vci.web.other.AllActionThreadLocal; |
| | | import com.vci.web.service.OsAttributeServiceI; |
| | | import com.vci.web.service.OsBtmServiceI; |
| | | import com.vci.web.service.UIEngineServiceI; |
| | |
| | | Map<String, OsAttributeVO> attributeVOMap; |
| | | if(pages != null && pages.size() > 0){ |
| | | attributeVOMap = attrService.selectAllAttributeMap(); |
| | | Map<String, UIActionVO> actionVOMap = AllActionThreadLocal.get(); |
| | | if(actionVOMap == null || actionVOMap.isEmpty()){ |
| | | actionVOMap = selectAllActionMap(); |
| | | AllActionThreadLocal.set(actionVOMap); |
| | | } |
| | | }else{ |
| | | attributeVOMap = null; |
| | | } |
| | |
| | | } |
| | | }); |
| | | } |
| | | AllActionThreadLocal.remove(); |
| | | return contentVOS; |
| | | } |
| | | |
| | |
| | | treeDefineVO.setBtmType(componentDefineXO.getShowType()); |
| | | treeDefineVO.setLinkType(componentDefineXO.getLinkType()); |
| | | treeDefineVO.setLoadType("1".equalsIgnoreCase(componentDefineXO.getExpandMode())?"node":"all"); |
| | | treeDefineVO.setOrientation("positive".equalsIgnoreCase(componentDefineXO.getOrientation())?false:true); |
| | | //TODO:这个属性现在由链接类型查询控制,不由页面定义控制了 |
| | | //treeDefineVO.setOrientation("positive".equalsIgnoreCase(componentDefineXO.getOrientation())?false:true); |
| | | treeDefineVO.setShowImage("1".equalsIgnoreCase(componentDefineXO.getIsShowImage())?true:false); |
| | | treeDefineVO.setRootContent(componentDefineXO.getRootContent()); |
| | | treeDefineVO.setFieldSep(StringUtils.isBlank(componentDefineXO.getSeparator())?",":componentDefineXO.getSeparator()); |
| | |
| | | public List<UIButtonDefineVO> buttonDO2VOs(Collection<com.vci.corba.portal.data.PLTabButton> buttons){ |
| | | List<UIButtonDefineVO> buttonDefineVOS = new ArrayList<>(); |
| | | if(buttons != null && buttons.size() > 0){ |
| | | Map<String, UIActionVO> actionVOMap = self.selectAllActionMap(); |
| | | // Map<String, UIActionVO> actionVOMap = self.selectAllActionMap(); |
| | | Map<String, UIActionVO> actionVOMap = null; |
| | | actionVOMap = AllActionThreadLocal.get(); |
| | | if(actionVOMap == null ){ |
| | | actionVOMap = self.selectAllActionMap(); |
| | | } |
| | | Map<String, UIActionVO> finalActionVOMap = actionVOMap; |
| | | Optional.ofNullable(buttons).orElseGet(()->new ArrayList<>()).stream().forEach(button->{ |
| | | buttonDefineVOS.add(buttonDO2VO(button, actionVOMap)); |
| | | buttonDefineVOS.add(buttonDO2VO(button, finalActionVOMap)); |
| | | }); |
| | | } |
| | | |