个人博客

2021年6月13日:

今天继续完善了我之前的团队代码,在之前的基础上我今天加了一些其他的功能使系统变得更加完善,今天加的功能是社长的团员绩效评价功能,该功能是社长专有,目的在于社长能对自己社团的团员进行成绩评价,可以对团员提出一些意见或者奖励和惩罚,甚至是开除成员,总的来说,这是我目前完成的代码:

<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:include page="/index_head.jsp">
<jsp:param name="title" value="绩效管理" />
<jsp:param name="needTable" value="true" />
</jsp:include>
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>
团员绩效管理 <small>different form elements</small>
</h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="row">
<div class="col-md-12">
<form class="form-inline">
<div class="form-group">
<label for="clubName">社团名称</label> <select id="clubType"
class="form-control" required>
<option value="0" disabled selected style="display: none;"></option>
<c:forEach items="${clubs}" var="club">
<option value="${club.club_name}">${club.club_name}</option>
</c:forEach>
</select>
</div>
<button type="button" onclick="search()" class="btn btn-info">
<span class="glyphicon glyphicon-search" aria-hidden="true">搜索</span>
</button>
</form>
</div>
</div>
<div class="row">
<table id="table" style="display: none;" data-toggle="table"
data-pagination="true" data-side-pagination="server"
data-sort-name="id"
data-content-type="application/x-www-form-urlencoded"
data-sort-order="asc" data-method="post" data-ajax="ajaxRequest"
data-page-size="3" data-page-list="[2,3,5]"
data-url="${pageContext.request.contextPath}/user/list.json">
<thead>
<tr>
<th data-field="" data-formatter="rowNumber">序号</th>
<th data-field="id">团员id</th>
<th data-field="true_name" data-sortable="false">团员姓名</th>
<th data-field="phone" data-sortable="false">电话</th>
<th data-field="sex">性别</th>
<th data-field="true_name" data-formatter="caozuo">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<jsp:include page="/index_foot.jsp">
<jsp:param name="needTable" value="true" />
</jsp:include>
<script type="text/javascript">
function rowNumber(value, row, index) {
var options = $('#table').bootstrapTable('getOptions');
return options.pageSize * (options.pageNumber - 1) + index + 1;
}
function check(value) {
window.location.href = '${pageContext.request.contextPath}/user/tuanyuanjixiao?name='
+ value;
}
function caozuo(value, row, index) {
return '<button type="button" class="btn btn-primary" onclick="check(\''
+ value + '\')">绩效评价</button>';
}
$(function() {
setTimeout(function() {
}, 20);
})
function ajaxRequest(params) {
var club = {};
club.name = $("#clubType").val();
params.data.obj = club;
$.ajax({
url : params.url,
data : JSON.stringify(params.data),
type : "POST",
contentType : "application/json",
dataType : "json",
success : function(data) {
params.success(data);
}
})
}
function search() {
$("#table").show();
$("#table").bootstrapTable('refresh');
}
</script>

 

 

 这只是一部分,明天我还得继续完善。

posted @ 2021-06-13 22:11  一条快乐的小鲸鱼  阅读(13)  评论(0编辑  收藏  举报