前言

上一篇分享了会议通知以及会议反馈,根据需求来今天应该到了,历史会议、待开会议以及所有会议了。


一、需求分析

历史会议:登录人员,属于参与者列席者或者主人其中一个时,并且会议状态为已结束时,要将数据查询出来。

待开会议:登录人员,属于参与者列席者或者主人其中一个时,并且会议状态为待开时,要将数据查询出来。

所有会议:登录人员,属于参与者列席者或者主人其中一个时,要将数据查询出来。

编写SQL语句

待开会议

select a.id,a.title,a.content,a.canyuze,a.liexize,a.zhuchiren ,b.name zhuchirenname,a.location,DATE_FORMAT(a.startTime,'%Y-%m-%d %H-%m-%s') startTime,DATE_FORMAT(a.endTime,'%Y-%m-%d %H-%m-%s') endTime, a.state, (case a.statewhen 0 then '取消会议'when 1 then '新建' when 2 then '待审核' when 3 then '驳回' when 4 then '待开'when 5 then '进行中'when 6 then '开启投票' when 7 then '结束会议'else '其他' end) meetingstate,a.seatPic,a.remark,a.auditor, c.name auditorname from t_oa_meeting_info a inner join t_oa_user b on a.zhuchiren=b.id left join t_oa_user c on a.auditor=c.id where 1=1 and state = 4 and FIND_IN_SET(6,CONCAT(canyuze,',',liexize,',',zhuchiren))

所有会议

​
select a.id,a.title,a.content,a.canyuze,a.liexize,a.zhuchiren ,b.name zhuchirenname,a.location,DATE_FORMAT(a.startTime,'%Y-%m-%d %H-%m-%s') startTime,DATE_FORMAT(a.endTime,'%Y-%m-%d %H-%m-%s') endTime, a.state, (case a.statewhen 0 then '取消会议'when 1 then '新建' when 2 then '待审核' when 3 then '驳回' when 4 then '待开'when 5 then '进行中'when 6 then '开启投票' when 7 then '结束会议'else '其他' end) meetingstate,a.seatPic,a.remark,a.auditor, c.name auditorname from t_oa_meeting_info a inner join t_oa_user b on a.zhuchiren=b.id left join t_oa_user c on a.auditor=c.id where 1=1 and FIND_IN_SET(6,CONCAT(a.canyuze,',',a.liexize,',',a.zhuchiren,',',IFNULL(a.auditor,-1)))​

历史会议

​
select a.id,a.title,a.content,a.canyuze,a.liexize,a.zhuchiren ,b.name zhuchirenname,a.location,DATE_FORMAT(a.startTime,'%Y-%m-%d %H-%m-%s') startTime,DATE_FORMAT(a.endTime,'%Y-%m-%d %H-%m-%s') endTime, a.state, (case a.statewhen 0 then '取消会议'when 1 then '新建' when 2 then '待审核' when 3 then '驳回' when 4 then '待开'when 5 then '进行中'when 6 then '开启投票' when 7 then '结束会议'else '其他' end) meetingstate,a.seatPic,a.remark,a.auditor, c.name auditorname from t_oa_meeting_info a inner join t_oa_user b on a.zhuchiren=b.id left join t_oa_user c on a.auditor=c.id where 1=1 and state = 7 and FIND_IN_SET(6,CONCAT(canyuze,',',liexize,',',zhuchiren))​

二、编码

后端:

MeetingInfoDao

