mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-15 13:02:07 +08:00
Resources ,ids
This commit is contained in:
@@ -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,6 +80,54 @@ public class Resources extends JpaBaseDomain implements Serializable {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getParentName() {
|
||||
return parentName;
|
||||
}
|
||||
|
||||
public void setParentName(String parentName) {
|
||||
this.parentName = parentName;
|
||||
}
|
||||
|
||||
public String getResourceType() {
|
||||
return resourceType;
|
||||
}
|
||||
|
||||
public void setResourceType(String resourceType) {
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getResourceUrl() {
|
||||
return resourceUrl;
|
||||
}
|
||||
|
||||
public void setResourceUrl(String resourceUrl) {
|
||||
this.resourceUrl = resourceUrl;
|
||||
}
|
||||
|
||||
public String getResourceAction() {
|
||||
return resourceAction;
|
||||
}
|
||||
|
||||
public void setResourceAction(String resourceAction) {
|
||||
this.resourceAction = resourceAction;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
@@ -127,55 +175,5 @@ public class Resources extends JpaBaseDomain implements Serializable {
|
||||
public void setModifiedDate(String modifiedDate) {
|
||||
this.modifiedDate = modifiedDate;
|
||||
}
|
||||
|
||||
public String getResType() {
|
||||
return resType;
|
||||
}
|
||||
|
||||
public void setResType(String resType) {
|
||||
this.resType = resType;
|
||||
}
|
||||
|
||||
public String getResUrl() {
|
||||
return resUrl;
|
||||
}
|
||||
|
||||
public void setResUrl(String resUrl) {
|
||||
this.resUrl = resUrl;
|
||||
}
|
||||
|
||||
public String getResAction() {
|
||||
return resAction;
|
||||
}
|
||||
|
||||
public void setResAction(String resAction) {
|
||||
this.resAction = resAction;
|
||||
}
|
||||
|
||||
public String getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(String pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public String getPname() {
|
||||
return pname;
|
||||
}
|
||||
|
||||
public void setPname(String pname) {
|
||||
this.pname = pname;
|
||||
}
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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}"/>
|
||||
|
||||
Reference in New Issue
Block a user