1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- @using WeApp
- @using WeApp.Configuration
- @using WeApp.Authorization
- @using WeApp.Views.Shared.Modals
- @using WeApp.Views.Shared.SearchForm
- @using WeApp.Views.Shared.Table
- @{
- ViewBag.Title = "演练角色信息维护";
- string activeMenu = PermissionNames.PagesBasicMgTrainingRoleMg; //The menu item will be active for this page.
- ViewBag.ActiveMenu = activeMenu;
- var searchForm = new SearchFormViewModel(new List<SearchItem>()
- {
- new SearchItem("roleName","角色名称"),
- },"search-form",false);
- var table = new TableViewModel(IwbConsts.ApiAppUrl + "TrainingRole/GetAll", activeMenu, searchForm)
- .SetFields(new List<FieldItem>()
- {
- new FieldItem("roleName", "角色名称").SetWidth(200),
- new FieldItem("description", "角色描述"),
- });
- }
- @section css{
-
- }
- @Html.Partial("Table/_Table", table)
- @section modal{
- <!--Main Modal-->
- @{
- var modal = new ModalViewModel("演练角色", new ModalBodyViewModel(new List<Input>()
- {
- new InputHide("id"),
- new Input("roleName", "角色名称"),
- new InputTextarea("description", "角色描述").SetNotRequired(),
- }));
- }
- @Html.Partial("Modals/_Modal", modal)
- }
- @section scripts
- {
- <script type="text/javascript">
- var $table;
- $(function () {
- $table = LoadTable();
- var funs = window.iwbfuns || { none: function () { console.log("No type"); } };
- funs["btnCreate"] = function() { BtnCreate({ data: { id: "" } }); }
- funs["btnUpdate"] = function () { BtnUpdate({ disabled: "" }); };
- });
- </script>
- <!--格式化-->
- <script id="formatter-script" type="text/javascript">
- function TypeFormatter(v) {
- var name = $('#hid-type option[value="' + v + '"]').text();
- switch (v) {
- case 0:
- return '<span class="label label-danger">' + name +'</span>';
- default:
- return '<span class="label label-info">' + name +'</span>';
- }
- }
- </script>
- }
- <section style="display: none">
- <select id="hid-type">
- <option value=""></option>
- </select>
- @*@Html.DropDownList("hid-type", type)*@
- </section>
|