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("<","<")); 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> æ¥è¯¢æ¡ä»¶ </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> æ¥è¯¢æ¡ä»¶ </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;