From b9f3e4a899013ce21de3fc1ac127d137c7494595 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 02 九月 2024 15:21:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/po/PortalVIPO.java                       |   88 +
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue                                 |  228 ++
 Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue                               |   20 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsAttributeServiceI.java         |   19 
 Source/plt-web/plt-web-ui/src/components/refer/vciWebReferTree.vue                                       |    2 
 Source/plt-web/plt-web-ui/src/components/refer/BasicClassifyRefer.vue                                    |    2 
 Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/po/QTDPO.java                            |   46 
 Source/plt-web/plt-web-ui/src/api/UI/formDefine/api.js                                                   |   14 
 Source/plt-web/plt-web-ui/src/components/refer/vciWebRefer.vue                                           |    6 
 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue                     |    2 
 Source/plt-web/plt-web-parent/plt-poi/src/main/java/com/vci/starter/poi/util/ExcelUtil.java              |    1 
 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/components/refer/orgUserRefer.vue                                          |   12 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsPortalVIServiceImpl.java  |  437 +++++-
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java          |    9 
 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue         |  149 ++
 Source/plt-web/plt-web-ui/src/components/refer/vciWebReferDefalut.vue                                    |    8 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsAttributeServiceImpl.java |  151 ++
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue                         |    6 
 Source/plt-web/plt-web-ui/src/components/refer/vciWebReferClassify.vue                                   |   46 
 Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/pagemodel/Tree.java         |   41 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/ActionEnum.java                  |  132 +
 Source/plt-web/plt-web-ui/src/api/queryTemplate/linkTypeQuery.js                                         |   20 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsPortalVIServiceI.java          |    9 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java    |  563 ++++++++
 Source/plt-web/plt-web-ui/src/components/refer/vciWebReferTable.vue                                      |    8 
 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/refer/orgDeptRefer.vue                                          |    2 
 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue                   |  160 +-
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebPortalVIController.java    |   39 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsActionServiceI.java            |   34 
 /dev/null                                                                                                |    0 
 Source/plt-web/plt-web-ui/src/App.vue                                                                    |    7 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java     |   24 
 Source/plt-web/plt-web-ui/src/api/queryTemplate/queryDefine.js                                           |   14 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/PlTypetypeEnum.java              |  128 +
 Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js                                               |    8 
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue                 |  603 ++++++++
 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue              |  536 +++++++
 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/controller/OsAttributeController.java    |   24 
 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/OsLinkTypeServiceImpl.java  |   26 
 43 files changed, 3,872 insertions(+), 257 deletions(-)

