From c5cec4615989cf2afdafe21863e3dc7ecd16e7d8 Mon Sep 17 00:00:00 2001 From: dshclm <3321914460@qq.com> Date: Tue, 20 Aug 2024 14:43:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=89=E5=AF=86=E8=AE=BE=E5=A4=87=E7=99=BB?= =?UTF-8?q?=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/TdPropertyManagerController.java | 10 ++ .../system/property/ementdata/add.html | 47 ++++++- .../system/property/ementdata/detail.html | 47 ++++++- .../property/ementdata/propertyEment.html | 123 +++++++++++++++++- .../system/property/property/property.html | 16 ++- 5 files changed, 224 insertions(+), 19 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyManagerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyManagerController.java index 9c99644..ea5d589 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyManagerController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyManagerController.java @@ -154,4 +154,14 @@ public class TdPropertyManagerController extends BaseController { return "system/property/data/propertyinfo"; } + /** + * 添加密品条目 + */ + @RequiresPermissions("system:property:list") + @GetMapping("/ementDetail/{useId}") + public String ementDetail(@PathVariable("useId") String useId, ModelMap mmap) { + mmap.put("useId", useId); + return "system/property/ementdata/propertyEment"; + } + } diff --git a/ruoyi-admin/src/main/resources/templates/system/property/ementdata/add.html b/ruoyi-admin/src/main/resources/templates/system/property/ementdata/add.html index 566549b..8654ae1 100644 --- a/ruoyi-admin/src/main/resources/templates/system/property/ementdata/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/property/ementdata/add.html @@ -1,10 +1,47 @@ <!DOCTYPE html> -<html lang="en"> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <head> - <meta charset="UTF-8"> - <title>Title</title> + <th:block th:include="include :: header('新增密品管理')" /> + <th:block th:include="include :: datetimepicker-css" /> </head> -<body> +<body class="white-bg"> +<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="app"> + <form class="form-horizontal m" id="form-propertyinfo-add"> + <input name="useId" class="form-control" type="hidden" th:value="${useId}"> + <!--其他开始--> + <div class="form-group"> + <label class="col-sm-2 control-label is-required">名称:</label> + <div class="col-sm-8"> + <input name="name" required class="form-control m-b" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-2 control-label is-required">用途:</label> + <div class="col-sm-8"> + <input name="purposes" required class="form-control m-b" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-2 control-label">备注:</label> + <div class="col-sm-8"> + <textarea name="remark" class="form-control m-b"></textarea> + </div> + </div> + </form> +</div> +<th:block th:include="include :: footer" /> +<th:block th:include="include :: datetimepicker-js" /> +<script th:inline="javascript"> + var prefix = ctx + "system/prementData" + $("#form-propertyinfo-add").validate({ + focusCleanup: true + }); + function submitHandler() { + if ($.validate.form()) { + $.operate.save(prefix + "/add", $('#form-propertyinfo-add').serialize()); + } + } +</script> </body> -</html> \ No newline at end of file +</html> diff --git a/ruoyi-admin/src/main/resources/templates/system/property/ementdata/detail.html b/ruoyi-admin/src/main/resources/templates/system/property/ementdata/detail.html index 566549b..2446812 100644 --- a/ruoyi-admin/src/main/resources/templates/system/property/ementdata/detail.html +++ b/ruoyi-admin/src/main/resources/templates/system/property/ementdata/detail.html @@ -1,10 +1,47 @@ <!DOCTYPE html> -<html lang="en"> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <head> - <meta charset="UTF-8"> - <title>Title</title> + <th:block th:include="include :: header('修改密品管理')" /> + <th:block th:include="include :: datetimepicker-css" /> </head> -<body> +<body class="white-bg"> +<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="app"> + <form class="form-horizontal m" id="form-propertyinfo-add" th:object="${tdPropertyEment}"> + <input name="useId" class="form-control" type="hidden" th:value="${useId}"> + <!--其他开始--> + <div class="form-group"> + <label class="col-sm-2 control-label">名称:</label> + <div class="col-sm-8"> + <input name="name" th:field="*{name}" readonly class="form-control m-b" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-2 control-label">用途:</label> + <div class="col-sm-8"> + <input name="purposes" th:field="*{purposes}" readonly class="form-control m-b" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-2 control-label">备注:</label> + <div class="col-sm-8"> + <textarea name="remark" th:field="*{remark}" readonly class="form-control m-b"></textarea> + </div> + </div> + </form> +</div> +<th:block th:include="include :: footer" /> +<th:block th:include="include :: datetimepicker-js" /> +<script th:inline="javascript"> + var prefix = ctx + "system/prementData" + $("#form-propertyinfo-add").validate({ + focusCleanup: true + }); + function submitHandler() { + if ($.validate.form()) { + $.operate.save(prefix + "/add", $('#form-propertyinfo-add').serialize()); + } + } +</script> </body> -</html> \ No newline at end of file +</html> diff --git a/ruoyi-admin/src/main/resources/templates/system/property/ementdata/propertyEment.html b/ruoyi-admin/src/main/resources/templates/system/property/ementdata/propertyEment.html index 566549b..7f9bd2d 100644 --- a/ruoyi-admin/src/main/resources/templates/system/property/ementdata/propertyEment.html +++ b/ruoyi-admin/src/main/resources/templates/system/property/ementdata/propertyEment.html @@ -1,10 +1,123 @@ <!DOCTYPE html> -<html lang="en"> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <head> - <meta charset="UTF-8"> - <title>Title</title> + <th:block th:include="include :: header('密品管理列表')" /> </head> -<body> +<body class="gray-bg"> +<div class="container-div" id="app"> + <div class="row"> + <div class="col-sm-12 search-collapse"> + <form id="formId"> + <div class="select-list"> + <ul> + <li> + <label>登记编号:</label> + <input type="text" name="id"/> + <input type="hidden" name="useId" th:value="*{useId}"/> + </li> + <li> + <label>密品种类:</label> + <select name="propertyType" th:with="type=${@dict.getType('sys_sm_property')}"> + <option value="">所有</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </li> + <li> + <label>使用人:</label> + <input type="text" name="username"/> + </li> + <li> + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> + </li> + </ul> + </div> + </form> + </div> + <div class="btn-group-sm" id="toolbar" role="group"> + <a class="btn btn-success" onclick="hanldAdd()" shiro:hasPermission="system:property:add"> + <i class="fa fa-plus"></i> 添加 + </a> + <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:property:remove"> + <i class="fa fa-remove"></i> 删除 + </a> + <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:property:export"> + <i class="fa fa-download"></i> 导出 + </a> + <a class="btn btn-danger" onclick="closeItem()"> + <i class="fa fa-reply-all"></i> 关闭 + </a> + </div> + <div class="col-sm-12 select-table table-striped"> + <table id="bootstrap-table"></table> + </div> + </div> +</div> +<th:block th:include="include :: footer" /> +<script th:inline="javascript"> + var editFlag = [[${@permission.hasPermi('system:property:edit')}]]; + var removeFlag = [[${@permission.hasPermi('system:property:remove')}]]; + var detailFlag = [[${@permission.hasPermi('system:property:detail')}]] + var propertyTypeDatas = [[${@dict.getType('sys_sm_property')}]]; + var prefix = ctx + "system/prementData"; + var obj = {useId:''}; + obj.useId = [[${useId}]] + '' + // 添加信息 + function hanldAdd() { + table.set(); + $.modal.open("添加" + table.options.modalName, $.operate.addUrl(obj.useId)); + }; + $(function() { + var options = { + url: prefix + "/list", + queryParams:obj, + createUrl: prefix + "/add/{id}", + updateUrl: prefix + "/edit/{id}", + detailUrl: prefix + "/detail/{id}", + removeUrl: prefix + "/remove", + exportUrl: prefix + "/export", + queryParams: queryParams, + modalName: "涉密设备管理", + columns: [{ + checkbox: true + }, + { + field: 'id', + title: '登记编号' + }, + { + field: 'name', + title: '名称' + }, + { + field: 'purposes', + title: '用途' + }, + { + field: 'remark', + title: '备注' + }, + { + title: '操作', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-detail"></i>详情</a> '); + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); + return actions.join(''); + } + }] + }; + $.table.init(options); + }); + + + function queryParams(params) { + var search = $.table.queryParams(params); + search.useId = [[${useId}]]; + return search; + } +</script> </body> -</html> \ No newline at end of file +</html> diff --git a/ruoyi-admin/src/main/resources/templates/system/property/property/property.html b/ruoyi-admin/src/main/resources/templates/system/property/property/property.html index 0220437..46afcde 100644 --- a/ruoyi-admin/src/main/resources/templates/system/property/property/property.html +++ b/ruoyi-admin/src/main/resources/templates/system/property/property/property.html @@ -128,7 +128,8 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('<a class="btn btn-info btn-xs ' + listFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.useId + '\')"><i class="fa fa-list-ul"></i>密品登记</a> '); + var rowData = encodeURIComponent(JSON.stringify(row)); + actions.push('<a class="btn btn-info btn-xs ' + listFlag + '" href="javascript:void(0)" data-row=\'' + rowData + '\' onclick="detail(this)"><i class="fa fa-list-ul"></i>密品登记</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.useId + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.useId + '\')"><i class="fa fa-remove"></i>删除</a>'); return actions.join(''); @@ -180,9 +181,16 @@ } }) /*密品列表-详细*/ - function detail(useId) { - var url = prefix + '/detail/' + useId; - $.modal.openTab("密品列表数据", url); + function detail(element) { + var rowData = $(element).data('row'); + var row = JSON.parse(decodeURIComponent(rowData)); + if (row.secretsType == '1'){ + var url = prefix + '/detail/' + row.useId; + $.modal.openTab("涉密信息设备登记列表", url); + }else{ + var url = prefix + '/ementDetail/' + row.useId; + $.modal.openTab("涉密设备登记列表", url); + } } </script> </body>