已经完成

多余图片  注释掉
master
森屿海巷 3 years ago
parent f1027c45e8
commit ce89c4fb0d

@ -163,4 +163,13 @@ public class BaseLocationInfoController extends BaseController
{ {
return toAjax(baseLocationInfoService.deleteBaseLocationInfoByObjids(ids)); return toAjax(baseLocationInfoService.deleteBaseLocationInfoByObjids(ids));
} }
@RequiresPermissions("system:baselocationinfo:view")
@GetMapping("/importTemplate")
@ResponseBody
public AjaxResult importTemplate()
{
ExcelUtil<BaseLocationInfo> util = new ExcelUtil<>(BaseLocationInfo.class);
return util.importTemplateExcel("用户数据");
}
} }

@ -42,7 +42,7 @@ public class CommonController
* @param fileName * @param fileName
* @param delete * @param delete
*/ */
@GetMapping("common/download") @GetMapping("/common/download")
public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request) public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
{ {
try try

@ -389,6 +389,9 @@ var table = {
// 下载模板 // 下载模板
importTemplate: function() { importTemplate: function() {
$.get(activeWindow().table.options.importTemplateUrl, function(result) { $.get(activeWindow().table.options.importTemplateUrl, function(result) {
console.log(result.code)
console.log(web_status.SUCCESS)
if (result.code == web_status.SUCCESS) { if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) { } else if (result.code == web_status.WARNING) {
@ -398,6 +401,7 @@ var table = {
} }
}); });
}, },
// 导入数据 // 导入数据
importExcel: function(formId, width, height) { importExcel: function(formId, width, height) {
table.set(); table.set();

@ -32,7 +32,7 @@
<div class="sidebar-collapse"> <div class="sidebar-collapse">
<ul class="nav" id="side-menu"> <ul class="nav" id="side-menu">
<li> <li>
<div class="user-panel"> <!--<div class="user-panel">
<a class="menuItem noactive" title="个人中心" th:href="@{/system/user/profile}"> <a class="menuItem noactive" title="个人中心" th:href="@{/system/user/profile}">
<div class="hide" th:text="个人中心"></div> <div class="hide" th:text="个人中心"></div>
<div class="pull-left image"> <div class="pull-left image">
@ -44,7 +44,7 @@
<a href="#"><i class="fa fa-circle text-success"></i> 在线</a> <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
<a th:href="@{logout}" style="padding-left:5px;"><i class="fa fa-sign-out text-danger"></i> 注销</a> <a th:href="@{logout}" style="padding-left:5px;"><i class="fa fa-sign-out text-danger"></i> 注销</a>
</div> </div>
</div> </div>-->
</li> </li>
<li> <li>
<a class="menuItem" th:href="@{/system/basestoreinfo}"><i class="fa fa-home"></i> <span class="nav-label">首页</span> </a> <a class="menuItem" th:href="@{/system/basestoreinfo}"><i class="fa fa-home"></i> <span class="nav-label">首页</span> </a>
@ -89,7 +89,7 @@
<!--<li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="开发文档" href="http://doc.ruoyi.vip/ruoyi" target="_blank"><i class="fa fa-question-circle"></i> 文档</a></li> <!--<li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="开发文档" href="http://doc.ruoyi.vip/ruoyi" target="_blank"><i class="fa fa-question-circle"></i> 文档</a></li>
<li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="锁定屏幕" href="#" id="lockScreen"><i class="fa fa-lock"></i> 锁屏</a></li> <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="锁定屏幕" href="#" id="lockScreen"><i class="fa fa-lock"></i> 锁屏</a></li>
<li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="全屏显示" href="#" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏</a></li>--> <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="全屏显示" href="#" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏</a></li>-->
<li class="dropdown user-menu"> <!-- <li class="dropdown user-menu">
<a href="javascript:void(0)" class="dropdown-toggle" data-hover="dropdown"> <a href="javascript:void(0)" class="dropdown-toggle" data-hover="dropdown">
<img th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='img/profile.jpg'" class="user-image"> <img th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='img/profile.jpg'" class="user-image">
<span class="hidden-xs">[[${#strings.defaultString(user.userName, '-')}]]</span> <span class="hidden-xs">[[${#strings.defaultString(user.userName, '-')}]]</span>
@ -117,7 +117,7 @@
<i class="fa fa-sign-out"></i> 退出登录</a> <i class="fa fa-sign-out"></i> 退出登录</a>
</li> </li>
</ul> </ul>
</li> </li>-->
</ul> </ul>
</nav> </nav>
</div> </div>

@ -22,9 +22,9 @@
<div class="row"> <div class="row">
<div class="col-sm-7"> <div class="col-sm-7">
<div class="signin-info"> <div class="signin-info">
<div class="logopanel m-b"> <!--<div class="logopanel m-b">
<h1><img alt="[ 若依 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1> <h1><img alt="[ 若依 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1>
</div> </div>-->
<div class="m-b"></div> <div class="m-b"></div>
<h4>欢迎使用 <strong>若依 后台管理系统</strong></h4> <h4>欢迎使用 <strong>若依 后台管理系统</strong></h4>
<ul class="m-b"> <ul class="m-b">

@ -63,6 +63,9 @@
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:baselocationinfo:remove"> <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:baselocationinfo: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:baselocationinfo:import">
<i class="fa fa-upload"></i> 导入
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:baselocationinfo:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:baselocationinfo:export">
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>
@ -93,6 +96,7 @@
updateUrl: prefix + "/edit/{id}", updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove", removeUrl: prefix + "/remove",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
importTemplateUrl: prefix + "/importTemplate",
modalName: "库位信息", modalName: "库位信息",
columns: [{ columns: [{
checkbox: true checkbox: true
@ -179,5 +183,21 @@
$.table.init(options); $.table.init(options);
}); });
</script> </script>
<!-- 导入区域 -->
<script id="importTpl" type="text/template">
<form enctype="multipart/form-data" class="mt20 mb10">
<div class="col-xs-offset-1">
<input type="file" id="file" name="file"/>
<div class="mt10 pt5">
<input type="checkbox" id="updateSupport" name="updateSupport" title="如果登录账户已经存在,更新这条数据。"> 是否更新已经存在的用户数据
&nbsp; <a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
</div>
<font color="red" class="pull-left mt10">
提示仅允许导入“xls”或“xlsx”格式文件
</font>
</div>
</form>
</script>
</body> </body>
</html> </html>
Loading…
Cancel
Save