diff --git a/Bin/jre/lib/security/trusted.libraries b/Bin/jre/lib/security/trusted.libraries
deleted file mode 100644
index e69de29..0000000
--- a/Bin/jre/lib/security/trusted.libraries
+++ /dev/null
diff --git a/Source/plt-web/plt-web-parent/plt-poi/src/main/java/com/vci/starter/poi/util/ExcelUtil.java b/Source/plt-web/plt-web-parent/plt-poi/src/main/java/com/vci/starter/poi/util/ExcelUtil.java
index 2ed445e..a5d5e0e 100644
--- a/Source/plt-web/plt-web-parent/plt-poi/src/main/java/com/vci/starter/poi/util/ExcelUtil.java
+++ b/Source/plt-web/plt-web-parent/plt-poi/src/main/java/com/vci/starter/poi/util/ExcelUtil.java
@@ -997,6 +997,7 @@
 		try {
 			for (int sheetIndex = 0; sheetIndex < workbook.getNumberOfSheets(); sheetIndex++) {
 				Sheet sheet = workbook.getSheetAt(sheetIndex);
+				String sheetName=sheet.getSheetName();
 				if(StringUtils.isNotBlank(excelOption.getSheetName())){
 					if(!sheet.getSheetName().equalsIgnoreCase(excelOption.getSheetName())){
 						continue;
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/po/PortalVIPO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/po/PortalVIPO.java
new file mode 100644
index 0000000..3e077ef
--- /dev/null
+++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/po/PortalVIPO.java
@@ -0,0 +1,88 @@
+package com.vci.po;
+
+import com.vci.starter.poi.annotation.ExcelColumn;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 琛ㄥ崟/琛ㄦ牸瀵煎叆杞崲瀵硅薄
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class PortalVIPO implements java.io.Serializable {
+
+    private static final long serialVersionUID = -4958371880356252841L;
+
+    /**
+     * 鎵�鍦ㄦ暟鎹
+     */
+    @ExcelColumn(rowIndexColumn = true,value = "")
+    private String rowIndex;
+
+    /**
+     * 涓氬姟绫诲瀷鍚嶇О
+     */
+    @ExcelColumn(value="涓氬姟绫诲瀷鍚嶇О",nullable = false)
+    private String typeName;
+
+    /**
+     * 鍚嶇О
+     */
+    @ExcelColumn(value="鍚嶇О",nullable = false)
+    private String viName;
+
+    /**
+     *涓氬姟绫诲瀷
+     */
+    private short typeFlag;
+    /**
+     * 涓氬姟绫诲瀷
+     */
+    @ExcelColumn(value="涓氬姟绫诲瀷",nullable = false)
+    private String typeFlagText;
+
+    /***
+     * 琛ㄥ崟绫诲瀷
+     */
+    private short viType;
+    /***
+     * 琛ㄥ崟绫诲瀷
+     */
+    @ExcelColumn(value="琛ㄥ崟绫诲瀷",nullable = false)
+    private String viTypeText;
+    /***
+     * 閰嶇疆淇℃伅
+     */
+    private String prm;
+    /**
+     * 閰嶇疆鏂囨湰
+     */
+    @ExcelColumn(value="閰嶇疆鏂囨湰")
+    private String prmFileName;
+    /***
+     * 灞炴��
+     */
+    @ExcelColumn(value="灞炴��" ,nullable = false)
+    private String attributeKey;
+    /***
+     * 鏌ヨ妯℃澘鍚嶇О
+     */
+    @ExcelColumn(value="鏌ヨ妯℃澘鍚嶇О" )
+    private String qtName;
+
+    /***
+     * 鏌ヨ妯℃澘閰嶇疆鏂囨湰
+     */
+    @ExcelColumn(value="鏌ヨ妯℃澘閰嶇疆鏂囨湰" )
+    private String qtNameFile;
+    /***
+     * 鏌ヨ妯℃澘涓氬姟绫诲瀷
+     */
+    @ExcelColumn(value="鏌ヨ妯℃澘涓氬姟绫诲瀷" )
+    private String qtNameType;
+
+
+
+}
diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/po/QTDPO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/po/QTDPO.java
new file mode 100644
index 0000000..5b42103
--- /dev/null
+++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/po/QTDPO.java
@@ -0,0 +1,46 @@
+package com.vci.po;
+
+import com.vci.starter.poi.annotation.ExcelColumn;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 琛ㄥ崟/琛ㄦ牸瀵煎叆杞崲瀵硅薄
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class QTDPO implements java.io.Serializable {
+
+    private static final long serialVersionUID = 8774827411052362064L;
+    /**
+     * 鎵�鍦ㄦ暟鎹
+     */
+    @ExcelColumn(rowIndexColumn = true,value = "")
+    private String rowIndex;
+
+    /**
+     * 涓氬姟绫诲瀷鍚嶇О
+     */
+    @ExcelColumn(value="涓氬姟绫诲瀷鍚嶇О")
+    private String typeName;
+    /**
+     * 閾炬帴绫诲瀷鍚嶇О
+     */
+    @ExcelColumn(value="閾炬帴绫诲瀷鍚嶇О")
+    private String linkType;
+
+    /**
+     *鏌ヨ妯℃澘瀹氫箟鍚嶇О
+     */
+    @ExcelColumn(value="鏌ヨ妯℃澘瀹氫箟鍚嶇О" )
+    private String QtdName;
+
+    /***
+     * 灞炴��
+     */
+    @ExcelColumn(value="灞炴��" )
+    private String attributeKey;
+
+}
diff --git a/Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/pagemodel/Tree.java b/Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/pagemodel/Tree.java
index 53a3ae6..809dc3b 100644
--- a/Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/pagemodel/Tree.java
+++ b/Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/pagemodel/Tree.java
@@ -36,7 +36,19 @@
 		setOid(oid);
 		setText(text);
 	}
-	
+
+	/**
+	 * 鏋勯�犲嚱鏁�
+	 * @param oid 涓婚敭
+	 * @param text 鏍戣妭鐐规枃鏈�
+	 */
+	public Tree(String oid, String text,Object o){
+		setOid(oid);
+		setText(text);
+		setData(o);
+	}
+
+
 	/**
 	 * 涓婚敭
 	 */
@@ -63,6 +75,10 @@
 	 * 瀛愯妭鐐�
 	 */
 	private List<Tree> children = new ArrayList<Tree>();
+	/**
+	 * 灞傜骇
+	 */
+	private  int level;
 	/**
 	 * 鍥炬爣
 	 */
@@ -99,6 +115,10 @@
 	 * 鎺掑簭绱㈠紩
 	 */
 	private String index;//鎺掑簭绱㈠紩
+	/***
+	 * 褰撳墠鏁版嵁瀵硅薄
+	 */
+	private Object data;
 	
 	/**
 	 * 鍏朵粬鐨勫睘鎬�
@@ -383,6 +403,23 @@
 		}
 	}
 
+
+	public Object getData() {
+		return data;
+	}
+
+	public void setData(Object data) {
+		this.data = data;
+	}
+
+	public int getLevel() {
+		return level;
+	}
+
+	public void setLevel(int level) {
+		this.level = level;
+	}
+
 	@Override
 	public String toString() {
 		return "Tree{" +
@@ -392,6 +429,7 @@
 				", showCheckbox=" + showCheckbox +
 				", checked=" + checked +
 				", children=" + children +
+				", level=" + level +
 				", icon='" + icon + '\'' +
 				", iconCls='" + iconCls + '\'' +
 				", parentId='" + parentId + '\'' +
@@ -400,6 +438,7 @@
 				", expanded=" + expanded +
 				", href='" + href + '\'' +
 				", index='" + index + '\'' +
+				", data=" + data +
 				", attributes=" + attributes +
 				'}';
 	}
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/OsAttributeController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsAttributeController.java
index e4a6f13..8b982bd 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsAttributeController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsAttributeController.java
@@ -8,6 +8,8 @@
 import com.vci.starter.web.pagemodel.BaseQueryObject;
 import com.vci.starter.web.pagemodel.BaseResult;
 import com.vci.pagemodel.OsAttributeVO;
+import com.vci.starter.web.pagemodel.Tree;
+import com.vci.starter.web.pagemodel.TreeQueryObject;
 import com.vci.starter.web.util.ControllerUtil;
 import com.vci.starter.web.util.LocalFileUtil;
 import com.vci.starter.web.util.VciBaseUtil;
@@ -46,6 +48,28 @@
      */
     private Logger logger = LoggerFactory.getLogger(getClass());
 
+
+
+    /**
+     * 鑾峰彇鎵�鏈変笟鍔$被鍨嬶紙鏍戝舰缁撴瀯锛�
+     * @return 鏌ヨ缁撴灉
+     */
+    @GetMapping( "/getTreeAttributes")
+    @VciBusinessLog(operateName = "鑾峰彇灞炴�э紙鏍戝舰缁撴瀯锛�")
+    public BaseResult<List<Tree>> getTreeAttributesByBtmName(TreeQueryObject treeQueryObject){
+        try {
+            List<Tree>  trees=   attributeService.getTreeAttributesByBtmName(treeQueryObject);
+            return BaseResult.dataList(trees);
+          //  return BaseResult.tree(trees);
+        }catch (Throwable e) {
+            e.printStackTrace();
+            String exceptionMessage = "鏌ヨ涓氬姟绫诲瀷鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+            logger.error(exceptionMessage);
+            return BaseResult.fail(exceptionMessage);
+        }
+    }
+
+
     /**
      * 灞炴�у垪琛�
      * @param baseQueryObject 鏌ヨ瀵硅薄
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/WebPortalVIController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebPortalVIController.java
index e9d431e..c14d6ed 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
@@ -1,13 +1,12 @@
 package com.vci.web.controller;
 
+import com.vci.constant.FrameWorkLangCodeConstant;
 import com.vci.corba.common.PLException;
 import com.vci.dto.ClonePortalVIDTOList;
 import com.vci.dto.DeletePortalVIDTOList;
-import com.vci.dto.OsBtmTypeDTO;
 import com.vci.dto.PortalVIDTO;
 import com.vci.pagemodel.KeyValue;
 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;
@@ -15,19 +14,19 @@
 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.LocalFileUtil;
 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 org.springframework.web.multipart.MultipartFile;
 import javax.servlet.http.HttpServletResponse;
-import java.io.FileNotFoundException;
+import java.io.File;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 import java.util.List;
@@ -149,12 +148,12 @@
     /**
      * 瀵煎嚭鏁版嵁搴撶殑琛ㄤ俊鎭埌excel
      * @param response 鍝嶅簲瀵硅薄
-     * @param btmTypeIds 涓氬姟绫诲瀷鐨勭紪鍙凤紝鐢ㄩ�楀彿鍒嗗壊
+     * @param ids 涓氬姟绫诲瀷鐨勭紪鍙凤紝鐢ㄩ�楀彿鍒嗗壊
      */
     @PostMapping("/exportExcel")
     @VciBusinessLog(operateName = "瀵煎嚭琛ㄥ崟/琛ㄦ牸鍒癳xcel涓�")
-    public void exportExcel(String btmTypeIds,HttpServletResponse response){
-        String excelFileName = portalVIServiceI.exportToExcel(VciBaseUtil.str2List(btmTypeIds));
+    public void exportExcel(String ids,HttpServletResponse response){
+        String excelFileName = portalVIServiceI.exportToExcel(VciBaseUtil.str2List(ids));
         try {
             ControllerUtil.writeFileToResponse(response,excelFileName);
         } catch (IOException e) {
@@ -165,6 +164,30 @@
             }
         }
     }
+
+    /**
+     * 瀵煎嚭鏁版嵁搴撶殑琛ㄤ俊鎭埌excel
+     * @param file 涓婁紶鐨勬枃浠�
+     */
+    @PostMapping("/importData")
+    @VciBusinessLog(operateName = "瀵煎叆琛ㄥ崟/琛ㄦ牸")
+    public BaseResult importData(MultipartFile file){
+        String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename());
+        File file1 = new File(excelFileName);
+        try {
+            file.transferTo(new File(excelFileName));
+            if (file != null) {
+                return portalVIServiceI.importData(file1);
+            } else {
+                return BaseResult.fail(FrameWorkLangCodeConstant.IMPORT_FAIL, new String[]{"鏃犲鍏ョ殑鏂囦欢"});
+            }
+        }catch (Throwable e) {
+            throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
+        }finally {
+            file1.delete();
+        }
+    }
+
     /**
      * 鑾峰彇灞炴�у瓧娈电被鍨�
      */
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/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..91400a3 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
@@ -3,9 +3,7 @@
 import com.vci.corba.common.PLException;
 import com.vci.corba.omd.atm.AttributeDef;
 import com.vci.dto.OsAttributeDTO;
-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.pagemodel.*;
 import com.vci.pagemodel.OsAttributeVO;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -21,6 +19,12 @@
  */
 public interface OsAttributeServiceI extends OsBaseServiceI{
 
+	/**
+	 * 鑾峰彇鏍戠姸
+	 * @param treeQueryObject
+	 * @return
+	 */
+	List<Tree> getTreeAttributesByBtmName(TreeQueryObject treeQueryObject);
 	/**
 	 * 鑾峰彇榛樿鐨勫睘鎬�
 	 * @return 榛樿鐨勫睘鎬у垪琛�
@@ -178,4 +182,13 @@
 	 */
 	boolean isDefaultAttr(String attr);
 
+	/**
+	 * 鏍规嵁涓氬姟绫诲瀷/閾炬帴绫诲瀷鑾峰彇灞炴�т俊鎭�
+	 * @param btName 涓氬姟绫诲瀷/閾炬帴绫诲瀷
+	 * @param typeFlag 0:涓氬姟绫诲瀷,1:閾炬帴绫诲瀷
+	 * @param isDefault 鏄惁鍖呭惈榛樿灞炴�� true锛氬寘鍚紝false 涓嶅寘鍚�
+	 * @return
+	 */
+	List<OsAttributeVO> getOsAttributeVOSByBtName(String btName,int typeFlag,boolean isDefault)throws Exception;
+
 }
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 223f0d6..abde37b 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
@@ -9,7 +9,10 @@
 import com.vci.starter.web.pagemodel.BaseQueryObject;
 import com.vci.starter.web.pagemodel.BaseResult;
 import com.vci.starter.web.pagemodel.DataGrid;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.io.File;
+import java.io.IOException;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
@@ -82,6 +85,12 @@
     String exportToExcel(Collection<String> idList);
 
     /**
+     * 瀵煎叆琛ㄥ崟/琛ㄦ牸鏁版嵁
+     * @param file 涓婁紶鐨勬枃浠�
+     * @return
+     */
+    public BaseResult importData(File  file)throws Throwable;
+    /**
      *鏌ヨ鎵�鏈夎〃鍗曟垨鑰呰〃鏍�
      * @return key 鏄敓鍛藉懆鏈熺殑缂栧彿鐨勮嫳鏂囧皬鍐�
      * @throws VciBaseException 鏌ヨ鐨勬椂鍊欏嚭閿欎細鎶涘嚭寮傚父
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..ec96cc5 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
@@ -7,14 +7,14 @@
 import com.vci.client.mw.ClientSessionUtility;
 import com.vci.corba.common.PLException;
 import com.vci.corba.omd.atm.AttributeDef;
+import com.vci.corba.omd.ltm.LinkType;
 import com.vci.corba.omd.vrm.VersionRule;
 import com.vci.dto.OsAttributeDTO;
 import com.vci.dto.OsEnumDTO;
 import com.vci.dto.OsEnumItemDTO;
 import com.vci.omd.dataType.VTDataType;
-import com.vci.pagemodel.OsEnumItemVO;
-import com.vci.pagemodel.OsEnumVO;
-import com.vci.pagemodel.OsUsedAttributeVO;
+import com.vci.omd.objects.OtherInfo;
+import com.vci.pagemodel.*;
 import com.vci.po.OsAttributePO;
 import com.vci.po.OsEnumPO;
 import com.vci.starter.poi.bo.ReadExcelOption;
@@ -25,12 +25,10 @@
 import com.vci.starter.web.annotation.log.VciUnLog;
 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;
-import com.vci.starter.web.pagemodel.DataGrid;
+import com.vci.starter.web.pagemodel.*;
 import com.vci.starter.web.util.*;
 import com.vci.model.OsAttributeDO;
-import com.vci.pagemodel.OsAttributeVO;
+import com.vci.web.enumpck.PortalVITypeFlag;
 import com.vci.web.properties.UsedNames;
 import com.vci.web.service.OsAttributeServiceI;
 import com.vci.web.service.OsBaseServiceI;
@@ -135,6 +133,101 @@
 	 * 榛樿灞炴�х殑鏄犲皠锛宬ey鏄皬鍐�
 	 */
 	private static Map<String,OsAttributeVO> defaultAttributeVOMap = new HashMap<>();
+
+	@Override
+	public List<Tree> getTreeAttributesByBtmName(TreeQueryObject treeQueryObject) {
+		List<Tree> rootTreeList=new ArrayList<>();
+
+		Map<String, String> conditionMap = treeQueryObject.getConditionMap();
+		if (conditionMap == null) {
+			conditionMap = new HashMap<>();
+		}
+		String typeName = StringUtils.isBlank(conditionMap.get("typeName")) ? "" : conditionMap.get("typeName");
+		if (StringUtils.isBlank(typeName)) {
+			VciBaseUtil.alertNotNull(typeName,"涓氬姟绫诲瀷鍚嶇О");
+		}
+		try {
+			String typeFlag=StringUtils.isBlank(conditionMap.get("typeFlag"))?"":conditionMap.get("typeFlag");
+			PortalVITypeFlag portalVITypeFlag= PortalVITypeFlag.getByName(typeFlag);
+			Short viTypeFlag=-1;
+			if(portalVITypeFlag!=null){
+				viTypeFlag=portalVITypeFlag.getIntVal();
+			}
+			boolean isDefault =Boolean.parseBoolean(conditionMap.get("isDefault"));
+			Tree tree = new Tree("root", "銆�" + typeName + "銆戝睘鎬т俊鎭�", "root");
+			tree.setLevel(0);
+			rootTreeList.add(tree);
+			getChildTree(rootTreeList,typeName, viTypeFlag,isDefault);
+		}catch (Throwable e){
+		 e.printStackTrace();
+		}
+		return rootTreeList;
+	}
+
+	/**
+	 * 澶熺潃灞炴�ф爲鑺傜偣
+	 * @param parentTreeList
+	 * @param refTypeName
+	 * @param refFlag
+	 * @param isDefault
+	 * @throws Exception
+	 */
+	private void getChildTree(List<Tree> parentTreeList,String refTypeName,int refFlag,boolean isDefault) throws Exception {
+		for (Tree pTree : parentTreeList) {
+			if (pTree.getLevel()>= 3) {
+				continue;
+			}
+			Object o= pTree.getData();
+			String pName=pTree.getText();
+			boolean isOsAttributeVO=false;
+			if(o instanceof OsAttributeVO){
+				isOsAttributeVO=true;
+				OsAttributeVO osAttributeVO=(OsAttributeVO)o;
+				String other = osAttributeVO.getOther();
+				OtherInfo otherInfo = OtherInfo.getOtherInfoByText(other);
+				refFlag = otherInfo.getRefFlag();
+				refTypeName = otherInfo.getRefTypeName();
+			}
+			List<OsAttributeVO> childOsAttributeVOList=new ArrayList<>();
+			if (refFlag != -1) {
+				// pName: 涓哄弬鐓у睘鎬у悕鍔犱笂璺緞
+				childOsAttributeVOList=getOsAttributeVOSByBtName(refTypeName,refFlag,isDefault);
+				if(!CollectionUtils.isEmpty(childOsAttributeVOList)) {
+					List<Tree> childTreeList= new ArrayList<>();
+					boolean finalIsOsAttributeVO = isOsAttributeVO;
+					childOsAttributeVOList.stream().forEach(childOsAttributeVO->{
+						Tree childTree = new Tree(childOsAttributeVO.getOid(), childOsAttributeVO.getId(), childOsAttributeVO);
+						childTree.setOid(childOsAttributeVO.getOid());
+						childTree.setParentName(pTree.getText());
+						childTree.setParentId(pTree.getOid());
+						childTree.setLevel(pTree.getLevel()+1);
+						childTree.setLeaf(true);
+						if(finalIsOsAttributeVO) {
+							childTree.setText(pName + "." + childOsAttributeVO.getId());
+						}else{
+							childTree.setText(childOsAttributeVO.getId());
+						}
+						if (childTree.getLevel()>= 3) {
+							childTree.setLeaf(true);
+						}
+						childTreeList.add(childTree);
+					});
+					if(childTreeList.size()>0){
+						pTree.setChildren(childTreeList);
+						pTree.setExpanded(false);
+						getChildTree(childTreeList,refTypeName,refFlag,isDefault);
+					}else{
+						pTree.setLeaf(true);
+						pTree.setExpanded(true);
+					}
+
+				}
+			}else{
+				pTree.setExpanded(true);
+			}
+		}
+
+	}
 
 	/**
 	 * 鑾峰彇榛樿鐨勫睘鎬�
@@ -1136,6 +1229,50 @@
 	}
 
 	/**
+	 * 鏍规嵁涓氬姟绫诲瀷鑾峰彇灞炴�т俊鎭�
+	 * @param btName 涓氬姟绫诲瀷/閾炬帴绫诲瀷
+	 * @param typeFlag 0:涓氬姟绫诲瀷,1:閾炬帴绫诲瀷
+	 * @return
+	 */
+	@Override
+	public List<OsAttributeVO> getOsAttributeVOSByBtName(String btName, int typeFlag,boolean isDefault) throws Exception{
+		VciBaseUtil.alertNotNull(btName,"鍙傛暟涓嶅厑璁镐负绌�",typeFlag,"鍙傛暟涓嶅厑璁镐负绌�");
+		List<OsAttributeVO> attributeVOS=new ArrayList<>();
+
+		try {
+			List<AttributeDef> attributeDefList=new ArrayList<>();
+			if(typeFlag==0){
+				AttributeDef [] attributeDefs=	platformClientUtil.getBtmService().getAttributeDefs(btName);
+				if(attributeDefs!=null){
+					attributeDefList.addAll(Arrays.stream(attributeDefs).collect(Collectors.toList()));
+				}
+				if(isDefault){
+					AttributeDef [] sysAttributeDefs=platformClientUtil.getBtmService().getSysAttributeDefs();
+					if(sysAttributeDefs!=null){
+						attributeDefList.addAll(Arrays.stream(sysAttributeDefs).collect(Collectors.toList()));
+					}
+				}
+			}else{
+				AttributeDef []	attributeDefs=platformClientUtil.getLinkTypeService().getAttributes(btName);
+				if(attributeDefs!=null){
+					attributeDefList.addAll(Arrays.stream(attributeDefs).collect(Collectors.toList()));
+				}
+				if(isDefault){
+					AttributeDef[] sysAbItems = platformClientUtil.getLinkTypeService().getSysAttributeDefs();
+					if(sysAbItems!=null){
+						attributeDefList.addAll(Arrays.stream(sysAbItems).collect(Collectors.toList()));
+					}
+				}
+			}
+			attributeVOS=attributeDO2VOs(attributeDefList);
+		}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/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 486c5bc..f6ed246 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,26 +1,42 @@
 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.constant.FrameWorkLangCodeConstant;
 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.po.PortalVIPO;
+import com.vci.po.QTDPO;
+import com.vci.starter.poi.bo.ReadExcelOption;
 import com.vci.starter.poi.bo.WriteExcelData;
-import com.vci.starter.web.enumpck.VciFieldTypeEnum;
+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.other.BtmQTExportData;
+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;
@@ -28,9 +44,11 @@
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
+import org.springframework.web.multipart.MultipartFile;
 
+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;
 
@@ -51,13 +69,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() {
 
@@ -105,7 +132,7 @@
                 dataGrid.setData(portalVIVOS);
                 dataGrid.setTotal(pagePortalVIArrayByPageInfoResult.total);
             }else{
-                dataGrid = new DataGrid<>("娌掓湁鏌ヨ鍒版暟鎹�");
+                dataGrid = new DataGrid<>();
             }
         } catch (PLException e) {
             e.printStackTrace();
@@ -134,7 +161,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();
@@ -159,7 +186,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()) {
@@ -235,6 +263,7 @@
                 short typeFlag = clonedestObject.getTypeFlag();
                 if (viName != null) {
                     VciBaseUtil.alertNotNull(viName, "鍏嬮殕鍚嶇О涓嶅厑璁镐负绌�");
+                    //throw new PLException("1001",new String[]{"璇烽�夋嫨瑕佸垹闄ょ殑瀵硅薄锛亇"});
                     if(  PortalVIMap.containsKey(viName)){
                         throw  new VciBaseException("鍏嬮殕鍚嶇О"+viName+"宸插瓨鍦紝璇锋牳瀵癸紒");
                     }
@@ -260,77 +289,336 @@
 
     @Override
     public String exportToExcel(Collection<String> idList) {
-        /*List<PortalVIVO>  portalVIVOList= listByIds(idList);
+        String defaultTempFolder = LocalFileUtil.getDefaultTempFolder();
+        String xfileName="export.xls";
         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);
+        List<WriteExcelData> qtRowDataList = new ArrayList<>();
+        //VciBaseUtil.alertNotNull(idList);
+        List<PortalVIDTO>  portalVIDTOList= listByIds(idList);
+        final int index=0;
 
-                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);
+        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(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(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]++;
+                        });
+
                     }
-                    rowDataList.add(new WriteExcelData(rowIndex, 6, length));
-                    //澶囨敞
-                    rowDataList.add(new WriteExcelData(rowIndex, 7, attributeVO.getDescription() == null ? "" : attributeVO.getDescription()));
-                    rowIndex++;
+                }
+            } 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;
+                    if (portalVIDTO.getViType() == PortalVIType.Table.getIntVal()) {//濡傛灉瀵煎叆鐨則able锛屽垯闇�瑕佹牎楠岃〃鏍煎叧鑱旂殑琛ㄥ崟鏄惁瀛樺湪锛屽鏋滀笉瀛樺湪鍒欏湪execl涓槸鍚﹀瓨鍦�
+                        PortalVI[] pvs = platformClientUtil.getPortalService().getPortalVIArrayByTypeName(portalVIDTO.getTypeName());
+                        PRMDTO prmdto=   portalVIDTO.getPrm();
+                        List<PRMItemDTO> prmItemDTOS=   prmdto.getPrmItemList();
+                        if (!CollectionUtils.isEmpty(Arrays.asList(pvs))) {
+                            Optional.ofNullable(prmItemDTOS).orElseGet(()->new ArrayList<>()).stream().forEach(prmItemDTO -> {
+                                Arrays.stream(pvs).forEach(pv -> {
+                                    if (prmItemDTO.getItemInObj().equals(pv.typeName + ":" + pv.viName)) {
+                                        prmItemDTO.setItemInObj(pv.id);
+                                    }
+                                });
+
+                            });
+                        }
+                    }
+                    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(),false);
+                    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();
                 }
 
-                index[0] = rowIndex;
+                rowIndex[0]++;
             });
         }
-*/
 
-        return null;
+
+       /* 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();
     }
 
-    public List<PortalVIVO> listByIds(Collection idList){
-        List<PortalVIVO> portalVIVOList=new ArrayList<>();
+    @Override
+    public BaseResult importData(File file)throws Throwable{
+        if (file == null) {
+            return BaseResult.fail(FrameWorkLangCodeConstant.IMPORT_FAIL, new String[]{"鏃犲鍏ョ殑鏂囦欢"});
+        }
+        try {
+            File unzip = ZipUtil.unzip(file);
+            String filePath=unzip.getAbsolutePath() + File.separator + "export.xls";
+            File btmExcel = new File(filePath);
+            List<PortalVIPO> portalVIPOList=new ArrayList<>();
+            List<QTDPO> QTDPOPOList=new ArrayList<>();
+            try {
+                ReadExcelOption PortalVIPOReadExcelOption=new ReadExcelOption();
+                PortalVIPOReadExcelOption.setSheetName("portalvi");
+                PortalVIPOReadExcelOption.setSheetIndex(0);
+                portalVIPOList = ExcelUtil.readDataObjectFromExcel(btmExcel, PortalVIPO.class,PortalVIPOReadExcelOption);
+                //浠巈xecl鑾峰彇鏌ヨ妯℃澘瀹氫箟.
+               /* ReadExcelOption QTDPOReadExcelOption=new ReadExcelOption();
+                QTDPOReadExcelOption.setSheetName("QTD");
+                QTDPOReadExcelOption.setSheetIndex(1);
+                QTDPOPOList = ExcelUtil.readDataObjectFromExcel(btmExcel, QTDPO.class,QTDPOReadExcelOption);*/
+            }catch (VciBaseException e){
+                throw  new Throwable("璇诲彇execl鏁版嵁鍑洪敊锛�"+e.getMessage());
+            }
+            List<PortalVI> portalVIList=new ArrayList<>();
+            if(!CollectionUtils.isEmpty(portalVIPOList)){
+                Map<String,String>formNameMap=new HashMap<>();
+                StringBuffer checkInObj=new StringBuffer();
+                StringBuffer checkPortalVI=new StringBuffer();
+                List<String> sjkExitsList=new ArrayList<>();
+                portalVIPOList.stream().forEach(portalVIPO -> {
+                    PortalVI portalVI=new PortalVI();
+                    String ploid = ObjectUtility.getNewObjectID36();
+                    portalVI.id=ploid;
+                    portalVI.viName=portalVIPO.getViName();
+                    portalVI.typeName=portalVIPO.getTypeName();
+                    portalVI.viType=PortalVIType.getByLabel(portalVIPO.getViTypeText()).getIntVal();
+                    portalVI.typeFlag=PortalVITypeFlag.getByLabel(portalVIPO.getTypeFlagText()).getIntVal();
+                    String fileName= portalVIPO.getPrmFileName();
+                    String prmStr = readLines(filePath+"."+fileName);
+                    try {
+                        PortalVI[] pvs = platformClientUtil.getPortalService().getPortalVIArrayByTypeName(portalVI.typeName);
+                        if (portalVI.viType == PortalVIType.Table.getIntVal()) {//濡傛灉瀵煎叆鐨則able锛屽垯闇�瑕佹牎楠岃〃鏍煎叧鑱旂殑琛ㄥ崟鏄惁瀛樺湪锛屽鏋滀笉瀛樺湪鍒欏湪execl涓槸鍚﹀瓨鍦�
+                            formNameMap.put(portalVI.typeName + ":" + portalVI.viName, ploid);
+                            PRMDO prmObj = UITools.getPRM(prmStr);
+                            List<PRMItemDO> prmItemList = prmObj.getPrmItemList();
+
+                            if (!CollectionUtils.isEmpty(prmItemList)) {
+                                prmItemList.stream().forEach(prmItemDO -> {
+                                    if (!CollectionUtils.isEmpty(Arrays.asList(pvs))) {
+                                        Arrays.stream(pvs).forEach(pv -> {
+                                            if (prmItemDO.getItemInObj().equals(portalVI.typeName + ":" + pv.viName)) {
+                                                prmItemDO.setItemInObj(pv.id);
+                                            }
+                                        });
+                                    } else {
+                                        if (formNameMap.containsKey(prmItemDO.getItemInObj())) {
+                                            prmItemDO.setItemInObj(formNameMap.get(prmItemDO.getItemInObj()));
+                                        } else {
+                                            if (!checkInObj.toString().contains(prmItemDO.getItemInObj())) {
+                                                String[] split = prmItemDO.getItemInObj().split(":");
+                                                checkInObj.append(split[1]).append(",");
+                                            }
+                                        }
+                                    }
+
+                                });
+                            }
+                            prmStr = UITools.getPRMText(prmObj);
+                        }
+                        portalVI.prm = prmStr.trim();
+                        //鏍¢獙琛ㄥ崟鏄惁瀛樺湪
+                        if (!CollectionUtils.isEmpty(Arrays.asList(pvs))) {
+                            Arrays.stream(pvs).forEach(pv -> {
+                                if (pv.viName.equals(portalVI.viName)) {
+                                    checkPortalVI.append(portalVI.viName).append(",");
+                                }
+                            });
+                        }
+                        //鏍¢獙灞炴�ф槸鍚︽纭�
+                        List<OsAttributeVO> osAttributeVOList = osAttributeService.getOsAttributeVOSByBtName(portalVI.typeName, portalVI.typeFlag,false);
+                        if (!CollectionUtils.isEmpty(osAttributeVOList)) {
+                            List<String> filedList = osAttributeVOList.stream().map(OsAttributeVO::getId).collect(Collectors.toList());
+                            List<String> attributeList = VciBaseUtil.str2List(portalVIPO.getAttributeKey());
+                            //鏁版嵁搴撲笉瀛樺湪
+                            List<String> sjkExitsLists = Optional.ofNullable(attributeList).orElseGet(() -> new ArrayList<>()).stream().filter(s -> !attributeList.contains(s)).collect(Collectors.toList());
+                            sjkExitsList.addAll(sjkExitsLists);
+                        }
+                    }catch (Throwable e){
+                        e.printStackTrace();
+                    }
+                    portalVIList.add(portalVI);
+                    if(StringUtils.isNotBlank(portalVIPO.getQtName())&&StringUtils.isNotBlank(portalVIPO.getQtNameFile())) {
+                        QTInfo qt = new QTInfo();
+                        String qtText = readLines(filePath + "." + portalVIPO.getQtNameFile());
+                        qt.qtText=qtText;
+                        qt.qtName = portalVIPO.getQtName();
+                        qt.btmName=portalVIPO.getQtName();
+                        QTInfo qt2 = null;
+                        try {
+                            qt2 = platformClientUtil.getQTDService().getQT(qt.qtName);
+                            if (qt2 == null) {
+                                platformClientUtil.getQTDService().saveQT(qt);
+                            }
+                        } catch (PLException e) {
+                            e.printStackTrace();
+                        }
+
+                    }
+                });
+                if (checkInObj.length() > 0) {
+                    throw  new Throwable( checkInObj.toString() + "琛ㄥ崟涓嶅瓨鍦紒");
+                }
+                if (checkPortalVI.length() > 0) {
+                    throw  new Throwable( checkInObj.toString() + "鍚嶇О宸茬粡瀛樺湪锛�");
+                }
+                if(sjkExitsList.size()>0){
+                    throw  new Throwable( checkInObj.toString() + "灞炴�у湪绫诲瀷涓笉瀛樺湪锛�");
+                }
+                for (PortalVI pvi : portalVIList) {
+                    platformClientUtil.getPortalService().savePortalVI(pvi);
+                }
+            }
+        }catch (Throwable e){
+          //  throw new Throwable("瀵煎叆澶辫触锛�"+e.getMessage());
+           return BaseResult.fail("瀵煎叆澶辫触锛�"+e.getMessage());
+        }
+        return BaseResult.success("瀵煎叆鎴愬姛");
+    }
+    private String readLines(String filePath){
+        StringBuffer sb=new StringBuffer();
+        FileInputStream prmFile=null;
+        try {
+            prmFile = new FileInputStream(filePath);
+            List<String>  prm= IOUtils.readLines(prmFile,"UTF-8");
+            prm.stream().forEach(s -> {
+                sb.append(s);
+            });
+        } catch (IOException e) {
+            IOUtils.closeQuietly(prmFile);
+            e.printStackTrace();
+        }finally {
+            IOUtils.closeQuietly(prmFile);
+        }
+        return sb.toString();
+    }
+    /**
+     * 鎷疯礉鏁版嵁鍒皐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("璇烽�夋嫨闇�瑕佸鍑虹殑鏁版嵁");
         }
@@ -343,7 +631,7 @@
                 e.printStackTrace();
             }
         });
-        portalVIVOList=  portalVIDOO2VOS(portalVIList);
+        portalVIVOList=  portalVIO2DTOS(portalVIList);
         return portalVIVOList;
     }
     private BaseResult savePortalVIDTO(PortalVIDTO portalVIDTO,boolean isEdit)  {
@@ -870,8 +1158,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);//鎼滅储瀛楁
     }
     /**
@@ -915,11 +1207,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-ui/src/App.vue b/Source/plt-web/plt-web-ui/src/App.vue
index 7fc0795..0664619 100644
--- a/Source/plt-web/plt-web-ui/src/App.vue
+++ b/Source/plt-web/plt-web-ui/src/App.vue
@@ -35,8 +35,8 @@
   margin: 50px auto;
 }
 .avue-dialog .el-dialog{
-  top:47%;
-  max-height: calc(100% - 100px);
+  top:50%;
+  max-height: calc(100% - 80px);
   -webkit-transform: translate(-50%, 0);
   transform: translate(-50%, -50%);
   margin-top: 0 !important;
@@ -48,6 +48,9 @@
 .avue-dialog .el-dialog__body .avue-form{
   margin: 0px auto 40px; // 鍗曠嫭缁欏璇濇閲岀殑avue琛ㄥ崟鍔犱笂涓嬭竟璺�
 }
+.dialog-footer{
+  background-color: #ffffff;
+}
 .avue-crud .avue-form {
   margin: 0px auto !important; // 琛ㄦ牸鍐呯殑琛ㄥ崟锛堟瘮濡�:鎼滅储鏍忥級 鍙栨秷涓嬭竟璺�
 }
diff --git a/Source/plt-web/plt-web-ui/src/api/UI/formDefine/api.js b/Source/plt-web/plt-web-ui/src/api/UI/formDefine/api.js
new file mode 100644
index 0000000..6b3b930
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/api/UI/formDefine/api.js
@@ -0,0 +1,14 @@
+import request from '@/router/axios';
+
+// 鍒楄〃鏌ヨ
+export function gridPortalVIDatas(page,limit,params) {
+  return request({
+    url: "/api/portalVIController/gridPortalVIDatas",
+    method: "get",
+    params:{
+      page,
+      limit,
+      ...params
+    }
+  });
+}
diff --git a/Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js b/Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js
index 1621bf1..862ce13 100644
--- a/Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js
+++ b/Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js
@@ -89,3 +89,11 @@
   });
 }
 
+// 閾炬帴绫诲瀷鏌ヨ妯℃澘鎺掑簭璁剧疆瀛楁涓嬫媺锛屽弬鏁發inkType=witoannotatelink&btmType=fileobject&direction=positive
+export function getAllOrderbyAttributeByLink(params) {
+  return request({
+    url: "/api/linkTypeController/getAllOrderbyAttributeByLink",
+    method: "get",
+    params
+  });
+}
diff --git a/Source/plt-web/plt-web-ui/src/api/queryTemplate/linkTypeQuery.js b/Source/plt-web/plt-web-ui/src/api/queryTemplate/linkTypeQuery.js
index 12b013c..6e55884 100644
--- a/Source/plt-web/plt-web-ui/src/api/queryTemplate/linkTypeQuery.js
+++ b/Source/plt-web/plt-web-ui/src/api/queryTemplate/linkTypeQuery.js
@@ -1,10 +1,28 @@
 import request from '@/router/axios';
 //閾炬帴绫诲瀷鏌ヨ妯℃澘
+//鍒楄〃
+export function getObjTypeQTs(btName) {
+  return request({
+    url: "/api/templateController/getObjTypeQTs",
+    method: "get",
+    params:{
+      btName
+    }
+  });
+}
+// 鍒涘缓
+export function linkSave(params) {
+  return request({
+    url: "/api/templateController/linkSave",
+    method: "post",
+    data:params
+  });
+}
 // 鍒犻櫎
 export function deleteLinkTemplate(params) {
   return request({
     url: "/api/templateController/deleteLinkTemplate",
     method: "delete",
-    data:params
+    params:params
   });
 }
diff --git a/Source/plt-web/plt-web-ui/src/api/queryTemplate/queryDefine.js b/Source/plt-web/plt-web-ui/src/api/queryTemplate/queryDefine.js
index 38c5e44..4d9946c 100644
--- a/Source/plt-web/plt-web-ui/src/api/queryTemplate/queryDefine.js
+++ b/Source/plt-web/plt-web-ui/src/api/queryTemplate/queryDefine.js
@@ -11,16 +11,6 @@
   });
 }
 
-export function getObjTypeQTs(params) {
-  return request({
-    url: "/api/templateController/getObjTypeQTs",
-    method: "get",
-    params:{
-      ...params
-    }
-  });
-}
-
 // 淇敼
 export function updateTemplate(params) {
   return request({
@@ -44,7 +34,9 @@
   return request({
     url: "/api/templateController/deleteTemplate",
     method: "delete",
-    data:params
+    params:{
+      ...params
+    }
   });
 }
 
diff --git a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue
index ca5e5b4..7d15766 100644
--- a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue
+++ b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue
@@ -121,6 +121,7 @@
           Object.assign(this.form, this.initValue);
         }
       },
+      deep:true,
       immediate: true,
     },
     formData: {
@@ -184,14 +185,14 @@
     },
     initItem(item){
       const type=this.columnType[item.type] || item.type;
+      item.text=item.text || item.label;
       const col= {
-        ...item,
         label: item.text,
         prop: item.field,
         showProp:item.showField,
         type: type,
         labelWidth: this.labelWidth || (item.text.length >= 6 ? 115 : 90),
-        disabled: !this.isEdit || item.readOnly || this.disabled,
+        disabled: item.readOnly || this.disabled,
         span: item.span
           ? item.span
           : item.type === "textarea"
@@ -206,25 +207,27 @@
         valueFormat: item.dateFormate || "yyyy-MM-dd HH:mm:ss",
         format: item.dateFormate,
         rules: this.isEdit?(type=="select" || type=="refer" || type=="date" || type=="datetime"?[{
-          required: item.required,
+          required: item.required || false,
           message: `璇烽�夋嫨${item.text}!`,
           trigger: "change"
         },{
-          required: item.required,
+          required: item.required|| false,
           message: `璇烽�夋嫨${item.text}!`,
           trigger: "submit"
         }]:[{
-          required: item.required,
+          required: item.required|| false,
           message: `璇疯緭鍏�${item.text}!`,
           trigger: "blur"
         },{
-          required: item.required,
+          required: item.required|| false,
           message: `璇疯緭鍏�${item.text}!`,
           trigger: "submit"
-        }]):[]
+        }]):[],
+        ...item
       };
       if(!this.isEdit){
         col.placeholder=col.label;
+        col.disabled=true;
       }
       if(col.type === 'richText'){
         this.subitemName = col.field;
@@ -340,6 +343,9 @@
     },
     clearValidate(props){
       this.$refs.form.clearValidate(props)
+    },
+    updateDic(prop,data){
+      this.$refs.form.updateDic(prop,data)
     }
   },
 };
diff --git a/Source/plt-web/plt-web-ui/src/components/refer/BasicClassifyRefer.vue b/Source/plt-web/plt-web-ui/src/components/refer/BasicClassifyRefer.vue
index 0071ba0..13c9cb2 100644
--- a/Source/plt-web/plt-web-ui/src/components/refer/BasicClassifyRefer.vue
+++ b/Source/plt-web/plt-web-ui/src/components/refer/BasicClassifyRefer.vue
@@ -47,7 +47,7 @@
       default:'70%'
     }, height: {
       type: String,
-      default:'60%'
+      default:(document.body.clientHeight-400)+'px'
     },
     reloadFormKey: {
       type: String,
diff --git a/Source/plt-web/plt-web-ui/src/components/refer/orgDeptRefer.vue b/Source/plt-web/plt-web-ui/src/components/refer/orgDeptRefer.vue
index 407dbd3..fd70d32 100644
--- a/Source/plt-web/plt-web-ui/src/components/refer/orgDeptRefer.vue
+++ b/Source/plt-web/plt-web-ui/src/components/refer/orgDeptRefer.vue
@@ -66,7 +66,7 @@
       default:'70%'
     }, height: {
       type: String,
-      default:'60%'
+      default:(document.body.clientHeight-400)+'px'
     },
     reloadFormKey: {
       type: String,
diff --git a/Source/plt-web/plt-web-ui/src/components/refer/orgUserRefer.vue b/Source/plt-web/plt-web-ui/src/components/refer/orgUserRefer.vue
index 611d217..8bc2df6 100644
--- a/Source/plt-web/plt-web-ui/src/components/refer/orgUserRefer.vue
+++ b/Source/plt-web/plt-web-ui/src/components/refer/orgUserRefer.vue
@@ -48,7 +48,7 @@
       default:'70%'
     }, height: {
       type: String,
-      default:'60%'
+      default:(document.body.clientHeight-400)+'px'
     },
     reloadFormKey: {
       type: String,
@@ -73,36 +73,32 @@
       rConfig.options.tableConfig={
         cols:[{
           prop: 'code',
-          label: '鐢ㄦ埛鍚�',
+          label: (this.$project.user.code || "璐﹀彿"),
           sortable: true,
-          width: 150,
           search: true
         },{
           prop: 'name',
           label: '濮撳悕',
           sortable: true,
-          width: 150,
           search: true
         },  {
           prop: 'deptIdName',
           label: '鎵�灞為儴闂�',
-          width: 260,
         },  {
           prop: 'sexText',
           label: '鎬у埆',
-          width: 80
         }]
       };
       rConfig.options.classifys=[{
         title:'閮ㄩ棬',
         treeUrl:'/org/deptController/referGrid', //鍒嗙被鐨勮矾寰�
-        queryByClassifyUrl:'/permission/userQueryController/listUserByDeptId',  //'鍒楄〃'
+        queryByClassifyUrl:'/permission/userQueryController/gridUserByDeptIdGet',  //'鍒楄〃'
         queryField:'deptId', //鍒楄〃鏁版嵁涓垎绫荤殑瀛楁
         classifyValueField:'id',  //浠庢爲涓婅幏鍙栫殑瀛楁
       },{
         title:'瑙掕壊',
         treeUrl:'/permission/roleController/referGrid', //鍒嗙被鐨勮矾寰�
-        queryByClassifyUrl:'/permission/userQueryController/listUserByRoleId',  //'鍒楄〃'
+        queryByClassifyUrl:'/permission/userQueryController/gridUserInRoleIdGet',  //'鍒楄〃'
         queryField:'roleId', //鍒楄〃鏁版嵁涓垎绫荤殑瀛楁
         classifyValueField:'id',  //浠庢爲涓婅幏鍙栫殑瀛楁
       }];
diff --git a/Source/plt-web/plt-web-ui/src/components/refer/vciWebRefer.vue b/Source/plt-web/plt-web-ui/src/components/refer/vciWebRefer.vue
index c07ef45..71b1c3d 100644
--- a/Source/plt-web/plt-web-ui/src/components/refer/vciWebRefer.vue
+++ b/Source/plt-web/plt-web-ui/src/components/refer/vciWebRefer.vue
@@ -178,10 +178,10 @@
   },
   data() {
     return {
-      refertype: this.referConfig.type,
+      refertype: this.referConfig.options.type,
       emitData: {},
-      width:this.referConfig.width || '900px',
-      height:this.referConfig.height || '500px'
+      width:this.referConfig.options.width,
+      height:this.referConfig.options.height
     };
   },
   computed: {
diff --git a/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferClassify.vue b/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferClassify.vue
index 61847dd..aca0056 100644
--- a/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferClassify.vue
+++ b/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferClassify.vue
@@ -3,6 +3,7 @@
   <div>
     <el-dialog
       v-dialogDrag
+      v-dialog-resize
       :title="title"
       :visible.sync="visible"
       :width="onlyTable?'60%': '80%'"
@@ -10,8 +11,8 @@
       class="avue-dialog avue-dialog--top"
       @close="dialogClose"
     >
-      <el-container :style="{ 'height': height || '60vh' }">
-        <el-aside width="300px" v-if="!onlyTable && classifys.length>0">
+      <el-container :style="{ 'height': height }">
+        <el-aside style="width:200px;height:100%" v-if="!onlyTable && classifys.length>0">
           <el-tabs type="border-card" style="height: 100%" @tab-click="tabClick"
                    v-model="tabName">
             <el-tab-pane
@@ -25,6 +26,7 @@
 
               <el-tree
                 class="filter-tree"
+                :style="'height: calc('+height+' - 100px);'"
                 :data="treeItem.treeData"
                 :lazy="lazy"
                 :load="treeLoad"
@@ -37,7 +39,7 @@
             </el-tab-pane>
           </el-tabs>
         </el-aside>
-        <el-main style="padding: 0 0 0 20px">
+        <el-main style="padding: 0 0 0 20px;height:100%">
           <avue-crud
             ref="referCrud"
             v-model="formValue"
@@ -62,9 +64,9 @@
       </el-container>
       <div class="avue-dialog__footer">
         <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }}</div>
-        <el-button @click="escHandler">鍙� 娑�</el-button>
-        <el-button @click="clearValue">娓� 绌�</el-button>
         <el-button type="primary" @click="setValue">纭� 瀹�</el-button>
+        <el-button @click="clearValue">娓� 绌�</el-button>
+        <el-button @click="escHandler">鍙� 娑�</el-button>
       </div>
     </el-dialog>
 
@@ -113,7 +115,7 @@
     },
     height: {
       type: String,
-      default:'500px'
+      default:(document.body.clientHeight-400)+'px'
     },
     reloadFormKey: {
       type: String,
@@ -153,10 +155,11 @@
       lazy: this.referConfig.options.loadType == 'node',
       loadType: { all: "all", node: "node" },
       url: this.referConfig.options.url || "referGrid",
-      query: {},
+      query: {},//鍒楄〃鐨勬悳绱㈡潯浠�
+      where:{},//鍒楄〃鐨勬煡璇㈡潯浠�
       loading: false,
       page: {
-        layout: "sizes,prev,pager,next,jumper,total",
+        layout: "sizes,prev,pager,next,jumper,sizes,total",
         pageSize: 10,
         currentPage: 1,
         total: this.referConfig.options.data
@@ -168,7 +171,6 @@
       option: {
         addBtn: false,
         columnBtn: false,
-        calcHeight: 30,
         tip: false,
         menu: false,
         searchShow: true,
@@ -180,6 +182,7 @@
         reserveSelection: true,
         dialogClickModal: false,
         highlightCurrentRow: true,
+        height:parseInt(this.height)-150,
         rowKey: "id",
         rowParentKey: "parentId",
         column: [],
@@ -273,6 +276,19 @@
     tabClick:function (tab){
       this.currentTreeIndex= tab.index;
       this.filterText=this.classifys[tab.index].filterText;
+      this.option.column.forEach(item => {
+        if (item.hideInClassify) {
+          let queryField = this.classifys[this.currentTreeIndex].queryField;
+          let inClassifyArray = item.hideInClassify.split(",");
+          if (inClassifyArray.find((value => value === queryField))) {
+            item.hide = true;
+            item.showColumn = false;
+          } else {
+            item.hide = false;
+            item.showColumn = true;
+          }
+        }
+      });
     },
     handleFocus() {
       if (!this.disabled) {
@@ -476,13 +492,13 @@
       this.$refs.referCrud.toggleSelection();
     },
     refreshChange() {
-      this.onLoad(this.page, this.query);
+      this.onLoad(this.page);
     },
     onLoad(page, params = {}) {
       if (this.url) {
         this.loading = true;
         getList(
-          Object.assign(params, this.params, this.query),
+          Object.assign(params, this.params,this.where, this.query),
           page.currentPage,
           page.pageSize,
           this.url
@@ -558,13 +574,14 @@
       where[this.classifys[this.currentTreeIndex].queryField] = data.attributes[classifyValueField];
       this.url = this.classifys[this.currentTreeIndex].queryByClassifyUrl || this.options.url;
       this.page.currentPage=1;
-      this.onLoad(this.page, where);
+      this.where = where;
+      this.onLoad(this.page,where);
     },
   },
 };
 </script>
 
-<style scoped>
+<style lang="scss" scoped>
 .valueInfo {
   float: left;
   border: 1px solid #e9e7e7;
@@ -573,4 +590,7 @@
   padding: 6px 15px;
   line-height: 1;
 }
+.filter-tree{
+  overflow-y: auto;
+}
 </style>
diff --git a/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferDefalut.vue b/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferDefalut.vue
index f704b53..973e0fa 100644
--- a/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferDefalut.vue
+++ b/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferDefalut.vue
@@ -1,6 +1,7 @@
 <template>
   <div>
     <el-dialog v-dialogDrag
+               v-dialog-resize
                :title="title"
                :visible.sync="visible"
                :width="width|| '450'"
@@ -74,7 +75,7 @@
     },
     height: {
       type: String,
-      default:'500px'
+      default:(document.body.clientHeight-500)+'px'
     },
     reloadFormKey: {
       type: String,
@@ -99,7 +100,7 @@
       query: {},
       loading: false,
       page: {
-        layout: "sizes,prev,pager,next,jumper,total",
+        layout: "sizes,prev,pager,next,jumper,sizes,total",
         pageSize: 10,
         currentPage: 1,
         total: this.referConfig.options.data ? this.referConfig.options.data.length : 0
@@ -206,13 +207,11 @@
           prop: 'code',
           label: '缂栧彿',
           sortable: true,
-          width: 150,
           search: true
         }, {
           prop: 'name',
           label: '鍚嶇О',
           sortable: true,
-          width: 260,
           search: true
         }, {
           prop: 'description',
@@ -220,7 +219,6 @@
         }, {
           prop: 'secretShow',
           label: '瀵嗙骇',
-          width: 60,
           hide: (!this.controllerSecret)
         }];
       } else {
diff --git a/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferTable.vue b/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferTable.vue
index 4771f2f..b55e6e8 100644
--- a/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferTable.vue
+++ b/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferTable.vue
@@ -1,10 +1,10 @@
 <template>
   <div>
     <el-dialog v-dialogDrag
+               v-dialog-resize
                :title="title"
                :visible.sync="visible"
                :width="width"
-               :style="'height:'+height || 'auto'"
                :append-to-body="true"
                class="avue-dialog avue-dialog--top"
                @close="dialogClose">
@@ -78,7 +78,7 @@
     },
     height: {
       type: String,
-      default:'500px'
+      default:(document.body.clientHeight-500)+'px'
     },
     reloadFormKey: {
       type: String,
@@ -100,10 +100,10 @@
       },
       url: this.referConfig.options.url || 'referGrid',
       method: this.referConfig.options.method || 'get',
-      query: {},
+      query: this.referConfig.options.query || {orderBy: "createTime", orderMethod: "desc"},
       loading: false,
       page: {
-        layout:  "sizes,prev,pager,next,jumper,total",
+        layout:  "sizes,prev,pager,next,jumper,sizes,total",
         pageSize: 10,
         currentPage: 1,
         total: this.referConfig.options.data ? this.referConfig.options.data.length : 0
diff --git a/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferTree.vue b/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferTree.vue
index 365ce65..902c469 100644
--- a/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferTree.vue
+++ b/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferTree.vue
@@ -44,7 +44,7 @@
       default:'70%'
     }, height: {
       type: String,
-      default:'60%'
+      default:(document.body.clientHeight-650)+'px'
     },
     reloadFormKey: {
       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 ef8fede..00c4b4b 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
@@ -34,7 +34,7 @@
           </div>
           <!-- 宸︿晶鏍� -->
           <div style="height:  calc(100vh - 330px);">
-            <avue-tree ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick">
+            <avue-tree ref="tree" v-loading="treeLoading" :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>
@@ -927,6 +927,7 @@
         name: 'el-icon-tickets',
         desc: 'el-icon-chat-line-square'
       },
+      treeLoading:false
     }
   },
   created() {
@@ -937,6 +938,7 @@
   methods: {
     //鏍戣〃鏌ヨ
     getTreeList() {
+      this.treeLoading = true;
       getBizTypes().then(res => {
         const data = res.data.data.map(item => {
           this.processChildren(item); // 澶勭悊姣忎釜鑺傜偣
@@ -944,8 +946,8 @@
           return item.attributes; // 杩斿洖澶勭悊鍚庣殑 attributes
         });
         this.treeData[0].children = data;
-        console.log(this.treeData);
         this.inheritTreeData = data;
+        this.treeLoading = false;
       });
     },
 
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue
new file mode 100644
index 0000000..2b7229c
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue
@@ -0,0 +1,536 @@
+<template>
+  <el-dialog v-dialogDrag
+             :title="dialog.title"
+             :visible.sync="dialog.showDialog"
+             width="1600px"
+             :append-to-body="true"
+             class="avue-dialog"
+             :destroy-on-close="true"
+             :close-on-click-modal="false"
+             @close="cancelDialog">
+    <div style="min-height: 665px;max-height: 85vh;padding-bottom: 50px;">
+      <basic-form key="linkQueryForm" style="margin-bottom: 0"
+                  ref="form"
+                  :span="4"
+                  :formItems="formItems"
+                  :formData="form"
+                  @getFormData="getFormData">
+      </basic-form>
+      <avue-crud  ref="crud" title="璁剧疆鎺掑簭"
+                  :data="orderInfoList" :option="crudOption">
+        <template slot="menuLeft" slot-scope="scope">
+          <el-button icon="el-icon-plus" size="small" type="primary" @click="addRow">鍒涘缓</el-button>
+        </template>
+        <template slot="menu" slot-scope="scope">
+          <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope)">鍒犻櫎
+          </el-button>
+        </template>
+      </avue-crud>
+      <el-dialog v-dialogDrag
+                 title="鍒涘缓"
+                 :visible.sync="crudDialog.showDialog"
+                 width="500px"
+                 :append-to-body="true"
+                 class="avue-dialog"
+                 :destroy-on-close="true"
+                 :close-on-click-modal="false"
+                 @close="crudDialog.showDialog=false">
+        <avue-form ref="tableForm" :option="tableFormOption" v-model="tableForm"></avue-form>
+        <div class="dialog-footer avue-dialog__footer">
+          <el-button type="primary" plain size="small" @click="rowSave" >淇� 瀛�</el-button>
+        </div>
+      </el-dialog>
+      <el-container style="margin-top: 10px;">
+        <el-aside style="width:350px">
+          <fieldset>
+            <legend>&nbsp;閾炬帴绫诲瀷鍊欓�夋潯浠�&nbsp;</legend>
+            <div>
+              鏌ヨ妯℃澘瀹氫箟
+              <avue-select @change="linkQueryDefineChange" class="el-input--small" v-model="linkQueryDefineForm" placeholder="璇烽�夋嫨鍐呭" type="tree" :dic="linkQueryDefineDic" style="width:240px"></avue-select>
+              <avue-tree style="height: 265px" :data="linkTreeData" :option="treeOption"  @node-drag-start="handleDragStart">
+              </avue-tree>
+            </div>
+          </fieldset>
+        </el-aside>
+        <el-main>
+          <fieldset style="margin: 0 10px">
+            <legend>&nbsp;鏌ヨ鏉′欢&nbsp;</legend>
+            <form-query-dialog style="height: 300px;" :queryCondition="queryCondition" :queryTree="queryTree"></form-query-dialog>
+          </fieldset>
+        </el-main>
+        <el-aside style="width:350px">
+          <fieldset>
+            <legend>&nbsp;涓氬姟绫诲瀷鍊欓�夋潯浠�&nbsp;</legend>
+            <div>
+              鏌ヨ妯℃澘瀹氫箟
+              <avue-select @change="businessQueryDefineChange" class="el-input--small" v-model="businessQueryDefineForm" placeholder="璇烽�夋嫨鍐呭" type="tree" :dic="businessQueryDefineDic" style="width: 240px;"></avue-select>
+              <avue-tree style="height: 265px" :data="businessTreeData" :option="treeOption"  @node-drag-start="handleDragStart">
+              </avue-tree>
+            </div>
+          </fieldset>
+        </el-aside>
+      </el-container>
+    </div>
+    <div class="dialog-footer avue-dialog__footer">
+      <el-button type="primary" plain size="small" @click="submitDialog" >淇� 瀛�</el-button>
+      <el-button size="small" @click="cancelDialog">鍙� 娑�</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import {getAllOrderbyAttributeByLink} from "@/api/modeling/linkType/api";
+import {linkSave} from "@/api/queryTemplate/linkTypeQuery";
+import basicOption from "@/util/basic-option";
+import {gridTemplate} from "@/api/queryTemplate/queryDefine";
+import formQueryDialog from "./formQueryDialog.vue";
+export default {
+  name: "formDialog",
+  components:{formQueryDialog},
+  data(){
+    return {
+      dialog: {
+        showDialog: false,
+        title: "鍒涘缓",
+        submitTxt: "淇濆瓨",
+        submitIcon: "el-icon-check",
+        loading: false,
+        type: "add",
+      },
+      crudDialog: {
+        showDialog: false,
+        submitTxt: "淇濆瓨",
+        submitIcon: "el-icon-check",
+      },
+      formItems:[{
+        label: '鏌ヨ妯℃澘鍚嶇О',
+        prop: 'qtName',
+        type: 'input',
+        span:5,
+        rules: [{
+          required: true,
+          message: "璇疯緭鍏ユ煡璇㈡ā鏉垮悕绉�",
+          trigger: "blur"
+        }]
+      },{
+        label: '鏂瑰悜',
+        prop: 'direction',
+        type: 'radio',
+        value:'positive',
+        labelWidth:70,
+        span: 3,
+        dicData: [{
+          label: '姝e悜',
+          value: 'positive'
+        }, {
+          label: '鍙嶅悜',
+          value: 'opposite'
+        }]
+      },{
+        label: '涓氬姟绫诲瀷',
+        prop: 'btmType',
+        type: 'select',
+        labelWidth:110,
+        dicData: []
+      }, {
+        label: '鐗堟湰鐗堟',
+        prop: 'version',
+        type: 'select',
+        span:5,
+        dicData: [{
+          label: '褰撳墠鐗堟湰褰撳墠鐗堟',
+          value: 1
+        }, {
+          label: '褰撳墠鐗堟湰鏈�鏂扮増娆�',
+          value: 2
+        }, {
+          label: '鏈�鏂扮増鏈渶鏂扮増娆�',
+          value: 3
+        }, {
+          label: '宸插彂甯冪殑鏈�鏂扮増鏈�',
+          value: 7
+        }],
+        value: 1
+      },{
+        label: '鏌ヨ鏄惁鏈変笅绾�',
+        prop: 'queryISLeaf',
+        type: 'switch',
+        labelWidth:140,
+        dicData: [ {
+          label: '鍚�',
+          value: false
+        },{
+          label: '鏄�',
+          value: true
+        }],
+        value:false
+      }, {
+        label: '瀛愯妭鐐瑰眰娆℃暟',
+        prop: 'level',
+        type: 'number',
+        span:3,
+        value:1
+      }],
+      form:{
+        btmName:'',
+        qtName: '',
+        queryTemplate:{}
+      },
+      //宸叉湁鎺掑簭鍒楄〃閰嶇疆
+      crudOption: {
+        ...basicOption,
+        addBtn: false,
+        editBtn: false,
+        delBtn: false,
+        selection: false,
+        height: "220",
+        tip: false,
+        column: [{
+          label: '鎺掑簭瀛楁',
+          prop: 'orderField'
+        }, {
+          label: '鎺掑簭鏂瑰紡',
+          prop: 'orderMode'
+        }, {
+          label: '浼樺厛绾�',
+          prop: 'level'
+        }]
+      },
+      //宸叉湁鎺掑簭
+      orderInfoList:[],
+      //璁剧疆鎺掑簭寮圭獥琛ㄥ崟鏁版嵁
+      tableForm:{
+        orderField:'',
+        orderMode:'ASC',
+        level:''
+      },
+      //璁剧疆鎺掑簭寮圭獥鎵�鏈夊彲鎺掑簭瀛楁
+      orderFieldList:[],
+      //璁剧疆鎺掑簭寮圭獥琛ㄥ崟閰嶇疆
+      tableFormOption: {
+        menuBtn: false,
+        submitBtn: false,
+        emptyBtn: false,
+        span:24,
+        column: [{
+          label: '鎺掑簭瀛楁',
+          prop: 'orderField',
+          type:'select',
+          props: {
+            label: 'id',
+            value: 'id'
+          },
+          rules: [{
+            required: true,
+            message: "璇烽�夋嫨鎺掑簭瀛楁",
+            trigger: "blur"
+          }]
+        }, {
+          label: '鎺掑簭鏂瑰紡',
+          prop: 'orderMode',
+          type: 'select',
+          dicData: [{
+            label: '鍗囧簭',
+            value: 'ASC'
+          }, {
+            label: '闄嶅簭',
+            value: 'DESC'
+          }],
+          value: 'ASC'
+        }, {
+          label: '浼樺厛绾�',
+          prop: 'level',
+          type: 'number',
+          min:1,
+          rules: [{
+            required: true,
+            message: "璇疯緭鍏ヤ紭鍏堢骇",
+            trigger: "blur"
+          }]
+        }]
+      },
+      treeOption:{
+        defaultExpandAll:true,
+        menu: false,
+        addBtn: false,
+        filter:false,
+        draggable: true,
+        allowDrop: () => {
+          return false;
+        },
+        allowDrag: () => {
+          return true;
+        },
+      },
+      linkQueryDefineForm:'',//閾炬帴绫诲瀷鏌ヨ妯℃澘瀹氫箟閫変腑鍊�
+      linkQueryDefineDic:[],//閾炬帴绫诲瀷鏌ヨ妯℃澘瀹氫箟涓嬫媺鏁版嵁
+      //閾炬帴绫诲瀷鏌ヨ妯℃澘瀹氫箟閫変腑椤瑰睘鎬�
+      linkTreeData: [],
+      businessQueryDefineForm:'',//涓氬姟绫诲瀷鏌ヨ妯℃澘瀹氫箟閫変腑鍊�
+      businessQueryDefineDic:[],//涓氬姟绫诲瀷鏌ヨ妯℃澘瀹氫箟涓嬫媺鏁版嵁
+      //涓氬姟绫诲瀷鏌ヨ妯℃澘瀹氫箟閫変腑椤瑰睘鎬�
+      businessTreeData: [],
+      //楂樼骇鏌ヨ鏉′欢
+      queryTree:{},
+      //鏅�氭煡璇㈡潯浠�
+      queryCondition:[]
+    };
+  },
+  watch: {
+    //鏂瑰悜
+    'form.direction': {
+      handler(val) {
+        if(val=='positive'){
+          //姝e悜
+          const dicData=this.treeData.btmItemsTo.map(item=>{
+            return {
+              label: item,
+              value: item
+            }
+          })
+          dicData.push({
+            label: '鎵�鏈夌被鍨�',
+            value: '*'
+          })
+          this.$refs.form.updateDic('btmType', dicData);
+          this.form.btmType=dicData[0].value
+          this.getAllAttr();
+        }else if(val=='opposite'){
+          //鍙嶅悜
+          const dicData=this.treeData.btmItemsFrom.map(item=>{
+            return {
+              label: item,
+              value: item
+            }
+          })
+          dicData.push({
+            label: '鎵�鏈夌被鍨�',
+            value: '*'
+          })
+          this.$refs.form.updateDic('btmType', dicData);
+          this.form.btmType=dicData[0].value
+          this.getAllAttr();
+        }
+      },
+      immediate: true,
+    },
+    //涓氬姟绫诲瀷
+    'form.btmType': {
+      handler(val) {
+        if(val && val!='*'){
+          this.getTemp(val,false);
+        }
+      },
+      immediate: true,
+    },
+    'dialog.type': {
+      handler(val) {
+        if(val=='edit'){
+        }
+      },
+      immediate: true,
+    },
+  },
+  methods: {
+    openDialog(btmName, title, mode, data) {
+      this.dialog.title = title;
+      this.dialog.type = mode;
+      this.form.btmName = btmName;
+      this.treeData = data.treeData;
+
+      if (data.selectData) {
+        this.selectData = data.selectData;
+        this.form.qtName = this.selectData.qtName;
+        this.form.direction = this.selectData.queryTemplate.direction;
+        this.form.btmType = this.selectData.queryTemplate.btmType;
+        this.form.version = this.selectData.queryTemplate.version;
+        this.form.queryISLeaf = this.selectData.queryTemplate.queryISLeaf;
+        this.form.level = this.selectData.queryTemplate.level;
+        if (data.selectData.queryTemplate.orderInfoList && data.selectData.queryTemplate.orderInfoList.length > 0) {
+          this.orderInfoList = JSON.parse(JSON.stringify(data.selectData.queryTemplate.orderInfoList));//宸叉湁鎺掑簭
+        }
+        this.queryCondition=this.selectData.queryTemplate.condition;
+        this.queryTree=this.selectData.queryTemplate.tree;
+      } else {
+        this.selectData = {};
+        this.orderInfoList = [];
+        this.queryCondition=[];
+        this.queryTree={};
+      }
+      this.dialog.showDialog = true;
+      this.getTemp(data.treeData.label, true)
+    },
+    cancelDialog() {
+      this.dialog.loading = false;
+      this.dialog.showDialog = false;
+      this.$nextTick(() => {
+        this.form = {
+          btmName: '',
+          qtName: '',
+          queryTemplate: {}
+        };
+        this.orderInfoList =[];
+        this.businessQueryDefineForm='';
+        this.linkQueryDefineForm='';
+        this.$refs.form.clearValidate();
+      });
+    },
+    submitDialog() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          let formData={
+            btmName:this.form.btmName,
+            qtName:this.form.qtName,
+            queryTemplate:{
+              btmType:this.form.btmType,
+              clauseList:['*'],
+              direction:this.form.direction,
+              id:this.form.qtName,
+              level:this.form.level,
+              linkType:this.form.btmName,
+              orderInfoList:this.orderInfoList,
+              queryISLeaf:this.form.queryISLeaf,
+              recReturnMode:1,//閫掑綊杩斿洖鏁版嵁妯″紡:1锛歊ECRETURNMODE_FLAT, 2锛歊ECRETURNMODE_FILTER
+              rightFlag:true,
+              secretFlag:true,
+              type:'link',
+              version:this.form.version
+            }
+          }
+          formData.condition=[]
+          linkSave(formData).then(res => {
+            if (res.data.success) {
+              this.$message.success("淇濆瓨鎴愬姛");
+              this.cancelDialog();
+              this.$emit("refresh");
+            }
+          });
+        } else {
+          return false;
+        }
+      });
+    },
+    getFormData(form) {
+      this.form = form;
+    },
+    addRow() {
+      this.crudDialog.showDialog = true;
+    },
+    // 琛屽垹闄�
+    rowDeleteHandler(data) {
+      this.orderInfoList.splice(data.index,1);
+      this.orderFieldList.unshift({
+        id: data.row.orderField
+      });
+      this.tableFormOption.column[0].dicData= this.orderFieldList
+    },
+    //鑾峰彇鎺掑簭璁剧疆涓墍鏈夋帓搴忓瓧娈�
+    getAllAttr() {
+      getAllOrderbyAttributeByLink({
+        name: this.treeData.label,
+        btmType: this.form.btmType,
+        direction: this.form.direction
+      }).then(res => {
+        const orderInfoStr = JSON.stringify(this.orderInfoList);
+        const dicData = [];
+        res.data.data.forEach(item => {
+          if (orderInfoStr.indexOf('"orderField":"' + item + '"') == -1) {
+            dicData.push({id: item});
+          }
+        })
+        this.tableFormOption.column[0].dicData=dicData;
+        this.orderFieldList=dicData;
+      })
+    },
+    //鎺掑簭璁剧疆淇濆瓨
+    rowSave() {
+      this.$refs.tableForm.validate((valid) => {
+        if(valid){
+          this.orderInfoList.push(JSON.parse(JSON.stringify(this.tableForm)));
+          this.crudDialog.showDialog=false;
+          const orderInfoStr = JSON.stringify(this.orderInfoList);
+          const dicData = [];
+          this.orderFieldList.forEach(item => {
+            if (orderInfoStr.indexOf('"orderField":"' + item.id + '"') == -1) {
+              dicData.push(item);
+            }
+          })
+          this.tableFormOption.column[0].dicData=dicData;
+          this.orderFieldList=dicData;
+          this.tableForm= {
+            orderField: '',
+            orderMode: 'ASC',
+            level: ''
+          }
+        }
+      })
+    },
+    //鑾峰彇鏌ヨ妯℃澘瀹氫箟涓嬫媺
+    getTemp(btmName,linkFlag) {
+      if (btmName) {
+        gridTemplate({btmName: btmName, linkFlag: linkFlag}).then(res => {
+          const data = res.data.data.map(item => {
+            item.label = item.name + '-' + (item.linkTypeName || item.btmName);
+            item.value = item.name;
+            return item;
+          });
+          if(linkFlag){
+            this.linkQueryDefineDic=data
+            data.length>0 && (this.linkQueryDefineForm=data[0].value);
+          }else {
+            this.businessQueryDefineDic=data;
+            data.length>0 && (this.businessQueryDefineForm= data[0].value);
+          }
+        })
+      }
+    },
+    linkQueryDefineChange(data) {
+      if (data.value) {
+        const childData = data.item.abNames.map(item => {
+          return {
+            label: item,
+            value: item
+          };
+        });
+        this.linkTreeData = [{
+          label: data.value,
+          value: data.value,
+          children: childData
+        }]
+      }
+    },
+    businessQueryDefineChange(data) {
+      if (data.value) {
+        const childData = data.item.abNames.map(item => {
+          return {
+            label: item,
+            value: item
+          };
+        });
+        this.businessTreeData = [{
+          label: data.value,
+          value: data.value,
+          children: childData
+        }]
+      }
+    },
+    // 寮�濮嬫嫋鎷芥爲鑺傜偣浜嬩欢
+    handleDragStart(node, ev) {
+      // 浣跨敤 setData 鏂规硶璁剧疆鏁版嵁
+      ev.dataTransfer.setData('item', JSON.stringify(node.data));
+    },
+  },
+}
+</script>
+
+<style scoped>
+fieldset {
+  border-radius: 5px;
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
+  padding: 10px 6px;
+  box-sizing: border-box;
+  margin: 0;
+  border: 1px solid #EBEEF5;
+}
+</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue
new file mode 100644
index 0000000..20164a4
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue
@@ -0,0 +1,149 @@
+<template>
+  <div style="padding: 0 10px">
+    <div style="text-align: center;margin-bottom: 10px">
+      <avue-radio v-model="radioForm"  :dic="radioDic" style="margin: 0 20px 0 0;display: inline-block"></avue-radio>
+      <el-button  plain size="mini" type="primary" @click="clearValue">娓呯┖鍊�</el-button>
+      <el-button  plain size="mini" type="primary" @click="delAll">鍒犻櫎鍏ㄩ儴鏉′欢</el-button>
+    </div>
+    <div v-if="radioForm==0" @drop="drop" @dragover.prevent style="height: 220px;text-align: center;">
+      <div v-for="condition in conditionList" class="el-input--small" style="margin-bottom: 5px;">
+        <span style="width: 150px;display: inline-block;text-align: right" :title="condition.clause">{{condition.clause}}</span>
+        <avue-select v-model="condition.operator" type="tree" :dic="operatorDic" :clearable="false" style="width: 80px;margin: 0 5px;"></avue-select>
+        <avue-input v-model="condition.ordinaryValue" placeholder="" style="width: 300px;margin-right: 5px;"></avue-input>
+        <el-button  plain size="mini" type="primary" @click="delAll">閫夋嫨鏌ヨ妯℃澘</el-button>
+      </div>
+    </div>
+    <div v-else style="height: 220px;text-align: left">
+      <avue-tree style="height: 220px" :data="treeData" :option="treeOption"></avue-tree>
+    </div>
+    <div style="text-align: right;margin-top: 10px;">
+      <el-button v-if="radioForm==1"  plain size="mini" type="primary" @click="addHandler">澧炲姞閫昏緫</el-button>
+      <el-button v-if="radioForm==1"  plain size="mini" type="primary" @click="del">淇敼鏉′欢</el-button>
+      <el-button v-if="radioForm==1"  plain size="mini" type="primary" @click="del">鍒犻櫎</el-button>
+      <el-button  plain size="mini" type="primary" @click="del">鏌ヨ</el-button>
+      <el-button  plain size="mini" type="primary" @click="del">鍙栨秷</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+name: "formQueryDialog",
+  props: {
+    queryCondition: {
+      type: Array,
+      default: []
+    },
+    queryTree: {
+      type: Object,
+      default: {}
+    },
+  },
+  data() {
+    return {
+      radioForm: 0,
+      radioDic: [{
+        label: '鏅��',
+        value: 0
+      }, {
+        label: '楂樼骇',
+        value: 1
+      }],
+      conditionList:this.queryCondition,
+      treeOption:{
+        defaultExpandAll:true,
+        menu: false,
+        addBtn: false,
+        filter:false,
+      },
+      treeData:this.queryTree,
+      //VTInteger銆乂TDouble銆乂TLong
+      operatorIntDic:[{
+        label:'=',
+        value:'='
+      },{
+        label:'!=',
+        value:'!='
+      },{
+        label:'鍖呭惈',
+        value:'鍖呭惈'
+      },{
+        label:'in',
+        value:'in'
+      },{
+        label:'not in',
+        value:'not in'
+      },{
+        label:'>=',
+        value:'>='
+      },{
+        label:'>',
+        value:'>'
+      },{
+        label:'<=',
+        value:'<='
+      },{
+        label:'<',
+        value:'<'
+      }],
+      //VTDateTime銆乂TDate銆乂TTime
+      operatorTimeDic:[{
+        label:'=',
+        value:'='
+      },{
+        label:'!=',
+        value:'!='
+      },{
+        label:'in',
+        value:'in'
+      },{
+        label:'not in',
+        value:'not in'
+      },{
+        label:'>=',
+        value:'>='
+      },{
+        label:'<=',
+        value:'<='
+      }],
+      //鍏跺畠
+      operatorDic:[{
+        label:'=',
+        value:'='
+      },{
+        label:'!=',
+        value:'!='
+      },{
+        label:'鍖呭惈',
+        value:'鍖呭惈'
+      },{
+        label:'in',
+        value:'in'
+      },{
+        label:'not in',
+        value:'not in'
+      }]
+    }
+  },
+  methods:{
+    // 鎷栨嫿鍒版椂
+    drop(event) {
+      // 浣跨敤 getData 鏂规硶鑾峰彇鏁版嵁
+      const data = JSON.parse(event.dataTransfer.getData('item'));
+      const params = {
+        clause: data.value,
+        operator: '=',
+        ordinaryValue: ''
+      }
+      this.conditionList.push(params)
+    }
+  }
+}
+</script>
+
+<style scoped>
+::v-deep .el-input--small .el-input__inner{
+  height: 28px;
+  line-height: 28px;
+}
+</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue
index 5d18cfc..76df4c5 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue
@@ -1,11 +1,10 @@
 <template>
   <el-container>
-
     <el-aside>
       <basic-container>
-        <div ref="TreeBox" style="height: calc(100vh - 154px);!important;">
+        <div ref="TreeBox" style="height: calc(100vh - 164px);!important;">
           <!-- 宸︿晶鏍�         -->
-          <div style="height:  calc(100vh - 190px);">
+          <div style="height:  calc(100vh - 200px);">
             <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
           <span slot-scope="{ node, data }" class="el-tree-node__label">
            <span style="font-size: 15px">
@@ -21,32 +20,33 @@
 
     <el-main>
       <basic-container>
+        <div v-if="this.nodeRow && this.nodeRow.label">
+          <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">鍒涘缓</el-button>
+          <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">淇敼</el-button>
+          <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">鍒犻櫎</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>
+        </div>
         <avue-crud  ref="crud"
+                    @selection-change="selectionChange"
+                    @row-click="rowClick"
                     :data="crudData" :option="crudOption" :table-loading="tableLoading" style="margin-top: 10px">
-          <template slot="menuLeft" slot-scope="scope">
-            <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">鍒涘缓</el-button>
-            <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">淇敼</el-button>
-            <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">鍒犻櫎</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>
-          </template>
         </avue-crud>
+        <form-dialog ref="formRef" @refresh="getTemp"></form-dialog>
       </basic-container>
     </el-main>
-
   </el-container>
 </template>
 
 <script>
 import {gridLink} from "@/api/modeling/linkType/api";
-import { gridTemplate, saveTemplate, updateTemplate} from "@/api/queryTemplate/queryDefine";
-import {deleteLinkTemplate} from "@/api/queryTemplate/linkTypeQuery";
-import func from "@/util/func";
-import {dateFormat} from "@/util/date";
+import {getObjTypeQTs,deleteLinkTemplate} from "@/api/queryTemplate/linkTypeQuery";
 import basicOption from "@/util/basic-option";
+import FormDialog from "./formDialog.vue"
 
 export default {
   name: "index",
+  components: {FormDialog},
   data() {
     return {
       treeOption: {
@@ -90,17 +90,59 @@
         height: "auto",
         calcHeight: -40,
         tip: false,
+        header:false,
         column: [{
           label: '鏌ヨ妯℃澘鍚嶇О',
-          prop: 'name'
+          prop: 'qtName'
         }, {
           label: '鍒涘缓浜�',
           prop: 'creator'
         }, {
           label: '鍒涘缓鏃堕棿',
-          prop: 'createTime',
+          prop: 'createTimeText'
+        }, {
+          label: '鏂瑰悜',
+          prop: 'direction',
           formatter:function (row, value) {
-            return dateFormat(new Date(value))
+            if (row.queryTemplate.direction == 'positive') {
+              return '姝e悜'
+            }else{
+              return '鍙嶅悜'
+            }
+          }
+        }, {
+          label: '涓氬姟绫诲瀷',
+          prop: 'btmType',
+          formatter:function (row, value) {
+            return row.queryTemplate.btmType;
+          }
+        }, {
+          label: '鐗堟湰鐗堟',
+          prop: 'version',
+          formatter:function (row, value) {
+            if(row.queryTemplate.version==1){
+              return '褰撳墠鐗堟湰褰撳墠鐗堟'
+            }else  if(row.queryTemplate.version==2){
+              return '褰撳墠鐗堟湰鏈�鏂扮増娆�'
+            }else if(row.queryTemplate.version==3){
+              return '鏈�鏂扮増鏈渶鏂扮増娆�'
+            }else if(row.queryTemplate.version==7){
+              return '宸插彂甯冪殑鏈�鏂扮増鏈�'
+            }else {
+              return ''
+            }
+          }
+        }, {
+          label: '鏌ヨ鏄惁鏈変笅绾�',
+          prop: 'queryISLeaf',
+          formatter:function (row, value) {
+            return row.queryTemplate.queryISLeaf
+          }
+        }, {
+          label: '瀛愯妭鐐瑰眰娆℃暟',
+          prop: 'level',
+          formatter:function (row, value) {
+            return row.queryTemplate.level;
           }
         }]
       },
@@ -130,72 +172,50 @@
       this.tableLoading = true;
       this.getTemp();
     },
+    //鑾峰彇鏌ヨ妯℃澘鍒楄〃
     getTemp() {
-      gridTemplate({btmName: this.nodeRow.label, linkFlag: true}).then(res => {
+      getObjTypeQTs(this.nodeRow.label).then(res => {
         this.crudData = res.data.data;
         this.tableLoading = false;
+        this.selectionClear();
       })
     },
-    selectHandler(selection, row) {
-
+    rowClick(row) {
+      this.$refs.crud.toggleSelection();
+      this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛�
+      this.selectionRow = [row];
     },
-    changeTemp(data) {
-      this.$refs.queryCrud.clearSelection();
-      if (data.value != '') {
-        let abNames = data.item.abNames.join(',').toLowerCase().split(',')
-
-      }
+    selectionChange(list) {
+      this.selectionRow = list;
+    },
+    selectionClear() {
+      this.selectionRow = [];
+      this.$refs.crud.toggleSelection();
     },
     //鍒涘缓
     addHandler() {
-      if (func.isEmptyObject(this.nodeRow)) {
-        this.$message.error('璇烽�夋嫨瑕佹坊鍔犵殑鑺傜偣');
-        return;
-      }
-      this.title = 'add';
-      this.visible = true;
-      this.$nextTick(() => {
+      this.$refs.formRef.openDialog(this.nodeRow.label,'鍒涘缓','add',{treeData:this.nodeRow});
+      this.$nextTick(()=>{
+        this.$refs.formRef.formItems[0].disabled = false;
+        this.$refs.formRef.$refs.form.getInit(this.$refs.formRef.formItems)
       });
     },
     //淇敼
     editHandler() {
-      if (func.isEmptyObject(this.nodeRow)) {
-        this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+      if (this.selectionRow.length!=1) {
+        this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹�');
         return;
       }
-      this.form.name = this.templateForm;
-      this.title = 'edit';
-      this.visible = true;
-      this.$nextTick(() => {
+      this.$refs.formRef.openDialog(this.nodeRow.label,'淇敼','edit',{treeData:this.nodeRow,selectData:this.selectionRow[0]});
+      this.$nextTick(()=>{
+        debugger;
+        this.$refs.formRef.formItems[0].disabled = true;
+        this.$refs.formRef.$refs.form.getInit(this.$refs.formRef.formItems)
       });
-    },
-    // 鏂板缂栬緫淇濆瓨
-    addDialogSavaHandler() {
-      this.$refs.form.validate((valid) => {
-        const saveFunction = this.title === 'add' ? saveTemplate : updateTemplate;
-        if (valid) {
-          saveFunction(this.form).then(res => {
-            if (res.data.code === 200) {
-              this.$message.success(res.data.obj);
-              this.addDialogClose();
-            }
-          })
-        } else {
-          return false;
-        }
-      });
-    },
-    // 鏂板缂栬緫瀵硅瘽妗嗗彇娑�
-    addDialogClose() {
-      this.form = {
-        name: ''
-      };
-      this.$refs.form.clearValidate();
-      this.visible = false;
     },
     //鍒犻櫎
     delHandler() {
-      if (func.isEmptyObject(this.nodeRow)) {
+      if (this.selectionRow.length==0) {
         this.$message.error('璇烽�夋嫨鏁版嵁');
         return;
       }
@@ -204,13 +224,13 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        deleteLinkTemplate({
-          name: this.templateForm,
-          btmName: this.nodeRow.label,
-          linkFlag: false
-        }).then(res => {
+        let names=this.selectionRow.map(item=>{
+          return item.qtName
+        })
+        deleteLinkTemplate({names:names.join(',')}).then(res => {
           if (res.data.code === 200) {
             this.$message.success(res.data.obj);
+            this.getTemp();
           }
         })
       }).catch(() => {
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue
index 7dd9032..441a5c2 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue
@@ -335,7 +335,7 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        deleteTemplate({name:this.templateForm,btmName: this.nodeRow.label, linkFlag: this.radioForm == 1}).then(res => {
+        deleteTemplate({name:this.templateForm}).then(res => {
           if (res.data.code === 200) {
             this.$message.success(res.data.obj);
             this.getTemp();
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..36620ac
--- /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 v-for="(item,index) in formList" :key="index" :span="columnNumber">
+                    <el-tooltip :content="item.name" placement="top">
+                      <el-form-item :label="item.name + '锛�'" class="hiddenLabel">
+                        <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: 3,
+      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..5509441 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,24 +4,13 @@
     <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);">
-            <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
+          <!-- 宸︿晶鏍� -->
+          <div style="height:  calc(100vh - 220px);">
+            <div style="margin-bottom: 10px;display: flex;justify-content: center">
+              <el-radio v-model="treeRadio" label="0" @input="TreeRadioChange">涓氬姟绫诲瀷鏍�</el-radio>
+              <el-radio v-model="treeRadio" label="1" @input="TreeRadioChange">閾炬帴绫诲瀷鏍�</el-radio>
+            </div>
+            <avue-tree v-loading="treeLoading" :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>
@@ -36,15 +25,209 @@
 
     <el-main>
       <basic-container>
+        <avue-crud
+          v-if="!tableStatus"
+          :data="data"
+          :option="option"
+          :page.sync="page"
+          @size-change="sizeChange"
+          @current-change="currentChange">
+          <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" @input="tableRadioChange">琛ㄥ崟</el-radio>
+                <el-radio v-model="tableRadio" label="1" @input="tableRadioChange">琛ㄦ牸<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 v-if="!tableStatus" 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"
+import {gridPortalVIDatas} from "@/api/UI/formDefine/api"
+import {getBizTypes} from "@/api/modeling/businessType/api";
+import {gridLink} from "@/api/modeling/linkType/api";
+import func from "@/util/func";
+
 export default {
-  name: "index"
+  name: "index",
+  components: {FormDialog, TableDialog},
+  data() {
+    return {
+      page: {
+        currentPage: 1,
+        pageSize: 10,
+        total: 0,
+        pageSizes: [10, 30, 50, 100],
+      },
+      nodeRow: {},
+      treeLoading: false,
+      option: {
+        ...basicOption,
+        addBtn: false,
+        editBtn: false,
+        delBtn: false,
+        column: [
+          {
+            label: '涓氬姟鍚嶇О',
+            prop: 'typeName',
+          },
+          {
+            label: '鍚嶇О',
+            prop: 'viName',
+            sortable: true,
+          },
+          {
+            label: '绫诲瀷',
+            prop: 'viTypeText',
+          },
+        ]
+      },
+      data: [],
+      tableRadio: "",
+      treeRadio: "0",
+      treeData: [],
+      treeOption: {
+        addBtn: false
+      }
+    }
+  },
+  created() {
+    this.getTreeList();
+  },
+  computed: {
+    tableStatus() {
+      return func.isEmptyObject(this.nodeRow)
+    }
+  },
+  methods: {
+    // 鍙充晶鏂板
+    addClickHandler() {
+      if (!this.tableRadio) {
+        this.$message.error('璇峰湪琛ㄦ牸涓婃柟閫夋嫨鏂板绫诲瀷');
+        return;
+      }
+
+      this.tableRadio === "0" ? this.$refs.formDialog.visible = true : this.$refs.tableDialog.visible = true;
+    },
+
+    // 鍒濆鍖栨爲璇锋眰
+    getTreeList() {
+      this.treeLoading = true;
+      getBizTypes().then(res => {
+        const data = res.data.data.map(item => {
+          item.label = item.attributes.id;
+          return item;
+        });
+        this.treeData = data;
+        this.treeLoading = false;
+      })
+    },
+
+    // 宸︿晶涓氬姟绫诲瀷鍒囨崲
+    TreeRadioChange(val) {
+      this.treeLoading = true;
+      this.resetTable();
+      if (val === "0") {
+        getBizTypes().then(res => {
+          const data = res.data.data.map(item => {
+            item.label = item.attributes.id;
+            return item;
+          });
+          this.treeData = data;
+          this.treeLoading = false;
+        })
+      } else {
+        gridLink().then(res => {
+          const data = res.data.data.map(item => {
+            item.label = item.name;
+            return item;
+          });
+          this.treeData = data;
+          this.treeLoading = false;
+        })
+      }
+    },
+
+    // 宸︿晶鏍戠偣鍑�
+    nodeClick(row) {
+      console.log(row);
+      this.tableRadio = null;
+      this.nodeRow = row;
+      this.getRightPortalVIDatas(row);
+    },
+
+    // 閲嶇疆琛ㄦ牸灞曠ず淇℃伅 鍜� 琛ㄦ牸琛ㄥ崟閫夐」
+    resetTable() {
+      this.data = [];
+      this.tableRadio = null;
+    },
+
+    // 鍙充晶 琛ㄦ牸 琛ㄥ崟 淇℃伅鏌ヨ
+    getRightPortalVIDatas() {
+      const params = {
+        'conditionMap[typeName]': this.treeRadio === '0' ? this.nodeRow.attributes.id : this.nodeRow.name,
+        'conditionMap[viType]': this.tableRadio === '0' ? 'Form' : this.tableRadio === '1' ? 'Table' : '',
+        'conditionMap[viTypeFlag]': this.treeRadio === '0' ? 'BtmType' : this.treeRadio === '1' ? 'LinkType' : '',
+      }
+      gridPortalVIDatas(this.page.currentPage, this.page.pageSize, params).then(res => {
+        console.log(res);
+        if (res.data.code === 200) {
+          const data = res.data.data;
+          this.data = data;
+          this.page.total = res.data.total;
+        }
+      })
+    },
+
+    sizeChange(val) {
+      this.page.pageSize = val;
+      this.getRightPortalVIDatas();
+    },
+
+    // 椤电爜
+    currentChange(val) {
+      this.page.currentPage = val;
+      this.getRightPortalVIDatas();
+    },
+
+    // 琛ㄦ牸 琛ㄥ崟鍒囨崲
+    tableRadioChange() {
+      this.getRightPortalVIDatas();
+    },
+
+  }
 }
 </script>
 
@@ -53,8 +236,9 @@
   .el-scrollbar__wrap {
     overflow: auto !important;
   }
-  .headerCon{
-    .el-button{
+
+  .headerCon {
+    .el-button {
       width: 82px;
     }
   }

--
Gitblit v1.9.3