当前位置:网站首页>Meeting notice of OA project (Query & whether to attend the meeting & feedback details)
Meeting notice of OA project (Query & whether to attend the meeting & feedback details)
2022-07-29 03:47:00 【Xiao Chen likes sugar ①】
Catalog
One 、 Meeting notice query SQL
Two 、 Meeting feedback details SQL
3、 ... and 、 Meeting notification background code implementation
Four 、 Front end interface of meeting notification
5、 ... and 、 Meeting feedback function is realized
One 、 Meeting notice query SQL
Analyze the data :
-- 1、 Meeting notice query SQL
Log in to Chen Dongli's account , It is necessary to find out that Chen Dongli is a participant 、 Non voting attendees 、 One of the hosts , Then you need to find out
Analysis of the table :
Meeting information sheet :t_oa_meeting_info
Meeting feedback form :t_oa_meeting_feedback
-- ① Find out Chen Dongli ID=3 Meeting information for
select * from t_oa_meeting_info where FIND_IN_SET(3,CONCAT(
canyuze,',',liexize,',',zhuchiren)) and state = 4
-- Whether the meeting gets feedback or not So choose external connection Mainly based on the meeting information table -1 Is unread 1 Read and participate 2 Read not to participate
select
IFNULL(f.result,-1) result ,t1.*
from
(select * from t_oa_meeting_info where FIND_IN_SET(3,CONCAT(
canyuze,',',liexize,',',zhuchiren)) and state = 4) t1
left join t_oa_meeting_feedback f on t1.id = f.meetingId
and f.personId = 3
order by result
The running result of the final database :

Two 、 Meeting feedback details SQL
Analyze the data :
-- 2 Feedback details of a meeting SQL
analysis :
Table used
User table :t_oa_user
Feedback form :t_oa_meeting_feedback
Meeting information sheet :t_oa_meeting_info
Query criteria : meeting id
1. meeting id by 12 Conference , Names of all participants
First get all the participants id
select CONCAT(
canyuze,',',liexize,',',zhuchiren) from t_oa_meeting_info where id=12
Then get the name of the corresponding person
select * from t_oa_user where FIND_IN_SET(id,(select CONCAT(
canyuze,',',liexize,',',zhuchiren) from t_oa_meeting_info where id=12))
2. Connect the feedback form Get the corresponding feedback ( unread 、 To participate in 、 Do not participate )
select
t1.name,IFNULL(f.result,-1) result
from
( select * from t_oa_user where FIND_IN_SET(id,(select CONCAT(
canyuze,',',liexize,',',zhuchiren) from t_oa_meeting_info where id=12)) ) t1
left join t_oa_meeting_feedback f on t1.id = f.personId and f.meetingId = 123. Group according to the feedback GROUP_CONCAT(expr): Packet connection
select
t.result,GROUP_CONCAT(t.name) names
from
(select
t1.name,IFNULL(f.result,-1) result
from
( select * from t_oa_user where FIND_IN_SET(id,(select CONCAT(
canyuze,',',liexize,',',zhuchiren) from t_oa_meeting_info where id=12)) ) t1
left join t_oa_meeting_feedback f on t1.id = f.personId and f.meetingId = 12) t
group by t.result
result :

