ludc
2024-09-09 88c5cf35a5ea870378d7964086ed2c09ddc299c8
Merge remote-tracking branch 'origin/master'

# Conflicts:
# Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
已修改11个文件
已添加2个文件
558 ■■■■■ 文件已修改
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/OsAttributeDTO.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/OsAttributeVO.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/ControlAttributeType.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/ControlType.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/ItemTypeEnum.java 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsAttributeServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java 193 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/App.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/OsAttributeDTO.java
@@ -38,6 +38,10 @@
     * å±žæ€§ç±»åž‹ï¼Œä½¿ç”¨æžšä¸¾VciFieldTypeEnum
     */
    private String attributeDataType;
    /**
     * å±žæ€§UI控件显示类型
     */
    private  String attributeUIType;
    /**
     * æ˜¯å¦å¯ä»¥ä¸ºç©º
@@ -301,6 +305,14 @@
        this.scaleLength = scaleLength;
    }
    public String getAttributeUIType() {
        return attributeUIType;
    }
    public void setAttributeUIType(String attributeUIType) {
        this.attributeUIType = attributeUIType;
    }
    @Override
    public String toString() {
        return "OsAttributeDTO{" +
@@ -309,17 +321,24 @@
                ", name='" + name + '\'' +
                ", description='" + description + '\'' +
                ", attributeDataType='" + attributeDataType + '\'' +
                ", attributeUIType='" + attributeUIType + '\'' +
                ", nullableFlag=" + nullableFlag +
                ", defaultValue='" + defaultValue + '\'' +
                ", enumId='" + enumId + '\'' +
                ", enumName='" + enumName + '\'' +
                ", btmTypeId='" + btmTypeId + '\'' +
                ", btmTypeName='" + btmTypeName + '\'' +
                ", linkTypeName='" + linkTypeName + '\'' +
                ", version=" + version +
                ", attrLength=" + attrLength +
                ", precisionLength=" + precisionLength +
                ", scaleLength=" + scaleLength +
                ", range='" + range + '\'' +
                ", ts=" + ts +
                ", creator='" + creator + '\'' +
                ", createTime=" + createTime +
                ", lastModifier='" + lastModifier + '\'' +
                ", lastModifyTime=" + lastModifyTime +
                '}';
    }
}
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/OsAttributeVO.java
@@ -43,6 +43,14 @@
     * å±žæ€§ç±»åž‹æ˜¾ç¤ºæ–‡æœ¬
     */
    private String attributeDataTypeText;
    /**
     * å±žæ€§UI控件显示类型
     */
    private  String attributeUIType;
    /**
     * å±žæ€§UI控件显示类型文本
     */
    private  String attributeUITypeText;
    /**
     * æ˜¯å¦å¯ä»¥ä¸ºç©º
@@ -353,6 +361,22 @@
        this.scaleLength = scaleLength;
    }
    public String getAttributeUIType() {
        return attributeUIType;
    }
    public void setAttributeUIType(String attributeUIType) {
        this.attributeUIType = attributeUIType;
    }
    public String getAttributeUITypeText() {
        return attributeUITypeText;
    }
    public void setAttributeUITypeText(String attributeUITypeText) {
        this.attributeUITypeText = attributeUITypeText;
    }
    @Override
    public String toString() {
        return "OsAttributeVO{" +
@@ -362,16 +386,21 @@
                ", description='" + description + '\'' +
                ", attributeDataType='" + attributeDataType + '\'' +
                ", attributeDataTypeText='" + attributeDataTypeText + '\'' +
                ", attributeUIType='" + attributeUIType + '\'' +
                ", attributeUITypeText='" + attributeUITypeText + '\'' +
                ", nullableFlag=" + nullableFlag +
                ", defaultValue='" + defaultValue + '\'' +
                ", enumId='" + enumId + '\'' +
                ", enumName='" + enumName + '\'' +
                ", btmTypeId='" + btmTypeId + '\'' +
                ", btmTypeName='" + btmTypeName + '\'' +
                ", linkTypeName='" + linkTypeName + '\'' +
                ", version=" + version +
                ", attrLength=" + attrLength +
                ", precisionLength=" + precisionLength +
                ", scaleLength=" + scaleLength +
                ", range='" + range + '\'' +
                ", other='" + other + '\'' +
                ", btmname='" + btmname + '\'' +
                ", owner='" + owner + '\'' +
                ", creator='" + creator + '\'' +
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/ControlAttributeType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
package com.vci.web.enumpck;
public enum ControlAttributeType {
    VTString,
    VTInteger,
    VTLong,
    VTDouble,
    VTBoolean,
    VTImage,
    VTDate,
    VTTime,
    VTDateTime,
    VTNote,
    VTFilePath,
    VTClob,
    canzhao;
    public static ControlType Parse(String value) {
        for (ControlType ct : ControlType.values()) {
            if (ct.name().equalsIgnoreCase(value)) {
                return ct;
            }
        }
        return null;
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/ControlType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
package com.vci.web.enumpck;
public enum ControlType {
    Text,
    TextBtn,
    TextArea,
    RichText,
    Number,
    Password,
    Radio,
    Checkbox,
    Select,
    WebEditor,
    Date,
    Time,
    Datetime,
    Hidden,
    Customform,
    File,
    MultiFile,
    Custom,
    UserChoose;
    public static ControlType Parse(String value) {
        for (ControlType ct : ControlType.values()) {
            if (ct.name().equalsIgnoreCase(value)) {
              return ct;
            }
          }
          return null;
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/ItemTypeEnum.java
@@ -2,6 +2,7 @@
import com.vci.pagemodel.KeyValue;
import com.vci.starter.web.enumpck.BaseEnum;
import com.vci.starter.web.enumpck.VciFieldTypeEnum;
import java.util.ArrayList;
import java.util.List;
@@ -141,4 +142,87 @@
        }
        return enumDataList;
    }
    /***
     *根据属性类型获取UI属性类型(文本)
     * @param key
     * @return
     */
    public static String convertAttributeTypeTOUITypeTextByValue(String key,boolean isText){
        String value=ItemTypeEnum.TEXT.getValue();
        ItemTypeEnum itemTypeEnum=null;
        if(ControlAttributeType.VTInteger.equals(key)||
           ControlAttributeType.VTDouble.equals(key)
        ){
            value = ItemTypeEnum.NUMBER.getValue();
        }
        else if (ControlAttributeType.VTNote.equals(key)) {// textarea类型
            value = ItemTypeEnum.TEXTAREA.getValue();
        }// æ—¥èµ·ç±»åž‹
        else if (ControlAttributeType.VTDate.equals(key)) {//日期
            value = ItemTypeEnum.DATE.getValue();
        }else if(ControlAttributeType.VTDateTime.equals(key)){//日期时间
            value = ItemTypeEnum.DATETIME.getValue();
        }else  if( ControlAttributeType.VTTime.equals(key)){//时间
            value = ItemTypeEnum.TIME.getValue();
        }
        else  if( ControlAttributeType.canzhao.equals(key)){//参照
            value = ItemTypeEnum.TEXT.getValue();
        }
        else  if( ControlAttributeType.VTBoolean.equals(key)){//boolean
            value = ItemTypeEnum.CHECKBOX.getValue();
        }else  if( ControlAttributeType.VTFilePath.equals(key)){//文件
            value = ItemTypeEnum.FILE.getValue();
        } else {
            value = ItemTypeEnum.TEXT.getValue();
        }
        itemTypeEnum = forValue(value);
        if(itemTypeEnum==null){
            return "";
        }else {
            if (isText) {
                value = itemTypeEnum.getText();
            } else {
                value = itemTypeEnum.getText();
            }
        }
        return value;
    }
    /***
     *根据属性类型获取UI属性类型(文本)
     * @param key
     * @return
     */
    public static String convertAttributeTypeTOUITypeValueByText(String key){
        String value=ItemTypeEnum.TEXT.getValue();
        if(ControlAttributeType.VTInteger.equals(key)||
                ControlAttributeType.VTDouble.equals(key)
        ){
            value = ItemTypeEnum.NUMBER.getValue();
        }
        else if (ControlAttributeType.VTNote.equals(key)) {// textarea类型
            value = ItemTypeEnum.TEXTAREA.getValue();
        }// æ—¥èµ·ç±»åž‹
        else if (ControlAttributeType.VTDate.equals(key)) {//日期
            value = ItemTypeEnum.DATE.getValue();
        }else if(ControlAttributeType.VTDateTime.equals(key)){//日期时间
            value = ItemTypeEnum.DATETIME.getValue();
        }else  if( ControlAttributeType.VTTime.equals(key)){//时间
            value = ItemTypeEnum.TIME.getValue();
        }
        else  if( ControlAttributeType.canzhao.equals(key)){//参照
            value = ItemTypeEnum.TEXT.getValue();
        }
        else  if( ControlAttributeType.VTBoolean.equals(key)){//boolean
            value = ItemTypeEnum.CHECKBOX.getValue();
        }else  if( ControlAttributeType.VTFilePath.equals(key)){//文件
            value = ItemTypeEnum.FILE.getValue();
        } else {
            value = ItemTypeEnum.TEXT.getValue();
        }
        value= getTextByValue(value);
        return value;
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsAttributeServiceImpl.java
@@ -28,6 +28,7 @@
import com.vci.starter.web.pagemodel.*;
import com.vci.starter.web.util.*;
import com.vci.model.OsAttributeDO;
import com.vci.web.enumpck.ItemTypeEnum;
import com.vci.web.enumpck.PortalVITypeFlag;
import com.vci.web.properties.UsedNames;
import com.vci.web.service.OsAttributeServiceI;
@@ -347,6 +348,10 @@
            attributeVO.setDescription(attribItem.description);
            attributeVO.setAttributeDataType(attribItem.vtDataType);
            attributeVO.setAttributeDataTypeText(VciFieldTypeEnum.getTextByValue(attribItem.vtDataType));
            //获取UI属性类型
            attributeVO.setAttributeUIType(ItemTypeEnum.convertAttributeTypeTOUITypeTextByValue(attribItem.vtDataType,false));
            //获取UI属性类型文本
            attributeVO.setAttributeUITypeText(ItemTypeEnum.convertAttributeTypeTOUITypeTextByValue(attribItem.vtDataType,true));
            attributeVO.setDefaultValue(attribItem.defValue);
            if(Func.isNotBlank(attribItem.rage)){
                attributeVO.setRange(attribItem.rage.replace("&lt;","<"));
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java
@@ -272,6 +272,9 @@
                if(att == null || "".equals(att.oid)){
                    att = allSysAttr.get(column.toLowerCase());
                }
                if(att == null){
                    throw new PLException("500", new String[]{"属性字段:" + column + "在属性池中未查询到,请确认!!"});
                }
                leafInfoDTO.setClause(leafInfo.getClause());
                leafInfoDTO.setOperator(leafInfo.getOperator());
@@ -1476,6 +1479,7 @@
        if(!checkInfo.equals("OK")){
            throw new PLException("500", new String[]{checkInfo});
        }
        qt.setId(qtInfoDTO.getQtName());
        //设置排序信息
        qt.setOrderInfoList(qtInfoDTO.getQueryTemplate().getOrderInfoList());
        QTInfo qtWrapper = new QTInfo();
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
@@ -33,6 +33,7 @@
import lombok.NoArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
@@ -57,6 +58,16 @@
    @Resource
    private PlatformClientUtil platformClientUtil;
    /**
     * è§’色
     */
    @Resource
    private SmRoleQueryServiceI smRoleQueryServiceI;
    /***
     * æ˜¯å¦æ˜¯ç®¡ç†å‘˜
     */
    @Autowired
    RightControlUtil rightControlUtil;
    /**
     * ä¸šåŠ¡ç±»åž‹
     */
@@ -1093,6 +1104,12 @@
        return treeList;
    }
    /***
     * UI授权
     * @param uiAuthorDTO
     * @return
     * @throws Exception
     */
    @Override
    public boolean authorizedUI(UIAuthorDTO uiAuthorDTO) throws Exception {
        boolean res=false;
@@ -1108,41 +1125,41 @@
        treeQueryObject.setConditionMap(conditionMap);
        List<Tree> treeList=this.getUIAuthor(treeQueryObject);
        HashMap<String,Tree> allTreeMap=new HashMap<>();
        Map<String,RoleRightVO> roleRightVOMap=new HashMap<>();
        if(!CollectionUtil.isEmpty(treeList)){
            if(StringUtils.isNotBlank(uiAuthorDTO.getRoleId())){
                String userName= WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId();
                RoleRightInfo[] rightInfos= platformClientUtil.getFrameworkService().getRoleRightList(uiAuthorDTO.getRoleId(),userName);
                List<RoleRightVO>  roleRightVOList=roleRightDOO2VOS(Arrays.asList(rightInfos));
                roleRightVOMap=roleRightVOList.stream().collect(Collectors.toMap(RoleRightVO::getFuncId,roleRightVO ->roleRightVO));
            }
            convertTreeDOO2Map(treeList,allTreeMap);
            List<RoleRightDTO> roleRightDTOList=new ArrayList<>();
            List<Tree>  selectTreeList= uiAuthorDTO.getSelectTreeList();
            getRoleRightDTOS(uiAuthorDTO.getRoleId(),selectTreeList,allTreeMap,roleRightDTOList);
            getSelectedRoleRightObjs(uiAuthorDTO.getRoleId(),selectTreeList,allTreeMap,roleRightDTOList);
        }
        return res;
    }
    private void getRoleRightDTOS(String roleOid,List<Tree>  selectTreeList,HashMap<String,Tree> allTreeMap,  List<RoleRightDTO> roleRightDTOList){
    /**
     *
     * @param roleOid
     * @param selectTreeList
     * @param allTreeMap
     * @param roleRightDTOList
     */
    private void getSelectedRoleRightObjs(String roleOid,List<Tree>  selectTreeList,HashMap<String,Tree> allTreeMap,  List<RoleRightDTO> roleRightDTOList){
        Date date=new Date();
        Map<String,RoleRightDTO> roleRightDTOMap=new HashMap<>();
        selectTreeList.stream().forEach(tree -> {
            RoleRightDTO roleRightDTO=new RoleRightDTO();
            String id=ObjectUtility.getNewObjectID36();
            Object data=  tree.getData();
            if (data instanceof BizType) {//业务类型
                BizType bizType=(BizType)data;
                roleRightDTO.setId(id);//主键
                roleRightDTO.setCreateUser(null);//创建者
                roleRightDTO.setCreateTime(null);//创建时间
                roleRightDTO.setModifyUser(null);//修改者
                roleRightDTO.setModifyTime(null);//修改时间
                roleRightDTO.setRoleId(roleOid);//角色ID
                roleRightDTO.setRightValue(1);// æƒé™å€¼
                roleRightDTO.setRightType((short) -1);//权限类型 æƒé™ç±»åž‹ï¼Œè¶…级管理员给管理员授权为1,管理员给普通用户授权为2
                roleRightDTO.setFuncId(null);
                roleRightDTO.setLicensor(null);
            }else  if (data instanceof PLUILayout){//UI
            }else if (data instanceof PLTabPage) {//UI上下文
            }else if (data instanceof PLPageDefination) {//
            if(data instanceof String){
                getRightValue(roleOid,tree,allTreeMap,false,roleRightDTOMap);//向下获取所有模块的权限值
            }else if (!(data instanceof PLTabButton)) {//业务类型
                getRightValue(roleOid,tree,allTreeMap,true,roleRightDTOMap);//向上处理
                getRightValue(roleOid,tree,allTreeMap,false,roleRightDTOMap);//向下处理(包含当前节点)
            }else if (data instanceof PLTabButton) {//按钮
            }
@@ -1151,6 +1168,136 @@
    }
    /**
     * èŽ·å–æƒé™
     * @param isUp æ˜¯å¦æ˜¯å‘上获取,如果是向上获取,传进来的必然是模块节点,且上级模块必然是没有选中
     */
    private void getRightValue(String roleId,Tree node,HashMap<String,Tree> allTreeMap,boolean isUp,Map<String,RoleRightDTO> rightMap){
        SessionInfo sessionInfo = WebThreadLocalUtil.getCurrentUserSessionInfoInThread();
        String currentUserName = sessionInfo.getUserId();
        boolean isDeveloper= rightControlUtil.isDeveloper(currentUserName);
        String parentOid=node.getParentId();
        if(allTreeMap.containsKey(parentOid)){
            String id=ObjectUtility.getNewObjectID36();
            Tree parentNode =allTreeMap.get(parentOid);
            Object parentData=  parentNode.getData();
            if(isUp) {//向上获取,存储每个上级模块的权限值
                while (!"root".equals(parentNode.getData())){
                    String funcId = "";
                    if (parentData instanceof BizType) {
                        BizType bizType = (BizType) parentData;
                        funcId = bizType.name;
                    } else if (parentData instanceof PLUILayout) {
                        PLUILayout context = (PLUILayout)parentData;
                        funcId = context.plOId;
                    } else if (parentData instanceof PLTabPage) {
                        PLTabPage tab = (PLTabPage) parentData;
                        funcId = tab.plOId;
                    } else if (parentData instanceof PLPageDefination){
                        PLPageDefination pageDef = (PLPageDefination) parentData;
                        funcId = pageDef.plOId;
                    } else if (parentData instanceof PLTabButton) {
                        PLTabButton but = (PLTabButton)parentData;
                        funcId = but.plOId;
                    }
                    RoleRightDTO roleRightDTO = new RoleRightDTO();
                    roleRightDTO.setId(id);//主键
                    roleRightDTO.setFuncId(funcId);
                    if(isDeveloper) {
                        roleRightDTO.setRightType((short) 1);//权限类型 æƒé™ç±»åž‹ï¼Œè¶…级管理员给管理员授权为1,管理员给普通用户授权为2
                    }else{
                        roleRightDTO.setRightType((short) 2);
                    }
                    roleRightDTO.setRightValue(1);// æƒé™å€¼ï¼Œæ²¡æœ‰æ“ä½œçš„æ¨¡å—权限值存储为0
                    roleRightDTO.setRoleId(roleId);//角色ID
                    roleRightDTO.setCreateUser(currentUserName);//创建者
                    roleRightDTO.setCreateTime(new Date());//创建时间
                    roleRightDTO.setModifyUser(currentUserName);//修改者
                    roleRightDTO.setModifyTime(new Date());//修改时间
                    roleRightDTO.setLicensor("");
                    if(!rightMap.containsKey(funcId)){
                        rightMap.put(funcId, roleRightDTO);
                    }
                }
            }else{
                String funcId = "";
                if(parentData instanceof String){
                    funcId = (String)parentData;
                } else if (parentData instanceof BizType) {
                    BizType bizType = (BizType)parentData;
                    funcId = bizType.name;
                } else if (parentData instanceof PLUILayout) {
                    PLUILayout context = (PLUILayout)parentData;
                    funcId = context.plOId;
                } else if (parentData instanceof PLTabPage) {
                    PLTabPage tab = (PLTabPage) parentData;
                    funcId = tab.plOId;
                } else if (parentData instanceof PLPageDefination){
                    PLPageDefination pageDef = (PLPageDefination) parentData;
                    funcId = pageDef.plOId;
                } else if (parentData instanceof PLTabButton) {
                    PLTabButton but = (PLTabButton)parentData;
                    funcId = but.plOId;
                }
                if(!(parentData instanceof PLPageDefination)) {//子节点不是操作
                    if(!rightMap.containsKey(funcId)&&!funcId.equals("root")){
                        RoleRightDTO roleRightDTO = new RoleRightDTO();
                        roleRightDTO.setFuncId(funcId);
                        if(isDeveloper) {
                            roleRightDTO.setRightType((short) 1);//权限类型 æƒé™ç±»åž‹ï¼Œè¶…级管理员给管理员授权为1,管理员给普通用户授权为2
                        }else{
                            roleRightDTO.setRightType((short) 2);
                        }
                        roleRightDTO.setRightValue(0);//没有操作的模块权限值存储为0
                        roleRightDTO.setRoleId(roleId);
                        roleRightDTO.setCreateUser(currentUserName);
                        roleRightDTO.setCreateTime(new Date());
                        roleRightDTO.setModifyUser(currentUserName);
                        roleRightDTO.setModifyTime(new Date());
                        roleRightDTO.setLicensor("");
                        rightMap.put(funcId, roleRightDTO);
                    }
                    for(int i = 0;i < parentNode.getChildren().size();i++){
                        //对每个子向下递归遍历
                        getRightValue(roleId,parentNode.getChildren().get(i),allTreeMap,false,rightMap);
                    }
                }else {
                    if(!rightMap.containsKey(funcId)){
                        RoleRightDTO roleRightDTO = new RoleRightDTO();
                        roleRightDTO.setFuncId(funcId);
                        roleRightDTO.setRightType((short)2); // è®¾ç½®UI权限
                        roleRightDTO.setRightValue(countRightValue(parentNode,true));//没有操作的模块权限值存储为0
                        roleRightDTO.setRoleId(roleId);
                        roleRightDTO.setCreateUser(currentUserName);
                        roleRightDTO.setCreateTime(new Date());
                        roleRightDTO.setModifyUser(currentUserName);
                        roleRightDTO.setModifyTime(new Date());
                        roleRightDTO.setLicensor("");
                        rightMap.put(funcId, roleRightDTO);
                    }
                }
            }
        }
    }
    /**
     * ä¼ å…¥ç›´æŽ¥æŒ‚接操作的模块的节点,计算该节点的权限值
     * @param node æ¨¡å—节点
     * @param isAll æ˜¯å¦å­çº§å…¨éƒ¨é€‰ä¸­
     * @return
     */
    private long countRightValue(Tree node,boolean isAll){
        long value = 0;
        for(int i = 0;i < node.getChildren().size();i++){
            Tree childNode = (Tree)node.getChildren().get(i);
            if(isAll && node.getData() instanceof PLTabButton ){
                PLTabButton obj = (PLTabButton)node.getData();
                value += (long)Math.pow(2, obj.plSeq);//累计加上各个操作的权限值
            }
        }
        return value;
    }
    /**
     *
Source/plt-web/plt-web-ui/src/App.vue
@@ -59,11 +59,24 @@
  margin-bottom: 0;
}
.avue-crud .avue-crud__menu{
  min-height: 32px;
  min-height: 26px;
}
.avue-crud .avue-crud__menu .el-button{
  margin-bottom: 5px;
}
.avue-crud .avue-crud__menu .el-button--text{
  padding: 2px 6px;
}
.avue-crud table td{
  line-height: 22px;
}
.el-table .cell{
  line-height: 22px;
}
.el-table .cell .el-tag{
  line-height: 20px;
  height: 22px;
}
.avue-crud__pagination{
  padding: 15px 0 10px;
}
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue
@@ -37,6 +37,19 @@
        <!--导入    -->
        <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导入"
                     @updata="uploadCallBack"></upload-file>
        <div>
          <fieldset>
            <legend>&nbsp;查询条件&nbsp;</legend>
            <form-query-dialog ref="formQuery"
                               style="height: 260px;"
                               :readOnly="true"
                               :queryCondition="queryCondition"
                               :queryTree="queryTree"
                               :levelFlag.sync="levelFlag"
            ></form-query-dialog>
          </fieldset>
        </div>
      </basic-container>
    </el-main>
@@ -51,9 +64,10 @@
import func from "@/util/func";
import {dateFormat} from "@/util/date";
import FormDialog from "./formDialog.vue"
import formQueryDialog from "@/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue";
export default {
  name: "index",
  components: {FormDialog},
  components: {FormDialog,formQueryDialog},
  data() {
    return {
      treeOption: {
@@ -68,7 +82,7 @@
        }
      },
      nodeRow: {},
      treeData: [  {
      treeData: [{
        label: '业务类型树',
        oid: 'topNode',
        children: []
@@ -95,7 +109,7 @@
        selection: true,
        menu: false,
        height: "auto",
        calcHeight: -40,
        calcHeight: 300,
        tip: false,
        header:false,
        column: [{
@@ -115,6 +129,11 @@
      ],
      upFileType: ['vciqtf'],
      fileUrl: 'api/templateController/impBtmTemplate',
      //高级查询条件
      queryTree:{},
      //普通查询条件
      queryCondition:[],
      levelFlag:0
    }
  },
  created() {
@@ -126,14 +145,24 @@
      const loading = this.$loading({});
      getBizTypes().then(res => {
        const data = res.data.data.map(item => {
          item.label = item.attributes.id;
          return item;
          this.processChildren(item); // å¤„理每个节点
          item.attributes.label = item.attributes.id;
          return item.attributes;
        });
        this.treeData[0].children = data;
        loading.close();
      })
    },
    // å¤„理树形结构
    processChildren(item) {
      if (item.children && item.children.length > 0) {
        item.attributes.children = item.children.map(child => {
          child.attributes.label = child.attributes.id;
          this.processChildren(child); // é€’归处理每个子节点
          return child.attributes; // åªè¿”回子节点的 attributes
        });
      }
    },
    // æ ‘点击
    nodeClick(row) {
      this.nodeRow = row;
@@ -145,12 +174,19 @@
      getObjTypeQTs(this.nodeRow.label).then(res => {
        this.crudData =  res.data.data;
        this.tableLoading = false;
        this.queryCondition=[];
        this.queryTree={};
        this.levelFlag=0;
      })
    },
    rowClick(row) {
      this.$refs.crud.toggleSelection();
      this.$refs.crud.toggleRowSelection(row); //选中当前行
      this.selectionRow = [row];
      this.queryCondition=row.queryTemplate.condition;
      this.queryTree=row.tree;
      this.levelFlag=row.levelFlag;
    },
    selectionChange(list) {
      this.selectionRow = list;
@@ -286,5 +322,13 @@
  text-align: center;
  padding-left: 4.5px;
}
fieldset {
  border-radius: 5px;
  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
  padding: 10px 6px;
  box-sizing: border-box;
  margin: 10px 0 0 0;
  border: 1px solid #EBEEF5;
}
</style>
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue
@@ -1,34 +1,34 @@
<template>
  <div style="padding: 0 10px">
    <div style="text-align: center;margin-bottom: 10px">
      <avue-radio v-model="radioForm"  :dic="radioDic" style="margin: 0 20px 0 0;display: inline-block"></avue-radio>
      <el-button  plain size="mini" type="primary" @click="clearValue">清空值</el-button>
      <el-button  plain size="mini" type="primary" @click="delAll">删除全部条件</el-button>
      <avue-radio v-model="radioForm" :disabled ="readOnly" :dic="radioDic" style="margin: 0 20px 0 0;display: inline-block"></avue-radio>
      <el-button  v-if="!readOnly" plain size="mini" type="primary" @click="clearValue">清空值</el-button>
      <el-button  v-if="!readOnly" plain size="mini" type="primary" @click="delAll">删除全部条件</el-button>
    </div>
    <div v-if="radioForm==0" @drop="drop" @dragover.prevent style="height: 220px;text-align: center;">
      <div v-for="(condition,index) in conditionList" :key="index" class="el-input--small" style="margin-bottom: 5px; text-align:left">
        <span style="width: 200px;display: inline-block;text-align: right" :title="condition.clause">{{condition.clause}}</span>
        <avue-select v-model="condition.operator" type="tree" :dic="condition.operatorDic" :clearable="false" style="width: 80px;margin: 0 5px;"></avue-select>
        <el-date-picker v-if="condition.type=='VTDate'" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;" value-format="YYYY-MM-DD"
        <avue-select :disabled ="readOnly" v-model="condition.operator" type="tree" :dic="condition.operatorDic" :clearable="false" style="width: 80px;margin: 0 5px;"></avue-select>
        <el-date-picker :disabled ="readOnly" v-if="condition.type=='VTDate'" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;" value-format="YYYY-MM-DD"
                        type="date">
        </el-date-picker>
        <el-date-picker v-else-if="condition.type=='VTDateTime'" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;"
        <el-date-picker :disabled ="readOnly" v-else-if="condition.type=='VTDateTime'" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;"
                        type="datetime">
        </el-date-picker>
        <el-time-select v-else-if="condition.type=='VTTime'" v-model="condition.ordinaryValue" value-format="HH:mm:ss" style="width:300px;margin-right: 5px;display: inline-block;">
        <el-time-select :disabled ="readOnly" v-else-if="condition.type=='VTTime'" v-model="condition.ordinaryValue" value-format="HH:mm:ss" style="width:300px;margin-right: 5px;display: inline-block;">
        </el-time-select>
        <avue-input-number v-else-if="condition.type=='VTInteger'" precision="0" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;"></avue-input-number>
        <avue-input-number v-else-if="condition.type=='VTLong' || condition.type=='VTDouble'" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;"></avue-input-number>
        <avue-input v-else v-model="condition.ordinaryValue" placeholder="" style="width: 300px;margin-right: 5px;"></avue-input>
        <el-button  plain size="mini" type="primary" @click="checkTemp(index)">选择查询模板</el-button>
        <el-button  size="mini" type="danger" icon="el-icon-delete" @click="delCondition(index)" style="padding: 7px 8px"></el-button>
        <avue-input-number :disabled ="readOnly" v-else-if="condition.type=='VTInteger'" precision="0" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;"></avue-input-number>
        <avue-input-number :disabled ="readOnly" v-else-if="condition.type=='VTLong' || condition.type=='VTDouble'" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;"></avue-input-number>
        <avue-input :disabled ="readOnly" v-else v-model="condition.ordinaryValue" placeholder="" style="width: 300px;margin-right: 5px;"></avue-input>
        <el-button v-if="!readOnly"  plain size="mini" type="primary" @click="checkTemp(index)">选择查询模板</el-button>
        <el-button v-if="!readOnly"  size="mini" type="danger" icon="el-icon-delete" @click="delCondition(index)" style="padding: 7px 8px"></el-button>
      </div>
    </div>
    <div v-else @drop="drop" @dragover.prevent style="height: 220px;text-align: left">
      <avue-tree ref="tree" @node-drag-end="handleDragEnd" @node-drag-leave="handleDragLeave"  @node-drag-over="handleDragOver"
                  style="height: 220px" :data="treeData" :option="treeOption"  @node-click="nodeClick" node-key="value"></avue-tree>
    </div>
    <div style="text-align: right;margin-top: 10px;">
    <div v-if="!readOnly" style="text-align: right;margin-top: 10px;">
      <el-button v-if="radioForm==1"  plain size="mini" type="primary" @click="addHandler">增加逻辑</el-button>
      <el-button v-if="radioForm==1"  plain size="mini" type="primary" @click="editHandler">修改条件</el-button>
      <el-button v-if="radioForm==1"  plain size="mini" type="primary" @click="delHandler">删除</el-button>
@@ -132,6 +132,10 @@
    levelFlag:{
      type: Number,
      default: 0
    },
    readOnly:{
      type:Boolean,
      default:false
    }
  },
  data() {
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue
@@ -36,6 +36,18 @@
        <!--导入    -->
        <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导入"
                     @updata="uploadCallBack"></upload-file>
        <div>
          <fieldset>
            <legend>&nbsp;查询条件&nbsp;</legend>
            <form-query-dialog ref="formQuery"
                               style="height: 260px;"
                               :readOnly="true"
                               :queryCondition="queryCondition"
                               :queryTree="queryTree"
                               :levelFlag.sync="levelFlag"
            ></form-query-dialog>
          </fieldset>
        </div>
      </basic-container>
    </el-main>
  </el-container>
@@ -48,10 +60,11 @@
import basicOption from "@/util/basic-option";
import FormDialog from "./formDialog.vue"
import func from "@/util/func";
import formQueryDialog from "@/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue";
export default {
  name: "index",
  components: {FormDialog},
  components: {FormDialog,formQueryDialog},
  data() {
    return {
      treeOption: {
@@ -83,7 +96,7 @@
        selection: true,
        menu: false,
        height: "auto",
        calcHeight: -40,
        calcHeight: 300,
        tip: false,
        header:false,
        column: [{
@@ -151,6 +164,11 @@
      ],
      upFileType: ['vciqtf'],
      fileUrl: 'api/templateController/impLinkTemplate',
      //高级查询条件
      queryTree:{},
      //普通查询条件
      queryCondition:[],
      levelFlag:0
    }
  },
  created() {
@@ -182,12 +200,20 @@
        this.crudData = res.data.data;
        this.tableLoading = false;
        this.selectionClear();
        this.queryCondition=[];
        this.queryTree={};
        this.levelFlag=0;
      })
    },
    rowClick(row) {
      this.$refs.crud.toggleSelection();
      this.$refs.crud.toggleRowSelection(row); //选中当前行
      this.selectionRow = [row];
      this.queryCondition=row.queryTemplate.condition;
      this.queryTree=row.tree;
      this.levelFlag=row.levelFlag;
    },
    selectionChange(list) {
      this.selectionRow = list;
@@ -323,5 +349,13 @@
  text-align: center;
  padding-left: 4.5px;
}
fieldset {
  border-radius: 5px;
  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
  padding: 10px 6px;
  box-sizing: border-box;
  margin: 10px 0 0 0;
  border: 1px solid #EBEEF5;
}
</style>
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue
@@ -170,8 +170,9 @@
        if (newval ==0) {
          getBizTypes().then(res => {
            const data = res.data.data.map(item => {
              item.label=item.attributes.id;
              return item;
              this.processChildren(item); // å¤„理每个节点
              item.attributes.label = item.attributes.id;
              return item.attributes;
            });
            this.treeData = data;
            loading.close();
@@ -195,14 +196,24 @@
      const loading = this.$loading({});
      getBizTypes().then(res => {
        const data = res.data.data.map(item => {
          item.label=item.attributes.id;
          return item;
          this.processChildren(item); // å¤„理每个节点
          item.attributes.label = item.attributes.id;
          return item.attributes;
        });
        this.treeData = data;
        loading.close();
      })
    },
    // å¤„理业务类型树形结构
    processChildren(item) {
      if (item.children && item.children.length > 0) {
        item.attributes.children = item.children.map(child => {
          child.attributes.label = child.attributes.id;
          this.processChildren(child); // é€’归处理每个子节点
          return child.attributes; // åªè¿”回子节点的 attributes
        });
      }
    },
    // æ ‘点击
    nodeClick(row) {
      this.nodeRow = row;