涉密网络设备

master
20918 7 months ago
parent 9352b1ef29
commit 3d9c222cf4

@ -43,10 +43,10 @@ public class TdPropertyChangeController extends BaseController {
}
/**
*
*
*/
@RequiresPermissions("system:changeproperty:change")
@GetMapping("/change/{id}")
@GetMapping("/edit/{id}")
public String change(@PathVariable("id") String id, ModelMap mmap)
{
TdPropertyInfo tdPropertyInfo = tdPropertyInfoService.selectTdPropertyInfoById(id);
@ -59,11 +59,35 @@ public class TdPropertyChangeController extends BaseController {
*/
@RequiresPermissions("system:changeproperty:change")
@Log(title = "资产变更", businessType = BusinessType.UPDATE)
@PostMapping("/change")
@PostMapping("/edit")
@ResponseBody
public AjaxResult changeSave(TdPropertyInfo tdPropertyInfo)
{
return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo));
}
/**
*
*/
@RequiresPermissions("system:changeproperty:change")
@GetMapping("/destory/{id}")
public String destory(@PathVariable("id") String id, ModelMap mmap)
{
TdPropertyInfo tdPropertyInfo = tdPropertyInfoService.selectTdPropertyInfoById(id);
mmap.put("tdPropertyInfo", tdPropertyInfo);
return prefix + "/destory";
}
/**
*
*/
@RequiresPermissions("system:changeproperty:change")
@Log(title = "资产变更", businessType = BusinessType.UPDATE)
@PostMapping("/destory")
@ResponseBody
public AjaxResult destorySave(TdPropertyInfo tdPropertyInfo)
{
return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo));
}
}

@ -86,7 +86,7 @@ public class TdPropertyInfoController extends BaseController
@ResponseBody
public AjaxResult addSave(TdPropertyInfo tdPropertyInfo)
{
tdPropertyInfo.setId("Register" + Seq.getId(Seq.commSeqType));
tdPropertyInfo.setId("Register_" + Seq.getId(Seq.commSeqType));
return toAjax(tdPropertyInfoService.insertTdPropertyInfo(tdPropertyInfo));
}

@ -85,7 +85,7 @@ public class TdPropertyNetinfoController extends BaseController
@ResponseBody
public AjaxResult addSave(TdPropertyNetinfo tdPropertyNetinfo)
{
tdPropertyNetinfo.setId("NetInfo" + Seq.getId(Seq.commSeqType));
tdPropertyNetinfo.setId("NetInfo_" + Seq.getId(Seq.commSeqType));
return toAjax(tdPropertyNetinfoService.insertTdPropertyNetinfo(tdPropertyNetinfo));
}
@ -124,4 +124,5 @@ public class TdPropertyNetinfoController extends BaseController
{
return toAjax(tdPropertyNetinfoService.deleteTdPropertyNetinfoByIds(ids));
}
}

@ -1,10 +1,90 @@
<!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">
<form class="form-horizontal m" id="form-info-edit" th:object="${tdPropertyInfo}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">登记编号:</label>
<div class="col-sm-8">
<input name="id" disabled th:field="*{id}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">资产编号:</label>
<div class="col-sm-8">
<input name="useId" disabled th:field="*{useId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">设备品牌:</label>
<div class="col-sm-8">
<input name="propertyBrand" disabled th:field="*{propertyBrand}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">资产种类:</label>
<div class="col-sm-8">
<select name="propertyType" disabled class="form-control m-b" th:with="type=${@dict.getType('sys_sm_property')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{propertyType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">资产型号:</label>
<div class="col-sm-8">
<input name="propertyNo" disabled th:field="*{propertyNo}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">资产SN码</label>
<div class="col-sm-8">
<input name="propertySn" disabled th:field="*{propertySn}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">使用人员:</label>
<div class="col-sm-8">
<input name="username" th:field="*{username}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">使用部门:</label>
<div class="col-sm-8">
<input name="part" th:field="*{part}" class="form-control" type="text">
</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/propertychange";
$("#form-info-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
}
}
$("input[name='maintainDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='destoryDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -1,10 +1,104 @@
<!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">
<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="useId"/>
</li>
<li>
<label>设备品牌:</label>
<input type="text" name="propertyBrand"/>
</li>
<li>
<label>资产型号:</label>
<input type="text" name="propertyNo"/>
</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>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
</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:changeproperty:change')}]];
var destoryFlag = [[${@permission.hasPermi('system:changeproperty:destory')}]];
var removeFlag = [[${@permission.hasPermi('system:changeproperty:remove')}]];
var propertyTypeDatas = [[${@dict.getType('sys_sm_property')}]];
var prefix = ctx + "system/propertychange";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
destoryUrl: prefix + "/destory/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "设备登记",
columns: [{
checkbox: true
},
{
field: 'useId',
title: '资产编号'
},
{
field: 'propertyBrand',
title: '设备品牌'
},
{
field: 'propertyType',
title: '资产种类',
formatter: function(value, row, index) {
return $.table.selectDictLabel(propertyTypeDatas, value);
}
},
{
field: 'propertyNo',
title: '资产型号'
},
{
field: 'propertySn',
title: '资产SN码'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>变更</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + destoryFlag + '" href="javascript:void(0)" onclick="destory(\'' + row.id + '\')"><i class="fa fa-remove"></i>报废</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
function destory(id) {
var url = prefix + '/destory/' + id;
$.modal.open("销毁资产", url);
}
</script>
</body>
</html>

@ -0,0 +1,105 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('更改设备登记')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-info-edit" th:object="${tdPropertyInfo}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">登记编号:</label>
<div class="col-sm-8">
<input name="id" disabled th:field="*{id}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">资产编号:</label>
<div class="col-sm-8">
<input name="useId" disabled th:field="*{useId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">设备品牌:</label>
<div class="col-sm-8">
<input name="propertyBrand" disabled th:field="*{propertyBrand}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">资产种类:</label>
<div class="col-sm-8">
<select name="propertyType" disabled class="form-control m-b" th:with="type=${@dict.getType('sys_sm_property')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{propertyType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">资产型号:</label>
<div class="col-sm-8">
<input name="propertyNo" disabled th:field="*{propertyNo}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">资产SN码</label>
<div class="col-sm-8">
<input name="propertySn" disabled th:field="*{propertySn}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">使用人员:</label>
<div class="col-sm-8">
<input name="username" disabled th:field="*{username}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">使用部门:</label>
<div class="col-sm-8">
<input name="part" disabled th:field="*{part}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">销毁日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="destoryDate" th:value="${#dates.format(tdPropertyInfo.destoryDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">销毁描述:</label>
<div class="col-sm-8">
<input name="propertyRefer" th:field="*{propertyRefer}" class="form-control" type="text">
</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/propertychange";
$("#form-info-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/destory", $('#form-info-edit').serialize());
}
}
$("input[name='maintainDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='destoryDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -83,9 +83,5 @@
<artifactId>captcha-spring-boot-starter</artifactId>
<version>1.2.7</version>
</dependency>
</dependencies>
</project>
Loading…
Cancel
Save