3、 ... and 、 Meeting notification background code implementation
Entity class :MeetingFeedBack
package com.zking.entity;
import java.io.Serializable;
//t_oa_meeting_feedback
public class MeetingFeedBack implements Serializable {
private String id;
private Long meetingId;
private Integer personType;
private Long personId;
private Integer result;
private String reason;
// The title of the meeting
private String title;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Long getMeetingId() {
return meetingId;
}
public void setMeetingId(Long meetingId) {
this.meetingId = meetingId;
}
public Integer getPersonType() {
return personType;
}
public void setPersonType(Integer personType) {
this.personType = personType;
}
public Long getPersonId() {
return personId;
}
public void setPersonId(Long personId) {
this.personId = personId;
}
public Integer getResult() {
return result;
}
public void setResult(Integer result) {
this.result = result;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public MeetingFeedBack() {
super();
// TODO Auto-generated constructor stub
}
@Override
public String toString() {
return "MeetingFeedBack [id=" + id + ", meetingId=" + meetingId + ", personType=" + personType + ", personId="
+ personId + ", result=" + result + ", reason=" + reason + "]";
}
}MeetingFeedBackDao
package com.zking.dao;
import java.util.List;
import java.util.Map;
import com.zking.entity.MeetingFeedBack;
import com.zking.entity.MeetingInfo;
import com.zking.util.BaseDao;
import com.zking.util.PageBean;
import com.zking.util.StringUtils;
public class MeetingFeedBackDao extends BaseDao<MeetingFeedBack>{
// Meeting notice query
public List<Map<String, Object>> queryMeetingFeedBackByUserId(MeetingFeedBack back, PageBean pageBean) throws Exception {
String sql = " select \r\n" +
" IFNULL(f.result,-1) result ,t1.*\r\n" +
" from\r\n" +
" (select * from t_oa_meeting_info where FIND_IN_SET("+back.getPersonId()+",CONCAT(\r\n" +
" canyuze,',',liexize,',',zhuchiren)) and state = 4) t1\r\n" +
" left join t_oa_meeting_feedback f on t1.id = f.meetingId \r\n" +
" and f.personId = "+back.getPersonId()+"\r\n" +
" order by result";
return super.executeQuery(sql, pageBean);
}
}
MeetingFeedBackAction
package com.zking.web;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.zking.dao.MeetingFeedBackDao;
import com.zking.entity.MeetingFeedBack;
import com.zking.framework.ActionSupport;
import com.zking.framework.ModelDriver;
import com.zking.util.PageBean;
import com.zking.util.R;
import com.zking.util.ResponseUtil;
public class MeetingFeedBackAction extends ActionSupport implements ModelDriver<MeetingFeedBack>{
private MeetingFeedBack back = new MeetingFeedBack();
private MeetingFeedBackDao backDao = new MeetingFeedBackDao();
@Override
public MeetingFeedBack getModel() {
return back;
}
// Meeting notice query
public String queryMeetingFeedBackByUserId(HttpServletRequest req, HttpServletResponse resp) {
try {
PageBean pageBean = new PageBean();
pageBean.setRequest(req);
List<Map<String, Object>> lst = backDao.queryMeetingFeedBackByUserId(back, pageBean);
// Be careful :layui Format of data table in
ResponseUtil.writeJson(resp, R.ok(0, " Conference notification query succeeded ",pageBean.getTotal(),lst));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
try {
ResponseUtil.writeJson(resp, R.error(0, " Meeting notification query failed "));
} catch (Exception e2) {
// TODO: handle exception
e2.printStackTrace();
}
}
return null;
}
}
mvc.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<action path="/user" type="com.zking.web.UserAction">
</action>
<action path="/permission" type="com.zking.web.PermissionAction">
</action>
<action path="/info" type="com.zking.web.MeetingInfoAction">
</action>
<action path="/audit" type="com.zking.web.MeetingAuditAction">
</action>
<action path="/feedBack" type="com.zking.web.MeetingFeedBackAction">
</action>
</config>Four 、 Front end interface of meeting notification
Remember to import

meetingNotify.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/meetingNotify.js"></script>
</head>
<style>
body{
margin:15px;
}
.layui-table-cell {height: inherit;}
.layui-layer-page .layui-layer-content { overflow: visible !important;}
</style>
<body>
<!-- Search bar -->
<div class="layui-form-item" style="margin:15px 0px;">
<div class="layui-inline">
<label class="layui-form-label"> The title of the meeting </label>
<div class="layui-input-inline">
<input type="hidden" id="personId" value="${user.id }"/>
<input type="text" id="title" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<button id="btn_search" type="button" class="layui-btn"><i class="layui-icon layui-icon-search"></i> Inquire about </button>
</div>
</div>
<!-- Data table -->
<table id="tb" lay-filter="tb" class="layui-table" style="margin-top:-15px"></table>
<script type="text/html" id="tbar">
{
{# if(d.result==-1){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"> Whether to attend the meeting </a>
{
{# } }}
</script>
</body>
</html>
meetingNotify.js
let layer,table,$,form,test;
var row;
layui.use(['layer','table','jquery','form','test'],function(){
layer=layui.layer,
table=layui.table,
form=layui.form,
test=layui.test,
$=layui.jquery;
initTable();
// Query events
$('#btn_search').click(function(){
query();
});
});
// Initialize the data table ( My approval )
function initTable(){
table.render({ // Perform rendering
elem: '#tb', // Specify the original table element selector ( recommend id Selectors )
height: 400, // Custom height
loading: false, // Whether to load the bar ( Default true)
cols: [[ // Set the header
{field: 'id', title: ' Conference number ', width: 90},
{field: 'title', title: ' The title of the meeting ', width: 120},
{field: 'location', title: ' Place of meeting ', width: 140},
{field: 'startTime', title: ' Starting time ', width: 120,
templet:function(d){
return test.toDate(new Date(d.startTime));
}
},
{field: 'endTime', title: ' End time ', width: 120,
templet:function(d){
return test.toDate(new Date(d.endTime));
}
},
//{field: 'meetingState', title: ' Meeting status ', width: 120},
/*{field: 'seatPic', title: ' Meeting row ', width: 120,
templet: function(d){
if(d.seatPic==null || d.seatPic=="")
return " Not yet seated ";
else
return "<img width='120px' src='"+d.seatPic+"'/>";
}
},*/
{field: 'result', title: ' Feedback status ', width: 120,
templet: function(d){
if(d.result==1)
return " Participation ";
else if(d.result==2)
return " absent ";
else
return " unread ";
}
},
{field: '', title: ' operation ', width: 200,toolbar:'#tbar'},
]]
});
}
// Click to query
function query(){
table.reload('tb', {
url: $("#ctx").val()+'/feedBack.action', // Request address
method: 'POST', // Request mode ,GET perhaps POST
loading: true, // Whether to load the bar ( Default true)
page: true, // Pagination or not
where: { // Set additional parameters for asynchronous data interface , Arbitrarily set
'methodName':'queryMeetingFeedBackByUserId',
'personId':$('#personId').val(),
'title':$('#title').val(),
},
request: { // Custom paging request parameter name
pageName: 'page', // Parameter name of page number , Default :page
limitName: 'rows' // Parameter name of data volume per page , Default :limit
},
done: function (res, curr, count) {
console.log(res);
}
});
// Toolbar events
table.on('tool(tb)', function(obj){ // notes :tool Is the toolbar event name ,test yes table Properties of the original container lay-filter=" Corresponding value "
row = obj.data; // Get current row data
var layEvent = obj.event; // get lay-event Corresponding value ( It can also be in the header event The corresponding value of the parameter )
var tr = obj.tr; // Get the current line tr Of DOM object ( If any )
console.log(row);
if(layEvent === 'edit'){ // Whether to attend the meeting
openLayer(row.id);
} else {
}
});
}
function openLayer(id){
layer.open({
type: 2, //layer Provides 5 Layer type . The values that can be passed in are :0( Message box , Default )1( Page layer )2(iframe layer )3( Loading layer )4(tips layer )
title: ' Meeting feedback ', // Dialog title
area: ['660px', '400px'], // Wide and high
skin: 'layui-layer-rim', // Style class name
content: 'jsp/meeting/addFeedBack.jsp?id='+id, // Pop up content . You can pass in ordinary html Content , You can also specify DOM, With more type Different but different
btn:[' Meeting feedback ',' close '],
yes:function(index,layero){
//layer.msg(' preservation ');
// Call the getData Method , Get sub pages quickly form The form data
let data= $(layero).find("iframe")[0].contentWindow.getData();
addMeetingFeedBack(data);
},
btn2:function(){
layer.closeAll();
}
});
}
// Notice of the meeting Participation / Feedback from not attending the meeting
function addMeetingFeedBack(params){
params['methodName']="add";
console.log(params);
$.post($("#ctx").val()+'/feedBack.action',params,function(rs){
if(rs.success){
layer.closeAll();
query();
}else{
layer.msg(rs.msg,{icon:5},function(){});
}
},'json');
}Be careful : The public interface should also be modified
header.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<link rel="stylesheet"
href="${pageContext.request.contextPath }/static/js/layui/css/layui.css">
<!-- introduce layui.js -->
<script type="text/javascript"
src="${pageContext.request.contextPath }/static/js/layui/layui.js"></script>
<!-- introduce formSelects The core css -->
<link rel="stylesheet" href="${pageContext.request.contextPath }/static/js/plugins/formSelects/formSelects-v4.css" />
<!-- introduce formSelects The core js -->
<script src="${pageContext.request.contextPath }/static/js/plugins/formSelects/formSelects-v4.js" type="text/javascript" charset="utf-8"></script>
<!-- Specify the root path of the entire project -->
<base href="${pageContext.request.contextPath }/"/>
<input id="ctx" value="${pageContext.request.contextPath }" type="hidden"/>
<!-- Deposit layui Configuration file of extension module -->
<script type="text/javascript"
src="${pageContext.request.contextPath }/static/js/layui/config.js"></script>
<title> Yuyuan studio </title>
Log in from Click on meeting notification

5、 ... and 、 Meeting feedback function is realized
MeetingFeedBackDao
package com.zking.dao;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import com.zking.entity.MeetingFeedBack;
import com.zking.entity.MeetingInfo;
import com.zking.util.BaseDao;
import com.zking.util.PageBean;
import com.zking.util.StringUtils;
public class MeetingFeedBackDao extends BaseDao<MeetingFeedBack>{
// Meeting notice query
public List<Map<String, Object>> queryMeetingFeedBackByUserId(MeetingFeedBack back, PageBean pageBean) throws Exception {
String sql = " select \r\n" +
" IFNULL(f.result,-1) result ,t1.*\r\n" +
" from\r\n" +
" (select * from t_oa_meeting_info where FIND_IN_SET("+back.getPersonId()+",CONCAT(\r\n" +
" canyuze,',',liexize,',',zhuchiren)) and state = 4) t1\r\n" +
" left join t_oa_meeting_feedback f on t1.id = f.meetingId \r\n" +
" and f.personId = "+back.getPersonId()+"\r\n" +
" order by result";
return super.executeQuery(sql, pageBean);
}
// Meeting feedback
public int add(MeetingFeedBack back) throws Exception {
String sql = "insert into t_oa_meeting_feedback values(?,?,?,?,?,?)";
// The front end does not pass id Go backstage Make your own
back.setId(UUID.randomUUID().toString().replaceAll("-", ""));
return super.executeUpdate(sql, back, new String[] {"id","meetingId","personType","personId","result","reason"});
}
}
MeetingFeedBackAction
package com.zking.web;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.zking.dao.MeetingFeedBackDao;
import com.zking.entity.MeetingFeedBack;
import com.zking.framework.ActionSupport;
import com.zking.framework.ModelDriver;
import com.zking.util.PageBean;
import com.zking.util.R;
import com.zking.util.ResponseUtil;
public class MeetingFeedBackAction extends ActionSupport implements ModelDriver<MeetingFeedBack>{
private MeetingFeedBack back = new MeetingFeedBack();
private MeetingFeedBackDao backDao = new MeetingFeedBackDao();
@Override
public MeetingFeedBack getModel() {
return back;
}
// Meeting notice query
public String queryMeetingFeedBackByUserId(HttpServletRequest req, HttpServletResponse resp) {
try {
PageBean pageBean = new PageBean();
pageBean.setRequest(req);
List<Map<String, Object>> lst = backDao.queryMeetingFeedBackByUserId(back, pageBean);
// Be careful :layui Format of data table in
ResponseUtil.writeJson(resp, R.ok(0, " Conference notification query succeeded ",pageBean.getTotal(),lst));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
try {
ResponseUtil.writeJson(resp, R.error(0, " Meeting notification query failed "));
} catch (Exception e2) {
// TODO: handle exception
e2.printStackTrace();
}
}
return null;
}
// Meeting feedback
public String add(HttpServletRequest req, HttpServletResponse resp) {
try {
//rs It affects the number of rows
int rs = backDao.add(back);
if(rs > 0) {
ResponseUtil.writeJson(resp, R.ok(200, " The feedback from the meeting was successful "));
}
else {
ResponseUtil.writeJson(resp, R.error(0, " Meeting feedback failed "));
}
} catch (Exception e) {
e.printStackTrace();
try {
ResponseUtil.writeJson(resp, R.error(0, " Failed to add meeting information "));
} catch (Exception e1) {
e1.printStackTrace();
}
}
return null;
}
}
addFeedBack.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/addFeedBack.js"></script>
</head>
<style>
body{
margin:5px;
}
</style>
<body>
<div style="padding:10px;">
<form class="layui-form layui-form-pane" lay-filter="back">
<!-- <div class="layui-form-item">
<button type="submit" class="layui-btn" lay-submit="" lay-filter="meeting"> Submit... Immediately </button>
<button id="reset" type="reset" class="layui-btn layui-btn-primary"> Reset </button>
</div> -->
<input type="hidden" name="meetingId" value="${param.id }"/>
<input type="hidden" name="personId" value="${sessionScope.user.id }"/>
<div class="layui-form-item">
<label class="layui-form-label"> The type of people </label>
<div class="layui-input-block">
<select id="personType" name="personType">
<option value=""> Please select the personnel type </option>
<option value="1"> Participation </option>
<option value="2"> Attend as nonvoting delegates </option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"> Feedback results </label>
<div class="layui-input-block">
<select id="result" name="result">
<option value=""> Please select the feedback result </option>
<option value="1"> To participate in </option>
<option value="2"> Do not participate </option>
</select>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label"> Reasons for not participating in the meeting </label>
<div class="layui-input-block">
<textarea placeholder=" Please enter the content " name="reason" class="layui-textarea"></textarea>
</div>
</div>
</form>
</div>
</body>
</html>addFeedBack.js
let form,$;
layui.use(['form','jquery'],function(){
form=layui.form,
$=layui.jquery;
});
function getData(){
return form.val('back');
}
Click whether to attend the meeting

database :

6、 ... and 、 Feedback details
MeetingFeedBackDao
package com.zking.dao;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import com.zking.entity.MeetingFeedBack;
import com.zking.entity.MeetingInfo;
import com.zking.util.BaseDao;
import com.zking.util.PageBean;
import com.zking.util.StringUtils;
public class MeetingFeedBackDao extends BaseDao<MeetingFeedBack>{
// Meeting notice query
public List<Map<String, Object>> queryMeetingFeedBackByUserId(MeetingFeedBack back, PageBean pageBean) throws Exception {
String sql = " select \r\n" +
" IFNULL(f.result,-1) result ,t1.*\r\n" +
" from\r\n" +
" (select * from t_oa_meeting_info where FIND_IN_SET("+back.getPersonId()+",CONCAT(\r\n" +
" canyuze,',',liexize,',',zhuchiren)) and state = 4) t1\r\n" +
" left join t_oa_meeting_feedback f on t1.id = f.meetingId \r\n" +
" and f.personId = "+back.getPersonId()+"\r\n" +
" order by result";
return super.executeQuery(sql, pageBean);
}
// Meeting feedback
public int add(MeetingFeedBack back) throws Exception {
String sql = "insert into t_oa_meeting_feedback values(?,?,?,?,?,?)";
// The front end does not pass id Go backstage Make your own
back.setId(UUID.randomUUID().toString().replaceAll("-", ""));
return super.executeUpdate(sql, back, new String[] {"id","meetingId","personType","personId","result","reason"});
}
// Feedback details
public List<Map<String, Object>> queryMeetingBackByMeetingId(MeetingFeedBack back, PageBean pageBean) throws Exception{
String sql = " select \r\n" +
" t.result,GROUP_CONCAT(t.name) names\r\n" +
" from\r\n" +
" (select \r\n" +
" t1.name,IFNULL(f.result,-1) result\r\n" +
" from \r\n" +
" ( select * from t_oa_user where FIND_IN_SET(id,(select CONCAT(\r\n" +
" canyuze,',',liexize,',',zhuchiren) from t_oa_meeting_info where id="+back.getMeetingId()+")) ) t1\r\n" +
" left join t_oa_meeting_feedback f on t1.id = f.personId and f.meetingId = "+back.getMeetingId()+") t\r\n" +
" group by t.result";
return super.executeQuery(sql, pageBean);
}
}
MeetingFeedBackAction
package com.zking.web;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.zking.dao.MeetingFeedBackDao;
import com.zking.entity.MeetingFeedBack;
import com.zking.framework.ActionSupport;
import com.zking.framework.ModelDriver;
import com.zking.util.PageBean;
import com.zking.util.R;
import com.zking.util.ResponseUtil;
public class MeetingFeedBackAction extends ActionSupport implements ModelDriver<MeetingFeedBack>{
private MeetingFeedBack back = new MeetingFeedBack();
private MeetingFeedBackDao backDao = new MeetingFeedBackDao();
@Override
public MeetingFeedBack getModel() {
return back;
}
// Meeting notice query
public String queryMeetingFeedBackByUserId(HttpServletRequest req, HttpServletResponse resp) {
try {
PageBean pageBean = new PageBean();
pageBean.setRequest(req);
List<Map<String, Object>> lst = backDao.queryMeetingFeedBackByUserId(back, pageBean);
// Be careful :layui Format of data table in
ResponseUtil.writeJson(resp, R.ok(0, " Conference notification query succeeded ",pageBean.getTotal(),lst));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
try {
ResponseUtil.writeJson(resp, R.error(0, " Meeting notification query failed "));
} catch (Exception e2) {
// TODO: handle exception
e2.printStackTrace();
}
}
return null;
}
// Meeting feedback
public String add(HttpServletRequest req, HttpServletResponse resp) {
try {
//rs It affects the number of rows
int rs = backDao.add(back);
if(rs > 0) {
ResponseUtil.writeJson(resp, R.ok(200, " The feedback from the meeting was successful "));
}
else {
ResponseUtil.writeJson(resp, R.error(0, " Meeting feedback failed "));
}
} catch (Exception e) {
e.printStackTrace();
try {
ResponseUtil.writeJson(resp, R.error(0, " Failed to add meeting information "));
} catch (Exception e1) {
e1.printStackTrace();
}
}
return null;
}
// Meeting feedback details
public String queryMeetingBackByMeetingId(HttpServletRequest req, HttpServletResponse resp) {
try {
PageBean pageBean = new PageBean();
pageBean.setRequest(req);
List<Map<String, Object>> lst = backDao.queryMeetingBackByMeetingId(back, pageBean);
// Be careful :layui Format of data table in
ResponseUtil.writeJson(resp, R.ok(0, " The meeting feedback details were successful ",pageBean.getTotal(),lst));
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
try {
ResponseUtil.writeJson(resp, R.error(0, " Meeting feedback details failed "));
} catch (Exception e2) {
// TODO: handle exception
e2.printStackTrace();
}
}
return null;
}
}
myMeeting.js
let layer,table,$,form;
let row;
layui.use(['layer','table','jquery','form'],function(){
layer=layui.layer,
table=layui.table,
form=layui.form,
$=layui.jquery;
initTable();
// Query events
$('#btn_search').click(function(){
query();
});
// Initialize approver
initFormSelects();
// submit for censorship
$('#btn_auditor').click(function(){
$.post($("#ctx").val()+'/info.action',{
'methodName':'updateAuditorById',
'id':$('#meetingId').val(),
'auditor':$('#auditor').val()
},function(rs){
if(rs.success){
// close dialog boxes
layer.closeAll();
// Refresh List
query();
}else{
layer.msg(rs.msg,{icon:5},function(){});
}
},'json');
return false;
});
});
//1. Initialize the data table
function initTable(){
table.render({ // Perform rendering
elem: '#tb', // Specify the original table element selector ( recommend id Selectors )
height: 400, // Custom height
loading: false, // Whether to load the bar ( Default true)
cols: [[ // Set the header
{field: 'id', title: ' Conference number ', width: 90},
{field: 'title', title: ' The title of the meeting ', width: 120},
{field: 'location', title: ' Place of meeting ', width: 140},
{field: 'startTime', title: ' Starting time ', width: 120},
{field: 'endTime', title: ' End time ', width: 120},
{field: 'meetingState', title: ' Meeting status ', width: 120},
{field: 'seatPic', title: ' Meeting row ', width: 120,
templet: function(d){
if(d.seatPic==null || d.seatPic=="")
return " Not yet seated ";
else
return "<img width='120px' src='"+d.seatPic+"'/>";
}
},
{field: 'auditorName', title: ' Approved by ', width: 120},
{field: '', title: ' operation ', width: 200,toolbar:'#tbar'},
]]
});
}
//2. Click to query
function query(){
table.reload('tb', {
url: $("#ctx").val()+'/info.action', // Request address
method: 'POST', // Request mode ,GET perhaps POST
loading: true, // Whether to load the bar ( Default true)
page: true, // Pagination or not
where: { // Set additional parameters for asynchronous data interface , Arbitrarily set
'methodName':'myInfos',
'zhuchiren':$('#zhuchiren').val(),
'title':$('#title').val(),
},
request: { // Custom paging request parameter name
pageName: 'page', // Parameter name of page number , Default :page
limitName: 'rows' // Parameter name of data volume per page , Default :limit
},
done: function (res, curr, count) {
console.log(res);
}
});
// Toolbar events
table.on('tool(tb)', function(obj){ // notes :tool Is the toolbar event name ,test yes table Properties of the original container lay-filter=" Corresponding value "
row = obj.data; // Get current row data
var layEvent = obj.event; // get lay-event Corresponding value ( It can also be in the header event The corresponding value of the parameter )
var tr = obj.tr; // Get the current line tr Of DOM object ( If any )
console.log(row);
if(layEvent === 'seat'){ // Meeting row
open(row.id);
} else if(layEvent === 'send'){ // submit for censorship
// Judge whether there are seats
if(row.seatPic==null || row.seatPic==""){
layer.msg(' Please complete the meeting seating first , Then submit for approval !',function(){});
return false;
}
// Before opening the submission page , Please finish the meeting first ID Assignment of
$('#meetingId').val(row.id);
// Open the meeting for approval html Page layer
openLayerAudit();
} else if(layEvent==="back"){ // Feedback details
openLayerFeedBack(row.id);
} else {// Delete
layer.confirm(' Are you sure you want to delete ?', {icon: 3, title:' Tips '}, function(index){
$.post($("#ctx").val()+'/info.action',{
'methodName':'updatezt',
'state':0,
'id':row.id
},function(rs){
if(rs.success){
// Call the query method to refresh the data
query();
}else{
layer.msg(rs.msg,function(){});
}
},'json');
layer.close(index);
});
}
});
}
// Open the meeting seating dialog box
function open(id){
layer.open({
type: 2, //layer Provides 5 Layer type . The values that can be passed in are :0( Message box , Default )1( Page layer )2(iframe layer )3( Loading layer )4(tips layer )
title: ' Meeting row ', // Dialog title
area: ['460px', '340px'], // Wide and high
skin: 'layui-layer-rim', // Style class name
content: $("#ctx").val()+'/jsp/meeting/seatPic.jsp?id='+id, // Pop up content . You can pass in ordinary html Content , You can also specify DOM, With more type Different but different
});
}
// Initialize approver
function initFormSelects(){
$.getJSON($("#ctx").val()+'/user.action',{
'methodName':'queryUserAll'
},function(rs){
console.log(rs);
let data=rs.data;
$.each(data,function(i,e){
$('#auditor').append(new Option(e.name,e.value));
});
// To render
form.render('select');
});
}
// Meeting submission for approval
function openLayerAudit(){
// Each time you open it, you will initialize the submitter and set the default value
$('#auditor').val("");
// You have to re render
form.render('select');
// Pop-up dialog box
layer.open({
type: 1, //layer Provides 5 Layer type . The values that can be passed in are :0( Message box , Default )1( Page layer )2(iframe layer )3( Loading layer )4(tips layer )
title:' Meeting submission for approval ',
area: ['426px', '140px'], // Wide and high
skin: 'layui-layer-rim', // Style class name
content: $('#audit'), // Pop up content . You can pass in ordinary html Content , You can also specify DOM, With more type Different but different
});
}
// Open to view the feedback details of this meeting
function openLayerFeedBack(id){
$.getJSON('feedBack.action',{
methodName:'queryMeetingBackByMeetingId',
meetingId:id
},function(data){
$('#meeting_ok').html("");
$('#meeting_no').html("");
$('#meeting_noread').html("");
if(data.success){
console.log(data.data);
$.each(data.data,function(i,e){
if(e.result==1)
$('#meeting_ok').html(e.names);
else if(e.result==2)
$('#meeting_no').html(e.names);
else
$('#meeting_noread').html(e.names);
});
// Pop-up dialog box
layer.open({
type: 1, //layer Provides 5 Layer type . The values that can be passed in are :0( Message box , Default )1( Page layer )2(iframe layer )3( Loading layer )4(tips layer )
title:' Feedback details ',
area: ['426px', '420px'], // Wide and high
skin: 'layui-layer-rim', // Style class name
content: $('#feedback'), // Pop up content . You can pass in ordinary html Content , You can also specify DOM, With more type Different but different
btn:[' close '],
yes:function(index,layero){
layer.closeAll();
}
});
}
});
}
Analyze why you use Zhang San to log in :
select * from t_oa_meeting_feedback where meetingId=17Because it's time to SQL It is expected that the query results will catch up with the sunset , It is the reason why we choose whether to attend the meeting , At this time, the conference number is 17, Run again select * from t_oa_meeting_info where id = 17 Find out the host is 1, And who is the host Who is the initiator of the meeting , So we found the host as 1 Login with the corresponding account and password You can get the results in the figure

边栏推荐
- 容斥原理
- three. JS Part 54 how to pass structure array to shader
- Excel拼接数据库语句
- 5年多工作经验,工资给15k,要是你,你会接受吗?
- In depth C language (2) -- definition and use of structure
- I.MX6U-驱动开发-2-LED驱动
- 向日葵远程控制为何采用BGP服务器?自动最优路线、跨运营商高速传输
- Simple code implementation of K-means clustering
- Deep into C language (3) -- input and output stream of C
- EMD 经验模态分解
猜你喜欢

从2019 年开始,你一定停止使用了这个营销策略…

Batch production and upload sales NFT opensea eth polygon

1. Mx6u driver development-2-led driver

Vs code must know and know 20 shortcut keys!

(nowcoder22529c) diner (inclusion exclusion principle + permutation and combination)

@Configuration (proxybeanmethods = false) what's the use of setting this to false
![MOS tube - rapid recovery application notes (II) [parameters and applications]](/img/54/eb040a51304192def8cfb360c7c213.png)
MOS tube - rapid recovery application notes (II) [parameters and applications]

Rdkit II: use rdkit screening to screen 2D pharmacophores of chemical small molecules

Realize multi-level linkage through recursion

Ribbon principle analysis namedcontextfactory
随机推荐
How to judge stun protocol
3.解决Pycharm报错Unresolved reference ‘selenium‘ Unresolved reference ‘webdriver‘
Install the packet capturing certificate
Remote desktop connection error
Why do programmers so "dislike" the trunk development mode?
深入C语言(1)——操作符与表达式
Typescript from entry to mastery (XXI) generic types in classes
Solve the problem of garbled code when opening the project code in idea
Anaconda offline installation environment
The difference between int and integer. Is int or integer used in practical applications?
《陌路曾相逢》夏陌沈疏晏_夏陌沈疏晏最新章节
JS regular expression finds the number of times a character (string) appears (one line of code)
Spark dataframe replaces empty characters (or other values) in each column with null
Deep into C language (3) -- input and output stream of C
Vs code must know and know 20 shortcut keys!
How to understand clock cycle and formula CPU execution time = number of CPU clock cycles / dominant frequency
With more than 5 years of work experience and a salary of 15K, would you accept it if you were me?
Uni app internationalization
深入C语言(4)——switch的定义与使用
Sunflower senior product director technology sharing: "how to apply national remote control" in AD domain environment