Browse Source

[feat] 新增:消息提醒页面

dev
zhangsiqi 6 months ago
parent
commit
0d1e3b653e
  1. 129
      ruoyi-admin/src/main/resources/templates/remind/remind.html
  2. 180
      ruoyi-admin/src/main/resources/templates/remind/view.html

129
ruoyi-admin/src/main/resources/templates/remind/remind.html

@ -0,0 +1,129 @@
<!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('消息提醒')" />
<th:block th:include="include :: select2-css" />
</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="params[materialNo]"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="materialName"/>
</li>
<li>
<label>审核状态:</label>
<select name="auditStatus" th:with="type=${@dict.getType('auditStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>使用状态:</label>
<select name="useStatus" th:with="type=${@dict.getType('useStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>工程员:</label>
<select id="createBySel" name="businessMembers">
<option value="">所有</option>
</select>
</li>
<li class="select-time">
<label>时间区间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</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" />
<th:block th:include="include :: select2-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var prefix = ctx + "remind";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
itemUrl: prefix + "/item",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
detailUrl: prefix + "/detail/{id}",
pageList: [10, 25, 50],
pageSize: 10,
showColumns: true,
modalName: "消息提醒",
fixedColumns: true, // 启用冻结列
fixedRightNumber: 1, // 冻结右列个数
height: $(window).height() - 100,
columns: [
{checkbox: true},
{field: 'id', title: '序号', align: 'center'},
{field: 'remindName', title: '提醒人', align: 'center'},
{field: 'remindDeptName', title: '提醒人部门', align: 'center'},
{field: 'remindDate', title: '提醒时间', align: 'center'},
{field: 'formUrl', title: '表单地址', align: 'center', visible: false},
{field: 'formName', title: '表单', align: 'center'},
{
field: 'remindContent', title: '提醒内容', align: 'center',
cellStyle: 'colStyle', //缩放
formatter: 'hoverShow', //鼠标停留显示
},
{field: 'receiverName', title: '接收人', align: 'center'},
{
field: 'isView', title: '是否查看', align: 'center',
formatter: function (value, row, index) {
if (value == "0") {
return "否";
}
return "是";
}
},
{
title: '操作', align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="' + ctx + "remind/view/" + row.id + '"><i class="fa fa-user"></i> 表单数据</a> ');
return actions.join('');
}
}
],
onLoadError: function (status, res) {
window.location.href = "/login";
},
onClickRow: function (row, $element) {
}
};
$.table.init(options);
});
</script>
</body>
</html>

180
ruoyi-admin/src/main/resources/templates/remind/view.html

@ -0,0 +1,180 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('我的提醒')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: theme" />
<th:block th:include="include :: bootstrap-datepicker-css" />
<th:block th:include="include :: bootstrap-table-css" />
<th:block th:include="include :: bootstrap-table-editable-css" />
<th:block th:include="include :: fileinput-css" />
<style type="text/css">
html, body {
height: 100%;
}
</style>
</head>
<body style="overflow-x: hidden;">
<div style="background-color: #eff3f8; padding-top: 1px; height: 100%;">
<div class="modal fade" id="portlet-config" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true"></button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">Widget settings form goes here</div>
<div class="modal-footer">
<button type="button" class="btn blue">Save changes</button>
<button type="button" class="btn default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="portlet light bordered">
<div class="portlet-title">
<div class="caption">
<i class="icon-equalizer font-red-sunglo"></i> <span
class="caption-subject font-red-sunglo bold uppercase">我的提醒</span>
</div>
<div class="tools">
<a href="" class="collapse" data-original-title="" title="">
</a> <a href="#portlet-config" data-toggle="modal" class="config"
data-original-title="" title=""> </a> <a href="" class="reload"
data-original-title="" title=""> </a> <a href="" class="remove"
data-original-title="" title=""> </a>
</div>
</div>
<div class="portlet-body form">
<form th:action="@{/remind/add}" id="remindForm"
name="remindForm" method="post" enctype="multipart/form-data">
<div class="form-body">
<input type="hidden" name="table1" id="table1">
<div class="row">
<div class="col-md-12" align="center">
<h1>我的提醒</h1>
</div>
</div>
<div class="row" style="display: none">
<div class="col-md-12" align="center">
<input type="text" class="form-control" name="id"
id="id">
</div>
</div>
<div class="row">
<div class="col-md-2" align="center">提醒人</div>
<div class="col-md-2">
<input type="text" class="form-control" name="remindName"
id="remindName" readOnly>
</div>
<div class="col-md-2" align="center">提醒人部门</div>
<div class="col-md-2">
<input type="text" class="form-control" name="remindDeptName"
id="remindDeptName" readOnly>
</div>
<div class="col-md-2" align="center">提醒时间</div>
<div class="col-md-2">
<input
class="form-control form-control-inline input-medium date-picker"
size="16" type="text" data-date-format="yyyy-mm-dd" disabled
name="remindDate" id="remindDate" />
</div>
</div>
<div class="row">
<div class="col-md-2" align="center">表单</div>
<div class="col-md-2">
<a class="form-control" id="formUrl" name="formUrl"></a>
</div>
</div>
<div class="row">
<div class="col-md-2" align="center">提醒内容</div>
<div class="col-md-10">
<textarea rows="8" cols="10" class="form-control" name="remindContent"
id="remindContent" readOnly></textarea>
</div>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-12">
<div class="row">
<div align="center">
<button type="button" class="btn gray-haze" id="cancel">
取消</button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: page-js" />
<th:block th:include="include :: bootstrap-datepicker-js" />
<th:block th:include="include :: bootstrap-table-js" />
<th:block th:include="include :: fileinput-js" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:inline="javascript">id = [[${id}]];</script>
<script th:src="@{/assets/admin/pages/scripts/components-pickers.js}"
type="text/javascript"></script>
<script>
var prefix = ctx + "remind";
jQuery(document).ready(function() {
Metronic.init(); // init metronic core components
Layout.init(); // init current layout
Demo.init(); // init demo features
ComponentsPickers.init();
});
$.ajax({
url : prefix + '/edit',
data : {
id : id
},
success : function(data) {
console.log(data);
}
});
$.ajax({
url : prefix + '/getRemind',
data : {
id : id
},
success : function(data) {
//赋值
$('#id').val(data.id);
$('#remindName').val(data.remindName);
$('#remindDeptName').val(data.remindDeptName);
$('#remindDate').val(data.remindDate);
$('#formUrl').attr("href",ctx+data.formUrl);
$('#formUrl').text(data.formName);
$('#remindContent').val(data.remindContent);
}
});
$("#cancel").click(function() {
//拦截器拦截session失效登录跳转
window.history.back();
})
</script>
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>
Loading…
Cancel
Save