parent
b4bd54752d
commit
6029c4cd64
@ -0,0 +1,87 @@
|
|||||||
|
package com.ruoyi.web.controller.system.apply;
|
||||||
|
|
||||||
|
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.apply.TdApplyInfoList;
|
||||||
|
import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
|
||||||
|
import com.ruoyi.system.domain.train.dto.TdTrainDTO;
|
||||||
|
import com.ruoyi.web.controller.manager.ApplyInfoListManager;
|
||||||
|
import com.ruoyi.web.controller.manager.TrainInfoListManager;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: TrainInfoListController
|
||||||
|
* Package: com.ruoyi.web.controller.system.apply
|
||||||
|
* Description:
|
||||||
|
*
|
||||||
|
* @Author zhaodw
|
||||||
|
* @Create 2025/5/15 15:31
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/system/train")
|
||||||
|
public class TrainInfoListController extends BaseController {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(TrainInfoListController.class);
|
||||||
|
|
||||||
|
private String prefix = "system/newdev/train";
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private TrainInfoListManager trainInfoListManager;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ApplyInfoListManager applyInfoListManager;
|
||||||
|
|
||||||
|
|
||||||
|
@RequiresPermissions("system:train:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String applyListInfo() {
|
||||||
|
return prefix + "/trainList";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:train:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(TdApplyInfoListDTO applyInfoListDTO) {
|
||||||
|
startPage();
|
||||||
|
List<TdApplyInfoList> tdApplyInfoLists = applyInfoListManager.selectTdApplyInfoListListByApplyStatus(applyInfoListDTO);
|
||||||
|
return getDataTable(tdApplyInfoLists);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存教育培训信息
|
||||||
|
*/
|
||||||
|
@Log(title = "保存教育培训信息", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(TdTrainDTO tdTrainDTO) {
|
||||||
|
return toAjax(trainInfoListManager.saveOrUpdate(tdTrainDTO));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开教育培训页面
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:train:edit")
|
||||||
|
@GetMapping("/detail/{applyId}")
|
||||||
|
public String edit(@PathVariable("applyId") String applyId, ModelMap mmap) {
|
||||||
|
TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId);
|
||||||
|
mmap.put("applyInfoList", applyInfoList);
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,197 @@
|
|||||||
|
<!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 :: datetimepicker-css" />
|
||||||
|
<th:block th:include="include :: jasny-bootstrap-css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="main-content">
|
||||||
|
<form id="form-train-add" class="form-horizontal" th:object="${applyInfoList}">
|
||||||
|
<input name="applyId" type="hidden" th:field="*{applyId}" />
|
||||||
|
<h4 class="form-header h4">基本信息</h4>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label is-required">姓名:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="name" id="name" placeholder="请输入姓名" th:field="*{name}" readonly="readonly" class="form-control" type="text" maxlength="30" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label is-required">所在部门:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deptName" id="deptName" placeholder="请输入所在部门" class="form-control" type="text" maxlength="30" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label is-required">所在岗位:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="trainPost" name="trainPost" placeholder="请输入所在岗位" class="form-control" type="text" maxlength="30" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label is-required">培训时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="trainTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label is-required">培训地点:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="trainAddress" name="trainAddress" placeholder="请输入培训地点" class="form-control" type="text" maxlength="30" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label is-required">承办部门:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="organizeDept" name="organizeDept" placeholder="请输入承办部门" class="form-control" type="text" maxlength="30" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label is-required">教育时长:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="eductTime" name="eductTime" required class="form-control" placeholder="请输入教育时长" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label is-required">承办部门意见:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<textarea id="organizeMsg" name="organizeMsg" required class="form-control"
|
||||||
|
placeholder="请输入承办部门意见"
|
||||||
|
rows="5"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label is-required">保密教育主要内容:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<!-- 改为 textarea 标签,增加 rows 属性控制行数 -->
|
||||||
|
<textarea id="eductContent" name="eductContent" required class="form-control"
|
||||||
|
placeholder="请输入保密教育主要内容"
|
||||||
|
rows="5"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label ">备注:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<textarea id="remark" name="remark" class="form-control"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
rows="5" style="width: 100%"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label ">照片上传:</label>
|
||||||
|
<br/>
|
||||||
|
<div class="fileinput fileinput-new" data-provides="fileinput">
|
||||||
|
<div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px;"></div>
|
||||||
|
<div>
|
||||||
|
<span class="btn btn-white btn-file">
|
||||||
|
<span class="fileinput-new">选择图片</span>
|
||||||
|
<span class="fileinput-exists">更改</span>
|
||||||
|
<input type="file" id="applyUrlId" >
|
||||||
|
<input type="hidden" id="photoUrl" name="photoUrl">
|
||||||
|
</span>
|
||||||
|
<a href="#" class="btn btn-white fileinput-exists" data-dismiss="fileinput">清除</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-offset-5 col-sm-10">
|
||||||
|
<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>提 交</button>
|
||||||
|
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: select2-js" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<th:block th:include="include :: jasny-bootstrap-js" />
|
||||||
|
<script>
|
||||||
|
var prefix = ctx + "system/train";
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.modal.confirm("请认真核对填写信息,提交后不允许修改!", function () {
|
||||||
|
var data = $("#form-train-add").serializeArray();
|
||||||
|
$.operate.saveTab(prefix + "/add", data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//图片上传
|
||||||
|
$('#applyUrlId').on('change.bs.fileinput ', function (e) {
|
||||||
|
// 处理自己的业务
|
||||||
|
var file = e.target.files[0];
|
||||||
|
var data = new FormData();
|
||||||
|
data.append("file", file);
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: ctx + "common/upload",
|
||||||
|
data: data,
|
||||||
|
cache: false,
|
||||||
|
contentType: false,
|
||||||
|
processData: false,
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$("#photoUrl").val(result.url);
|
||||||
|
} else {
|
||||||
|
$.modal.alertError(result.msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(error) {
|
||||||
|
$.modal.alertWarning("图片上传失败。");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
$("input[name='trainTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,115 @@
|
|||||||
|
<!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" id="app">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label style="width: 80px">姓名:</label>
|
||||||
|
<input type="text" name="name"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>性别:</label>
|
||||||
|
<input type="text" name="sex"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>身份证号:</label>
|
||||||
|
<input type="text" name="cerno"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>联系方式:</label>
|
||||||
|
<input type="text" name="phone"/>
|
||||||
|
</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="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 detailFlag = [[${@permission.hasPermi('system:apply:edit')}]]
|
||||||
|
|
||||||
|
var prefix = ctx + "system/train";
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
detailUrl:prefix + "/detail/{id}",
|
||||||
|
modalName: "教育培训人员",
|
||||||
|
type: 0,
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'applyId',
|
||||||
|
title: 'id',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'name',
|
||||||
|
title: '姓名'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'sex',
|
||||||
|
title: '性别'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'nationality',
|
||||||
|
title: '民族',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'maritalStatus',
|
||||||
|
title: '婚姻状况',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'cerno',
|
||||||
|
title: '身份证号',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'phone',
|
||||||
|
title: '联系方式',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'smPost',
|
||||||
|
title: '已(拟)任涉密岗位',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'smGrade',
|
||||||
|
title: '涉密等级',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'createTime',
|
||||||
|
title: '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-info btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailTab(\'' + row.applyId + '\')"><i class="fa fa-edit"></i>教育培训</a> ');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in new issue