From af8757f5f6b9c9c215fc09636610fbf3ffc74deb Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期二, 07 一月 2025 10:08:28 +0800
Subject: [PATCH] 按钮返回接口增加图标返回数据
---
Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/pagemodel/Tree.java | 196 +++++++++++++++++++++++--------------------------
1 files changed, 92 insertions(+), 104 deletions(-)
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..9a3c0c6 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
@@ -12,7 +12,7 @@
* @author weidy
*
*/
-public class Tree implements java.io.Serializable{
+public class Tree extends BaseTree implements java.io.Serializable{
/**
* 绂佹淇敼杩欎釜鍊�
@@ -24,7 +24,7 @@
* 鏋勯�犲嚱鏁�
*/
public Tree(){
-
+
}
/**
@@ -36,81 +36,34 @@
setOid(oid);
setText(text);
}
-
- /**
- * 涓婚敭
- */
- private String oid;
- /**
- * 鏄剧ず鏂囨湰
- */
- private String text;
- /**
- * 鏄惁鍙跺瓙
- */
- private boolean leaf = false;
/**
- * 鏄惁鏄剧ず澶嶉�夋
+ * 鏋勯�犲嚱鏁�
+ * @param oid 涓婚敭
+ * @param text 鏍戣妭鐐规枃鏈�
*/
- private boolean showCheckbox = false;
- /**
- * 鏄惁榛樿閫変腑
- */
- private boolean checked = false;
-
+ public Tree(String oid, String text,Object o){
+ setOid(oid);
+ setText(text);
+ setData(o);
+ }
+
/**
* 瀛愯妭鐐�
*/
- private List<Tree> children = new ArrayList<Tree>();
- /**
- * 鍥炬爣
- */
- private String icon;
- /**
- * 鍥炬爣鏍峰紡
- */
- private String iconCls;
- /**
- * 涓婄骇鑺傜偣
- */
- private String parentId;
+ private List<Tree> children = new ArrayList<>();
- /**
- * 涓婄骇鑺傜偣鐨勫悕绉�
- */
- private String parentName;
-
- /**
- * 涓婄骇鑺傜偣鐨勪笟鍔$被鍨�
- */
- private String parentBtmName;
- /**
- * 鏄惁灞曞紑
- */
- private boolean expanded = false;
-
- /**
- * 閾炬帴
- */
- private String href;//layui鍜宔xtjs浣跨敤href,easyui浣跨敤url锛岀粺涓�href
-
- /**
- * 鎺掑簭绱㈠紩
- */
- private String index;//鎺掑簭绱㈠紩
-
/**
* 鍏朵粬鐨勫睘鎬�
*/
- private Map<String,String> attributes = new HashMap<String, String>();//浣跨敤骞冲彴鐨勮瘽锛屾墍鏈夌殑灞炴�ч兘鏄疭tring鐨�
-
+ private Map<String,String> attributes = new HashMap<>();//浣跨敤骞冲彴鐨勮瘽锛屾墍鏈夌殑灞炴�ч兘鏄疭tring鐨�
+
/**
* 鑾峰彇涓婚敭
* @return 涓婚敭鐨勫��
*/
public String getOid() {
- return oid;
+ return super.getOid();
}
/**
@@ -118,7 +71,7 @@
* @param oid 涓婚敭鐨勫��
*/
public void setOid(String oid) {
- this.oid = oid;
+ super.setOid(oid);
}
/**
@@ -126,7 +79,7 @@
* @return 鏍戣妭鐐规枃鏈�
*/
public String getText() {
- return text;
+ return super.getText();
}
/**
@@ -134,7 +87,22 @@
* @param text 鏍戣妭鐐规枃鏈�
*/
public void setText(String text) {
- this.text = text;
+ super.setText(text);
+ }
+
+ /**
+ * 璁剧疆缂栧彿
+ * @param id
+ */
+ public void setId(String id) {
+ super.setId(id);
+ }
+
+ /**
+ * 鑾峰彇缂栧彿
+ */
+ public String getId() {
+ return super.getId();
}
/**
@@ -142,7 +110,7 @@
* @return true 琛ㄧず鍙跺瓙鑺傜偣
*/
public boolean isLeaf() {
- return leaf;
+ return super.isLeaf();
}
/**
@@ -150,7 +118,7 @@
* @param leaf 鏄惁鍙跺瓙鑺傜偣
*/
public void setLeaf(boolean leaf) {
- this.leaf = leaf;
+ super.setLeaf(leaf);
}
/**
@@ -158,7 +126,7 @@
* @return true琛ㄧず鏄剧ず
*/
public boolean isShowCheckbox() {
- return showCheckbox;
+ return super.isShowCheckbox();
}
/**
@@ -166,7 +134,7 @@
* @param showCheckbox 鏄惁鏄剧ず澶嶉�夋
*/
public void setShowCheckbox(boolean showCheckbox) {
- this.showCheckbox = showCheckbox;
+ super.setShowCheckbox(showCheckbox);
}
/**
@@ -174,7 +142,7 @@
* @return true琛ㄧず闇�瑕佽嚜鍔ㄥ嬀閫�
*/
public boolean isChecked() {
- return checked;
+ return super.isChecked();
}
/**
@@ -182,7 +150,7 @@
* @param checked 鏄惁鑷姩鍕鹃��
*/
public void setChecked(boolean checked) {
- this.checked = checked;
+ super.setChecked(checked);
}
/**
@@ -190,7 +158,7 @@
* @return 瀛愯妭鐐瑰垪琛�
*/
public List<Tree> getChildren() {
- return children;
+ return this.children;
}
/**
@@ -206,7 +174,7 @@
* @return 鍥炬爣
*/
public String getIcon() {
- return icon;
+ return super.getIcon();
}
/**
@@ -214,7 +182,7 @@
* @param icon 鍥炬爣
*/
public void setIcon(String icon) {
- this.icon = icon;
+ super.setIcon(icon);
}
/**
@@ -222,7 +190,7 @@
* @return css绫荤殑鍚嶇О
*/
public String getIconCls() {
- return iconCls;
+ return super.getIconCls();
}
/**
@@ -230,7 +198,7 @@
* @param iconCls css绫荤殑鍚嶇О
*/
public void setIconCls(String iconCls) {
- this.iconCls = iconCls;
+ super.setIconCls(iconCls);
}
/**
@@ -238,7 +206,7 @@
* @return 涓婄骇鑺傜偣鐨刼id
*/
public String getParentId() {
- return parentId;
+ return super.getParentId();
}
/**
@@ -246,7 +214,7 @@
* @param parentId 涓婄骇鑺傜偣鐨刼id
*/
public void setParentId(String parentId) {
- this.parentId = parentId;
+ super.setParentId(parentId);
}
/**
@@ -254,7 +222,7 @@
* @return true琛ㄧず鑷姩灞曞紑
*/
public boolean isExpanded() {
- return expanded;
+ return super.isExpanded();
}
/**
@@ -262,7 +230,7 @@
* @param expanded 鏄惁鑷姩灞曞紑
*/
public void setExpanded(boolean expanded) {
- this.expanded = expanded;
+ super.setExpanded(expanded);
}
/**
@@ -270,7 +238,7 @@
* @return 閾炬帴鍦板潃
*/
public String getHref() {
- return href;
+ return super.getHref();
}
/**
@@ -278,7 +246,7 @@
* @param href 閾炬帴鍦板潃
*/
public void setHref(String href) {
- this.href = href;
+ super.setHref(href);
}
/**
@@ -286,7 +254,7 @@
* @return 鎺掑簭鍙�
*/
public String getIndex() {
- return index;
+ return super.getIndex();
}
/**
@@ -294,7 +262,7 @@
* @param index 鎺掑簭鍙�
*/
public void setIndex(String index) {
- this.index = index;
+ super.setIndex(index);
}
/**
@@ -318,7 +286,7 @@
* @return 涓婄骇鐨勫悕绉�
*/
public String getParentName() {
- return parentName;
+ return super.getParentName();
}
/**
@@ -326,15 +294,15 @@
* @param parentName 涓婄骇鐨勫悕绉�
*/
public void setParentName(String parentName) {
- this.parentName = parentName;
+ super.setParentName(parentName);
}
public String getParentBtmName() {
- return parentBtmName;
+ return super.getParentBtmName();
}
public void setParentBtmName(String parentBtmName) {
- this.parentBtmName = parentBtmName;
+ super.setParentBtmName(parentBtmName);
}
/**
@@ -367,7 +335,7 @@
if (node.getOid().equalsIgnoreCase(childnode.getParentId())) {
childnode.setParentName(node.getText());
if(StringUtils.isBlank(childnode.getParentBtmName())){
- childnode.setParentBtmName(node.getAttributes().getOrDefault("btmname",""));
+ childnode.setParentBtmName((String)node.getAttributes().getOrDefault("btmname",""));
}
node.getChildren().add(childnode);
}
@@ -377,30 +345,50 @@
node.setLeaf(false);
}else {
node.setLeaf(true);
-
+
}
this.getChildren().add(node);
}
}
+
+ public Object getData() {
+ return super.getData();
+ }
+
+ public void setData(Object data) {
+ super.setData(data);
+ }
+
+ public int getLevel() {
+ return super.getLevel();
+ }
+
+ public void setLevel(int level) {
+ super.setLevel(level);
+ }
+
@Override
public String toString() {
return "Tree{" +
- "oid='" + oid + '\'' +
- ", text='" + text + '\'' +
- ", leaf=" + leaf +
- ", showCheckbox=" + showCheckbox +
- ", checked=" + checked +
- ", children=" + children +
- ", icon='" + icon + '\'' +
- ", iconCls='" + iconCls + '\'' +
- ", parentId='" + parentId + '\'' +
- ", parentName='" + parentName + '\'' +
- ", parentBtmName='" + parentBtmName + '\'' +
- ", expanded=" + expanded +
- ", href='" + href + '\'' +
- ", index='" + index + '\'' +
+ "oid='" + super.getOid() + '\'' +
+ ", text='" + super.getText() + '\'' +
+ ", leaf=" + super.isLeaf() +
+ ", showCheckbox=" + super.isShowCheckbox() +
+ ", checked=" + super.isChecked() +
+ ", children=" + this.getChildren() +
+ ", level=" + super.getLevel() +
+ ", icon='" + super.getIcon() + '\'' +
+ ", iconCls='" + super.getIconCls() + '\'' +
+ ", parentId='" + super.getParentId() + '\'' +
+ ", parentName='" + super.getParentBtmName() + '\'' +
+ ", parentBtmName='" + super.getParentBtmName() + '\'' +
+ ", expanded=" + super.isExpanded() +
+ ", href='" + super.getHref() + '\'' +
+ ", index='" + super.getIndex() + '\'' +
+ ", data=" + super.getData() +
", attributes=" + attributes +
'}';
}
+
}
--
Gitblit v1.9.3