@using WePlatform.Configuration
@using WePlatform.Authorization
@using WePlatform.Views.Shared.Modals
@using WePlatform.Views.Shared.SearchForm
@using WePlatform.Views.Shared.Table
@{
ViewBag.Title = "行为角色管理";
string activeMenu = PermissionNames.PagesResourceMgBasicMgBehaviorRoleMg;
string role = "" + ViewBag.Role, category = ViewBag.Category;
ViewBag.ActiveMenu = activeMenu;
var searchForm = new SearchFormViewModel(new List()
{
new SearchItem("roleName","行为角色"),
//new SearchItem("sceneCategory","场景类别").SetSelectItem(category,isTree:true),
}, "search-form", false);
var table = new TableViewModel(IwbConsts.ApiAppUrl + "BehaviorRole/GetAll", activeMenu, searchForm)
.SetFields(new List()
{
new FieldItem("id", "编码"),
new FieldItem("roleName", "行为角色"),
new FieldItem("sceneCategoryName", "场景类别",isSort:false),
});
}
@section css{
}
@Html.Partial("Table/_Table", table)
@section modal{
@{
var modal = new ModalViewModel("角色", new ModalBodyViewModel(new List()
{
new InputHide("id"),
new InputHide("roleName"),
new InputHide("relateNo"),
new Input("role", "行为角色",other:"onchange=RoleChange(this,1)").SetSelectOptions(role),
new Input("role2", "新建角色",other:"onchange=RoleChange(this)" ).SetNotRequired(),
new Input("sceneCategory", "场景类别").SetSelectOptions(category,isAddBlank:false),
new InputTextarea("description", "角色详情").SetNotRequired(),
}));
}
@Html.Partial("Modals/_Modal", modal)
}
@section scripts
{
}
@*@Html.DropDownList("hid-type", type)*@