From f7090a3271fafbf5c3b0435697a985055aaa94a7 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 30 八月 2024 12:13:05 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transferSelect.vue | 13
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebCodeGenSchemaController.java | 13
Source/plt-web/plt-web-ui/src/api/systemModel/operateType/api.js | 28
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java | 5
Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue | 98 +
Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue | 31
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java | 4
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsQueryTemplateController.java | 107 +
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java | 9
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsAttributeServiceImpl.java | 25
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue | 51
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PortalVIType.java | 5
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java | 30
Source/plt-web/plt-web-ui/src/api/modeling/businessType/api.js | 19
Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue | 109 +
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java | 563 +++++++
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/BtmQTExportData.java | 65
Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue | 199 +
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsCodeGenSchemaServiceI.java | 3
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsQuereyTemplateServiceI.java | 50
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PortalVITypeFlag.java | 3
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsActionServiceI.java | 34
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java | 12
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PlTypetypeEnum.java | 128 +
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PortalVIVO.java | 31
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/tableDialog.vue | 344 ++++
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java | 428 +++++
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsActionController.java | 85 +
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsCodeGenSchemaServiceImpl.java | 3
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java | 26
Source/plt-web/plt-web-ui/src/api/systemModel/mangeModel/api.js | 30
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue | 96
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsAttributeServiceI.java | 8
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionParamDTO.java | 37
Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue | 433 +++++
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java | 262 +++
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/constant/PortalVIEnumConstant.java | 14
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue | 275 +++
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/ActionEnum.java | 132 +
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsPortalVIServiceI.java | 7
Source/plt-web/plt-web-ui/src/api/systemModel/systemConfig/api.js | 50
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionExpDTO.java | 39
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue | 5
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebPortalVIController.java | 43
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java | 16
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/PortalVIDO.java | 33
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java | 24
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java | 8
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PortalVIDTO.java | 29
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue | 603 +++++++
50 files changed, 4,447 insertions(+), 218 deletions(-)
diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/constant/PortalVIEnumConstant.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/constant/PortalVIEnumConstant.java
new file mode 100644
index 0000000..4c9fec8
--- /dev/null
+++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/constant/PortalVIEnumConstant.java
@@ -0,0 +1,14 @@
+package com.vci.constant;
+
+public class PortalVIEnumConstant {
+
+ /**
+ * 琛ㄥ崟绫诲瀷鏋氫妇
+ */
+ public static final String PORTALVI_VI_TYPE = "portalVIType";
+
+ /***
+ * 琛ㄥ崟涓氬姟绫诲瀷鏋氫妇
+ */
+ public static final String PORTALVI_VI_FLAG = "portalVITypeFlag";
+}
diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionExpDTO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionExpDTO.java
new file mode 100644
index 0000000..9a50ca9
--- /dev/null
+++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionExpDTO.java
@@ -0,0 +1,39 @@
+package com.vci.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * Action瀵煎嚭浼犺緭瀵硅薄
+ * @author yuxc
+ * @date 2024/8/27 17:46
+ */
+@Data
+public class PLActionExpDTO implements java.io.Serializable{
+
+ /**
+ * 绂佹淇敼杩欎釜鍊�
+ */
+ private static final long serialVersionUID = 2009350578651813260L;
+ /**
+ * 閫夋嫨瀵煎嚭鏁版嵁鐨勬ā寮�
+ */
+ private String dataType;//閫夋嫨瀵煎嚭鏁版嵁鐨勬ā寮�
+ /**
+ * 閫夋嫨銆愰�夋嫨銆戞ā寮忓垯闇�瑕佷紶姝ゅ弬鏁�
+ */
+ private List<String> chooseDataOid;
+ /**
+ * 椤电爜
+ */
+ private String pageNum;
+ /**
+ * 鎵�闇�瑕佸鍑虹殑鍒�
+ */
+ private List<String> columnName;
+ /**
+ * 鏂囦欢鍚�
+ */
+ private String fileName;
+}
diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionParamDTO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionParamDTO.java
new file mode 100644
index 0000000..070f307
--- /dev/null
+++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionParamDTO.java
@@ -0,0 +1,37 @@
+package com.vci.dto;
+
+import lombok.Data;
+
+/**
+ * Action鍙傛暟鍒楄〃浼犺緭瀵硅薄
+ * @author yuxc
+ * @date 2024/8/28 16:40
+ */
+@Data
+public class PLActionParamDTO implements java.io.Serializable{
+
+ /**
+ * 绂佹淇敼杩欎釜鍊�
+ */
+ private static final long serialVersionUID = 2009350578651813260L;
+ /**
+ * 涓婚敭
+ */
+ public String oid;
+ /**
+ * 鍙傛暟鍚嶇О
+ */
+ public String name;
+ /**
+ * 榛樿鍊�
+ */
+ public String defaultValue;
+ /**
+ * 鎻愮ず淇℃伅
+ */
+ public String description;
+ /**
+ * 鐖禷ction鐨処D
+ */
+ public String action;
+}
diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PortalVIDTO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PortalVIDTO.java
index be2d3bd..5160b07 100644
--- a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PortalVIDTO.java
+++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PortalVIDTO.java
@@ -17,6 +17,11 @@
* 0: 涓氬姟绫诲瀷; 1: 閾炬帴绫诲瀷. 榛樿0
*/
private short typeFlag;
+
+ /**
+ * 涓氬姟绫诲瀷鏄剧ず鍊�
+ */
+ private String typeFlagText;
/**
* 绫诲瀷鍚�
*/
@@ -29,6 +34,10 @@
* 瑙嗗浘绫诲瀷: 杈撳叆琛ㄥ崟鎴栧垎椤靛垪琛�
*/
private short viType;
+ /**
+ *琛ㄥ崟绫诲瀷
+ */
+ private String viTypeText;
/**
* 瀹氫箟璇︽儏
*/
@@ -82,14 +91,32 @@
this.prm = prm;
}
+ public String getTypeFlagText() {
+ return typeFlagText;
+ }
+
+ public void setTypeFlagText(String typeFlagText) {
+ this.typeFlagText = typeFlagText;
+ }
+
+ public String getViTypeText() {
+ return viTypeText;
+ }
+
+ public void setViTypeText(String viTypeText) {
+ this.viTypeText = viTypeText;
+ }
+
@Override
public String toString() {
- return "PortalVIVO{" +
+ return "PortalVIDTO{" +
"id='" + id + '\'' +
", typeFlag=" + typeFlag +
+ ", typeFlagText='" + typeFlagText + '\'' +
", typeName='" + typeName + '\'' +
", viName='" + viName + '\'' +
", viType=" + viType +
+ ", viTypeText='" + viTypeText + '\'' +
", prm=" + prm +
'}';
}
diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/PortalVIDO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/PortalVIDO.java
index 00e2b38..bdd90ed 100644
--- a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/PortalVIDO.java
+++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/PortalVIDO.java
@@ -1,7 +1,9 @@
package com.vci.model;
+import com.vci.constant.PortalVIEnumConstant;
import com.vci.starter.web.annotation.Transient;
import com.vci.starter.web.annotation.VciBtmType;
+import com.vci.starter.web.annotation.VciUseEnum;
import com.vci.starter.web.constant.FrameWorkLcStatusConstant;
/**
@@ -21,7 +23,13 @@
/**
* 0: 涓氬姟绫诲瀷; 1: 閾炬帴绫诲瀷. 榛樿0
*/
+
+ @VciUseEnum(value = PortalVIEnumConstant.PORTALVI_VI_FLAG,defaultValue = "0",showTextField = "typeFlagText")
private short typeFlag;
+ /**
+ * 涓氬姟绫诲瀷鏄剧ず鏂囨湰
+ */
+ private String typeFlagText;
/**
* 绫诲瀷鍚�
*/
@@ -33,7 +41,12 @@
/**
* 瑙嗗浘绫诲瀷: 杈撳叆琛ㄥ崟鎴栧垎椤靛垪琛�
*/
+ @VciUseEnum(value = PortalVIEnumConstant.PORTALVI_VI_TYPE,defaultValue = "0",showTextField = "viTypeText")
private short viType;
+ /**
+ * 瑙嗗浘绫诲瀷鏄剧ず鏂囨湰
+ */
+ private String viTypeText;
/**
* 瀹氫箟璇︽儏
*/
@@ -87,14 +100,32 @@
this.prm = prm;
}
+ public String getTypeFlagText() {
+ return typeFlagText;
+ }
+
+ public void setTypeFlagText(String typeFlagText) {
+ this.typeFlagText = typeFlagText;
+ }
+
+ public String getViTypeText() {
+ return viTypeText;
+ }
+
+ public void setViTypeText(String viTypeText) {
+ this.viTypeText = viTypeText;
+ }
+
@Override
public String toString() {
- return "PortalVIVO{" +
+ return "PortalVIDO{" +
"id='" + id + '\'' +
", typeFlag=" + typeFlag +
+ ", typeFlagText='" + typeFlagText + '\'' +
", typeName='" + typeName + '\'' +
", viName='" + viName + '\'' +
", viType=" + viType +
+ ", viTypeText='" + viTypeText + '\'' +
", prm='" + prm + '\'' +
'}';
}
diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PortalVIVO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PortalVIVO.java
index 2cfe1fb..1ffbe3d 100644
--- a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PortalVIVO.java
+++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PortalVIVO.java
@@ -1,5 +1,9 @@
package com.vci.pagemodel;
+import com.vci.common.portal.enums.PortalVIType;
+import com.vci.constant.EnumIdConstant;
+import com.vci.starter.web.annotation.VciUseEnum;
+
/**
*
* 琛ㄥ崟鏄剧ず瀵硅薄
@@ -18,6 +22,10 @@
*/
private short typeFlag;
/**
+ * 涓氬姟绫诲瀷鏄剧ず鍊�
+ */
+ private String typeFlagText;
+ /**
* 绫诲瀷鍚�
*/
private String typeName;
@@ -25,10 +33,15 @@
* 瑙嗗浘鍚�
*/
private String viName;
+
/**
* 瑙嗗浘绫诲瀷: 杈撳叆琛ㄥ崟鎴栧垎椤靛垪琛�
*/
private short viType;
+ /**
+ *琛ㄥ崟绫诲瀷
+ */
+ private String viTypeText;
/**
* 瀹氫箟璇︽儏
*/
@@ -82,14 +95,32 @@
this.prm = prm;
}
+ public String getTypeFlagText() {
+ return typeFlagText;
+ }
+
+ public void setTypeFlagText(String typeFlagText) {
+ this.typeFlagText = typeFlagText;
+ }
+
+ public String getViTypeText() {
+ return viTypeText;
+ }
+
+ public void setViTypeText(String viTypeText) {
+ this.viTypeText = viTypeText;
+ }
+
@Override
public String toString() {
return "PortalVIVO{" +
"id='" + id + '\'' +
", typeFlag=" + typeFlag +
+ ", typeFlagText='" + typeFlagText + '\'' +
", typeName='" + typeName + '\'' +
", viName='" + viName + '\'' +
", viType=" + viType +
+ ", viTypeText='" + viTypeText + '\'' +
", prm=" + prm +
'}';
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java
index ea1bf1a..8422fbc 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java
@@ -395,12 +395,16 @@
throw new VciBaseException(String.valueOf(e.code),e.messages);
}
}
- }else if(parentId.equals("sysOptionNode")){
+ }else if(parentId.equals("operateNode")){
//鍔犺浇鎵�鏈夋搷浣�
try{
//灏嗚繑鍥炵殑鑺傜偣澶栧眰濂椾笂褰撳墠鐖惰妭鐐�
MenuVO parentNode = JsonConfigReader.getSysModuleConf().getOperateNode();
- List<MenuVO> menuVOS = new ArrayList<>();
+ //濡傛灉鏌ヨ鐨勬槸绗竴灞傝妭鐐瑰氨闇�瑕佺洿鎺ヨ繑鍥瀞ysOptionNode鑺傜偣
+ if(Func.isNotBlank(modeType) && modeType.equals("firstNode")){
+ menuVOList.add(parentNode);
+ return menuVOList;
+ }
OperateInfo[] operateInfos = platformClientUtil.getFrameworkService().getOperateTreeList(parentId);
for(int i = 0; i < operateInfos.length;i++ ){
OperateInfo operateInfo = operateInfos[i];
@@ -416,10 +420,8 @@
menuVO.setSort((int) operateInfo.seq);
menuVO.setModeType("operateObject");
menuVO.setHasChildren(false);
- menuVOS.add(menuVO);
+ menuVOList.add(menuVO);
}
- parentNode.setChildren(menuVOS);
- menuVOList.add(parentNode);
}catch (PLException e) {
e.printStackTrace();
throw new VciBaseException(String.valueOf(e.code),new String[]{VciBaseUtil.getExceptionMessage(e)});
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java
index 8137581..01f81e0 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java
@@ -1,7 +1,6 @@
package com.vci.web.controller;
import com.vci.constant.FrameWorkLangCodeConstant;
-import com.vci.corba.framework.data.AppConfigDetailInfo;
import com.vci.corba.framework.data.FuncOperationInfo;
import com.vci.corba.framework.data.OperateInfo;
import com.vci.frameworkcore.compatibility.ISmFunctionQueryService;
@@ -9,7 +8,6 @@
import com.vci.pagemodel.AppConfigDetailInfoVO;
import com.vci.pagemodel.ExpExcelConditionVO;
import com.vci.pagemodel.MenuVO;
-import com.vci.starter.web.annotation.controller.VciUnCheckRight;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.util.ControllerUtil;
@@ -19,7 +17,6 @@
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -188,7 +185,7 @@
return BaseResult.success(hmSysModConfigService.addOperationType(operateInfo),"娣诲姞鎿嶄綔绫诲瀷鎴愬姛");
}catch (Exception e){
e.printStackTrace();
- String errorMsg = "鍒犻櫎妯″潡鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+ VciBaseUtil.getExceptionMessage(e);
+ String errorMsg = "娣诲姞鎿嶄綔绫诲瀷鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+ VciBaseUtil.getExceptionMessage(e);
logger.error(errorMsg);
throw new VciBaseException(errorMsg);
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsActionController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsActionController.java
index 01b4da8..56ff805 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsActionController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsActionController.java
@@ -1,13 +1,14 @@
package com.vci.web.controller;
import com.vci.corba.common.PLException;
-import com.vci.dto.PLActionClsDTO;
-import com.vci.dto.PLActionDTO;
-import com.vci.dto.PLActionQueryDTO;
+import com.vci.dto.*;
+import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseResult;
+import com.vci.starter.web.util.VciBaseUtil;
import com.vci.web.service.OsActionServiceI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@@ -149,7 +150,7 @@
}
/**
- * 瀵煎嚭Action
+ * 瀵煎嚭Action鍒嗙被
* @return
*/
@PostMapping("/exportBeans")
@@ -157,4 +158,80 @@
osActionServiceI.exportBeans(actionOid, response);
}
+ /**
+ * 瀵煎叆Action
+ * @param file 涓婁紶鐨勬枃浠�
+ * @return
+ */
+ @PostMapping("/impData")
+ public BaseResult impData(MultipartFile file){
+ try {
+ return osActionServiceI.impData(file);
+ }catch (Throwable e) {
+ throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
+ }
+ }
+
+ /**
+ * 瀵煎嚭Action
+ * @param plActionExpDTO 瀵煎嚭灞炴�ц缃璞�
+ */
+ @PostMapping("/exportAction")
+ public void exportAction(@RequestBody PLActionExpDTO plActionExpDTO, HttpServletResponse response) throws PLException {
+ try {
+ osActionServiceI.exportAction(plActionExpDTO, response);
+ }catch (Throwable e) {
+ throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
+ }
+ }
+
+ /**
+ * 淇濆瓨Action鍙傛暟鏁版嵁
+ * dto action浼犺緭瀵硅薄
+ * @return 淇濆瓨缁撴灉
+ */
+ @PostMapping("/savePLActionParam")
+ public BaseResult savePLActionParam(@RequestBody PLActionParamDTO dto){
+ try {
+ return osActionServiceI.savePLActionParam(dto);
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+
+ /**
+ * 淇敼Action鍙傛暟鏁版嵁
+ * dto action浼犺緭瀵硅薄
+ * @return 淇濆瓨缁撴灉
+ */
+ @PostMapping("/updatePLActionParam")
+ public BaseResult updatePLActionParam(@RequestBody PLActionParamDTO dto){
+ try {
+ return osActionServiceI.updatePLActionParam(dto);
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+ /**
+ * 鍒犻櫎Action鍙傛暟鏁版嵁
+ * oid 鍙傛暟涓婚敭
+ * @return 淇濆瓨缁撴灉
+ */
+ @DeleteMapping("/deletePLActionParam")
+ public BaseResult deletePLActionParam(String oid){
+ try {
+ return osActionServiceI.deletePLActionParam(oid);
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java
index cb3bc49..9bbe900 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java
@@ -279,4 +279,28 @@
throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
}
}
+
+
+ /**
+ * 鑾峰彇璁剧疆鎺掑簭瀛楁鐨勬帓搴忓瓧娈�
+ * @param linkType 閾炬帴绫诲瀷鐨勭紪鍙�
+ * @param btmType 涓氬姟绫诲瀷鐨勭紪鍙�
+ * @param direction 姝�/鍙嶅悜
+ * @return 灞炴�х殑淇℃伅
+ */
+ @GetMapping("/getAllOrderbyAttributeByLink")
+ public BaseResult<List<String>> getAllOrderbyAttributeByLink(String linkType, String btmType, String direction){
+
+ try {
+ List<String> osLinkTypeAttributes = linkTypeService.getAllOrderbyAttributeByLink(linkType, btmType, direction);
+ return BaseResult.dataList(osLinkTypeAttributes);
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ } catch (ParseException e) {
+ throw new RuntimeException(e);
+ }
+ }
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsQueryTemplateController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsQueryTemplateController.java
index 0313038..c2032a4 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsQueryTemplateController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsQueryTemplateController.java
@@ -147,6 +147,39 @@
}
/**
+ * 涓氬姟绫诲瀷鏌ヨ妯℃澘涓嬬殑鏌ヨ鏉′欢鐨勬煡璇㈡寜閽煡璇ist鍒楄〃
+ * @param qtInfoDTO
+ * @return 鏌ヨ缁撴灉
+ */
+ @PostMapping("/getCriteriaBtm")
+ public BaseResult getCriteriaBtm(@RequestBody QTInfoDTO qtInfoDTO){
+ try {
+ return quereyTemplateServiceI.getCriteriaBtm(qtInfoDTO);
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+
+ /**
+ * 鏌ヨ鏉′欢涓嬬殑閫夋嫨鏌ヨ妯℃澘瀵硅瘽妗嗭紙鏌ヨ鍏ㄩ儴妯℃澘鍜屾墍瀵瑰簲鐨勪笟鍔$被鍨嬫垨閾炬帴绫诲瀷鍚嶏級
+ * @return
+ */
+ @GetMapping("/getAllQTs")
+ public BaseResult getAllQTs(){
+ try {
+ return quereyTemplateServiceI.getAllQTs();
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+
+ /**
* 鏌ヨ妯℃澘鍒楄〃
* @param btName 绫诲瀷鍚嶇О
* @return 鏌ヨ缁撴灉
@@ -258,4 +291,78 @@
return objectBaseResult;
}
}
+
+ /**
+ * 涓氬姟绫诲瀷鏌ヨ妯℃澘淇濆瓨
+ * @param qtInfoDTO 淇濆瓨浼犺緭瀵硅薄
+ * @return 淇濆瓨缁撴灉
+ */
+ @PostMapping("/btmSave")
+ public BaseResult btmSave(@RequestBody QTInfoDTO qtInfoDTO){
+ try {
+ return quereyTemplateServiceI.btmSave(qtInfoDTO);
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+
+ /**
+ * 鏇存柊鏁版嵁搴撶粨鏋�
+ * @return 鏇存柊缁撴灉
+ */
+ @PostMapping("/updateDBStructure")
+ public BaseResult btmSave(){
+ try {
+ return quereyTemplateServiceI.updateDBStructure();
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+
+ /**
+ * 涓氬姟绫诲瀷鏌ヨ妯℃澘鏍戞煡璇紝鐢ㄤ簬鐣岄潰鐨勫鍑哄姛鑳�
+ * @return 鏌ヨ缁撴灉
+ */
+ @GetMapping("/getBtmQtTree")
+ public BaseResult getBtmQtTree(){
+ try {
+ return quereyTemplateServiceI.getBtmQtTree();
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+
+ /**
+ * 瀵煎嚭涓氬姟绫诲瀷鏌ヨ妯℃澘
+ * names 鏌ヨ妯℃澘鍚�
+ * @return
+ */
+ @PostMapping("/expBtmQTTemplate")
+ public void expBtmQTTemplate(@RequestBody List<String> names,HttpServletResponse response) throws PLException, IOException {
+ quereyTemplateServiceI.expBtmQTTemplate(names, response);
+ }
+
+ /**
+ * 瀵煎叆涓氬姟绫诲瀷鏌ヨ妯℃澘
+ * @param file 涓婁紶鐨勬枃浠�
+ * @return 瀵煎叆缁撴灉
+ */
+ @PostMapping("/impBtmTemplate")
+ public BaseResult impBtmTemplate(MultipartFile file){
+ try {
+ return quereyTemplateServiceI.impBtmTemplate(file);
+ }catch (Throwable e) {
+ throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
+ }
+ }
+
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java
index 270d46a..10c2d5c 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java
@@ -403,7 +403,15 @@
@GetMapping(value = "/getAllAttributesByBtmId")
@VciBusinessLog(operateName = "鏌ョ湅涓氬姟绫诲瀷鐨勫睘鎬�")
public BaseResult<List<OsBtmTypeAttributeVO>> getAllAttributesByBtmId(String btmId){
- List<OsBtmTypeAttributeVO> osBtmTypeAttributeVOS = btmService.listAttributeByBtmIdHasDefault(btmId);
+ List<OsBtmTypeAttributeVO> osBtmTypeAttributeVOS = null;
+ try {
+ osBtmTypeAttributeVOS = btmService.listAttributeByBtmIdHasDefault(btmId);
+ } catch (PLException e) {
+ e.printStackTrace();
+ String exceptionMessage = VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ throw new VciBaseException(exceptionMessage);
+ }
return BaseResult.dataList(osBtmTypeAttributeVOS);
}
@@ -457,7 +465,15 @@
String hasDefaultAttr = baseQueryObject.getConditionMap().getOrDefault("hasDefaultAttr","false");
String attrId = baseQueryObject.getConditionMap().containsKey("name")?baseQueryObject.getConditionMap().get("name").replace("*",""):"";
String attrName = baseQueryObject.getConditionMap().containsKey("label") ? baseQueryObject.getConditionMap().get("label").replace("*","") : "";
- List<OsBtmTypeAttributeVO> boAttrs = btmService.listAttributeByBtmId(btmTypeId);
+ List<OsBtmTypeAttributeVO> boAttrs = null;
+ try {
+ boAttrs = btmService.listAttributeByBtmId(btmTypeId);
+ } catch (PLException e) {
+ e.printStackTrace();
+ String exceptionMessage = VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ throw new VciBaseException(exceptionMessage);
+ }
if(boAttrs == null){
boAttrs = new ArrayList<>();
}
@@ -505,7 +521,15 @@
String attrId = baseQueryObject.getConditionMap().containsKey("name")?baseQueryObject.getConditionMap().get("name").replace("*",""):"";
String attrName = baseQueryObject.getConditionMap().containsKey("label") ? baseQueryObject.getConditionMap().get("label").replace("*","") : "";
OsBtmTypeVO btmTypeVO = btmService.selectByOid(btmTypeOid);
- List<OsBtmTypeAttributeVO> boAttrs = btmService.listAttributeByBtmId(btmTypeVO.getId());
+ List<OsBtmTypeAttributeVO> boAttrs = null;
+ try {
+ boAttrs = btmService.listAttributeByBtmId(btmTypeVO.getId());
+ } catch (PLException e) {
+ e.printStackTrace();
+ String exceptionMessage = VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ throw new VciBaseException(exceptionMessage);
+ }
List<OsBtmTypeAttributeVO> attrList = boAttrs.stream().filter(s->{
boolean usedFlag = true;
if(StringUtils.isNotBlank(attrId) && !s.getId().contains(attrId)){
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebCodeGenSchemaController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebCodeGenSchemaController.java
index ec1b0dd..c6666a8 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebCodeGenSchemaController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebCodeGenSchemaController.java
@@ -1,5 +1,7 @@
package com.vci.web.controller;
+import com.vci.corba.common.PLException;
+import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseQueryObject;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.pagemodel.DataGrid;
@@ -7,6 +9,7 @@
import com.vci.starter.web.util.LangBaseUtil;
import com.vci.dto.OsCodeGenSchemaDTO;
import com.vci.pagemodel.OsCodeGenSchemaVO;
+import com.vci.starter.web.util.VciBaseUtil;
import com.vci.web.service.OsCodeGenSchemaServiceI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -71,8 +74,14 @@
*/
@PostMapping(value = "/productCodeFile")
public BaseResult productCodeFile(String oid){
- codeGenSchemaService.productCodeFile(oid);
- return BaseResult.success();
+ try {
+ codeGenSchemaService.productCodeFile(oid);
+ return BaseResult.success();
+ } catch (PLException e) {
+ e.printStackTrace();
+ String exceptionMessage = VciBaseUtil.getExceptionMessage(e);
+ throw new VciBaseException(exceptionMessage);
+ }
}
/**
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebPortalVIController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebPortalVIController.java
index b86ab56..3d37d4c 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebPortalVIController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebPortalVIController.java
@@ -9,19 +9,27 @@
import com.vci.pagemodel.PortalVIVO;
import com.vci.starter.web.annotation.controller.VciUnCheckRight;
import com.vci.starter.web.annotation.log.VciBusinessLog;
+import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseQueryObject;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.pagemodel.DataGrid;
+import com.vci.starter.web.util.ControllerUtil;
+import com.vci.starter.web.util.LangBaseUtil;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.web.enumpck.ItemDblEnum;
import com.vci.web.enumpck.ItemTypeEnum;
import com.vci.web.service.OsPortalVIServiceI;
+import com.vci.web.service.WebBtmIOServiceI;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
import java.util.List;
/**
@@ -56,17 +64,18 @@
/**
*鏍规嵁琛ㄥ崟id鑾峰彇鍏蜂綋鏁版嵁
* @param id
+ * @param viType
* @return
*/
@GetMapping( "/getPortalVIById")
@VciBusinessLog(operateName = "鑾峰彇琛ㄥ崟/琛ㄦ牸鏁版嵁")
- public BaseResult getPortalVIById(@RequestBody String id,@RequestBody String viType){
+ public BaseResult getPortalVIById(@RequestParam("id") String id,@RequestParam("viType") String viType){
try{
PortalVIVO portalVIVO= portalVIServiceI.getPortalVIById(id,viType);
return BaseResult.success(portalVIVO);
}catch (Throwable e){
e.printStackTrace();
- String exceptionMessage = "鍒涘缓涓氬姟绫诲瀷鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+ String exceptionMessage = "鑾峰彇琛ㄥ崟/琛ㄦ牸鏁版嵁鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
logger.error(exceptionMessage);
return BaseResult.fail(exceptionMessage);
}
@@ -110,12 +119,12 @@
*/
@DeleteMapping("/deleteByIds")
@VciBusinessLog(operateName = "鍒犻櫎琛ㄥ崟/琛ㄦ牸")
- public BaseResult deleteByIds(@RequestBody String ids){
+ public BaseResult deleteByIds(@RequestParam("ids") String ids){
try {
return portalVIServiceI.delete(ids) ? BaseResult.success("鍒犻櫎鎴愬姛锛�"):BaseResult.fail("鍒犻櫎澶辫触锛�");
} catch (PLException e) {
e.printStackTrace();
- String exceptionMessage = "鍒犻櫎琛ㄥ崟鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+ String exceptionMessage = VciBaseUtil.getExceptionMessage(e);
logger.error(exceptionMessage);
return BaseResult.fail(exceptionMessage);
}
@@ -124,10 +133,10 @@
*
*/
@PostMapping("/clone")
- @VciBusinessLog(operateName = "鍒犻櫎琛ㄥ崟/琛ㄦ牸")
+ @VciBusinessLog(operateName = "鍏嬮殕琛ㄥ崟/琛ㄦ牸")
public BaseResult clone(@RequestBody ClonePortalVIDTOList portalVIDTOList){
try {
- return portalVIServiceI.clone(portalVIDTOList) ? BaseResult.success("鍒犻櫎鎴愬姛锛�"):BaseResult.fail("鍒犻櫎澶辫触锛�");
+ return portalVIServiceI.clone(portalVIDTOList) ? BaseResult.success("鍏嬮殕鎴愬姛锛�"):BaseResult.fail("鍏嬮殕澶辫触锛�");
} catch (Throwable e) {
e.printStackTrace();
String exceptionMessage = "鍒犻櫎琛ㄥ崟鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
@@ -135,6 +144,26 @@
return BaseResult.fail(exceptionMessage);
}
+ }
+
+ /**
+ * 瀵煎嚭鏁版嵁搴撶殑琛ㄤ俊鎭埌excel
+ * @param response 鍝嶅簲瀵硅薄
+ * @param ids 涓氬姟绫诲瀷鐨勭紪鍙凤紝鐢ㄩ�楀彿鍒嗗壊
+ */
+ @PostMapping("/exportExcel")
+ @VciBusinessLog(operateName = "瀵煎嚭琛ㄥ崟/琛ㄦ牸鍒癳xcel涓�")
+ public void exportExcel(String ids,HttpServletResponse response){
+ String excelFileName = portalVIServiceI.exportToExcel(VciBaseUtil.str2List(ids));
+ try {
+ ControllerUtil.writeFileToResponse(response,excelFileName);
+ } catch (IOException e) {
+ try {
+ ControllerUtil.writeDataToResponse(response, LangBaseUtil.getErrorMsg(e).getBytes(StandardCharsets.UTF_8),null);
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ }
+ }
}
/**
* 鑾峰彇灞炴�у瓧娈电被鍨�
@@ -148,7 +177,7 @@
* 鑾峰彇瓒呴摼鎺ュ脊鍑烘柟娉�
*/
@GetMapping("/getItemDblList")
- @VciBusinessLog(operateName = "灞炴�у瓧娈电被鍨�")
+ @VciBusinessLog(operateName = "瓒呴摼鎺ョ被鍨�")
public BaseResult<List<KeyValue>> getItemDblList(){
return BaseResult.dataList(ItemDblEnum.getEnumAll());
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/ActionEnum.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/ActionEnum.java
new file mode 100644
index 0000000..538646b
--- /dev/null
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/ActionEnum.java
@@ -0,0 +1,132 @@
+package com.vci.web.enumpck;
+import com.vci.pagemodel.KeyValue;
+import com.vci.starter.web.enumpck.BaseEnum;
+import java.util.ArrayList;
+import java.util.List;
+/**
+ * Action鏋氫妇
+ * @author yuxc
+ *
+ */
+public enum ActionEnum implements BaseEnum{
+ EXP_CHOOSE("0","閫夋嫨"),
+ EXP_ALL("1","鍏ㄩ儴"),
+ EXP_PAGE("2","椤电爜"),
+ CLOUMN_PLNAME("鍚嶇О","plName"),
+ CLOUMN_PLCODE("缂栧彿","plCode"),
+ CLOUMN_PLBSURL("绫昏矾寰�","plBSUrl"),
+ CLOUMN_PLCSCLASS("閾炬帴鍦板潃","plCSClass"),
+ CLOUMN_PLDESC("鎻忚堪","plDesc"),
+ CLOUMN_PLTYPETYPE("绫诲瀷","plTypeType");
+ /**
+ * 鏋氫妇鐨勫��
+ */
+ private String value;
+
+ /**
+ * 鏋氫妇鏄剧ず鏂囨湰
+ */
+ private String text;
+
+ /**
+ * 鑾峰彇鏋氫妇鍊�
+ *
+ * @return 鏋氫妇鍊�
+ */
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * 璁剧疆鏋氫妇鍊�
+ *
+ * @param value 鏋氫妇鍊�
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ /**
+ * 鑾峰彇鏋氫妇鏄剧ず鏂囨湰
+ *
+ * @return 鏄剧ず鏂囨湰
+ */
+ @Override
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * 璁剧疆鏄剧ず鏂囨湰
+ *
+ * @param text 鏄剧ず鏂囨湰
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+ ActionEnum(String value, String text) {
+ this.value = value;
+ this.text = text;
+ }
+
+
+ /**
+ * 鏍规嵁鍚嶇О鑾峰彇瀵瑰簲鐨勬灇涓惧��
+ *
+ * @param text 鍚嶇О
+ * @return 鏋氫妇鍊�
+ */
+ public static String getValueByText(String text) {
+ for (ActionEnum actionEnum : ActionEnum.values()) {
+ if (actionEnum.getText().equalsIgnoreCase(text)) {
+ return actionEnum.getValue();
+ }
+ }
+ return "";
+ }
+
+ /**
+ * 鏍规嵁鏋氫妇鍊艰幏鍙栧悕绉�
+ *
+ * @param value 鏋氫妇鍊�
+ * @return 鍚嶇О
+ */
+ public static String getTextByValue(String value) {
+ for (ActionEnum actionEnum : ActionEnum.values()) {
+ if (actionEnum.getValue().equalsIgnoreCase(value)) {
+ return actionEnum.getText();
+ }
+ }
+ return "";
+ }
+ /**
+ * 鏍规嵁鏋氫妇鍊艰幏鍙栨灇涓惧璞�
+ *
+ * @param value 鏋氫妇鍊�
+ * @return 鏋氫妇瀵硅薄锛屼笉瀛樺湪鏃跺�欒繑鍥瀗ull
+ */
+ public static ActionEnum forValue(String value) {
+ for (ActionEnum actionEnum : ActionEnum.values()) {
+ if (actionEnum.getValue().equalsIgnoreCase(value)) {
+ return actionEnum;
+ }
+ }
+ return null;
+ }
+ /**
+ * 鏍规嵁鏋氫妇鍊艰幏鍙栧悕绉�
+ *
+ * @return 鍚嶇О
+ */
+ public static List<KeyValue> getActionAll() {
+ List<KeyValue> enumDataList=new ArrayList<>();
+ for (ActionEnum actionEnum : ActionEnum.values()) {
+ KeyValue enumData=new KeyValue();
+ enumData.setKey(actionEnum.value);
+ enumData.setValue(actionEnum.text);
+ enumDataList.add(enumData);
+ }
+ return enumDataList;
+ }
+}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PlTypetypeEnum.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PlTypetypeEnum.java
new file mode 100644
index 0000000..dd37809
--- /dev/null
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PlTypetypeEnum.java
@@ -0,0 +1,128 @@
+package com.vci.web.enumpck;
+
+import com.vci.pagemodel.KeyValue;
+import com.vci.starter.web.enumpck.BaseEnum;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Action鏋氫妇
+ * @author yuxc
+ *
+ */
+public enum PlTypetypeEnum implements BaseEnum{
+ BUSINESS("business","涓氬姟绫诲瀷"),
+ LINK("link","閾炬帴绫诲瀷");
+ /**
+ * 鏋氫妇鐨勫��
+ */
+ private String value;
+
+ /**
+ * 鏋氫妇鏄剧ず鏂囨湰
+ */
+ private String text;
+
+ /**
+ * 鑾峰彇鏋氫妇鍊�
+ *
+ * @return 鏋氫妇鍊�
+ */
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * 璁剧疆鏋氫妇鍊�
+ *
+ * @param value 鏋氫妇鍊�
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ /**
+ * 鑾峰彇鏋氫妇鏄剧ず鏂囨湰
+ *
+ * @return 鏄剧ず鏂囨湰
+ */
+ @Override
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * 璁剧疆鏄剧ず鏂囨湰
+ *
+ * @param text 鏄剧ず鏂囨湰
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+ PlTypetypeEnum(String value, String text) {
+ this.value = value;
+ this.text = text;
+ }
+
+
+ /**
+ * 鏍规嵁鍚嶇О鑾峰彇瀵瑰簲鐨勬灇涓惧��
+ *
+ * @param text 鍚嶇О
+ * @return 鏋氫妇鍊�
+ */
+ public static String getValueByText(String text) {
+ for (PlTypetypeEnum actionEnum : PlTypetypeEnum.values()) {
+ if (actionEnum.getText().equalsIgnoreCase(text)) {
+ return actionEnum.getValue();
+ }
+ }
+ return "";
+ }
+
+ /**
+ * 鏍规嵁鏋氫妇鍊艰幏鍙栧悕绉�
+ *
+ * @param value 鏋氫妇鍊�
+ * @return 鍚嶇О
+ */
+ public static String getTextByValue(String value) {
+ for (PlTypetypeEnum actionEnum : PlTypetypeEnum.values()) {
+ if (actionEnum.getValue().equalsIgnoreCase(value)) {
+ return actionEnum.getText();
+ }
+ }
+ return "";
+ }
+ /**
+ * 鏍规嵁鏋氫妇鍊艰幏鍙栨灇涓惧璞�
+ *
+ * @param value 鏋氫妇鍊�
+ * @return 鏋氫妇瀵硅薄锛屼笉瀛樺湪鏃跺�欒繑鍥瀗ull
+ */
+ public static PlTypetypeEnum forValue(String value) {
+ for (PlTypetypeEnum actionEnum : PlTypetypeEnum.values()) {
+ if (actionEnum.getValue().equalsIgnoreCase(value)) {
+ return actionEnum;
+ }
+ }
+ return null;
+ }
+ /**
+ * 鏍规嵁鏋氫妇鍊艰幏鍙栧悕绉�
+ *
+ * @return 鍚嶇О
+ */
+ public static List<KeyValue> getActionAll() {
+ List<KeyValue> enumDataList=new ArrayList<>();
+ for (PlTypetypeEnum actionEnum : PlTypetypeEnum.values()) {
+ KeyValue enumData=new KeyValue();
+ enumData.setKey(actionEnum.value);
+ enumData.setValue(actionEnum.text);
+ enumDataList.add(enumData);
+ }
+ return enumDataList;
+ }
+}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PortalVIType.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PortalVIType.java
index 62b23ab..d8f254a 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PortalVIType.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PortalVIType.java
@@ -1,12 +1,15 @@
package com.vci.web.enumpck;
import com.vci.common.portal.enums.GetByType;
+import com.vci.constant.PortalVIEnumConstant;
+import com.vci.starter.web.annotation.VciEnum;
/**
* 琛ㄥ崟绫诲瀷
* @author xiej
*
*/
+@VciEnum(name = PortalVIEnumConstant.PORTALVI_VI_TYPE,text = "琛ㄥ崟绫诲瀷")
public enum PortalVIType {
Form("Form", "琛ㄥ崟", (short)1),
Table("Table", "琛ㄦ牸", (short)0);
@@ -81,5 +84,5 @@
public void setIntVal(short intVal) {
this.intVal = intVal;
}
-
+
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PortalVITypeFlag.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PortalVITypeFlag.java
index 8051091..6da5dad 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PortalVITypeFlag.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PortalVITypeFlag.java
@@ -1,12 +1,15 @@
package com.vci.web.enumpck;
import com.vci.common.portal.enums.GetByType;
+import com.vci.constant.PortalVIEnumConstant;
+import com.vci.starter.web.annotation.VciEnum;
/**
* 琛ㄥ崟鏍囪绫诲瀷
* @author xiej
*
*/
+@VciEnum(name = PortalVIEnumConstant.PORTALVI_VI_FLAG,text = "琛ㄥ崟鎵�灞炰笟鍔$被鍨嬫灇涓�")
public enum PortalVITypeFlag {
LinkType("LinkType", "閾炬帴绫诲瀷鐨勮〃鍗�", (short)1),
BtmType("BtmType", "涓氬姟绫诲瀷鐨勮〃鍗�", (short)0);
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/BtmQTExportData.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/BtmQTExportData.java
new file mode 100644
index 0000000..4c293f3
--- /dev/null
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/BtmQTExportData.java
@@ -0,0 +1,65 @@
+package com.vci.web.other;
+
+import com.vci.corba.omd.btm.BizType;
+import com.vci.corba.omd.ltm.LinkType;
+import com.vci.corba.omd.qtm.QTD;
+import com.vci.corba.omd.qtm.QTInfo;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 鏌ヨ涓氬姟绫诲瀷妯℃澘瀵煎嚭鏁版嵁绫伙細鍙簭鍒楀寲涓烘ā鏉挎枃浠�,鍚屾椂涔熷吋瀵煎嚭鏁版嵁鎺у埗绫�
+ * @Title :QTExportData.java
+ * @Description :
+ * @Copyright :瀹忓崥杩滆揪绉戞妧鏈夐檺鍏徃
+ * @Author :骞冲彴涓庤鍒掗儴/ZhongGY/E-mail:zhonggy@vci-tech.com
+ * @Date :2015-6-8
+ * @Version :1
+ * @Other :浜х敓娉ㄩ噴:Alt+Shift+J
+ */
+public class BtmQTExportData implements Serializable{
+
+ private static final long serialVersionUID = 1L;
+
+
+ /**
+ * 闇�瑕佸簭鍒楀寲鐨勬ā鏉挎暟鎹�
+ */
+ //
+ private Map<String/*绫诲瀷鍚嶇О*/, BizType/*绫诲瀷瀵硅薄*/> selectedBtmItems = new HashMap<String, BizType>();
+ private Map<String/*绫诲瀷鍚嶇О*/,String[]/*绫诲瀷鎵�灞炲睘鎬�*/> selectedBtmAttrs = new HashMap<String, String[]>();
+ private Map<String/*鏌ヨ妯℃澘鍚嶇О*/, QTInfo/*鏌ヨ妯℃澘瀵硅薄*/> allSelectedQTs = new HashMap<String, QTInfo>();
+ private Map<String/*绫诲瀷鍚嶇О*/, QTD[]/*鏌ヨ妯℃澘瀹氫箟*/> allQTDs = new HashMap<String, QTD[]>();
+
+
+ public Map<String, BizType> getSelectedBtmItems() {
+ return selectedBtmItems;
+ }
+
+ public void setSelectedBtmItems(Map<String, BizType> selectedBtmItems) {
+ this.selectedBtmItems = selectedBtmItems;
+ }
+
+ public Map<String, String[]> getSelectedBtmAttrs() {
+ return selectedBtmAttrs;
+ }
+
+ public void setSelectedBtmAttrs(Map<String, String[]> selectedBtmAttrs) {
+ this.selectedBtmAttrs = selectedBtmAttrs;
+ }
+
+ public Map<String, QTD[]> getAllQTDs() {
+ return allQTDs;
+ }
+
+ public void setAllQTDs(Map<String, QTD[]> allQTDs) {
+ this.allQTDs = allQTDs;
+ }
+
+ public Map<String, QTInfo> getAllQTs() {
+ return allSelectedQTs;
+ }
+
+}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsActionServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsActionServiceI.java
index 26e0397..95e28e9 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsActionServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsActionServiceI.java
@@ -1,11 +1,10 @@
package com.vci.web.service;
import com.vci.corba.common.PLException;
-import com.vci.dto.PLActionClsDTO;
-import com.vci.dto.PLActionDTO;
-import com.vci.dto.PLActionQueryDTO;
+import com.vci.dto.*;
import com.vci.starter.web.pagemodel.BaseResult;
import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.FileNotFoundException;
@@ -65,4 +64,33 @@
* @return
*/
void exportBeans(List<String> actionOid, HttpServletResponse response) throws PLException, IOException;
+ /**
+ * 瀵煎叆Action
+ * @param file 涓婁紶鐨勬枃浠�
+ * @return
+ */
+ BaseResult impData(MultipartFile file) throws IOException, PLException;
+ /**
+ * 瀵煎嚭Action
+ * @param plActionExpDTO 瀵煎嚭灞炴�ц缃璞�
+ */
+ void exportAction(PLActionExpDTO plActionExpDTO, HttpServletResponse response) throws PLException, IOException;
+ /**
+ * 淇濆瓨Action鍙傛暟鏁版嵁
+ * dto action浼犺緭瀵硅薄
+ * @return 淇濆瓨缁撴灉
+ */
+ BaseResult savePLActionParam(PLActionParamDTO dto) throws PLException;
+ /**
+ * 淇敼Action鍙傛暟鏁版嵁
+ * dto action浼犺緭瀵硅薄
+ * @return 淇濆瓨缁撴灉
+ */
+ BaseResult updatePLActionParam(PLActionParamDTO dto) throws PLException;
+ /**
+ * 鍒犻櫎Action鍙傛暟鏁版嵁
+ * oid 鍙傛暟涓婚敭
+ * @return 淇濆瓨缁撴灉
+ */
+ BaseResult deletePLActionParam(String oid) throws PLException;
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsAttributeServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsAttributeServiceI.java
index f2c91dc..96ffd58 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsAttributeServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsAttributeServiceI.java
@@ -178,4 +178,12 @@
*/
boolean isDefaultAttr(String attr);
+ /**
+ * 鏍规嵁涓氬姟绫诲瀷/閾炬帴绫诲瀷鑾峰彇灞炴�т俊鎭�
+ * @param btName 涓氬姟绫诲瀷/閾炬帴绫诲瀷
+ * @param typeFlag 0:涓氬姟绫诲瀷,1:閾炬帴绫诲瀷
+ * @return
+ */
+ List<OsAttributeVO> getOsAttributeVOSByBtName(String btName,int typeFlag)throws Exception;
+
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java
index 964b250..2d07b7a 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java
@@ -114,14 +114,14 @@
* @param btmId 涓氬姟绫诲瀷鐨勭紪鍙�
* @return 灞炴�х殑鍐呭
*/
- List<OsBtmTypeAttributeVO> listAttributeByBtmId(String btmId);
+ List<OsBtmTypeAttributeVO> listAttributeByBtmId(String btmId) throws PLException;
/**
* 鏍规嵁涓氬姟绫诲瀷鑾峰彇鍖呭惈鐨勫睘鎬�--鍖呭惈鍩虹灞炴��
* @param btmId 涓氬姟绫诲瀷鐨勭紪鍙�
* @return 灞炴�х殑鍐呭
*/
- List<OsBtmTypeAttributeVO> listAttributeByBtmIdHasDefault(String btmId);
+ List<OsBtmTypeAttributeVO> listAttributeByBtmIdHasDefault(String btmId) throws PLException;
/**
* 鍙傜収涓氬姟绫诲瀷
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsCodeGenSchemaServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsCodeGenSchemaServiceI.java
index 60b864d..84f113d 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsCodeGenSchemaServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsCodeGenSchemaServiceI.java
@@ -1,4 +1,5 @@
package com.vci.web.service;
+import com.vci.corba.common.PLException;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.DataGrid;
import com.vci.starter.web.pagemodel.PageHelper;
@@ -59,7 +60,7 @@
* @param oid 鏂规鐨勪富閿�
* @throws VciBaseException 鍙傛暟涓虹┖锛屾柟妗堜笉瀛樺湪浼氭姏鍑哄紓甯�
*/
- void productCodeFile(String oid) throws VciBaseException;
+ void productCodeFile(String oid) throws VciBaseException, PLException;
/**
* 棰勮浠g爜鏂囦欢
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java
index 63ee265..adf9e4b 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java
@@ -173,4 +173,13 @@
* @return 灞炴�х殑淇℃伅
*/
List<OsLinkTypeAttributeVO> getAllAttributeByLink(String name) throws PLException, ParseException;
+
+ /**
+ * 鑾峰彇璁剧疆鎺掑簭瀛楁鐨勬帓搴忓瓧娈�
+ * @param linkType 閾炬帴绫诲瀷鐨勭紪鍙�
+ * @param btmType 涓氬姟绫诲瀷鐨勭紪鍙�
+ * @param direction 姝�/鍙嶅悜
+ * @return 灞炴�х殑淇℃伅
+ */
+ List<String> getAllOrderbyAttributeByLink(String linkType, String btmType, String direction) throws PLException, ParseException;
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsPortalVIServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsPortalVIServiceI.java
index 62df51c..223f0d6 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsPortalVIServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsPortalVIServiceI.java
@@ -74,7 +74,12 @@
*/
boolean clone(ClonePortalVIDTOList portalVIDTOList)throws Throwable;
-
+ /**
+ * 瀵煎嚭琛ㄥ崟/琛ㄦ牸鐨勪俊鎭埌Excel涓�
+ * @param idList 涓氬姟绫诲瀷鐨勭紪鍙烽泦鍚�
+ * @return excel鐨勫叏璺緞
+ */
+ String exportToExcel(Collection<String> idList);
/**
*鏌ヨ鎵�鏈夎〃鍗曟垨鑰呰〃鏍�
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsQuereyTemplateServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsQuereyTemplateServiceI.java
index c4fbb99..4b2f1fa 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsQuereyTemplateServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsQuereyTemplateServiceI.java
@@ -3,6 +3,7 @@
import com.vci.corba.common.PLException;
import com.vci.corba.omd.ltm.LinkType;
import com.vci.corba.omd.qtm.QTD;
+import com.vci.corba.omd.qtm.QTInfo;
import com.vci.dto.QTInfoDTO;
import com.vci.pagemodel.OsBtmTypeAttributeVO;
import com.vci.pagemodel.OsLinkTypeAttributeVO;
@@ -52,7 +53,6 @@
*/
BaseResult deleteTemplate(String name) throws PLException;
/**
- *
* @param qtInfoDTO 浼犺緭鐨勬暟鎹璞★細
* linkTypeName 閾炬帴绫诲瀷銆�
* rdPositive 鏂瑰悜锛宼rue姝e悜锛宖alse鍙嶅悜
@@ -106,4 +106,52 @@
* @return 鎿嶄綔缁撴灉
*/
BaseResult deleteLinkTemplate(List<String> templateNames) throws PLException;
+
+ /**
+ * 鏌ヨ鏉′欢涓嬬殑鏌ヨ鎸夐挳
+ * @param qtInfoDTO
+ * @return
+ * @throws PLException
+ */
+ BaseResult getCriteriaBtm(QTInfoDTO qtInfoDTO) throws PLException;
+
+ /**
+ * 涓氬姟绫诲瀷鏌ヨ妯℃澘淇濆瓨
+ * @param qtInfoDTO 淇濆瓨浼犺緭瀵硅薄
+ * @return 淇濆瓨缁撴灉
+ */
+ BaseResult btmSave(QTInfoDTO qtInfoDTO) throws PLException;
+
+ /**
+ * 鏇存柊鏁版嵁搴撶粨鏋�
+ * @return 淇濆瓨缁撴灉
+ */
+ BaseResult updateDBStructure() throws PLException;
+
+ /**
+ * 涓氬姟绫诲瀷鏌ヨ妯℃澘鏍戞煡璇紝鐢ㄤ簬鐣岄潰鐨勫鍑哄姛鑳�
+ * @return 鏌ヨ缁撴灉
+ */
+ BaseResult getBtmQtTree() throws PLException;
+
+ /**
+ * 瀵煎嚭涓氬姟绫诲瀷鏌ヨ妯℃澘
+ * names 鏌ヨ妯℃澘鍚�
+ * @return
+ */
+ void expBtmQTTemplate(List<String> names, HttpServletResponse response) throws PLException,IOException ;
+
+ /**
+ * 鏌ヨ鏉′欢涓嬬殑閫夋嫨鏌ヨ妯℃澘瀵硅瘽妗嗭紙鏌ヨ鍏ㄩ儴妯℃澘鍜屾墍瀵瑰簲鐨勪笟鍔$被鍨嬫垨閾炬帴绫诲瀷鍚嶏級
+ * @return
+ */
+ BaseResult getAllQTs() throws PLException;
+
+ /**
+ * 瀵煎叆涓氬姟绫诲瀷鏌ヨ妯℃澘
+ * @param file 涓婁紶鐨勬枃浠�
+ * @return 瀵煎叆缁撴灉
+ */
+ BaseResult impBtmTemplate(MultipartFile file) throws IOException, ClassNotFoundException;
+
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java
index 0ce7bef..fd3d7b9 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java
@@ -1,27 +1,30 @@
package com.vci.web.service.impl;
import cn.hutool.core.io.FileUtil;
+import com.vci.constant.FrameWorkLangCodeConstant;
import com.vci.corba.common.PLException;
-import com.vci.corba.omd.ltm.LinkType;
-import com.vci.corba.omd.qtm.QTInfo;
import com.vci.corba.portal.data.Constraint;
import com.vci.corba.portal.data.PLAction;
import com.vci.corba.portal.data.PLActionCls;
import com.vci.corba.portal.data.PLActionParam;
-import com.vci.dto.PLActionClsDTO;
-import com.vci.dto.PLActionDTO;
-import com.vci.dto.PLActionQueryDTO;
+import com.vci.dto.*;
+import com.vci.starter.poi.bo.WriteExcelData;
+import com.vci.starter.poi.bo.WriteExcelOption;
+import com.vci.starter.poi.util.ExcelUtil;
+import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.util.ControllerUtil;
+import com.vci.starter.web.util.LangBaseUtil;
import com.vci.starter.web.util.LocalFileUtil;
+import com.vci.web.enumpck.ActionEnum;
+import com.vci.web.enumpck.PlTypetypeEnum;
import com.vci.web.other.ExportActionLogBean;
import com.vci.web.other.ExportBeans;
-import com.vci.web.other.LinkQTExportData;
import com.vci.web.service.*;
import com.vci.web.util.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
@@ -302,7 +305,7 @@
@Override
public void exportBeans(List<String> actionOid, HttpServletResponse response) throws PLException, IOException {
String defaultTempFolder = LocalFileUtil.getDefaultTempFolder();
- String vciqtmfFileName = defaultTempFolder + File.separator + "actionTemplateExp" + new Date().getTime() + ".vciamf";
+ String vciqtmfFileName = defaultTempFolder + File.separator + "VCIACTIONMODELFILE" + new Date().getTime() + ".vciamf";
HashMap exportBeans = new HashMap<String, Object>();
getExportBeans(actionOid, exportBeans);// 鑾峰緱瀵煎嚭Bean鍚屾椂锛岃褰昹og
@@ -325,6 +328,550 @@
FileUtil.del(defaultTempFolder + File.separator);
}
+ @Override
+ public BaseResult impData(MultipartFile file) throws IOException, PLException {
+ // 瀵煎叆鐨勫璞�
+ ExportBeans exportBeans = null;
+ if (file == null) {
+ return BaseResult.fail(FrameWorkLangCodeConstant.IMPORT_FAIL, new String[]{"鏃犲鍏ョ殑鏂囦欢"});
+ }
+ if (!file.getOriginalFilename().endsWith(".vciamf")) {
+ throw new VciBaseException("浠呰兘涓婁紶.vciqtf鏍煎紡鏂囦欢锛岃閲嶆柊涓婁紶锛�");
+ }
+ HashMap map;
+ try {
+ ObjectInputStream obj = new ObjectInputStream(file.getInputStream());
+ map = (HashMap) obj.readObject();
+ } catch (ClassNotFoundException e) {
+ return BaseResult.fail("瀵煎叆瀵硅薄鏈幏鍙栨垚鍔燂紒锛佸鍏ュ璞$増鏈彿涓嶅悓锛�");
+ }
+ //鏈�缁堢殑鎸佷箙鍖�
+ ArrayList<PLActionCls> pLActionClsList = new ArrayList<>();
+ // 鏇存崲actionId鍚庯紝鍙互浠庢瀵艰埅涓幏寰楀師鏉ョ殑id
+ HashMap<String /* newId */, String /* oldId */> actionIdNav = new HashMap<String /* newId */, String /* oldId */>();
+ // 鏇存崲actionClsId鍚庯紝鍙互浠庢瀵艰埅涓幏寰楀師鏉ョ殑id
+ HashMap<String /* newId */, String /* oldId */> actionClsIdNav = new HashMap<String /* newId */, String /* oldId */>();
+ //淇濆瓨鎵�鏈夌埗鍒嗙被锛岀敤id涓籯ey
+ HashMap<String/*id*/,PLActionCls> actionClses = new HashMap<String/*id*/,PLActionCls>();
+ // 瀛樺偍绗﹀悎鏉′欢鐨凱LAction
+ ArrayList<PLAction> optionPLActionList = new ArrayList<>();
+ // 瀛樺偍绗﹀悎鏉′欢鐨凱LActionCls
+ ArrayList<PLActionCls> optionPLActionClsList = new ArrayList<>();
+ // 搴撲腑鐨勬墍鏈堿ction鍒嗙被瀵硅薄
+ PLActionCls[] pLActionClses = null;
+ exportBeans = (ExportBeans) map.get("exportBeans");
+ // 娣诲姞瀵煎叆鐨勬暟鎹�
+ addImportData(exportBeans, pLActionClsList, actionIdNav, actionClsIdNav, optionPLActionClsList, pLActionClses, optionPLActionList);
+ // 灏哖LActionCls 銆丳LAction 瀵瑰簲鐨剆et闆嗗悎杞崲鎴愭暟缁勶紙鍖归厤鍘焌ddExportTreeNode鏂规硶锛�
+ PLActionCls[] newPLActionClsArray = new PLActionCls[optionPLActionClsList.size()];
+ PLAction[] newPLActionArray = new PLAction[optionPLActionList.size()];
+ optionPLActionClsList.toArray(newPLActionClsArray);
+ optionPLActionList.toArray(newPLActionArray);
+ //娓呮鍒嗙被id
+ actionClses.clear();
+ //淇濆瓨鎵�鏈夊垎绫籭d
+ for (int i = 0; i < newPLActionClsArray.length; i++) {
+ actionClses.put(newPLActionClsArray[i].id,newPLActionClsArray[i]);
+ }
+ //淇濆瓨鎵�鏈夊瓨鍦╝ction鐨勫垎绫伙紙瀛愬垎绫诲瓨鍦╝ction涔熶繚瀛橈級
+ HashSet<PLActionCls> pLActionClss =new HashSet<PLActionCls> ();
+ for (int i = 0; i < newPLActionArray.length; i++) {
+ //缂撳瓨璇ュ垎绫荤殑鎵�鏈夌埗鍒嗙被
+ saveParentCls(newPLActionArray[i].plActionCls,pLActionClss,actionClses);
+ }
+ PLActionCls[] actionClslist = new PLActionCls[pLActionClss.size()];
+ pLActionClss.toArray(actionClslist);
+ PLActionClsDTO treDto = new PLActionClsDTO();
+ treDto.setName("Action鍒嗙被");
+
+ Map<String, List<PLAction>> plActionMap = Arrays.stream(newPLActionArray).collect(Collectors.groupingBy(e -> e.plActionCls));
+ Map<String, List<PLActionCls>> plActionClsMap = pLActionClss.stream().collect(Collectors.groupingBy(e -> e.pid));
+ Map<String, List<PLActionCls>> allCls = Arrays.stream(platformClientUtil.getUIService().getPLActionClsArray()).collect(Collectors.groupingBy(e -> e.name));
+ // 娣诲姞瀛愯妭鐐�(婧愭爲鑺傜偣)
+ for (Map.Entry<String, PLActionCls> entry : exportBeans.getPLActionClsBeans().entrySet()) {
+ if (StringUtils.isBlank(entry.getValue().pid)) {
+ PLActionClsDTO parentDto = new PLActionClsDTO();
+ parentDto.setId(entry.getValue().id);
+ parentDto.setName(entry.getValue().name);
+ parentDto.setPid(entry.getValue().pid);
+ parentDto.setDescription(entry.getValue().description);
+ parentDto.setCreator(entry.getValue().creator);
+ parentDto.setCreateTime(entry.getValue().createTime);
+ parentDto.setSerialno(entry.getValue().serialno);
+ addExportTreeNode(plActionClsMap, plActionMap, parentDto, allCls, exportBeans);
+ treDto.getChilds().add(parentDto);
+ }
+ }
+ PLActionClsDTO noDto = new PLActionClsDTO();
+ noDto.setName("鏈垎绫�");
+ if(plActionMap.containsKey("")){
+ for (PLAction plAction : plActionMap.get("")) {
+ PLActionClsDTO childPrentDto = new PLActionClsDTO();
+ if (plAction.plName.endsWith("@#淇敼$%")) {
+ childPrentDto.setName(plAction.plCode + "/" + plAction.plName.replace("@#淇敼$%", "銆愪慨鏀瑰畬鎴愩��"));
+ plAction.plName = plAction.plName.replace("@#淇敼$%", "");
+ platformClientUtil.getUIService().updatePLAction(plAction);
+ }else
+ if (plAction.plName.endsWith("@#瀛樺湪鍦ㄦ湭鍒嗙被涓�$%")) {
+ childPrentDto.setName(plAction.plCode + "/" + plAction.plName.replace("@#瀛樺湪鍦ㄦ湭鍒嗙被涓�$%", "銆恆ction瀛樺湪鍦ㄦ湭鍒嗙被涓紝淇敼瀹屾垚銆�"));
+ plAction.plName = plAction.plName.replace("@#瀛樺湪鍦ㄦ湭鍒嗙被涓�$%", "");
+ platformClientUtil.getUIService().updatePLAction(plAction);
+// plAction.plName = plAction.plName.replace("@#瀛樺湪鍦ㄦ湭鍒嗙被涓�$%", "銆恆ction瀛樺湪鍦ㄦ湭鍒嗙被涓紝淇敼Action骞舵寜瀵煎叆鏂囦欢鍒涘缓action鍒嗙被銆�");
+ }
+ else {
+ childPrentDto.setName(plAction.plCode + "/" + "銆愭柊澧炲畬鎴愩��");
+// plAction.plName += "銆愭柊澧炪��";
+ platformClientUtil.getUIService().savePLAction(plAction);
+ }
+ dealParam(exportBeans, plAction);
+ childPrentDto.setId(plAction.plOId);
+ childPrentDto.setPid(plAction.plActionCls);
+ noDto.getChilds().add(childPrentDto);
+ }
+ }
+ treDto.getChilds().add(noDto);
+
+ return BaseResult.success(treDto);
+ }
+ /**
+ * 瀵煎嚭Action
+ * @param plActionExpDTO 瀵煎嚭灞炴�ц缃璞�
+ */
+ @Override
+ public void exportAction(PLActionExpDTO plActionExpDTO, HttpServletResponse response) throws PLException, IOException {
+ String defaultTempFolder = LocalFileUtil.getDefaultTempFolder();
+ String excelPath = defaultTempFolder + File.separator + plActionExpDTO.getFileName() + ".xls";
+ try {
+ new File(excelPath).createNewFile();
+ } catch (Throwable e) {
+ throw new VciBaseException(LangBaseUtil.getErrorMsg(e), new String[]{excelPath}, e);
+ }
+ isValidPageForamt(plActionExpDTO);
+ //璁剧疆鍒�
+ List<WriteExcelData> excelDataList = new ArrayList<>();
+ //璁剧疆鍒楀ご
+ for (int index = 0; index < plActionExpDTO.getColumnName().size(); index++) {
+ excelDataList.add(new WriteExcelData(0,index, plActionExpDTO.getColumnName().get(index)));
+ }
+ PLAction[] allPLAction ;
+ if(plActionExpDTO.getDataType().equals(ActionEnum.EXP_ALL.getValue()) ||
+ plActionExpDTO.getDataType().equals(ActionEnum.EXP_PAGE.getValue())){
+ allPLAction = platformClientUtil.getUIService().getAllPLAction();
+ }else{
+ allPLAction = new PLAction[plActionExpDTO.getChooseDataOid().size()];
+ for (int i = 0; i < plActionExpDTO.getChooseDataOid().size(); i++) {
+ allPLAction[i] = platformClientUtil.getUIService().getPLActionById(plActionExpDTO.getChooseDataOid().get(i));
+ }
+ }
+ if(Func.isEmpty(allPLAction)){
+ excelDataList.add(new WriteExcelData(1,1, "鏍规嵁灞炴�у悕绉版湭鏌ヨ鍒板睘鎬т俊鎭紝璇峰埛鏂板悗灏濊瘯閲嶆柊瀵煎嚭锛�"));
+ }else{
+ for (int i = 0; i < allPLAction.length; i++) {
+ PLAction action = allPLAction[i];
+ List<String> columnName = plActionExpDTO.getColumnName();
+ for (int index = 0; index < columnName.size(); index++) {
+ switch (columnName.get(index)){
+ case "缂栧彿":
+ excelDataList.add(new WriteExcelData(i+1,index, action.plCode));
+ break;
+ case "绫昏矾寰�":
+ excelDataList.add(new WriteExcelData(i+1,index, action.plBSUrl));
+ break;
+ case "閾炬帴鍦板潃":
+ excelDataList.add(new WriteExcelData(i+1,index, action.plCSClass));
+ break;
+ case "鎻忚堪":
+ excelDataList.add(new WriteExcelData(i+1,index, action.plDesc));
+ break;
+ case "绫诲瀷":
+ excelDataList.add(new WriteExcelData(i+1,index, action.plTypeType.equals(PlTypetypeEnum.BUSINESS.getValue()) ?
+ PlTypetypeEnum.BUSINESS.getText() : PlTypetypeEnum.LINK.getText()));
+ break;
+ case "鍚嶇О":
+ excelDataList.add(new WriteExcelData(i+1,index, action.plName));
+ break;
+ }
+ }
+ }
+ }
+ WriteExcelOption excelOption = new WriteExcelOption(excelDataList);
+ ExcelUtil.writeDataToFile(excelPath, excelOption);
+ ControllerUtil.writeFileToResponse(response,excelPath);
+ FileUtil.del(defaultTempFolder + File.separator);
+ }
+ /**
+ * 淇濆瓨Action鍙傛暟鏁版嵁
+ * dto action浼犺緭瀵硅薄
+ * @return 淇濆瓨缁撴灉
+ */
+ @Override
+ public BaseResult savePLActionParam(PLActionParamDTO dto) throws PLException {
+ if(dto.getName() == null || dto.getName().equals("")) {
+ throw new PLException("500",new String[]{"鍙傛暟鍚嶇О涓嶈兘涓虹┖"});
+ }
+ PLActionParam param = new PLActionParam();
+ param.oid = "";
+ param.name = dto.getName();
+ param.defaultValue = dto.getDefaultValue();
+ param.description = dto.getDescription();
+ param.action = dto.getAction();
+ String message = platformClientUtil.getUIService().createPLActionParam(param);
+
+ if(message.startsWith("0")) {
+ if(message.equals("01")) {
+ throw new PLException("500",new String[]{"鍙傛暟鍚嶅凡缁忓瓨鍦紒"});
+ } else {
+ throw new PLException("500",new String[]{"娣诲姞鎸夐挳鍙傛暟鏃跺彂鐢熷紓甯革細" + message.substring(1)});
+ }
+ }
+ return BaseResult.success();
+ }
+
+ @Override
+ public BaseResult updatePLActionParam(PLActionParamDTO dto) throws PLException {
+ if(dto.getName() == null || dto.getName().equals("")) {
+ throw new PLException("500",new String[]{"鍙傛暟鍚嶇О涓嶈兘涓虹┖"});
+ }
+ PLActionParam param = new PLActionParam();
+ param.oid = dto.getOid();
+ param.name = dto.getName();
+ param.defaultValue = dto.getDefaultValue();
+ param.description = dto.getDescription();
+ param.action = dto.getAction();
+ String message = platformClientUtil.getUIService().editPLActionParam(param);
+
+ if(message.startsWith("0")) {
+ if(message.equals("01")) {
+ throw new PLException("500",new String[]{"鍙傛暟鍚嶅凡缁忓瓨鍦紒"});
+ } else {
+ throw new PLException("500",new String[]{"娣诲姞鎸夐挳鍙傛暟鏃跺彂鐢熷紓甯革細" + message.substring(1)});
+ }
+ }
+ return BaseResult.success();
+ }
+ /**
+ * 鍒犻櫎Action鍙傛暟鏁版嵁
+ * oid 鍙傛暟涓婚敭
+ * @return 淇濆瓨缁撴灉
+ */
+ @Override
+ public BaseResult deletePLActionParam(String oid) throws PLException {
+ if(StringUtils.isBlank(oid)){
+ throw new PLException("500", new String[]{"鍙傛暟涓婚敭涓嶈兘涓虹┖"});
+ }
+ String message = platformClientUtil.getUIService().deletePLActionParam(oid);
+ if (message.startsWith("0")) {
+ throw new PLException("500", new String[]{"鍒犻櫎鎸夐挳鍙傛暟鏃跺彂鐢熷紓甯革細" + message.substring(1)});
+ }
+ return BaseResult.success();
+ }
+
+ public boolean isValidPageForamt(PLActionExpDTO plActionExpDTO) throws PLException {
+
+ boolean res = false;
+ if(plActionExpDTO.getDataType().equals(ActionEnum.EXP_ALL.getValue()) ||
+ plActionExpDTO.getDataType().equals(ActionEnum.EXP_CHOOSE.getValue())) {
+ res = true;
+ return res;
+ }
+ if(StringUtils.isBlank(plActionExpDTO.getPageNum())){
+ throw new PLException("500", new String[]{"椤电爜涓嶈兘涓虹┖"});
+ } else{
+ int pageCount = 1;//杩欓噷鍥哄畾鐢变簬鐣岄潰娌℃湁缈婚〉鍔熻兘
+ String[] pages = plActionExpDTO.getPageNum().split("-");
+
+ // 鐢╠obule鎺ユ敹杈撳叆鐨勬暟鎹紝闃叉杈撳叆瓒呭ぇ鍊硷紙澶т簬Integer.MAX_VALUE锛�
+ // 杞崲鎴怚nteger锛岃繘琛屾瘮杈冿紝鍙婂湪鎻愮ず鍐呭涓幓鎺塪ouble绫诲瀷鏁版嵁鍙兘浼氬嚭鐜扮殑灏忔暟鐐�
+ if(pages.length == 1){
+ double pageD = Double.parseDouble(pages[0]);
+ if(pageD > Integer.MAX_VALUE){
+ throw new PLException("500", new String[]{"璧峰椤电爜 " + String.valueOf(pageD) + " 涓嶅緱澶т簬 " + Integer.MAX_VALUE});
+ }else{
+ int page = (int)pageD;
+ if(page > pageCount){
+ throw new PLException("500", new String[]{"杈撳叆鐨勯〉鐮� " + page + " 涓嶅緱澶т簬鎬婚〉鏁� " + pageCount});
+ } else if(page > Integer.MAX_VALUE){
+ throw new PLException("500", new String[]{"杈撳叆鐨勯〉鐮� " + page + " 涓嶅緱澶т簬 " + Integer.MAX_VALUE});
+ } else {
+ res = true;
+ }
+ }
+ } else{
+ double pageStartD = Double.parseDouble(pages[0]);
+ double pageEndD = Double.parseDouble(pages[1]);
+ if(pageStartD > Integer.MAX_VALUE){
+ throw new PLException("500", new String[]{"璧峰椤电爜 " + pageStartD + " 涓嶅緱澶т簬 " + Integer.MAX_VALUE});
+ } else if(pageEndD > Integer.MAX_VALUE){
+ throw new PLException("500", new String[]{"缁撴潫椤电爜 " + pageEndD + " 涓嶅緱澶т簬 " + Integer.MAX_VALUE});
+ } else{
+ int pageStart = (int)pageStartD;
+ int pageEnd = (int)pageEndD;
+ if(pageStart > pageCount){
+ throw new PLException("500", new String[]{"璧峰椤电爜 " + pageStart + " 涓嶅緱澶т簬鎬婚〉鏁� " + pageCount});
+ } else if(pageEnd > pageCount){
+ throw new PLException("500", new String[]{"缁撴潫椤电爜 " + pageEnd + " 涓嶅緱澶т簬鎬婚〉鏁� " + pageCount});
+ } else if(pageStart > pageEnd){
+ throw new PLException("500", new String[]{"璧峰椤电爜 " + pageStart + " 涓嶅緱澶т簬缁撴潫椤电爜 " + pageEnd});
+ } else{
+ res = true;
+ }
+ }
+ }
+ }
+ return res;
+ }
+
+
+ /**
+ * 澶勭悊鍙傛暟鍒楄〃
+ * @param exportBeans 瀵煎叆鏁版嵁闆嗗悎
+ * @param plAction action瀵硅薄
+ * @throws PLException
+ */
+ private void dealParam(ExportBeans exportBeans, PLAction plAction) throws PLException {
+ PLActionParam[] plActionParamArrayByActionId = exportBeans.getPLActionParamArrayByActionId(plAction.plOId);
+ PLActionParam[] paramArray = platformClientUtil.getUIService().getPLActionParamArrayByActionId(plAction.plOId);
+ Map<String, List<PLActionParam>> params = Arrays.stream(paramArray).collect(Collectors.groupingBy(e -> e.oid));
+ if(plActionParamArrayByActionId == null){
+ return;
+ }
+ for (PLActionParam param : plActionParamArrayByActionId) {
+ if(params.containsKey(param)){
+ platformClientUtil.getUIService().editPLActionParam(param);
+ }else {
+ platformClientUtil.getUIService().createPLActionParam(param);
+ }
+ }
+ }
+
+ private void addExportTreeNode(Map<String, List<PLActionCls>> pLActionClses, Map<String, List<PLAction>> plActions,
+ PLActionClsDTO parentDto,Map<String, List<PLActionCls>> allCls, ExportBeans exportBeans) throws PLException {
+
+ //澶勭悊褰撳墠鑺傜偣涓嬬殑action
+ if(plActions.containsKey(parentDto.getId())){
+ for (PLAction plAction : plActions.get(parentDto.getId())) {
+ PLActionClsDTO childPrentDto = new PLActionClsDTO();
+ childPrentDto.setId(plAction.plOId);
+ if (plAction.plName.endsWith("@#淇敼$%")) {
+ childPrentDto.setName(plAction.plCode + "/" + plAction.plName.replace("@#淇敼$%", "銆愪慨鏀规垚鍔熴��"));
+// plAction.plName = plAction.plName.replace("@#淇敼$%", "銆愪慨鏀广��");
+ plAction.plName = plAction.plName.replace("@#淇敼$%", "");
+ platformClientUtil.getUIService().updatePLAction(plAction);
+ }else
+ if (plAction.plName.endsWith("@#瀛樺湪鍦ㄦ湭鍒嗙被涓�$%")) {
+ childPrentDto.setName(plAction.plCode + "/" + plAction.plName.replace("@#瀛樺湪鍦ㄦ湭鍒嗙被涓�$%", "銆恆ction瀛樺湪鍦ㄦ湭鍒嗙被涓紝淇敼Action鎴愬姛銆�"));
+// plAction.plName = plAction.plName.replace("@#瀛樺湪鍦ㄦ湭鍒嗙被涓�$%", "銆恆ction瀛樺湪鍦ㄦ湭鍒嗙被涓紝淇敼Action骞舵寜瀵煎叆鏂囦欢鍒涘缓action鍒嗙被銆�");
+ plAction.plName = plAction.plName.replace("@#瀛樺湪鍦ㄦ湭鍒嗙被涓�$%", "");
+ platformClientUtil.getUIService().updatePLAction(plAction);
+ }
+ else {
+ childPrentDto.setName(plAction.plCode + "/" + plAction.plName.replace("@#鏂板%", "銆愭柊澧炴垚鍔熴��"));
+// plAction.plName += "銆愭柊澧炪��";
+ platformClientUtil.getUIService().savePLAction(plAction);
+ }
+ dealParam(exportBeans, plAction);
+ childPrentDto.setPid(plAction.plActionCls);
+ parentDto.getChilds().add(childPrentDto);
+ }
+ }
+ if(pLActionClses.containsKey(parentDto.getId())){
+ List<PLActionCls> plActionCls = pLActionClses.get(parentDto.getId());
+ for (PLActionCls plActionCl : plActionCls) {
+ PLActionClsDTO childParentDto = new PLActionClsDTO();
+ childParentDto.setId(plActionCl.id);
+ if(allCls.containsKey(childParentDto.getName())){
+ childParentDto.setName(plActionCl.name);
+ }else {
+ childParentDto.setName(plActionCl.name + "銆愭柊澧炲畬鎴愩��");
+ platformClientUtil.getUIService().creaetePLActionCls(plActionCl);
+ }
+ childParentDto.setPid(plActionCl.pid);
+ childParentDto.setDescription(plActionCl.description);
+ childParentDto.setCreator(plActionCl.creator);
+ childParentDto.setCreateTime(plActionCl.createTime);
+ childParentDto.setSerialno(plActionCl.serialno);
+ addExportTreeNode(pLActionClses, plActions, childParentDto, allCls, exportBeans);
+ parentDto.getChilds().add(childParentDto);
+ }
+
+ }
+
+ }
+
+
+ /**
+ * 淇濆瓨鎵�鏈夌埗鍒嗙被
+ * @param plActionCls
+ * @param pLActionClsList
+ */
+ private void saveParentCls(String plActionCls, HashSet<PLActionCls> pLActionClsList,
+ HashMap<String/*id*/,PLActionCls> actionClses) {
+ if(actionClses.containsKey(plActionCls)){
+ PLActionCls pCls = actionClses.get(plActionCls);
+ pLActionClsList.add(pCls);
+ saveParentCls(pCls.pid, pLActionClsList, actionClses);
+ }
+
+ }
+
+ private void addImportData(ExportBeans exportBeans, ArrayList<PLActionCls> pLActionClsList, HashMap<String /* newId */,
+ String /* oldId */> actionIdNav,HashMap<String /* newId */, String /* oldId */> actionClsIdNav,
+ ArrayList<PLActionCls> optionPLActionClsList, PLActionCls[] pLActionClses, ArrayList<PLAction> plActionList)
+ throws PLException {
+ HashMap<String, PLAction> pLActionBeans = exportBeans.getPLActions();
+ if (pLActionBeans == null) {
+ throw new VciBaseException("瀵煎叆瀵硅薄鏈幏鍙栨垚鍔燂紒锛�");
+ }
+ //鏁版嵁搴撲腑娌℃湁瀛樺湪鐨勬暟鎹璞★紝闇�瑕佽繘琛屼繚瀛�
+// ArrayList<PLAction> plActionList = new ArrayList<>();
+ PLAction[] allPLAction = platformClientUtil.getUIService().getAllPLAction();
+ Map<String, PLAction> allPLActionMap = Arrays.stream(allPLAction).collect(Collectors.toMap(e -> e.plOId, e -> e));
+ Set<Map.Entry<String, PLAction>> plActions = pLActionBeans.entrySet();
+ for (Map.Entry<String, PLAction> entry : plActions) {
+ PLAction plAction = entry.getValue();
+ PLAction plActionInDB =allPLActionMap.get(plAction.plOId);
+
+ if (plActionInDB != null) {
+ if( plActionInDB.plActionCls != ""){
+ plAction.plActionCls = plActionInDB.plActionCls;
+ // plAction.plOId = newId;
+ plAction.plName += "@#淇敼$%";
+ plActionList.add(plAction);
+ continue;
+ }else{
+ plAction.plName += "@#瀛樺湪鍦ㄦ湭鍒嗙被涓�$%";
+ }
+
+ }
+ // 灏嗚瀹炰緥acion瀛樺叆鍒皃lActionList涓�
+ plActionList.add(plAction);
+
+ // 瀹氫箟list瀛樺偍褰撳墠action鍒版暟鎹簱action鐨勮矾寰勪笂鐨勬墍鏈塒LActionCls瀵硅薄
+ List<PLActionCls> plActionClsList = new ArrayList<PLActionCls>();
+ // 鑾峰緱搴撲腑鐨勬渶杩戠殑PLActionCls瀵硅薄
+ String pId = WebUtil.getSnowflakePk();
+ String oId = WebUtil.getSnowflakePk();
+
+ PLActionCls pLActionCls = getParentPLActionClsInDBById(plAction,
+ pId, plActionClsList, actionClsIdNav, exportBeans, optionPLActionClsList, pLActionClses);
+
+ changePLActionOID(plAction, oId, pId, actionIdNav);
+
+ if (plActionClsList.size() == 1) {
+ // 鍒犻櫎"鏈垎绫�"鍒嗙被瀵硅薄
+ PLActionCls plActionCls = plActionClsList.get(plActionClsList
+ .size() - 1);
+
+ if(pLActionCls != null){
+ plAction.plActionCls = pLActionCls.id;
+ if(plActionCls.name.equals("鏈垎绫�")){
+ plAction.plActionCls = "";
+ }
+ plActionClsList.remove(plActionClsList.size() - 1);
+ }else{
+ if(plActionCls.name.equals("鏈垎绫�")){
+ plActionClsList.remove(plActionClsList.size() - 1);
+ }else{
+ plActionCls.pid = "";
+ }
+
+ }
+
+ }
+ if (plActionClsList.size() >= 2) {
+
+ PLActionCls plActionCls2 = plActionClsList.get(plActionClsList
+ .size() - 2);
+ PLActionCls plActionCls1 = plActionClsList.get(plActionClsList
+ .size() - 1);
+ if (pLActionCls != null) {
+ // 灏嗗鍏ュ璞′笌鈥滃簱涓殑鏈�杩戠殑PLActionCls瀵� 璞♀�漬ame鐩稿悓鐨勫璞�
+ // 鐨勪笅涓�涓狿LActionCls瀵硅薄鐖秈d鏀逛负搴撲腑鈥滄渶杩戔�漃LActionCls瀵硅薄id
+ plActionClsList.remove(plActionClsList.size() - 1);
+ plActionCls2.pid = pLActionCls.id;
+ }else{
+ if(plActionCls1.name.equals("鏈垎绫�")){
+ plActionClsList.remove(plActionClsList.size() - 1);
+ plActionCls2.pid = "";
+ }else{
+ plActionCls1.pid = "";
+ }
+
+ }
+
+ }
+ // 澧炲姞鍒版暣浣搇ist涓敤鏉ユ渶缁堟寔涔呭寲
+ pLActionClsList.addAll(plActionClsList);
+ }
+ }
+
+
+ private void changePLActionOID(PLAction plAction, String oId, String pId, HashMap<String /* newId */, String /* oldId */> actionIdNav) {
+ actionIdNav.put(oId, plAction.plOId);
+ plAction.plOId = oId;
+ plAction.plActionCls = pId;
+ }
+ /***
+ * 鑾峰緱搴撲腑鐨凱LActionCls瀵硅薄锛岀敤鏉ュ珌鎺ュ鍏ユ潵鐨勬爲
+ *
+ * @param
+ * @param plActionClsList
+ * @return
+ */
+ private PLActionCls getParentPLActionClsInDBById(Object plActionClsIdObj,
+ String newPLActionClsId, List<PLActionCls> plActionClsList,
+ HashMap<String /* newId */, String /* oldId */> actionClsIdNav,ExportBeans exportBeans,
+ ArrayList<PLActionCls> optionPLActionClsList, PLActionCls[] pLActionClses) {
+ String pId = null;
+ if (plActionClsIdObj instanceof PLAction) {
+ pId = ((PLAction) plActionClsIdObj).plActionCls;
+ if(pId.equals("")){
+ PLActionCls noneCls = new PLActionCls("", "鏈垎绫�", "", "", "", 0, (short)0);
+ plActionClsList.add(noneCls);
+ return noneCls;
+ }
+ }
+ if (plActionClsIdObj instanceof PLActionCls) {
+ pId = ((PLActionCls) plActionClsIdObj).pid;
+ pId = actionClsIdNav.get(pId);
+ if(pId.equals("")){
+ pId = "null";
+ }
+
+ }
+
+ PLActionCls plActionCls = exportBeans.getPLActionClsBeanById(pId);// 浠庡鍏ュ璞′腑鑾峰緱鐖跺垎绫�
+
+
+ PLActionCls tempPLActionCls = null;
+ if (plActionCls != null) {// plActionCls涓虹┖ 璇佹槑鐖惰妭鐐逛负鏍硅妭鐐�
+
+ plActionClsList.add(plActionCls);
+ if(optionPLActionClsList.contains(plActionCls)){
+ return plActionCls ;
+ }
+ for (PLActionCls Cls : pLActionClses) {
+ if ((plActionCls.id.equals("") && plActionCls.name.trim()
+ .equals("鏈垎绫�"))
+ || plActionCls.name.trim().equals(Cls.name.trim())) {
+ tempPLActionCls = Cls;
+ }
+ }
+ plActionCls.id = newPLActionClsId; // 淇敼鐖跺垎绫籭d
+ } else {
+ return null;
+ }
+
+ if (tempPLActionCls == null) {
+ String newClsId = WebUtil.getSnowflakePk();
+ actionClsIdNav.put(newClsId, plActionCls.pid);
+ plActionCls.pid = newClsId;
+ return getParentPLActionClsInDBById(plActionCls, newClsId,
+ plActionClsList, actionClsIdNav, exportBeans, optionPLActionClsList, pLActionClses);
+ }
+ return tempPLActionCls;
+ }
+
/**
* 澶勭悊瀵煎嚭鐨勫璞�
* @param actionOid 鐣岄潰閫夋嫨鐨刟ction鍒楄〃鏁版嵁
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsAttributeServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsAttributeServiceImpl.java
index 302d878..c8facba 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsAttributeServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsAttributeServiceImpl.java
@@ -1136,6 +1136,31 @@
}
/**
+ * 鏍规嵁涓氬姟绫诲瀷鑾峰彇灞炴�т俊鎭�
+ * @param btName 涓氬姟绫诲瀷/閾炬帴绫诲瀷
+ * @param typeFlag 0:涓氬姟绫诲瀷,1:閾炬帴绫诲瀷
+ * @return
+ */
+ @Override
+ public List<OsAttributeVO> getOsAttributeVOSByBtName(String btName, int typeFlag) throws Exception{
+ VciBaseUtil.alertNotNull(btName,"鍙傛暟涓嶅厑璁镐负绌�",typeFlag,"鍙傛暟涓嶅厑璁镐负绌�");
+ List<OsAttributeVO> attributeVOS=new ArrayList<>();
+ try {
+ AttributeDef[] attributeDefs=new AttributeDef[]{};
+ if(typeFlag==0){
+ attributeDefs= platformClientUtil.getBtmService().getAttributeDefs(btName);
+ }else{
+ attributeDefs=platformClientUtil.getLinkTypeService().getAttributes(btName);
+ }
+ attributeVOS=attributeDO2VOs(Arrays.asList(attributeDefs));
+ }catch (PLException e){
+ throw new Exception("鏍规嵁涓氬姟绫诲瀷鑾峰彇灞炴�у紓甯�"+e.getMessage());
+ }
+
+ return attributeVOS;
+ }
+
+ /**
* 鏄惁涓哄弬鐓у睘鎬�
* @param other 閰嶇疆鐨勫叾浠�
* @return true 鏄弬鐓�
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 080e08e..e46d9c8 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
@@ -38,6 +38,7 @@
import com.vci.starter.poi.constant.ExcelLangCodeConstant;
import com.vci.starter.poi.util.ExcelUtil;
import com.vci.starter.web.annotation.log.VciUnLog;
+import com.vci.starter.web.constant.QueryOptionConstant;
import com.vci.starter.web.enumpck.BooleanEnum;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseResult;
@@ -358,9 +359,14 @@
* @return 灞炴�х殑鍐呭
*/
@Override
- public List<OsBtmTypeAttributeVO> listAttributeByBtmId(String btmId) {
+ public List<OsBtmTypeAttributeVO> listAttributeByBtmId(String btmId) throws PLException {
VciBaseUtil.alertNotNull(btmId,"涓氬姟绫诲瀷鐨勭紪鍙�");
- OsBtmTypeVO btmTypeVO = getBtmById(btmId);
+ BizType[] bizTypes = platformClientUtil.getBtmService().getBizTypes(btmId);
+ if(Func.isEmpty(bizTypes)){
+ return new ArrayList<>();
+ }
+ BizType bizType = bizTypes[0];
+ OsBtmTypeVO btmTypeVO = btmDO2VO(bizType);
List<OsBtmTypeAttributeVO> attributes = btmTypeVO.getAttributes();
if(attributes == null){
attributes = new ArrayList<>();
@@ -375,7 +381,7 @@
* @return 灞炴�х殑鍐呭
*/
@Override
- public List<OsBtmTypeAttributeVO> listAttributeByBtmIdHasDefault(String btmId) {
+ public List<OsBtmTypeAttributeVO> listAttributeByBtmIdHasDefault(String btmId) throws PLException {
List<OsBtmTypeAttributeVO> attrVOs = listAttributeByBtmId(btmId);
if(attrVOs == null){
attrVOs = new ArrayList<>();
@@ -1216,13 +1222,15 @@
public boolean addIndex(List<IndexObject> indexObjectList) throws PLException {
VciBaseUtil.alertNotNull(indexObjectList,"鏂板鐨勭储寮曚俊鎭�");
String btmName = indexObjectList.get(0).getTypeName();
- String indexNames = indexObjectList.stream().map(IndexObject::getIndexName).collect(Collectors.joining());
+ 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){
//绱㈠紩涓嶅瓨鍦ㄦ椂鍒犻櫎灏变細鎶ラ敊绱㈠紩涓嶅瓨鍦紝鎵�浠ヨ繖閲屾湁绱㈠紩鎵嶅幓鍒犻櫎
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsCodeGenSchemaServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsCodeGenSchemaServiceImpl.java
index 2bbb45b..edd1a2a 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsCodeGenSchemaServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsCodeGenSchemaServiceImpl.java
@@ -1,6 +1,7 @@
package com.vci.web.service.impl;
import com.alibaba.fastjson.JSONObject;
+import com.vci.corba.common.PLException;
import com.vci.starter.revision.service.RevisionModelUtil;
import com.vci.starter.web.annotation.Column;
import com.vci.starter.web.constant.FrameWorkLcStatusConstant;
@@ -268,7 +269,7 @@
* @throws VciBaseException 鍙傛暟涓虹┖锛屾柟妗堜笉瀛樺湪浼氭姏鍑哄紓甯�
*/
@Override
- public void productCodeFile(String oid) throws VciBaseException {
+ public void productCodeFile(String oid) throws VciBaseException, PLException {
OsCodeGenSchemaDO codeGenSchemaDO = selectByOid(oid);
//澶勭悊涓存椂鏂囦欢澶癸紝鍦ㄤ复鏃舵枃浠跺す涓坊鍔燾odes/{涓氬姟绫诲瀷鐨勮嫳鏂囧悕绉皚
String tempFolder =LocalFileUtil.getProjectFolder();
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
index f69df86..4bd9c0c 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
@@ -4,6 +4,7 @@
import cn.hutool.core.util.ZipUtil;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
+import com.vci.common.qt.object.QTConstants;
import com.vci.constant.FrameWorkLangCodeConstant;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.atm.AttributeDef;
@@ -752,6 +753,31 @@
}
return links;
}
+ /**
+ * 鑾峰彇璁剧疆鎺掑簭瀛楁鐨勬帓搴忓瓧娈�
+ * @param linkType 閾炬帴绫诲瀷鐨勭紪鍙�
+ * @param btmType 涓氬姟绫诲瀷鐨勭紪鍙�
+ * @param direction 姝�/鍙嶅悜
+ * @return 灞炴�х殑淇℃伅
+ */
+ @Override
+ public List<String> getAllOrderbyAttributeByLink(String linkType, String btmType, String direction) throws PLException, ParseException {
+ List<String> abNames = new ArrayList<>(Arrays.asList("OID", "Creator", "CreateTime", "LastModifier", "LASTMODIFYTIME", "F_OID",
+ "F_REVISIONOID", "F_NAMEOID", "F_BtwName", "T_OID", "T_REVISIONOID", "T_NAMEOID", "T_BtwName", "TS" ));
+ AttributeDef[] attributes = platformClientUtil.getLinkTypeService().getAttributes(linkType);
+ for (AttributeDef attribute : attributes) {
+ abNames.add(String.valueOf(attribute.name));
+ }
+ String wrapper = "T_OID.";
+ if(direction.equals(QTConstants.DIRECTION_OPPOSITE)){
+ wrapper = "F_OID.";
+ }
+ List<OsBtmTypeAttributeVO> bizTypeQTDs = btmService.getBizTypeQTDs(btmType);
+ for (OsBtmTypeAttributeVO bizTypeQTD : bizTypeQTDs) {
+ abNames.add(wrapper + bizTypeQTD.getId());
+ }
+ return abNames;
+ }
/**
* 淇閾炬帴绫诲瀷鐨剎ml鏂囦欢
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java
index 76e4cc3..b8a46a6 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java
@@ -1,24 +1,37 @@
package com.vci.web.service.impl;
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.util.ZipUtil;
import com.vci.bo.ItemSeniorQueryBO;
import com.vci.common.utility.ObjectUtility;
import com.vci.corba.common.PLException;
+import com.vci.corba.omd.qtm.QTD;
+import com.vci.corba.omd.qtm.QTInfo;
import com.vci.corba.portal.PortalService.GetPagePortalVIArrayByPageInfoResult;
import com.vci.corba.portal.data.PortalVI;
import com.vci.dto.*;
import com.vci.model.*;
import com.vci.pagemodel.*;
+import com.vci.starter.poi.bo.WriteExcelData;
+import com.vci.starter.poi.bo.WriteExcelOption;
+import com.vci.starter.poi.util.ExcelUtil;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseQueryObject;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.pagemodel.DataGrid;
+import com.vci.starter.web.util.LocalFileUtil;
import com.vci.starter.web.util.VciBaseUtil;
+import com.vci.starter.word.bo.WordMergeStartTableDataBO;
+import com.vci.starter.word.util.WordUtil;
import com.vci.web.enumpck.ItemTypeEnum;
import com.vci.web.enumpck.PortalVIType;
import com.vci.web.enumpck.PortalVITypeFlag;
+import com.vci.web.service.OsAttributeServiceI;
import com.vci.web.service.OsPortalVIServiceI;
+import com.vci.web.service.OsQuereyTemplateServiceI;
import com.vci.web.util.PlatformClientUtil;
import com.vci.web.util.UITools;
+import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -27,8 +40,10 @@
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
+import java.io.*;
import java.util.*;
-import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Function;
import java.util.stream.Collectors;
/*
@@ -48,13 +63,22 @@
@Autowired(required = false)
@Lazy
private OsPortalVIServiceI self;
-
+ /**
+ * 鍔犺浇鑷韩
+ */
+ @Autowired(required = false)
+ private OsAttributeServiceI osAttributeService;
/**
* 骞冲彴鐨勮皟鐢ㄥ伐鍏风被
*/
@Autowired
private PlatformClientUtil platformClientUtil;
+ /**
+ * 鏌ヨ妯℃澘鏈嶅姟
+ */
+ @Autowired
+ private OsQuereyTemplateServiceI quereyTemplateServiceI;
@Override
public void clearCache() {
@@ -131,7 +155,7 @@
*/
@Override
public PortalVIVO getPortalVIById(String id,String viType) throws PLException {
- VciBaseUtil.alertNotNull(id,"涓婚敭涓虹┖锛�");
+ VciBaseUtil.alertNotNull(id,"涓婚敭");
String lableName=PortalVIType.Form.getLabel();
if(PortalVIType.Table.getName()==viType){
lableName=PortalVIType.Table.getLabel();
@@ -156,7 +180,8 @@
@Override
public boolean delete(DeletePortalVIDTOList portalVIDTOList) throws PLException {
if(portalVIDTOList==null||CollectionUtils.isEmpty(portalVIDTOList.getPortalVIDTOList())){
- VciBaseUtil.alertNotNull("璇烽�夋嫨瑕佸垹闄ょ殑瀵硅薄!");
+ // VciBaseUtil.alertNotNull("鍒犻櫎鐨勫璞�");
+ throw new PLException("1001",new String[]{"璇烽�夋嫨瑕佸垹闄ょ殑瀵硅薄锛亇"});
}
try {
for(PortalVIDTO portalVIDTO:portalVIDTOList.getPortalVIDTOList()) {
@@ -218,13 +243,24 @@
throw new VciBaseException("璇烽�夋嫨瑕佸厠闅嗙殑瀵硅薄!");
}
try {
+ String typeName=clonePortalVIDTOList.getClonePortalVIDTOList().get(0).getTypeName();
+ PortalVI[] portalVIS= platformClientUtil.getPortalService().getPortalVIArrayByTypeName(typeName);
+ Map<String, PortalVIVO> PortalVIMap=new HashMap<>();
+ if(!CollectionUtils.isEmpty(Arrays.asList(portalVIS))) {
+ List<PortalVIVO> portalVIVOS = portalVIDOO2VOS(Arrays.asList(portalVIS));
+ PortalVIMap =portalVIVOS.stream().collect(Collectors.toMap(PortalVIVO::getViName, Function.identity()));
+ }
+ List<PortalVI> portalVIList=new ArrayList<>();
for (ClonePortalVIDTO clonedestObject : clonePortalVIDTOList.getClonePortalVIDTOList()) {
String viName = clonedestObject.getViName();
PortalVIDTO portalVIDTO = clonedestObject.getOldPortalVIDTO();
- String typeName = clonedestObject.getTypeName();
short typeFlag = clonedestObject.getTypeFlag();
if (viName != null) {
VciBaseUtil.alertNotNull(viName, "鍏嬮殕鍚嶇О涓嶅厑璁镐负绌�");
+ //throw new PLException("1001",new String[]{"璇烽�夋嫨瑕佸垹闄ょ殑瀵硅薄锛亇"});
+ if( PortalVIMap.containsKey(viName)){
+ throw new VciBaseException("鍏嬮殕鍚嶇О"+viName+"宸插瓨鍦紝璇锋牳瀵癸紒");
+ }
PortalVI portalVI = UITools.getService().getPortalVIById(portalVIDTO.getId());
portalVI.id = ObjectUtility.getNewObjectID36();
portalVI.viName = viName;
@@ -235,7 +271,8 @@
if (typeFlag == PortalVITypeFlag.BtmType.getIntVal() || typeFlag == PortalVITypeFlag.LinkType.getIntVal()) {
portalVI.typeFlag = typeFlag;
}
- UITools.getService().savePortalVI(portalVI);
+ platformClientUtil.getPortalService().savePortalVI(portalVI);
+ portalVIList.add(portalVI);
}
}
}catch (PLException e){
@@ -244,7 +281,192 @@
return true;
}
+ @Override
+ public String exportToExcel(Collection<String> idList) {
+ String defaultTempFolder = LocalFileUtil.getDefaultTempFolder();
+ String xfileName="export.xls";
+ List<WriteExcelData> rowDataList = new ArrayList<>();
+ List<WriteExcelData> qtRowDataList = new ArrayList<>();
+ //VciBaseUtil.alertNotNull(idList);
+ List<PortalVIDTO> portalVIDTOList= listByIds(idList);
+ final int index=0;
+ String excelFileName = defaultTempFolder + File.separator + xfileName;
+ File excelFile = new File(excelFileName);
+ try {
+ excelFile.createNewFile();
+ }catch (Throwable e){
+ String msg = "鍦ㄥ垱寤篹xcel鏂囦欢鐨勬椂鍊欏嚭鐜颁簡閿欒";
+ if(logger.isErrorEnabled()){
+ logger.error(msg,e);
+ }
+ throw new VciBaseException(msg+",{0}",new String[]{excelFileName},e);
+ }
+
+
+ rowDataList.add(new WriteExcelData(index, 0, "涓氬姟绫诲瀷鍚嶇О"));
+ rowDataList.add(new WriteExcelData(index, 1, "鍚嶇О"));
+ rowDataList.add(new WriteExcelData(index, 2, "涓氬姟绫诲瀷"));
+ rowDataList.add(new WriteExcelData(index, 3, "琛ㄥ崟绫诲瀷"));
+ rowDataList.add(new WriteExcelData(index, 4, "閰嶇疆鏂囨湰"));
+ rowDataList.add(new WriteExcelData(index, 5, "灞炴��"));
+ rowDataList.add(new WriteExcelData(index, 6, "鏌ヨ妯℃澘鍚嶇О"));
+ rowDataList.add(new WriteExcelData(index, 7, "鏌ヨ妯℃澘閰嶇疆鏂囨湰"));
+ rowDataList.add(new WriteExcelData(index, 8, "鏌ヨ妯℃澘涓氬姟绫诲瀷"));
+
+
+ qtRowDataList.add(new WriteExcelData(index, 0, "涓氬姟绫诲瀷鍚嶇О"));
+ qtRowDataList.add(new WriteExcelData(index, 1, "閾炬帴绫诲瀷鍚嶇О"));
+ qtRowDataList.add(new WriteExcelData(index, 2, "鏌ヨ妯℃澘瀹氫箟鍚嶇О"));
+ qtRowDataList.add(new WriteExcelData(index, 3, "灞炴��"));
+
+ if(!CollectionUtils.isEmpty(portalVIDTOList)){
+ final int[] rowIndex = {1};
+ boolean isLink=PortalVITypeFlag.LinkType.getIntVal()== portalVIDTOList.get(0).getTypeFlag()?true:false;
+ try {
+ BaseResult baseResult= quereyTemplateServiceI.queryTemplateList( portalVIDTOList.get(0).getTypeName(),isLink);
+ if(baseResult.isSuccess()){
+ final int[] rowIndex1 = {1};
+ Collection< QTD> qtdList= baseResult.getData();
+ if(!CollectionUtils.isEmpty(qtdList)){
+ qtdList.stream().forEach(qtd -> {
+ qtRowDataList.add(new WriteExcelData(rowIndex1[0], 0, qtd.btmName));
+ qtRowDataList.add(new WriteExcelData(rowIndex1[0], 1, qtd.linkTypeName));
+ qtRowDataList.add(new WriteExcelData(rowIndex1[0], 2, qtd.name));
+ qtRowDataList.add(new WriteExcelData(rowIndex1[0], 3, VciBaseUtil.array2String(qtd.abNames)));
+ rowIndex1[0]++;
+ });
+
+ }
+ }
+ } catch (PLException e) {
+ e.printStackTrace();
+ }
+ portalVIDTOList.stream().forEach(portalVIDTO -> {
+ //鍏堟槸鍚嶇О
+ rowDataList.add(new WriteExcelData(rowIndex[0], 0, portalVIDTO.getTypeName()));//涓氬姟绫诲瀷鍚嶇О
+ rowDataList.add(new WriteExcelData(rowIndex[0], 1, portalVIDTO.getViName()));//鍚嶇О
+ rowDataList.add(new WriteExcelData(rowIndex[0], 2, PortalVITypeFlag.getByIntVal(portalVIDTO.getTypeFlag()).getLabel()));//涓氬姟绫诲瀷
+ rowDataList.add(new WriteExcelData(rowIndex[0], 3,PortalVIType.getByIntVal(portalVIDTO.getViType()).getLabel()));//琛ㄥ崟绫诲瀷
+ try {
+ String prmText=UITools.getPRMText(prmDOO2VIS(portalVIDTO.getPrm(),portalVIDTO.getViType()));
+ String prmTextFileName= ObjectUtility.getNewObjectID36() + ".txt";
+ String prmTextFileNameAllName = xfileName + "." + prmTextFileName;
+ writeDataToFile(defaultTempFolder,prmTextFileNameAllName,prmText);
+ rowDataList.add(new WriteExcelData(rowIndex[0], 4,prmTextFileName));//閰嶇疆鏂囨湰
+
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ String attributeStr="";
+ try {
+ List<OsAttributeVO> osAttributeVOList=osAttributeService.getOsAttributeVOSByBtName(portalVIDTO.getTypeName(),portalVIDTO.getTypeFlag());
+ if(!CollectionUtils.isEmpty(osAttributeVOList)){
+ List<String> filedList= osAttributeVOList.stream().map(OsAttributeVO::getId).collect(Collectors.toList());
+ attributeStr=VciBaseUtil.array2String(filedList.toArray(new String[]{}));
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ rowDataList.add(new WriteExcelData(rowIndex[0], 5, attributeStr));//灞炴��
+ String qtName="";
+ try {
+ QTInfo qt = platformClientUtil.getQTDService().getQT(portalVIDTO.getPrm().getFormQtName());
+ qtName=qt.qtName;
+ rowDataList.add(new WriteExcelData(rowIndex[0], 6,qtName));//鏌ヨ妯℃澘鍚嶇О
+ String qtFileName = ObjectUtility.getNewObjectID36() + ".txt";
+ String qtFileNameAllName = xfileName + "." + qtFileName;
+ writeDataToFile(defaultTempFolder,qtFileNameAllName,qt.qtText);
+ rowDataList.add(new WriteExcelData(rowIndex[0], 7, qtFileName));//鏌ヨ妯℃澘閰嶇疆鏂囨湰
+ rowDataList.add(new WriteExcelData(rowIndex[0], 8, qt.btmName));//鏌ヨ妯℃澘涓氬姟绫诲瀷
+ } catch (PLException e) {
+ e.printStackTrace();
+ }
+
+ rowIndex[0]++;
+ });
+ }
+
+
+ /* String excelTemplateFileName = "/excelTemplate/dataBaseExport.xls";
+ if(this.getClass().getResource(excelTemplateFileName) == null){
+ throw new VciBaseException("璇疯仈绯荤鐞嗗憳锛岀郴缁熶腑缂哄皯{0}杩欎釜妯℃澘鏂囦欢",new String[]{excelTemplateFileName});
+ }
+ try {
+ ExcelUtil.copyFileFromJar(excelTemplateFileName,excelFile);
+ //杩欎釜鏂规硶浼氬叧闂枃浠舵祦
+ }catch (Throwable e){
+ String msg = "浠庢ā鏉挎枃浠舵嫹璐濆埌鐩爣鏂囦欢鍑虹幇浜嗛敊璇�";
+ if(logger.isErrorEnabled()){
+ logger.error(msg,e);
+ }
+ throw new VciBaseException(msg+",{0}",new String[]{excelFileName},e);
+ }*/
+ try{
+ WriteExcelOption excelOption = new WriteExcelOption();
+ excelOption.addSheetDataList("portalvi",rowDataList);
+ excelOption.addSheetDataList("QTD",qtRowDataList);
+ ExcelUtil.writeDataToFile(excelFile,excelOption);
+ }catch (Throwable e){
+ String msg = "鎶婃暟鎹啓鍏ュ埌excel鏂囦欢涓嚭鐜伴敊璇�";
+ if(logger.isErrorEnabled()){
+ logger.error(msg,e);
+ }
+ throw new VciBaseException(msg+",{0}",new String[]{excelFileName},e);
+ }
+ File zip = ZipUtil.zip(defaultTempFolder);
+ FileUtil.del(defaultTempFolder + File.separator);
+ //鏈�鍚庤繑鍥瀍xcel鏂囦欢鍚嶇О
+ return zip.getAbsoluteFile().getAbsolutePath();
+ }
+
+ /**
+ * 鎷疯礉鏁版嵁鍒皐ord妯℃澘涓�
+ * @param fileName 瑕佸啓鍏ョ殑鏁版嵁
+ * @return word 鏂囦欢璺緞
+ */
+ public String writeDataToFile(String defaultTempFolder,String fileName,String str){
+ String tempFolder = LocalFileUtil.getDefaultTempFolder();
+ //鎷疯礉鏂囦欢
+ String filePath = tempFolder + File.separator + fileName;
+ File file = new File(filePath);
+ FileOutputStream out = null;
+ try {
+ file.createNewFile();
+ out= new FileOutputStream(file);
+ IOUtils.write(str,out);
+ }catch (Throwable e){
+ IOUtils.closeQuietly(out);
+ String msg = "鍦ㄥ垱寤烘枃浠剁殑鏃跺�欏嚭鐜颁簡閿欒";
+ if(logger.isErrorEnabled()){
+ logger.error(msg,e);
+ }
+ throw new VciBaseException(msg+",{0}",new String[]{filePath},e);
+ }finally {
+ IOUtils.closeQuietly(out);
+ //绉诲姩灞炴�у埌閾炬帴绫诲瀷鏂囦欢澶归噷闈㈠幓
+ FileUtil.move(file, new File(defaultTempFolder),true);
+ FileUtil.del(tempFolder);
+ }
+ return filePath;
+ }
+ public List<PortalVIDTO> listByIds(Collection idList){
+ List<PortalVIDTO> portalVIVOList=new ArrayList<>();
+ if(CollectionUtils.isEmpty(idList)){
+ throw new VciBaseException("璇烽�夋嫨闇�瑕佸鍑虹殑鏁版嵁");
+ }
+ List<PortalVI> portalVIList=new ArrayList<>();
+ idList.stream().forEach(id->{
+ try {
+ PortalVI portalVI= platformClientUtil.getPortalService().getPortalVIById(id.toString());
+ portalVIList.add(portalVI);
+ } catch (PLException e) {
+ e.printStackTrace();
+ }
+ });
+ portalVIVOList= portalVIO2DTOS(portalVIList);
+ return portalVIVOList;
+ }
private BaseResult savePortalVIDTO(PortalVIDTO portalVIDTO,boolean isEdit) {
boolean _isBtm=false;
@@ -486,10 +708,13 @@
public PortalVIVO portalVIDOO2VO(PortalVI portalVI) {
PortalVIVO portalVIVO=new PortalVIVO();
portalVIVO.setId(portalVI.id);
+ portalVIVO.setTypeFlagText(PortalVITypeFlag.getByIntVal(portalVI.typeFlag).getLabel());
portalVIVO.setTypeFlag(portalVI.typeFlag);
portalVIVO.setTypeName(portalVI.typeName);
portalVIVO.setViName(portalVI.viName);
portalVIVO.setViType(portalVI.viType);
+ portalVIVO.setViTypeText(PortalVIType.getByIntVal(portalVI.viType).getLabel());
+
String prm= portalVI.prm;
if(StringUtils.isNotBlank(prm)) {
PRMDO prmdo = UITools.getPRM(prm);
@@ -742,7 +967,13 @@
List<String> itemSelectoutFieldList= allKeyList.stream().filter(s ->!itemOutFieldList.stream().map(s1 -> s1).collect(Collectors.toList()).contains(s) ).collect(Collectors.toList());
prmItemVO.setItemSelectoutFieldList(itemSelectoutFieldList);//寰呴�夋嫨鐨勫睘鎬у瓧娈�
prmItemVO.setItemOutFieldList(itemOutFieldList);//闇�瑕佷娇鐢ㄧ殑闆嗗悎
- List<String> itemSearchFieldList= itemOutFieldList.stream().filter(s ->!itemKeyFieldList.stream().map(s1 -> s1).collect(Collectors.toList()).contains(s) ).collect(Collectors.toList());
+ // List<String> itemSearchFieldList= itemOutFieldList.stream().filter(s ->!CollectionUtils.isEmpty(itemKeyFieldList).stream().map(s1 -> s1).collect(Collectors.toList()).contains(s) ).collect(Collectors.toList());
+ List<String> itemSearchFieldList=new ArrayList<>();
+ if(!CollectionUtils.isEmpty(itemKeyFieldList)){
+ itemSearchFieldList= itemOutFieldList.stream().filter(s ->!itemKeyFieldList.contains(s)).collect(Collectors.toList());
+ }else{
+ itemSearchFieldList=itemOutFieldList;
+ }
prmItemVO.setItemSearchFieldList(itemSearchFieldList);//寰呮悳绱㈠瓧娈�
prmItemVO.setItemKeyFieldList(itemKeyFieldList);//鎼滅储瀛楁
}
@@ -760,8 +991,12 @@
List<String> itemSelectoutFieldList= allKeyList.stream().filter(s ->!itemOutFieldList.stream().map(s1 -> s1).collect(Collectors.toList()).contains(s) ).collect(Collectors.toList());
prmItemDTO.setItemSelectoutFieldList(itemSelectoutFieldList);//寰呴�夋嫨鐨勫睘鎬у瓧娈�
prmItemDTO.setItemOutFieldList(itemOutFieldList);//闇�瑕佷娇鐢ㄧ殑闆嗗悎
- List<String> itemSearchFieldList= itemOutFieldList.stream().filter(s ->!itemKeyFieldList.stream().map(s1 -> s1).collect(Collectors.toList()).contains(s) ).collect(Collectors.toList());
- prmItemDTO.setItemSearchFieldList(itemSearchFieldList);//寰呮悳绱㈠瓧娈�
+ List<String> itemSearchFieldList=new ArrayList<>();
+ if(!CollectionUtils.isEmpty(itemKeyFieldList)){
+ itemSearchFieldList= itemOutFieldList.stream().filter(s ->!itemKeyFieldList.contains(s)).collect(Collectors.toList());
+ }else{
+ itemSearchFieldList=itemOutFieldList;
+ } prmItemDTO.setItemSearchFieldList(itemSearchFieldList);//寰呮悳绱㈠瓧娈�
prmItemDTO.setItemKeyFieldList(itemKeyFieldList);//鎼滅储瀛楁
}
/**
@@ -772,7 +1007,7 @@
private void initTableConfigDTOO2DOData(PRMItemDO prmItemDO,PRMItemDTO prmItemDTO){
prmItemDO.setItemOutFields(VciBaseUtil.array2String(prmItemDTO.getItemOutFieldList().toArray(new String[]{})));//闇�瑕佷娇鐢ㄧ殑瀛楁
- prmItemDO.setItemKeyFields(VciBaseUtil.array2String(prmItemDTO.getItemKeyFieldList().toArray(new String[]{})));//闇�瑕佹悳绱㈢殑瀛楁
+ prmItemDO.setItemKeyFields(CollectionUtils.isEmpty(prmItemDTO.getItemKeyFieldList())?"":VciBaseUtil.array2String(prmItemDTO.getItemKeyFieldList().toArray(new String[]{})));//闇�瑕佹悳绱㈢殑瀛楁
List<String> newItemFieldWidthList=prmItemDTO.getItemFieldWidthList().stream().map(KeyValue::getValue).distinct().collect(Collectors.toList());
prmItemDO.setItemFieldWidth(VciBaseUtil.array2String(newItemFieldWidthList.toArray(new String[]{}),":"));//瀛楁瀹藉害
List<ItemSeniorQueryBO> itemSeniorQueryBOS= prmItemDTO.getItemSeniorQueryBOS();
@@ -805,11 +1040,14 @@
private List<KeyValue> initItemFieldWidthList(String itemOutFields,String itemFieldWidth){
List<KeyValue> keyValueList=new ArrayList<>();
List<String>itemOutFieldList= VciBaseUtil.str2List(itemOutFields);
- List<String>itemFieldWidthList= VciBaseUtil.str2List(itemFieldWidth);
+ List<String>itemFieldWidthList= VciBaseUtil.str2List(itemFieldWidth,",");
if(itemOutFieldList.size()>0) {
for (int i = 0; i < itemOutFieldList.size(); i++) {
KeyValue keyValue = new KeyValue();
- String with = itemFieldWidthList.get(i);
+ String with="250";
+ if(i<itemFieldWidthList.size()) {
+ with = itemFieldWidthList.get(i);
+ }
keyValue.setKey(itemOutFieldList.get(i));
keyValue.setValue(StringUtils.isBlank(with) ? "250" : with);
keyValueList.add(keyValue);
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java
index 8f49da8..83fd63d 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java
@@ -3,11 +3,15 @@
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.ZipUtil;
import com.alibaba.fastjson.JSONObject;
+import com.vci.client.ClientSession;
import com.vci.client.common.oq.OQTool;
+import com.vci.client.common.providers.ClientServiceProvider;
import com.vci.common.qt.object.*;
import com.vci.constant.FrameWorkLangCodeConstant;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.atm.AttributeDef;
+import com.vci.corba.omd.btm.BizType;
+import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.omd.data.LinkObject;
import com.vci.corba.omd.ltm.LinkType;
import com.vci.corba.omd.qtm.QTD;
@@ -22,8 +26,10 @@
import com.vci.starter.poi.util.ExcelUtil;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseResult;
+import com.vci.starter.web.pagemodel.DataGrid;
import com.vci.starter.web.pagemodel.Tree;
import com.vci.starter.web.util.*;
+import com.vci.web.other.BtmQTExportData;
import com.vci.web.other.LinkQTExportData;
import com.vci.web.service.*;
import com.vci.web.util.DateUtil;
@@ -32,17 +38,22 @@
import com.vci.web.util.WebUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
+import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
+import org.jdesktop.swingx.JXDatePicker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
+import javax.swing.*;
+import java.awt.*;
import java.io.*;
import java.util.*;
+import java.util.List;
import java.util.stream.Collectors;
/**
@@ -90,7 +101,7 @@
}
/**
- * 鏌ヨ妯℃澘
+ * 淇濆瓨鏌ヨ妯℃澘
* @param qtd 鏌ヨ妯℃澘瀹炰綋绫�
* @return 淇濆瓨缁撴灉
*/
@@ -150,8 +161,7 @@
}
}
/**
- *
- * @param dataMap 浼犺緭鐨勬暟鎹璞★細
+ * @param qtInfoDTO 浼犺緭鐨勬暟鎹璞★細
* linkTypeName 閾炬帴绫诲瀷銆�
* rdPositive 鏂瑰悜锛宼rue姝e悜锛宖alse鍙嶅悜
* btmName 涓氬姟绫诲瀷鍚嶇О
@@ -163,7 +173,7 @@
*/
@Override
public BaseResult getCriteria(QTInfoDTO qtInfoDTO) throws PLException {
- QueryTemplate qt = getQT(qtInfoDTO);
+ QueryTemplate qt = getQT(qtInfoDTO,true);
String checkInfo = OQTool.checkQT(qt);
if(!checkInfo.equals("OK")){
throw new PLException("500", new String[]{checkInfo});
@@ -189,7 +199,7 @@
qtInfoDTO.setBtmName(obj.btmName);
qtInfoDTO.setQtName(obj.qtName);
qtInfoDTO.setLevelFlag(obj.levelFlag);
-// qtInfoDTO.setQtText(obj.qtText);
+ //qtInfoDTO.setQtText(obj.qtText);
qtInfoDTO.setQtUIText(obj.qtUIText);
if(StringUtils.isNotBlank(obj.qtUIText)){
//灏嗙粰瀹氱殑String鏂囨湰瑙f瀽涓篨ML鏂囨。骞惰繑鍥炴柊鍒涘缓鐨刣ocument
@@ -271,7 +281,7 @@
*/
@Override
public BaseResult linkSave(QTInfoDTO qtInfoDTO) throws PLException {
- QueryTemplate qt = getQT(qtInfoDTO);
+ QueryTemplate qt = getQT(qtInfoDTO,true);
String checkInfo = OQTool.checkQT(qt);
if(!checkInfo.equals("OK")){
throw new PLException("500", new String[]{checkInfo});
@@ -415,17 +425,22 @@
* 缁勮鏌ヨ妯℃澘
* @return
*/
- public QueryTemplate getQT(QTInfoDTO qtInfoDTO) throws PLException {
+ public QueryTemplate getQT(QTInfoDTO qtInfoDTO,boolean isLinkType) throws PLException {
QueryTemplate qt = new QueryTemplate();
- qt.setType(QTConstants.TYPE_LINK);
- //TODO String qtId =
- qt.setLinkType(qtInfoDTO.getBtmName());
- qt.setDirection(qtInfoDTO.getQueryTemplate().getDirection());
- qt.setBtmType(qtInfoDTO.getQueryTemplate().getBtmType());
- qt.setVersion(qtInfoDTO.getQueryTemplate().getVersion());
- qt.setQueryISLeaf(qtInfoDTO.getQueryTemplate().isQueryISLeaf());
- qt.setLevel(qtInfoDTO.getQueryTemplate().getLevel());
+ if(isLinkType){
+ qt.setType(QTConstants.TYPE_LINK);
+ qt.setLinkType(qtInfoDTO.getBtmName());
+ qt.setDirection(qtInfoDTO.getQueryTemplate().getDirection());
+ qt.setBtmType(qtInfoDTO.getQueryTemplate().getBtmType());
+ qt.setVersion(qtInfoDTO.getQueryTemplate().getVersion());
+ qt.setQueryISLeaf(qtInfoDTO.getQueryTemplate().isQueryISLeaf());
+ qt.setLevel(qtInfoDTO.getQueryTemplate().getLevel());
+ }else{
+ qt.setType(QTConstants.TYPE_BTM);
+ qt.setBtmType(qtInfoDTO.getBtmName());
+ }
+
List<String> clauseList = new ArrayList<String>();
//TODO 鏌ヨ鍒� 鏄剧ず鍒�
clauseList.add("*");
@@ -915,7 +930,6 @@
// return qt;
// }
-
/**
* 杩斿洖鏌ヨ鐨勭増鏈�
* @return
@@ -940,7 +954,6 @@
return version;
}
-
/**
* 鏍¢獙鍙傛暟
* @param qtd
@@ -957,7 +970,6 @@
throw new PLException("500", new String[]{"璇ユā鏉垮畾涔夊悕宸茬粡琚娇鐢�, 璇锋洿鎹�"});
}
}
-
/**
* 瀵煎嚭閾炬帴绫诲瀷鏌ヨ妯℃澘
@@ -1143,6 +1155,35 @@
}
}
+ private void getPLQtBtmItem2(String string, BizType bizType, List<BizType> ltsNew) {
+ // TODO Auto-generated method stub
+ try {
+ BizType queryBizType = platformClientUtil.getBtmService().getBizTypes(string)[0];
+ BizType[] btmArray = platformClientUtil.getBtmService().getBizTypes("");
+ String[] strings = queryBizType.apNameArray;
+ boolean b = true;
+ for (int i = 0; i < btmArray.length; i++) {
+ if (btmArray[i].name.equals(string)) {
+ b = false;
+ if (Arrays.equals(bizType.apNameArray, strings)) {
+ btmArray[i].name += "銆愪笟鍔$被鍨嬪凡瀛樺湪銆�";
+ ltsNew.add(btmArray[i]);
+ } else {
+ btmArray[i].name += "銆愪笟鍔$被鍨嬪瓨鍦ㄤ絾灞炴�т笉涓�鑷淬��";
+ ltsNew.add(btmArray[i]);
+ }
+ }
+ }
+ if (b) {
+ bizType.name += "銆愪笟鍔$被鍨嬩笉瀛樺湪銆�";
+ ltsNew.add(bizType);
+ }
+ } catch (PLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
private void getPLQtWrapper(String string, QTInfo qtWrapper, List<LinkType> ltsNew, List<QTInfo> qTWrapperNew, Map<String/*绫诲瀷鍚嶇О*/, QTD[]/*鏌ヨ妯℃澘瀹氫箟*/> newNorepQTDs) {
try {
QTInfo[] qtws = platformClientUtil.getQTDService().getAllQTs();
@@ -1208,6 +1249,71 @@
}
}
+ private void getPLBtmQtWrapper(String string, QTInfo qtWrapper, List<BizType> ltsNew, List<QTInfo> qTWrapperNew, Map<String/*绫诲瀷鍚嶇О*/, QTD[]/*鏌ヨ妯℃澘瀹氫箟*/> newNorepQTDs) {
+ try {
+ QTInfo[] qtws = platformClientUtil.getQTDService().getAllQTs();
+ boolean islaet = true;
+ for (int i = 0; i < qtws.length; i++) {
+ if (string.equals(qtws[i].qtName)) {
+ islaet = false;
+ for (BizType lt : ltsNew) {
+ if (qtWrapper.btmName.equals(lt.name.substring(0,
+ lt.name.indexOf("銆�")))) {
+ if (lt.name.endsWith("銆愪笟鍔$被鍨嬪凡瀛樺湪銆�")) {
+ qtWrapper.qtName += "銆愭煡璇㈡ā鏉垮凡瀛樺湪锛屼笉瀵煎叆銆�";
+ qTWrapperNew.add(qtWrapper);
+ }else if(lt.name.endsWith("銆愪笟鍔$被鍨嬪瓨鍦ㄤ絾灞炴�т笉涓�鑷淬��")){
+ qtWrapper.qtName += "銆愭煡璇㈡ā鏉挎墍灞炰笟鍔$被鍨嬪睘鎬т笉涓�鑷达紝涓嶅鍏ャ��";
+ qTWrapperNew.add(qtWrapper);
+ }else{
+ qtWrapper.qtName += "銆愭煡璇㈡ā鏉挎墍灞炰笟鍔$被鍨嬩笉瀛樺湪锛屼笉瀵煎叆銆�";
+ qTWrapperNew.add(qtWrapper);
+ }
+ }
+ }
+ }
+ }
+ if (islaet) {
+ for (BizType btmItem : ltsNew) {
+ if (qtWrapper.btmName.equals(btmItem.name.substring(0,
+ btmItem.name.indexOf("銆�")))) {
+ if (btmItem.name.endsWith("銆愪笟鍔$被鍨嬪凡瀛樺湪銆�")) {
+ //鍒ゆ柇鏌ヨ妯℃澘瀹氫箟鏄惁瀛樺湪锛岃繘琛屼繚瀛�
+ QTD[] qtds = newNorepQTDs.get(qtWrapper.btmName);
+ if(qtds != null){
+ for (QTD qtd : qtds) {
+ QTD qtdByName = platformClientUtil.getQTDService().getQTDByName(qtd.name);
+ if(!(qtdByName != null && StringUtils.isNotBlank(qtdByName.name))){
+ boolean b = platformClientUtil.getQTDService().addQTD(qtd);
+ if(!b){
+ qtWrapper.qtName += qtWrapper.qtName+"瀵煎叆鏌ヨ妯℃澘瀹氫箟銆�" + qtdByName.name + "銆戝け璐ワ紒";
+ }
+ }
+ }
+ newNorepQTDs.remove(qtWrapper.btmName);
+ }
+ boolean success = platformClientUtil.getQTDService().saveQT(qtWrapper);
+ if(!success){
+ qtWrapper.qtName += qtWrapper.qtName+"瀵煎叆澶辫触锛�";
+ }else {
+ qtWrapper.qtName += "銆愭煡璇㈡ā鏉垮鍏ユ垚鍔燂紒銆�";
+ }
+ qTWrapperNew.add(qtWrapper);
+ }else if(btmItem.name.endsWith("銆愪笟鍔$被鍨嬪瓨鍦ㄤ絾灞炴�т笉涓�鑷淬��")){
+ qtWrapper.qtName += "銆愭煡璇㈡ā鏉挎墍灞炰笟鍔$被鍨嬪睘鎬т笉涓�鑷达紝涓嶅鍏ャ��";
+ qTWrapperNew.add(qtWrapper);
+ }else{
+ qtWrapper.qtName += "銆愭煡璇㈡ā鏉挎墍灞炰笟鍔$被鍨嬩笉瀛樺湪锛屼笉瀵煎叆銆�";
+ qTWrapperNew.add(qtWrapper);
+ }
+ }
+ }
+ }
+ } catch (PLException e) {
+ e.printStackTrace();
+ }
+ }
+
//鏍规嵁閫夋嫨鐨勬煡璇㈡ā鏉胯繃婊ゆā鏉垮畾涔�
private Map<String, QTD[]> getnewNorepQTDs(Map<String, QTD[]> norepQTDs,
Map<String, QTInfo> allQTs) {
@@ -1235,6 +1341,290 @@
if(!b){
return BaseResult.fail("鍒犻櫎澶辫触锛侊紒锛�");
}
- return BaseResult.success();
+ return BaseResult.success("鏌ヨ妯℃澘鍒犻櫎鎴愬姛锛�");
}
+
+ /**
+ * @param qtInfoDTO 浼犺緭鐨勬暟鎹璞★細
+ * linkTypeName 閾炬帴绫诲瀷銆�
+ * rdPositive 鏂瑰悜锛宼rue姝e悜锛宖alse鍙嶅悜
+ * btmName 涓氬姟绫诲瀷鍚嶇О
+ * combRelaType 涓氬姟绫诲瀷閫夋嫨鍊�
+ * versionValue 鐗堟湰鐝鍊�
+ * isQueryIsLeaf 鏄惁閫夋嫨涓嬬骇
+ * level 瀛愯妭鐐瑰眰鏁�
+ * @return 鏌ヨ缁撴灉
+ */
+ @Override
+ public BaseResult getCriteriaBtm(QTInfoDTO qtInfoDTO) throws PLException {
+ QueryTemplate qt = getQT(qtInfoDTO,false);
+ String checkInfo = OQTool.checkQT(qt);
+ if(!checkInfo.equals("OK")){
+ throw new PLException("500", new String[]{checkInfo});
+ }
+ qt.setId("qt1");
+ BusinessObject[] result = platformClientUtil.getQueryService().findBTMObjects(qt.getId(), OQTool.qtTOXMl(qt).asXML());
+ return BaseResult.dataList(Arrays.asList(result));
+ }
+
+ /**
+ * 涓氬姟绫诲瀷鏌ヨ妯℃澘淇濆瓨
+ * @param qtInfoDTO 淇濆瓨浼犺緭瀵硅薄
+ * @return 淇濆瓨缁撴灉
+ */
+ @Override
+ public BaseResult btmSave(QTInfoDTO qtInfoDTO) throws PLException {
+ VciBaseUtil.alertNotNull(
+ qtInfoDTO,"淇濆瓨鐨勪笟鍔$被鍨嬫ā鏉垮璞�",
+ qtInfoDTO.getBtmName(),"璇烽�夋嫨涓氬姟绫诲瀷鍜屾煡璇㈡ā鏉垮畾涔夋潵鍒涘缓鏌ヨ妯℃澘"
+ );
+
+ //add by caill start 閬嶅巻鏅�氭煡璇㈡ā鏉胯緭鍏ユ涓殑鍊煎仛鏍¢獙
+ // ArrayList<String> list = cpm_centerPanel.getList();
+ // for(int i=0;i<list.size();i++){
+ // String text = (String) list.get(i);
+ // if(text.contains("'")){
+ // JOptionPane.showMessageDialog(cp_mainPanel, "鏉′欢鍊间腑鍖呭惈浜嗛潪娉曞瓧绗�", "闈炴硶瀛楃", JOptionPane.ERROR_MESSAGE);
+ // return;
+ // }
+ // }
+ //淇濆瓨涔嬪墠甯﹀嚭宸查�夋嫨鐨剄tName
+ QueryTemplate qt = getQT(qtInfoDTO,false);
+ //鍓嶇璋冪敤杩欎釜鏂规硶isExistsQT()
+ /*if(isExists(qtName)){
+ return BaseResult.success("","璇ユ煡璇㈡ā鏉垮悕宸茬粡瀛樺湪,鏄惁瑕嗙洊锛�");
+ }*/
+ String checkInfo = OQTool.checkQT(qt);
+ if(!checkInfo.equals("OK")){
+ throw new PLException("500", new String[]{checkInfo});
+ }
+ //璁剧疆鎺掑簭淇℃伅
+ qt.setOrderInfoList(qtInfoDTO.getQueryTemplate().getOrderInfoList());
+ QTInfo qtWrapper = new QTInfo();
+ qtWrapper.qtName = qtInfoDTO.getQtName();
+ qtWrapper.btmName = qt.getBtmType();
+ qtWrapper.creator = WebUtil.getCurrentUserId();
+ qtWrapper.createTime = System.currentTimeMillis();
+ if(qtInfoDTO.getTree() == null){
+ qtWrapper.qtUIText = "";
+ }else{
+ //褰撳嬀閫変簡楂樼骇鏌ヨ鏃堕渶瑕佸鐞嗛珮绾ф煡璇㈢殑鐩稿叧鏉′欢
+ qtWrapper.qtUIText = getSeniorXML(qtInfoDTO);
+ }
+ qtWrapper.levelFlag = qtInfoDTO.getLevelFlag();
+ qtWrapper.qtText = OQTool.qtTOXMl(qt).asXML();
+ boolean saveFlag = platformClientUtil.getQTDService().saveQT(qtWrapper);
+ if(saveFlag){
+ return BaseResult.success("淇濆瓨鏌ヨ妯℃澘鎴愬姛");
+ }else{
+ return BaseResult.fail("淇濆瓨鏌ヨ妯℃澘澶辫触");
+ }
+ }
+
+ /**
+ * 鏇存柊鏁版嵁搴撶粨鏋�
+ * @return 淇濆瓨缁撴灉
+ */
+ @Override
+ public BaseResult updateDBStructure() throws PLException {
+ boolean f = platformClientUtil.getQTDService().updateQT();
+ if(f){
+ return BaseResult.success("鏇存柊鎴愬姛");
+ }else{
+ return BaseResult.fail("鏇存柊澶辫触");
+ }
+ }
+
+ /**
+ * 涓氬姟绫诲瀷鏌ヨ妯℃澘鏍戞煡璇紝鐢ㄤ簬鐣岄潰鐨勫鍑哄姛鑳�
+ * @return 鏌ヨ缁撴灉
+ */
+ @Override
+ public BaseResult getBtmQtTree() throws PLException {
+ BizType[] bizTypes= null;
+ QTInfo[] qts = null;
+ HashMap<String,Object> tree = new HashMap();
+ tree.put("text","涓氬姟绫诲瀷");
+ if (bizTypes == null) {
+ List<BizType> es = new ArrayList<>();
+ bizTypes = platformClientUtil.getBtmService().getBizTypes("");
+ for (BizType lt : bizTypes) {
+ QTInfo[] qtWrappers = platformClientUtil.getQTDService().getObjTypeQTs(lt.name);
+ if (qtWrappers.length!=0) {
+ es.add(lt);
+ }
+ }
+ bizTypes = es.toArray(new BizType[es.size()]);
+ //TODO:闇�淇娌℃湁鍏宠仈鏌ヨ妯℃澘涓氬姟绫诲瀷鍘绘帀
+ qts = platformClientUtil.getQTDService().getAllQTs();//鑾峰彇鎵�鏈夋煡璇㈡ā鏉�
+ }
+ List<HashMap<String,Object>> childList = new ArrayList<>();
+ //娣诲姞涓氬姟绫诲瀷鏍硅妭鐐�
+ for (BizType plAction : bizTypes) {
+ HashMap<String,Object> childTree = new HashMap();
+ childTree.put("text", plAction.label + "/" +plAction.name);
+ childTree.put("oid", plAction.oid);
+ //tree.put("children", childTree);
+ addExportTreeNode(plAction, qts, childTree);
+ childList.add(childTree);
+ }
+ tree.put("children", childList);
+ return BaseResult.success(tree);
+ }
+
+ /**
+ * 瀵煎嚭涓氬姟绫诲瀷鏌ヨ妯℃澘
+ * names 鏌ヨ妯℃澘鍚�
+ * @return
+ */
+ @Override
+ public void expBtmQTTemplate(List<String> names, HttpServletResponse response) throws PLException, IOException {
+ String defaultTempFolder = LocalFileUtil.getDefaultTempFolder();
+ String vciqtmfFileName = defaultTempFolder + File.separator + "BtmTemplateExp" + new Date().getTime() + ".vciqtf";
+ BtmQTExportData exportData = new BtmQTExportData();
+ for (String name : names) {
+ QTInfo qt = platformClientUtil.getQTDService().getQT(name);
+ exportData.getAllQTs().put(qt.qtName,qt);
+ BizType[] bizTypes = platformClientUtil.getBtmService().getBizTypes(qt.btmName);
+ for (int i = 0; i < bizTypes.length; i++) {
+ BizType bizType = bizTypes[i];
+ if(bizTypes != null && !bizType.oid.equals("")){
+ exportData.getSelectedBtmItems().put(bizType.name, bizType);
+ exportData.getSelectedBtmAttrs().put(bizType.name, bizType.apNameArray);
+ exportData.getAllQTDs().put(bizType.name, platformClientUtil.getQTDService().getBizTypeQTDs(bizType.name));
+ }
+ }
+ }
+ ObjectOutputStream vciamfFileStream = null;
+ try {
+ File vciqtmfFile = new File(vciqtmfFileName);
+ vciamfFileStream = new ObjectOutputStream(new FileOutputStream(vciqtmfFile));
+ vciamfFileStream.writeObject(exportData);
+ }finally {
+ try {
+ if (vciamfFileStream != null) {
+ vciamfFileStream.flush();
+ vciamfFileStream.close();
+ }
+ } catch (Exception e) {
+ throw new PLException("500",new String[]{"瀵煎嚭娴佸叧闂紓甯革紒"});
+ }
+ }
+ ControllerUtil.writeFileToResponse(response,vciqtmfFileName);
+ FileUtil.del(defaultTempFolder + File.separator);
+ }
+
+ /**
+ * 鏌ヨ鏉′欢涓嬬殑閫夋嫨鏌ヨ妯℃澘瀵硅瘽妗嗭紙鏌ヨ鍏ㄩ儴妯℃澘鍜屾墍瀵瑰簲鐨勪笟鍔$被鍨嬫垨閾炬帴绫诲瀷鍚嶏級
+ * @return
+ */
+ @Override
+ public BaseResult getAllQTs() throws PLException {
+ QTInfo[] allQTs = platformClientUtil.getQTDService().getAllQTs();
+ DataGrid<QTInfo> dataGrid = new DataGrid<>();
+ dataGrid.setData(Arrays.asList(allQTs));
+ dataGrid.setTotal(allQTs.length);
+ return BaseResult.dataGrid(dataGrid);
+ }
+
+ /**
+ * 瀵煎叆涓氬姟绫诲瀷鏌ヨ妯℃澘
+ * @param file 涓婁紶鐨勬枃浠�
+ * @return 瀵煎叆缁撴灉
+ */
+ @Override
+ public BaseResult impBtmTemplate(MultipartFile file) throws IOException, ClassNotFoundException {
+ if (file == null) {
+ return BaseResult.fail(FrameWorkLangCodeConstant.IMPORT_FAIL, new String[]{"鏃犲鍏ョ殑鏂囦欢"});
+ }
+ if (!file.getOriginalFilename().endsWith(".vciqtf")) {
+ throw new VciBaseException("浠呰兘涓婁紶.vciqtf鏍煎紡鏂囦欢锛岃閲嶆柊涓婁紶锛�");
+ }
+ ObjectInputStream obj = new ObjectInputStream(
+ file.getInputStream());
+ BtmQTExportData qtExportData = (BtmQTExportData) obj.readObject();
+ List<BizType> ltsNew = new ArrayList<>();
+ List<QTInfo> qTWrapperNew = new ArrayList<>();
+ Map<String/* 绫诲瀷鍚嶇О */, QTD[]/* 鏌ヨ妯℃澘瀹氫箟 */> norepQTDs = new HashMap<String, QTD[]>();
+ addImportBtmData(qtExportData, ltsNew, qTWrapperNew, norepQTDs);
+ QTInfo[] qts = qTWrapperNew
+ .toArray(new QTInfo[qTWrapperNew.size()]);
+ //澶勭悊鏍戠殑杩斿洖
+ HashMap<String,Object> tree = new HashMap();
+ tree.put("text","涓氬姟绫诲瀷");
+ List<HashMap<String,Object>> childList = new ArrayList<>();
+ //娣诲姞涓氬姟绫诲瀷鏍硅妭鐐�
+ for (BizType plAction : ltsNew) {
+ HashMap<String,Object> childTree = new HashMap();
+ childTree.put("text", plAction.label + "/" +plAction.name);
+ childTree.put("oid", plAction.oid);
+ addExportTreeNode(plAction, qts, childTree);
+ childList.add(childTree);
+ }
+ tree.put("children", childList);
+ return BaseResult.success(tree);
+ }
+
+ // 鏁版嵁杩囨护
+ private void addImportBtmData(BtmQTExportData qtExportData, List<BizType> ltsNew, List<QTInfo> qTWrapperNew,
+ Map<String/* 绫诲瀷鍚嶇О */, QTD[]/* 鏌ヨ妯℃澘瀹氫箟 */> norepQTDs) {
+ Map<String/* 绫诲瀷鍚嶇О */, QTD[]/* 鏌ヨ妯℃澘瀹氫箟 */> allQTDs = qtExportData
+ .getAllQTDs();
+ Map<String/* 绫诲瀷鍚嶇О */, BizType/* 绫诲瀷瀵硅薄 */> selectedBtmItems = qtExportData
+ .getSelectedBtmItems();
+ Map<String/* 绫诲瀷鍚嶇О */, String[]/* 绫诲瀷鎵�灞炲睘鎬� */> selectedBtmAttrs = qtExportData
+ .getSelectedBtmAttrs();
+ Map<String/* 鏌ヨ妯℃澘鍚嶇О */, QTInfo/* 鏌ヨ妯℃澘瀵硅薄 */> allSelectedQTs = qtExportData
+ .getAllQTs();
+ if (allQTDs.size() == 0 || allQTDs == null
+ || selectedBtmItems.size() == 0 || selectedBtmItems == null
+ || selectedBtmAttrs.size() == 0 || selectedBtmAttrs == null
+ || allSelectedQTs.size() == 0 || allSelectedQTs == null) {
+ throw new VciBaseException("瀵煎叆鐨勬ā鏉挎暟鎹湁璇�!!!");
+ }
+ Set<Map.Entry<String, QTD[]>> pLActions = allQTDs.entrySet();
+ Set<Map.Entry<String, QTInfo>> pLQts = allSelectedQTs.entrySet();
+ Set<Map.Entry<String, BizType>> btmpLQts = selectedBtmItems.entrySet();
+ for (Map.Entry<String, QTD[]> entry : pLActions) {
+ String string = entry.getKey();
+ QTD[] qtds = entry.getValue();
+ getPLQtIsInDB(string, qtds, norepQTDs);
+ }
+ for (Map.Entry<String, BizType> entry : btmpLQts) {
+ String string = entry.getKey();
+ BizType bizType = entry.getValue();
+ getPLQtBtmItem2(string, bizType, ltsNew);
+ }
+ Map<String/*绫诲瀷鍚嶇О*/, QTD[]/*鏌ヨ妯℃澘瀹氫箟*/> newNorepQTDs = getnewNorepQTDs(norepQTDs,allSelectedQTs);
+ for (Map.Entry<String, QTInfo> entry : pLQts) {
+ String string = entry.getKey();
+ QTInfo qtWrapper = entry.getValue();
+ getPLBtmQtWrapper(string, qtWrapper, ltsNew, qTWrapperNew, newNorepQTDs);
+ }
+
+ }
+
+ /**
+ * 鐢熸垚瀵煎嚭鏍戦�夋嫨浠ュ強瀵煎叆鏍戞樉绀�
+ * @param bizType
+ * @param qts
+ * @param tree
+ */
+ private void addExportTreeNode(BizType bizType/*涓氬姟绫诲瀷*/,QTInfo[] qts/*鏌ヨ妯℃澘瀵硅薄*/,HashMap<String,Object> tree) {
+ List<String> childList = new ArrayList<>();
+ // 娣诲姞鏌ヨ妯℃澘瀵硅薄瀛愯妭鐐�
+ for (QTInfo qtItem : qts) {
+ //澶勭悊瀵煎叆鏃舵棤娉曡繘琛岀被鍨嬪垽鏂�
+ int splitLength = bizType.name.indexOf("銆�");
+ if(splitLength == -1){
+ splitLength = bizType.name.length();
+ }
+ if (qtItem.btmName.equals(bizType.name.substring(0,
+ splitLength))) {
+ childList.add(qtItem.qtName);
+ }
+ }
+ tree.put("children",childList);
+ }
+
}
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java
index b8724f9..7faff82 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java
@@ -851,7 +851,13 @@
if(!CollectionUtils.isEmpty(btmTypeVOList)) {
btmTypeVOList.stream().forEach(btmTypeVO -> {
String btmId = btmTypeVO.getId();
- List<OsBtmTypeAttributeVO> attributeVOS = btmService.listAttributeByBtmId(btmId);
+ List<OsBtmTypeAttributeVO> attributeVOS = null;
+ try {
+ attributeVOS = btmService.listAttributeByBtmId(btmId);
+ } catch (PLException e) {
+ e.printStackTrace();
+ throw new VciBaseException(VciBaseUtil.getExceptionMessage(e));
+ }
//鍏堟槸鍚嶇О
int rowIndex = index[0];
WriteExcelData idED = new WriteExcelData(rowIndex, 0, btmId);
diff --git a/Source/plt-web/plt-web-ui/src/api/modeling/businessType/api.js b/Source/plt-web/plt-web-ui/src/api/modeling/businessType/api.js
index ccac952..7d9eda4 100644
--- a/Source/plt-web/plt-web-ui/src/api/modeling/businessType/api.js
+++ b/Source/plt-web/plt-web-ui/src/api/modeling/businessType/api.js
@@ -98,3 +98,22 @@
params
});
}
+
+// 鍒犻櫎绱㈠紩
+export function delIndex(params) {
+ return request({
+ url: "/api/btmTypeController/delIndex",
+ method: "delete",
+ params
+ });
+}
+
+// 鍒涘缓绱㈠紩
+export function addIndex(params) {
+ return request({
+ url: "/api/btmTypeController/addIndex",
+ method: "post",
+ data:params
+ });
+}
+
diff --git a/Source/plt-web/plt-web-ui/src/api/systemModel/mangeModel/api.js b/Source/plt-web/plt-web-ui/src/api/systemModel/mangeModel/api.js
index ec4b2c1..8a1d662 100644
--- a/Source/plt-web/plt-web-ui/src/api/systemModel/mangeModel/api.js
+++ b/Source/plt-web/plt-web-ui/src/api/systemModel/mangeModel/api.js
@@ -50,9 +50,37 @@
// 澧炲姞鎿嶄綔绫诲瀷
export function addOperationType(data) {
return request({
- url: "/api/hmSysModConfigController/addOperationType",
+ url: "/api/hmSysModConfigController/addFuncOperationType",
method: "post",
data
});
}
+// 瀵煎嚭
+export const exportModule = (params) => {
+ return request({
+ url: '/api/hmSysModConfigController/exportModule',
+ method: 'get',
+ headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'},
+ responseType: 'blob',
+ params
+ })
+}
+
+// 淇敼鍒悕
+export function updateAlias(params) {
+ return request({
+ url: "/api/hmSysModConfigController/updateAlias",
+ method: "put",
+ data:params
+ });
+}
+
+// 鍒犻櫎妯″潡涓嬪叧鑱旂殑鎿嶄綔绫诲瀷
+export function delFuncOperation(params) {
+ return request({
+ url: "/api/hmSysModConfigController/delFuncOperation",
+ method: "delete",
+ data:params
+ });
+}
diff --git a/Source/plt-web/plt-web-ui/src/api/systemModel/operateType/api.js b/Source/plt-web/plt-web-ui/src/api/systemModel/operateType/api.js
new file mode 100644
index 0000000..adbe32c
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/api/systemModel/operateType/api.js
@@ -0,0 +1,28 @@
+import request from '@/router/axios';
+
+// 鏂板
+export function addOperationType(params) {
+ return request({
+ url: "/api/hmSysModConfigController/addOperationType",
+ method: "post",
+ data:params
+ });
+}
+
+// 淇敼
+export function updateOperationType(params) {
+ return request({
+ url: "/api/hmSysModConfigController/updateOperationType",
+ method: "put",
+ data:params
+ });
+}
+
+// 鍒犻櫎
+export function delOperationType(params) {
+ return request({
+ url: "/api/hmSysModConfigController/delOperationType",
+ method: "delete",
+ data:params
+ });
+}
diff --git a/Source/plt-web/plt-web-ui/src/api/systemModel/systemConfig/api.js b/Source/plt-web/plt-web-ui/src/api/systemModel/systemConfig/api.js
new file mode 100644
index 0000000..9f2141c
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/api/systemModel/systemConfig/api.js
@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+// 鍒楄〃鏌ヨ
+export function getAppConfigCategoryInfo(params) {
+ return request({
+ url: "/api/hmSysModConfigController/getAppConfigCategoryInfo",
+ method: "get",
+ params
+ });
+}
+
+// 閰嶇疆椤规煡璇�
+export function getAppConfigDetailsByID(params) {
+ return request({
+ url: "/api/hmSysModConfigController/getAppConfigDetailsByID",
+ method: "get",
+ params
+ });
+}
+
+// 澧炲姞閰嶇疆
+export function addAppConf(params) {
+ return request({
+ url: "/api/hmSysModConfigController/addAppConf",
+ method: "post",
+ data: params
+ });
+}
+
+// 淇敼閰嶇疆
+export function updateAppConf(params) {
+ return request({
+ url: "/api/hmSysModConfigController/updateAppConf",
+ method: "put",
+ data: params
+ });
+}
+
+// 瀵煎嚭
+export function exportSysConf(params) {
+ return request({
+ url: '/api/hmSysModConfigController/exportSysConf',
+ method: 'post',
+ headers: {'Content-Type': 'application/json;charset=UTF-8'},
+ responseType: 'blob',
+ data: params
+ })
+}
+
+
diff --git a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue
index ca65a9c..e69bd83 100644
--- a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue
+++ b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transfer.vue
@@ -9,6 +9,18 @@
style="text-align: center"
width="50%"
@close="dialogClose">
+ <div style="margin-bottom: 20px;" v-if="topMethodsObj !== {} && topMethodsObj">
+ <div>
+ <span>瀵煎嚭鏂瑰紡锛�</span>
+ <el-radio-group v-model="radio">
+ <el-radio :label="0" v-if="topMethodsObj.select">閫夋嫨</el-radio>
+ <el-radio :label="1" v-if="topMethodsObj.all">鍏ㄩ儴</el-radio>
+ <el-radio :label="2" v-if="topMethodsObj.page">椤电爜</el-radio>
+ </el-radio-group>
+ <span v-if="radio === 2" style="margin-left: 20px;color: #F56C6C; ">
+ <el-input v-model="pageExport" style="width: 150px"></el-input> 锛堣緭鍏ラ〉鐮佹垨鑰呴〉闈㈣寖鍥达紝濡傦細1-10锛�</span>
+ </div>
+ </div>
<el-transfer
v-model="rightRoleData"
v-loading="loading"
@@ -21,19 +33,32 @@
style="text-align: left; display: inline-block;">
</el-transfer>
<div slot="footer" class="dialog-footer">
- <div class="valueInfo" v-if="bottomValue">宸茶缃殑鍊间负锛歔{{bottomValue}}]</div>
- <el-button @click="visible = false" size="small">鍙� 娑�</el-button>
- <el-button type="primary" @click="sendHandler" size="small">纭� 瀹�</el-button>
+ <div v-if="bottomValue" class="valueInfo">宸茶缃殑鍊间负锛歔{{ bottomValue }}]</div>
+ <el-button size="small" @click="visible = false">鍙� 娑�</el-button>
+ <el-button size="small" type="primary" @click="sendHandler">纭� 瀹�</el-button>
</div>
</el-dialog>
</template>
<script>
+import func from "@/util/func";
+
export default {
name: "transfer",
- props: ['title', 'leftRoleData', 'rightRoleData', 'transferTitle' , 'bottomValue'],
+ props: ['title', 'leftRoleData', 'rightRoleData', 'transferTitle', 'bottomValue', 'topMethodsObj', 'selectList'],
+ /**
+ * topMethodsObj:{
+ select:true,
+ all:true,
+ page:false
+ },
+ 鎺у埗椤跺眰閫夋嫨椤规槸鍚﹀睍绀猴紝闇�瑕侀厤鍚坰electList浣跨敤
+ * @returns {object}
+ */
data() {
return {
+ radio: 0,
+ pageExport: "",
visible: false, // 閫氳繃 this.$refs.transfer.visible = true; 寮�鍚瓙缁勪欢瀵硅瘽妗�
data: [],
loading: false,
@@ -73,7 +98,20 @@
this.leftRoleData = [];
},
sendHandler() {
- this.$emit('transferSend', this.rightRoleData);
+ if (func.isEmptyObject(this.topMethodsObj)) {
+ this.$emit('transferSend', this.rightRoleData);
+ } else {
+ if (this.radio === 0) {
+ if (this.selectList.length <= 0) {
+ this.$message.warning('璇烽�夋嫨瑕佸鍑虹殑妯℃澘')
+ return
+ }
+ this.$emit('transferSend', this.rightRoleData, 0);
+ } else if (this.radio === 1) {
+ this.$emit('transferSend', this.rightRoleData, 1);
+ }
+ }
+
this.visible = false;
},
}
@@ -89,7 +127,8 @@
/deep/ .el-transfer-panel__list.is-filterable {
height: 323px; /* 绌挎妗嗗垪琛ㄩ珮搴� */
}
-.valueInfo{
+
+.valueInfo {
float: left;
border: 1px solid #E9E7E7;
display: inline-block;
diff --git a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transferSelect.vue b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transferSelect.vue
new file mode 100644
index 0000000..ba45901
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/transferSelect.vue
@@ -0,0 +1,13 @@
+<template>
+ <p>transferSelect</p>
+</template>
+
+<script>
+export default {
+ name: "transferSelect"
+}
+</script>
+
+<style scoped>
+
+</style>
diff --git a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue
index ea6985d..1195fc0 100644
--- a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue
+++ b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue
@@ -22,6 +22,7 @@
</ul>
<Divider left="30px" text="閫夋嫨鏂囦欢鍚庝細鑷姩涓婁紶"></Divider>
<el-upload
+ :name="fileName"
:action="fileUrl"
:before-upload="beforeUpload"
:data="fileData"
@@ -52,6 +53,10 @@
type: Array,
default: () => []
},
+ fileName: {
+ type: String,
+ default: () => "file"
+ },
// 瀵硅瘽妗嗗ご閮ㄥ悕绉�
title: {
type: String,
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 6d4bb28..ef8fede 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
@@ -451,7 +451,7 @@
</span>
</el-dialog>
- <!-- 涓�鑷存�ф鏌� -->
+ <!-- 鏌ョ湅绱㈠紩 -->
<el-dialog
v-dialogDrag
:visible.sync="indexVisible"
@@ -459,8 +459,61 @@
class="avue-dialog"
title="绱㈠紩淇℃伅"
width="60%"
+ @close="indexDialogClose"
>
-
+ <div v-loading="indexLoading" style="display: flex;height: 500px;width: 100%">
+ <basic-container>
+ <div style="height: 390px">
+ <el-button plain size="mini" style="margin-bottom: 5px" type="danger"
+ @click="deleteIndexLeftTreeClickHandler">鍒犻櫎绱㈠紩
+ </el-button>
+ <avue-tree
+ :data="indexLeftData"
+ :option="indexLeftOption"
+ @node-click="indexLeftNodeClick"></avue-tree>
+ </div>
+ </basic-container>
+ <div style="padding: 20px;width: 75%">
+ <div>
+ <el-form ref="form" :model="indexForm" label-width="90px" size="mini">
+ <el-form-item label="绱㈠紩鍚嶇О锛�">
+ <el-input v-model="indexForm.name" :readOnly="indexFormRead"></el-input>
+ </el-form-item>
+ <el-form-item label="鎻忚堪锛�">
+ <el-input v-model="indexForm.desc"></el-input>
+ </el-form-item>
+ </el-form>
+ <div style="display: flex;justify-content: center">
+ <el-button plain size="mini" type="success" @click="rightIndexAddClick">澧炲姞</el-button>
+ <el-button plain size="mini" type="danger">鍒犻櫎</el-button>
+ </div>
+ </div>
+ <avue-crud
+ :data="indexData"
+ :option="indexOption"></avue-crud>
+ </div>
+ </div>
+ <el-dialog
+ v-dialogDrag
+ :visible.sync="indexAttrVisible"
+ append-to-body="true"
+ class="avue-dialog"
+ title="灞炴�т俊鎭�"
+ width="60%"
+ >
+ <avue-crud
+ :data="indexAttrData"
+ :option="indexAttrOption"
+ @row-click="indexAttrRowClick"></avue-crud>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="indexAttrVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="indexAttrClickAddHandler">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="indexDialogClose">鍙� 娑�</el-button>
+ <el-button type="primary" @click="indexClickAddHandler">淇� 瀛�</el-button>
+ </span>
</el-dialog>
</el-container>
@@ -478,7 +531,10 @@
getUsedBtmLinkList,
checkBtmConsistency,
executeRepair,
- getIndexByCondition
+ getIndexByCondition,
+ delIndex,
+ getAllAttributesByBtmId,
+ addIndex
} from "@/api/modeling/businessType/api"
import {gridAttribute} from "@/api/modeling/attributePool/api";
import func from "@/util/func";
@@ -489,7 +545,79 @@
name: "index",
data() {
return {
- indexVisible:false,
+ indexLoading: false,
+ indexFormRead: false,
+ indexAttrRow: {},
+ indexAttrOption: {
+ ...basicOption,
+ height: 380,
+ highlightCurrentRow: true,
+ addBtn: false,
+ refreshBtn: false,
+ editBtn: false,
+ delBtn: false,
+ selection: false,
+ menu: false,
+ column: [
+ {
+ label: '灞炴�т俊鎭�',
+ prop: 'id',
+ sortable: true,
+ },
+ ]
+ },
+ indexAttrData: [],
+ indexData: [],
+ indexAttrVisible: false,
+ indexLeftNodeRow: {},
+ indexForm: {
+ name: '',
+ desc: ''
+ },
+ indexLeftData: [],
+ indexLeftOption: {
+ height: 'auto',
+ menu: false,
+ addBtn: false,
+ props: {
+ label: 'name',
+ value: 'id',
+ children: 'children',
+ },
+ },
+ indexOption: {
+ ...basicOption,
+ height: 280,
+ addBtn: false,
+ refreshBtn: false,
+ editBtn: false,
+ delBtn: false,
+ selection: false,
+ menu: false,
+ column: [
+ {
+ label: '涓氬姟绫诲瀷鍚嶇О',
+ prop: 'typeName',
+ sortable: true,
+ },
+ {
+ label: '绱㈠紩鍚嶇О',
+ prop: 'indexName',
+ sortable: true,
+ },
+ {
+ label: '灞炴�у悕绉�',
+ prop: 'attrNames',
+ sortable: true,
+ },
+ {
+ label: '鎻忚堪',
+ prop: 'desc',
+ sortable: true,
+ },
+ ]
+ },
+ indexVisible: false,
conDefaultCheckData: [], // 淇濈暀涓婁釜鎺ュ彛杩斿洖鐨勬暟鎹�
conCheckLoading: false,
conCheckOption: {
@@ -1305,9 +1433,9 @@
if (res.data.code === 200) {
this.checkViewVisible = true;
const data = res.data.data.map(item => {
- return{
- name:this.nodeRow.id,
- source:item
+ return {
+ name: this.nodeRow.id,
+ source: item
}
});
this.checkViewData = data;
@@ -1340,12 +1468,14 @@
},
// 涓�鑷存�ф鏌ユ寜閽偣鍑�
- checkClickHandler(){
- checkBtmConsistency().then(res =>{
- if(res && res.data && res.data.data){
+ checkClickHandler() {
+ this.createViewLoading = true;
+ checkBtmConsistency().then(res => {
+ this.createViewLoading = false;
+ if (res && res.data && res.data.data) {
this.conCheckVisible = true;
this.conCheckLoading = true;
- if(res.data.code === 200){
+ if (res.data.code === 200) {
const data = res.data.data[0];
this.conDefaultCheckData = data; // 淇濈暀涓�浠藉師濮嬫暟鎹�
this.conCheckLoading = false;
@@ -1374,7 +1504,7 @@
})
this.conCheckData = outputData;
}
- }else {
+ } else {
this.$message.success(res.data.msg);
}
})
@@ -1395,17 +1525,130 @@
},
// 鍒涘缓绱㈠紩鎸夐挳鐐瑰嚮
- indexClickHandler(){
- if(func.isEmptyObject(this.nodeRow)){
+ indexClickHandler() {
+ if (func.isEmptyObject(this.nodeRow)) {
this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
return;
}
+ this.getLeftIndex();
+ this.indexVisible = true;
+ },
+
+ // 宸︿晶鏍戞洿鏂�
+ getLeftIndex() {
const params = {
- "conditionMap[typename]":this.nodeRow.id
+ "conditionMap[typename]": this.nodeRow.id
}
getIndexByCondition(params).then(res => {
- console.log(res);
+ if (res.data.code === 200) {
+ const data = res.data.data.map(item => {
+ return {
+ indexName: item.indexName,
+ name: `${item.indexName} ${item.attrNames}`,
+ id: item.oid
+ }
+ })
+ this.indexLeftData = data;
+ }
})
+ },
+
+ // 绱㈠紩宸︿晶鏍戠偣鍑�
+ indexLeftNodeClick(row) {
+ this.indexLeftNodeRow = row;
+ },
+
+ // 鍒犻櫎宸︿晶鏍戠储寮�
+ deleteIndexLeftTreeClickHandler() {
+ if (func.isEmptyObject(this.indexLeftNodeRow)) {
+ this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹繘琛屽垹闄�');
+ return;
+ }
+ const params = {
+ btmName: this.nodeRow.id,
+ indexName: this.indexLeftNodeRow.indexName
+ };
+ delIndex(params).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success('鍒犻櫎绱㈠紩鎴愬姛');
+ this.getLeftIndex();
+ }
+ })
+ },
+
+ //鍙充晶琛ㄦ牸娣诲姞灞炴��
+ indexAttrClickAddHandler() {
+ if (func.isEmptyObject(this.indexAttrRow)) {
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
+ this.indexData.push(
+ {
+ typeName: this.nodeRow.id,
+ attrNames: this.indexAttrRow.id,
+ indexName: this.indexForm.name,
+ desc: this.indexForm.desc
+ }
+ )
+ this.indexFormRead = true;
+ this.indexAttrVisible = false;
+ },
+
+ // 鍙充晶灞炴�ц〃鏍艰鐐瑰嚮
+ indexAttrRowClick(row) {
+ this.indexAttrRow = row;
+ },
+
+ // 鍙充晶琛ㄦ牸澧炲姞
+ rightIndexAddClick() {
+ if (!this.indexForm.name) {
+ this.$message.error('璇疯緭鍏ョ储寮曞悕绉�');
+ return;
+ }
+
+ // 妫�鏌ユ槸鍚︿负鑻辨枃瀛楃
+ const englishRegex = /^[A-Za-z]+$/;
+ if (!englishRegex.test(this.indexForm.name)) {
+ this.$message.error('绱㈠紩鍚嶇О鍙兘鍖呭惈鑻辨枃瀛楃');
+ return;
+ }
+ this.indexLoading = true;
+ getAllAttributesByBtmId({btmId: this.nodeRow.id}).then(res => {
+ if (res.data.code === 200) {
+ const data = res.data.data.map(item => {
+ return {
+ id: item.id
+ }
+ })
+ this.indexAttrData = data;
+ }
+ this.indexLoading = false;
+ this.indexAttrVisible = true;
+ })
+ },
+
+ // 鍒涘缓淇濆瓨绱㈠紩
+ indexClickAddHandler() {
+ const params = {
+ typeName: this.nodeRow.id,
+ attrNames: this.indexData.map(item => item.attrNames).join(','),
+ indexName: this.indexForm.name,
+ }
+ addIndex([params]).then(res => {
+ console.log(res)
+ this.$message.success('鍒涘缓鎴愬姛');
+ this.indexDialogClose();
+ }).catch(err => {
+ this.indexDialogClose();
+ })
+ },
+
+ // 绱㈠紩瀵硅瘽妗嗗彇娑�
+ indexDialogClose() {
+ this.indexFormRead = false;
+ this.indexForm = {};
+ this.indexData = [];
+ this.indexVisible = false;
}
}
}
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue
new file mode 100644
index 0000000..d93d6cd
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue
@@ -0,0 +1,603 @@
+<template>
+ <el-dialog
+ v-dialogDrag
+ v-loading="loading"
+ :visible.sync="visible"
+ append-to-body="true"
+ class="avue-dialog"
+ title="琛ㄥ崟"
+ width="100%"
+ @close="closeDialog"
+ >
+ <el-container>
+ <div style="height: 79vh;display: flex;width: 100%;">
+
+ <el-aside width="15%">
+ <basic-container>
+ <div style="height:650px;">
+ <avue-tree
+ :data="treeData"
+ :option="treeOption"
+ @node-drag-start="handleDragStart">
+ </avue-tree>
+ </div>
+ </basic-container>
+ </el-aside>
+
+ <el-main >
+ <basic-container>
+ <div style="height: 645px" @drop="drop" @dragover.prevent>
+ <div style="display: flex;justify-content: center">
+ <span style="display: flex;align-items: center; margin-right: 5px;">
+ <p class="tableTopLabel">鍚嶇О锛�</p>
+ <el-input v-model="name" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </span>
+
+ <span style="display: flex;align-items: center; margin-right: 5px;">
+ <p class="tableTopLabel">鏌ヨ妯℃澘鍚嶇О锛�</p>
+ <el-input v-model="name" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </span>
+
+ <span style="display: flex;align-items: center; margin-right: 5px;">
+ <p class="tableTopLabel">鏄剧ず鍒楁暟锛�</p>
+ <el-input v-model="name" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ <el-button plain size="mini" style="margin-left: 3px" type="success">璁剧疆</el-button>
+ </span>
+
+ <span style="display: flex;align-items: center; margin-right: 5px;">
+ <p class="tableTopLabel">浣嶇疆锛�</p>
+ <el-input v-model="name" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ <el-button plain size="mini" style="margin-left: 3px" type="success">璋冩暣浣嶇疆</el-button>
+ </span>
+ </div>
+ <h3>椤甸潰瀹氫箟</h3>
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+ <el-row>
+ <el-col :span="columnNumber">
+ <el-tooltip v-for="(item,index) in formList" :key="index" :content="item.name" placement="top">
+ <el-form-item class="hiddenLabel" :label="item.name + '锛�'">
+ <el-input v-model="item.value" :splaceholder="item.name" size="mini"></el-input>
+ </el-form-item>
+ </el-tooltip>
+ </el-col>
+ </el-row>
+ </el-form>
+ </div>
+ <div style="display: flex;justify-content: center;margin-top: 15px">
+ <el-button icon="el-icon-check" size="small" type="primary">淇濆瓨</el-button>
+ <el-button icon="el-icon-delete" plain size="small" type="danger">娓呯┖</el-button>
+ <el-button icon="el-icon-el-icon-close" plain size="small" type="primary">鍒犻櫎缁勪欢</el-button>
+ <el-button icon="el-icon-plus" plain size="small" type="primary">娣诲姞鑷畾涔夌粍浠�</el-button>
+ <el-button icon="el-icon-zoom-in" plain size="small" type="primary">棰勮</el-button>
+ </div>
+ </basic-container>
+ </el-main>
+
+ <el-aside width="25%">
+ <basic-container>
+ <div style="height: 700px; overflow-y: auto;padding-right: 10px">
+ <h3>璁剧疆</h3>
+ <el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="85px">
+ <el-row style="border-bottom: 1px solid #878585;padding-bottom: 10px">
+ <el-col :span="24">
+ <el-form-item label="浣跨敤瀛楁">
+ <div style="display: flex">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ <el-checkbox v-model="checked" style="margin-left: 5px; margin-right: 5px">鍙</el-checkbox>
+ <el-checkbox v-model="checked" style="margin-left: 5px;margin-right: 0px">蹇呭~</el-checkbox>
+ </div>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item label="鏄剧ず鍚嶇О">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item class="rightLabel" label="鏄剧ず绫诲瀷">
+ <el-select v-model="form.region" placeholder="璇烽�夋嫨娲诲姩鍖哄煙" size="mini">
+ <el-option label="鍖哄煙涓�" value="shanghai"></el-option>
+ <el-option label="鍖哄煙浜�" value="beijing"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-tooltip content="榛樿鍊艰〃杈惧紡" placement="top">
+ <el-form-item class="hiddenLabel" label="榛樿鍊艰〃杈惧紡">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-tooltip>
+ </el-col>
+
+ <el-col :span="24">
+ <!-- <el-tooltip content="鏄剧ず琛ㄨ揪寮�" placement="top">-->
+ <el-form-item label="鏄剧ず琛ㄨ揪寮�">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ <!-- </el-tooltip>-->
+ </el-col>
+
+ <el-col :span="24">
+ <el-tooltip content="鏃ユ湡鏍煎紡鍖栧瓧绗︿覆" placement="top">
+ <el-form-item class="hiddenLabel" label="鏃ユ湡鏍煎紡鍖栧瓧绗︿覆锛�">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-tooltip>
+ </el-col>
+
+ <el-col :span="24">
+ <el-form-item label="鍗犱綅鏂瑰紡">
+ <el-radio v-model="treeRadio" label="0">鏄剧ず</el-radio>
+ <el-radio v-model="treeRadio" label="1">涓嶆樉绀�</el-radio>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24" style="height: 90px">
+ <el-form-item label="瀛楁琛ㄨ揪寮�">
+ <el-input
+ v-model="textarea2"
+ :rows="3"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ resize="none"
+ type="textarea">
+ </el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24" style="height: 90px">
+ <el-tooltip content="鍙閫夋嫨鏉′欢" placement="top">
+ <el-form-item class="hiddenLabel" label="鍙閫夋嫨鏉′欢">
+ <el-input
+ v-model="textarea2"
+ :rows="3"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ resize="none"
+ type="textarea">
+ </el-input>
+ </el-form-item>
+ </el-tooltip>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item label="鎺у埗鍒�">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item class="rightLabel" label="鏄剧ず鍒楁潯浠�" label-width="95px">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-form-item label="鏉冮檺鎺у埗">
+ <div style="display: flex;align-items: center">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ <el-button plain size="mini" style="margin-left: 3px" type="success">閫夋嫨</el-button>
+ </div>
+ </el-form-item>
+ </el-col>
+
+ </el-row>
+ <el-row style="margin-top: 10px;border-bottom: 1px solid #878585;padding-bottom: 10px">
+ <el-col :span="24" style="height: 90px">
+ <el-form-item label="鑴氭湰楠岃瘉">
+ <el-input
+ v-model="textarea2"
+ :rows="3"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ resize="none"
+ type="textarea">
+ </el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24" style="height: 90px">
+ <el-form-item label="鎻愮ず鏂囧瓧">
+ <el-input
+ v-model="textarea2"
+ :rows="3"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ resize="none"
+ type="textarea">
+ </el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-form-item label="鏌ヨ鍏宠仈鍒�">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-form-item label="鑷畾涔夌被">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-form-item label="瀛樺偍璺緞">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-tooltip content="瀛樺偍璺緞瀛楁" placement="top">
+ <el-form-item class="hiddenLabel" label="瀛樺偍璺緞瀛楁">
+ <div style="display: flex">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ <el-checkbox v-model="checked" style="margin-left: 5px">http瀛樺偍</el-checkbox>
+ </div>
+ </el-form-item>
+ </el-tooltip>
+ </el-col>
+
+ </el-row>
+
+ <el-row style="margin-top: 10px;border-bottom: 1px solid #878585;padding-bottom: 10px">
+ <h4>閫夐」鍒楄〃</h4>
+ <el-col :span="12">
+ <el-form-item label="鍚嶇О">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item class="rightLabel" label="鍊�" label-width="95px">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24" style="height: 190px">
+ <el-form-item>
+ <div style="height: 150px; width: 100%; border: 1px solid #bdbbbb;overflow-y: auto">
+ <el-table
+ :data="optionRightData"
+ :highlight-current-row="true"
+ :show-header="false"
+ border
+ stripe
+ style="width: 100%">
+ <el-table-column
+ align="center"
+ label="鍚嶇О"
+ prop="name">
+ <template slot-scope="scope">
+ <el-tag size="medium">{{ scope.row.name }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column
+ align="center"
+ label="鍊�"
+ prop="value">
+ <template slot-scope="scope">
+ <el-tag size="medium">{{ scope.row.value }}</el-tag>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ <div style="display: flex;align-items: center;justify-content: center;margin-top: 5px">
+ <el-button plain size="mini" style="margin-right: 5px" type="success">娣诲姞</el-button>
+ <el-button plain size="mini" style="margin-left: 5px" type="danger">鍒犻櫎</el-button>
+ </div>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-form-item label="涓�绾у弬鐓�">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-form-item label="浜岀骇鍙傜収">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-form-item label="鍙傜収鍊�">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row style="margin-top: 10px">
+ <el-col :span="24" style="height: 90px">
+ <el-form-item label="闄勫姞灞炴��">
+ <el-input
+ v-model="textarea2"
+ :rows="3"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ resize="none"
+ type="textarea">
+ </el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ </el-form>
+ </div>
+ </basic-container>
+ </el-aside>
+
+ </div>
+
+ </el-container>
+ </el-dialog>
+</template>
+
+<script>
+
+export default {
+ name: "formDialog",
+ data() {
+ return {
+ formList:[],
+ optionRightData: [
+ {
+ name: 'test',
+ value: 'test'
+ }
+ ],
+ form: {},
+ rules: {},
+ columnNumber: 12,
+ loading: false,
+ visible: false,
+ treeOption: {
+ menu: false,
+ addBtn: false,
+ draggable: true,
+ allowDrop: () => {
+ return false;
+ },
+ allowDrag: () => {
+ return true;
+ },
+ // props: {
+ // label: 'name',
+ // value: 'id',
+ // children: 'children',
+ // },
+ },
+ treeData: [
+ {
+ value: 0,
+ label: '涓�绾ч儴闂�',
+ children: [
+ {
+ value: 1,
+ label: '涓�绾ч儴闂�1',
+ }, {
+ value: 2,
+ label: '涓�绾ч儴闂�2',
+ }
+ ]
+ }, {
+ value: 3,
+ label: '浜岀骇閮ㄩ棬',
+ children: [
+ {
+ value: 4,
+ label: '浜岀骇閮ㄩ棬1',
+ }, {
+ value: 5,
+ label: '浜岀骇閮ㄩ棬2',
+ }
+ ]
+ },
+ {
+ value: 0,
+ label: '涓�绾ч儴闂�',
+ children: [
+ {
+ value: 1,
+ label: '涓�绾ч儴闂�1',
+ }, {
+ value: 2,
+ label: '涓�绾ч儴闂�2',
+ }
+ ]
+ }, {
+ value: 3,
+ label: '浜岀骇閮ㄩ棬',
+ children: [
+ {
+ value: 4,
+ label: '浜岀骇閮ㄩ棬1',
+ }, {
+ value: 5,
+ label: '浜岀骇閮ㄩ棬2',
+ }
+ ]
+ },
+ {
+ value: 0,
+ label: '涓�绾ч儴闂�',
+ children: [
+ {
+ value: 1,
+ label: '涓�绾ч儴闂�1',
+ }, {
+ value: 2,
+ label: '涓�绾ч儴闂�2',
+ }
+ ]
+ }, {
+ value: 3,
+ label: '浜岀骇閮ㄩ棬',
+ children: [
+ {
+ value: 4,
+ label: '浜岀骇閮ㄩ棬1',
+ }, {
+ value: 5,
+ label: '浜岀骇閮ㄩ棬2',
+ }
+ ]
+ },
+ {
+ value: 0,
+ label: '涓�绾ч儴闂�',
+ children: [
+ {
+ value: 1,
+ label: '涓�绾ч儴闂�1',
+ }, {
+ value: 2,
+ label: '涓�绾ч儴闂�2',
+ }
+ ]
+ }, {
+ value: 3,
+ label: '浜岀骇閮ㄩ棬',
+ children: [
+ {
+ value: 4,
+ label: '浜岀骇閮ㄩ棬1',
+ }, {
+ value: 5,
+ label: '浜岀骇閮ㄩ棬2',
+ }
+ ]
+ },
+ {
+ value: 0,
+ label: '涓�绾ч儴闂�',
+ children: [
+ {
+ value: 1,
+ label: '涓�绾ч儴闂�1',
+ }, {
+ value: 2,
+ label: '涓�绾ч儴闂�2',
+ }
+ ]
+ }, {
+ value: 3,
+ label: '浜岀骇閮ㄩ棬',
+ children: [
+ {
+ value: 4,
+ label: '浜岀骇閮ㄩ棬1',
+ }, {
+ value: 5,
+ label: '浜岀骇閮ㄩ棬2',
+ }
+ ]
+ },
+ {
+ value: 0,
+ label: '涓�绾ч儴闂�',
+ children: [
+ {
+ value: 1,
+ label: '涓�绾ч儴闂�1',
+ }, {
+ value: 2,
+ label: '涓�绾ч儴闂�2',
+ }
+ ]
+ }, {
+ value: 3,
+ label: '浜岀骇閮ㄩ棬',
+ children: [
+ {
+ value: 4,
+ label: '浜岀骇閮ㄩ棬1',
+ }, {
+ value: 5,
+ label: '浜岀骇閮ㄩ棬2',
+ }
+ ]
+ },
+ {
+ value: 0,
+ label: '涓�绾ч儴闂�',
+ children: [
+ {
+ value: 1,
+ label: '涓�绾ч儴闂�1',
+ }, {
+ value: 2,
+ label: '涓�绾ч儴闂�2',
+ }
+ ]
+ }, {
+ value: 3,
+ label: '浜岀骇閮ㄩ棬',
+ children: [
+ {
+ value: 4,
+ label: '浜岀骇閮ㄩ棬1',
+ }, {
+ value: 5,
+ label: '浜岀骇閮ㄩ棬2',
+ }
+ ]
+ }
+ ]
+ }
+ },
+ methods: {
+ // 鍏抽棴瀵硅瘽妗�
+ closeDialog() {
+ },
+
+ // 寮�濮嬫嫋鎷芥爲鑺傜偣浜嬩欢
+ handleDragStart(node, ev) {
+ // 浣跨敤 setData 鏂规硶璁剧疆鏁版嵁
+ ev.dataTransfer.setData('item', JSON.stringify(node.data));
+ },
+
+ // 鎷栨嫿鍒拌〃鍗曟椂
+ drop(event) {
+ // 浣跨敤 getData 鏂规硶鑾峰彇鏁版嵁
+ const data = JSON.parse(event.dataTransfer.getData('item'));
+ console.log('data', data);
+ const params = {
+ name:data.label,
+ value:'',
+ type:''
+ }
+ this.formList.push(params)
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep {
+ .hiddenLabel {
+ .el-form-item__label {
+ white-space: nowrap; // 闃叉鎹㈣
+ overflow: hidden; //闅愯棌瓒呭嚭閮ㄥ垎
+ text-overflow: ellipsis; //鏄剧ず鐪佺暐鍙�
+ }
+ }
+
+ .el-col {
+ margin-bottom: 0px;
+ height: 40px;
+ }
+
+ .rightLabel {
+ .el-form-item__label {
+ text-align: right !important;
+ }
+ }
+}
+
+.tableTopLabel {
+ display: flex;
+ flex-shrink: 0 !important;
+ font-size: 14px
+}
+
+</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/tableDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/tableDialog.vue
new file mode 100644
index 0000000..0805b0c
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/tableDialog.vue
@@ -0,0 +1,344 @@
+<template>
+ <el-dialog
+ v-dialogDrag
+ v-loading="loading"
+ :visible.sync="visible"
+ append-to-body="true"
+ class="avue-dialog"
+ title="琛ㄦ牸"
+ width="60%"
+ @close="closeDialog"
+ >
+ <el-form :model="form" :rules="rules" label-position="right" label-width="100px">
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="鍚嶇О">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+
+ <el-col :span="12">
+ <el-form-item label="姣忛〉琛屾暟">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-form-item label="闄勫姞鏌ヨ鏉′欢">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item label="缁戝畾琛ㄥ崟">
+ <div style="display: flex;align-items: center;">
+ <el-select v-model="form.region" placeholder="璇烽�夋嫨娲诲姩鍖哄煙" size="mini">
+ <el-option label="鍖哄煙涓�" value="shanghai"></el-option>
+ <el-option label="鍖哄煙浜�" value="beijing"></el-option>
+ </el-select>
+ <el-button plain size="mini" style="margin-left: 3px" type="success">閫夋嫨</el-button>
+ </div>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item label="鐖跺悕绉�">
+ <div style="display: flex;align-items: center;">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ <el-checkbox v-model="checked" style="margin-left: 5px; margin-right: 5px">鏄剧ず鏌ヨ鍖哄煙</el-checkbox>
+ <el-checkbox v-model="checked" style="margin-left: 5px;margin-right: 0px">鏄剧ず鏂囦欢澶�</el-checkbox>
+ </div>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item label="鏄剧ず瀛楁">
+ <div style="display: flex; align-items: center">
+ <div style="height: 260px; width: 160px; border: 1px solid #bdbbbb;overflow-y: auto">
+ <el-table
+ :data="showLifeTable"
+ style="width: 100%">
+ <el-table-column
+ align="center"
+ label="鍙娇鐢ㄥ瓧娈�"
+ prop="id">
+ </el-table-column>
+ </el-table>
+ </div>
+ <div style="margin-left: 10px; margin-right: 10px">
+ <el-button circle icon="el-icon-back" style="margin-right: 10px"></el-button>
+ <el-button circle icon="el-icon-right"></el-button>
+ </div>
+ <div style="height: 260px; width: 160px; border: 1px solid #bdbbbb;overflow-y: auto">
+ <el-table
+ :data="showRightTable"
+ style="width: 100%">
+ <el-table-column
+ align="center"
+ label="闇�瑕佷娇鐢ㄥ瓧娈�"
+ prop="id">
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item label="鎼滅储瀛楁">
+ <div style="display: flex; align-items: center">
+ <div style="height: 260px; width: 160px; border: 1px solid #bdbbbb;overflow-y: auto">
+ <el-table
+ :data="searchLifeTable"
+ style="width: 100%">
+ <el-table-column
+ align="center"
+ label="鍙緵鎼滅储瀛楁"
+ prop="id">
+ </el-table-column>
+ </el-table>
+ </div>
+ <div style="margin-left: 10px; margin-right: 10px">
+ <el-button circle icon="el-icon-back" style="margin-right: 10px"></el-button>
+ <el-button circle icon="el-icon-right"></el-button>
+ </div>
+ <div style="height: 260px; width: 160px; border: 1px solid #bdbbbb;overflow-y: auto">
+ <el-table
+ :data="searchRightTable"
+ style="width: 100%">
+ <el-table-column
+ align="center"
+ label="闇�鎼滅储瀛楁"
+ prop="id">
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item label="鍒�">
+ <el-select v-model="form.region" placeholder="璇烽�夋嫨鍒�" size="mini">
+ <el-option label="鍖哄煙涓�" value="shanghai"></el-option>
+ <el-option label="鍖哄煙浜�" value="beijing"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item label="瀹藉害">
+ <div style="display: flex;align-items: center;">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini" style="width: 193px"></el-input>
+ <el-button plain size="mini" style="margin-left: 3px" type="success">璁剧疆</el-button>
+ </div>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-col :span="24">
+ <el-form-item label="璁剧疆鍒楀">
+ <div style="height: 150px; width: 100%; border: 1px solid #bdbbbb;overflow-y: auto">
+ <el-table
+ :data="columnWidthData"
+ :highlight-current-row="true"
+ border
+ stripe
+ style="width: 100%">
+ <el-table-column
+ align="center"
+ label="鍒楀悕"
+ prop="id">
+ <template slot-scope="scope">
+ <el-tag size="medium">{{ scope.row.id }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column
+ align="center"
+ label="鍒楀"
+ prop="width">
+ <template slot-scope="scope">
+ <el-tag size="medium">{{ scope.row.width }}</el-tag>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="8">
+ <el-form-item label="鏌ヨ瀛楁">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="8">
+ <el-form-item label="鏌ヨ娆℃暟">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="8">
+ <el-form-item label="鏌ヨsql">
+ <div style="display: flex;align-items: center">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ <el-button plain size="mini" style="margin-left: 3px" type="success">娣诲姞</el-button>
+ <el-button plain size="mini" style="margin-left: 3px" type="danger">鍒犻櫎</el-button>
+ </div>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-form-item label="鏌ヨ瀛楁">
+ <div style="height: 150px; width: 100%; border: 1px solid #bdbbbb;overflow-y: auto">
+ <el-table
+ :data="columnSearchData"
+ :highlight-current-row="true"
+ border
+ stripe
+ style="width: 100%">
+ <el-table-column
+ align="center"
+ label="鏌ヨ瀛楁"
+ prop="id">
+ <template slot-scope="scope">
+ <el-tag size="medium">{{ scope.row.id }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column
+ align="center"
+ label="鏌ヨ娆℃暟"
+ prop="name">
+ <template slot-scope="scope">
+ <el-tag size="medium">{{ scope.row.name }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column
+ align="center"
+ label="鏌ヨsql"
+ prop="sql">
+ <template slot-scope="scope">
+ <el-tag size="medium">{{ scope.row.sql }}</el-tag>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-form-item label="鍙屽嚮鎿嶄綔">
+ <el-select v-model="form.region" placeholder="璇烽�夋嫨鍙屽嚮鎿嶄綔" size="mini">
+ <el-option label="鍖哄煙涓�" value="shanghai"></el-option>
+ <el-option label="鍖哄煙浜�" value="beijing"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-form-item label="鍥剧墖鏄剧ず">
+ <div style="display: flex;align-items: center">
+ <div style="display: flex;align-items: center;width: 100%;">
+ <span>闀匡細</span>
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </div>
+ <div style="display: flex;align-items: center;width: 100%;margin-left: 30px">
+ <span>瀹斤細</span>
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </div>
+ </div>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item label="瀛楃涓叉埅鍙�">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="8">
+ <el-form-item label="瓒呴摼鎺�">
+ <el-input v-model="user" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="24">
+ <el-form-item label="鏌ヨ妯℃澘">
+ <el-select v-model="form.region" placeholder="璇烽�夋嫨鏌ヨ妯℃澘" size="mini">
+ <el-option label="鍖哄煙涓�" value="shanghai"></el-option>
+ <el-option label="鍖哄煙浜�" value="beijing"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-form>
+
+ <span slot="footer" class="dialog-footer">
+ <el-button>鍙� 娑�</el-button>
+ <el-button type="primary">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+</template>
+
+<script>
+export default {
+ name: "tableDialog",
+ data() {
+ return {
+ columnSearchData: [
+ {
+ id: 'test',
+ name: '3',
+ sql: 'xxxxx'
+ }
+ ],
+ columnWidthData: [
+ {
+ id: 'test',
+ width: '250'
+ }
+ ],
+ searchLifeTable: [],
+ searchRightTable: [],
+ showRightTable: [],
+ showLifeTable: [
+ {
+ id: 'test1'
+ },
+ {
+ id: 'test2'
+ },
+ {
+ id: 'test1'
+ },
+ {
+ id: 'test2'
+ },
+ {
+ id: 'test1'
+ },
+ {
+ id: 'test2'
+ }
+ ],
+ rules: {},
+ form: {},
+ loading: false,
+ visible: false
+ }
+ },
+ methods: {
+ closeDialog() {
+
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep {
+ .el-form-item .el-select {
+ //width: 100%;
+ }
+}
+</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
index 308c333..8693e99 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
@@ -4,23 +4,12 @@
<el-aside>
<basic-container>
<div ref="TreeBox" style="height: calc(100vh - 144px);!important;">
- <div class="headerCon">
- <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">鍒涘缓
- </el-button>
- <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">淇敼
- </el-button>
- <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">鍒犻櫎
- </el-button>
- <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭
- </el-button>
- <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">瀵煎叆
- </el-button>
- <el-button class="smallBtn" plain size="small" type="primary"
- @click="checkViewClickHandler">鏌ョ湅浣跨敤鑼冨洿
- </el-button>
- </div>
<!-- 宸︿晶鏍� -->
<div style="height: calc(100vh - 280px);">
+ <div style="margin-bottom: 10px;display: flex;justify-content: center">
+ <el-radio v-model="treeRadio" label="0">涓氬姟绫诲瀷鏍�</el-radio>
+ <el-radio v-model="treeRadio" label="1">閾炬帴绫诲瀷鏍�</el-radio>
+ </div>
<avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
<span slot-scope="{ node, data }" class="el-tree-node__label">
<span style="font-size: 15px">
@@ -36,15 +25,83 @@
<el-main>
<basic-container>
+ <avue-crud
+ :data="data"
+ :option="option">
+ <template slot="menuLeft">
+ <div style="display: flex; align-items: center;">
+ <span style="display: inline-block; margin-right: 10px;">
+ <el-radio v-model="tableRadio" label="0">琛ㄥ崟</el-radio>
+ <el-radio v-model="tableRadio" label="1">琛ㄦ牸<span style="color: red;">锛堝厛瀵煎叆琛ㄥ崟锛屽啀瀵煎叆琛ㄦ牸锛侊級</span></el-radio>
+ </span>
+ <span style="display: flex;align-items: center; margin-right: 10px;">
+ <p style="display: flex; flex-shrink: 0;font-size: 14px">鍚嶇О锛�</p>
+ <el-input v-model="input" placeholder="璇疯緭鍏ュ唴瀹�" size="mini"></el-input>
+ </span>
+ <span style="display: flex; align-items: center;">
+ <p
+ style="display: flex; align-items: center; margin: 0 10px 0 0;flex-shrink: 0;font-size: 14px">鍏嬮殕鐩爣锛�</p>
+ <el-input v-model="input" placeholder="璇疯緭鍏ュ唴瀹�" size="mini" style="margin-right: 10px;"></el-input>
+ <el-button plain size="mini" type="success">鍏嬮殕鐩爣</el-button>
+ </span>
+ </div>
+ </template>
+ <template slot="menu" slot-scope="scope">
+ <el-button icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">缂栬緫
+ </el-button>
+ <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">鍒犻櫎
+ </el-button>
+ </template>
+ </avue-crud>
+ <div style="display: flex;justify-content: center;margin-top: 15px">
+ <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">澧炲姞</el-button>
+ <el-button icon="el-icon-delete" plain size="small" type="danger">鍒犻櫎</el-button>
+ <el-button icon="el-icon-document-add" plain size="small" type="primary">鍏嬮殕</el-button>
+ <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadHandler">瀵煎叆</el-button>
+ <el-button icon="el-icon-download" plain size="small" type="primary" @click="downLoadHandler">瀵煎嚭</el-button>
+ </div>
</basic-container>
</el-main>
-
+ <form-dialog ref="formDialog"></form-dialog>
+ <table-dialog ref="tableDialog"></table-dialog>
</el-container>
</template>
<script>
+import basicOption from "@/util/basic-option";
+import FormDialog from "@/views/modelingMenu/ui/formDefine/components/formDialog";
+import TableDialog from "@/views/modelingMenu/ui/formDefine/components/tableDialog"
+
export default {
- name: "index"
+ name: "index",
+ components: {FormDialog, TableDialog},
+ data() {
+ return {
+ option: {
+ ...basicOption,
+ addBtn: false,
+ editBtn: false,
+ delBtn: false
+ },
+ data: [],
+ tableRadio: "",
+ treeRadio: "0",
+ treeData: [],
+ treeOption: {
+ addBtn: false
+ }
+ }
+ },
+ methods: {
+ addClickHandler() {
+ if (!this.tableRadio) {
+ this.$message.error('璇峰湪琛ㄦ牸涓婃柟閫夋嫨鏂板绫诲瀷');
+ return;
+ }
+
+ this.tableRadio === "0" ? this.$refs.formDialog.visible = true : this.$refs.tableDialog.visible = true;
+ }
+ }
}
</script>
@@ -53,8 +110,9 @@
.el-scrollbar__wrap {
overflow: auto !important;
}
- .headerCon{
- .el-button{
+
+ .headerCon {
+ .el-button {
width: 82px;
}
}
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 548091c..a36c78d 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
@@ -1,5 +1,5 @@
<template>
- <el-container>
+ <el-container v-loading="createdLoading">
<el-aside>
<basic-container>
<div style="max-height: calc(100vh - 170px);overflow: auto">
@@ -120,9 +120,9 @@
</el-button>
</div>
<div v-if="form.childType === 0" class="btnBox">
- <el-button icon="el-icon-edit" plain size="small" type="primary">淇敼鍒悕
+ <el-button icon="el-icon-edit" plain size="small" type="primary" @click="updataAliasClickHandler">淇敼鍒悕
</el-button>
- <el-button icon="el-icon-close" plain size="small" type="danger">鍒犻櫎
+ <el-button icon="el-icon-close" plain size="small" type="danger" @click="deleteOperationClickHandler">鍒犻櫎
</el-button>
</div>
</basic-container>
@@ -149,6 +149,9 @@
<el-button type="primary" @click="methodsSaveClickHandler">淇� 瀛�</el-button>
</span>
</el-dialog>
+ <!--瀵煎叆 -->
+ <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" fileName="files" title="瀵煎叆"
+ @updata="resetFormValue"></upload-file>
</el-container>
</template>
@@ -160,7 +163,10 @@
updateModel,
delModule,
exportFunctionSql,
- addOperationType
+ addOperationType,
+ exportModule,
+ updateAlias,
+ delFuncOperation
} from "@/api/systemModel/mangeModel/api"
import func from "@/util/func";
import basicOption from "@/util/basic-option";
@@ -169,6 +175,10 @@
name: "index",
data() {
return {
+ tipList: [],
+ upFileType: ['xls', 'xlsx'],
+ fileUrl: 'api/hmSysModConfigController/importModule',
+ createdLoading: false,
lastIndex: null,
methodsList: [],
methodsData: [],
@@ -246,7 +256,6 @@
methods: {
// 鏍戣鐐瑰嚮
nodeClick(row) {
- console.log(row.childType);
this.form = {...row};
this.nodeRow = {...row};
this.addStatus = false;
@@ -255,17 +264,19 @@
// 鏂板鎸夐挳
addClickHandler() {
- this.resetFormValue();
+ // this.resetFormValue();
+ this.defalutName.forEach(key => {
+ this.form[key] = null;
+ })
+ this.form.isValid = false;
this.addStatus = true;
this.editStatus = false;
},
// 娓呯┖琛ㄥ崟缁戝畾鍊�
resetFormValue() {
- this.defalutName.forEach(key => {
- this.form[key] = null;
- })
- this.form.isValid = false;
+ this.form = {};
+ this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
},
// 鏂板淇濆瓨鎸夐挳
@@ -275,23 +286,23 @@
return
}
if (this.form.name.length > 128) {
- this.$message.error('妯″潡鍚嶉暱搴﹁秴杩�128锛�');
+ this.$message.error('妯″潡鍚嶉暱搴︿笉鑳借秴杩�128锛�');
return
}
if (this.form.remark && this.form.remark.length > 255) {
- this.$message.error('鎻忚堪闀垮害瓒呰繃255锛�');
+ this.$message.error('鎻忚堪闀垮害涓嶈兘瓒呰繃255锛�');
return
}
if (this.form.resourceDotNet && this.form.resourceDotNet.length > 255) {
- this.$message.error('.NET鏍囪瘑闀垮害涓嶈兘255锛�');
+ this.$message.error('.NET鏍囪瘑闀垮害涓嶈兘瓒呰繃255锛�');
return
}
if (this.form.pathC && this.form.pathC.length > 255) {
- this.$message.error('C/S鏍囪瘑闀垮害涓嶈兘255锛�');
+ this.$message.error('C/S鏍囪瘑闀垮害涓嶈兘瓒呰繃255锛�');
return
}
if (this.form.resourceMobile && this.form.resourceMobile.length > 255) {
- this.$message.error('Mobile鏍囪瘑闀垮害涓嶈兘255锛�');
+ this.$message.error('Mobile鏍囪瘑闀垮害涓嶈兘瓒呰繃255锛�');
return
}
this.form.parentId = this.form.id;
@@ -299,6 +310,8 @@
if (res.data.code === 200) {
this.$message.success(res.data.msg);
this.addStatus = false;
+ // this.resetFormValue();
+ this.form.childType = null;
this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
}
})
@@ -306,7 +319,6 @@
// 淇敼鎸夐挳
editClickHandler() {
- console.log(this.form);
this.editStatus = true;
this.addStatus = false;
},
@@ -342,6 +354,8 @@
if (res.data.code === 200) {
this.$message.success(res.data.msg);
this.editStatus = false;
+ // this.resetFormValue();
+ this.form.childType = null;
this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
}
})
@@ -355,13 +369,11 @@
type: 'warning'
}).then(() => {
delModule(this.form).then(res => {
- console.log(res);
if (res.data.code === 200) {
this.$message.success(res.data.msg);
this.resetFormValue();
this.addStatus = false;
this.editStatus = false;
- this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
}
})
}).catch(() => {
@@ -417,9 +429,8 @@
if (res.data.code === 200) {
this.methodsVisble = false;
this.$message.success(res.data.msg);
- this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
- this.resetFormValue();
this.form.childType = null;
+ this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
}
})
},
@@ -438,6 +449,64 @@
}
);
},
+
+ // 淇敼鍒悕
+ updataAliasClickHandler() {
+ const params = {
+ id: this.form.id,
+ isValid: this.form.isValid,
+ alias: this.form.alias
+ }
+ updateAlias(params).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success(res.data.msg);
+ this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
+ }
+ })
+ },
+
+ // 鍒犻櫎妯″潡涓嬪叧鑱旂殑鎿嶄綔绫诲瀷
+ deleteOperationClickHandler() {
+ this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ const params = {
+ funcId: this.form.funcId,
+ operId: this.form.operId
+ }
+ delFuncOperation(params).then(res => {
+ console.log(res);
+ if (res.data.code === 200) {
+ this.$message.success(res.data.msg);
+ this.resetFormValue();
+ }
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
+ },
+
+ // 瀵煎嚭
+ exportClickHandler() {
+ this.createdLoading = true;
+ exportModule().then(res => {
+ func.downloadFileByBlobHandler(res);
+ this.createdLoading = false
+ this.$message.success('瀵煎嚭鎴愬姛');
+ }).catch(err => {
+ this.$message.error(err);
+ })
+ },
+
+ // 瀵煎叆
+ upLoadClickHandler() {
+ this.$refs.upload.visible = true;
+ }
}
}
</script>
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 8709445..ed00511 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
@@ -1,5 +1,5 @@
<template>
- <el-container>
+ <el-container v-loading="createdLoading">
<el-aside>
<basic-container>
<div style="max-height: calc(100vh - 170px);overflow: auto">
@@ -120,9 +120,9 @@
</el-button>
</div>
<div v-if="form.childType === 0" class="btnBox">
- <el-button icon="el-icon-edit" plain size="small" type="primary">淇敼鍒悕
+ <el-button icon="el-icon-edit" plain size="small" type="primary" @click="updataAliasClickHandler">淇敼鍒悕
</el-button>
- <el-button icon="el-icon-close" plain size="small" type="danger">鍒犻櫎
+ <el-button icon="el-icon-close" plain size="small" type="danger" @click="deleteOperationClickHandler">鍒犻櫎
</el-button>
</div>
</basic-container>
@@ -149,6 +149,9 @@
<el-button type="primary" @click="methodsSaveClickHandler">淇� 瀛�</el-button>
</span>
</el-dialog>
+ <!--瀵煎叆 -->
+ <upload-file ref="upload" fileName="files" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆"
+ @updata="resetFormValue"></upload-file>
</el-container>
</template>
@@ -160,7 +163,10 @@
updateModel,
delModule,
exportFunctionSql,
- addOperationType
+ addOperationType,
+ exportModule,
+ updateAlias,
+ delFuncOperation
} from "@/api/systemModel/mangeModel/api"
import func from "@/util/func";
import basicOption from "@/util/basic-option";
@@ -169,6 +175,10 @@
name: "index",
data() {
return {
+ tipList: [],
+ upFileType: ['xls', 'xlsx'],
+ fileUrl: 'api/hmSysModConfigController/importModule',
+ createdLoading: false,
lastIndex: null,
methodsList: [],
methodsData: [],
@@ -255,17 +265,19 @@
// 鏂板鎸夐挳
addClickHandler() {
- this.resetFormValue();
+ // this.resetFormValue();
+ this.defalutName.forEach(key => {
+ this.form[key] = null;
+ })
+ this.form.isValid = false;
this.addStatus = true;
this.editStatus = false;
},
// 娓呯┖琛ㄥ崟缁戝畾鍊�
resetFormValue() {
- this.defalutName.forEach(key => {
- this.form[key] = null;
- })
- this.form.isValid = false;
+ this.form = {};
+ this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
},
// 鏂板淇濆瓨鎸夐挳
@@ -275,23 +287,23 @@
return
}
if (this.form.name.length > 128) {
- this.$message.error('妯″潡鍚嶉暱搴﹁秴杩�128锛�');
+ this.$message.error('妯″潡鍚嶉暱搴︿笉鑳借秴杩�128锛�');
return
}
if (this.form.remark && this.form.remark.length > 255) {
- this.$message.error('鎻忚堪闀垮害瓒呰繃255锛�');
+ this.$message.error('鎻忚堪闀垮害涓嶈兘瓒呰繃255锛�');
return
}
if (this.form.resourceDotNet && this.form.resourceDotNet.length > 255) {
- this.$message.error('.NET鏍囪瘑闀垮害涓嶈兘255锛�');
+ this.$message.error('.NET鏍囪瘑闀垮害涓嶈兘瓒呰繃255锛�');
return
}
if (this.form.pathC && this.form.pathC.length > 255) {
- this.$message.error('C/S鏍囪瘑闀垮害涓嶈兘255锛�');
+ this.$message.error('C/S鏍囪瘑闀垮害涓嶈兘瓒呰繃255锛�');
return
}
if (this.form.resourceMobile && this.form.resourceMobile.length > 255) {
- this.$message.error('Mobile鏍囪瘑闀垮害涓嶈兘255锛�');
+ this.$message.error('Mobile鏍囪瘑闀垮害涓嶈兘瓒呰繃255锛�');
return
}
this.form.parentId = this.form.id;
@@ -299,6 +311,8 @@
if (res.data.code === 200) {
this.$message.success(res.data.msg);
this.addStatus = false;
+ // this.resetFormValue();
+ this.form.childType = null;
this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
}
})
@@ -306,7 +320,6 @@
// 淇敼鎸夐挳
editClickHandler() {
- console.log(this.form);
this.editStatus = true;
this.addStatus = false;
},
@@ -342,6 +355,8 @@
if (res.data.code === 200) {
this.$message.success(res.data.msg);
this.editStatus = false;
+ // this.resetFormValue();
+ this.form.childType = null;
this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
}
})
@@ -355,13 +370,11 @@
type: 'warning'
}).then(() => {
delModule(this.form).then(res => {
- console.log(res);
if (res.data.code === 200) {
this.$message.success(res.data.msg);
this.resetFormValue();
this.addStatus = false;
this.editStatus = false;
- this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
}
})
}).catch(() => {
@@ -417,9 +430,8 @@
if (res.data.code === 200) {
this.methodsVisble = false;
this.$message.success(res.data.msg);
- this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
- this.resetFormValue();
this.form.childType = null;
+ this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
}
})
},
@@ -438,6 +450,54 @@
}
);
},
+
+ // 淇敼鍒悕
+ updataAliasClickHandler() {
+ const params = {
+ id: this.form.id,
+ isValid: this.form.isValid,
+ alias: this.form.alias
+ }
+ updateAlias(params).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success(res.data.msg);
+ this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
+ }
+ })
+ },
+
+ // 鍒犻櫎妯″潡涓嬪叧鑱旂殑鎿嶄綔绫诲瀷
+ deleteOperationClickHandler() {
+ console.log(this.form);
+ const params = {
+ funcId: this.form.funcId,
+ operId: this.form.operId
+ }
+ delFuncOperation(params).then(res => {
+ console.log(res);
+ if (res.data.code === 200) {
+ this.$message.success(res.data.msg);
+ this.resetFormValue();
+ }
+ })
+ },
+
+ // 瀵煎嚭
+ exportClickHandler() {
+ this.createdLoading = true;
+ exportModule().then(res => {
+ func.downloadFileByBlobHandler(res);
+ this.createdLoading = false
+ this.$message.success('瀵煎嚭鎴愬姛');
+ }).catch(err => {
+ this.$message.error(err);
+ })
+ },
+
+ // 瀵煎叆
+ upLoadClickHandler() {
+ this.$refs.upload.visible = true;
+ }
}
}
</script>
diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue
index 281ec3b..cea9234 100644
--- a/Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue
@@ -3,7 +3,7 @@
<el-aside>
<basic-container>
<div style="max-height: calc(100vh - 170px);overflow: auto">
- <avue-tree ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick">
+ <avue-tree :key="refresh" ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick">
<span slot-scope="{ node, data }" class="el-tree-node__label">
<span style="font-size: 15px">
<i class="el-icon-s-promotion"></i>
@@ -27,28 +27,31 @@
<el-form-item label="鍒悕锛�">
<el-input v-model="form.alias" placeholder="璇疯緭鍏ュ埆鍚�"></el-input>
</el-form-item>
- <el-form-item label="缂栧彿锛�">
- <el-input v-model="form.sort" placeholder="璇疯緭鍏ョ紪鍙�"></el-input>
+ <el-form-item label="椤哄簭锛�">
+ <el-input-number v-model="form.sort" :min="0" :max="9999" label="椤哄簭"></el-input-number>
</el-form-item>
<el-form-item label="鎻忚堪锛�">
<el-input v-model="form.remark" placeholder="璇疯緭鍏ユ弿杩�"></el-input>
</el-form-item>
</el-form>
- <div class="btnBox">
- <el-button v-if="!addStatus" :disabled="mangeShowBtn ? false : !childTypeBtn" icon="el-icon-plus" plain
+ <div v-if="nodeRow.childType === 0 || nodeRow.childType === -1" class="btnBox">
+ <el-button v-if="!addStatus" :disabled="nodeRow.childType === 0" icon="el-icon-plus" plain
size="small"
type="primary" @click="addClickHandler">澧炲姞
</el-button>
<el-button v-if="addStatus" icon="el-icon-check" plain size="small"
type="success" @click="addSaveClickHandler">淇濆瓨
</el-button>
- <el-button :disabled="mangeShowBtn" icon="el-icon-edit" plain size="small" type="primary"
- @click="addClickHandler">淇敼
+ <el-button v-if="!editStatus" :disabled="nodeRow.childType === -1" icon="el-icon-edit" plain size="small" type="primary"
+ @click="editClickHandler">淇敼
</el-button>
- <el-button :disabled="mangeShowBtn" icon="el-icon-close" plain size="small" type="danger"
- @click="addClickHandler">鍒犻櫎
+ <el-button v-if="editStatus" icon="el-icon-check" plain size="small"
+ type="success" @click="editSaveClickHandler">淇濆瓨
</el-button>
- <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆sql
+ <el-button :disabled="nodeRow.childType === -1" icon="el-icon-close" plain size="small" type="danger"
+ @click="delClickHandler">鍒犻櫎
+ </el-button>
+ <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="sqlClickExportClick">瀵煎嚭sql
</el-button>
</div>
</basic-container>
@@ -58,12 +61,16 @@
<script>
//绠$悊鍔熻兘妯″潡
-import {getSysModelTreeMenuByPID, addModel} from "@/api/systemModel/mangeModel/api"
+import {exportFunctionSql, getSysModelTreeMenuByPID} from "@/api/systemModel/mangeModel/api"
+import {addOperationType,updateOperationType,delOperationType} from "@/api/systemModel/operateType/api"
+import func from "@/util/func";
export default {
name: "index",
data() {
return {
+ refresh:Math.random(),
+ editStatus:false,
addStatus: false,
nodeRow: {},
form: {},
@@ -82,7 +89,7 @@
treeLoad: (node, resolve) => {
const params = {
parentId: node.level === 0 ? "operateNode" : node.data.id,
- modeType: node.level === 0 ? "firstNode" : node.data.modeType,
+ modeType: node.level === 0 ? 'firstNode' : "",
}
getSysModelTreeMenuByPID(params).then(res => {
resolve(res.data.data.map(item => {
@@ -101,21 +108,6 @@
created() {
},
computed: {
- /**
- * childType
- * 涓�-1 鍏ㄩ儴鎸夐挳灞曠ず 绂佺敤淇敼 鍒犻櫎 澧炲姞鎿嶄綔绫诲瀷
- * 涓嶄负-1 闅愯棌 鍒犻櫎闈炵郴缁熸ā鍧� 鍒犻櫎涓氬姟妯″潡
- * 涓�1鏃� 绂佺敤鎿嶄綔绫诲瀷銆佸鍏ャ�佸鍑�
- * 涓�2鏃� 绂佺敤澧炲姞 瀵煎叆 瀵煎嚭
- * mangeShowBtn 涓� true 璇存槑鏄《灞傝妭鐐� 鍏ㄩ儴鎸夐挳灞曠ず 绂佺敤淇敼 鍒犻櫎 澧炲姞鎿嶄綔绫诲瀷
- * @returns {Number}
- */
- mangeShowBtn() {
- return this.form.childType === -1;
- },
- childTypeBtn() {
- return this.form.childType === 1;
- }
},
methods: {
// 鏍戣鐐瑰嚮
@@ -124,53 +116,156 @@
this.form = {...row};
this.nodeRow = {...row};
this.addStatus = false;
+ this.editStatus = false;
},
+ // 娓呯┖琛ㄥ崟缁戝畾鍊�
+ resetFormValue() {
+ this.form = {};
+ this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
+ },
+
// 鏂板鎸夐挳
addClickHandler() {
- for (const key in this.form) {
- if (this.form.hasOwnProperty(key)) {
- this.form[key] = null;
- }
- }
+ this.form = {};
this.addStatus = true;
+ this.editStatus = false;
},
// 淇濆瓨鎸夐挳
addSaveClickHandler() {
- console.log(this.form)
if (!this.form.name) {
- this.$message.error('妯″潡鍚嶄笉鑳戒负绌�');
+ this.$message.error('鍚嶇О涓嶈兘涓虹┖');
+ return
+ }
+ if (!this.form.code) {
+ this.$message.error('鏍囪瘑涓嶈兘涓虹┖');
+ return
+ }
+ if (!this.form.alias) {
+ this.$message.error('鍒悕涓嶈兘涓虹┖');
+ return
+ }
+ if (!this.form.sort) {
+ this.$message.error('椤哄簭涓嶈兘涓虹┖');
return
}
if (this.form.name.length > 128) {
- this.$message.error('妯″潡鍚嶉暱搴﹁秴杩�128锛�');
+ this.$message.error('鍚嶇О闀垮害涓嶈兘瓒呰繃128锛�');
return
}
if (this.form.remark && this.form.remark.length > 255) {
- this.$message.error('鎻忚堪闀垮害瓒呰繃255锛�');
+ this.$message.error('鎻忚堪闀垮害涓嶈兘瓒呰繃255锛�');
return
}
- if (this.form.resourceDotNet && this.form.resourceDotNet.length > 255) {
- this.$message.error('.NET鏍囪瘑闀垮害涓嶈兘255锛�');
+ if (this.form.alias && this.form.alias.length > 255) {
+ this.$message.error('鍒悕闀垮害涓嶈兘瓒呰繃255锛�');
return
}
- if (this.form.pathc && this.form.pathc.length > 255) {
- this.$message.error('C/S鏍囪瘑闀垮害涓嶈兘255锛�');
- return
- }
- if (this.form.resourceMobile && this.form.resourceMobile.length > 255) {
- this.$message.error('Mobile鏍囪瘑闀垮害涓嶈兘255锛�');
- return
- }
- console.log(this.nodeRow);
this.form.parentId = this.nodeRow.id;
- this.form.modeType = this.nodeRow.modeType;
- addModel(this.form).then(res => {
- console.log(res)
- this.addStatus = false;
+ const params = {
+ name:this.form.name,
+ identify:this.form.code,
+ alias:this.form.alias,
+ desc:this.form.remark,
+ seq:this.form.sort
+ }
+ addOperationType(params).then(res => {
+ if(res.data.code === 200){
+ this.$message.success(res.data.msg);
+ this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
+ this.addStatus = false;
+ }
})
- }
+ },
+
+ // 淇敼鎸夐挳
+ editClickHandler(){
+ this.addStatus = false;
+ this.editStatus = true;
+ },
+
+ // 淇敼淇濆瓨
+ editSaveClickHandler(){
+ console.log(this.form);
+ if (!this.form.name) {
+ this.$message.error('鍚嶇О涓嶈兘涓虹┖');
+ return
+ }
+ if (!this.form.code) {
+ this.$message.error('鏍囪瘑涓嶈兘涓虹┖');
+ return
+ }
+ if (!this.form.alias) {
+ this.$message.error('鍒悕涓嶈兘涓虹┖');
+ return
+ }
+ if (!this.form.sort) {
+ this.$message.error('椤哄簭涓嶈兘涓虹┖');
+ return
+ }
+ if (this.form.name.length > 128) {
+ this.$message.error('鍚嶇О闀垮害涓嶈兘瓒呰繃128锛�');
+ return
+ }
+ if (this.form.remark && this.form.remark.length > 255) {
+ this.$message.error('鎻忚堪闀垮害涓嶈兘瓒呰繃255锛�');
+ return
+ }
+ if (this.form.alias && this.form.alias.length > 255) {
+ this.$message.error('鍒悕闀垮害涓嶈兘瓒呰繃255锛�');
+ return
+ };
+ const params = {
+ id:this.form.id,
+ name:this.form.name,
+ identify:this.form.code,
+ alias:this.form.alias,
+ desc:this.form.remark,
+ seq:this.form.sort
+ }
+ updateOperationType(params).then(res => {
+ if(res.data.code === 200){
+ this.$message.success(res.data.msg);
+ this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍�
+ this.editStatus = false;
+ }
+ })
+ },
+
+ // 鍒犻櫎
+ delClickHandler(){
+ this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ delOperationType(this.form).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success(res.data.msg);
+ this.resetFormValue();
+ this.addStatus = false;
+ this.editStatus = false;
+ this.nodeRow = {};
+ }
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
+ },
+
+ // 瀵煎嚭sql
+ sqlClickExportClick() {
+ exportFunctionSql({isFunction: false}).then(res => {
+ func.downloadFileByBlobHandler(res);
+ this.$message.success('瀵煎嚭鎴愬姛');
+ }).catch(err => {
+ this.$message.error(err);
+ });
+ },
}
}
</script>
diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue
index 54b19c1..5a5c1e1 100644
--- a/Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue
@@ -1,10 +1,441 @@
<template>
+ <el-container>
+ <el-aside>
+ <basic-container>
+ <div style="max-height: calc(100vh - 170px);overflow: auto">
+ <avue-tree :key="refresh" ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick">
+ <span slot-scope="{ node, data }" class="el-tree-node__label">
+ <span style="font-size: 15px">
+ <i class="el-icon-s-promotion"></i>
+ {{ (node || {}).label }}
+ </span>
+ </span>
+ </avue-tree>
+ </div>
+ </basic-container>
+ </el-aside>
+ <el-main>
+ <basic-container>
+ <avue-crud
+ ref="crud"
+ :data="configData"
+ :option="nodeRow.id === 'firstNode'? firstOption : configOption"
+ :table-loading="configLoading"
+ @selection-change="selectChange"
+ @row-click="rowClickHandler">
+ <template slot="menuLeft">
+ <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">澧炲姞
+ </el-button>
+ <el-button icon="el-icon-close" plain size="small" type="danger" @click="delClickHandler">鍒犻櫎
+ </el-button>
+ <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭
+ </el-button>
+ </template>
+
+ <template #menu="{row,index,size}">
+ <el-button icon="el-icon-edit" size="small" type="text" @click.stop="rowEditHandler(row,index)">缂栬緫
+ </el-button>
+ <el-button icon="el-icon-delete" size="small" type="text" @click.stop="rowDeleteHandler(row)">鍒犻櫎</el-button>
+ </template>
+ </avue-crud>
+ </basic-container>
+ </el-main>
+ <el-dialog
+ v-dialogDrag
+ :title="nodeRow.id === 'firstNode' ? '閰嶇疆椤瑰垎绫�' : '閰嶇疆椤�'"
+ :visible.sync="addVisible"
+ append-to-body="true"
+ class="avue-dialog"
+ width="50%"
+ @close="addVisibleClose">
+ <el-form ref="form" :model="form" label-width="80px">
+ <el-form-item label="鍚嶇О锛�">
+ <el-input v-model="form.name"></el-input>
+ </el-form-item>
+ <el-form-item v-if="nodeRow.id !== 'firstNode'" label="key锛�">
+ <el-input v-model="form.key"></el-input>
+ </el-form-item>
+ <el-form-item v-if="nodeRow.id !== 'firstNode'" label="value锛�">
+ <el-input v-model="form.value"></el-input>
+ </el-form-item>
+ <el-form-item label="鎻忚堪锛�">
+ <el-input v-model="form.desc" type="textarea"></el-input>
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button size="small" @click="addVisibleClose">鍙� 娑�</el-button>
+ <el-button size="small" type="primary" @click="addSaveClickHandler">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+
+ <!-- 瀵煎嚭绌挎妗� -->
+ <transfer ref="transfer" :left-role-data="leftRoleData" :right-role-data="rightRoleData"
+ :select-list="selectList" :top-methods-obj="topMethodsObj" :transferTitle="transferTitle" title="瀵煎嚭"
+ @transferSend="exportSendHandler">
+ </transfer>
+ </el-container>
</template>
<script>
+import {
+ getAppConfigCategoryInfo,
+ getAppConfigDetailsByID,
+ addAppConf,
+ updateAppConf,
+ exportSysConf
+} from "@/api/systemModel/systemConfig/api"
+import basicOption from "@/util/basic-option";
+import func from "@/util/func";
+
export default {
- name: "index"
+ name: "index",
+ data() {
+ return {
+ topMethodsObj: {
+ select: true,
+ all: true,
+ page: false
+ },
+ transferTitle: ['鏈�夋嫨', '宸查�夋嫨'],
+ leftRoleData: [],
+ rightRoleData: [],
+ editStatus: false,
+ form: {
+ name: "",
+ desc: ""
+ },
+ addVisible: false,
+ nodeRow: {},
+ configLoading: false,
+ configData: [],
+ configOption: {
+ ...basicOption,
+ addBtn: false,
+ editBtn: false,
+ delBtn: false,
+ column: [
+ {
+ label: '鍚嶇О',
+ prop: 'name',
+ sortable: true
+ },
+ {
+ label: 'key',
+ prop: 'key',
+ sortable: true
+ },
+ {
+ label: 'value',
+ prop: 'value',
+ overHidden: true,
+ sortable: true
+ },
+ {
+ label: '鎻忚堪',
+ overHidden: true,
+ prop: 'desc',
+ }
+ ]
+ },
+ defaultData: [], // 椤跺眰鑺傜偣鏂板鍚庤祴鍊兼暟缁�
+ firstOption: {
+ ...basicOption,
+ addBtn: false,
+ editBtn: false,
+ delBtn: false,
+ column: [
+ {
+ label: '鍚嶇О',
+ prop: 'name',
+ sortable: true
+ },
+ {
+ label: '鎻忚堪',
+ prop: 'desc',
+ }
+ ]
+ },
+ refresh: Math.random(),
+ treeOption: {
+ height: 'auto',
+ menu: false,
+ addBtn: false,
+ defaultExpandAll: true,
+ props: {
+ label: 'name',
+ value: 'id',
+ children: 'children',
+ },
+ },
+ treeData: [
+ {
+ name: '绯荤粺閰嶇疆鍒嗙被',
+ id: 'firstNode',
+ children: []
+ }
+ ],
+ selectList: [],
+ lastIndex: null
+ }
+ },
+ created() {
+ this.getTreeList();
+ },
+ methods: {
+ // 宸︿晶鏍戞煡璇�
+ getTreeList(val) {
+ getAppConfigCategoryInfo().then(res => {
+ if (res.data.code === 200) {
+ const data = res.data.data;
+ this.treeData[0].children = data;
+ if (val === 'save') {
+ this.configData = data;
+ }
+ }
+ })
+ },
+
+ // 鏍戣妭鐐圭偣鍑�
+ nodeClick(row) {
+ console.log(row);
+ this.nodeRow = row;
+ if (row.id === 'firstNode') {
+ this.configData = row.children;
+ } else {
+ this.configLoading = true;
+ getAppConfigDetailsByID({clsId: row.id}).then(res => {
+ if (res.data.code === 200) {
+ const data = res.data.data;
+ this.configData = data;
+ this.configLoading = false;
+ }
+ })
+ }
+ },
+
+ // 澧炲姞鎸夐挳
+ addClickHandler() {
+ if (func.isEmptyObject(this.nodeRow)) {
+ this.$message.error('璇烽�夋嫨涓�鏉¤妭鐐硅繘琛屾坊鍔狅紒')
+ return;
+ }
+ this.addVisible = true;
+ this.editStatus = false;
+ },
+
+ // 鏂板瀵硅瘽妗嗗叧闂�
+ addVisibleClose() {
+ Object.keys(this.form).forEach(key => {
+ this.form[key] = "";
+ })
+ this.addVisible = false;
+ },
+
+ // 淇濆瓨
+ addSaveClickHandler() {
+ if (this.nodeRow.id === 'firstNode') {
+ if (!this.form.name) {
+ this.$message.error('鍚嶇О涓嶈兘涓虹┖锛�');
+ return;
+ }
+ } else {
+ if (!this.form.name) {
+ this.$message.error('鍚嶇О涓嶈兘涓虹┖锛�');
+ return;
+ }
+ if (!this.form.key) {
+ this.$message.error('key鍊间笉鑳戒负绌猴紒');
+ return;
+ }
+ if (!this.form.value) {
+ this.$message.error('value鍊间笉鑳戒负绌猴紒');
+ return;
+ }
+ }
+
+ const params = this.nodeRow.id === 'firstNode' ? {
+ appConfigDetailInfo: {
+ name: this.form.name,
+ desc: this.form.desc,
+ id: this.editStatus ? this.form.id : null
+ },
+ isConfCategorys: true //true琛ㄧず缁欓《灞傛坊鍔犻厤缃」鍒嗙被
+ } : {
+ appConfigDetailInfo: {
+ categoryId: this.nodeRow.id,
+ name: this.form.name,
+ desc: this.form.desc,
+ key: this.form.key,
+ value: this.form.value,
+ id: this.editStatus ? this.form.id : null
+ },
+ isConfCategorys: false //true琛ㄧず缁欓《灞傛坊鍔犻厤缃」鍒嗙被
+ }
+ const saveApi = this.editStatus ? updateAppConf : addAppConf;
+ saveApi(params).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success(res.data.obj);
+ this.addVisibleClose();
+ if (this.nodeRow.id === 'firstNode') {
+ this.getTreeList('save');
+ } else {
+ this.configLoading = true;
+ getAppConfigDetailsByID({clsId: this.nodeRow.id}).then(res => {
+ if (res.data.code === 200) {
+ const data = res.data.data;
+ this.configData = data;
+ this.configLoading = false;
+ }
+ })
+ }
+ }
+ })
+ },
+
+ // 缂栬緫鎸夐挳
+ rowEditHandler(row) {
+ this.addVisible = true;
+ this.form = {...row};
+ this.editStatus = true;
+ },
+
+ // 琛屽垹闄�
+ rowDeleteHandler(row) {
+ const params = {
+ ids: row.id,
+ isConfCategorys: this.nodeRow.id === 'firstNode' ? true : false
+ }
+ getAppConfigCategoryInfo(params).then(res => {
+ console.log(res)
+ if (res.data.code === 200) {
+ this.$message.success('鍒犻櫎鎴愬姛');
+ if (this.nodeRow.id === 'firstNode') {
+ this.getTreeList('save');
+ } else {
+ this.configLoading = true;
+ getAppConfigDetailsByID({clsId: this.nodeRow.id}).then(res => {
+ if (res.data.code === 200) {
+ const data = res.data.data;
+ this.configData = data;
+ this.configLoading = false;
+ }
+ })
+ }
+ }
+ })
+ },
+
+ // 閫夋嫨妗�
+ selectChange(row) {
+ this.selectList = row;
+ },
+
+ // 鐐瑰嚮琛�
+ rowClickHandler(row) {
+ func.rowClickHandler(
+ row,
+ this.$refs.crud,
+ this.lastIndex,
+ (newIndex) => {
+ this.lastIndex = newIndex;
+ },
+ () => {
+ this.selectList = [];
+ }
+ );
+ },
+
+ // 澶氶�夊垹闄�
+ delClickHandler() {
+ if (this.selectList.length <= 0) {
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
+ const params = {
+ ids: this.selectList.map(item => {
+ return item.id
+ }).join(','),
+ isConfCategorys: this.nodeRow.id === 'firstNode' ? true : false
+ }
+ getAppConfigCategoryInfo(params).then(res => {
+ console.log(res)
+ if (res.data.code === 200) {
+ this.$message.success('鍒犻櫎鎴愬姛');
+ if (this.nodeRow.id === 'firstNode') {
+ this.getTreeList('save');
+ } else {
+ this.configLoading = true;
+ getAppConfigDetailsByID({clsId: this.nodeRow.id}).then(res => {
+ if (res.data.code === 200) {
+ const data = res.data.data;
+ this.configData = data;
+ this.configLoading = false;
+ }
+ })
+ }
+ }
+ })
+ },
+
+ // 瀵煎嚭鎸夐挳
+ exportClickHandler() {
+ if (func.isEmptyObject(this.nodeRow)) {
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
+ this.leftRoleData = this.nodeRow.id === 'firstNode' ? [
+ {
+ name: '鍚嶇О',
+ oid: 'name'
+ },
+ {
+ name: '鎻忚堪',
+ oid: 'desc'
+ }
+ ] : [
+ {
+ name: '鍚嶇О',
+ oid: 'name'
+ },
+ {
+ name: 'key',
+ oid: 'key'
+ },
+ {
+ name: 'value',
+ oid: 'value'
+ },
+ {
+ name: '鎻忚堪',
+ oid: 'desc'
+ }
+ ]
+ this.$refs.transfer.visible = true;
+ },
+
+ // 瀵煎嚭淇濆瓨
+ exportSendHandler(row, index) {
+ console.log(row, index);
+ const params = {
+ expType: index === 0 ? 'select' : index === 1 ? 'all' : '',
+ expAttrNames: row,
+ selectDataIdentify: index === 0 ? this.selectList.map(item => {
+ return item.id
+ }) : null,
+ conditionMap: {
+ "isExpAppConfDetail": this.nodeRow.id === 'firstNode' ? false : true,
+ "clsId": this.nodeRow.id !== 'firstNode' ? this.nodeRow.id : null
+ }
+ }
+ exportSysConf(params).then(res => {
+ func.downloadFileByBlobHandler(res);
+ this.$message.success('瀵煎嚭鎴愬姛');
+ }).catch(err => {
+ this.$message.error(err);
+ })
+ }
+ }
}
</script>
diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue
index 54b19c1..24f5dce 100644
--- a/Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue
@@ -1,13 +1,38 @@
<template>
-
+ <basic-container>
+ <div class="container">
+ <el-form ref="form" :model="form" label-width="150px">
+ <el-form-item label="褰撳墠鍦ㄧ嚎鐢ㄦ埛浜烘暟">
+ <div style="display: flex;">
+ <el-input v-model="form.name" :readOnly="true"></el-input>
+ <el-button plain style="margin-left: 10px"> 鍒锋柊</el-button>
+ </div>
+ </el-form-item>
+ </el-form>
+ </div>
+ </basic-container>
</template>
<script>
export default {
- name: "index"
+ name: "index",
+ data() {
+ return {
+ form: {
+ name: '0'
+ }
+ }
+ }
}
</script>
<style scoped>
-
+.container {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 500px;
+ height: 500px;
+ margin: auto;
+}
</style>
--
Gitblit v1.9.3