• 会议审批 查询&会议签字


    目录

    一、前端

    1、addMeetingAudit.jsp

    2、myAudit.jsp

    3、myAudit.js

    4、addMeetingAudit.js

    5、导入插件

    二、后端

    1、MeetingAuditDao

     2、MeetingAudit

    3、MeetingAuditAction

    4、配置xml

    三、运行效果


    会议审批包含了会议查询和审批签字两个功能。

    1.会议查询:在我的审批界面,当前用户点击查询,显示的是他还未进行审批的会议数据

    2.审批签字:当审批人浏览完该会议内容后,可以选择驳回或者通过该会议,如果通过该会议则进行签字,驳回则不需要签字。审批签字运用到了在线绘画工具的一个插件以及签字截图功能,类似于ps美化签字图片。在后端运用到了批处理方法,同时处理将被审批的会议新增入库以及修改会议状态的事务,业务处理结果必须保持一致。
     

    一、前端

    1、addMeetingAudit.jsp

    1. <%@ page language="java" contentType="text/html; charset=UTF-8"
    2. pageEncoding="UTF-8"%>
    3. <%@include file="/common/header.jsp"%>
    4. DOCTYPE html>
    5. <%-- --%>
    6. <%-- --%>
    7. 发布会议
  • 铅笔
  • 清空
  • 2、myAudit.jsp

    1. <%@ page language="java" contentType="text/html; charset=UTF-8"
    2. pageEncoding="UTF-8"%>
    3. <%@include file="/common/header.jsp"%>
    4. DOCTYPE html>

    3、myAudit.js

    1. let layer,table,$,form;
    2. var row;
    3. layui.use(['layer','table','jquery','form'],function(){
    4. layer=layui.layer,
    5. table=layui.table,
    6. form=layui.form,
    7. $=layui.jquery;
    8. initTable();
    9. //查询事件
    10. $('#btn_search').click(function(){
    11. query();
    12. });
    13. });
    14. //初始化数据表格(我的审批)
    15. function initTable(){
    16. table.render({ //执行渲染
    17. elem: '#tb', //指定原始表格元素选择器(推荐id选择器)
    18. height: 400, //自定义高度
    19. loading: false, //是否显示加载条(默认 true)
    20. cols: [[ //设置表头
    21. {field: 'id', title: '会议编号', width: 90},
    22. {field: 'title', title: '会议标题', width: 120},
    23. {field: 'location', title: '会议地点', width: 140},
    24. {field: 'startTime', title: '开始时间', width: 120},
    25. {field: 'endTime', title: '结束时间', width: 120},
    26. {field: 'meetingstate', title: '会议状态', width: 120},
    27. {field: 'seatPic', title: '会议排座', width: 120,
    28. templet: function(d){
    29. if(d.seatPic==null || d.seatPic=="")
    30. return "尚未排座";
    31. else
    32. return "";
    33. }
    34. },
    35. {field: '', title: '操作', width: 200,toolbar:'#tbar'},
    36. ]]
    37. });
    38. }
    39. //点击查询
    40. function query(){
    41. table.reload('tb', {
    42. url: $("#ctx").val()+'/info.action', //请求地址
    43. method: 'POST', //请求方式,GET或者POST
    44. loading: true, //是否显示加载条(默认 true)
    45. page: true, //是否分页
    46. where: { //设定异步数据接口的额外参数,任意设
    47. 'methodName':'myAudit',
    48. 'auditor':$('#auditor').val(),
    49. 'title':$('#title').val(),
    50. },
    51. request: { //自定义分页请求参数名
    52. pageName: 'page', //页码的参数名称,默认:page
    53. limitName: 'rows' //每页数据量的参数名,默认:limit
    54. },
    55. done: function (res, curr, count) {
    56. console.log(res);
    57. }
    58. });
    59. //工具条事件
    60. table.on('tool(tb)', function(obj){ //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
    61. row = obj.data; //获得当前行数据
    62. var layEvent = obj.event; //获得 lay-event 对应的值(也可以是表头的 event 参数对应的值)
    63. var tr = obj.tr; //获得当前行 tr 的 DOM 对象(如果有的话)
    64. console.log(row);
    65. if(layEvent === 'edit'){ //审批
    66. openLayer(row.id);
    67. } else {
    68. }
    69. });
    70. }
    71. // 打开审批页面
    72. function openLayer(id){
    73. layer.open({
    74. type: 2, //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)
    75. title: '审批', //对话框标题
    76. area: ['600px', '500px'], //宽高
    77. skin: 'layui-layer-rim', //样式类名
    78. content: $("#ctx").val()+'/jsp/meeting/addMeetingAudit.jsp', //弹出内容。可以传入普通的html内容,还可以指定DOM,更可以随着type的不同而不同
    79. btn:['审批通过','审批驳回'],
    80. yes:function(index,layero){
    81. //layer.msg('保存');
    82. //调用子页面中提供的getData方法,快速获取子页面的form表单数据
    83. let data= $(layero).find("iframe")[0].contentWindow.save();
    84. data['meetingId']=id;
    85. data['auditor']=$('#auditor').val();
    86. addMeetingAudit(data);
    87. },
    88. btn2:function(){
    89. let data={};
    90. data['sign']=null;
    91. data['meetingId']=id;
    92. data['auditor']=$('#auditor').val();
    93. addMeetingAudit(data);
    94. return false;
    95. }
    96. });
    97. }
    98. // 添加审批意见
    99. function addMeetingAudit(params){
    100. params['methodName']="add";
    101. console.log(params);
    102. $.post($("#ctx").val()+'/audit.action',params,function(rs){
    103. if(rs.success){
    104. layer.closeAll();
    105. query();
    106. }else{
    107. layer.msg(rs.msg,{icon:5},function(){});
    108. }
    109. },'json');
    110. }

    4、addMeetingAudit.js

    1. let layer,table,$,form;
    2. var row;
    3. layui.use(['layer','table','jquery','form'],function(){
    4. layer=layui.layer,
    5. table=layui.table,
    6. form=layui.form,
    7. $=layui.jquery;
    8. if(parent.row!=null){
    9. form.val('audit',$.extend({}, parent.row||{}));
    10. }
    11. init();
    12. function init() {
    13. $('.strokeColorBox').css('border',"4px solid "+$('.strokeColor').val()).find('.icon').css('color',$('.strokeColor').val());
    14. $('.weightBox .icon').html($('.weight').val()+'px');
    15. $('.drawFont').css({
    16. 'height': $('.font_box_size').val()
    17. })
    18. }
    19. /**
    20. * 右键按下不显示浏览器自带框
    21. */
    22. $('#canvas').get(0).oncontextmenu = function (e) {
    23. showMyselfBox(e);
    24. return false;
    25. };
    26. /**
    27. * 显示自定义框
    28. */
    29. function showMyselfBox (e) {
    30. var left = e.offsetX;
    31. var top = e.offsetY;
    32. $('.myselfBox').css({
    33. left: left,
    34. top: top
    35. }).show();
    36. }
    37. /**
    38. * 鼠标滑过工具台
    39. */
    40. $('.contro li').on('mouseover', function () {
    41. $(this).on('mouseout', function () {
    42. $('.contro li').find('.iconAlert').hide()
    43. });
    44. $(this).find('.iconAlert').show();
    45. });
    46. /**
    47. * 点击工具台
    48. */
    49. $('.drawType li').on('click touchstart', function (e) {
    50. if (e.type == "touchstart") {
    51. e.preventDefault();
    52. }
    53. $(this).addClass('drawTypeChoose').siblings().removeClass('drawTypeChoose');
    54. initData.drawType = $(this).attr('data-name');
    55. initData.drayTypeNum= $(this).attr('data-nameNum')
    56. })
    57. /**
    58. * 改变线条颜色
    59. */
    60. $('.strokeColor').on('change', function (e) {
    61. initData.color = $(this).val();
    62. $('.strokeColorBox').css('border','4px solid '+initData.color).find('.icon').css('color',initData.color);
    63. })
    64. /**
    65. * 改变背景色
    66. */
    67. $('.backgroundColor').on('change', function (e) {
    68. initData.background = $(this).val();
    69. $('.backgroundColor').css('border','4px solid '+initData.background).find('.icon').css('color',initData.background);
    70. })
    71. $('.fillDraw').on('click touchstart',function (e) {
    72. if (e.type == "touchstart") {
    73. e.preventDefault()
    74. }
    75. if ($(this).attr('data-choose') == 'false') {
    76. $(this).attr('data-choose','true').addClass('fillBg');
    77. $('.backgroundColorBox').css({'border':'4px solid '+initData.background,'background':'#fff'}).find('.icon').css('color',initData.background);
    78. $('.backgroundColor').show();
    79. initData.isFill = true;
    80. } else {
    81. initData.isFill = false;
    82. $(this).attr('data-choose','false').removeClass('fillBg');
    83. $('.backgroundColor').hide();
    84. $('.backgroundColorBox').css({'border':'4px solid #07133d','background':'#07133d'}).find('.icon').css('color','#666');
    85. }
    86. })
    87. /**
    88. * 改变线条粗细
    89. */
    90. $('.weight').on('change', function () {
    91. initData.size = $(this).val();
    92. $('.weightBox .icon').html($('.weight').val()+'px');
    93. })
    94. /**
    95. * 绘制还是移动
    96. */
    97. $('.drawOrMove').on('click touchstart',function (e) {
    98. if (e.type == "touchstart") {
    99. e.preventDefault()
    100. }
    101. $(this).addClass('drawOrmoveChoose').siblings('.drawOrMove').removeClass('drawOrmoveChoose');
    102. if ($(this).attr('data-name') == 'move') {
    103. // if (initData.drawType == 'line' || initData.drawType == 'pen' || initData.drawType == 'line' || initData.drawType == 'signet' || initData.drawType == 'eraser') {
    104. // alert('')
    105. // }
    106. $('.maskLi').show();
    107. initData.drawOrMove = $(this).attr('data-name');
    108. $('#canvas').css('cursor','move');
    109. } else {
    110. initData.drawOrMove = $(this).attr('data-name');
    111. $('.maskLi').hide();
    112. $('#canvas').css('cursor','crosshair');
    113. }
    114. })
    115. /**
    116. * 绘制文字
    117. */
    118. $('.intoFontInput').on('input', function () {
    119. $('.intoFont').html($(this).val());
    120. initData.context = $(this).val();
    121. })
    122. $('.font_box_size').on('change',function () {
    123. initData.fontSize = $(this).val();
    124. })
    125. /**
    126. * 清除画布
    127. */
    128. $('.remote').on('mousedown touchstart',function (e) {
    129. if (e.type == "touchstart") {
    130. e.preventDefault()
    131. }
    132. initData.context2d.clearRect(0,0,initData.canvasWidth,initData.canvasHeight);
    133. initData.drawHistoryArrData = [];
    134. initData.drawHistoryArrData.length = 0;
    135. })
    136. /**
    137. * 保存图片
    138. */
    139. $('.downLoad').on('mousedown touchstart',function (a) {
    140. //debugger;
    141. save();
    142. })
    143. /**
    144. * 鼠标在canvas按下
    145. */
    146. $('#canvas').on('mousedown touchstart',function (e) {
    147. if (e.type == "touchstart") {
    148. e.preventDefault()
    149. }
    150. if (e.button == '0' || e.type == "touchstart") { // 判断是左键按下
    151. $('.myselfBox').hide();
    152. initData.mouseDown(e);
    153. $(this).on('mousemove touchmove', function (e) {
    154. if (e.type == "touchmove") {
    155. e.preventDefault()
    156. }
    157. initData.mouseMove(e);
    158. })
    159. }
    160. })
    161. /**
    162. * 鼠标抬起
    163. */
    164. $('html').on('mouseup touchend',function(){
    165. initData.mouseUp();
    166. })
    167. var initData= {
    168. drawHistoryArrData: [], // 存放所有绘制图形的数据
    169. context2d: $('#canvas').get(0).getContext('2d'), // canvas绘图2d环境
    170. canvasWidth: $('#canvas').width(),
    171. canvasHeight: $('#canvas').height(),
    172. relPosX: 0, // 鼠标在绘制图形中按下相对该图形左面的距离
    173. relPosY: 0, // 鼠标在绘制图形中按下相对该图形上面的距离
    174. relPosToX: 0, // 鼠标在绘制图形中按下相对该图形左面的距离
    175. relPosToY: 0,
    176. initLeft: 0,
    177. initTop: 0,
    178. chooseIndex: 0, // 选中图形在drawHistoryArrData数据中的index
    179. drawOrMove: 'draw', // 当前模式是拖拽还是绘制
    180. isMove: false, // 是否可以拖拽
    181. drawType: 'pen', // 绘制图形的类型
    182. drawTypeNum: '1', // 用于区分同一图形不同形状
    183. size: 2, // 绘制的粗细
    184. fontSize: $('.font_box_size').val(),
    185. context:'',
    186. color: $('.strokeColor').val(), // 绘制颜色
    187. isFill: false, // 是否填充
    188. background: $('.backgroundColor').val(),
    189. msgArr:[], // 画笔信息
    190. /**
    191. * 矩形绘制轨迹
    192. */
    193. drawTypeArr: function (arr,j) {
    194. var drawTypeFn = { // 绘制方法
    195. rect: function () { // 矩形
    196. initData.context2d.beginPath();
    197. initData.context2d.lineWidth = arr[j].size;
    198. initData.context2d.strokeStyle = arr[j].color;
    199. initData.context2d.rect(arr[j].x, arr[j].y, arr[j].w,arr[j].h);
    200. if (arr[j].fill) {
    201. initData.context2d.fillStyle = arr[j].fill;
    202. initData.context2d.fill();
    203. }
    204. initData.context2d.stroke();
    205. },
    206. line: function () { // 线
    207. initData.context2d.beginPath();
    208. initData.context2d.moveTo (arr[j].x,arr[j].y); //设置起点状态
    209. initData.context2d.lineTo (arr[j].toX,arr[j].toY); //设置末端状态
    210. initData.context2d.lineWidth = arr[j].size; //设置线宽状态
    211. initData.context2d.strokeStyle = arr[j].color; //设置线的颜色状态
    212. initData.context2d.stroke();
    213. },
    214. circle: function () { // 圆
    215. initData.context2d.beginPath();
    216. initData.context2d.lineWidth = arr[j].size; //设置线宽状态
    217. initData.context2d.strokeStyle = arr[j].color;
    218. initData.context2d.arc(arr[j].x,arr[j].y,arr[j].r,0,2*Math.PI);
    219. if (arr[j].fill) {
    220. initData.context2d.fillStyle = arr[j].fill;
    221. initData.context2d.fill();
    222. }
    223. initData.context2d.stroke()
    224. },
    225. delta: function () { // 三角
    226. var w = arr[j].toX-arr[j].x;
    227. var h = arr[j].toY-arr[j].y;
    228. var harfDis = Math.tan(30/2)*h ;
    229. if (arr[j].toX-arr[j].x>0) {
    230. harfDis = harfDis
    231. } else {
    232. harfDis = -harfDis
    233. }
    234. initData.context2d.beginPath();
    235. initData.context2d.moveTo (arr[j].x,arr[j].y); //设置起点状态
    236. initData.context2d.lineTo (arr[j].toX,arr[j].toY);
    237. initData.context2d.lineTo (arr[j].toX + 2*harfDis,arr[j].toY);
    238. initData.context2d.lineTo (arr[j].x,arr[j].y); //设置末端状态
    239. initData.context2d.lineWidth = arr[j].size; //设置线宽状态
    240. initData.context2d.strokeStyle = arr[j].color; //设置线的颜色状态
    241. if (arr[j].fill) {
    242. initData.context2d.fillStyle = arr[j].fill;
    243. initData.context2d.fill();
    244. }
    245. initData.context2d.stroke();
    246. },
    247. ellipse: function () {
    248. initData.context2d.beginPath();
    249. initData.context2d.lineWidth = arr[j].size; //设置线宽状态
    250. initData.context2d.strokeStyle = arr[j].color;
    251. initData.context2d.ellipse(arr[j].x,arr[j].y,Math.abs(arr[j].toX - arr[j].x),Math.abs(arr[j].toY -arr[j].y),0,0,Math.PI*2);
    252. if (arr[j].fill) {
    253. initData.context2d.fillStyle = arr[j].fill;
    254. initData.context2d.fill();
    255. }
    256. initData.context2d.stroke();
    257. },
    258. polygon: function () {
    259. var y1 = (arr[j].toY-arr[j].y)/2;
    260. var tan = Math.tan((90-(arr[j].reg/2))*(2*Math.PI/360));
    261. var x1 = y1*tan;
    262. initData.context2d.beginPath();
    263. initData.context2d.moveTo (arr[j].x,arr[j].y); //设置起点状态
    264. initData.context2d.lineTo (arr[j].toX,arr[j].y);
    265. initData.context2d.lineTo (arr[j].toX+x1,arr[j].y+y1);
    266. initData.context2d.lineTo (arr[j].toX,arr[j].toY); //设置末端状态
    267. initData.context2d.lineTo (arr[j].x,arr[j].toY);
    268. initData.context2d.lineTo (arr[j].x-x1,arr[j].y+y1);
    269. initData.context2d.lineTo (arr[j].x,arr[j].y);
    270. initData.context2d.lineWidth = arr[j].size; //设置线宽状态
    271. initData.context2d.strokeStyle = arr[j].color; //设置线的颜色状态
    272. if (arr[j].fill) {
    273. initData.context2d.fillStyle = arr[j].fill;
    274. initData.context2d.fill();
    275. }
    276. initData.context2d.stroke();
    277. },
    278. font: function () {
    279. // initData.context2d.beginPath();
    280. initData.context2d.font = arr[j].fontSize+'px Verdana';
    281. initData.context2d.textAlign = 'center';
    282. initData.context2d.textBaseline = 'bottom';
    283. initData.context2d.fillStyle = arr[j].color;
    284. // if (arr[j].fill) {
    285. initData.context2d.fillText(arr[j].context, arr[j].x, arr[j].y);
    286. // }
    287. // initData.context2d.strokeText(arr[j].context, arr[j].x, arr[j].y);
    288. // initData.context2d.lineWidth = 1;
    289. // initData.context2d.strokeStyle = 'transparent';
    290. // initData.context2d.rect(arr[j].x, arr[j].y, arr[j].w,arr[j].h);
    291. // initData.context2d.stroke();
    292. $('.drawFont').hide();
    293. // initData.context = ""
    294. $('.intoFont').html('');
    295. $('.intoFontInput').val('');
    296. $('.drawFont').attr('data-type','hide');
    297. },
    298. signet: function () {
    299. var img = new Image();
    300. img.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAHGCAMAAAC1uokeAAAC+lBMVEUAAAD1rhv1uh31uh31rhv1rhv1rhv1rhv1rhv1sRv1rhv1uR31rhv1rhv1rhv1rhv1rhv1rhv1wR/1rhv1rhv1rhv1rhv1rhv1rhv0yyH1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhvz3CX1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhvz3CX1rhv1rhvz3CX1rhv1rhvz3CX1rhv1rhv1rhv1rhv1rhvz3CX1rhvz3CX1rhvz3CXz3CXz3CXz3CXz3CXz3CX1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhvz3CXz3CXz3CX1rhv1rhv1rhv1rhvz3CX1rhvz3CX1rhvz3CXz3CX1rhv1rhv1rhvz3CXz3CXz3CXz3CXz3CXz3CXz3CXz3CXz3CXz3CXz3CX1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KougoIbsjX6f42Ckafh4MbFHQ+7b0kDVWZtLghudI1bWZFr0EozHni2ka/gXa3MjB8oayN3oOZ5nyJbvL6X5S+0z9XfT093d5P5Gdk6lXr/UJ9nO8hRmtkFMx3UtSEhkhIJxorosPygpfcpaeLRxfB3gWY00iElp1NmNhV0WSK+JWkF3OjyL7qg8MI3UIxyTE2cru6+CkE4AG6gQhUf4mxjHLJ7miglN+kOMJD0Ua9kg6hJTQWFCp2JVHvNlHMcO4+1mxXgWvaf297X0F/g11lZmOaZaES2mm8tLsFZBWHyL6QhNLkA9VMjMySnbn+Wqsm7oODXLdzvo1Xne1ie7IKKjX8kqh76MGu4MVxujRk2rsSpcJtLohRFnDhA4eZ4ZuQkIk5TBPjAyy1eK1wtae1si59lHzgz4xlm9c51NCJlFdO0GUNhFD+6zXNsChM0sulSQ0MKuyBGJqED4rKIrlgkUzqIXmxwFQlchhBIOulCVcTa+whDmb0qfnyRFvoQj9YFGEb1Ig6BKlFgdP0pTzgONXd4WJ+Y5HMFR7MgZo0OmmNXMOfSiJrwinQM8VVrhQnXf5SssI+QaNeYiTGhYOJRVOA/hdugwTBPLojcJEBabxv8oZworYd7kv8wU8f+MhrTKDZKd2C45+EPNKTeXjuqDlUudGYj8ZK5Th+JOKsiZ9GencnPfNPJBHhE6NnNwQPqFftKn4I531NlU9pOP42ZK0aIryjxOWv7Uj80b0aKra+rsynq3t1XbiwOlnG6Tp8NnIj8PtFa9n4qO6O4Yf4oq0kNkA70xFGq5GGE6QLcGEe2t6zWpMkIhid6cgYj2+nrNIY7IWPQGRLSX1HHkTYS1000bIvq7il5YUSI0COKOt1YnkSC4H32kh1Ad3WraEAmIJLpzLrz16AG0gW5Uon0eKLmlqAtMCC2u4ak2o5/2IFqoGziEsR9VTgTVxGpxaQtPKhUWw3lyODzMG+1iv9vq9XrnSplPhe3FUCdYvgKoLp6WFjy2ewAAAABJRU5ErkJggg==';
    301. img.onload = function(){
    302. initData.context2d.drawImage(img, arr[j].x-50, arr[j].y-50,100,100);
    303. }
    304. },
    305. pen: function () {
    306. var lineWidth = arr[j].size;
    307. var radius=lineWidth/2;
    308. var lineColor =arr[j].color;
    309. initData.context2d.beginPath();
    310. $.each(arr[j].msgArr,function (index,val) {
    311. initData.context2d.lineWidth= lineWidth;
    312. initData.context2d.lineTo(val.x, val.y);
    313. initData.context2d.strokeStyle = lineColor;
    314. initData.context2d.stroke();
    315. initData.context2d.beginPath();
    316. initData.context2d.arc(val.x, val.y, radius, 0, 360, false);
    317. initData.context2d.fillStyle = lineColor;
    318. initData.context2d.fill();
    319. initData.context2d.beginPath();
    320. initData.context2d.moveTo(val.x, val.y);
    321. initData.context2d.stroke();
    322. })
    323. },
    324. eraser: function () {
    325. $.each(arr[j].msgArr,function (index,val) {
    326. initData.context2d.clearRect(val.x,val.y,arr[j].size,arr[j].size);
    327. })
    328. }
    329. };
    330. switch (arr[j].drawType) {
    331. case 'rect':drawTypeFn.rect(); break;
    332. case 'line':drawTypeFn.line(); break;
    333. case 'circle':drawTypeFn.circle(); break;
    334. case 'delta':drawTypeFn.delta(); break;
    335. case 'ellipse':drawTypeFn.ellipse(); break;
    336. case 'polygon': drawTypeFn.polygon(); break;
    337. case 'font': drawTypeFn.font(); break;
    338. case 'signet': drawTypeFn.signet(); break;
    339. case 'pen': drawTypeFn.pen(); break;
    340. case 'eraser': drawTypeFn.eraser(); break;
    341. }
    342. },
    343. /**
    344. * 统一绘制方法
    345. */
    346. drawArr: function (arr) {
    347. for (var j in arr) {
    348. this.drawTypeArr(arr,j)
    349. }
    350. },
    351. /**
    352. * 鼠标按下执行
    353. */
    354. mouseDown: function (e) { // 鼠标按下
    355. initData.initLeft = e.offsetX?e.offsetX:e.originalEvent.targetTouches[0].pageX - $('#canvas').offset().left;//获取鼠标起始位置
    356. initData.initTop = e.offsetY?e.offsetY:e.originalEvent.targetTouches[0].pageY - $('#canvas').offset().top;
    357. initData.msgArr = [];
    358. if (initData.drawHistoryArrData.length>0) {
    359. function getChooseIndex() {
    360. for(var i in initData.drawHistoryArrData) {
    361. initData.drawArr([initData.drawHistoryArrData[i]]);
    362. if (initData.drawOrMove == 'move') {
    363. if(initData.context2d.isPointInPath(initData.initLeft,initData.initTop)) {
    364. initData.drawArr(initData.drawHistoryArrData);
    365. initData.relPosX = initData.initLeft - initData.drawHistoryArrData[i].x;
    366. initData.relPosY = initData.initTop - initData.drawHistoryArrData[i].y;
    367. initData.relPosToX = initData.initLeft - initData.drawHistoryArrData[i].toX;
    368. initData.relPosToY = initData.initTop - initData.drawHistoryArrData[i].toY;
    369. initData.isMove = true;
    370. return i;
    371. }
    372. }
    373. }
    374. if (initData.drawOrMove == 'move') {
    375. return -1;
    376. } else {
    377. return initData.drawHistoryArrData.length;
    378. }
    379. }
    380. initData.chooseIndex = getChooseIndex();
    381. } else {
    382. if (initData.drawOrMove == 'move') {
    383. initData.chooseIndex = -1;
    384. }
    385. }
    386. if ($('.drawFont').attr('data-type') == 'hide') {
    387. if (this.drawType == 'font') {
    388. var x = initData.initLeft;
    389. var y = initData.initTop;
    390. $('.drawFont').attr('data-type','show');
    391. $('.drawFont').css({
    392. 'left':initData.initLeft+"px",
    393. 'top':initData.initTop+"px"
    394. }).show();
    395. $('.intoFontInput').on('blur', function () {
    396. initData.context = $('.intoFontInput').val();
    397. initData.drawHistoryArrData[initData.chooseIndex] = {
    398. drawType: initData.drawType,
    399. drawTypeNum: initData.drawTypeNum,
    400. fill: initData.isFill?initData.background:'',
    401. size: initData.size,
    402. fontSize: initData.fontSize,
    403. context:initData.context,
    404. color: initData.color,
    405. x: x,
    406. y: y,
    407. w: $('.intoFontInput').width(),
    408. h: $('.intoFontInput').height()
    409. };
    410. initData.drawArr(initData.drawHistoryArrData);
    411. })
    412. }
    413. }
    414. if (this.drawType == 'signet') {
    415. initData.drawHistoryArrData[initData.chooseIndex] = {
    416. drawType: initData.drawType,
    417. drawTypeNum: initData.drawTypeNum,
    418. fill: initData.isFill?initData.background:'',
    419. size: initData.size,
    420. color: initData.color,
    421. x: initData.initLeft,
    422. y: initData.initTop
    423. };
    424. initData.drawArr(initData.drawHistoryArrData);
    425. }
    426. },
    427. /**
    428. * 鼠标移动执行
    429. */
    430. mouseMove: function (e) { // 鼠标移动
    431. initData.context2d.clearRect(0,0,initData.canvasWidth,initData.canvasHeight);
    432. var moveX = e.offsetX?e.offsetX:e.originalEvent.targetTouches[0].pageX - $('#canvas').offset().left;
    433. var moveY = e.offsetY?e.offsetY:e.originalEvent.targetTouches[0].pageY - $('#canvas').offset().top;
    434. var moveWidth = moveX - initData.initLeft;
    435. var moveHeight = moveY - initData.initTop;
    436. if (initData.isMove) {
    437. switch (initData.drawHistoryArrData[initData.chooseIndex].drawType) {
    438. case 'rect':
    439. initData.drawHistoryArrData[initData.chooseIndex] = {
    440. drawType: initData.drawHistoryArrData[initData.chooseIndex].drawType,
    441. drawTypeNum: initData.drawHistoryArrData[initData.chooseIndex].drawTypeNum,
    442. fill: initData.drawHistoryArrData[initData.chooseIndex].fill,
    443. size: initData.drawHistoryArrData[initData.chooseIndex].size,
    444. color: initData.drawHistoryArrData[initData.chooseIndex].color,
    445. x: moveWidth + initData.initLeft - initData.relPosX,
    446. y: moveHeight + initData.initTop - initData.relPosY,
    447. w: initData.drawHistoryArrData[initData.chooseIndex].w,
    448. h: initData.drawHistoryArrData[initData.chooseIndex].h
    449. }; break;
    450. case 'line':
    451. initData.drawHistoryArrData[initData.chooseIndex] = {
    452. drawType: initData.drawHistoryArrData[initData.chooseIndex].drawType,
    453. drawTypeNum: initData.drawHistoryArrData[initData.chooseIndex].drawTypeNum,
    454. fill: initData.drawHistoryArrData[initData.chooseIndex].fill,
    455. size: initData.drawHistoryArrData[initData.chooseIndex].size,
    456. color: initData.drawHistoryArrData[initData.chooseIndex].color,
    457. x: initData.drawHistoryArrData[initData.chooseIndex].x+moveX,
    458. y: initData.drawHistoryArrData[initData.chooseIndex].y +moveY,
    459. toX: moveX,
    460. toY: moveY
    461. }; break;
    462. case 'circle':
    463. initData.drawHistoryArrData[initData.chooseIndex] = {
    464. drawType: initData.drawHistoryArrData[initData.chooseIndex].drawType,
    465. drawTypeNum: initData.drawTypeNum,
    466. fill: initData.drawHistoryArrData[initData.chooseIndex].fill,
    467. size: initData.size,
    468. color: initData.color,
    469. x: moveWidth + initData.initLeft - initData.relPosX,
    470. y: moveHeight + initData.initTop - initData.relPosY,
    471. r: initData.drawHistoryArrData[initData.chooseIndex].r,
    472. }; break;
    473. case 'delta':
    474. initData.drawHistoryArrData[initData.chooseIndex] = {
    475. drawType: initData.drawHistoryArrData[initData.chooseIndex].drawType,
    476. drawTypeNum: initData.drawTypeNum,
    477. fill: initData.drawHistoryArrData[initData.chooseIndex].fill,
    478. size: initData.size,
    479. color: initData.color,
    480. x: moveWidth + initData.initLeft - initData.relPosX,
    481. y: moveHeight + initData.initTop - initData.relPosY,
    482. toX: moveWidth + initData.initLeft - initData.relPosToX,
    483. toY: moveHeight + initData.initTop - initData.relPosToY,
    484. }; break;
    485. case 'ellipse':
    486. initData.drawHistoryArrData[initData.chooseIndex] = {
    487. drawType: initData.drawHistoryArrData[initData.chooseIndex].drawType,
    488. drawTypeNum: initData.drawTypeNum,
    489. fill: initData.drawHistoryArrData[initData.chooseIndex].fill,
    490. size: initData.size,
    491. color: initData.color,
    492. x: moveWidth + initData.initLeft - initData.relPosX,
    493. y: moveHeight + initData.initTop - initData.relPosY,
    494. toX: moveWidth + initData.initLeft - initData.relPosToX,
    495. toY: moveHeight + initData.initTop - initData.relPosToY,
    496. }; break;
    497. case 'polygon':// 六边形
    498. initData.drawHistoryArrData[initData.chooseIndex] = {
    499. drawType: initData.drawHistoryArrData[initData.chooseIndex].drawType,
    500. drawTypeNum: initData.drawTypeNum,
    501. fill: initData.drawHistoryArrData[initData.chooseIndex].fill,
    502. size: initData.size,
    503. color: initData.color,
    504. x: moveWidth + initData.initLeft - initData.relPosX,
    505. y: moveHeight + initData.initTop - initData.relPosY,
    506. reg: initData.drawHistoryArrData[initData.chooseIndex].reg,
    507. toX: moveWidth + initData.initLeft - initData.relPosToX,
    508. toY: moveHeight + initData.initTop - initData.relPosToY
    509. }; break;
    510. }
    511. } else {
    512. if (initData.chooseIndex != -1) {
    513. switch (this.drawType) {
    514. case 'rect': // 矩形
    515. initData.drawHistoryArrData[initData.chooseIndex] = {
    516. drawType: initData.drawType,
    517. drawTypeNum: initData.drawTypeNum,
    518. fill: initData.isFill?initData.background:'',
    519. size: initData.size,
    520. color: initData.color,
    521. x: initData.initLeft,
    522. y: initData.initTop,
    523. w: moveWidth,
    524. h: moveHeight
    525. }; break;
    526. case 'line': // 线
    527. initData.drawHistoryArrData[initData.chooseIndex] = {
    528. drawType: initData.drawType,
    529. drawTypeNum: initData.drawTypeNum,
    530. fill: initData.isFill?initData.background:'',
    531. size: initData.size,
    532. color: initData.color,
    533. x: initData.initLeft,
    534. y: initData.initTop,
    535. toX: moveX,
    536. toY: moveY
    537. }; break;
    538. case 'circle': //圆
    539. initData.drawHistoryArrData[initData.chooseIndex] = {
    540. drawType: initData.drawType,
    541. drawTypeNum: initData.drawTypeNum,
    542. fill: initData.isFill?initData.background:'',
    543. size: initData.size,
    544. color: initData.color,
    545. x: initData.initLeft,
    546. y: initData.initTop,
    547. r: Math.sqrt(moveWidth*moveWidth+moveHeight*moveHeight)
    548. }; break;
    549. case 'delta': // 三角
    550. initData.drawHistoryArrData[initData.chooseIndex] = {
    551. drawType: initData.drawType,
    552. drawTypeNum: initData.drawTypeNum,
    553. fill: initData.isFill?initData.background:'',
    554. size: initData.size,
    555. color: initData.color,
    556. x: initData.initLeft,
    557. y: initData.initTop,
    558. toX: moveX,
    559. toY: moveY,
    560. }; break;
    561. case 'ellipse': // 椭圆
    562. initData.drawHistoryArrData[initData.chooseIndex] = {
    563. drawType: initData.drawType,
    564. drawTypeNum: initData.drawTypeNum,
    565. fill: initData.isFill?initData.background:'',
    566. size: initData.size,
    567. color: initData.color,
    568. x: initData.initLeft,
    569. y: initData.initTop,
    570. toX: moveX,
    571. toY: moveY,
    572. }; break;
    573. case 'polygon':// 六边形
    574. initData.drawHistoryArrData[initData.chooseIndex] = {
    575. drawType: initData.drawType,
    576. drawTypeNum: initData.drawTypeNum,
    577. fill: initData.isFill?initData.background:'',
    578. size: initData.size,
    579. color: initData.color,
    580. x: initData.initLeft,
    581. y: initData.initTop,
    582. reg: $('.polygon_1_deg').val(),
    583. toX: moveX,
    584. toY: moveY,
    585. }; break;
    586. case 'pen':
    587. initData.msgArr.push({
    588. x: moveX,
    589. y: moveY
    590. })
    591. var msg = initData.msgArr.concat();
    592. initData.drawHistoryArrData[initData.chooseIndex] = {
    593. drawType: initData.drawType,
    594. drawTypeNum: initData.drawTypeNum,
    595. fill: initData.isFill?initData.background:'',
    596. size: initData.size,
    597. color: initData.color,
    598. x: initData.initLeft,
    599. y: initData.initTop,
    600. toX: moveX,
    601. toY: moveY,
    602. msgArr:msg
    603. }; break;
    604. case 'eraser':
    605. initData.msgArr.push({
    606. x: moveX,
    607. y: moveY
    608. })
    609. var msg = initData.msgArr.concat();
    610. initData.drawHistoryArrData[initData.chooseIndex] = {
    611. drawType: initData.drawType,
    612. drawTypeNum: initData.drawTypeNum,
    613. fill: initData.isFill?initData.background:'',
    614. size: initData.size,
    615. color: initData.color,
    616. x: initData.initLeft,
    617. y: initData.initTop,
    618. toX: moveX,
    619. toY: moveY,
    620. msgArr:msg
    621. }; break;
    622. // case 'signet': // 印章
    623. // initData.drawHistoryArrData[initData.chooseIndex] = {
    624. // drawType: initData.drawType,
    625. // drawTypeNum: initData.drawTypeNum,
    626. // fill: initData.isFill?initData.background:'',
    627. // size: initData.size,
    628. // color: initData.color,
    629. // x: initData.initLeft,
    630. // y: initData.initTop,
    631. // toX: moveX,
    632. // toY: moveY,
    633. // }; break;
    634. // case 'delta'
    635. // case 'circle'
    636. // case 'ellipse'
    637. // case 'line'
    638. //
    639. // case 'signet'
    640. // case 'pen'
    641. // case 'brush'
    642. }
    643. }
    644. }
    645. initData.drawArr(initData.drawHistoryArrData);
    646. },
    647. /**
    648. * 鼠标抬起执行
    649. */
    650. mouseUp: function () {
    651. initData.msgArr = [];
    652. initData.isMove = false;
    653. initData.relPosX = 0;
    654. initData.relPosY = 0;
    655. $('#canvas').off('mousemove');
    656. }
    657. };
    658. });
    659. function save(){
    660. var mycanvas = document.getElementById("canvas");
    661. var image = mycanvas.toDataURL("image/png");
    662. let params={
    663. 'sign':image
    664. };
    665. return params;
    666. }

    5、导入插件

    二、后端

    1、MeetingAuditDao

    1. package com.zking.dao;
    2. import com.zking.entity.MeetingAudit;
    3. import com.zking.util.BaseDao;
    4. import com.zking.util.StringUtils;
    5. public class MeetingAuditDao extends BaseDao{
    6. /*
    7. * 1.将图片的字符串 转成 图片保存起来
    8. * 2.将审批人的意见数据入库 t_oa_meeting_audit
    9. * 3.修改会议状态 t_oa_meeting_info
    10. */
    11. // 批处理
    12. // public int add(MeetingAudit audit) {
    13. 将审批人的意见数据入库 t_oa_meeting_audit
    14. // String sql1="insert into t_oa_meeting_audit(meetingId,auditor,sign) values("+audit.getMeetingId()+","+audit.getAuditor()+",'"+audit.getSign()+"')";
    15. state有两种,审批通过即 待开,审批驳回即 驳回 状态
    16. 修改会议状态 t_oa_meeting_info
    17. // int state=StringUtils.isBlank(audit.getSign())?3:4;
    18. // String sql2="update t_oa_meeting_info set state="+state+" where id="+audit.getId();
    19. 同时执行多个sql语句,其目的在于事务的一致性,要么业务处理同时成功,要么同时失败
    20. // return super.executeUpdateBatch(new String[] {sql1,sql2});
    21. // }
    22. public void add(MeetingAudit audit) {
    23. //1.新增会议审批记录
    24. String sql="insert into t_oa_meeting_audit(meetingId,auditor,sign)"
    25. + " values("+audit.getMeetingId()+","+audit.getAuditor()+",'"+audit.getSign()+"')";
    26. //2.根据会议ID更新会议的状态(3=驳回,4=待开)
    27. int state=StringUtils.isBlank(audit.getSign())?3:4;
    28. String sql1="update t_oa_meeting_info set state="+state+" where id="+audit.getMeetingId();
    29. //如何一次执行两条SQL,使用数据库事务?
    30. super.executeUpdateBatch(new String[] {sql,sql1});
    31. }
    32. }

     2、MeetingAudit

    1. package com.zking.entity;
    2. import java.io.Serializable;
    3. import java.util.Date;
    4. public class MeetingAudit implements Serializable {
    5. private Integer id;
    6. private Long meetingId;
    7. private String auditor;
    8. private String sign;
    9. private Date createdate;
    10. public Integer getId() {
    11. return id;
    12. }
    13. public void setId(Integer id) {
    14. this.id = id;
    15. }
    16. public Long getMeetingId() {
    17. return meetingId;
    18. }
    19. public void setMeetingId(Long meetingId) {
    20. this.meetingId = meetingId;
    21. }
    22. public String getAuditor() {
    23. return auditor;
    24. }
    25. public void setAuditor(String auditor) {
    26. this.auditor = auditor;
    27. }
    28. public String getSign() {
    29. return sign;
    30. }
    31. public void setSign(String sign) {
    32. this.sign = sign;
    33. }
    34. public Date getCreatedate() {
    35. return createdate;
    36. }
    37. public void setCreatedate(Date createdate) {
    38. this.createdate = createdate;
    39. }
    40. public MeetingAudit() {
    41. super();
    42. // TODO Auto-generated constructor stub
    43. }
    44. @Override
    45. public String toString() {
    46. return "MeetingAudit [id=" + id + ", meetingId=" + meetingId + ", auditor=" + auditor + ", sign=" + sign
    47. + ", createdate=" + createdate + "]";
    48. }
    49. }

    3、MeetingAuditAction

    1. package com.zking.web;
    2. import java.io.File;
    3. import java.util.UUID;
    4. import javax.servlet.http.HttpServletRequest;
    5. import javax.servlet.http.HttpServletResponse;
    6. import com.zking.dao.MeetingAuditDao;
    7. import com.zking.entity.MeetingAudit;
    8. import com.zking.framework.ActionSupport;
    9. import com.zking.framework.ModelDriver;
    10. import com.zking.util.Base64ImageUtils;
    11. import com.zking.util.CommonUtils;
    12. import com.zking.util.ImageUtils;
    13. import com.zking.util.PropertiesUtil;
    14. import com.zking.util.StringUtils;
    15. public class MeetingAuditAction extends ActionSupport implements ModelDriver{
    16. private MeetingAudit audit=new MeetingAudit();
    17. private MeetingAuditDao auditDao=new MeetingAuditDao();
    18. // public String add(HttpServletRequest req, HttpServletResponse resp) {
    19. // try {
    20. 保存会议签字的图片
    21. // if(StringUtils.isNotBlank(audit.getSign())) {
    22. 定义保存路径 dirPathSign=E:/temp/images/T280/sign/
    23. // String path1=PropertiesUtil.getValue("dirPathSign");
    24. 定义请求地址 serverPathSign=/upload/sign/
    25. // String path2=PropertiesUtil.getValue("serverPathSign");
    26. 定义会议签字剪裁前图片名称
    27. // String file1=UUID.randomUUID().toString().replace("-", "")+".jpg";
    28. 定义会议签字剪裁后图片名称
    29. // String file2=UUID.randomUUID().toString().replace("-", "")+".jpg";
    30. 拼接图片完成路径
    31. // String wc=path1+file1;
    32. 拼接裁剪图片路径
    33. // String cj=path1+file2;
    34. 上传签字图片并保存到指定位置
    35. // Base64ImageUtils.GenerateImage(audit.getSign().replace("data:image/png;base64,", ""), wc);
    36. 裁剪原图
    37. // ImageUtils.shearImg(wc, cj);
    38. 替换sign的图片路径
    39. // audit.setSign(path2+file2);
    40. 删除原图
    41. // File file=new File(wc);
    42. // if(file.exists())
    43. // file.delete();
    44. 新增会议审批记录
    45. // auditDao.add(audit);
    46. // CommonUtils.toJson(true, "会议审批成功", resp);
    47. // }
    48. // } catch (Exception e) {
    49. // e.printStackTrace();
    50. // CommonUtils.toJson(true, "会议审批失败", resp);
    51. // }
    52. // return null;
    53. // }
    54. public String add(HttpServletRequest req,
    55. HttpServletResponse resp) throws Exception{
    56. try {
    57. //1.保存会议签字的图片
    58. if(StringUtils.isNotBlank(audit.getSign())) {
    59. //定义保存路径 dirPathSign=E:/temp/images/T280/sign/
    60. String sourceFilePath=PropertiesUtil.getValue("dirPathSign");
    61. //定义请求地址 serverPathSign=/test_layui/upload/sign/
    62. String requestFilePath = PropertiesUtil.getValue("serverPathSign");
    63. //定义会议签字图片名称(原图名称)
    64. String sourcefileName=UUID.randomUUID().toString().replace("-", "")+".jpg";
    65. //定义会议签字图片名称(裁剪后的名称)
    66. String targetfileName=UUID.randomUUID().toString().replace("-", "")+".jpg";
    67. //拼接图片完成路径(原图)
    68. String realPath=sourceFilePath+sourcefileName;
    69. //拼接裁剪图路径
    70. String targetPath=sourceFilePath+targetfileName;
    71. //上传签字图片并保存到指定位置
    72. Base64ImageUtils.GenerateImage(audit.getSign().replace("data:image/png;base64,", ""), realPath);
    73. //裁剪原图
    74. ImageUtils.shearImg(realPath, targetPath);
    75. //替换sign的图片路径
    76. audit.setSign(requestFilePath+targetfileName);
    77. //删除原图
    78. File file=new File(realPath);
    79. if(file.exists())
    80. file.delete();
    81. }
    82. //2.新增会议审批记录及更新会议状态
    83. auditDao.add(audit);
    84. CommonUtils.toJson(true, "审批成功!", resp);
    85. } catch (Exception e) {
    86. e.printStackTrace();
    87. CommonUtils.toJson(false, "审批失败!", resp);
    88. }
    89. return null;
    90. }
    91. @Override
    92. public MeetingAudit getModel() {
    93. return audit;
    94. }
    95. }

    4、配置xml

    1. <config>
    2. <action path="/user" type="com.zking.web.UserAction">
    3. action>
    4. <action path="/permission" type="com.zking.web.PermissionAction">
    5. action>
    6. <action path="/info" type="com.zking.web.MeetingInfoAction">
    7. action>
    8. <action path="/audit" type="com.zking.web.MeetingAuditAction">
    9. action>
    10. config>

    三、运行效果

  • 相关阅读:
    IO多路复用 select/poll/epoll
    【C++】string介绍
    PSO-DBSCAN聚类
    LeetCode第100题—相同的树
    git基本使用
    闲人闲谈PS之二十九——关于精确统计工程合同产值问题
    8、Shell函数
    LeetCode算法导航
    ROS环境下使用WHEELTEC N100惯导模块
    【股票价格预测】基于改进莱维飞行和混沌映射的粒子群优化BP神经网络预测股票价格研究(Matlab代码实现)
  • 原文地址:https://blog.csdn.net/qq_44247968/article/details/126026041