From c659560c7ee8d8f8278b938421de13bf65d1e1b1 Mon Sep 17 00:00:00 2001 From: ludc <ludc@vci-tech.com> Date: 星期三, 15 一月 2025 14:28:25 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/SmUserQueryServiceI.java | 9 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue | 88 ++- Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue | 11 Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue | 16 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue | 18 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue | 29 Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue | 6 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue | 16 Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue | 5 Source/plt-web/plt-web-ui/src/api/processTemplate/type.js | 31 + Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebIconServiceImpl.java | 12 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue | 4 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue | 28 Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/controller/SmUserQueryController.java | 33 + Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue | 16 Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PLIconVO.java | 17 Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/SmUserQueryServiceImpl.java | 150 +++++ Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue | 336 +++++++++++++ Source/plt-web/plt-web-ui/src/views/system/log/index.vue | 2 Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue | 4 Source/plt-web/plt-web-ui/src/styles/ui.scss | 13 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue | 4 Source/plt-web/plt-web-ui/src/store/modules/user.js | 1 Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue | 202 ++++++++ Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLIconDTO.java | 19 Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/util/PlatformClientUtil.java | 9 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue | 42 + Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java | 130 ++-- Source/plt-web/plt-web-ui/src/api/processTemplate/define.js | 61 ++ Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue | 4 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue | 131 ++-- 31 files changed, 1,177 insertions(+), 270 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLIconDTO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLIconDTO.java index 37fab25..800b0c1 100644 --- a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLIconDTO.java +++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLIconDTO.java @@ -2,6 +2,8 @@ import lombok.Data; +import java.util.Date; + /** * @Description 鍥炬爣浼犺緭瀵硅薄 * @Author dangsn @@ -38,4 +40,21 @@ * 鍥炬爣鍒嗙粍 */ private String groups; + + /** + * 鍒涘缓鏃堕棿 + */ + private long plCreateTime ; + /** + * 鍒涘缓浜� + */ + private String plCreateUser; + /** + * 淇敼鏃堕棿 + */ + private long plModifyTime ; + /** + * 淇敼浜� + */ + private String plModifyUser; } diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PLIconVO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PLIconVO.java index fb7352e..8320065 100644 --- a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PLIconVO.java +++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PLIconVO.java @@ -43,4 +43,21 @@ * 鍥炬爣鎵�灞炲簱 */ private String lable; + + /** + * 鍒涘缓鏃堕棿 + */ + private long plCreateTime ; + /** + * 鍒涘缓浜� + */ + private String plCreateUser; + /** + * 淇敼鏃堕棿 + */ + private long plModifyTime ; + /** + * 淇敼浜� + */ + private String plModifyUser; } diff --git a/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/controller/SmUserQueryController.java b/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/controller/SmUserQueryController.java index ed5bbc0..03226c4 100644 --- a/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/controller/SmUserQueryController.java +++ b/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/controller/SmUserQueryController.java @@ -290,6 +290,39 @@ } /** + * 淇敼鐢ㄦ埛澶村儚 + * @param file 鏂囦欢 + * @return + */ + @RequestMapping(value = "/updateUserPhoto",method = RequestMethod.POST) + public BaseResult updateUserPhoto(MultipartFile file){ + try { + return userQueryService.updateUserPhoto(file) ? BaseResult.success("鐢ㄦ埛澶村儚淇敼鎴愬姛锛�"):BaseResult.fail("鐢ㄦ埛澶村儚淇敼澶辫触锛�"); + }catch (Exception e){ + e.printStackTrace(); + String exceptionMessage = "淇敼鐢ㄦ埛澶村儚鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); + } + } + + + /** + * 鑾峰彇鐢ㄦ埛澶村儚 + * @param response + * @return + */ + @RequestMapping(value = "/getUserPhoto",method = RequestMethod.GET) + public void getUserPhoto(HttpServletResponse response){ + try { + ControllerUtil.writeFileToResponse(response,userQueryService.getUserPhoto()); + } catch (Exception e) { + throw new VciBaseException(e.getMessage(),new String[0],e); + } + } + + + /** * 鍒犻櫎鐢ㄦ埛 * @param ids * @return diff --git a/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/SmUserQueryServiceI.java b/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/SmUserQueryServiceI.java index 55e921c..e08fa05 100644 --- a/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/SmUserQueryServiceI.java +++ b/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/SmUserQueryServiceI.java @@ -5,6 +5,7 @@ import com.vci.pagemodel.SmUserVO; import com.vci.starter.web.exception.VciBaseException; import com.vci.starter.web.pagemodel.*; +import org.springframework.web.multipart.MultipartFile; import java.io.File; import java.util.Collection; @@ -283,4 +284,12 @@ * @return */ String expUser() throws PLException; + /** + * 淇敼鐢ㄦ埛澶村儚 + * @param file 鏂囦欢 + * @return + */ + boolean updateUserPhoto(MultipartFile file) throws PLException; + + String getUserPhoto() throws PLException; } diff --git a/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/SmUserQueryServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/SmUserQueryServiceImpl.java index 9c24c4f..7b8ea7e 100644 --- a/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/SmUserQueryServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/SmUserQueryServiceImpl.java @@ -2,21 +2,27 @@ import com.vci.common.util.ThreeDES; import com.vci.common.utility.ObjectUtility; +import com.vci.constant.FrameWorkLangCodeConstant; +import com.vci.constant.WebLangCodeConstant; import com.vci.corba.common.PLException; import com.vci.corba.common.data.UserEntityInfo; import com.vci.corba.framework.data.*; import com.vci.corba.omd.data.BusinessObject; import com.vci.corba.omd.etm.EnumItem; import com.vci.corba.omd.etm.EnumType; +import com.vci.corba.volume.VolumeServicePrx; import com.vci.dto.SmUserDTO; +import com.vci.dto.VciFileObjectDTO; import com.vci.enumpck.UI.OrgTypeEnum; +import com.vci.enumpck.UI.VciFileTransProtocolEnum; import com.vci.enumpck.UserTypeEnum; +import com.vci.lcstatuspck.FileLCStatus; import com.vci.model.SmUserDO; +import com.vci.model.VciFileDocClassifyDO; +import com.vci.model.VciFileObjectDO; +import com.vci.model.VciFileVolumeDO; import com.vci.omd.utils.ObjectTool; -import com.vci.pagemodel.OrgDepartmentVO; -import com.vci.pagemodel.SmPasswordStrategyVO; -import com.vci.pagemodel.SmRoleVO; -import com.vci.pagemodel.SmUserVO; +import com.vci.pagemodel.*; import com.vci.po.SmUserPO; import com.vci.properties.OsConfig; import com.vci.starter.poi.bo.ReadExcelOption; @@ -24,16 +30,21 @@ import com.vci.starter.poi.bo.WriteExcelOption; import com.vci.starter.poi.constant.ExcelLangCodeConstant; import com.vci.starter.poi.util.ExcelUtil; +import com.vci.starter.revision.service.RevisionModelUtil; import com.vci.starter.web.enumpck.BooleanEnum; +import com.vci.starter.web.enumpck.DataSecretEnum; import com.vci.starter.web.enumpck.UserSecretEnum; import com.vci.starter.web.exception.VciBaseException; import com.vci.starter.web.pagemodel.*; import com.vci.starter.web.util.*; import com.vci.starter.web.util.Lcm.Func; import com.vci.starter.web.wrapper.VciQueryWrapperForDO; +import com.vci.web.dao.VciFileObjectDaoI; +import com.vci.web.properties.WebProperties; import com.vci.web.service.*; import com.vci.web.util.PlatformClientUtil; import com.vci.web.util.WebUtil; +import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.apache.poi.hssf.util.HSSFColor; import org.slf4j.Logger; @@ -42,10 +53,14 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import org.springframework.web.multipart.MultipartFile; -import java.io.File; +import javax.annotation.Resource; +import java.io.*; import java.util.*; import java.util.stream.Collectors; + +import static com.vci.constant.FrameWorkLangCodeConstant.UPLOAD_FAIL; /** * 鐢ㄦ埛鐨勬煡璇㈢浉鍏崇殑鏈嶅姟锛屽彲浠ュ吋瀹硅�佸钩鍙板拰鑰佺殑pdm @@ -86,6 +101,24 @@ */ @Autowired private WebPwdStrategyQueryServiceI smPwdStrategyQueryService; + + /** + * 鏂囦欢鐨勫嵎鏈嶅姟 + */ + @Autowired + private VciFileVolumeServiceI vciFileVolumeServiceI; + + /** + * 鐗堟湰鍜屽璞℃搷浣滅被 + */ + @Autowired(required = false) + private RevisionModelUtil revisionModelUtil; + + /** + * 閰嶇疆瀵硅薄 + */ + @Autowired + private WebProperties webProperties; /** * 浣跨敤瑙掕壊鐨勫睘鎬ф煡璇㈢敤鎴锋椂 @@ -141,6 +174,18 @@ * 鏃ュ織 */ private Logger logger = LoggerFactory.getLogger(getClass()); + + /** + * 鏂囦欢涓婁紶涓氬姟灞� + */ + @Autowired + private VciFileUploadServiceI vciFileUploadServiceI; + + /** + * 鏂囦欢淇℃伅鏁版嵁灞� + */ + @Resource + private VciFileObjectDaoI vciFileObjectMapper; /** * 骞冲彴閰嶇疆 @@ -390,6 +435,7 @@ smUserVO.setLastModifier(userInfo.updateUser); smUserVO.setLastLoginTime(VciDateUtil.long2Date(userInfo.updateTime)); smUserVO.setLastModifyPasswordTime(VciDateUtil.long2Date(userInfo.pwdUpdateTime)); + smUserVO.setPhoto(userInfo.photo); return smUserVO; } @@ -1457,6 +1503,7 @@ userInfo.grantor = user.getGrantor() == null ? "" : user.getGrantor(); userInfo.secretGrade = user.getSecretGrade() == null ? 2 : Integer.valueOf(user.getSecretGrade()); userInfo.isDeptLeader = user.getIsDeptLeader() == null ? "0" : user.getIsDeptLeader(); + userInfo.photo = user.getPhoto() == null ? "" : user.getPhoto(); return userInfo; } @@ -1776,6 +1823,99 @@ ExcelUtil.writeDataToFile(excelPath, excelOption); return excelPath; } + /** + * 淇敼鐢ㄦ埛澶村儚 + * @param file 鏂囦欢 + * @return + */ + @Override + public boolean updateUserPhoto(MultipartFile file) throws PLException { + //鑾峰彇鏂囦欢浠撲綅缃� + VciFileVolumeDO vciFileVolumeDO = vciFileVolumeServiceI.getUploadVolume(); + String volumeName = vciFileVolumeDO.getName(); + VolumeServicePrx volumnCorbaService = platformClientUtil.getVolumeService(volumeName); + if(volumnCorbaService == null){ + throw new VciBaseException("娌℃湁鑾峰彇鍒板嵎鏈嶅姟"); + } + InputStream in = null; + String path = vciFileVolumeDO.getId() + ":/userphoto/" + WebUtil.getSessionInfo().getUserOid() + "." + + FilenameUtils.getExtension(file.getOriginalFilename()); + UserInfo userInfo = platformClientUtil.getFrameworkService().getUserObjectByoid(WebUtil.getSessionInfo().getUserOid()); + if(StringUtils.isNotBlank(userInfo.photo)){ + volumnCorbaService.deleteFile(userInfo.photo); + } + try{ + long currentTime = volumnCorbaService.getCurrrentTimeMillions(); + in = file.getInputStream(); + long fileSize = file.getSize(); + int blockSize = webProperties.getBlockLength()*1024; + byte[] buffer = new byte[blockSize]; + long temp =0L; + for(temp = 0L; temp < fileSize - (long)blockSize; temp += (long)blockSize) { + in.read(buffer, 0, blockSize); + volumnCorbaService.receiveFile(path, buffer, temp, currentTime, fileSize); + } + int remainSize = (int)(fileSize - temp); + buffer = new byte[remainSize]; + in.read(buffer, 0, remainSize); + volumnCorbaService.receiveFile(path, buffer, temp, currentTime, fileSize); + }catch(IOException e){ + throw new VciBaseException("璇诲彇鏂囦欢[" + file.getName() + "]鍑虹幇浜嗛敊璇紝" + e.getMessage() ,new String[0],e); + }catch(Exception e){ + throw new VciBaseException("澶勭悊涓婁紶鏂囦欢[" + file.getName() + "]鍑虹幇浜嗛敊璇紝" + e.getMessage() ,new String[0],e); + }finally { + if(in!=null){ + try { + in.close(); + } catch (IOException e) { + } + } + } + userInfo.photo = path; + boolean b = platformClientUtil.getFrameworkService().updateUser(userInfo, new UserEntityInfo(WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(), null)); + if(!b){ + return false; + } + return true; + } + + @Override + public String getUserPhoto() throws PLException { + //鑾峰彇鏂囦欢浠撲綅缃� + VciFileVolumeDO vciFileVolumeDO = vciFileVolumeServiceI.getUploadVolume(); + String volumeName = vciFileVolumeDO.getName(); + VolumeServicePrx volumnCorbaService = platformClientUtil.getVolumeService(volumeName); + if(volumnCorbaService == null){ + throw new VciBaseException("娌℃湁鑾峰彇鍒板嵎鏈嶅姟"); + } + UserInfo userInfo = platformClientUtil.getFrameworkService().getUserObjectByoid(WebUtil.getSessionInfo().getUserOid()); + String serverPath = userInfo.photo; + String tempFilePath = LocalFileUtil.getDefaultTempFolder() + File.separator+serverPath.substring(serverPath.lastIndexOf("/") + 1); + try { + FileOutputStream destFileOs = new FileOutputStream(tempFilePath); + long blockSize = webProperties.getBlockLength()*1024; + if(blockSize> Integer.MAX_VALUE){ + blockSize = Integer.MAX_VALUE; + } + long fileSize = volumnCorbaService.getFileSize(serverPath); + long temp = 0; + while (fileSize - temp > blockSize) { + destFileOs.write(volumnCorbaService.sendFile(serverPath, temp)); + temp += blockSize; + } + destFileOs.write(volumnCorbaService.sendFile(serverPath, temp)); + destFileOs.flush(); + destFileOs.close(); + } catch (FileNotFoundException e) { + throw new VciBaseException("瑕佸啓鍏ョ殑鏂囦欢娌℃湁鎵惧埌",new String[]{tempFilePath},e); + } catch (IOException e) { + throw new VciBaseException("鍐欏叆鏂囦欢鍑洪敊" + e.getMessage(),new String[]{tempFilePath},e); + } catch (Exception e){ + throw new VciBaseException("鍗锋湇鍔′紶杈撴枃浠舵椂鍑虹幇浜嗛敊璇�" + e.getMessage(),new String[0],e); + } + return tempFilePath; + } + //鏍规嵁瀛愰儴闂ㄦ煡璇㈡墍灞炵殑鐖剁被閮ㄩ棬锛屽苟鎷兼帴鎴愬瓧绗︿覆褰㈠紡锛岃繑鍥� public String getDeptObjectAllByDeptId(DeptInfo obj) throws PLException { String fetchDepName = ""; diff --git a/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/util/PlatformClientUtil.java b/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/util/PlatformClientUtil.java index edd86fd..494a601 100644 --- a/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/util/PlatformClientUtil.java +++ b/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/util/PlatformClientUtil.java @@ -12,6 +12,7 @@ import com.vci.corba.omd.ltm.LinkTypeServicePrx; import com.vci.corba.omd.qtm.QTDServicePrx; import com.vci.corba.omd.stm.StatePoolServicePrx; +import com.vci.corba.omd.tim.TypeIndexServicePrx; import com.vci.corba.omd.vrm.VersionRuleServicePrx; import com.vci.corba.pllog.LogServicePrx; import com.vci.corba.portal.PortalServicePrx; @@ -115,6 +116,14 @@ } /** + * 鑾峰彇绫诲瀷绱㈠紩绠$悊鏈嶅姟 + * @return 鏈嶅姟鐨勫璞� + */ + public TypeIndexServicePrx getTypeIndexService() throws PLException { + return WebServiceProvider.getOMDService().getTypeIndexService(); + } + + /** * 鑾峰彇鐢熷懡鍛ㄦ湡鐨勬湇鍔� * @return 鐢熷懡鍛ㄦ湡鐨勬湇鍔″璞� */ diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java index a2c6224..fcba915 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java @@ -19,6 +19,7 @@ import com.vci.corba.omd.lcm.LifeCycle; import com.vci.corba.omd.ltm.LinkType; import com.vci.corba.omd.stm.StatePool; +import com.vci.corba.omd.tim.TypeIndexDef; import com.vci.corba.omd.vrm.VersionRule; import com.vci.dto.OsBtmTypeDTO; import com.vci.model.IndexObject; @@ -1285,29 +1286,18 @@ if (Func.isEmpty(conditionMap)) { return new ArrayList<>(); } - List<String> indexNameList = new ArrayList<String>(); - QueryTemplate qtl = new QueryTemplate(); - List<String> list = new ArrayList<String>(); - list.add("*"); - qtl.setBtmType("indexobject"); - qtl.setClauseList(list); - qtl.setId("p"); - qtl.setType("btm"); - qtl.setRightFlag(false); - Condition condition = OQTool.getCondition(conditionMap); - qtl.setCondition(condition); - //HashMap<String, String> indexmap = new HashMap<String, String>(); - BusinessObject findBTMObjects[] = platformClientUtil.getQueryService().findBTMObjects(qtl.getId(), OQTool.qtTOXMl(qtl).asXML()); List<IndexObject> indexObjects = new ArrayList<>(); - for (int i = 0; i < findBTMObjects.length; i++) { - BusinessObject findBTMObject = findBTMObjects[i]; + TypeIndexDef[] typenames = ClientServiceProvider.getOMDService().getTypeIndexService().getBTIndexDefs(conditionMap.get("typename")); + + for (int i = 0; i < typenames.length; i++) { + TypeIndexDef typename = typenames[i]; IndexObject indexObject = new IndexObject(); - indexObject.setOid(findBTMObject.oid); - indexObject.setDescription(findBTMObject.description); - indexObject.setCreateTime(Func.format(new Date(findBTMObject.createTime), DateUtil.PATTERN_DATE)); - indexObject.setIndexName(ObjectTool.getBOAttributeValue(findBTMObject, "indexname")); - indexObject.setTypeName(ObjectTool.getBOAttributeValue(findBTMObject, "typename")); - indexObject.setAttrNames(ObjectTool.getBOAttributeValue(findBTMObject, "attrname")); + indexObject.setOid(typename.oid); + indexObject.setDescription(typename.description); + indexObject.setCreateTime(Func.format(new Date(typename.createTime), DateUtil.PATTERN_DATE)); + indexObject.setIndexName(typename.name); + indexObject.setTypeName(typename.typeName); + indexObject.setAttrNames(typename.attributes); indexObjects.add(indexObject); } return indexObjects; @@ -1323,11 +1313,8 @@ @Override public boolean delIndex(String btmName, String indexName) throws PLException { VciBaseUtil.alertNotNull(btmName, "涓氬姟绫诲瀷鍚�", indexName, "绱㈠紩鍚�"); - Map<String, String> conditionMap = new HashMap<>(); - conditionMap.put("typename", btmName); - conditionMap.put("indexname", indexName); - List<IndexObject> bo2 = getIndexByCondition(conditionMap); - if (bo2 != null && bo2.size() > 0) { + TypeIndexDef[] typeIndexDef= ClientServiceProvider.getOMDService().getTypeIndexService().getBTIndexDefs(btmName); + if( typeIndexDef != null && typeIndexDef.length > 0 ){ String[] indexAttr = {indexName}; boolean alterFlag = platformClientUtil.getBtmService().dropIndex(btmName, indexAttr); @@ -1335,10 +1322,12 @@ if (!alterFlag) { return false; } - for (int i = 0; i < bo2.size(); i++) { - String oid = bo2.get(i).getOid(); - BusinessObject bo = platformClientUtil.getBOFactoryService().readBusinessObject(oid, "indexobject"); - platformClientUtil.getBOFactoryService().deleteBusinessObject(bo, 1); + for (int i = 0; i < typeIndexDef.length; i++) { + if(!typeIndexDef[i].name.equals(indexName)) { + continue; + } + String oid = typeIndexDef[i].oid; + ClientServiceProvider.getOMDService().getTypeIndexService().delIndexDef(oid); } } return true; @@ -1356,49 +1345,50 @@ String btmName = indexObjectList.get(0).getTypeName(); String indexNames = indexObjectList.stream().map(IndexObject::getIndexName).collect(Collectors.joining(",")); String[] oldindexAttr = {indexNames}; - BusinessObject bo; - List<BusinessObject> boList = new ArrayList<>(); - //鍏堟煡璇㈠綋鍓嶆坊鍔犵储寮曟槸鍚﹀凡缁忓瓨鍦紝濡傛灉瀛樺湪灏卞厛鍒犻櫎鍐嶆柊澧炲疄鐜版浛鎹㈡搷浣� - Map<String, String> conditionMap = new HashMap<>(); - conditionMap.put("typename", btmName); - //鍏堣繖鏍峰鐞嗭紝鍓嶇鐜板湪鍙仛浜嗗崟娆′繚瀛橈紝鎵�浠ヤ笉鐢╥n - conditionMap.put("indexname", indexNames); - List<IndexObject> indexObjects = getIndexByCondition(conditionMap); - if (indexObjects != null && indexObjects.size() > 0) { - //绱㈠紩涓嶅瓨鍦ㄦ椂鍒犻櫎灏变細鎶ラ敊绱㈠紩涓嶅瓨鍦紝鎵�浠ヨ繖閲屾湁绱㈠紩鎵嶅幓鍒犻櫎 - boolean b = platformClientUtil.getBtmService().dropIndex(btmName, oldindexAttr); - if (b) { - for (int i = 0; i < indexObjects.size(); i++) { - String oid = (String) indexObjects.get(i).getOid(); - bo = platformClientUtil.getBOFactoryService().readBusinessObject(oid, "indexobject"); - platformClientUtil.getBOFactoryService().deleteBusinessObject(bo, 1); - } - } - } +// BusinessObject bo; +// List<BusinessObject> boList = new ArrayList<>(); +// //鍏堟煡璇㈠綋鍓嶆坊鍔犵储寮曟槸鍚﹀凡缁忓瓨鍦紝濡傛灉瀛樺湪灏卞厛鍒犻櫎鍐嶆柊澧炲疄鐜版浛鎹㈡搷浣� +// Map<String, String> conditionMap = new HashMap<>(); +// conditionMap.put("typename", btmName); +// //鍏堣繖鏍峰鐞嗭紝鍓嶇鐜板湪鍙仛浜嗗崟娆′繚瀛橈紝鎵�浠ヤ笉鐢╥n +// conditionMap.put("indexname", indexNames); + TypeIndexDef[] typeIndexDefs = platformClientUtil.getTypeIndexService().getBTIndexDefs(btmName); - for (int i = 0; i < indexObjectList.size(); i++) { - IndexObject indexObject = indexObjectList.get(i); - //bo = platformClientUtil.getBOFService().initBusinessObject("indexobject"); - bo = boService.createCBOByBtmName("indexobject"); - List<AttributeValue> attributeValues = new ArrayList<>(); - attributeValues.add(new AttributeValue("typename", btmName)); - attributeValues.add(new AttributeValue("indexname", indexObject.getIndexName())); - attributeValues.add(new AttributeValue("attrname", indexObject.getAttrNames())); - bo.newAttrValList = attributeValues.toArray(new AttributeValue[attributeValues.size()]); - bo.description = indexObject.getDescription(); - String[] indexAttr = {indexObject.getIndexName(), indexObject.getAttrNames()}; - //缁欐寚瀹氫笟鍔$被鍨嬬殑鎸囧畾灞炴�у垱寤虹储寮� - boolean alterFlag = platformClientUtil.getBtmService().addIndex(btmName, indexAttr); - //绱㈠紩鍒涘缓鎴愬姛涔嬪悗锛岄渶瑕佸瓨鍌ㄦ垚鍔熺储寮曞埌绱㈠紩琛ㄤ腑 - if (!alterFlag) { - return false; + if(typeIndexDefs!=null && typeIndexDefs.length>0){ + boolean hasIndex = false; + for(int i = 0; i < typeIndexDefs.length; i ++){ + if(!typeIndexDefs[i].name.equals(indexNames)) { + continue; + } + String oid = typeIndexDefs[i].oid; + platformClientUtil.getTypeIndexService().delIndexDef(oid); + hasIndex = true; } - boList.add(bo); - //娣诲姞绱㈠紩淇℃伅鍒扮储寮曠殑涓氬姟琛ㄤ腑 - //platformClientUtil.getBOFactoryService().createBusinessObject(bo,false,false); + //绱㈠紩涓嶅瓨鍦ㄦ椂鍒犻櫎灏变細鎶ラ敊绱㈠紩涓嶅瓨鍦紝鎵�浠ヨ繖閲屾湁绱㈠紩鎵嶅幓鍒犻櫎 + if(hasIndex) { + platformClientUtil.getBtmService().dropIndex(btmName, oldindexAttr); + } } - //娣诲姞绱㈠紩淇℃伅鍒扮储寮曠殑涓氬姟琛ㄤ腑 - platformClientUtil.getBOFactoryService().batchCreateBusinessObject(boList.toArray(new BusinessObject[boList.size()]), false, false); + StringBuilder sb = new StringBuilder(); + List<TypeIndexDef> saveDefs = new ArrayList<>(); + for(int i = 0; i < indexObjectList.size(); i ++){ + TypeIndexDef saveDef = new TypeIndexDef(); + saveDef.typeName = indexObjectList.get(i).getTypeName(); + saveDef.name = indexObjectList.get(i).getIndexName(); + saveDef.description = indexObjectList.get(i).getDescription(); + saveDef.attributes = indexObjectList.get(i).getAttrNames(); + sb.append(indexObjectList.get(i).getAttrNames()); + if(i<indexObjectList.size()-1){ + sb.append(","); + } + saveDefs.add(saveDef); + } + String[] indexAttr = {indexObjectList.get(0).getIndexName(),sb.toString()}; + boolean alterFlag = platformClientUtil.getBtmService().addIndex(btmName, indexAttr); + if(!alterFlag) { + return false; + } + ClientServiceProvider.getOMDService().getTypeIndexService().saveIndexDefs(saveDefs.toArray(new TypeIndexDef[saveDefs.size()])); return true; } diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebIconServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebIconServiceImpl.java index 75ca637..53b7ac3 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebIconServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebIconServiceImpl.java @@ -81,6 +81,7 @@ icon.content = iconContent; icon.type = type; icon.groups = groups; + icon.plModifyUser = WebUtil.getCurrentUserId(); updateList.add(icon); }else{ PLIcon icon = new PLIcon(); @@ -89,6 +90,7 @@ icon.content = iconContent; icon.type = type; icon.groups = groups; + icon.plCreateUser = WebUtil.getCurrentUserId(); addList.add(icon); } } @@ -121,7 +123,8 @@ plIcon.content = iconContent; plIcon.type = iconDTO.getType(); plIcon.groups = iconDTO.getGroups(); - + plIcon.plCreateUser = WebUtil.getCurrentUserId(); + plIcon.plModifyUser = WebUtil.getCurrentUserId(); try { PortalServicePrx portalServicePrx = platformClientUtil.getPortalService(); portalServicePrx.savePLIcon(plIcon); @@ -154,6 +157,9 @@ plIcon.content = iconContent; plIcon.type = iconDTO.getType(); plIcon.groups = iconDTO.getGroups(); + plIcon.plCreateUser = iconDTO.getPlCreateUser(); + plIcon.plCreateTime = iconDTO.getPlCreateTime(); + plIcon.plModifyUser = WebUtil.getCurrentUserId(); portalServicePrx.updatePLIcon(plIcon); } catch (Exception e) { throw new RuntimeException(e); @@ -244,6 +250,10 @@ vo.setContent(icon.content); vo.setType(icon.type); vo.setGroups(icon.groups); + vo.setPlCreateTime(icon.plCreateTime); + vo.setPlCreateUser(icon.plCreateUser); + vo.setPlModifyTime(icon.plModifyTime); + vo.setPlModifyUser(icon.plModifyUser); String[] nameArr = icon.name.split(":"); if(nameArr.length > 1){ vo.setLable(nameArr[0]); diff --git a/Source/plt-web/plt-web-ui/src/api/processTemplate/define.js b/Source/plt-web/plt-web-ui/src/api/processTemplate/define.js new file mode 100644 index 0000000..7ef0064 --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/api/processTemplate/define.js @@ -0,0 +1,61 @@ +import request from '@/router/axios'; + +// 鍒楄〃鏌ヨ +export function getProcessTempList(params) { + return request({ + url: "/api/pvolumesController/getPvolumesPage", + method: "get", + params + }); +} +export function saveProcessTemp(params) { + return request({ + url: "/api/pvolumesController/savePvolume", + method: "post", + data: params + }); +} +export function updateProcessTemp(params) { + return request({ + url: "/api/pvolumesController/updatePvolume", + method: "post", + data: params + }); +} +export function deleteProcessTemp(params) { + return request({ + url: "/api/pvolumesController/deletePvolume", + method: "delete", + params + }) +} +// 瀵煎嚭 +export function download (params) { + return request({ + url: '/api/webEnumController/exportEnumTypes', + method: 'get', + headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}, + responseType: 'blob', + params + }) +} + +// 涓嬭浇瀵煎叆妯℃澘 +export function downloadTemplate (params) { + return request({ + url: '/api/webEnumController/downloadEnumTemplate', + method: 'get', + headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}, + responseType: 'blob', + params + }) +} + +// 鍋滅敤鍚敤 +export function stopProcessTemp(params) { + return request({ + url: "/api/userQueryController/stopUsers", + method: "post", + params + }); +} diff --git a/Source/plt-web/plt-web-ui/src/api/processTemplate/type.js b/Source/plt-web/plt-web-ui/src/api/processTemplate/type.js new file mode 100644 index 0000000..6f1abe2 --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/api/processTemplate/type.js @@ -0,0 +1,31 @@ +import request from '@/router/axios'; + +// 鍒楄〃鏌ヨ +export function getTypeList(params) { + return request({ + url: "/api/pvolumesController/getPvolumesPage", + method: "get", + params + }); +} +export function saveType(params) { + return request({ + url: "/api/pvolumesController/savePvolume", + method: "post", + data: params + }); +} +export function updateType(params) { + return request({ + url: "/api/pvolumesController/updatePvolume", + method: "post", + data: params + }); +} +export function deleteType(params) { + return request({ + url: "/api/pvolumesController/deletePvolume", + method: "delete", + params + }) +} diff --git a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue index bd6df19..d09d91f 100644 --- a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue +++ b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue @@ -1,6 +1,6 @@ <template> <!--鍔ㄦ�佹ā鏉�--> - <avue-form ref="form" :option="option" v-model="form" v-loading="loading"> + <avue-form ref="basicform" :option="option" v-model="form" v-loading="loading"> <template v-for="item in allColumn" :slot="item.prop+ ''"> <vciWebRefer v-if="item.type === 'refer'" @@ -326,7 +326,7 @@ // 琛ㄥ崟鏍¢獙 validate(done) { return new Promise((resolve) => { - this.$refs.form.validate((valid,fields) => { + this.$refs.basicform.validate((valid,fields) => { done(valid,fields); if (valid) { resolve(true); @@ -339,13 +339,19 @@ }); }, resetFields(){ - this.$refs.form.resetFields() + this.$refs.basicform.resetFields() }, clearValidate(props){ - this.$refs.form.clearValidate(props) + this.$refs.basicform.clearValidate(props) }, updateDic(prop,data){ - this.$refs.form.updateDic(prop,data) + this.$refs.basicform.updateDic(prop,data) + }, + dicInit(){ + this.$refs.basicform.dicInit() + }, + getPropRef(){ + this.$refs.basicform.getPropRef() } }, }; diff --git a/Source/plt-web/plt-web-ui/src/store/modules/user.js b/Source/plt-web/plt-web-ui/src/store/modules/user.js index 216bac7..fc95d95 100644 --- a/Source/plt-web/plt-web-ui/src/store/modules/user.js +++ b/Source/plt-web/plt-web-ui/src/store/modules/user.js @@ -244,7 +244,6 @@ return new Promise((resolve) => { getButtons().then(res => { const data = res.data.data; - console.log('getButton', data) commit('SET_PERMISSION', data); resolve(); }) diff --git a/Source/plt-web/plt-web-ui/src/styles/ui.scss b/Source/plt-web/plt-web-ui/src/styles/ui.scss index 1faae30..de021e8 100644 --- a/Source/plt-web/plt-web-ui/src/styles/ui.scss +++ b/Source/plt-web/plt-web-ui/src/styles/ui.scss @@ -413,17 +413,22 @@ display: flex; align-items: center; } +/**鍙充晶渚ф搷浣滄爮**/ +.avue-crud__right{ + display: flex; + align-items: center; +} /**琛ㄥ唴鎿嶄綔鏍�**/ .avue-crud .avue-crud__menu{ min-height: 18px; display: flex; - justify-content: space-around; + justify-content: flex-start; } .avue-crud .avue-crud__menu .el-button{ } .avue-crud .avue-crud__menu .el-button--text{ - padding: 2px 6px; + padding: 2px 3px; display: flex; } .avue-crud .avue-crud__menu .el-button--text > span { @@ -594,7 +599,7 @@ font-size: 12px !important; width: 12px !important; height: 12px !important; - margin-right: 6px; + margin-right: 2px; } .el-table td.el-table__cell div.iconShow{ @@ -602,7 +607,7 @@ width: 14px !important; height: 14px !important; margin-top: -1px; - margin-right: 3px; + margin-right: 1px; } /* diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue index 95d0ec0..3f57118 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue @@ -516,8 +516,8 @@ </el-form> </div> <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="addSaveHandler">纭� 瀹�</el-button> - <el-button @click="addEscHandler">鍙� 娑�</el-button> + <el-button size="small" type="primary" @click="addSaveHandler">纭� 瀹�</el-button> + <el-button size="small" @click="addEscHandler">鍙� 娑�</el-button> </span> </el-dialog> <!--瀵煎叆 --> diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue index c010a36..d6f2c2e 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue @@ -319,8 +319,8 @@ </avue-crud> </div> <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="addDialogSavaHandler">纭� 瀹�</el-button> - <el-button @click="addDialogClose">鍙� 娑�</el-button> + <el-button size="small" type="primary" @click="addDialogSavaHandler">纭� 瀹�</el-button> + <el-button size="small" @click="addDialogClose">鍙� 娑�</el-button> </span> </el-dialog> @@ -350,8 +350,8 @@ > </avue-crud> <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="dialogAttrAddClickHandler">纭� 瀹�</el-button> - <el-button @click="dialogAttrClose">鍙� 娑�</el-button> + <el-button size="small" type="primary" @click="dialogAttrAddClickHandler">纭� 瀹�</el-button> + <el-button size="small" @click="dialogAttrClose">鍙� 娑�</el-button> </span> </el-dialog> @@ -394,8 +394,8 @@ :table-loading="conCheckLoading"> </avue-crud> <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="repairClickHandler">淇� 澶�</el-button> - <el-button @click="conCheckVisible = false">鍙� 娑�</el-button> + <el-button size="small" type="primary" @click="repairClickHandler">淇� 澶�</el-button> + <el-button size="small" @click="conCheckVisible = false">鍙� 娑�</el-button> </span> </el-dialog> @@ -459,8 +459,8 @@ </span> </el-dialog> <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="indexClickAddHandler">淇� 瀛�</el-button> - <el-button @click="indexDialogClose">鍙� 娑�</el-button> + <el-button size="small" type="primary" @click="indexClickAddHandler">淇� 瀛�</el-button> + <el-button size="small" @click="indexDialogClose">鍙� 娑�</el-button> </span> </el-dialog> diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue index 1c8e48f..87ba040 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue @@ -114,8 +114,8 @@ </el-row> </el-form> <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="rowSaveHandler">纭� 瀹�</el-button> - <el-button @click="dialogVisible = false">鍙� 娑�</el-button> + <el-button size="small" type="primary" @click="rowSaveHandler">纭� 瀹�</el-button> + <el-button size="small" @click="dialogVisible = false">鍙� 娑�</el-button> </span> </el-dialog> diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue index 4ffacbf..285f5bc 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue @@ -210,7 +210,6 @@ prop="name"> </el-table-column> <el-table-column - fixed="right" label="鎿嶄綔" width="60"> <template slot-scope="scope"> @@ -251,7 +250,6 @@ prop="name"> </el-table-column> <el-table-column - fixed="right" label="鎿嶄綔" width="60"> <template slot-scope="scope"> @@ -296,8 +294,8 @@ </avue-crud> </div> <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="addDialogSavaHandler">纭� 瀹�</el-button> - <el-button @click="addDialogClose">鍙� 娑�</el-button> + <el-button size="small" type="primary" @click="addDialogSavaHandler">纭� 瀹�</el-button> + <el-button size="small" @click="addDialogClose">鍙� 娑�</el-button> </span> <!-- 灞炴�ф睜鍒楄〃 --> @@ -326,8 +324,8 @@ > </avue-crud> <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="dialogAttrAddClickHandler">纭� 瀹�</el-button> - <el-button @click="dialogAttrClose">鍙� 娑�</el-button> + <el-button size="small" type="primary" @click="dialogAttrAddClickHandler">纭� 瀹�</el-button> + <el-button size="small" @click="dialogAttrClose">鍙� 娑�</el-button> </span> </el-dialog> </el-dialog> @@ -347,8 +345,8 @@ :table-loading="conCheckLoading"> </avue-crud> <span slot="footer" class="dialog-footer"> - <el-button @click="conCheckVisible = false">鍙� 娑�</el-button> - <el-button type="primary" @click="repairClickHandler">淇� 澶�</el-button> + <el-button size="small" @click="conCheckVisible = false">鍙� 娑�</el-button> + <el-button size="small" type="primary" @click="repairClickHandler">淇� 澶�</el-button> </span> </el-dialog> @@ -374,8 +372,8 @@ </avue-crud> <span slot="footer" class="dialog-footer"> - <el-button @click="bizTypeVisible = false">鍙� 娑�</el-button> - <el-button type="primary" @click="bizTypeAddHandler">纭� 瀹�</el-button> + <el-button size="small" type="primary" @click="bizTypeAddHandler">纭� 瀹�</el-button> + <el-button size="small" @click="bizTypeVisible = false">鍙� 娑�</el-button> </span> </el-dialog> diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue index 8253787..714041e 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue @@ -97,8 +97,8 @@ </el-row> </el-form> <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="addSaveHandler">纭� 瀹�</el-button> - <el-button @click="visibleCloseHandler">鍙� 娑�</el-button> + <el-button size="small" type="primary" @click="addSaveHandler">纭� 瀹�</el-button> + <el-button size="small" @click="visibleCloseHandler">鍙� 娑�</el-button> </span> </el-dialog> diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue index 3056f86..2acc434 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue @@ -9,7 +9,7 @@ width="1620px" @close="cancelDialog"> <div style="min-height: 665px;max-height: 85vh;padding-bottom: 50px;"> - <basic-form key="linkQueryForm" ref="form" + <basic-form key="businessQueryForm" ref="form" :formData="form" :formItems="formItems" :span="4" @@ -226,11 +226,7 @@ return false; }, allowDrag: (dropNode) => { - if (dropNode.data.attrs && dropNode.data.attrs.length > 0) { - return false; - } else { - return true; - } + return true; }, props: { label: 'name', @@ -299,7 +295,6 @@ this.$refs.form.validate((valid) => { if (valid) { const formData = this.initFormData(); - console.log(formData) btmSave(formData).then(res => { if (res.data.success) { this.$message.success("淇濆瓨鎴愬姛"); @@ -369,7 +364,7 @@ this.orderFieldList.unshift({ id: data.row.orderField }); - this.tableFormOption.column[0].dicData = this.orderFieldList + this.$refs.tableForm.updateDic('orderField',this.orderFieldList); }, //鑾峰彇鎺掑簭璁剧疆涓墍鏈夋帓搴忓瓧娈� getAllAttr() { @@ -426,10 +421,7 @@ }, businessQueryDefineChange(data) { if (data.value) { - this.businessTreeData = [{ - name: data.value, - attrs: data.item.attrs - }] + this.businessTreeData = [data.item] } }, // 寮�濮嬫嫋鎷芥爲鑺傜偣浜嬩欢 diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue index 70f3010..bdcce3f 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue @@ -48,11 +48,6 @@ @row-click="rowClick" :data="crudData" :option="crudOption" :table-loading="tableLoading" style="margin-top: 10px"> </avue-crud> - <form-dialog ref="formRef" @refresh="getTemp"></form-dialog> - <!--瀵煎叆 --> - <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆" - @updata="uploadCallBack"></upload-file> - <div> <fieldset> <legend> 鏌ヨ鏉′欢 </legend> @@ -65,6 +60,11 @@ ></form-query-dialog> </fieldset> </div> + <!--娣诲姞 淇敼寮圭獥--> + <form-dialog ref="formRef" @refresh="getTemp"></form-dialog> + <!--瀵煎叆 --> + <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆" + @updata="uploadCallBack"></upload-file> </basic-container> </el-main> @@ -125,7 +125,7 @@ selection: true, menu: false, height: "auto", - calcHeight: 300, + calcHeight: 305, tip: false, header:false, column: [{ @@ -197,9 +197,17 @@ }, // 鏍戠偣鍑� nodeClick(row) { - this.nodeRow = row; - this.tableLoading = true; - this.getTemp(); + if(row.oid=="topNode"){ + this.nodeRow = null; + this.crudData=[]; + this.queryCondition=[]; + this.queryTree={}; + this.levelFlag=0; + }else{ + this.nodeRow = row; + this.tableLoading = true; + this.getTemp(); + } }, //妯℃澘鍒楄〃鏁版嵁 getTemp() { @@ -319,6 +327,9 @@ .el-scrollbar__wrap { overflow: auto !important; } + .el-main .avue-crud .avue-crud__body .el-card__body .el-form .el-table--small{ + min-height: 300px; + } } fieldset { padding: 10px 6px; diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue index 4147ca2..f49918d 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue @@ -2,7 +2,7 @@ <el-dialog v-dialogDrag :title="dialog.title" :visible.sync="dialog.showDialog" - width="1620px" + width="1650px" :append-to-body="true" class="avue-dialog" :destroy-on-close="true" @@ -124,7 +124,7 @@ prop: 'qtName', type: 'input', span:4.5, - labelWidth: 100, + labelWidth: 110, rules: [{ required: true, message: "璇疯緭鍏ユ煡璇㈡ā鏉垮悕绉�", @@ -143,13 +143,35 @@ }, { label: '鍙嶅悜', value: 'opposite' - }] + }], + control: (val, form) => { + const dicData=this.getDicData(val); + this.form.btmType=dicData[0].value + return { + btmType: { + dicData: dicData + } + }; + } },{ label: '涓氬姟绫诲瀷', prop: 'btmType', type: 'select', labelWidth:110, - dicData: [] + clearable:false, + rules: [{ + required: true, + message: "璇烽�夋嫨涓氬姟绫诲瀷", + trigger: "blur" + }], + dicData: [], + change: ({ value, column, item, dic }) => { + this.form.btmType=value; + if(value){ + this.getAllAttr(); + this.getTemp(value,false); + } + }, }, { label: '鐗堟湰鐗堟', prop: 'version', @@ -286,11 +308,7 @@ return false; }, allowDrag: (dropNode) => { - if (dropNode.data.attrs && dropNode.data.attrs.length>0) { - return false; - } else { - return true; - } + return true; }, props:{ label:'name', @@ -313,54 +331,7 @@ }; }, - watch: { - //鏂瑰悜 - 'form.direction': { - handler(val) { - if(val=='positive'){ - //姝e悜 - const dicData=this.treeData.btmItemsTo.map(item=>{ - return { - label: item, - value: item - } - }) - dicData.push({ - label: '鎵�鏈夌被鍨�', - value: '*' - }) - this.$refs.form.updateDic('btmType', dicData); - this.form.btmType=dicData[0].value - this.getAllAttr(); - }else if(val=='opposite'){ - //鍙嶅悜 - const dicData=this.treeData.btmItemsFrom.map(item=>{ - return { - label: item, - value: item - } - }) - dicData.push({ - label: '鎵�鏈夌被鍨�', - value: '*' - }) - this.$refs.form.updateDic('btmType', dicData); - this.form.btmType=dicData[0].value - this.getAllAttr(); - } - }, - immediate: true, - }, - //涓氬姟绫诲瀷 - 'form.btmType': { - handler(val) { - if(val && val!='*'){ - this.getTemp(val,false); - } - }, - immediate: true, - } - }, + watch: {}, methods: { openDialog(btmName, title, mode, data) { this.dialog.title = title; @@ -382,7 +353,11 @@ this.queryCondition=this.selectData.queryTemplate.condition; this.queryTree=this.selectData.tree; this.form.levelFlag=this.selectData.levelFlag; + + const dicData=this.getDicData(this.form.direction); + this.formItems[2].dicData=dicData; } else { + this.form.direction='positive'; this.selectData = {}; this.orderInfoList = []; this.queryCondition=[]; @@ -390,11 +365,39 @@ connector:'骞朵笖', child:[] }; + const dicData=this.getDicData(this.form.direction); + this.formItems[2].dicData=dicData; + this.form.btmType=dicData[0].value; } this.dialog.showDialog = true; this.treeOption.defaultExpandedKeys=[data.treeData.label] this.getTemp(data.treeData.label, true) - + }, + //鑾峰彇涓氬姟绫诲瀷涓嬫媺鏁版嵁 + getDicData(directionVal){ + let dicData=[]; + if(directionVal=='positive'){ + //姝e悜 + dicData=this.treeData.btmItemsTo.map(item=>{ + return { + label: item, + value: item + } + }) + }else if(directionVal=='opposite'){ + //鍙嶅悜 + dicData=this.treeData.btmItemsFrom.map(item=>{ + return { + label: item, + value: item + } + }) + } + dicData.push({ + label: '鎵�鏈夌被鍨�', + value: '*' + }) + return dicData; }, cancelDialog() { this.dialog.loading = false; @@ -495,7 +498,7 @@ this.orderFieldList.unshift({ id: data.row.orderField }); - this.tableFormOption.column[0].dicData= this.orderFieldList + this.$refs.tableForm.updateDic('orderField',this.orderFieldList); }, //鑾峰彇鎺掑簭璁剧疆涓墍鏈夋帓搴忓瓧娈� getAllAttr() { @@ -559,18 +562,12 @@ }, linkQueryDefineChange(data) { if (data.value) { - this.linkTreeData = [{ - name: data.value, - attrs: data.item.attrs - }] + this.linkTreeData = [ data.item] } }, businessQueryDefineChange(data) { if (data.value) { - this.businessTreeData = [{ - name: data.value, - attrs: data.item.attrs - }] + this.businessTreeData = [ data.item] } }, // 寮�濮嬫嫋鎷芥爲鑺傜偣浜嬩欢 diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue index 837849b..f03a5b9 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue @@ -13,18 +13,18 @@ style="width: 32%;display: inline-block;text-align: right;word-break: break-all">{{ condition.clause }}</span> <avue-select v-model="condition.operator" :clearable="false" :dic="condition.operatorDic" :disabled="readOnly" style="width: 80px;margin: 0 5px;" type="tree"></avue-select> - <!--<el-date-picker v-if="condition.type=='VTDate'" v-model="condition.ordinaryValue" :disabled="readOnly" - style="width:300px;margin-right: 5px;display: inline-block;" type="date" + <el-date-picker v-if="condition.type=='VTDate'" v-model="condition.ordinaryValue" :disabled="readOnly" + style="width:36%;margin-right: 5px;display: inline-block;" type="date" value-format="YYYY-MM-DD"> </el-date-picker> <el-date-picker v-else-if="condition.type=='VTDateTime'" v-model="condition.ordinaryValue" :disabled="readOnly" - style="width:300px;margin-right: 5px;display: inline-block;" + style="width:36%;margin-right: 5px;display: inline-block;" type="datetime"> </el-date-picker> <el-time-select v-else-if="condition.type=='VTTime'" v-model="condition.ordinaryValue" :disabled="readOnly" - style="width:300px;margin-right: 5px;display: inline-block;" value-format="HH:mm:ss"> + style="width:36%;margin-right: 5px;display: inline-block;" value-format="HH:mm:ss"> </el-time-select> - <avue-input-number v-else-if="condition.type=='VTInteger'" v-model="condition.ordinaryValue" + <!--<avue-input-number v-else-if="condition.type=='VTInteger'" v-model="condition.ordinaryValue" :disabled="readOnly" precision="0" style="width:300px;margin-right: 5px;display: inline-block;"></avue-input-number> @@ -34,7 +34,7 @@ style="width:300px;margin-right: 5px;display: inline-block;"></avue-input-number> <avue-input v-else v-model="condition.ordinaryValue" :disabled="readOnly" placeholder="" style="width: 300px;margin-right: 5px;"></avue-input>--> - <avue-input v-model="condition.ordinaryValue" :disabled="readOnly" placeholder="" + <avue-input v-else v-model="condition.ordinaryValue" :disabled="readOnly" placeholder="" style="width: 36%;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" icon="el-icon-delete" size="mini" style="padding: 7px 8px" type="danger" @@ -49,11 +49,11 @@ @node-click="nodeClick"></avue-tree> </div> <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> + <el-button v-show="radioForm==1" plain size="mini" type="primary" @click="addHandler">澧炲姞閫昏緫</el-button> + <el-button v-show="radioForm==1" plain size="mini" type="primary" @click="editHandler">淇敼鏉′欢</el-button> + <el-button v-show="radioForm==1" plain size="mini" type="primary" @click="delHandler">鍒犻櫎</el-button> <el-button plain size="mini" type="primary" @click="queryHandler">鏌ヨ</el-button> - <el-button plain size="mini" type="primary" @click="">鍙栨秷</el-button> + <!--<el-button plain size="mini" type="primary" @click="">鍙栨秷</el-button>--> </div> <!--淇敼鏉′欢--> @@ -155,7 +155,6 @@ <script> import basicOption from "@/util/basic-option"; import {getAllQTs} from "@/api/queryTemplate/queryDefine"; -import {getCriteria} from "@/api/queryTemplate/linkTypeQuery"; import {dateFormat} from "@/util/date" export default { @@ -506,7 +505,9 @@ } }, created() { - this.getTemp(); + if (!this.readOnly) { + this.getTemp(); + } }, methods: { // 鎷栨嫿鍒版椂 @@ -681,7 +682,8 @@ //閫夋嫨鏌ヨ妯℃澘 checkTemp(index) { if (index >= 0) { - if (['VTInteger', 'VTDouble', 'VTLong', 'VTDateTime', 'VTDate', 'VTTime'].includes(this.conditionList[index].type)) { + if (['VTDateTime', 'VTDate', 'VTTime'].includes(this.conditionList[index].type)) { + this.$message.warning("璇ュ睘鎬х被鍨嬩笉鑳介�夋嫨鏌ヨ妯℃澘"); return false; } } diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue index c8b8209..b3519cc 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue @@ -45,12 +45,8 @@ <avue-crud ref="crud" @selection-change="selectionChange" @row-click="rowClick" - :data="crudData" :option="crudOption" :table-loading="tableLoading" style="margin-top: 10px"> + :data="crudData" :option="crudOption" :table-loading="tableLoading" style="margin-top: 10px;"> </avue-crud> - <form-dialog ref="formRef" @refresh="getTemp"></form-dialog> - <!--瀵煎叆 --> - <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆" - @updata="uploadCallBack"></upload-file> <div> <fieldset> <legend> 鏌ヨ鏉′欢 </legend> @@ -63,6 +59,11 @@ ></form-query-dialog> </fieldset> </div> + <!--娣诲姞 淇敼寮圭獥--> + <form-dialog ref="formRef" @refresh="getTemp"></form-dialog> + <!--瀵煎叆 --> + <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆" + @updata="uploadCallBack"></upload-file> </basic-container> </el-main> </el-container> @@ -112,7 +113,7 @@ selection: true, menu: false, height: "auto", - calcHeight: 300, + calcHeight: 305, tip: false, header:false, column: [{ @@ -140,7 +141,11 @@ prop: 'btmType', width: 130, formatter:function (row, value) { - return row.queryTemplate.btmType; + if (row.queryTemplate.btmType == '*') { + return '鎵�鏈夌被鍨�' + } else { + return row.queryTemplate.btmType; + } } }, { label: '鐗堟湰鐗堟', @@ -163,7 +168,11 @@ prop: 'queryISLeaf', width: 120, formatter:function (row, value) { - return row.queryTemplate.queryISLeaf + if(row.queryTemplate.queryISLeaf=='false' || row.queryTemplate.queryISLeaf==false){ + return '鍚�' + }else{ + return '鏄�' + } } }, { label: '瀛愯妭鐐瑰眰娆℃暟', @@ -220,9 +229,17 @@ // 鏍戠偣鍑� nodeClick(row) { - this.nodeRow = row; - this.tableLoading = true; - this.getTemp(); + if(row.oid=="topNode"){ + this.nodeRow = null; + this.crudData=[]; + this.queryCondition=[]; + this.queryTree={}; + this.levelFlag=0; + }else{ + this.nodeRow = row; + this.tableLoading = true; + this.getTemp(); + } }, //鑾峰彇鏌ヨ妯℃澘鍒楄〃 getTemp() { @@ -344,6 +361,9 @@ .el-scrollbar__wrap { overflow: auto !important; } + .el-main .avue-crud .avue-crud__body .el-card__body .el-form .el-table--small{ + min-height: 300px; + } } fieldset { diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue index 6859461..00fc35a 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue @@ -13,7 +13,8 @@ @selection-change="selectChangeHandler" @row-click="rowClickHandler"> <template slot="menuLeft" slot-scope="scope"> - <el-button v-if="permissionChildrenList.UiPageLayoutAddBtn" class="button-custom-icon" plain size="small" type="primary" + <el-button v-if="permissionChildrenList.UiPageLayoutAddBtn" class="button-custom-icon" plain size="small" + type="primary" @click="addClickHandler"> <icon-show :name="permissionChildrenList.UiPageLayoutAddBtn.source"></icon-show> 澧炲姞 @@ -26,15 +27,18 @@ <icon-show :name="permissionChildrenList.UiPageLayoutDesignBtn.source"></icon-show> 鎸夐挳璁捐 </el-button> - <el-button v-if="permissionChildrenList.UiPageLayoutEditBtn" size="small" type="text" @click="editBtnClick(scope.row)"> + <el-button v-if="permissionChildrenList.UiPageLayoutEditBtn" size="small" type="text" + @click="editBtnClick(scope.row)"> <icon-show :name="permissionChildrenList.UiPageLayoutEditBtn.source"></icon-show> 缂栬緫 </el-button> - <el-button v-if="permissionChildrenList.UiPageLayoutDelBtn" size="small" type="text" @click="rowDeleteHandler(scope.row)"> + <el-button v-if="permissionChildrenList.UiPageLayoutDelBtn" size="small" type="text" + @click="rowDeleteHandler(scope.row)"> <icon-show :name="permissionChildrenList.UiPageLayoutDelBtn.source"></icon-show> 鍒犻櫎 </el-button> - <el-button v-if="permissionChildrenList.UiPageLayoutCloneBtn" size="small" type="text" @click="rowCloneHandler(scope.row)"> + <el-button v-if="permissionChildrenList.UiPageLayoutCloneBtn" size="small" type="text" + @click="rowCloneHandler(scope.row)"> <icon-show :name="permissionChildrenList.UiPageLayoutCloneBtn.source"></icon-show> 鍏嬮殕 </el-button> @@ -124,19 +128,27 @@ <el-container v-loading="dialogLoading"> <el-header style="height: 40px !important;padding-left: 5px;"> <div style="display: flex"> - <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" @click="addClickBtnHandler">娣诲姞 + <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" + @click="addClickBtnHandler">娣诲姞 </el-button> - <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" @click="editClickBtnHandler">淇敼 + <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" + @click="editClickBtnHandler">淇敼 </el-button> - <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="danger" @click="delClickBtnHandler">鍒犻櫎 + <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="danger" + @click="delClickBtnHandler">鍒犻櫎 </el-button> - <el-button v-show="!disabledBtn" :disabled="disabledBtn" plain size="mini" icon="el-icon-check" type="success" @click="saveClickBtnHandler">淇濆瓨 + <el-button v-show="!disabledBtn" :disabled="disabledBtn" icon="el-icon-check" plain size="mini" + type="success" @click="saveClickBtnHandler">淇濆瓨 </el-button> - <el-button v-show="!disabledBtn" :disabled="disabledBtn" plain size="mini" icon="el-icon-close" type="danger" @click="escClickBtnHandler">鍙栨秷 + <el-button v-show="!disabledBtn" :disabled="disabledBtn" icon="el-icon-close" plain size="mini" + type="danger" @click="escClickBtnHandler">鍙栨秷 </el-button> - <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeBottomBtnHandler">璋冩暣涓轰笅绾ф寜閽�</el-button> - <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeTopBtnHandler">璋冩暣涓轰笂绾ф寜閽�</el-button> - <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="cloneClickBtnHandler">澶嶅埗鍒板叾浠栫粍浠�</el-button> + <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeBottomBtnHandler">璋冩暣涓轰笅绾ф寜閽� + </el-button> + <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeTopBtnHandler">璋冩暣涓轰笂绾ф寜閽� + </el-button> + <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="cloneClickBtnHandler">澶嶅埗鍒板叾浠栫粍浠� + </el-button> </div> </el-header> <el-container> @@ -176,15 +188,17 @@ </el-col> <el-col :span="12"> - <el-form-item label="鍚嶇О锛�" prop="label"> + <el-form-item label="鍚嶇О锛�" prop="label"> <el-input v-model="basicForm.label" :disabled="disabledBtn"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="Action锛�" prop="actionName"> - <el-input v-model="basicForm.actionName" :disabled="disabledBtn" :clearable="true" @focus="actionFoucus" @clear="clearActionValue"> - <i slot="suffix" class="el-input__icon el-icon-search" style="cursor: pointer" @click="actionFoucus"></i> + <el-input v-model="basicForm.actionName" :clearable="true" :disabled="disabledBtn" + @clear="clearActionValue" @focus="actionFoucus"> + <i slot="suffix" class="el-input__icon el-icon-search" style="cursor: pointer" + @click="actionFoucus"></i> </el-input> </el-form-item> </el-col> @@ -204,15 +218,16 @@ </el-form-item> </el-col> - <el-col :span="12" v-show="basicForm.show=='0'"> + <el-col v-show="basicForm.show=='0'" :span="12"> <el-form-item label="鏄剧ず鏂瑰紡锛�" prop="showType"> <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="text">鏂囧瓧</el-radio> <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="image">鍥炬爣</el-radio> - <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="textandimage">鏂囧瓧鍜屽浘鏍�</el-radio> + <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="textandimage">鏂囧瓧鍜屽浘鏍� + </el-radio> </el-form-item> </el-col> <el-col :span="24" v-show="basicForm.show=='0' && (basicForm.displayMode=='image'||basicForm.displayMode=='textandimage')"> - <el-form-item label="鍥炬爣锛�" prop="iconPath"> + <el-form-item :class="basicForm.displayMode==='image'?'is-required':''" label="鍥炬爣锛�" prop="iconPath"> <input-icon v-model="basicForm.iconPath" :disabled="disabledBtn"></input-icon> </el-form-item> </el-col> @@ -256,7 +271,8 @@ </el-container> </el-container> </el-dialog> - <action-dialog ref="actionDialog" @cancelAction="actionCancelHandler" @updataAction="actionSaveHandler"></action-dialog> + <action-dialog ref="actionDialog" @cancelAction="actionCancelHandler" + @updataAction="actionSaveHandler"></action-dialog> <clone-dialog ref="cloneDialog" :fromOid="fromOid" :sourceOId="sourceOId" paramsType="tab" type="pageDef"></clone-dialog> <clone-dialog ref="cloneBtnDialog" :fromOid="formBtnOid" :sourceOId="sourceBtnOid" paramsType="pageDef" @@ -373,15 +389,15 @@ editBtn: false, delBtn: false, refreshBtn: false, - dialogWidth:'600', - menuWidth:'140', + dialogWidth: '600', + menuWidth: '140', column: [ { label: '鍚嶇О', prop: 'name', - width:180, + width: 180, span: 24, - overHidden:true, + overHidden: true, rules: [ { required: true, @@ -393,9 +409,9 @@ { label: '鍊�', prop: 'value', - type:'textarea', + type: 'textarea', span: 24, - overHidden:true, + overHidden: true, rules: [ { required: true, @@ -437,14 +453,14 @@ data: [], option: { ...basicOption, - size:'mini', + size: 'mini', height: this.height, addBtn: false, index: true, calcHeight: -30, editBtn: false, delBtn: false, - menuWidth:300, + menuWidth: 300, column: [ { label: '鍚嶇О', @@ -462,7 +478,7 @@ { label: '缂栧彿', prop: 'seq', - width:100, + width: 100, labelWidth: 110, hide: false, rules: [ @@ -615,8 +631,8 @@ ], group: [ { - icon:'el-icon-info', - label:'', + icon: 'el-icon-info', + label: '', arrow: true, prop: 'group1', column: [ @@ -866,10 +882,10 @@ lastIndex: null, selectList: [], formDataRow: {}, - defaultForm:{}, + defaultForm: {}, } }, - computed:{ + computed: { ...mapGetters(["permission"]), permissionChildrenList() { return { @@ -1262,14 +1278,14 @@ if (this.saveType === 'add') { this.$refs.Tree.setCurrentKey(null); this.$refs.form.resetFields(); - }else { + } else { this.basicForm = {...this.defaultForm}; } }, // 鎸夐挳璁捐淇濆瓨 saveClickBtnHandler() { - if (this.basicForm.show == '0' && (this.basicForm.displayMode == 'image' || this.basicForm.displayMode == 'textandimage') && this.basicForm.iconPath == '') { + if (this.basicForm.show == '0' && this.basicForm.displayMode == 'image' && this.basicForm.iconPath == '') { this.$message.error('璇烽�夋嫨鍥炬爣'); return; } @@ -1373,13 +1389,13 @@ }, // action閫夋嫨寮圭獥鐩存帴鍏抽棴 actionCancelHandler() { - if(this.basicForm.actionOId){ + if (this.basicForm.actionOId) { this.$refs.form.clearValidate('Action') } }, //娓呴櫎action - clearActionValue(){ + clearActionValue() { this.$set(this.basicForm, 'actionName', ''); this.$set(this.basicForm, 'actionOId', ''); }, diff --git a/Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue new file mode 100644 index 0000000..c0ed872 --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue @@ -0,0 +1,336 @@ +<template> + <!--娴佺▼妯℃澘瀹氫箟--> + <basic-container style="height: calc(100vh - 123px)"> + <div style="margin-bottom: 5px;"> + 娴佺▼鍒嗙被锛� + <el-select v-model="tempType" :clearable="true" placeholder="璇烽�夋嫨" size="small" + style="width: 300px;margin-right: 20px;" + @change="tempTypeChange"> + <el-option + v-for="item in tempTypeData" + :key="item.id" + :label="item.name" + :value="item.id"> + </el-option> + </el-select> + 娴佺▼妯℃澘鍚嶇О锛� + <el-input size="small" v-model="tempName" style="width: 300px;margin-right: 10px;"></el-input> + <el-button icon="el-icon-search" plain size="small" style="margin-right: 40px;" type="primary" + @click="searchData"> + 鏌ヨ + </el-button> + </div> + <el-container style="height: calc(100% - 100px)"> + <el-aside style="width: 40%;min-width: 500px;margin-right: 5px;"> + <avue-crud + ref="crud" + :data="tableData" + :option="option" + :table-loading="tableLoading" + @on-load="getTableList" + @refresh-change="getTableList" + @selection-change="selectionChange" + @row-click="rowClickHandler" + > + <template slot="menuLeft" slot-scope="scope"> + <el-button v-if="permissionList.addBtn" class="button-custom-icon" plain size="small" type="primary" + @click="handlerAdd"> + <icon-show :name="permissionList.addBtn.source"></icon-show> + 澧炲姞 + </el-button> + <el-button v-if="permissionList.downloadImportTemplateBtn" class="button-custom-icon" plain size="small" + type="primary" @click="downloadTemplateHandler"> + <icon-show :name="permissionList.downloadImportTemplateBtn.source"></icon-show> + 涓嬭浇瀵煎叆妯℃澘 + </el-button> + <el-button v-if="permissionList.importBtn" class="button-custom-icon" plain size="small" type="primary" + @click="uploadHandler"> + <icon-show :name="permissionList.importBtn.source"></icon-show> + 瀵煎叆 + </el-button> + <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" + @click="downloadHandler"> + <icon-show :name="permissionList.exportBtn.source"></icon-show> + 瀵煎嚭 + </el-button> + </template> + + <template slot="menu" slot-scope="scope"> + <el-button v-if="permissionList.editBtn" size="small" type="text" + @click="handleEdit(scope.row)"> + <icon-show :name="permissionList.editBtn.source"></icon-show> + 缂栬緫 + </el-button> + <el-button v-if="permissionList.delBtn" size="small" type="text" + @click="handleDel(scope.row)"> + <icon-show :name="permissionList.delBtn.source"></icon-show> + 鍒犻櫎 + </el-button> + <el-button size="small" type="text" @click.stop="stopHandler(scope.row)"> + <span v-if="scope.row.status === 0 && permissionList.stopBtn" style="color: #fa3434;display: flex"> + <icon-show :name="permissionList.stopBtn.source"></icon-show> + 鍋滅敤 + </span> + <span v-if="scope.row.status === 1 && permissionList.actionBtn" style="color: #55b61d;display: flex"> + <icon-show :name="permissionList.actionBtn.source"></icon-show> + 鍚敤 + </span> + </el-button> + </template> + + </avue-crud> + <!-- 鍒涘缓缂栬緫鑷畾涔夊璇濇 --> + <el-dialog + v-dialogDrag + v-loading="dialogLoading" + :title="dialogType === 'add' ? ' 鍒涘缓' : '缂栬緫'" + :visible.sync="dialogVisible" + append-to-body="true" + class="avue-dialog" + width="1000px" + @close="dialogClose" + > + <span slot="footer" class="dialog-footer"> + <el-button size="small" type="primary" @click="saveHandler">纭� 瀹�</el-button> + <el-button size="small" @click="dialogClose">鍙� 娑�</el-button> + </span> + </el-dialog> + <!-- 瀵煎叆 --> + <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆娴佺▼妯℃澘" + @updata="getTableList"></upload-file> + </el-aside> + + <el-main width="60%"> + <div style="height: 100%;background-color: #eeeeea">璁捐鍣�</div> + </el-main> + </el-container> + </basic-container> +</template> + +<script> +import {mapGetters} from "vuex"; +import basicOption from "@/util/basic-option"; +import {getTypeList} from "@/api/processTemplate/type"; +import {getProcessTempList,saveProcessTemp,updateProcessTemp,deleteProcessTemp,downloadTemplate,download,stopProcessTemp} from "@/api/processTemplate/define"; +import func from "@/util/func"; + +export default { + name: "index", + data(){ + return { + tempType:'', + tempName:'', + tempTypeData:[], + form:{}, + tableLoading: false, + tableData: [], + currentRow:null, + selectionList: [], + upFileType: ['xls', 'xlsx'], + fileUrl: 'api/userQueryController/importUser', + tipList:[], + dialogLoading:false, + dialogVisible:false, + dialogType:'add' + } + }, + computed: { + ids() { + let ids = []; + this.selectionList.forEach(ele => { + ids.push(ele.id); + }); + return ids.join(","); + }, + ...mapGetters(["permission"]), + permissionList() { + return { + addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false), + delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false), + editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false), + exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false), + importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false), + downloadImportTemplateBtn: this.vaildData(this.permission[this.$route.query.id].DOWNLOADFILE, false), + stopBtn: this.vaildData(this.permission[this.$route.query.id].FREEZE, false), + actionBtn: this.vaildData(this.permission[this.$route.query.id].UNFREZE, false), + }; + }, + option(){ + return { + ...basicOption, + addBtn:false, + editBtn:false, + delBtn:false, + columnBtn:false, + gridBtn:false, + width:500, + calcHeight: -50, + align:'left', + headerAlign:'center', + menuWidth:190, + dialogMenuPosition: 'right', + dialogWidth:600, + column: [ + { + label: '娴佺▼妯℃澘鍚嶇О', + prop: 'name' + },{ + label: '鐗堟湰', + prop: 'desc', + width:50 + },{ + label: '鐘舵��', + prop: 'status', + width:65 + }] + } + } + }, + created() { + getTypeList().then(res => { + this.tempTypeData = res.data.data; + }) + }, + methods:{ + getTableList(){ + this.tableLoading = true; + getProcessTempList({tempType:this.tempType,tempName:this.tempName}).then(res => { + this.tableData = res.data.data; + this.tableLoading = false; + }) + }, + //娴佺▼鍒嗙被閫夋嫨 + tempTypeChange(val){ + this.getTableList(); + }, + searchData(){ + this.getTableList(); + }, + + handlerAdd(){ + this.form={}; + this.dialogVisible=true; + this.dialogType='add' + }, + handleEdit(row,index) { + this.form={ + ...row + } + this.dialogVisible = true; + this.dialogType = 'edit' + }, + // 缂栬緫淇濆瓨 + saveHandler() { + if(this.dialogType=='add'){ + saveProcessTemp(this.form).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + this.getTableList(); + } + }); + }else{ + updateProcessTemp(this.form).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + this.getTableList(); + } + }) + } + + }, + dialogClose(){ + this.form={}; + this.dialogLoading=false; + this.dialogVisible=false; + }, + // 鍒犻櫎 + handleDel(row,index) { + let params = { + ids: row.id + } + + this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎褰撳墠鏁版嵁鍚楋紵', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + deleteProcessTemp(params).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + this.getTableList(); + } + }); + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); + }, + + //閫夋嫨鐨勮 + selectionChange(list) { + this.selectionList = list; + }, + + // 琛屽崟閫� + rowClickHandler(row) { + func.rowClickHandler( + row, + this.$refs.crud, + this.lastIndex, + (newIndex) => { + this.lastIndex = newIndex; + }, + () => { + this.selectionList = [row]; + } + ); + }, + + // 瀵煎嚭 + downloadHandler() { + if (this.selectionList.length <= 0) { + this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹繘琛屽鍑�'); + return; + } + + download({enumNames: this.ids}).then(res => { + func.downloadFileByBlobHandler(res); + this.$message.success('瀵煎嚭鎴愬姛'); + }).catch(err => { + }) + }, + + // 涓嬭浇瀵煎叆妯℃澘 + downloadTemplateHandler() { + downloadTemplate().then(res => { + func.downloadFileByBlobHandler(res); + this.$message.success('涓嬭浇鎴愬姛'); + }).catch(err => { + }) + }, + + //瀵煎叆 + uploadHandler() { + this.$refs.upload.visible = true; + }, + // 鍋滅敤鍚敤 + stopHandler(row) { + let params = {}; + params = { + ids: row.oid, + flag: row.status === 0 ? true : false + } + stopProcessTemp(params).then(res => { + this.$message.success(res.data.obj); + this.getTableList(); + }); + }, + } +} +</script> + +<style scoped> + +</style> diff --git a/Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue b/Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue new file mode 100644 index 0000000..8c4b080 --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue @@ -0,0 +1,202 @@ +<template> + <!--娴佺▼妯℃澘鍒嗙被--> + <basic-container> + <avue-crud + ref="crud" + v-model="form" + :data="tableData" + :option="option" + :table-loading="tableLoading" + @on-load="getTableList" + @refresh-change="getTableList" + @row-save="rowSaveHandler" + @row-update="rowUpdateHandler" + @row-click="rowClickHandler" + @selection-change="selectionChange" + > + <template slot="menuLeft" slot-scope="scope"> + <el-button v-if="permissionList.addBtn" class="button-custom-icon" size="small" type="primary" + @click="$refs.crud.rowAdd()"> + <icon-show :name="permissionList.addBtn.source"></icon-show> + 鏂� 澧� + </el-button> + <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" @click="exportClickHandler"> + <icon-show :name="permissionList.exportBtn.source"></icon-show> + 瀵煎嚭 + </el-button> + </template> + <template slot="menu" slot-scope="{ row, index }"> + <el-button + v-if="permissionList.editBtn" + size="small" + type="text" + @click="handleEdit(row, index)" + > + <icon-show :name="permissionList.editBtn.source"></icon-show> + 缂栬緫 + </el-button> + <el-button + v-if="permissionList.delBtn" + size="small" + type="text" + @click="handleDel(row, index)" + > + <icon-show :name="permissionList.delBtn.source"></icon-show> + 鍒犻櫎 + </el-button> + </template> + </avue-crud> + </basic-container> +</template> + +<script> +import {mapGetters} from "vuex"; +import basicOption from "@/util/basic-option"; +import {getTypeList, saveType, updateType, deleteType} from "@/api/processTemplate/type"; +import func from "@/util/func"; + +export default { + name: "index", + data: function () { + return { + form:{}, + tableLoading: false, + tableData: [], + currentRow:null, + selectionList: [], + } + }, + computed: { + ids() { + let ids = []; + this.selectionList.forEach(ele => { + ids.push(ele.id); + }); + return ids.join(","); + }, + ...mapGetters(["permission"]), + permissionList() { + return { + addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false), + delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false), + editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false), + }; + }, + option(){ + return { + ...basicOption, + addBtn:false, + editBtn:false, + delBtn:false, + calcHeight: -60, + align:'left', + headerAlign:'center', + menuWidth:160, + dialogMenuPosition: 'right', + dialogWidth:600, + column: [ + { + label: '鍒嗙被鍚嶇О', + prop: 'name', + span: 24, + rules: [{ required: true, message: '璇疯緭鍏ュ垎绫诲悕绉�', trigger: 'blur' }] + },{ + label: '鎻忚堪', + prop: 'desc', + span: 24, + type:'textarea' + }] + } + } + }, + methods: { + // 琛ㄦ牸璇锋眰 + getTableList() { + this.tableLoading = true; + getTypeList().then(res => { + this.tableData = res.data.data; + this.tableLoading = false; + }) + }, + + // 鏂板 + rowSaveHandler(row, done, loading) { + saveType(row).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + this.getTableList(); + done(); + } + }).catch(err => { + loading() + }); + }, + + handleEdit(row,index){ + this.$refs.crud.rowEdit(row, index); + }, + + // 缂栬緫 + rowUpdateHandler(row, index, done, loading) { + updateType(row).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + this.getTableList(); + done() + } + }).catch(err => { + loading() + }); + }, + + // 鍒犻櫎 + handleDel(row,index) { + let params = { + ids: row.id + } + + this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎褰撳墠鐨勫垎绫诲悧锛�', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + deleteType(params).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + this.getTableList(); + } + }); + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); + }, + + //閫夋嫨鐨勮 + selectionChange(list) { + this.selectionList = list; + }, + + // 琛屽崟閫� + rowClickHandler(row) { + func.rowClickHandler( + row, + this.$refs.crud, + this.lastIndex, + (newIndex) => { + this.lastIndex = newIndex; + }, + () => { + this.selectionList = [row]; + } + ); + }, + } +} +</script> + +<style scoped> + +</style> diff --git a/Source/plt-web/plt-web-ui/src/views/system/log/index.vue b/Source/plt-web/plt-web-ui/src/views/system/log/index.vue index cc714ab..cb1acf4 100644 --- a/Source/plt-web/plt-web-ui/src/views/system/log/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/system/log/index.vue @@ -136,7 +136,7 @@ }).then(res => { this.tableData = res.data.data; this.page.total = res.data.total; - this.selectList=[]; + this.selectList = []; this.tableLoading = false; }) }, diff --git a/Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue b/Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue index 1ee2aea..37864cc 100644 --- a/Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue +++ b/Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue @@ -95,11 +95,11 @@ // 鎵撳紑寮瑰嚭灞傜粨鏉熸椂鐨勫洖璋� modalOpened() { this.visible = true; - if (!this.resizeHandler) { - this.resizeHandler = debounce(() => { - this.refresh() - }, 100) - } + // if (!this.resizeHandler) { + // this.resizeHandler = debounce(() => { + // this.refresh() + // }, 100) + // } window.addEventListener("resize", this.resizeHandler) }, // 鍒锋柊缁勪欢 @@ -138,6 +138,7 @@ // 涓婁紶鍥剧墖 uploadImg() { this.$refs.cropper.getCropBlob(data => { + console.log(data); let formData = new FormData(); formData.append("avatarfile", data, this.options.filename); uploadAvatar(formData).then(response => { diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue index f7244e7..70157fc 100644 --- a/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue @@ -564,7 +564,9 @@ let node = this.currentClickNode.parent; node.loaded = false; node.expand(); - this.$refs.tree.setCurrentNode(this.currentClickNode); + this.$nextTick(()=>{ + this.$refs.tree.setCurrentKey(this.currentClickNode.data.id); + }); } else { this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍� } diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue index d59ee86..8bb7e72 100644 --- a/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue @@ -294,7 +294,6 @@ methods: { // 鏍戣鐐瑰嚮 nodeClick(row, node) { - console.log(row.childType); this.form = {...row}; this.nodeRow = {...row}; this.currentClickNode = node; @@ -553,7 +552,9 @@ let node = this.currentClickNode.parent; node.loaded = false; node.expand(); - this.$refs.tree.setCurrentNode(this.currentClickNode); + this.$nextTick(()=>{ + this.$refs.tree.setCurrentKey(this.currentClickNode.data.id); + }); } else { this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍� } diff --git a/Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue b/Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue index 500a7d7..7684ee5 100644 --- a/Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue +++ b/Source/plt-web/plt-web-ui/src/views/wel/adminIndex.vue @@ -163,21 +163,21 @@ logName: "鐧诲綍鏃ュ織缁熻", text: "褰撳墠鐧诲綍鏃ュ織鎬昏褰曟暟", color: 'rgb(230, 71, 88)', - router: '/LogInfoMain?logType=1&roleType=2' + router: '/C41AF7C4-1D19-00DF-1974-2542CDD49FFB?logType=1&roleType=1&id=C41AF7C4-1D19-00DF-1974-2542CDD49FFB&name=鐧诲綍鏃ュ織鏌ヨ锛堢鐞嗗憳锛�' }, { logType: "3", logName: "鎺堟潈鏃ュ織缁熻", text: "褰撳墠鎺堟潈鏃ュ織鎬昏褰曟暟", color: 'rgb(178, 159, 255)', - router: '/LogAuthorizeMain?logType=3&roleType=2' + router: '/EBA630BC-71DF-AF03-F9CB-2F4DF14459AF?logType=3&roleType=1&id=EBA630BC-71DF-AF03-F9CB-2F4DF14459AF&name=鎺堟潈鏃ュ織鏌ヨ锛堢鐞嗗憳锛�' }, { logType: "4", logName: "鎿嶄綔鏃ュ織缁熻", text: "褰撳墠鎿嶄綔鏃ュ織鎬昏褰曟暟", color: 'rgb(27, 201, 142)', - router: '/LogOperateMain?logType=4&roleType=2' + router: '/674C5E77-501F-AE85-2B61-191711BDA57A?logType=4&roleType=1&id=674C5E77-501F-AE85-2B61-191711BDA57A&name=鎿嶄綔鏃ュ織鏌ヨ锛堢鐞嗗憳锛�' }, ]; -- Gitblit v1.9.3