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

dep_wangsr
RuoYi 5 years ago committed by Limy
parent caae795d06
commit c9ad04b81f

@ -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 () { $.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); 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 + ' .multiple').toggleClass('disabled', !rows.length);
$('#' + $.table._option.toolbar + ' .btn-detail').toggleClass('disabled', rows.length!=1); // 非单个禁用
$('#' + $.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) { $.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); closeItem(dataId);
}, },
// 关闭选项卡 // 关闭选项卡
closeTab: function () { closeTab: function (dataId) {
closeItem(); closeItem(dataId);
}, },
// 禁用按钮 // 禁用按钮
disable: function() { disable: function() {

@ -85,8 +85,10 @@
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<p>通过调用<code>$.modal.openTab()</code>实现。 </p> <p>通过调用<code>$.modal.openTab()</code>实现。 </p>
<button type="button" class="btn btn-primary" id="button-open-6">打开</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-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> </div>
</div> </div>
@ -240,6 +242,15 @@
$("#button-open-13").click(function(){ $("#button-open-13").click(function(){
layer.load(0, {shade: false}); // 0代表加载的风格支持0-2 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> </script>
</body> </body>
</html> </html>

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

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

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

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

@ -26,7 +26,7 @@
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group"> <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> 强退 <i class="fa fa-sign-out"></i> 强退
</a> </a>
</div> </div>

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

@ -41,10 +41,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:config:add"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:config:add">
<i class="fa fa-plus"></i> 新增 <i class="fa fa-plus"></i> 新增
</a> </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> 修改 <i class="fa fa-edit"></i> 修改
</a> </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> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:config:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:config:export">

@ -37,10 +37,10 @@
<a class="btn btn-success" onclick="add()" shiro:hasPermission="system:dict:add"> <a class="btn btn-success" onclick="add()" shiro:hasPermission="system:dict:add">
<i class="fa fa-plus"></i> 新增 <i class="fa fa-plus"></i> 新增
</a> </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> 修改 <i class="fa fa-edit"></i> 修改
</a> </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> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:dict:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:dict:export">

@ -41,10 +41,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:dict:add"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:dict:add">
<i class="fa fa-plus"></i> 新增 <i class="fa fa-plus"></i> 新增
</a> </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> 修改 <i class="fa fa-edit"></i> 修改
</a> </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> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:dict:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:dict:export">

@ -35,10 +35,10 @@
<a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="system:notice:add"> <a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="system:notice:add">
<i class="fa fa-plus"></i> 新增 <i class="fa fa-plus"></i> 新增
</a> </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> 修改 <i class="fa fa-edit"></i> 修改
</a> </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> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
</div> </div>

@ -35,10 +35,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:post:add"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:post:add">
<i class="fa fa-plus"></i> 新增 <i class="fa fa-plus"></i> 新增
</a> </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> 修改 <i class="fa fa-edit"></i> 修改
</a> </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> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:post:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:post:export">

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

@ -41,10 +41,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:role:add"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:role:add">
<i class="fa fa-plus"></i> 新增 <i class="fa fa-plus"></i> 新增
</a> </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> 修改 <i class="fa fa-edit"></i> 修改
</a> </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> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export">

@ -67,10 +67,10 @@
<a class="btn btn-success" onclick="$.operate.addTab()" shiro:hasPermission="system:user:add"> <a class="btn btn-success" onclick="$.operate.addTab()" shiro:hasPermission="system:user:add">
<i class="fa fa-plus"></i> 新增 <i class="fa fa-plus"></i> 新增
</a> </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> 修改 <i class="fa fa-edit"></i> 修改
</a> </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> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="system:user:import"> <a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="system:user:import">

@ -50,10 +50,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="${moduleName}:${classname}:add"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="${moduleName}:${classname}:add">
<i class="fa fa-plus"></i> 添加 <i class="fa fa-plus"></i> 添加
</a> </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> 修改 <i class="fa fa-edit"></i> 修改
</a> </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> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="${moduleName}:${classname}:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="${moduleName}:${classname}:export">

@ -38,10 +38,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="monitor:job:add"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="monitor:job:add">
<i class="fa fa-plus"></i> 新增 <i class="fa fa-plus"></i> 新增
</a> </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> 修改 <i class="fa fa-edit"></i> 修改
</a> </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> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:job:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:job:export">

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

Loading…
Cancel
Save