package com.zking.dao;import java.sql.SQLException;
import java.util.List;
import java.util.Map;import com.zking.entity.MeetingInfo;
import com.zking.util.BaseDao;
import com.zking.util.PageBean;
import com.zking.util.StringUtils;public class MeetingInfoDao extends BaseDao<MeetingInfo> {// 添加会议信息public int add(MeetingInfo info) throws Exception {String sql = "insert into t_oa_meeting_info(title,content,canyuze,liexize,zhuchiren,\r\n"+ "location,startTime,endTime,remark) values(?,?,?,?,?,?,?,?,?)";return super.executeUpdate(sql, info, new String[] { "title", "content", "canyuze", "liexize", "zhuchiren","location", "startTime", "endTime", "remark" });}//我的会议SQL,后续其他的菜单也会使用private String getSQL() {return "select a.id,a.title,a.content,a.canyuze,a.liexize,a.zhuchiren\r\n" + ",b.name zhuchirenname,\r\n" + "a.location,\r\n" + "DATE_FORMAT(a.startTime,'%Y-%m-%d %H-%m-%s') startTime,\r\n" + "DATE_FORMAT(a.endTime,'%Y-%m-%d %H-%m-%s') endTime,\r\n" + "a.state,\r\n" + "(\r\n" + " case a.state\r\n" + "    when 0 then '取消会议'\r\n" + "    when 1 then '新建'\r\n" + "  when 2 then '待审核'\r\n" + " when 3 then '驳回'\r\n" + "  when 4 then '待开'\r\n" + "  when 5 then '进行中'\r\n" + " when 6 then '开启投票'\r\n" + "    when 7 then '结束会议'\r\n" + "    else '其他' end\r\n" + ") meetingstate,\r\n" + "a.seatPic,a.remark,a.auditor,\r\n" + "c.name auditorname\r\n" + "from t_oa_meeting_info a\r\n" + "inner join t_oa_user b on a.zhuchiren=b.id\r\n" + "left join t_oa_user c on a.auditor=c.id where 1=1 ";}//我的会议public List<Map<String, Object>> myInfos(MeetingInfo info, PageBean pageBean)throws SQLException, InstantiationException, IllegalAccessException {String sql = getSQL();//会议标题String title = info.getTitle();if(StringUtils.isNotBlank(title)) {sql+=" and title like '%"+title+"%'";}sql+=" and zhuchiren="+info.getZhuchiren();
//      排序按照降序展示sql+=" order by a.id desc ";return super.executeQuery(sql, pageBean);}//    设置会议排座图片public int updateSeatPicById(MeetingInfo info) throws Exception {String sql =" update t_oa_meeting_info set seatPic=? where id=?";return super.executeUpdate(sql, info, new String[] {"seatPic","id"});}// 根据会议ID更新会议的审批人(送审)public int updateAuditorById(MeetingInfo info) throws Exception {String sql="update t_oa_meeting_info set auditor=?,state=2 where id=?";return super.executeUpdate(sql, info, new String[] {"auditor","id"});}public List<Map<String, Object>> myAudit(MeetingInfo info, PageBean pageBean) throws Exception {String sql = getSQL();//会议标题String title = info.getTitle();if(StringUtils.isNotBlank(title)) {sql+=" and title like '%"+title+"%'";}
//      当前登录账号是会议信息表中 审批人字段值sql+=" and a.auditor="+info.getAuditor();
//      只查询会议状态为 2 即待审核的会议sql+=" and state = 2 ";
//      排序按照降序展示sql+=" order by a.id desc ";return super.executeQuery(sql, pageBean);}//    待开会议public List<Map<String, Object>> queryMeetingInfoByState(MeetingInfo info, PageBean pageBean) throws InstantiationException, IllegalAccessException, SQLException {String sql="select a.id,a.title,a.content,a.canyuze,a.liexize,a.zhuchiren \r\n" + "             ,b.name zhuchirenname,\r\n" + "              a.location,\r\n" + "             DATE_FORMAT(a.startTime,'%Y-%m-%d %H-%m-%s') startTime,\r\n" + "               DATE_FORMAT(a.endTime,'%Y-%m-%d %H-%m-%s') endTime, \r\n" + "              a.state, \r\n" + "               (case a.state\r\n" + "               when 0 then '取消会议'\r\n" + "                when 1 then '新建' \r\n" + "             when 2 then '待审核' \r\n" + "                when 3 then '驳回' \r\n" + "             when 4 then '待开'\r\n" + "              when 5 then '进行中'\r\n" + "             when 6 then '开启投票' \r\n" + "               when 7 then '结束会议'\r\n" + "                else '其他' end\r\n" + "             ) meetingstate,\r\n" + "             a.seatPic,a.remark,a.auditor, \r\n" + "              c.name auditorname \r\n" + "             from t_oa_meeting_info a \r\n" + "               inner join t_oa_user b on a.zhuchiren=b.id \r\n" + "                left join t_oa_user c on a.auditor=c.id where 1=1 \r\n" + "                and state = 4 and FIND_IN_SET("+info.getZhuchiren()+",CONCAT(canyuze,',',liexize,',',zhuchiren))";return super.executeQuery(sql, pageBean);}//    所有会议public List<Map<String, Object>> allInfos(MeetingInfo info, PageBean pageBean) throws InstantiationException, IllegalAccessException, SQLException {String sql="select a.id,a.title,a.content,a.canyuze,a.liexize,a.zhuchiren \r\n" + "                ,b.name zhuchirenname,\r\n" + "              a.location,\r\n" + "             DATE_FORMAT(a.startTime,'%Y-%m-%d %H-%m-%s') startTime,\r\n" + "               DATE_FORMAT(a.endTime,'%Y-%m-%d %H-%m-%s') endTime, \r\n" + "              a.state, \r\n" + "               (case a.state\r\n" + "               when 0 then '取消会议'\r\n" + "                when 1 then '新建' \r\n" + "             when 2 then '待审核' \r\n" + "                when 3 then '驳回' \r\n" + "             when 4 then '待开'\r\n" + "              when 5 then '进行中'\r\n" + "             when 6 then '开启投票' \r\n" + "               when 7 then '结束会议'\r\n" + "                else '其他' end\r\n" + "             ) meetingstate,\r\n" + "             a.seatPic,a.remark,a.auditor, \r\n" + "              c.name auditorname \r\n" + "             from t_oa_meeting_info a \r\n" + "               inner join t_oa_user b on a.zhuchiren=b.id \r\n" + "                left join t_oa_user c on a.auditor=c.id where 1=1 \r\n" + "                and FIND_IN_SET("+info.getZhuchiren()+",CONCAT(a.canyuze,',',a.liexize,',',a.zhuchiren,',',IFNULL(a.auditor,-1)))";return super.executeQuery(sql, pageBean);}
//历史会议public List<Map<String, Object>> queryMeetingHistoryInfoByState(MeetingInfo info, PageBean pageBean) throws InstantiationException, IllegalAccessException, SQLException {String sql = "select CONCAT(\r\n" + " canyuze,',',liexize,',',zhuchiren),a.id,a.title,a.content,a.canyuze,a.liexize,a.zhuchiren,\r\n" + " b.`name` zhuchirenname,\r\n" + " a.location,\r\n" + " DATE_FORMAT(a.startTime,'%y-%m-%d %h-%M-%s') startTime,\r\n" + " DATE_FORMAT(a.endTime,'%y-%m-%d %h-%M-%s') endTime,\r\n" + " a.state,\r\n" + " (\r\n" + "  case a.state\r\n" + "  when 0 then '取消会议'\r\n" + "  when 1 then '新建'\r\n" + "  when 2 then '待审核'\r\n" + "  when 3 then '驳回'\r\n" + "  when 4 then '待开'\r\n" + "  when 5 then '进行中'\r\n" + "  when 6 then '开启投票'\r\n" + "  when 7 then '结束'\r\n" + "  else '其它' end \r\n" + " ) meetingstate,\r\n" + " a.seatPic,a.remark,a.auditor,\r\n" + " c.`name` auditorname from t_oa_meeting_info a\r\n" + " inner join t_oa_user b on a.zhuchiren = b.id\r\n" + " left join t_oa_user c on a.auditor = c.id where 1=1\r\n" + " and state = 7 and FIND_IN_SET("+info.getZhuchiren()+",CONCAT(\r\n" + " canyuze,',',liexize,',',zhuchiren))";return super.executeQuery(sql, pageBean);}}

MeetingInfoAction

package com.zking.web;import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import org.apache.commons.beanutils.ConvertUtils;import com.zking.dao.MeetingInfoDao;
import com.zking.entity.MeetingInfo;
import com.zking.framework.ActionSupport;
import com.zking.framework.ModelDriver;
import com.zking.util.Base64ImageUtils;
import com.zking.util.MyDateConverter;
import com.zking.util.PageBean;
import com.zking.util.PropertiesUtil;
import com.zking.util.R;
import com.zking.util.ResponseUtil;public class MeetingInfoAction extends ActionSupport implements ModelDriver<MeetingInfo>{private MeetingInfo info = new MeetingInfo();private MeetingInfoDao infoDao = new MeetingInfoDao();@Overridepublic MeetingInfo getModel() {
//      注册一个转换器ConvertUtils.register(new MyDateConverter(), Date.class);return info;}public String add(HttpServletRequest req, HttpServletResponse resp) {try {
//          rs是sql语句执行的影响行数int rs = infoDao.add(info);if(rs > 0) {ResponseUtil.writeJson(resp, R.ok(200, "会议信息数据新增成功"));}else {ResponseUtil.writeJson(resp, R.error(0, "会议信息数据新增失败"));}} catch (Exception e) {e.printStackTrace();try {ResponseUtil.writeJson(resp, R.error(0, "会议信息数据新增失败"));} catch (Exception e1) {e1.printStackTrace();}}return null;}//  我的会议public String myInfos(HttpServletRequest req, HttpServletResponse resp) {try {PageBean pageBean = new PageBean();pageBean.setRequest(req);List<Map<String, Object>> list = infoDao.myInfos(info, pageBean);
//          注意:layui中的数据表格的格式ResponseUtil.writeJson(resp, R.ok(0, "我的会议数据查询成功" , pageBean.getTotal(), list));} catch (Exception e) {e.printStackTrace();try {ResponseUtil.writeJson(resp, R.error(0, "我的会议数据查询失败"));} catch (Exception e1) {e1.printStackTrace();}}return null;}//   我的审批public String myAudit(HttpServletRequest req, HttpServletResponse resp) {try {PageBean pageBean = new PageBean();pageBean.setRequest(req);List<Map<String, Object>> infos = infoDao.myAudit(info, pageBean);ResponseUtil.writeJson(resp, R.ok(0, "我的审批查询成功", pageBean.getTotal(), infos));} catch (Exception e) {e.printStackTrace();try {ResponseUtil.writeJson(resp, R.error(0, "我的审批查询失败"));} catch (Exception e1) {e1.printStackTrace();}}return null;}// 取消会议public String del(HttpServletRequest req, HttpServletResponse resp) {try {PageBean pageBean = new PageBean();pageBean.setRequest(req);int upd = infoDao.updateState(info);
//          注意:layui中的数据表格的格式if(upd > 0) {ResponseUtil.writeJson(resp, R.ok(200, "会议取消成功"));}else {ResponseUtil.writeJson(resp, R.error(0, "会议取消失败"));}} catch (Exception e) {e.printStackTrace();try {ResponseUtil.writeJson(resp, R.error(0, "会议取消失败"));} catch (Exception e1) {e1.printStackTrace();}}return null;}//    根据会议id更新排座public String updateSeatPicById(HttpServletRequest req,HttpServletResponse resp) throws Exception{try {//1.将排座图片保存到指定的位置并得到图片路径//1) 定义会议图片的保存路径String serverPath=PropertiesUtil.getValue("serverPath");String dirPath=PropertiesUtil.getValue("dirPath");//2) 定义会议排座图片的名称(最终要保存到数据库表中),例如:/uploads/xxxxx.jpgString fileName=UUID.randomUUID().toString().replace("-", "")+".jpg";//3) 拼接成完整的路径String realPath=dirPath+fileName;//4) 将图片保存到指定位置Base64ImageUtils.GenerateImage(info.getSeatPic().replace("data:image/png;base64,",""), realPath);//2.根据会议ID修改会议图片信息info.setSeatPic(serverPath+fileName);infoDao.updateSeatPicById(info);ResponseUtil.writeJson(resp, R.ok(200, "更新会议的排座图片成功"));} catch (Exception e) {e.printStackTrace();try {ResponseUtil.writeJson(resp, R.error(0, "更新会议的排座图片失败"));} catch (Exception e1) {e1.printStackTrace();}}return null;}//    根据会议ID更新会议的审批人(送审)public String updateAuditorById(HttpServletRequest req, HttpServletResponse resp) {try {int rs = infoDao.updateAuditorById(info);if (rs > 0) {ResponseUtil.writeJson(resp, R.ok(200, "会议审批成功"));}else {ResponseUtil.writeJson(resp, R.error(0, "会议审批失败"));}} catch (Exception e) {e.printStackTrace();try {ResponseUtil.writeJson(resp, R.error(0, "会议审批失败"));} catch (Exception e1) {e1.printStackTrace();}}return null;}// 历史会议public String queryMeetingHistoryInfoByState(HttpServletRequest req, HttpServletResponse resp) {try {PageBean pageBean = new PageBean();pageBean.setRequest(req);List<Map<String, Object>> infos = infoDao.queryMeetingHistoryInfoByState(info, pageBean);ResponseUtil.writeJson(resp, R.ok(0, "历史会议查询成功!!!", pageBean.getTotal(), infos));} catch (Exception e) {e.printStackTrace();try {ResponseUtil.writeJson(resp, R.error(0, "历史会议查询失败!!!"));} catch (Exception e1) {e1.printStackTrace();}}return null;}public String queryMeetingInfoByState(HttpServletRequest req, HttpServletResponse resp) {try {PageBean pageBean = new PageBean();pageBean.setRequest(req);List<Map<String, Object>> infos = infoDao.queryMeetingInfoByState(info, pageBean);ResponseUtil.writeJson(resp, R.ok(0, "会议查询成功!!!", pageBean.getTotal(), infos));} catch (Exception e) {e.printStackTrace();try {ResponseUtil.writeJson(resp, R.error(0, "会议查询失败"));} catch (Exception e1) {e1.printStackTrace();}}return null;}public String allInfos(HttpServletRequest req, HttpServletResponse resp) {try {PageBean pageBean = new PageBean();pageBean.setRequest(req);List<Map<String, Object>> infos = infoDao.allInfos(info, pageBean);ResponseUtil.writeJson(resp, R.ok(0, "会议查询成功!!!", pageBean.getTotal(), infos));} catch (Exception e) {e.printStackTrace();try {ResponseUtil.writeJson(resp, R.error(0, "会议查询失败"));} catch (Exception e1) {e1.printStackTrace();}}return null;}}

前端:

meetingAll.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/meeting/meetingAll.js"></script>
</head>
<style>
body{margin:15px;
}
.layui-table-cell {height: inherit;}
.layui-layer-page .layui-layer-content {  overflow: visible !important;}
</style>
<body><div class="layui-form-item"><div class="layui-inline"><label class="layui-form-label">会议标题:</label><div class="layui-input-inline"><input type="hidden" id="userid" value="${sessionScope.user.id }"/><input type="text" id="title" autocomplete="off"class="layui-input"></div></div><div class="layui-inline"><button id="btn_meeting_search" class="layui-btn layui-btn-normal"><i class="layui-icon"></i> 查询</button></div></div><table style="margin-top: -15px;" id="tb_meeting" lay-filter="tb_meeting"></table>
</body>
</html>

meetingAll.js

let layer,form,table,$;
var row;
layui.use(['layer','form','table'],function(){layer=layui.layer,form=layui.form,table=layui.table,$=layui.jquery;//初始化会议列表initMeeting();//绑定查询按钮的点击事件$('#btn_meeting_search').click(function(){query();});
});//1.初始化会议列表
function initMeeting(){table.render({           //执行渲染elem: '#tb_meeting',   //指定原始表格元素选择器(推荐id选择器)height: 400,         //自定义高度loading: false,      //是否显示加载条(默认 true)cols: [[             //设置表头{field: 'title', title: '会议标题', width: 180},{field: 'location', title: '会议地点', width: 120},{field: 'startTime', title: '开始时间', width: 180},{field: 'endTime', title: '结束时间', width: 180},{field: 'meetingState', title: '会议状态', width: 90},{field: 'name', title: '主持人', width: 120},//{field: '', title: '操作', width: 260, toolbar: '#tbMeeting'}]]});
}//2.查询所有会议
function query(){table.reload('tb_meeting', {url: 'info.action',     //请求地址method: 'POST',                    //请求方式,GET或者POSTloading: true,                     //是否显示加载条(默认 true)page: true,                        //是否分页where: {                           //设定异步数据接口的额外参数,任意设'methodName':'allInfos','title':$('#title').val(),'zhuchiren':$('#userid').val()},request: {                         //自定义分页请求参数名pageName: 'page', //页码的参数名称,默认:pagelimitName: 'rows' //每页数据量的参数名,默认:limit},done: function (res, curr, count) {//查询完成的回调函数}});
}

meetingWaiting.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/meeting/meetingWaiting.js"></script>
</head>
<style>
body{margin:15px;
}
.layui-table-cell {height: inherit;}
.layui-layer-page .layui-layer-content {  overflow: visible !important;}
</style>
<body><div class="layui-form-item"><div class="layui-inline"><label class="layui-form-label">会议标题:</label><div class="layui-input-inline"><input type="hidden" id="userid" value="${sessionScope.user.id }"/><input type="text" id="title" autocomplete="off"class="layui-input"></div></div><div class="layui-inline"><button id="btn_meeting_search" class="layui-btn layui-btn-normal"><i class="layui-icon"></i> 查询</button></div></div><table style="margin-top: -15px;" id="tb_meeting" lay-filter="tb_meeting"></table>
</body>
</html>

meetingWaiting.js

let layer,form,table,$;
var row;
layui.use(['layer','form','table'],function(){layer=layui.layer,form=layui.form,table=layui.table,$=layui.jquery;//初始化会议列表initMeeting();//绑定查询按钮的点击事件$('#btn_meeting_search').click(function(){query();});
});//1.初始化会议列表
function initMeeting(){table.render({           //执行渲染elem: '#tb_meeting',   //指定原始表格元素选择器(推荐id选择器)height: 400,         //自定义高度loading: false,      //是否显示加载条(默认 true)cols: [[             //设置表头{field: 'title', title: '会议标题', width: 180},{field: 'location', title: '会议地点', width: 120},{field: 'startTime', title: '开始时间', width: 180},{field: 'endTime', title: '结束时间', width: 180},{field: 'meetingstate', title: '会议状态', width: 90},{field: 'auditorname', title: '主持人', width: 120},//{field: '', title: '操作', width: 260, toolbar: '#tbMeeting'}]]});
}//2.待开会议
function query(){table.reload('tb_meeting', {url: 'info.action',     //请求地址method: 'POST',                    //请求方式,GET或者POSTloading: true,                     //是否显示加载条(默认 true)page: true,                        //是否分页where: {                           //设定异步数据接口的额外参数,任意设'methodName':'queryMeetingInfoByState','title':$('#title').val(),'zhuchiren':$('#userid').val(),'state':4},request: {                         //自定义分页请求参数名pageName: 'page', //页码的参数名称,默认:pagelimitName: 'rows' //每页数据量的参数名,默认:limit},done: function (res, curr, count) {//查询完成的回调函数}});
}

meetingHistory.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/meeting/meetingHistory.js"></script>
</head>
<style>
history
body{margin:15px;
}
.layui-table-cell {height: inherit;}
.layui-layer-page .layui-layer-content {  overflow: visible !important;}
</style>
<body><div class="layui-form-item"><div class="layui-inline"><label class="layui-form-label">会议标题:</label><div class="layui-input-inline"><input type="hidden" id="userid" value="${sessionScope.user.id }"/><input type="text" id="title" autocomplete="off"class="layui-input"></div></div><div class="layui-inline"><button id="btn_meeting_search" class="layui-btn layui-btn-normal"><i class="layui-icon"></i> 查询</button></div></div><table style="margin-top: -15px;" id="tb_meeting" lay-filter="tb_meeting"></table>
</body>
</html>

 meetingHistory.js

let layer,form,table,$;
var row;
layui.use(['layer','form','table'],function(){layer=layui.layer,form=layui.form,table=layui.table,$=layui.jquery;//初始化会议列表initMeeting();//绑定查询按钮的点击事件$('#btn_meeting_search').click(function(){query();});
});//1.初始化会议列表
function initMeeting(){table.render({           //执行渲染elem: '#tb_meeting',   //指定原始表格元素选择器(推荐id选择器)height: 400,         //自定义高度loading: false,      //是否显示加载条(默认 true)cols: [[             //设置表头{field: 'title', title: '会议标题', width: 180},{field: 'location', title: '会议地点', width: 120},{field: 'startTime', title: '开始时间', width: 180},{field: 'endTime', title: '结束时间', width: 180},{field: 'meetingstate', title: '会议状态', width: 90},{field: 'auditorname', title: '主持人', width: 120},//{field: '', title: '操作', width: 260, toolbar: '#tbMeeting'}]]});
}//2.待开会议
function query(){table.reload('tb_meeting', {url: 'info.action',     //请求地址method: 'POST',                    //请求方式,GET或者POSTloading: true,                     //是否显示加载条(默认 true)page: true,                        //是否分页where: {                           //设定异步数据接口的额外参数,任意设'methodName':'queryMeetingHistoryInfoByState','title':$('#title').val(),'zhuchiren':$('#userid').val(),'state':4},request: {                         //自定义分页请求参数名pageName: 'page', //页码的参数名称,默认:pagelimitName: 'rows' //每页数据量的参数名,默认:limit},done: function (res, curr, count) {//查询完成的回调函数console.log(res);}});
}

三、运行效果

会议OA项目(六)--- (待开会议、历史会议、所有会议)相关推荐

  1. 会议OA项目之待开会议所有会议

    目录 一.待开和所有会议SQL语句编 二.待开和所有会议功能实现 1.待开会议 后台 前台 2.所有会议 后台 前台 一.待开和所有会议SQL语句编写 1.待开会议 待开会议: 与我的会议的区别在于, ...

  2. 会议OA项目(待开会议历史会议所有会议)

                                                                    文章目录 一.会议OA项目名词介绍 二.SQL编写 待开会议SQL 所有 ...

  3. 会议OA项目(项目原型图介绍发布会议功能)

    目录 一.会议OA项目介绍 为什么要开发OA会议管理 会议OA管理的作用 二.项目原型图介绍 1)会议管理 2)投票管理 3)会议室管理 三.数据库表结构 四.发布会议功能&多功能下拉框 La ...

  4. 会议OA项目(三)---我的会议(会议排座、送审)

    目录 前言 一.需求分析 二.准备工作 三.编码 1.后台编码 2.前端编码 四.效果展示 前言 上篇分享了会议OA项目的我的会议功能的查询.取消会议.本篇文章将完善我的会议功能. 我的会议功能有一个 ...

  5. 会议OA项目之会议通知会议反馈反馈详情功能

    目录 一.需要的SQL语句 1.1 会议通知查询的SQL 1.2 反馈详情的SQL 二.会议通知的前台代码 2.1 会议通知的jsp文件 2.2 要封装的js文件 三.会议通知查询的后台代码 2.1  ...

  6. 微信小程序-会议OA项目03

    目录 1.Flex布局简介 1.1 什么是flex布局 1.2 flex属性 2.轮播图--组件的使用 3.会议OA项目-首页 1.Flex布局简介 布局的传统解决方案,基于盒状模型,依赖 displ ...

  7. 会议OA项目之会议发布(一)

                                                     目录 前言: 会议发布的产品原型图: 1.会议发布 1.1实现的特色功能: 1.2思路: 使用的数据库 ...

  8. OA项目之待开会议历史会议所有会议

    目录 一.待开会议&所有会议SQL编写 1.待开会议SQL编写 2.所有会议SQL编写 二.待开会议及所有会议功能开发 一.待开会议&所有会议SQL编写 待开会议: 当前登录账号,只要 ...

  9. 微信小程序:会议OA项目-首页

    目录 一.flex布局 Flex布局简介 什么是flex布局? flex属性 flex的属性 二.轮播图组件及mockjs的使用 三.会议OA小程序首页布局 一.flex布局 Flex布局简介 布局的 ...

最新文章

  1. linux0.11内核编译,编译Linux-0.11内核
  2. 【迁移学习(Transfer L)全面指南】Deep CORAL几何特征变换
  3. C# 非模式窗体show()和模式窗体showdialog()的区别
  4. 按钮不通过表单连接servlet_JavaWeb之Servlet(一)
  5. Unity 导出切片精灵
  6. mysql数据库加载太慢_使用MySQL数据库很慢
  7. Linux之chmod命令
  8. 【赏析】15个非常棒的使用CSS3的设计组合
  9. Rayleigh-Ritz法和Galerkin法
  10. 软件设计模式Day01--简单的模拟鸭子应用
  11. java中的堆栈的意思,java – 堆栈跟踪中的数字是什么意思?
  12. 并查集:CDOJ1593-老司机破阵 (假的并查集拆除)
  13. 寻找怪数:有一种奇怪的自然数,它的比其本身小的所有因子之和等于它本身,例如:6=1+2+3,其中1、2、3都是6的因子,编程找出整数N之内的所有怪数。
  14. 计算机少儿编程考级,少儿编程能力怎么评定?有什么考级可以参加?
  15. 定点数一位乘法之Booth(布斯)算法
  16. IDEA快捷键高清壁纸
  17. html left属性,CSS属性参考 | left
  18. commvault备份mysql数据库_2-CommVault备份项目实施方案-XXXX.docx
  19. 【Java系列】深入解析Java多线程
  20. 微型计算机内部安徽一词占几个字节,安徽理工大学计算机题库.doc

热门文章

  1. 售前售前售前售前售前
  2. konga 安装部署
  3. 怎么对比2个数据库的差异
  4. 计算机不得不知道的知识,术业有专攻计算机维修人员不得不知道的知识
  5. ENVI基于Landsat影像构建郑州市2000-2019年遥感生态指数RSEI
  6. word的使用学习笔记(一)
  7. 什么是NURBS曲线
  8. 微信小程序实现瀑布流 仿小红书
  9. android使用精伦身份证读卡器读身份证
  10. python做马尔科夫模型预测法_python 日常笔记 hmmlearn 隐性马尔科夫模型案例分析...