Merge remote-tracking branch 'origin/new-exam' into new-exam

pg_adapter
wangxy 8 months ago
commit 8214d52d8f

@ -62,4 +62,14 @@ public class TdPropertyChangeListController extends BaseController {
mmap.put("useId",useId);
return "system/property/propertychange/changeproperty";
}
/**
*
*/
@RequiresPermissions("system:change:detail")
@GetMapping("/ementChDetail/{useId}")
public String ementChDetail(@PathVariable("useId") String useId, ModelMap mmap)
{
mmap.put("useId",useId);
return "system/property/ementChange/ementChange";
}
}

@ -0,0 +1,68 @@
package com.ruoyi.web.controller.system.property;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TdPropertyEment;
import com.ruoyi.web.controller.manager.TdPropertyEmentManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Controller
*/
@Controller
@RequestMapping("/system/ementDestory")
public class TdPropertyEmentDestoryController extends BaseController {
private String prefix = "system/property/ementDestory";
@Autowired
private TdPropertyEmentManager tdPropertyEmentManager;
@RequiresPermissions("system:ementDestory:view")
@GetMapping()
public String ementDestory() {
return prefix + "/ementList";
}
/**
*
*/
@RequiresPermissions("system:ementDestory:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdPropertyEment tdPropertyEment) {
startPage();
List<TdPropertyEment> tdPropertyEments = tdPropertyEmentManager.selectEmentList(tdPropertyEment);
return getDataTable(tdPropertyEments);
}
/**
*
*/
@RequiresPermissions("system:ementDestory:destroy")
@GetMapping("/destory/{id}")
public String ementDestory(@PathVariable("id") String id, ModelMap mmap) {
TdPropertyEment tdPropertyEment = tdPropertyEmentManager.selecttdEment(id);
mmap.put("tdPropertyEment", tdPropertyEment);
return prefix + "/ementDestory";
}
/**
*
*/
@RequiresPermissions("system:ementDestory:destroy")
@Log(title = "涉密设备销毁", businessType = BusinessType.UPDATE)
@PostMapping("/update")
@ResponseBody
public AjaxResult update(TdPropertyEment tdPropertyEment) {
return toAjax(tdPropertyEmentManager.saveOrUpdate(tdPropertyEment));
}
}

@ -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";
}
}

@ -0,0 +1,49 @@
<!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="${tdPropertyEment}">
<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="name" disabled th:field="*{name}" 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="destoryType" class="form-control m-b" th:with="type=${@dict.getType('sys_baofei_type')}">
<option value="">---请选择---</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{destoryType}"></option>
</select>
</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/ementChange";
$("#form-info-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/destorySave", $('#form-info-edit').serialize());
}
}
</script>
</body>
</html>

@ -0,0 +1,135 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('设备登记列表')" />
</head>
<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="id"/>
</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">
<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:changeproperty:change')}]];
var destoryFlag = [[${@permission.hasPermi('system:changeproperty:destory')}]];
var removeFlag = [[${@permission.hasPermi('system:changeproperty:remove')}]];
var propertyTypeDatas = [[${@dict.getType('sys_sm_property')}]];
var destoryTypeDatas = [[${@dict.getType('sys_baofei_type')}]];
var destoryStartsDatas = [[${@dict.getType('sys_maintain_state')}]];
var prefix = ctx + "system/ementChange";
$(function() {
var options = {
url: prefix + "/list",
updateUrl: prefix + "/edit/{id}",
destoryUrl: prefix + "/destory/{id}",
queryParams: queryParams,
modalName: "涉密设备维修",
columns: [
{
field: 'id',
title: '登记编号'
},
{
field: 'name',
title: '名称'
},
{
field: 'maintainDepart',
title: '维修部门'
},
{
field: 'maintainUser',
title: '维修人员'
},
{
field: 'maintainDate',
title: '维修日期',
formatter: function(value, row, index) {
const date = new Date(value);
const year = date.getFullYear();
const month = ('0' + (date.getMonth() + 1)).slice(-2);
const day = ('0' + date.getDate()).slice(-2);
return `${year}-${month}-${day}`
}
},
{
field: 'maintainState',
title: '维修状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(destoryStartsDatas, value);
}
},
{
field: 'destoryType',
title: '报废状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(destoryTypeDatas, value);
}
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
if (row.destoryState===null){
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>');
}else{
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" disabled><i class="fa fa-edit"></i>维修</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + destoryFlag + '" href="javascript:void(0)" disabled><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;
}
function destory(id) {
var url = prefix + '/destory/' + id;
$.modal.open("密品报废", url);
}
</script>
</body>
</html>

@ -0,0 +1,79 @@
<!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="${tdPropertyEment}">
<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="*{name}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">维修人员:</label>
<div class="col-sm-8">
<input name="maintainUser" required th:field="*{maintainUser}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">维修部门:</label>
<div class="col-sm-8">
<input name="maintainDepart" required th:field="*{maintainDepart}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">维修日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="maintainDate" required th:value="${#dates.format(tdPropertyEment.maintainDate, '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">
<textarea name="maintainRemark" class="form-control">[[*{maintainRemark}]]</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/ementChange";
$("#form-info-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/update", $('#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>

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</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>
</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>
</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>&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">
<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>
</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>

@ -113,7 +113,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> ');
return actions.join('');
}
}]
@ -162,10 +163,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 + '/ementChDetail/' + row.useId;
$.modal.openTab("涉密设备登记列表", url);
}
}
</script>
</body>

Loading…
Cancel
Save