Pārlūkot izejas kodu

添加选卡页同一页签打开&关闭指定demo&更换可操作样式

RuoYi 5 gadi atpakaļ
vecāks
revīzija
7922cabb5b

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

@@ -139,9 +139,10 @@
             	$.btTable.on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table load-success.bs.table", function () {
             		// 工具栏按钮控制
             		var rows = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
-            		$('#' + $.table._option.toolbar + ' .btn-del').toggleClass('disabled', !rows.length);
-            		$('#' + $.table._option.toolbar + ' .btn-edit').toggleClass('disabled', rows.length!=1);
-            		$('#' + $.table._option.toolbar + ' .btn-detail').toggleClass('disabled', rows.length!=1);
+            		// 非多个禁用
+            		$('#' + $.table._option.toolbar + ' .multiple').toggleClass('disabled', !rows.length);
+            		// 非单个禁用
+            		$('#' + $.table._option.toolbar + ' .single').toggleClass('disabled', rows.length!=1);
             	});
             	// 绑定选中事件、取消事件、全部选中、全部取消
             	$.btTable.on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rows) {
@@ -708,8 +709,8 @@
             	closeItem(dataId);
             },
             // 关闭选项卡
-            closeTab: function () {
-            	closeItem();
+            closeTab: function (dataId) {
+            	closeItem(dataId);
             },
             // 禁用按钮
             disable: function() {

+ 13 - 2
ruoyi-admin/src/main/resources/templates/demo/modal/layer.html

@@ -85,8 +85,10 @@
 	                </div>
 	                <div class="ibox-content">
 	                    <p>通过调用<code>$.modal.openTab()</code>实现。 </p>
-	                    <button type="button" class="btn btn-primary" id="button-open-6">打开</button>
-	                    <button type="button" class="btn btn-warning" id="button-open-7">关闭</button>
+	                    <button type="button" class="btn btn-primary" id="button-open-6">新窗口打开</button>
+	                    <button type="button" class="btn btn-warning" id="button-open-7">关闭当前</button>
+	                    <button type="button" class="btn btn-primary" id="button-open-14">选卡页同一页签打开</button>
+	                    <button type="button" class="btn btn-warning" id="button-open-15">关闭指定</button>
 	                </div>
 	            </div>
 	        </div>
@@ -240,6 +242,15 @@
 	    $("#button-open-13").click(function(){
 	    	layer.load(0, {shade: false}); // 0代表加载的风格,支持0-2
 	    })
+	    
+	    $("#button-open-14").click(function(){
+	    	$.modal.parentTab('添加用户', prefix + "/form");
+	    })
+	    
+	    $("#button-open-15").click(function(){
+	    	// 需要关闭窗口的url
+	    	$.modal.closeTab(prefix + "/form");
+	    })
 	</script>
 </body>
 </html>

+ 3 - 3
ruoyi-admin/src/main/resources/templates/demo/operate/table.html

@@ -9,10 +9,10 @@
 	        <a class="btn btn-success" onclick="$.operate.add()">
 	            <i class="fa fa-plus"></i> 新增
 	        </a>
-	        <a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()">
+	        <a class="btn btn-primary single disabled" onclick="$.operate.edit()">
 	            <i class="fa fa-edit"></i> 修改
 	        </a>
-	        <a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()">
+	        <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
 	            <i class="fa fa-remove"></i> 删除
 	        </a>
 	        <a class="btn btn-info" onclick="$.table.importExcel()">
@@ -21,7 +21,7 @@
 	        <a class="btn btn-warning" onclick="$.table.exportExcel()">
 	            <i class="fa fa-download"></i> 导出
 	        </a>
-	        <a class="btn btn-info btn-detail disabled" onclick="$.operate.detail()">
+	        <a class="btn btn-info single disabled" onclick="$.operate.detail()">
 	            <i class="fa fa-search"></i> 详细
 	        </a>
 	        <a class="btn btn-danger" onclick="$.operate.clean()">

+ 1 - 1
ruoyi-admin/src/main/resources/templates/demo/table/curd.html

@@ -9,7 +9,7 @@
 	        <a class="btn btn-success" onclick="insertRow()">
 	            <i class="fa fa-plus"></i> 新增行
 	        </a>
-	        <a class="btn btn-danger btn-del disabled" onclick="removeRow()">
+	        <a class="btn btn-danger multiple disabled" onclick="removeRow()">
 	            <i class="fa fa-remove"></i> 删除选择行
 	        </a>
 	        <a class="btn btn-danger" onclick="removeRowByUniqueId()">

+ 2 - 2
ruoyi-admin/src/main/resources/templates/demo/table/fixedColumns.html

@@ -10,10 +10,10 @@
 				<a class="btn btn-success">
 	                <i class="fa fa-plus"></i> 新增
 	            </a>
-				<a class="btn btn-primary btn-edit disabled">
+				<a class="btn btn-primary single disabled">
 		            <i class="fa fa-edit"></i> 修改
 		        </a>
-				<a class="btn btn-danger btn-del disabled">
+				<a class="btn btn-danger multiple disabled">
 		            <i class="fa fa-remove"></i> 删除
 		        </a>
 	        </div>

+ 1 - 1
ruoyi-admin/src/main/resources/templates/monitor/logininfor/logininfor.html

@@ -38,7 +38,7 @@
 			</div>
 			
 			<div class="btn-group-sm" id="toolbar" role="group">
-				<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:logininfor:remove">
+				<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:logininfor:remove">
 		            <i class="fa fa-remove"></i> 删除
 		        </a>
 		        <a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:logininfor:remove">

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

@@ -26,7 +26,7 @@
 			</div>
 			
 	        <div class="btn-group-sm" id="toolbar" role="group">
-	            <a class="btn btn-danger btn-del disabled" onclick="javascript:batchForceLogout()" shiro:hasPermission="monitor:online:batchForceLogout">
+	            <a class="btn btn-danger multiple disabled" onclick="javascript:batchForceLogout()" shiro:hasPermission="monitor:online:batchForceLogout">
 	                <i class="fa fa-sign-out"></i> 强退
 	            </a>
 	        </div>

+ 1 - 1
ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html

@@ -44,7 +44,7 @@
 			</div>
 			
 			<div class="btn-group-sm" id="toolbar" role="group">
-				<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:operlog:remove">
+				<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:operlog:remove">
 		            <i class="fa fa-remove"></i> 删除
 		        </a>
 		        <a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:operlog:remove">

+ 2 - 2
ruoyi-admin/src/main/resources/templates/system/config/config.html

@@ -41,10 +41,10 @@
 		        <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:config:add">
 		            <i class="fa fa-plus"></i> 新增
 		        </a>
-		        <a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:config:edit">
+		        <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:config:edit">
 		            <i class="fa fa-edit"></i> 修改
 		        </a>
-		        <a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:config:remove">
+		        <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:config:remove">
 		            <i class="fa fa-remove"></i> 删除
 		        </a>
 		        <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:config:export">

+ 2 - 2
ruoyi-admin/src/main/resources/templates/system/dict/data/data.html

@@ -37,10 +37,10 @@
 	            <a class="btn btn-success" onclick="add()" shiro:hasPermission="system:dict:add">
 	                <i class="fa fa-plus"></i> 新增
 	            </a>
-	            <a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:dict:edit">
+	            <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:dict:edit">
 		            <i class="fa fa-edit"></i> 修改
 		        </a>
-				<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:dict:remove">
+				<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:dict:remove">
 		            <i class="fa fa-remove"></i> 删除
 		        </a>
 		        <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:dict:export">

+ 2 - 2
ruoyi-admin/src/main/resources/templates/system/dict/type/type.html

@@ -41,10 +41,10 @@
 	            <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:dict:add">
 	                <i class="fa fa-plus"></i> 新增
 	            </a>
-	            <a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:dict:edit">
+	            <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:dict:edit">
 		            <i class="fa fa-edit"></i> 修改
 		        </a>
-				<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:dict:remove">
+				<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:dict:remove">
 		            <i class="fa fa-remove"></i> 删除
 		        </a>
 		        <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:dict:export">

+ 2 - 2
ruoyi-admin/src/main/resources/templates/system/notice/notice.html

@@ -35,10 +35,10 @@
 		        <a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="system:notice:add">
 		            <i class="fa fa-plus"></i> 新增
 		        </a>
-		        <a class="btn btn-primary btn-edit disabled" onclick="$.operate.editFull()" shiro:hasPermission="system:notice:edit">
+		        <a class="btn btn-primary single disabled" onclick="$.operate.editFull()" shiro:hasPermission="system:notice:edit">
 		            <i class="fa fa-edit"></i> 修改
 		        </a>
-		        <a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:notice:remove">
+		        <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:notice:remove">
 		            <i class="fa fa-remove"></i> 删除
 		        </a>
 	        </div>

+ 2 - 2
ruoyi-admin/src/main/resources/templates/system/post/post.html

@@ -35,10 +35,10 @@
 				<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:post:add">
 	                <i class="fa fa-plus"></i> 新增
 	            </a>
-				<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:post:edit">
+				<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:post:edit">
 		            <i class="fa fa-edit"></i> 修改
 		        </a>
-				<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:post:remove">
+				<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:post:remove">
 		            <i class="fa fa-remove"></i> 删除
 		        </a>
 				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:post:export">

+ 1 - 1
ruoyi-admin/src/main/resources/templates/system/role/authUser.html

@@ -30,7 +30,7 @@
 				<a class="btn btn-success" onclick="selectUser()" shiro:hasPermission="system:role:add">
 	                <i class="fa fa-plus"></i> 添加用户
 	            </a>
-				<a class="btn btn-danger btn-del disabled" onclick="cancelAuthUserAll()" shiro:hasPermission="system:role:remove">
+				<a class="btn btn-danger multiple disabled" onclick="cancelAuthUserAll()" shiro:hasPermission="system:role:remove">
 		            <i class="fa fa-remove"></i> 批量取消授权
 		        </a>
 		        <a class="btn btn-warning" onclick="closeItem()">

+ 2 - 2
ruoyi-admin/src/main/resources/templates/system/role/role.html

@@ -41,10 +41,10 @@
 				<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:role:add">
 	                <i class="fa fa-plus"></i> 新增
 	            </a>
-	            <a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:role:edit">
+	            <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:role:edit">
 		            <i class="fa fa-edit"></i> 修改
 		        </a>
-				<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:role:remove">
+				<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:role:remove">
 		            <i class="fa fa-remove"></i> 删除
 		        </a>
 		        <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export">

+ 2 - 2
ruoyi-admin/src/main/resources/templates/system/user/user.html

@@ -67,10 +67,10 @@
 		        	<a class="btn btn-success" onclick="$.operate.addTab()" shiro:hasPermission="system:user:add">
 		                <i class="fa fa-plus"></i> 新增
 		            </a>
-		             <a class="btn btn-primary btn-edit disabled" onclick="$.operate.editTab()" shiro:hasPermission="system:user:edit">
+		             <a class="btn btn-primary single disabled" onclick="$.operate.editTab()" shiro:hasPermission="system:user:edit">
 			            <i class="fa fa-edit"></i> 修改
 			        </a>
-		            <a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:user:remove">
+		            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:user:remove">
 		                <i class="fa fa-remove"></i> 删除
 		            </a>
 		            <a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="system:user:import">

+ 2 - 2
ruoyi-generator/src/main/resources/vm/html/list.html.vm

@@ -50,10 +50,10 @@
 				<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="${moduleName}:${classname}:add">
 					<i class="fa fa-plus"></i> 添加
 				</a>
-				<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="${moduleName}:${classname}:edit">
+				<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="${moduleName}:${classname}:edit">
 					<i class="fa fa-edit"></i> 修改
 				</a>
-				<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="${moduleName}:${classname}:remove">
+				<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="${moduleName}:${classname}:remove">
 					<i class="fa fa-remove"></i> 删除
 				</a>
 				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="${moduleName}:${classname}:export">

+ 2 - 2
ruoyi-quartz/src/main/resources/templates/monitor/job/job.html

@@ -38,10 +38,10 @@
 				<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="monitor:job:add">
 	                <i class="fa fa-plus"></i> 新增
 	            </a>
-	            <a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="monitor:job:edit">
+	            <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="monitor:job:edit">
 		            <i class="fa fa-edit"></i> 修改
 		        </a>
-				<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:job:remove">
+				<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:job:remove">
 		            <i class="fa fa-remove"></i> 删除
 		        </a>
 		         <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:job:export">

+ 1 - 1
ruoyi-quartz/src/main/resources/templates/monitor/job/jobLog.html

@@ -42,7 +42,7 @@
 			</div>
 			
 			<div class="btn-group-sm" id="toolbar" role="group">
-				 <a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:job:remove">
+				 <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:job:remove">
 	                <i class="fa fa-remove"></i> 删除
 	            </a>
 	            <a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:job:remove">