From 1fa18d4c61c6facb52fe09168dcbf6b46de4aafe Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 28 八月 2024 15:20:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/plt-web/plt-web-ui/src/api/systemModel/mangeModel/api.js | 30 +
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-ui/src/components/PLT-basic-component/transferSelect.vue | 13
Source/plt-web/plt-web-ui/src/api/modeling/businessType/api.js | 19
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/service/OsPortalVIServiceI.java | 7
Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue | 109 +++
Source/plt-web/plt-web-ui/src/api/systemModel/systemConfig/api.js | 50 +
Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue | 199 +++++-
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/enumpck/PortalVITypeFlag.java | 3
Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue | 98 ++
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebPortalVIController.java | 43 +
Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue | 433 +++++++++++++++
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/PortalVIDO.java | 33 +
Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue | 31 +
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PortalVIDTO.java | 29 +
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java | 120 ++++
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PortalVIVO.java | 31 +
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 +++++++++
22 files changed, 1,492 insertions(+), 134 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/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/web/controller/WebPortalVIController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebPortalVIController.java
index b86ab56..e9d431e 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 btmTypeIds 涓氬姟绫诲瀷鐨勭紪鍙凤紝鐢ㄩ�楀彿鍒嗗壊
+ */
+ @PostMapping("/exportExcel")
+ @VciBusinessLog(operateName = "瀵煎嚭琛ㄥ崟/琛ㄦ牸鍒癳xcel涓�")
+ public void exportExcel(String btmTypeIds,HttpServletResponse response){
+ String excelFileName = portalVIServiceI.exportToExcel(VciBaseUtil.str2List(btmTypeIds));
+ 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/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/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/impl/OsPortalVIServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java
index 76e4cc3..486c5bc 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
@@ -8,6 +8,8 @@
import com.vci.dto.*;
import com.vci.model.*;
import com.vci.pagemodel.*;
+import com.vci.starter.poi.bo.WriteExcelData;
+import com.vci.starter.web.enumpck.VciFieldTypeEnum;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseQueryObject;
import com.vci.starter.web.pagemodel.BaseResult;
@@ -29,6 +31,7 @@
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.Function;
import java.util.stream.Collectors;
/*
@@ -218,13 +221,23 @@
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, "鍏嬮殕鍚嶇О涓嶅厑璁镐负绌�");
+ if( PortalVIMap.containsKey(viName)){
+ throw new VciBaseException("鍏嬮殕鍚嶇О"+viName+"宸插瓨鍦紝璇锋牳瀵癸紒");
+ }
PortalVI portalVI = UITools.getService().getPortalVIById(portalVIDTO.getId());
portalVI.id = ObjectUtility.getNewObjectID36();
portalVI.viName = viName;
@@ -235,7 +248,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 +258,94 @@
return true;
}
+ @Override
+ public String exportToExcel(Collection<String> idList) {
+ /*List<PortalVIVO> portalVIVOList= listByIds(idList);
+ List<WriteExcelData> rowDataList = new ArrayList<>();
+ final int[] index = {0};
+ if(!CollectionUtils.isEmpty(portalVIVOList)) {
+ portalVIVOList.stream().forEach(PortalVIVO -> {
+ //鍏堟槸鍚嶇О
+ int rowIndex = index[0];
+ WriteExcelData idED = new WriteExcelData(rowIndex, 0, btmId);
+ idED.setMerged(true);
+ if (attributeVOS.size() > 0) {
+ idED.setRowTo(rowIndex + attributeVOS.size() - 1 + 3);
+ }
+ rowDataList.add(idED);
+ WriteExcelData nameED = new WriteExcelData(rowIndex, 1, btmTypeVO.getName());
+ nameED.setMerged(true);
+ if (attributeVOS.size() > 0) {
+ nameED.setRowTo(rowIndex + attributeVOS.size() - 1 + 3);
+ }
+ rowDataList.add(nameED);
+
+ rowDataList.add(new WriteExcelData(rowIndex, 2, "id"));
+ rowDataList.add(new WriteExcelData(rowIndex, 3, "缂栧彿"));
+ rowDataList.add(new WriteExcelData(rowIndex, 4, "瀛楃涓�"));
+ rowDataList.add(new WriteExcelData(rowIndex, 5, "鏄�"));
+ rowDataList.add(new WriteExcelData(rowIndex, 6, "50"));
+ rowIndex++;
+ rowDataList.add(new WriteExcelData(rowIndex, 2, "name"));
+ rowDataList.add(new WriteExcelData(rowIndex, 3, "鍚嶇О"));
+ rowDataList.add(new WriteExcelData(rowIndex, 4, "瀛楃涓�"));
+ rowDataList.add(new WriteExcelData(rowIndex, 5, "鏄�"));
+ rowDataList.add(new WriteExcelData(rowIndex, 6, "50"));
+ rowIndex++;
+ rowDataList.add(new WriteExcelData(rowIndex, 2, "description"));
+ rowDataList.add(new WriteExcelData(rowIndex, 3, "鎻忚堪"));
+ rowDataList.add(new WriteExcelData(rowIndex, 4, "瀛楃涓�"));
+ rowDataList.add(new WriteExcelData(rowIndex, 5, "鏄�"));
+ rowDataList.add(new WriteExcelData(rowIndex, 6, "150"));
+ //澶勭悊灞炴��
+ rowIndex++;
+ for (int i = 0; i < attributeVOS.size(); i++) {
+ OsBtmTypeAttributeVO attributeVO = attributeVOS.get(i);
+ //鍏堟槸灞炴�х殑鑻辨枃鍚嶇О
+ rowDataList.add(new WriteExcelData(rowIndex, 2, attributeVO.getId()));
+ //鐒跺悗灞炴�х殑涓枃鍚嶇О
+ rowDataList.add(new WriteExcelData(rowIndex, 3, attributeVO.getName()));
+ //灞炴�х殑绫诲瀷
+ rowDataList.add(new WriteExcelData(rowIndex, 4, VciFieldTypeEnum.getTextByValue(attributeVO.getAttributeDataType())));
+ //鏄惁鍙互涓虹┖
+ rowDataList.add(new WriteExcelData(rowIndex, 5, attributeVO.isNullableFlag() ? "鏄�" : "鍚�"));
+ //灞炴�ч暱搴�
+ String length = attributeVO.getAttributeLength()==null?"":attributeVO.getAttributeLength() + "" ;
+ if (attributeVO.getPrecisionLength() != null) {
+ length = length + "(" + attributeVO.getPrecisionLength() + "," + attributeVO.getScaleLength() == null ? "2" : (attributeVO.getScaleLength() + "") + ")" ;
+ }
+ rowDataList.add(new WriteExcelData(rowIndex, 6, length));
+ //澶囨敞
+ rowDataList.add(new WriteExcelData(rowIndex, 7, attributeVO.getDescription() == null ? "" : attributeVO.getDescription()));
+ rowIndex++;
+ }
+
+ index[0] = rowIndex;
+ });
+ }
+*/
+
+ return null;
+ }
+
+ public List<PortalVIVO> listByIds(Collection idList){
+ List<PortalVIVO> 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= portalVIDOO2VOS(portalVIList);
+ return portalVIVOList;
+ }
private BaseResult savePortalVIDTO(PortalVIDTO portalVIDTO,boolean isEdit) {
boolean _isBtm=false;
@@ -486,10 +587,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 +846,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);//鎼滅储瀛楁
}
@@ -772,7 +882,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,7 +915,7 @@
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();
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/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