Bladeren bron

增加重置按钮

RuoYi 6 jaren geleden
bovenliggende
commit
f16e013812

+ 5 - 0
src/main/resources/static/ruoyi/js/ry-ui.js

@@ -159,6 +159,11 @@
         },
         // 表单封装处理
     	form: {
+    		// 表单重置
+    		reset: function(formId) {
+            	var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
+            	$("#" + currentId)[0].reset();
+            },
             // 获取选中复选框项
             selectCheckeds: function(name) {
             	var checkeds = "";

File diff suppressed because it is too large
+ 0 - 0
src/main/resources/static/ruoyi/js/ry-ui.min.js


+ 1 - 0
src/main/resources/templates/monitor/online/online.html

@@ -19,6 +19,7 @@
 							</li>
 							<li>
 								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
 							</li>
 						</ul>
 					</div>

+ 1 - 0
src/main/resources/templates/system/dept/dept.html

@@ -21,6 +21,7 @@
 							</li>
 							<li>
 								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.treeTable.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
 							</li>
 						</ul>
 					</div>

+ 1 - 0
src/main/resources/templates/system/menu/menu.html

@@ -21,6 +21,7 @@
 							</li>
 							<li>
 								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.treeTable.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
 							</li>
 						</ul>
 					</div>

+ 1 - 0
src/main/resources/templates/system/notice/notice.html

@@ -24,6 +24,7 @@
 							</li>
 							<li>
 								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
 							</li>
 						</ul>
 					</div>

+ 1 - 0
src/main/resources/templates/tool/gen/gen.html

@@ -24,6 +24,7 @@
 							</li>
 							<li>
 								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
 							</li>
 						</ul>
 					</div>

Some files were not shown because too many files changed in this diff