1
13693261870
2022-09-16 762f2fb45db004618ba099aa3c0bd89dba1eb843
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
<!DOCTYPE html>
<html>
 
    <head>
        <title>菜单管理</title>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
        <script src="../../../js/paramconfig.js"></script>
        <script type="text/javascript">
        remoteToLoadCss('BootStrap4/assets/css/style.css');
        remoteToLoadCss('BootStrap4/expand/css/bootstrap-extract.css');
        loadLocalCss('../../../css/main.css');
        loadLocalCss('../../../plugins/jqgrid/ui.jqgrid-bootstrap.css');
        loadLocalCss('../../../plugins/ztree/css/metroStyle/metroStyle.css');
        loadLocalCss('../../../css/bootstrap-table.min.css');
        loadLocalCss('../../../plugins/treegrid/jquery.treegrid.css');
        // remoteToLoadJs('BootStrap4/assets/js/jquery.min.js');
        <!-- 验证框架 -->
        remoteToLoadJs('media/js/jquery-1.11.1.js');
        remoteToLoadJs('media/js/jquery.form-3.51.0.js');
        remoteToLoadJs('media/js/validation/jquery.validate.min.js');
        remoteToLoadJs('media/js/validation/messages_zh.js');
        remoteToLoadJs('media/js/validation/additional-methods.min.js');
        remoteToLoadJs('media/js/yanzhen.js');
        loadLocalJs('../../../js/validator.js');
 
        loadLocalJs('../../../plugins/layer/layer.js');
        remoteToLoadJs('BootStrap4/assets/js/tether.min.js');
        remoteToLoadJs('BootStrap4/assets/js/bootstrap.min.js')
        loadLocalJs('../../../libs/vue.min.js');
        loadLocalJs('../../../libs/bootstrap-table.min.js');
        loadLocalJs('../../../plugins/treegrid/jquery.treegrid.min.js');
        loadLocalJs('../../../plugins/treegrid/jquery.treegrid.bootstrap3.js');
        loadLocalJs('../../../plugins/treegrid/jquery.treegrid.extension_new.js');
        loadLocalJs('../../../plugins/treegrid/tree.table.js');
        loadLocalJs('../../../plugins/jqgrid/grid.locale-cn.js');
        loadLocalJs('../../../plugins/jqgrid/jquery.jqGrid.min.js');
        loadLocalJs('../../../plugins/ztree/jquery.ztree.all.min.js');
        loadLocalJs('../../../js/common.js');
 
 
        </script>
        <style>
            .form-control-label {
                text-align: right;
            }
            
            #tabBase td {
                padding: 2px;
            }
            
            .SearchLeft {
                width: 7%;
                min-width: 90px;
                line-height: 30px;
            }
            
            .SearchRight {
                width: 18%;
            }
            
            .Control-label-long {
                padding-top: 0px !important;
            }
            
            .DivHeight {
                height: 45px;
            }
            
            .form-control {
                padding: 0.3rem 0.7rem;
                height: 30px;
            }
            
            .col-sm-3{
                padding-left: 0;
                padding-right: 0;
            }
        </style>
    </head>
    <body>
        <div id="rapp" v-cloak>
            <table id="menuTable" data-mobile-responsive="true" data-click-to-select="true">
                <thead>
                    <tr>
                        <th data-field="selectItem" data-checkbox="true"></th>
                    </tr>
                </thead>
            </table>
            <div class="panel panel-default">
                <ul class="nav nav-tabs" role="tablist">
                    <li class="nav-item">
                        <a class="nav-link active" id="home-tab" role="tab" aria-expanded="true" aria-controls="home" href="#home" data-toggle="tab">
                            <div class="top_tabs_li">{{title}}</div>
                        </a>
                    </li>
                </ul>
                <form class="form-horizontal" id="from">
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">类型</label>
                        <div class="col-sm-6">
                            <label class="radio-inline">
                            <input type="radio" name="type" value="0" v-model="menu.type" /> 目录
                        </label>
                            <label class="radio-inline">
                            <input type="radio" name="type" value="1" v-model="menu.type" /> 菜单
                        </label>
                            <!--<label class="radio-inline">-->
                            <!--<input type="radio" name="type" value="2" v-model="menu.type" /> 按钮-->
                        <!--</label>-->
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">菜单名称</label>
                        <div class="col-sm-6 input-icon">
                            <input type="text" class="form-control" required="" v-model="menu.name" id="name" name="name" placeholder="菜单名称或按钮名称" maxchar="60" />
                            <span class="input-warning tooltips" data-original-title="">
                                <i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
                            </span>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">上级菜单</label>
                        <div class="col-sm-6">
                            <div class="input-group">
                                <input type="text" class="form-control" style="cursor:pointer;" v-model="menu.parentName" readonly="readonly" placeholder="点击右边按钮选择一级菜单" />
                                <span class="input-group-btn">
                                <a class="btn btn-info" @click="menuTree">
                                    <i class="fa fa-search-plus"></i>
                                </a>
                            </span>
                            </div>
                        </div>
                    </div>
                    <div v-if="menu.type == 1" class="form-group row">
                        <label class="col-sm-2 form-control-label">菜单URL</label>
                        <div class="col-sm-6 input-icon">
                            <input type="text" class="form-control" required="" v-model="menu.url" id="url" name="url" placeholder="菜单URL" maxchar="128" />
                            <span class="input-warning tooltips" data-original-title="">
                                <i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
                            </span>
                        </div>
                    </div>
                    <div v-if="menu.type == 1 || menu.type == 2" class="form-group row">
                        <label class="col-sm-2 form-control-label">授权标识</label>
                        <div class="col-sm-6 input-icon">
                            <input type="text" class="form-control" v-model="menu.perms" id="perms" name="perms" placeholder="多个用逗号分隔,如:user:list,user:create" maxchar="250" />
                            <span class="input-warning tooltips" data-original-title="">
                                <i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
                            </span>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">是否菜单显示</label>
                        <div class="col-sm-6">
                            <label class='control-checkbox' style="padding-top:7px;">
                            <input type="checkbox" value="1" id="isshow" name="isshow" />
                            <span>是</span>
                            </label>
                        </div>
                    </div>                
                    <div class="form-group row" style="display: none;">
                        <label class="col-sm-2 form-control-label">是否打开新窗口</label>
                        <div class="col-sm-6">
                            <label class='control-checkbox' style="padding-top:7px;">
                            <input type="checkbox" value="1" id="target" name="target" />
                            <span>是</span>
                            </label>
                        </div>
                    </div>    
                    <div v-if="menu.type != 2" class="form-group row">
                        <label class="col-sm-2 form-control-label">图标</label>
                        <div class="col-sm-6 input-icon">
                            <input type="text" class="form-control" v-model="menu.icon" maxchar="200" />
                            <code style="margin-top:4px;display: block;">获取图标:http://fontawesome.io/icons/</code>
                            <span class="input-warning tooltips" data-original-title="">
                                <i class="fa-warning-sign" style="display: none;margin-left:30px;"></i>
                            </span>
                        </div>
                    </div>
                    <div style="height: 50px;"></div>
                    <div class="form-actions navbar-fixed-bottom" style="z-index: 0;">
                         <div style="float: left;">
                            <button class="btn btn-primary" id="button" type="button" @click="saveOrUpdate"><i class="fa fa-check"></i> 保存</button>
                            <button class="btn btn-black" id="close" type="button" onclick="window.close()">关闭 </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <!-- 选择菜单 -->
        <div id="menuLayer" style="display: none;padding:10px;">
            <ul id="menuTree" class="ztree"></ul>
        </div>
 
        <script src="../../../js/modules/sys/menu_edit.js"></script>
    </body>
 
</html>