123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- @{
- ViewBag.Title = "模块管理";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- @model dynamic
- <!-- table star -->
- <div class="row col-lg-12">
- <div class="wrapper wrapper-content animated fadeInUp">
- <div class="ibox">
- <div class="ibox-title">
- <h5>所有模块</h5>
- <div class="ibox-tools rboor">
- <a class="btn btn-primary btn-xs p310" id="insert" action="add"><i class="im-plus"></i> 创建新模块</a>
- <a class="btn btn-primary btn-xs p310" id="modify" action="edit"><i class="im-pencil2"></i> 编辑</a>
- <a class="btn btn-primary btn-xs p310" id="delete" action="remove"><i class="im-remove4"></i> 删除</a>
- </div>
- </div>
- <div class="ibox-content">
- <!-- search star -->
- @using (Ajax.BeginForm("Index", null, new AjaxOptions() { }, new { @id = "form1", @class = "form-horizontal", @method = "get" }))
- {
- <div class="form-horizontal clearfix">
- <div class="col-lg-4 col-sm-3 pl0" style="width:50%;">
- <div class="form-group">
- <label class="control-label" style="width:70px; float:left;">系统:</label>
- <div class="col-lg-8 col-sm-7" style="width:300px !important;">
- <select id="System" name="System" class="select2-container form-control select2" style="width:100%;" onchange="submit()">
- <option value="" @(ViewData["System"] == null ? "selected=\"selected\"" : "")>全部</option>
- @{
- foreach (var item in ViewData["Systemlist"] as dynamic)
- {
- <option value="@item.ID" @(ViewData["System"] != null && ViewData["System"].ToString() != "" && ViewData["System"].ToString() == item.ID ? "selected=\"selected\"" : "")>@item.NAME</option>
- }
- }
- </select>
- </div>
- </div>
- </div>
- <div class="col-lg-4 col-sm-4" style="float:right;">
- <div class="form-group">
- <div class="col-lg-12 col-sm-12 input-group">
- @Html.TextBox("Search", null, new { @class = "input-sm form-control", @placeholder = "请输入查询关键词" })
- <span class="input-group-btn">
- <button type="button" onclick="submit()" class="btn btn-sm btn-primary"> 搜索</button>
- </span>
- </div>
- </div>
- </div>
- </div>
- }
- <!-- search end -->
- <div id="example_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer">
- <table id="example" class="table table-striped table-bordered table-hover dataTables-example dataTable" cellspacing="0" width="100%">
- <thead>
- <tr>
- <th class="tn" style="width: 50px !important"><input name="checkall" id="checkall" type="checkbox" value=""></th>
- <th>所属系统</th>
- <th>模块名称</th>
- <th style="width: 100px !important;">模块别名</th>
- <th style="width:100px !important;">模块类型</th>
- <th>模块地址</th>
- <th style="width: 100px !important;">状态/顺序</th>
- <th style="width: 120px !important;">操作</th>
- </tr>
- </thead>
- <tbody>
- @{foreach (var item in Model)
- {
- <tr>
- <td class="tn"><input name="checkbox_name" type="checkbox" value="@item.ID"></td>
- <td>@item.SYSNAME</td>
- <td style="text-align:left">
- <a href="javascript:EditModule('@item.ID')" listaction="detail"><i class="@item.ICON"></i> @HttpUtility.HtmlDecode(item.MODULENAME)</a>
- </td>
- <td>@item.ALIAS</td>
- <td>@item.MODULETYPE</td>
- <td>@item.MODULEPATH</td>
- <td>@item.ISSHOW/@item.SHOWORDER</td>
- <td style="text-align:center;">
- <a href="javascript:AddChild('@item.ID','@item.FK_BELONGSYSTEM')" listaction="addchild" class="text-navy" title="添加子模块">[添加子模块]</a>
- </td>
- </tr>
- }
- }
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- table end -->
- @section scripts{
- <script type="text/javascript">
- //列表增加
- $("#insert").click(function () {
- dig.addModel("添加/编辑模块", "/Sys/Module/detail", 700, 450, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- });
- //添加子模块
- function AddChild(n,e) {
- dig.addModel("添加/编辑模块", "/Sys/Module/detail?parentId=" + n + "&sys=" + e, 700, 450, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- }
- //跳转修改
- function EditModule(n) {
- dig.addModel("添加/编辑模块", "/Sys/Module/detail/" + n, 700, 450, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- }
- //列表选择修改
- $('#modify').click(function () {
- var vals = '';
- var num = 0;
- $('input[name="checkbox_name"]:checked').each(function () {
- vals = $(this).val();
- num++;
- });
- if (!vals) {
- dig.alertError("提示", "对不起,请选中您要操作的记录!");
- return;
- }
- if (num > 1) {
- dig.alertError("提示", "对不起,每次只能修改一条记录!");
- return;
- }
- dig.addModel("添加/编辑模块", "/Sys/Module/detail/" + vals, 700, 450, function () {
- if (this.returnValue == 'yes') {
- location.reload();
- }
- });
- });
- $(function () { $('.select2').select2(); $('.ibox-content').css('height', $(window).height() - 60).css('overflow', 'auto'); });
- </script>
- }
|