80 lines
2.6 KiB
Plaintext
80 lines
2.6 KiB
Plaintext
@using Mini.Web.WebHelper
|
|
@model Mini.Model.Entity.Bas_Role
|
|
@{
|
|
ViewBag.Title = "Edit";
|
|
Layout = "~/Areas/Admin/Views/Shared/_Index_LayoutEdit.cshtml";
|
|
}
|
|
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$("#btnSave").click(function () {
|
|
var ckk = $("#tt").tree('getChecked');
|
|
console.log(ckk);
|
|
var arrydata = [];
|
|
$(ckk).each(function (ndx, da) {
|
|
if (da.attributes.type == "dept") {
|
|
arrydata.push({ corpid: da.attributes.corpid, id: da.attributes.id });
|
|
}
|
|
});
|
|
//console.log(arrydata);
|
|
//return false;
|
|
$.r_ajax({
|
|
url: "BindQWRole",
|
|
type: "Post",
|
|
data: { list: arrydata, roleid:"@Html.Raw(ViewBag.roleid)"},
|
|
dataType: "json",
|
|
loading: true,
|
|
success: function (data) {
|
|
if (data.type == 1) {
|
|
window.parent.frameReturnByMes(data.message);
|
|
window.parent.frameReturnByReload(true);
|
|
window.parent.frameReturnByClose()
|
|
}
|
|
else {
|
|
window.parent.frameReturnByMes(data.message);
|
|
}
|
|
}
|
|
});
|
|
return false;
|
|
});
|
|
$('#tt').tree({
|
|
url: 'GetQWDept?roleid=@Html.Raw(ViewBag.roleid)',
|
|
checkbox: true,
|
|
cascadeCheck: true
|
|
});
|
|
$("#tt").tree("expandAll");
|
|
$("#tt").tree("collapseAll");
|
|
|
|
});
|
|
</script>
|
|
|
|
<div class="mvctool bgb">
|
|
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
|
|
</div>
|
|
<div style="overflow-y:auto; height:99%;">
|
|
<form id="CreateForm">
|
|
@Html.ValidationSummary(true)
|
|
<table class="fromEditTable setTextWidth300">
|
|
<tbody>
|
|
<tr>
|
|
<td width="60px" style="width:100px">
|
|
角色:
|
|
</td>
|
|
<td style="width:310px">
|
|
@Html.Raw(Model.RName)
|
|
</td>
|
|
<td width="120px"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="60px" style="width:100px;vertical-align:top;">
|
|
部门:
|
|
</td>
|
|
<td style="width:310px;vertical-align:top;" ">
|
|
<ul id="tt"></ul>
|
|
</td>
|
|
<td width="120px"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
</div> |