zhaolei
8 days ago 921de2254ff5712a44ed8575ee8efe34252f6603
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
@model NavigatorBarModel
@{
    ViewBag.Title = "菜单管理";
    Layout = "_Default";
}
@section css {
    <environment include="Development">
        <link href="~/lib/nestable2/jquery.nestable.css" rel="stylesheet" />
    </environment>
    <environment exclude="Development">
        <link href="~/lib/nestable2/jquery.nestable.min.css" rel="stylesheet" />
    </environment>
    <link href="~/lib/treegrid/css/jquery.treegrid.css" rel="stylesheet" />
    <link href="~/lib/longbow-select/longbow-select.css" rel="stylesheet" />
    <link href="~/css/fa.css" rel="stylesheet" asp-append-version="true" />
}
@section javascript {
    <environment include="Development">
        <script src="~/lib/nestable2/jquery.nestable.js"></script>
        <script src="~/lib/bootstrap-3-typeahead/bootstrap3-typeahead.js"></script>
        <script src="~/lib/treegrid/js/jquery.treegrid.js"></script>
        <script src="~/lib/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js"></script>
    </environment>
    <environment exclude="Development">
        <script src="~/lib/nestable2/jquery.nestable.min.js"></script>
        <script src="~/lib/bootstrap-3-typeahead/bootstrap3-typeahead.min.js"></script>
        <script src="~/lib/treegrid/js/jquery.treegrid.min.js"></script>
        <script src="~/lib/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.min.js"></script>
    </environment>
    <script src="~/lib/longbow-select/longbow-select.js"></script>
    <script src="~/js/menus.js" asp-append-version="true"></script>
}
@section query {
    <form class="form-inline">
        <div class="row">
            <div class="form-group col-12">
                <label class="control-label" for="txt_menus_name">菜单名称</label>
                <input type="text" class="form-control" id="txt_menus_name" data-default-val="" />
            </div>
            <div class="form-group col-12">
                <label class="control-label" for="txt_parent_menus_name">父级菜单</label>
                <input type="text" class="form-control" id="txt_parent_menus_name" data-default-val="" />
            </div>
            <div class="form-group col-12">
                <label class="control-label" for="sel_menus_category">菜单类别</label>
                <input class="form-control" data-toggle="lgbSelect" data-default-val="" />
                <select data-toggle="lgbSelect" class="d-none" id="sel_menus_category">
                    <option value="">全部</option>
                    <option value="0">系统菜单</option>
                    <option value="1">外部菜单</option>
                </select>
            </div>
            <div class="form-group col-12">
                <label class="control-label" for="sel_menus_res">菜单类型</label>
                <input class="form-control" data-toggle="lgbSelect" data-default-val="" />
                <select data-toggle="lgbSelect" class="d-none" id="sel_menus_res">
                    <option value="">全部</option>
                    <option value="0">菜单</option>
                    <option value="1">资源</option>
                    <option value="2">按钮</option>
                </select>
            </div>
            <div class="form-group col-12">
                <label class="control-label" for="sel_app">所属应用</label>
                <input class="form-control" data-toggle="lgbSelect" data-default-val="" />
                <select data-toggle="lgbSelect" class="d-none" id="sel_app">
                    <option value="">全部</option>
                    @foreach (var kv in Model.Applications)
                    {
                        <option value="@kv.Key">@kv.Value</option>
                    }
                </select>
            </div>
        </div>
    </form>
}
@section toolbar {
    <button id="btn_assignRole" type="button" class="btn btn-info" asp-auth="assignRole">
        <i class="fa fa-sitemap" aria-hidden="true"></i><span>分配角色</span>
    </button>
}
@section gear {
    <a id="tb_assignRole" href="#" title="分配角色" asp-auth="assignRole"><i class="fa fa-sitemap"></i></a>
}
@section cardbody {
    <div class="alert alert-danger" role="alert" asp-condition="@Model.IsDemo">
        <span>演示系统禁止修改系统菜单,可修改外部菜单</span>
    </div>
}
@section modal {
    <div class="modal-header">
        <h5 class="modal-title" id="myModalLabel">菜单编辑窗口</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
    <div class="modal-body">
        <form class="form-inline" id="dataForm">
            <div class="form-row">
                <div class="form-group col-sm-6">
                    <input type="hidden" id="menuID" />
                    <label class="control-label" for="name">菜单名称</label>
                    <div class="input-group flex-sm-fill">
                        <input type="text" class="form-control" id="name" name="name" placeholder="不可为空,50字以内" maxlength="50" data-valid="true" />
                        <div class="input-group-append">
                            <button data-method="clear" class="btn" type="button"><i class="fa fa-remove"></i></button>
                            <button data-method="sel" class="btn" type="button"><i class="fa fa-edit"></i>全选</button>
                        </div>
                    </div>
                </div>
                <div class="form-group col-sm-6">
                    <input type="hidden" class="form-control" id="parentId" data-default-val="0" />
                    <label class="control-label" for="parentName">父级菜单</label>
                    <div class="input-group flex-sm-fill">
                        <input type="text" class="form-control" readonly id="parentName" name="parentName" placeholder="请选择...(可为空),50字以内" maxlength="50" />
                        <div class="input-group-append">
                            <button data-method="clear" class="btn" type="button"><i class="fa fa-remove"></i></button>
                            <button id="btnMenuParent" class="btn" type="button"><i class="fa fa-hand-o-up"></i>选择</button>
                        </div>
                    </div>
                </div>
                <div class="form-group col-sm-6">
                    <label class="control-label" for="order">菜单序号</label>
                    <div class="input-group flex-sm-fill">
                        <input type="text" class="form-control digits" id="order" name="order" data-default-val="10" placeholder="默认为10" maxlength="8" data-valid="true" />
                        <div class="input-group-append">
                            <button data-method="clear" class="btn" type="button"><i class="fa fa-remove"></i></button>
                            <button id="btnMenuOrder" class="btn" type="button"><i class="fa fa-list-ol"></i>调整</button>
                        </div>
                    </div>
                </div>
                <div class="form-group col-sm-6">
                    <label class="control-label" for="icon">菜单图标</label>
                    <div class="input-group flex-sm-fill">
                        <input type="text" class="form-control" readonly id="icon" data-default-val="fa fa-fa" placeholder="请选择...(可为空),50字以内" maxlength="50" />
                        <div class="input-group-append">
                            <button data-method="clear" class="btn" type="button"><i class="fa fa-remove"></i></button>
                            <button id="btnIcon" class="btn" type="button"><i class="fa fa-dashboard"></i>选择</button>
                        </div>
                    </div>
                </div>
                <div class="form-group col-12">
                    <label class="control-label" for="url">路径</label>
                    <input type="text" class="form-control flex-sm-fill" id="url" placeholder="不可为空,4000字以内" maxlength="4000" data-valid="true" />
                </div>
                <div class="form-group col-sm-6">
                    <label class="control-label" for="isRes">菜单类型</label>
                    <select data-toggle="lgbSelect" class="d-none menuChild" data-default-val="0" id="isRes" data-valid="true">
                        <option value="0">菜单</option>
                        <option value="1">资源</option>
                        <option value="2">按钮</option>
                    </select>
                </div>
                <div class="form-group col-sm-6">
                    <label class="control-label" for="target">目标</label>
                    <select data-toggle="lgbSelect" class="d-none" data-default-val="_self" id="target">
                        <option value="_self">本窗口</option>
                        <option value="_blank">新窗口</option>
                        <option value="_parent">父级窗口</option>
                        <option value="_top">顶级窗口</option>
                   </select>
                </div>
                <div class="form-group col-sm-6">
                    <label class="control-label" for="app">所属应用</label>
                    <select data-toggle="lgbSelect" class="d-none" data-default-val="@BootstrapAppContext.AppId" id="app">
                        @foreach (var kv in Model.Applications)
                        {
                            <option value="@kv.Key">@kv.Value</option>
                        }
                    </select>
                </div>
                <div class="form-group col-sm-6">
                    <label class="control-label" for="category">菜单类别</label>
                    <select data-toggle="lgbSelect" class="d-none" disabled data-default-val="1" id="category">
                        <option value="0">系统菜单</option>
                        <option value="1">外部菜单</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
}
<div id="dialogIcon" class="modal-content icon-content">
    <div class="modal-header">
        <h5 class="modal-title" id="myIconModalLabel">请选择图标</h5>
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    </div>
    <div class="modal-body">
        <div class="loadIconView"><i class="fa fa-spinner fa-pulse"></i><span>正在加载图标...请稍等</span></div>
    </div>
    <div class="modal-footer">
        <span>被选择的图标</span><i class="fa fa-fa" id="pickIcon"></i>
        <button type="button" class="btn btn-secondary" data-dismiss="modal">
            <i class="fa fa-times"></i>
            <span>关闭</span>
        </button>
        <button type="button" class="btn btn-primary" id="btnSubmitIcon">
            <i class="fa fa-save"></i>
            <span>确定</span>
        </button>
    </div>
</div>
@await Html.PartialAsync("RoleConfig")
@await Html.PartialAsync("NavigatorConfig")