• OA项目之会议通知(查询&是否参会&反馈详情)


    目录

    会议查询

    是否参会

    反馈详情


    讲解思路

    • 会议通知SQL语句分析

    • 反馈详情SQL语句分析

    • 后台代码编写

    • 前端代码编写

      效果预览

       

    会议查询

    MeetingFeedBack.java

    1. package com.zking.oa.model;
    2. import org.lisen.mvc.util.AutoIncrement;
    3. import org.lisen.mvc.util.Key;
    4. import org.lisen.mvc.util.Table;
    5. import com.zking.oa.util.CacheUtil;
    6. @Table("t_oa_meeting_feedback")
    7. public class MeetiingFeedback {
    8. @AutoIncrement
    9. @Key
    10. private Integer id;
    11. private Integer meetingId;
    12. private int personType;
    13. private int personId;
    14. private int result;
    15. private String reason;
    16. public Integer getId() {
    17. return id;
    18. }
    19. public void setId(Integer id) {
    20. this.id = id;
    21. }
    22. public Integer getMeetingId() {
    23. return meetingId;
    24. }
    25. public void setMeetingId(Integer meetingId) {
    26. this.meetingId = meetingId;
    27. }
    28. public int getPersonType() {
    29. return personType;
    30. }
    31. public void setPersonType(int personType) {
    32. this.personType = personType;
    33. }
    34. public int getPersonId() {
    35. return personId;
    36. }
    37. public void setPersonId(int personId) {
    38. this.personId = personId;
    39. }
    40. public int getResult() {
    41. return result;
    42. }
    43. public void setResult(int result) {
    44. this.result = result;
    45. }
    46. public String getReason() {
    47. return reason;
    48. }
    49. public void setReason(String reason) {
    50. this.reason = reason;
    51. }
    52. public MeetiingFeedback(Integer id, Integer meetingId, int personType, int personId, int result, String reason) {
    53. super();
    54. this.id = id;
    55. this.meetingId = meetingId;
    56. this.personType = personType;
    57. this.personId = personId;
    58. this.result = result;
    59. this.reason = reason;
    60. }
    61. public MeetiingFeedback() {
    62. super();
    63. // TODO Auto-generated constructor stub
    64. }
    65. @Override
    66. public String toString() {
    67. return "MeetiingFeedback [id=" + id + ", meetingId=" + meetingId + ", personType=" + personType + ", personId="
    68. + personId + ", result=" + result + ", reason=" + reason + "]";
    69. }
    70. /**
    71. * 获取参与人员类型描述,是参与者还是列席者
    72. * @return
    73. */
    74. public String getMeetingJoinTypeName() {
    75. return CacheUtil.getMeetingJoinType(this.personId);
    76. }
    77. /**
    78. * 获取参与者名称
    79. * @return
    80. */
    81. public String getPersonName() {
    82. return CacheUtil.getUser(this.getPersonId()).getName();
    83. }
    84. }

     MeetingFeedBackDao.java

    1. /**
    2. * 会议通知:查询出我(当前登陆用户)需要参与的会议及会议的反馈信息(参会、缺席以及未读)
    3. * @param back
    4. * @param pageBean
    5. * @return
    6. * @throws SQLException
    7. * @throws IllegalAccessException
    8. * @throws InstantiationException
    9. */
    10. @Override
    11. public List<MeetiingFeedback> listMeetingFeedback(MeetiingFeedback meetingFeedback, PageBean pageBean) {
    12. String sql = "SELECT t1.id,t1.meetingId, t1.personType, t1.personId, t1.result, t1.reason\r\n" +
    13. " FROM t_oa_meeting_feedback t1\r\n" +
    14. " WHERE 1=1 ";
    15. List<Object> param = new ArrayList<Object>();
    16. if(meetingFeedback != null && meetingFeedback.getResult()+"" != null) {
    17. sql += " and t1.result = ? ";
    18. param.add(meetingFeedback.getResult());
    19. }
    20. if(meetingFeedback != null && meetingFeedback.getMeetingId() != null) {
    21. sql += " and t1.meetingId = ? ";
    22. param.add(meetingFeedback.getMeetingId());
    23. }
    24. return DbTemplate.query(sql, param.toArray(), pageBean, MeetiingFeedback.class);
    25. }

    MeetingFeedBackAction.java

    1. /**
    2. * 查询会议相关人员的反馈信息
    3. * @param req
    4. * @param resp
    5. */
    6. public void listMeetingFeedback(HttpServletRequest req, HttpServletResponse resp) {
    7. try {
    8. PageBean pageBean = new PageBean();
    9. pageBean.setRequest(req);
    10. List<MeetiingFeedback> list = service.listMeetingFeedback(meetingFeedback, pageBean);
    11. CommonUtil.sendResponse(0, "会议反馈查询成功", pageBean.getTotal(), list, resp);
    12. } catch (Exception e) {
    13. e.printStackTrace();
    14. CommonUtil.sendResponse(0, "会议反馈查失败", resp);
    15. }
    16. }

    config.xml

    1. "1.0" encoding="UTF-8"?>
    2. config[
    3. config (action*)>
    4. action (forward*)>
    5. forward EMPTY>
    6. action
    7. path CDATA #REQUIRED
    8. type CDATA #REQUIRED
    9. >
    10. forward
    11. name CDATA #REQUIRED
    12. path CDATA #REQUIRED
    13. redirect (true|false) "false"
    14. >
    15. ]>
    16. <config>
    17. <action type="com.zking.oa.action.UserAction" path="/userAction"> action>
    18. <action type="com.zking.oa.action.PermissionAction" path="/permissionAction"> action>
    19. <action type="com.zking.oa.action.MeetinginfoAction" path="/meetinginfoAction"> action>
    20. <action type="com.zking.oa.action.MeetingAuditAction" path="/meetingAuditAction"> action>
    21. <action type="com.zking.oa.action.meetingFeedbackAction" path="/meetingFeedbackAction"> action>
    22. config>

    DateUtil.java

    1. package com.zking.oa.util;
    2. import java.text.SimpleDateFormat;
    3. import java.util.Date;
    4. /**
    5. * 日期帮助类
    6. * @author lisensir
    7. */
    8. public final class DateUtil {
    9. private DateUtil() {}
    10. private static final String FORMCAT_STR = "yyyy-MM-dd HH:mm:ss";
    11. /**
    12. * 将日期格式化为yyyy-MM-dd HH:mm:ss格式的字符串
    13. * @param date 需要格式化的日期
    14. * @return
    15. */
    16. public static String format(Date date) {
    17. if(date == null) return "";
    18. SimpleDateFormat sdf = new SimpleDateFormat(FORMCAT_STR);
    19. return sdf.format(date);
    20. }
    21. /**
    22. * 将日期格式化为yyyy-MM-dd HH:mm:ss格式的字符串
    23. * @param date 需要格式化的日期
    24. * @param format 指定的格式字符串
    25. * @return
    26. */
    27. public static String format(Date date, String format) {
    28. if(date == null) return "";
    29. SimpleDateFormat sdf = new SimpleDateFormat(format);
    30. return sdf.format(date);
    31. }
    32. public static void main(String[] args) {
    33. Date date = new Date(System.currentTimeMillis());
    34. String s = format(date);
    35. System.out.println(s);
    36. }
    37. }

    meetingNotify.jsp

    1. <%@ page language="java" contentType="text/html; charset=UTF-8"
    2. pageEncoding="UTF-8"%>
    3. <!DOCTYPE html>
    4. <html>
    5. <head>
    6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    7. <title>Insert title here</title>
    8. <%@ include file="/common/head.jsp" %>
    9. <title>会议通知</title>
    10. <style>
    11. .layui-inline {
    12. margin-top: 20px;
    13. }
    14. .seatPicDiv {
    15. height: 180px;
    16. }
    17. .seatPic:active {
    18. height: 360px;
    19. }
    20. .layui-layer-page .layui-layer-content {
    21. /* 解决送审对话框中人员选择下拉框不能完全显示问题 */
    22. overflow: visible;!important
    23. }
    24. </style>
    25. </head>
    26. <body>
    27. <!-- 查询条件 -->
    28. <div class="layui-inline">
    29. <label class="layui-form-label">标题:</label>
    30. <div class="layui-input-block">
    31. <input type="text" name="title" id="title" placeholder="会议标题" class="layui-input">
    32. </div>
    33. </div>
    34. <div class="layui-inline">
    35. <button class="layui-btn" id="queryMeetingInfo"><i class="layui-icon layui-icon-search"></i>查询</button>
    36. </div>
    37. <!-- 用户信息表格 -->
    38. <table class="layui-hide" id="meetingInfoTable" lay-filter="meetingInfoTable"></table>
    39. <!-- 使用了layui自定义语法,当会议不能送审或排座时将按钮显示为禁用状态 -->
    40. <script type="text/html" id="toolbar">
    41. <button class="layui-btn layui-btn-sm" lay-event="feeback">反馈</button>
    42. </script>
    43. </body>
    44. </html>

    meetingNotify.js

    1. <script>
    2. let table=null;
    3. let $ = null;
    4. var row = null;
    5. let formSelects = null;
    6. let form = null;
    7. let layer = null;
    8. layui.use(['table','jquery','formSelects','form','layer'], function(){
    9. table = layui.table;
    10. $ = layui.jquery;
    11. formSelects = layui.formSelects;
    12. form = layui.form;
    13. layer = layui.layer;
    14. loadMeetingInfo();
    15. //查询我的会议信息
    16. $("#queryMeetingInfo").click(function() {
    17. loadMeetingInfo();
    18. });
    19. //对表格的功能按钮增加事件监听,如排座,送审,反馈按钮
    20. table.on('tool(meetingInfoTable)', function(obj) {
    21. if(obj.event == 'feeback') {
    22. openFeebackDialog(obj.data);
    23. }
    24. });
    25. });
    26. var row = null;
    27. function openFeebackDialog(data) {
    28. row = data;
    29. layer.open({
    30. type: 2, //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)
    31. title:'会议反馈',
    32. area: ['654px', '420px'], //宽高
    33. skin: 'layui-layer-rim', //样式类名
    34. content: ctx + '/jsp/meeting/addFeedBack.jsp', //弹出内容。可以传入普通的html内容,还可以指定DOM,更可以随着type的不同而不同
    35. btn: ['确定', '关闭'],
    36. yes: function(index,layero) {
    37. let formData = $(layero).find("iframe")[0].contentWindow.getFormData();
    38. console.log(formData);
    39. addMeetingFeedback(formData);
    40. },
    41. btn2: function(index,layero){
    42. }
    43. });
    44. }
    45. //查询会议信息
    46. function loadMeetingInfo() {
    47. table.render({
    48. elem: '#meetingInfoTable',
    49. url: ctx + '/meetinginfoAction.action?methodName=listRelatedMeetingInfoByUserId',
    50. cols: [[
    51. {field:'id', width:80, title: 'ID'},
    52. {field:'title', width:180, title: '会议标题', sort: true},
    53. {field:'location', width:180, title: '会议地点', sort: true},
    54. {field:'startTime', width:180, title: '开始时间'},
    55. {field:'endTime', width:180, title: '结束时间'},
    56. {field:'meetingState', width:180, title: '会议状态'},
    57. {fixed:'right', title: '操作', width:200, align:'left', unresize: true, toolbar:'#toolbar'}
    58. ]],
    59. page: true,
    60. request: {
    61. pageName: 'page',
    62. limitName: 'rows'
    63. },
    64. method: 'post',
    65. where: {
    66. title: $("#title").val()
    67. },
    68. loading: true,
    69. });
    70. }
    71. </script>

    是否参会

    MeetingFeedBackDao.java

    1. /**
    2. * 新增会议反馈
    3. * @param back
    4. */
    5. public void addMeetingFeedback(MeetiingFeedback back) {
    6. String sql="insert into t_oa_meeting_feedback(meetingId,personType,personId,result,reason) values(?,?,?,?,?)";
    7. super.executeUpdate(sql, new Object[] {
    8. back.getMeetingId(),
    9. back.getPersonType(),
    10. back.getPersonId(),
    11. back.getResult(),
    12. back.getReason()
    13. });
    14. }

    MeetingFeedBackAction.java

    1. /**
    2. * 增加会议反馈
    3. * @param req
    4. * @param resp
    5. */
    6. public void addMeetingFeedback(HttpServletRequest req, HttpServletResponse resp) {
    7. try {
    8. service.addMeetingFeedback(meetingFeedback);
    9. CommonUtil.sendResponse(0, "会议反馈成功", resp);
    10. } catch (Exception e) {
    11. e.printStackTrace();
    12. CommonUtil.sendResponse(0, "会议反馈失败", resp);
    13. }
    14. }

    meetingNotify.js

    1. <script>
    2. let table=null;
    3. let $ = null;
    4. var row = null;
    5. let formSelects = null;
    6. let form = null;
    7. let layer = null;
    8. layui.use(['table','jquery','formSelects','form','layer'], function(){
    9. table = layui.table;
    10. $ = layui.jquery;
    11. formSelects = layui.formSelects;
    12. form = layui.form;
    13. layer = layui.layer;
    14. loadMeetingInfo();
    15. //查询我的会议信息
    16. $("#queryMeetingInfo").click(function() {
    17. loadMeetingInfo();
    18. });
    19. //对表格的功能按钮增加事件监听,如排座,送审,反馈按钮
    20. table.on('tool(meetingInfoTable)', function(obj) {
    21. if(obj.event == 'feeback') {
    22. openFeebackDialog(obj.data);
    23. }
    24. });
    25. });
    26. var row = null;
    27. function openFeebackDialog(data) {
    28. row = data;
    29. layer.open({
    30. type: 2, //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)
    31. title:'会议反馈',
    32. area: ['654px', '420px'], //宽高
    33. skin: 'layui-layer-rim', //样式类名
    34. content: ctx + '/jsp/meeting/addFeedBack.jsp', //弹出内容。可以传入普通的html内容,还可以指定DOM,更可以随着type的不同而不同
    35. btn: ['确定', '关闭'],
    36. yes: function(index,layero) {
    37. let formData = $(layero).find("iframe")[0].contentWindow.getFormData();
    38. console.log(formData);
    39. addMeetingFeedback(formData);
    40. },
    41. btn2: function(index,layero){
    42. }
    43. });
    44. }
    45. //增加会议反馈
    46. function addMeetingFeedback(param) {
    47. $.ajax({
    48. url: ctx + "/meetingFeedbackAction.action?methodName=addMeetingFeedback",
    49. data: param,
    50. type: 'post',
    51. dataType: 'json',
    52. success: function(resp) {
    53. layer.msg(resp.msg,{
    54. icon: 1,
    55. time: 2000 //2秒关闭(如果不配置,默认是3秒)
    56. },function() {
    57. layer.closeAll();
    58. });
    59. }
    60. });
    61. }
    62. //查询会议信息
    63. function loadMeetingInfo() {
    64. table.render({
    65. elem: '#meetingInfoTable',
    66. url: ctx + '/meetinginfoAction.action?methodName=listRelatedMeetingInfoByUserId',
    67. cols: [[
    68. {field:'id', width:80, title: 'ID'},
    69. {field:'title', width:180, title: '会议标题', sort: true},
    70. {field:'location', width:180, title: '会议地点', sort: true},
    71. {field:'startTime', width:180, title: '开始时间'},
    72. {field:'endTime', width:180, title: '结束时间'},
    73. {field:'meetingState', width:180, title: '会议状态'},
    74. {fixed:'right', title: '操作', width:200, align:'left', unresize: true, toolbar:'#toolbar'}
    75. ]],
    76. page: true,
    77. request: {
    78. pageName: 'page',
    79. limitName: 'rows'
    80. },
    81. method: 'post',
    82. where: {
    83. title: $("#title").val()
    84. },
    85. loading: true,
    86. });
    87. }
    88. </script>

    addFeedBack.jsp

    1. <%@ page language="java" contentType="text/html; charset=UTF-8"
    2. pageEncoding="UTF-8"%>
    3. <!DOCTYPE html>
    4. <html>
    5. <head>
    6. <%@include file="/common/head.jsp" %>
    7. </head>
    8. <style>
    9. body{
    10. margin:5px;
    11. }
    12. </style>
    13. <body>
    14. <div style="padding:10px;">
    15. <!-- 反馈表单 -->
    16. <form class="layui-form layui-form-pane" lay-filter="back">
    17. <input type="hidden" name="meetingId" id="meetingId"/>
    18. <input type="hidden" name="personId" value="${sessionScope.user.id }"/>
    19. <div class="layui-form-item">
    20. <label class="layui-form-label">人员类型</label>
    21. <div class="layui-input-block">
    22. <!--
    23. <select id="personType" name="personType">
    24. <option value="">请选择人员类型</option>
    25. <option value="1">参会</option>
    26. <option value="2">列席</option>
    27. </select> -->
    28. <input type="hidden" name="personType" id="personType"/>
    29. <input type="text" id="personTypeName" autocomplete="off" readonly="readonly" class="layui-input">
    30. </div>
    31. </div>
    32. <div class="layui-form-item" pane="">
    33. <label class="layui-form-label">反馈结果</label>
    34. <div class="layui-input-block" >
    35. <!--
    36. <select id="result" name="result">
    37. <option value="">请选择反馈结果</option>
    38. <option value="1">参加</option>
    39. <option value="2">不参加</option>
    40. </select> -->
    41. <input type="radio" name="result" value="1" title="参加" checked>
    42. <input type="radio" name="result" value="2" title="不参加">
    43. </div>
    44. </div>
    45. <div class="layui-form-item layui-form-text">
    46. <label class="layui-form-label">不参与会议的原因</label>
    47. <div class="layui-input-block">
    48. <textarea placeholder="请输入内容" name="reason" class="layui-textarea"></textarea>
    49. </div>
    50. </div>
    51. </form>
    52. </div>
    53. </body>
    54. </html>

    addFeedBack.js  

    1. <script>
    2. let form = null;
    3. layui.use(['jquery', 'form'], function() {
    4. let $ = layui.$;
    5. form = layui.form;
    6. //获取会议记录信息
    7. let data = parent.row || {};
    8. //获取当前登录用户ID
    9. let currentUserId = '${sessionScope.user.id}';
    10. //设置会议ID
    11. $("#meetingId").val(data.id);
    12. //判断当前用户是存在与参与者中,如果是则设置人员类型为参与者
    13. let canyuze = data.canyuze.split(",");
    14. if(canyuze.indexOf(currentUserId) > -1) {
    15. $("#personTypeName").val("参与者");
    16. $("#personType").val("1");
    17. }
    18. //判断当前用户是存在与列席者中,如果是则设置人员类型为列席者
    19. let liexize = data.liexize.split(",");
    20. if(liexize.indexOf(currentUserId) > -1) {
    21. $("#personTypeName").val("列席者");
    22. $("#personType").val("2");
    23. }
    24. });
    25. //获取表单数据,在父窗口(会议通知)会调用该方法获取表单数据用于提交
    26. function getFormData() {
    27. return form.val('back');
    28. }
    29. </script>

    反馈详情

    MeetingFeedBackDao.java

    1. /**
    2. * 根据会议ID获取会议反馈详情信息
    3. * @param back
    4. * @return
    5. */
    6. @SuppressWarnings("unchecked")
    7. public List<Map<String,Object>> queryBackPersons(MeetiingFeedback back){
    8. String sql="select " +
    9. "f.result,GROUP_CONCAT(u.name) as name " +
    10. "from " +
    11. "t_oa_meeting_feedback f,t_oa_user u " +
    12. "where f.personId=u.id and meetingId="+back.getMeetingId()+" group by f.result";
    13. System.out.println(sql);
    14. return super.executeQuery(sql, null, new convert<Map<String,Object>>() {
    15. @Override
    16. public List<Map<String, Object>> forEach(ResultSet rs) throws Exception {
    17. return CommonUtils.toList(rs);
    18. }
    19. });
    20. }

    MeetingFeedBackAction.java

    1. /**
    2. * 查询会议相关人员的反馈信息
    3. * @param req
    4. * @param resp
    5. */
    6. public void listMeetingFeedback(HttpServletRequest req, HttpServletResponse resp) {
    7. try {
    8. PageBean pageBean = new PageBean();
    9. pageBean.setRequest(req);
    10. List<MeetiingFeedback> list = service.listMeetingFeedback(meetingFeedback, pageBean);
    11. CommonUtil.sendResponse(0, "会议反馈查询成功", pageBean.getTotal(), list, resp);
    12. } catch (Exception e) {
    13. e.printStackTrace();
    14. CommonUtil.sendResponse(0, "会议反馈查失败", resp);
    15. }
    16. }

    myMeeting.jsp

    1. <%@ page language="java" contentType="text/html; charset=UTF-8"
    2. pageEncoding="UTF-8"%>
    3. <!DOCTYPE html>
    4. <html>
    5. <head>
    6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    7. <%@ include file="/common/head.jsp" %>
    8. <title>Insert title here</title>
    9. <style>
    10. .layui-inline {
    11. margin-top: 20px;
    12. }
    13. .seatPicDiv {
    14. height: 180px;
    15. }
    16. .seatPic:active {
    17. height: 360px;
    18. }
    19. .layui-layer-page .layui-layer-content {
    20. /* 解决送审对话框中人员选择下拉框不能完全显示问题 */
    21. overflow: visible;!important
    22. }
    23. </style>
    24. </head>
    25. <body>
    26. <!-- 查询条件 -->
    27. <div class="layui-inline">
    28. <label class="layui-form-label">标题:</label>
    29. <div class="layui-input-block">
    30. <input type="text" name="title" id="title" placeholder="会议标题" class="layui-input">
    31. </div>
    32. </div>
    33. <div class="layui-inline">
    34. <button class="layui-btn" id="queryMeetingInfo"><i class="layui-icon layui-icon-search"></i>查询</button>
    35. </div>
    36. <!-- 用户信息表格 -->
    37. <table class="layui-hide" id="meetingInfoTable" lay-filter="meetingInfoTable"></table>
    38. <!-- 使用了layui自定义语法,当会议不能送审或排座时将按钮显示为禁用状态 -->
    39. <script type="text/html" id="toolbar">
    40. {{# if(d.state==1 || d.state==3){ }}
    41. <button class="layui-btn layui-btn-sm" lay-event="seat">排座</button>
    42. <button class="layui-btn layui-btn-sm" lay-event="send">送审</button>
    43. {{# } else{ }}
    44. <button class="layui-btn layui-btn-sm layui-btn-disabled" lay-event="seat">排座</button>
    45. <button class="layui-btn layui-btn-sm layui-btn-disabled" lay-event="send">送审</button>
    46. {{# } }}
    47. <button class="layui-btn layui-btn-sm" lay-event="feedback">反馈</button>
    48. </script>
    49. <!-- 送审对话框内容 -->
    50. <div id="auditDiv" style="display:none;">
    51. <form style="margin:20px 15px;" class="layui-form layui-form-pane" id="sendAudit" lay-filter="sendAudit">
    52. <div class="layui-inline">
    53. <label class="layui-form-label">送审人</label>
    54. <div class="layui-input-inline">
    55. <select name="auditPerson" xm-select="auditPerson" xm-select-radio>
    56. <option value="" disabled="disabled">--请选择--</option>
    57. </select>
    58. </div>
    59. <div class="layui-input-inline">
    60. <!-- <button id="btn_auditor" class="layui-btn" lay-filter="sendAudit">送审</button> -->
    61. <button type="button" id="sendAudit" lay-submit lay-filter="sendAudit" class="layui-btn layui-btn-normal">送审</button>
    62. </div>
    63. </div>
    64. </form>
    65. </div>
    66. </body>
    67. </html>

    myMeeting.js

    1. <script>
    2. let table=null;
    3. let $ = null;
    4. var row = null;
    5. let formSelects = null;
    6. let form = null;
    7. let layer = null;
    8. layui.use(['table','jquery','formSelects','form','layer'], function(){
    9. table = layui.table;
    10. $ = layui.jquery;
    11. formSelects = layui.formSelects;
    12. form = layui.form;
    13. layer = layui.layer;
    14. loadMeetingInfo();
    15. //查询我的会议信息
    16. $("#queryMeetingInfo").click(function() {
    17. loadMeetingInfo();
    18. });
    19. //对表格的功能按钮增加事件监听,如排座,送审,反馈按钮
    20. table.on('tool(meetingInfoTable)', function(obj) {
    21. //排座
    22. if(obj.event == 'seat') {
    23. //对于新建或驳回状态的会议可以执行排座
    24. if(obj.data.state == 1 || obj.data.state == 3) {
    25. openSeatPic(obj.data.id);
    26. } else {
    27. layer.msg("对于审核通过,结束,取消,进行中等状态的会议不能再执行排座")
    28. }
    29. }
    30. //送审
    31. if(obj.event == 'send') {
    32. if(obj.data.seatPic) {
    33. //对于新建或驳回状态的会议可以送审
    34. if(obj.data.state == 1 || obj.data.state == 3) {
    35. openSendAudit(obj.data.id);
    36. } else {
    37. layer.msg("对于审核通过,结束,取消,进行中等状态的会议不能执行送审");
    38. }
    39. } else {
    40. layer.msg("未进行排座不能送审");
    41. }
    42. }
    43. //查看反馈
    44. if(obj.event == 'feedback') {
    45. openFeedbackInfo(obj.data);
    46. }
    47. });
    48. });
    49. function openFeedbackInfo(data) {
    50. let ignore = [0,1,2,3];
    51. if(ignore.indexOf(data.state) >= 0) {
    52. layer.msg("对于新建、驳回、取消、待审状态下的会议,不用查看反馈");
    53. return;
    54. }
    55. debugger;
    56. layer.open({
    57. type: 2, //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)
    58. title:'反馈详情',
    59. area: ['600px', '650px'], //宽高
    60. skin: 'layui-layer-rim', //样式类名
    61. content: ctx+'/jsp/meeting/meetingFeedback.jsp?meetingId=' + data.id,
    62. btn:['关闭'],
    63. yes:function(index,layero){
    64. layer.closeAll();
    65. }
    66. });
    67. }
    68. // 打开送审的对话框,执行送审
    69. function openSendAudit(id) {
    70. let index = layer.open({
    71. type: 1, //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)
    72. title: '送审',
    73. area: ['660px', '200px'], //宽高
    74. skin: 'layui-layer-rim', //样式类名
    75. content: $("#auditDiv") //送审对应的div
    76. });
    77. //初始化送审人员选择下拉列表的数据
    78. formSelects.data('auditPerson', 'server', {
    79. url: ctx + '/meetinginfoAction.action?methodName=listMeetingMember'
    80. });
    81. //添加送审按钮的监听事件,发送ajax请求执行送审
    82. form.on('submit(sendAudit)', function(data) {
    83. console.log(data);
    84. data.field["id"] = id;
    85. console.log(data);
    86. $.ajax({
    87. url: ctx + '/meetinginfoAction.action?methodName=sendAudit',
    88. data: data.field,
    89. type: 'post',
    90. dataType: 'json',
    91. success: function(resp) {
    92. layer.msg(resp.msg);
    93. layer.close(index);
    94. //送审成功,更新我的会议列表
    95. loadMeetingInfo();
    96. }
    97. })
    98. });
    99. }
    100. //会议排座
    101. function openSeatPic(id) {
    102. row = null;
    103. layer.open({
    104. type: 2, //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)
    105. title: '会议排座',
    106. area: ['660px', '350px'], //宽高
    107. skin: 'layui-layer-rim', //样式类名
    108. content: ctx+'/jsp/meeting/seatPic.jsp?id='+id
    109. });
    110. };
    111. //查询会议信息
    112. function loadMeetingInfo() {
    113. table.render({
    114. elem: '#meetingInfoTable',
    115. url: ctx + '/meetinginfoAction.action?methodName=listMeetingInfo',
    116. cols: [[
    117. {field:'id', width:60, title: 'ID'},
    118. {field:'title', width:180, title: '会议标题', sort: true},
    119. {field:'location', width:180, title: '会议地点', sort: true},
    120. {field:'startTime', width:160, title: '开始时间'},
    121. {field:'endTime', width:160, title: '结束时间'},
    122. {field:'meetingState', width:180, title: '会议状态'},
    123. //显示排座图片
    124. {field: 'seatPic', title: '会议排座', width: 180,
    125. templet:function(d){
    126. if(null==d.seatPic)
    127. return "尚未排座";
    128. else
    129. return "";
    130. }
    131. },
    132. {field: '', title: '操作', width: 250, toolbar:'#toolbar'}
    133. ]],
    134. page: true,
    135. request: {
    136. pageName: 'page',
    137. limitName: 'rows'
    138. },
    139. method: 'post',
    140. where: {
    141. title: $("#title").val()
    142. },
    143. loading: true,
    144. });
    145. }
    146. </script>

  • 相关阅读:
    理论问题与工程问题的差异在哪里?
    助力企业前行——Scala&Spark最佳实践课程
    自然语言处理NLP程序包(NLTK/spaCy)使用总结
    堆--堆排序
    001、Nvidia Jetson Nano Developer KIT(b01)-系统与登录
    中班防暴力安全教案
    关于新版的Maven创建Maven项目的时候只有Maven Archetype,而找不到Maven的这个问题
    网络安全(大厂面试真题集)
    3.1、前端异步编程(超详细手写实现Promise;实现all、race、allSettled、any;async/await的使用)
    经典中的经典之字符串
  • 原文地址:https://blog.csdn.net/qq_73126462/article/details/132594922