Resources ,ids

上级 17fe3412
......@@ -37,15 +37,15 @@ public class Resources extends JpaBaseDomain implements Serializable {
@Column
String appId;
@Column
String pid;
String parentId;
@Column
String pname;
String parentName;
@Column
String resType;
String resourceType;
@Column
String resUrl;
String resourceUrl;
@Column
String resAction;
String resourceAction;
@Column
String status;
@Column
......@@ -80,102 +80,100 @@ public class Resources extends JpaBaseDomain implements Serializable {
this.name = name;
}
public String getStatus() {
return status;
public String getAppId() {
return appId;
}
public void setStatus(String status) {
this.status = status;
public void setAppId(String appId) {
this.appId = appId;
}
public String getDescription() {
return description;
public String getParentId() {
return parentId;
}
public void setDescription(String description) {
this.description = description;
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getCreatedBy() {
return createdBy;
public String getParentName() {
return parentName;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
public void setParentName(String parentName) {
this.parentName = parentName;
}
public String getCreatedDate() {
return createdDate;
public String getResourceType() {
return resourceType;
}
public void setCreatedDate(String createdDate) {
this.createdDate = createdDate;
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
public String getModifiedBy() {
return modifiedBy;
public String getResourceUrl() {
return resourceUrl;
}
public void setModifiedBy(String modifiedBy) {
this.modifiedBy = modifiedBy;
public void setResourceUrl(String resourceUrl) {
this.resourceUrl = resourceUrl;
}
public String getModifiedDate() {
return modifiedDate;
public String getResourceAction() {
return resourceAction;
}
public void setModifiedDate(String modifiedDate) {
this.modifiedDate = modifiedDate;
public void setResourceAction(String resourceAction) {
this.resourceAction = resourceAction;
}
public String getResType() {
return resType;
public String getStatus() {
return status;
}
public void setResType(String resType) {
this.resType = resType;
public void setStatus(String status) {
this.status = status;
}
public String getResUrl() {
return resUrl;
public String getDescription() {
return description;
}
public void setResUrl(String resUrl) {
this.resUrl = resUrl;
public void setDescription(String description) {
this.description = description;
}
public String getResAction() {
return resAction;
public String getCreatedBy() {
return createdBy;
}
public void setResAction(String resAction) {
this.resAction = resAction;
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getPid() {
return pid;
public String getCreatedDate() {
return createdDate;
}
public void setPid(String pid) {
this.pid = pid;
public void setCreatedDate(String createdDate) {
this.createdDate = createdDate;
}
public String getPname() {
return pname;
public String getModifiedBy() {
return modifiedBy;
}
public void setPname(String pname) {
this.pname = pname;
public void setModifiedBy(String modifiedBy) {
this.modifiedBy = modifiedBy;
}
public String getAppId() {
return appId;
public String getModifiedDate() {
return modifiedDate;
}
public void setAppId(String appId) {
this.appId = appId;
public void setModifiedDate(String modifiedDate) {
this.modifiedDate = modifiedDate;
}
}
......@@ -9,8 +9,8 @@
<if test="appId != null and appId != ''">
AND APPID = #{appId}
</if>
<if test="pid != null and pid != ''">
AND PID = #{pid}
<if test="parentId != null and parentId != ''">
AND PARENTID = #{parentId}
</if>
<if test="name != null and name != ''">
AND NAME LIKE '%${name}%'
......
......@@ -170,7 +170,7 @@ public class ResourcesController {
for (Resources res : resourcesList) {
TreeNode treeNode = new TreeNode(res.getId(), res.getName());
treeNode.setAttr("data", res);
treeNode.setPId(res.getPid());
treeNode.setPId(res.getParentId());
treeNodeList.addTreeNode(treeNode.getAttr());
}
......
......@@ -15,7 +15,13 @@
<table border="0" cellpadding="0" cellspacing="0" class="table table-bordered" >
<tbody>
<tr>
<th><@locale code="group.name" /></th>
<th><@locale code="group.id" /></th>
<td nowrap>
<input type="text" id="id" name="id" class="form-control" title="" value="" />
</td>
</tr>
<tr>
<th><@locale code="role.name" /></th>
<td nowrap>
<input type="text" id="name" name="name" class="form-control" title="" value="" required="" />
</td>
......
......@@ -13,8 +13,8 @@
<script type="text/javascript">
$(function () {
$("#appId").val($.cookie("select_app_id"));
$("#pid").val($.cookie("select_res_id"));
$("#pname").val($.cookie("select_res_name"));
$("#parentId").val($.cookie("select_res_id"));
$("#parentName").val($.cookie("select_res_name"));
});
</script>
</head>
......@@ -22,46 +22,52 @@ $(function () {
<form id="actionForm" method="post" type="label" autoclose="true" action="<@base/>/resources/add" class="needs-validation" novalidate>
<table border="0" cellpadding="0" cellspacing="0" class="table table-bordered" >
<tbody>
<tr>
<th><@locale code="resource.id" /></th>
<td nowrap>
<input type="text" id="id" name="id" class="form-control" title="" value="" required="" />
</td>
</tr>
<tr>
<th><@locale code="resource.name" /></th>
<td nowrap>
<input type="text" id="name" name="name" class="form-control" title="" value="" required="" />
</td>
</tr>
<tr>
<tr style="display:none;">
<th><@locale code="apps.id" /></th>
<td nowrap>
<input type="text" id="appId" name="appId" class="form-control" title="" value="" required="" />
<input type="text" id="appId" name="appId" class="form-control" title="" value="" required="" readonly />
</td>
</tr>
<tr>
<th><@locale code="resource.pid" /></th>
<td nowrap>
<input type="text" id="pid" name="pid" class="form-control" title="" value="" required="" />
<input type="text" id="parentId" name="parentId" class="form-control" title="" value="" required="" />
</td>
</tr>
<tr>
<th><@locale code="resource.pname" /></th>
<td nowrap>
<input type="text" id="pname" name="pname" class="form-control" title="" value="" required="" />
<input type="text" id="parentName" name="parentName" class="form-control" title="" value="" required="" />
</td>
</tr>
<tr>
<th><@locale code="resource.resType" /></th>
<td nowrap>
<input type="text" id="resType" name="resType" class="form-control" title="" value="" required="" />
<input type="text" id="resourceType" name="resourceType" class="form-control" title="" value="" required="" />
</td>
</tr>
<tr>
<th><@locale code="resource.resUrl" /></th>
<td nowrap>
<input type="text" id="resUrl" name="resUrl" class="form-control" title="" value="" required="" />
<input type="text" id="resourceUrl" name="resourceUrl" class="form-control" title="" value="" required="" />
</td>
</tr>
<tr>
<th><@locale code="resource.resAction" /></th>
<td nowrap>
<input type="text" id="resAction" name="resAction" class="form-control" title="" value="" required="" />
<input type="text" id="resourceAction" name="resourceAction" class="form-control" title="" value="" required="" />
</td>
</tr>
<tr>
......
......@@ -29,10 +29,10 @@
<tr>
<th><@locale code="resource.pid" /></th>
<td nowrap>
<input type="text" id="pid" name="pid" class="form-control" title="" value="${model.pid!}" required="" />
<input type="text" id="parentId" name="parentId" class="form-control" title="" value="${model.parentId!}" required="" />
</td>
</tr>
<tr>
<tr style="display:none;">
<th><@locale code="apps.id" /></th>
<td nowrap>
<input type="text" id="appId" name="appId" class="form-control" title="" value="${model.appId!}" required="" />
......@@ -41,25 +41,25 @@
<tr>
<th><@locale code="resource.pname" /></th>
<td nowrap>
<input type="text" id="pname" name="pname" class="form-control" title="" value="${model.pname!}" required="" />
<input type="text" id="parentName" name="parentName" class="form-control" title="" value="${model.parentName!}" required="" />
</td>
</tr>
<tr>
<th><@locale code="resource.resType" /></th>
<td nowrap>
<input type="text" id="resType" name="resType" class="form-control" title="" value="${model.resType!}" required="" />
<input type="text" id="resourceType" name="resourceType" class="form-control" title="" value="${model.resourceType!}" required="" />
</td>
</tr>
<tr>
<th><@locale code="resource.resUrl" /></th>
<td nowrap>
<input type="text" id="resUrl" name="resUrl" class="form-control" title="" value="${model.resUrl!}" required="" />
<input type="text" id="resourceUrl" name="resourceUrl" class="form-control" title="" value="${model.resourceUrl!}" required="" />
</td>
</tr>
<tr>
<th><@locale code="resource.resAction" /></th>
<td nowrap>
<input type="text" id="resAction" name="resAction" class="form-control" title="" value="${model.resAction!}" required="" />
<input type="text" id="resourceAction" name="resourceAction" class="form-control" title="" value="${model.resourceAction!}" required="" />
</td>
</tr>
<tr>
......
......@@ -7,7 +7,7 @@
function onClick (event, treeId, treeNode) {
$("#pid").val(treeNode.id);
$("#parentId").val(treeNode.id);
$.cookie("select_res_id", treeNode.id, { path: '/' });
$.cookie("select_app_id", $("#appId").val(), { path: '/' });
$.cookie("select_res_name", treeNode.name,{ path: '/' });
......@@ -173,7 +173,7 @@ $(function () {
<td width="450px">
<form id="basic_search_form">
<input class="form-control appId" id="appId" name="appId" value="" type="hidden" >
<input class="form-control" id="pid" name="pid" value="" type="hidden" >
<input class="form-control" id="parentId" name="parentId" value="" type="hidden" >
<input class="form-control appName" style="width:200px;float: left;" value="" id="appName" name="appName" type="text" >
<input class="button btn btn-success mr-3 window" style="float: left;" id="selectBtn" type="button" value="<@locale code="button.text.select"/>"
wurl="<@base/>/apps/select"
......@@ -240,6 +240,9 @@ $(function () {
<th data-checkbox="true"></th>
<th data-sortable="true" data-field="id" data-visible="false">Id</th>
<th data-field="name"><@locale code="resource.name"/></th>
<th data-field="resourceType"><@locale code="resource.resType"/></th>
<th data-field="resourceUrl"><@locale code="resource.resUrl"/></th>
<th data-field="resourceAction"><@locale code="resource.resAction"/></th>
<th data-field="description"><@locale code="common.text.description"/></th>
</tr>
......
......@@ -14,6 +14,12 @@
<form id="actionForm" method="post" type="label" autoclose="true" action="<@base/>/roles/add" class="needs-validation" novalidate>
<table border="0" cellpadding="0" cellspacing="0" class="table table-bordered" >
<tbody>
<tr>
<th><@locale code="role.id" /></th>
<td nowrap>
<input type="text" id="id" name="id" class="form-control" title="" value="" />
</td>
</tr>
<tr>
<th><@locale code="role.name" /></th>
<td nowrap>
......
......@@ -14,7 +14,7 @@
<form id="actionForm" method="post" type="label" autoclose="true" action="<@base/>/roles/update" class="needs-validation" novalidate>
<table border="0" cellpadding="0" cellspacing="0" class="table table-bordered">
<tbody>
<tr style="display:none1">
<tr>
<th><@locale code="role.id" /></th>
<td nowrap>
<input id="id" type="text" readonly name="id" class="form-control" value="${model.id}"/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册