OA会议管理系统之我的审批(审批签字可生成图片)

news2024/11/14 15:01:16

一、前言

1.导读

  OA会议管理系统之我的会议(会议排座&可拖拽座位&附源码)icon-default.png?t=N6B9http://t.csdn.cn/iVLAD        

        书接上文,在上一篇中我们完成了我的会议功能,其中有功能会议送审,送审人就可以在我的审批功能中查看,审批者通过审批需要进行审批签字,不通过则是驳回。话不多说下面请欣赏我的操作。

        

二、我的审批功能实现

1.功能介绍及分析

先看效果图,我们根据我们的效果进行分析 

 

功能分析:

 我们可以观察到以上只有一条数据,有两个原因

  • ①登录拥有审批权限的账号,并且有人送审给自己才可显示数据
  • ②当我们审批通过该会议的状态就会从待审核变为待开,而我们只会拿到待审核的数据

弹出审批页面

  • 寻找第三方资料进行修改演变成我们所需要的签字页面
  • 审批通过将审批数据进行保存并修改会议状态,驳回则不修改状态
  • 需要将签字的“图片”进行保存并且只截取所签字的地方,多余的地方不要

2.功能实现

这里的审批功能图片下载与我们会议排座的实现一致就不做过多的介绍

2.1.Dao层

MeetingauditDaoImpl审批的数据访问层

package com.xw.dao;

import com.xw.entity.Meetingaudit;
import com.zking.util.BaseDao;
import com.zking.util.StringUtils;

/**
 * Meetingaudit审批的数据访问层接口实现
 * 
 * @author 索隆
 *
 */
public class MeetingauditDaoImpl extends BaseDao<Meetingaudit> implements IMeetingauditDao {

	@Override
	public int add(Meetingaudit mta) throws Exception {
		// 插入数据
		String sql1 = "insert into t_oa_meeting_audit(meetingId,auditor,sign) values(" + mta.getMeetingId() + ","
				+ mta.getAuditor() + ",'" + mta.getSign() + "') ";
		// 判断是否签字,签字了是4没签字驳回3
		boolean flag = StringUtils.isNotBlank(mta.getSign());
		int state = flag ? 4 : 3;
		// 修改会议信息的状态
		String sql2 = "update t_oa_meeting_info set state=" + state + " where id=" + mta.getMeetingId();

		// 批处理,要么同时成功要么同时失败
		return super.executeUpdateBatch(new String[] { sql1, sql2 });
	}

}

2.2.JSP层

这里JSP页面有两个一个是展示数据的页面,一个是页面点击审批所展示的弹出页面

myAudit.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
	<%@ include file="/common/static.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/myAudit.js"></script>
<title>我的审批</title>
</head>
<style>
body{
	margin:15px;
}
 .layui-table-cell {height: inherit;}
 .layui-layer-page .layui-layer-content {  overflow: visible !important;}
</style>
<body>
<!-- 搜索栏 -->
<div class="layui-form-item" style="margin:15px 0px;">
  <div class="layui-inline">
    <label class="layui-form-label">会议标题</label>
    <div class="layui-input-inline">
      <input type="hidden" id="auditor" 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> 查询</button>
  </div>
</div>
<!-- 数据表格 -->
<table id="tb" lay-filter="tb" class="layui-table" style="margin-top:-15px"></table>

<script type="text/html" id="tbar">
  <a class="layui-btn layui-btn-xs" lay-event="edit">审批</a>
</script>
</body>
</html>

addMeetingAudit.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ include file="/common/static.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="static/js/sign/css/www.jsdaima.com.css">
<link rel="stylesheet" type="text/css" href="static/js/sign/font/iconfont.css">
<script type="text/javascript" src="static/js/meeting/addMeetingAudit.js"></script>
<title>审批弹出层</title>
</head>
<style>
body{
	margin:5px;
}
</style>
<body>
<div style="padding:10px 20px 10px 10px;">
    <form class="layui-form layui-form-pane" lay-filter="audit">
  		<input type="hidden" id="id" name="id"/>
  		<input type="hidden" id="auditor" value="${sessionScope.user.id }"/>
        <div class="layui-form-item">
            <label class="layui-form-label">会议标题</label>
            <div class="layui-input-block">
               <input type="text" name="title" autocomplete="off" class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
		    <label class="layui-form-label">会议内容</label>
		    <div class="layui-input-block">
		      <textarea placeholder="请输入内容" name="content" class="layui-textarea" readonly="readonly"></textarea>
		    </div>
		</div>
		<!-- <div class="layui-form-item layui-form-text"> -->
		    <!-- <label class="layui-form-label">会议内容</label> -->
		    <!-- <div class="layui-input-block"> -->
		    	<div class="canvasBox">
					<div class="contro">
						<ul class="drawType">				
							<li data-name="pen" data-nameNum="0">
								<span class="icon iconfont icon-qianbi"></span>
								<span class="iconAlert">铅笔</span>
							</li>		
							<!-- <li class="downLoad">					
								<span class="icon iconfont icon-baocun"></span>
								<span class="iconAlert">保存</span>
								<img src="" alt="" class="downImg">
							</li>						
							<li data-name="eraser"  >
								<span class="icon iconfont icon-xiangpi"></span>
								<span class="iconAlert">橡皮</span>
							</li>	 -->
							<li class="remote">
								<span class="icon iconfont icon-delete"></span>
								<span class="iconAlert">清空</span>
							</li>				
						</ul>			
					</div>	
					<div class="canvasDraw">
						<div class="drawFont" data-type="hide">
							<span class="intoFont"></span>
							<input type="text" class="intoFontInput">
						</div>
						<canvas id="canvas" width="550" height="150"></canvas>			
					</div>		
				</div>
		  <!--   </div>
		</div> -->
    </form>
</div>
</body>
</html>

   

myAudit.js

//--------------------------------------------------我的审批------------------------------------------------------

var table, $, layer, form;
var row;

layui.use([ 'table', 'jquery', 'layer', 'form' ], function() {
	table = layui.table, layer = layui.layer, $ = layui.jquery,
			form = layui.form;

	initTable();

	//为查询按钮设置点击事件
	$("#btn_search").click(function() {
		query();
	})

	//初始化审批信息
	initFormSelects();

});

//查询的点击事件
function query() {
	table.reload('tb', {
		url : 'Meetinginfo.action', //请求地址
		method : 'POST', //请求方式,GET或者POST
		page : true, //是否分页
		where : {
			//设定异步数据接口的额外参数,任意设
			'methodName' : 'list',
			'title' : $('#title').val(),
			'state' : 2,
		},
		request : { //自定义分页请求参数名
			pageName : 'page', //页码的参数名称,默认:page
			limitName : 'rows' //每页数据量的参数名,默认:limit
		},
		done : function(res) {
			//console.log(res);
		}

	})
};

//将分页查询方法封装
function initTable() {
	table.render({
		elem : '#tb',
		url : 'Meetinginfo.action',
		where : {
			//设定异步数据接口的额外参数,任意设
			'methodName' : 'list',
			'title' : $('#title').val(),
			'state' : 2,
		},
		cols : [ [ {
			type : 'checkbox',
			fixed : 'left'
		}, {
			field : 'id',
			title : '会议编号',
			width : 140,
			fixed : 'left',
			unresize : true,
			sort : true
		}, {
			field : 'title',
			title : '会议标题',
			width : 180,
			edit : 'text'
		}, {
			field : 'roomName',
			title : '会议地点',
			width : 150,
			edit : 'text'
		}, {
			field : 'startTime',
			title : '开始时间',
			width : 150,
			edit : 'text'
		}, {
			field : 'endTime',
			title : '结束时间',
			width : 120,
			edit : 'text'
		}, {
			field : 'meetingState',
			title : '会议状态',
			width : 120,
			edit : 'text'
		},  {
			field : 'NAME',
			title : '主持人',
			width : 120,
			edit : 'text'
		}, {
			fixed : 'right',
			title : '操作',
			toolbar : '#tbar',
			width : 300
		} ] ],
		page : true
	});

	//工具条事件
	table.on('tool(tb)', function(obj){ //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
		  row = obj.data; //获得当前行数据
		  var layEvent = obj.event; //获得 lay-event 对应的值(也可以是表头的 event 参数对应的值)
		  var tr = obj.tr; //获得当前行 tr 的 DOM 对象(如果有的话)
		  //console.log(row);
		  if(layEvent === 'edit'){ //审批
			  openLayer(row.id)
		  } 
		});
}



//打开审批页面
function openLayer(id){
    layer.open({
        type: 2,                    //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)
        title: '审批',                   //对话框标题
        area: ['600px', '500px'],   //宽高
        skin: 'layui-layer-rim',    //样式类名
        content: 'jsp/meeting/addMeetingAudit.jsp',                //弹出内容。可以传入普通的html内容,还可以指定DOM,更可以随着type的不同而不同
        btn:['审批通过','审批驳回'],
        yes:function(index,layero){
        	//layer.msg('保存');
        	//调用子页面中提供的getData方法,快速获取子页面的form表单数据
            let data= $(layero).find("iframe")[0].contentWindow.save();
            data['meetingId']=id;
            data['auditor']=$('#auditor').val();
            addMeetingAudit(data);
        },
        btn2:function(){
        	let data={};
        	data['sign']=null;
        	data['meetingId']=id;
            data['auditor']=$('#auditor').val();
            addMeetingAudit(data);
            return false;
        }
    });
}


//添加审批意见
function addMeetingAudit(params){
	/*
	 * 1.将图片的字符串变成图片
	 * 2.将审批人意见插入数据库
	 * 3.修改会议状态
	 */
	
	params['methodName']="add";
	console.log(params);
	$.post('MeetingAudit.action',params,function(rs){
		if(rs.success){
			layer.msg(rs.msg,{icon:6},function(){});
			layer.closeAll();
			query();
		}else{
			layer.msg(rs.msg,{icon:5},function(){});
		}
	},'json');
}

addMeetingAudit.js

//--------------------------------------------------我的审批签字------------------------------------------------------
let layer,table,$,form;
var row;
layui.use(['layer','table','jquery','form'],function(){
	layer=layui.layer,
	table=layui.table,
	form=layui.form,
	$=layui.jquery;
	
	if(parent.row!=null){
		form.val('audit',$.extend({}, parent.row||{}));
	}
	
	
	init();
	function init() {
		$('.strokeColorBox').css('border',"4px solid "+$('.strokeColor').val()).find('.icon').css('color',$('.strokeColor').val());
		$('.weightBox .icon').html($('.weight').val()+'px');
		$('.drawFont').css({
			'height': $('.font_box_size').val()
		})
	}
	/**
	 * 右键按下不显
	 * 浏览器自带框
	 */
	$('#canvas').get(0).oncontextmenu = function (e) { 
		showMyselfBox(e);
		return false;
	}; 

	/**
	 * 显示自定义框
	 */
	function showMyselfBox (e) {
		var left = e.offsetX;
		var top = e.offsetY;
		$('.myselfBox').css({
			left: left,
			top: top
		}).show();
	}

	/**
	 * 鼠标滑过工具台
	 */
	
	$('.contro li').on('mouseover', function () {
		$(this).on('mouseout', function () {
			$('.contro li').find('.iconAlert').hide()
		});
		$(this).find('.iconAlert').show();
	});

	/**
	 * 点击工具台
	*/

	$('.drawType li').on('click touchstart', function (e) {
		if (e.type == "touchstart") {
			e.preventDefault();
		}
		$(this).addClass('drawTypeChoose').siblings().removeClass('drawTypeChoose');
		initData.drawType = $(this).attr('data-name');
		initData.drayTypeNum= $(this).attr('data-nameNum')
	})


	/**
	 * 改变线条颜色
	*/
	$('.strokeColor').on('change', function (e) {
		initData.color = $(this).val();
		$('.strokeColorBox').css('border','4px solid '+initData.color).find('.icon').css('color',initData.color);
	})

	/**
	 * 改变背景色
	*/
	$('.backgroundColor').on('change', function (e) {
		initData.background = $(this).val();
		$('.backgroundColor').css('border','4px solid '+initData.background).find('.icon').css('color',initData.background);
	})
	$('.fillDraw').on('click touchstart',function (e) {
		if (e.type == "touchstart") {
			e.preventDefault()
		}
		if ($(this).attr('data-choose') == 'false') {
			$(this).attr('data-choose','true').addClass('fillBg');
			$('.backgroundColorBox').css({'border':'4px solid '+initData.background,'background':'#fff'}).find('.icon').css('color',initData.background);
			$('.backgroundColor').show();
			initData.isFill = true;
		} else {
			initData.isFill = false;
			$(this).attr('data-choose','false').removeClass('fillBg');
			$('.backgroundColor').hide();
			$('.backgroundColorBox').css({'border':'4px solid #07133d','background':'#07133d'}).find('.icon').css('color','#666');
		}
	})

	/**
	 * 改变线条粗细
	*/

	$('.weight').on('change', function () {
		initData.size = $(this).val();
		$('.weightBox .icon').html($('.weight').val()+'px');
	})


	/**
	 * 绘制还是移动
	*/
	$('.drawOrMove').on('click touchstart',function (e) {
		if (e.type == "touchstart") {
			e.preventDefault()
		}
		$(this).addClass('drawOrmoveChoose').siblings('.drawOrMove').removeClass('drawOrmoveChoose');
		if ($(this).attr('data-name') == 'move') {
			// if (initData.drawType == 'line' || initData.drawType == 'pen' || initData.drawType == 'line' || initData.drawType == 'signet' || initData.drawType == 'eraser') {
			// 	alert('')
			// }
			$('.maskLi').show();
			initData.drawOrMove = $(this).attr('data-name');
			$('#canvas').css('cursor','move');
		} else {
			initData.drawOrMove = $(this).attr('data-name');
			$('.maskLi').hide();
			$('#canvas').css('cursor','crosshair');
		}
	})

	/**
	 * 绘制文字
	*/

	$('.intoFontInput').on('input', function () {
		$('.intoFont').html($(this).val());
		initData.context = $(this).val();
	})
	$('.font_box_size').on('change',function () {
		initData.fontSize = $(this).val();
	})

	/**
	 * 清除画布
	*/

	$('.remote').on('mousedown touchstart',function (e) {
		if (e.type == "touchstart") {
			e.preventDefault()
		}
		initData.context2d.clearRect(0,0,initData.canvasWidth,initData.canvasHeight);
		initData.drawHistoryArrData = [];
		initData.drawHistoryArrData.length = 0;
	})

	/**
	 * 保存图片
	*/
	$('.downLoad').on('mousedown touchstart',function (a) {
		//debugger;
		save();
		
	})
	
	
	

	/**
	 * 鼠标在canvas按下
	*/
	$('#canvas').on('mousedown touchstart',function (e) {
		if (e.type == "touchstart") {
			e.preventDefault()
		}
		if (e.button == '0' || e.type == "touchstart") { // 判断是左键按下
			$('.myselfBox').hide();
			initData.mouseDown(e);
			$(this).on('mousemove touchmove', function (e) {
				if (e.type == "touchmove") {
					e.preventDefault()
				}
				initData.mouseMove(e);
			})
		}
	})


	/**
	 * 鼠标抬起
	*/
	$('html').on('mouseup touchend',function(){
	    initData.mouseUp();
	})

	var initData= {
		drawHistoryArrData: [], // 存放所有绘制图形的数据
		context2d: $('#canvas').get(0).getContext('2d'), // canvas绘图2d环境
		canvasWidth: $('#canvas').width(),
		canvasHeight: $('#canvas').height(),
		relPosX: 0, // 鼠标在绘制图形中按下相对该图形左面的距离
		relPosY: 0, // 鼠标在绘制图形中按下相对该图形上面的距离
		relPosToX: 0, // 鼠标在绘制图形中按下相对该图形左面的距离
		relPosToY: 0, 
		initLeft: 0,
		initTop: 0,
		chooseIndex: 0, // 选中图形在drawHistoryArrData数据中的index
		drawOrMove: 'draw', // 当前模式是拖拽还是绘制
		isMove: false, // 是否可以拖拽
		drawType: 'pen', // 绘制图形的类型
		drawTypeNum: '1', // 用于区分同一图形不同形状
		size: 2, // 绘制的粗细
		fontSize: $('.font_box_size').val(),
		context:'',
		color: $('.strokeColor').val(), // 绘制颜色
		isFill: false, // 是否填充
		background: $('.backgroundColor').val(),
		msgArr:[], // 画笔信息
		/**
		 * 矩形绘制轨迹
		*/
		drawTypeArr: function (arr,j) {
			var drawTypeFn = { // 绘制方法
				rect: function () { // 矩形
					initData.context2d.beginPath();
					initData.context2d.lineWidth = arr[j].size;
					initData.context2d.strokeStyle = arr[j].color;
					initData.context2d.rect(arr[j].x, arr[j].y, arr[j].w,arr[j].h);
					if (arr[j].fill) {
						initData.context2d.fillStyle = arr[j].fill;
						initData.context2d.fill();
					}
					initData.context2d.stroke();
				},
				line: function () { // 线
					initData.context2d.beginPath();
					initData.context2d.moveTo (arr[j].x,arr[j].y);       //设置起点状态
					initData.context2d.lineTo (arr[j].toX,arr[j].toY);       //设置末端状态
					initData.context2d.lineWidth = arr[j].size;          //设置线宽状态
					initData.context2d.strokeStyle = arr[j].color;  //设置线的颜色状态
					initData.context2d.stroke(); 
				},
				circle: function () { // 圆
					initData.context2d.beginPath();
					initData.context2d.lineWidth = arr[j].size;          //设置线宽状态
					initData.context2d.strokeStyle = arr[j].color;
					initData.context2d.arc(arr[j].x,arr[j].y,arr[j].r,0,2*Math.PI);
					if (arr[j].fill) {
						initData.context2d.fillStyle = arr[j].fill;
						initData.context2d.fill();
					}
					initData.context2d.stroke()
				},
				delta: function () { // 三角
					var w = arr[j].toX-arr[j].x;
					var h = arr[j].toY-arr[j].y;
					var harfDis = Math.tan(30/2)*h ;
					if (arr[j].toX-arr[j].x>0) {
						harfDis = harfDis
					} else {
						harfDis = -harfDis
					}
					initData.context2d.beginPath();
					initData.context2d.moveTo (arr[j].x,arr[j].y);       //设置起点状态
					initData.context2d.lineTo (arr[j].toX,arr[j].toY);
					initData.context2d.lineTo (arr[j].toX + 2*harfDis,arr[j].toY);
					initData.context2d.lineTo (arr[j].x,arr[j].y);       //设置末端状态
					initData.context2d.lineWidth = arr[j].size;          //设置线宽状态
					initData.context2d.strokeStyle = arr[j].color;  //设置线的颜色状态
					if (arr[j].fill) {
						initData.context2d.fillStyle = arr[j].fill;
						initData.context2d.fill();
					}
					initData.context2d.stroke(); 
				},
				ellipse: function () {
					initData.context2d.beginPath();
					initData.context2d.lineWidth = arr[j].size;          //设置线宽状态
					initData.context2d.strokeStyle = arr[j].color;
					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); 
					if (arr[j].fill) {
						initData.context2d.fillStyle = arr[j].fill;
						initData.context2d.fill();
					}
		            initData.context2d.stroke();
				},
				polygon: function () {
					var y1 = (arr[j].toY-arr[j].y)/2;
					var tan = Math.tan((90-(arr[j].reg/2))*(2*Math.PI/360));
					var x1 = y1*tan;
					initData.context2d.beginPath();
					initData.context2d.moveTo (arr[j].x,arr[j].y);       //设置起点状态

					initData.context2d.lineTo (arr[j].toX,arr[j].y);

					initData.context2d.lineTo (arr[j].toX+x1,arr[j].y+y1);

					initData.context2d.lineTo (arr[j].toX,arr[j].toY);       //设置末端状态

					initData.context2d.lineTo (arr[j].x,arr[j].toY); 

					initData.context2d.lineTo (arr[j].x-x1,arr[j].y+y1); 

					initData.context2d.lineTo (arr[j].x,arr[j].y); 
					initData.context2d.lineWidth = arr[j].size;          //设置线宽状态
					initData.context2d.strokeStyle = arr[j].color;  //设置线的颜色状态
					if (arr[j].fill) {
						initData.context2d.fillStyle = arr[j].fill;
						initData.context2d.fill();
					}
					initData.context2d.stroke(); 
				},
				font: function () {
					// initData.context2d.beginPath();
					initData.context2d.font = arr[j].fontSize+'px  Verdana';
					initData.context2d.textAlign = 'center';
					initData.context2d.textBaseline = 'bottom';
					initData.context2d.fillStyle = arr[j].color;
					// if (arr[j].fill) {
					initData.context2d.fillText(arr[j].context, arr[j].x, arr[j].y); 
					// }
					// initData.context2d.strokeText(arr[j].context, arr[j].x, arr[j].y);
					// initData.context2d.lineWidth = 1;
					// initData.context2d.strokeStyle = 'transparent';
					// initData.context2d.rect(arr[j].x, arr[j].y, arr[j].w,arr[j].h);
					// initData.context2d.stroke();
					$('.drawFont').hide();
					// initData.context = ""
					$('.intoFont').html('');
					$('.intoFontInput').val('');
					$('.drawFont').attr('data-type','hide');
				},
				signet: function () {
					var img = new Image();
					img.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAHGCAMAAAC1uokeAAAC+lBMVEUAAAD1rhv1uh31uh31rhv1rhv1rhv1rhv1rhv1sRv1rhv1uR31rhv1rhv1rhv1rhv1rhv1rhv1wR/1rhv1rhv1rhv1rhv1rhv1rhv0yyH1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhvz3CX1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhvz3CX1rhv1rhvz3CX1rhv1rhvz3CX1rhv1rhv1rhv1rhv1rhvz3CX1rhvz3CX1rhvz3CXz3CXz3CXz3CXz3CXz3CX1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhv1rhvz3CXz3CXz3CX1rhv1rhv1rhv1rhvz3CX1rhvz3CX1rhvz3CXz3CX1rhv1rhv1rhvz3CXz3CXz3CXz3CXz3CXz3CXz3CXz3CXz3CXz3CXz3CX1rhvz3CXz3CXz3CXz3CXz3CXz3CXz3CXz3CXz3CX1rhvz3CXz3CX1rhvz3CXz3CX1rhvz3CXz3CXz3CXz3CX1rhv///8IBAQAAAHx1gDx1wXz2hjz5Cf//yvy2hPy2yT1qBrz3Cfz2xzy2Q7z3CLy2AkFAQPz3Sn1phn//ynz4Sb1rBry2CT1pBnz2x7z3iX/6Sf03zXz2iT1rRv/7Sf/8ynz2yDz4Cbz4yf44CX//Cn13iX//fT/+Sn2qhr01iP1vR72tBwTDgn03zr/9Snz3yX//vj+/O/9+t/89cb68af04EL2uR354iX00iL9+dnz3S/1wh/79L7787j/8Cfz4yb8983464f1yiH68rH25Fj0xyA5Mg7+++X25mT84yX1sBvw1QD+++n36HD35mn25V314Uf14kz0ziFCOhAlHwwcFwr9+NP46oH//vz67pr57IzgzCbBsCP68KH46Xj141Hl0SagkR6Zix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zqIXmxwFQlchhBIOulCVcTa+whDmb0qfnyRFvoQj9YFGEb1Ig6BKlFgdP0pTzgONXd4WJ+Y5HMFR7MgZo0OmmNXMOfSiJrwinQM8VVrhQnXf5SssI+QaNeYiTGhYOJRVOA/hdugwTBPLojcJEBabxv8oZworYd7kv8wU8f+MhrTKDZKd2C45+EPNKTeXjuqDlUudGYj8ZK5Th+JOKsiZ9GencnPfNPJBHhE6NnNwQPqFftKn4I531NlU9pOP42ZK0aIryjxOWv7Uj80b0aKra+rsynq3t1XbiwOlnG6Tp8NnIj8PtFa9n4qO6O4Yf4oq0kNkA70xFGq5GGE6QLcGEe2t6zWpMkIhid6cgYj2+nrNIY7IWPQGRLSX1HHkTYS1000bIvq7il5YUSI0COKOt1YnkSC4H32kh1Ad3WraEAmIJLpzLrz16AG0gW5Uon0eKLmlqAtMCC2u4ak2o5/2IFqoGziEsR9VTgTVxGpxaQtPKhUWw3lyODzMG+1iv9vq9XrnSplPhe3FUCdYvgKoLp6WFjy2ewAAAABJRU5ErkJggg==';
					img.onload = function(){
						initData.context2d.drawImage(img, arr[j].x-50, arr[j].y-50,100,100);
					}
				},
				pen: function () {
					var lineWidth = arr[j].size;
					var radius=lineWidth/2;
					var lineColor =arr[j].color;
					initData.context2d.beginPath();
					$.each(arr[j].msgArr,function (index,val) {
		            	initData.context2d.lineWidth= lineWidth; 
		                initData.context2d.lineTo(val.x, val.y);  
		                initData.context2d.strokeStyle = lineColor;
		                initData.context2d.stroke();  
		                initData.context2d.beginPath();  
		                initData.context2d.arc(val.x, val.y, radius, 0, 360, false);
		                initData.context2d.fillStyle = lineColor;
		                initData.context2d.fill();  
		                initData.context2d.beginPath();  
		                initData.context2d.moveTo(val.x, val.y);  
		                initData.context2d.stroke(); 
					})
				},
				eraser: function () {
					$.each(arr[j].msgArr,function (index,val) {
		            	initData.context2d.clearRect(val.x,val.y,arr[j].size,arr[j].size);
					})
				}
			};
			switch (arr[j].drawType) {
				case 'rect':drawTypeFn.rect(); break;
				case 'line':drawTypeFn.line(); break;
				case 'circle':drawTypeFn.circle(); break;
				case 'delta':drawTypeFn.delta(); break;
				case 'ellipse':drawTypeFn.ellipse(); break;
				case 'polygon': drawTypeFn.polygon(); break;
				case 'font': drawTypeFn.font(); break;
				case 'signet': drawTypeFn.signet(); break;
				case 'pen': drawTypeFn.pen(); break;
				case 'eraser': drawTypeFn.eraser(); break;
			}

		},

		/**
		 * 统一绘制方法
		*/
		drawArr: function (arr) {
			for (var j in arr) {
				this.drawTypeArr(arr,j)
			}
		},

	
		/**
		 * 鼠标按下执行
		*/
		mouseDown: function (e) { // 鼠标按下
			initData.initLeft = e.offsetX?e.offsetX:e.originalEvent.targetTouches[0].pageX - $('#canvas').offset().left;//获取鼠标起始位置
			initData.initTop = e.offsetY?e.offsetY:e.originalEvent.targetTouches[0].pageY - $('#canvas').offset().top;	
			initData.msgArr = [];
			if (initData.drawHistoryArrData.length>0) {
				function getChooseIndex() {
					for(var i in initData.drawHistoryArrData) {
		    			initData.drawArr([initData.drawHistoryArrData[i]]);
		    			if (initData.drawOrMove == 'move') {
		    				if(initData.context2d.isPointInPath(initData.initLeft,initData.initTop)) {
				    			initData.drawArr(initData.drawHistoryArrData);
				    			initData.relPosX = initData.initLeft - initData.drawHistoryArrData[i].x;
				    			initData.relPosY = initData.initTop - initData.drawHistoryArrData[i].y;
				    			initData.relPosToX = initData.initLeft - initData.drawHistoryArrData[i].toX;
				    			initData.relPosToY = initData.initTop - initData.drawHistoryArrData[i].toY;
				    			initData.isMove = true;
				    			return i; 
				    		} 
		    			}
			    	}
			    	if (initData.drawOrMove == 'move') {
			    		return -1;
			    	} else {
			    		return initData.drawHistoryArrData.length;
			    	}
			    	
				}
				initData.chooseIndex = getChooseIndex();
			} else {
				if (initData.drawOrMove == 'move') {
			    	initData.chooseIndex =  -1;
			    } 
			}
			if ($('.drawFont').attr('data-type') == 'hide') {
				if (this.drawType == 'font') {
					var x = initData.initLeft;
					var y = initData.initTop;
					$('.drawFont').attr('data-type','show');
					$('.drawFont').css({
						'left':initData.initLeft+"px",
						'top':initData.initTop+"px"
					}).show();
					$('.intoFontInput').on('blur', function () {
						initData.context = $('.intoFontInput').val();
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawType,
							drawTypeNum: initData.drawTypeNum,
							fill: initData.isFill?initData.background:'',
							size: initData.size,
							fontSize: initData.fontSize,
							context:initData.context,
							color: initData.color,
							x: x,
							y: y,
							w: $('.intoFontInput').width(),
							h: $('.intoFontInput').height()
						};
						initData.drawArr(initData.drawHistoryArrData);
					})
				}
			}
			if (this.drawType == 'signet') {
				initData.drawHistoryArrData[initData.chooseIndex] = {
					drawType: initData.drawType,
					drawTypeNum: initData.drawTypeNum,
					fill: initData.isFill?initData.background:'',
					size: initData.size,
					color: initData.color,
					x: initData.initLeft,
					y: initData.initTop
				};
				initData.drawArr(initData.drawHistoryArrData);
			}
		}, 

		/**
		 * 鼠标移动执行
		*/
		mouseMove: function (e) { // 鼠标移动
			initData.context2d.clearRect(0,0,initData.canvasWidth,initData.canvasHeight);
			var moveX = e.offsetX?e.offsetX:e.originalEvent.targetTouches[0].pageX - $('#canvas').offset().left;
			var moveY = e.offsetY?e.offsetY:e.originalEvent.targetTouches[0].pageY - $('#canvas').offset().top;
			var moveWidth = moveX - initData.initLeft;
			var moveHeight = moveY - initData.initTop;
			if (initData.isMove) {
				switch (initData.drawHistoryArrData[initData.chooseIndex].drawType) {
					case 'rect':
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawHistoryArrData[initData.chooseIndex].drawType,
							drawTypeNum: initData.drawHistoryArrData[initData.chooseIndex].drawTypeNum,
							fill: initData.drawHistoryArrData[initData.chooseIndex].fill,
							size: initData.drawHistoryArrData[initData.chooseIndex].size,
							color: initData.drawHistoryArrData[initData.chooseIndex].color,
							x: moveWidth + initData.initLeft  - initData.relPosX,
							y: moveHeight + initData.initTop - initData.relPosY,
							w: initData.drawHistoryArrData[initData.chooseIndex].w,
							h: initData.drawHistoryArrData[initData.chooseIndex].h
						}; break;
					case 'line':
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawHistoryArrData[initData.chooseIndex].drawType,
							drawTypeNum: initData.drawHistoryArrData[initData.chooseIndex].drawTypeNum,
							fill: initData.drawHistoryArrData[initData.chooseIndex].fill,
							size: initData.drawHistoryArrData[initData.chooseIndex].size,
							color: initData.drawHistoryArrData[initData.chooseIndex].color,
							x: initData.drawHistoryArrData[initData.chooseIndex].x+moveX,
							y: initData.drawHistoryArrData[initData.chooseIndex].y +moveY,
							toX: moveX,
							toY: moveY
						}; break;
					case 'circle':
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawHistoryArrData[initData.chooseIndex].drawType,
							drawTypeNum: initData.drawTypeNum,
							fill: initData.drawHistoryArrData[initData.chooseIndex].fill,
							size: initData.size,
							color: initData.color,
							x: moveWidth + initData.initLeft  - initData.relPosX,
							y: moveHeight + initData.initTop - initData.relPosY,
							r: initData.drawHistoryArrData[initData.chooseIndex].r,
						}; break;
					case 'delta':
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawHistoryArrData[initData.chooseIndex].drawType,
							drawTypeNum: initData.drawTypeNum,
							fill: initData.drawHistoryArrData[initData.chooseIndex].fill,
							size: initData.size,
							color: initData.color,
							x: moveWidth + initData.initLeft  - initData.relPosX,
							y: moveHeight + initData.initTop - initData.relPosY,
							toX: moveWidth + initData.initLeft  - initData.relPosToX,
							toY: moveHeight + initData.initTop - initData.relPosToY,
						}; break;
					case 'ellipse':
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawHistoryArrData[initData.chooseIndex].drawType,
							drawTypeNum: initData.drawTypeNum,
							fill: initData.drawHistoryArrData[initData.chooseIndex].fill,
							size: initData.size,
							color: initData.color,
							x: moveWidth + initData.initLeft  - initData.relPosX,
							y: moveHeight + initData.initTop - initData.relPosY,
							toX: moveWidth + initData.initLeft  - initData.relPosToX,
							toY: moveHeight + initData.initTop - initData.relPosToY,
						}; break;
					case 'polygon':// 六边形
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawHistoryArrData[initData.chooseIndex].drawType,
							drawTypeNum: initData.drawTypeNum,
							fill: initData.drawHistoryArrData[initData.chooseIndex].fill,
							size: initData.size,
							color: initData.color,
							x: moveWidth + initData.initLeft  - initData.relPosX,
							y: moveHeight + initData.initTop - initData.relPosY,
							reg: initData.drawHistoryArrData[initData.chooseIndex].reg,
							toX: moveWidth + initData.initLeft  - initData.relPosToX,
							toY: moveHeight + initData.initTop - initData.relPosToY
						}; break;
				}
			} else {
				if (initData.chooseIndex != -1) {

					switch (this.drawType) {
					case 'rect': // 矩形
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawType,
							drawTypeNum: initData.drawTypeNum,
							fill: initData.isFill?initData.background:'',
							size: initData.size,
							color: initData.color,
							x: initData.initLeft,
							y: initData.initTop,
							w: moveWidth,
							h: moveHeight
						}; break;
					case 'line': // 线
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawType,
							drawTypeNum: initData.drawTypeNum,
							fill: initData.isFill?initData.background:'',
							size: initData.size,
							color: initData.color,
							x: initData.initLeft,
							y: initData.initTop,
							toX: moveX,
							toY: moveY
						}; break;
					case 'circle': //圆
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawType,
							drawTypeNum: initData.drawTypeNum,
							fill: initData.isFill?initData.background:'',
							size: initData.size,
							color: initData.color,
							x: initData.initLeft,
							y: initData.initTop,
							r: Math.sqrt(moveWidth*moveWidth+moveHeight*moveHeight)
						}; break;
					case 'delta': // 三角
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawType,
							drawTypeNum: initData.drawTypeNum,
							fill: initData.isFill?initData.background:'',
							size: initData.size,
							color: initData.color,
							x: initData.initLeft,
							y: initData.initTop,
							toX: moveX,
							toY: moveY,
						}; break;
					case 'ellipse': // 椭圆
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawType,
							drawTypeNum: initData.drawTypeNum,
							fill: initData.isFill?initData.background:'',
							size: initData.size,
							color: initData.color,
							x: initData.initLeft,
							y: initData.initTop,
							toX: moveX,
							toY: moveY,
						}; break;
					case 'polygon':// 六边形
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawType,
							drawTypeNum: initData.drawTypeNum,
							fill: initData.isFill?initData.background:'',
							size: initData.size,
							color: initData.color,
							x: initData.initLeft,
							y: initData.initTop,
							reg: $('.polygon_1_deg').val(),
							toX: moveX,
							toY: moveY,
						}; break;
					case 'pen':
						initData.msgArr.push({
							x: moveX,
							y: moveY
						})
						var msg = initData.msgArr.concat();
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawType,
							drawTypeNum: initData.drawTypeNum,
							fill: initData.isFill?initData.background:'',
							size: initData.size,
							color: initData.color,
							x: initData.initLeft,
							y: initData.initTop,
							toX: moveX,
							toY: moveY,
							msgArr:msg
						}; break;
					case 'eraser': 
						initData.msgArr.push({
							x: moveX,
							y: moveY
						})
						var msg = initData.msgArr.concat();
						initData.drawHistoryArrData[initData.chooseIndex] = {
							drawType: initData.drawType,
							drawTypeNum: initData.drawTypeNum,
							fill: initData.isFill?initData.background:'',
							size: initData.size,
							color: initData.color,
							x: initData.initLeft,
							y: initData.initTop,
							toX: moveX,
							toY: moveY,
							msgArr:msg
						}; break;
					// case 'signet': // 印章
					// 	initData.drawHistoryArrData[initData.chooseIndex] = {
					// 		drawType: initData.drawType,
					// 		drawTypeNum: initData.drawTypeNum,
					// 		fill: initData.isFill?initData.background:'',
					// 		size: initData.size,
					// 		color: initData.color,
					// 		x: initData.initLeft,
					// 		y: initData.initTop,
					// 		toX: moveX,
					// 		toY: moveY,
					// 	}; break;
					// case 'delta'
					// case 'circle'
					// case 'ellipse'
					// case 'line'
					// 
					// case 'signet'
					// case 'pen'
					// case 'brush'
					}
				}
			}
			initData.drawArr(initData.drawHistoryArrData);
		},

		/**
		 * 鼠标抬起执行
		*/
		mouseUp: function () {
			initData.msgArr = [];
			initData.isMove = false;
			initData.relPosX = 0;
			initData.relPosY = 0;
			$('#canvas').off('mousemove');
		}
	};

});

function save(){
	var mycanvas = document.getElementById("canvas");  
    var image    = mycanvas.toDataURL("image/png");  
	let params={
		'sign':image
	};
	return params;
}



2.3.Web层

MeetingAuditAction

package com.xw.web;

import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import javax.security.auth.message.callback.PrivateKeyCallback.Request;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.commons.beanutils.ConvertUtils;

import com.sun.xml.internal.ws.encoding.soap.SOAP12Constants;
import com.xw.biz.IMeetingauditBiz;
import com.xw.biz.IMeetinginfoBiz;
import com.xw.biz.MeetingauditBizImpl;
import com.xw.biz.MeetinginfoBizImpl;
import com.xw.entity.Meetingaudit;
import com.xw.entity.Meetinginfo;
import com.xw.entity.User;
import com.zking.framework.ActionSupport;
import com.zking.framework.ModelDriver;
import com.zking.util.Base64ImageUtils;
import com.zking.util.DateUtil;
import com.zking.util.ImageUtils;
import com.zking.util.MyDateConverter;
import com.zking.util.PageBean;
import com.zking.util.PropertiesUtil;
import com.zking.util.R;
import com.zking.util.ResponseUtil;
import com.zking.util.StringUtils;

/**
 * 我的审批
 * 
 * @author 索隆
 *
 */
public class MeetingAuditAction extends ActionSupport implements ModelDriver<Meetingaudit> {
	private Meetingaudit Meetingaudit = new Meetingaudit();
	private IMeetingauditBiz imd = new MeetingauditBizImpl();

	/**
	 * 审批判断
	 * 
	 * @param req
	 * @param resp
	 * @throws Exception
	 */
	public void add(HttpServletRequest req, HttpServletResponse resp) throws Exception {

		// 将审批签字图片保存到数据库
		if (StringUtils.isNotBlank(Meetingaudit.getSign())) {
			// 获取图片的存放地址
			String dirPathSign = PropertiesUtil.getValue("dirPathSign");
			// 获取浏览器请求路径
			String serverPathSign = PropertiesUtil.getValue("serverPathSign");
			// 原图片的名称
			String finleName1 = UUID.randomUUID().toString().replaceAll("-", "") + ".png";
			// 将原图裁剪过后的图片名称
			String finleName2 = UUID.randomUUID().toString().replaceAll("-", "") + ".png";
			//解析base64位图片编码并生成图片
			Base64ImageUtils.GenerateImage(Meetingaudit.getSign().replaceAll("data:image/png;base64,", ""),
					dirPathSign + finleName1);
			// 裁剪原图
			ImageUtils.shearImg(dirPathSign + finleName1, dirPathSign + finleName2);
			
			//为了避免不必要的空间浪费删除原图
			File file=new File(dirPathSign + finleName1);
			if(file.exists()) {
				file.delete();
			}
			
			//为实体重新赋值
			Meetingaudit.setSign(serverPathSign + finleName1);
		}

		// 调用审批新增的方法
		int add = imd.add(Meetingaudit);
		if (add > 0) {
			// 审批通过
			ResponseUtil.writeJson(resp, R.ok(0, "审批通过"));
		} else {
			// 审批驳回
			ResponseUtil.writeJson(resp, R.error(1, "审批驳回"));
		}

	}

	@Override
	public Meetingaudit getModel() {
		// 将获取到时间String类型转换成date类型
		ConvertUtils.register(new MyDateConverter(), Date.class);
		return Meetingaudit;
	}

}

温馨提示:

先用PropertiesUtil工具类读取配置文件,再用Base64ImageUtils通过io流的方式生成图片

建议参考我的会议博客文档

3.案例演示

到这里我的分享就结束了,欢迎到评论区探讨交流!!

如果觉得有用的话还请点个赞吧 ♥  ♥

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/835106.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

信息安全风险评估总结【GB/T 20984-2007】

文章目录 风险评估实施流程一.风险评估准备1.1确定风险评估目标1.2确定风险评估范围1.3组建评估团队1.4风险评估工作启动会议1.5系统调研1.6确定评估依据1.7确定评估工具1.8制定评估方案1.9获得支持 二.风险要素识别2.1实施整个流程图2.2资产识别2.2.1资产调查2.2.2资产分类2.2…

vCenter 7.0 的热迁移配置操作指南

vCenter 7.0 的热迁移配置操作指南 现在我们已经部署好了vCenter 7.0&#xff08;VMware vCenter Server 7.0快速部署操作指南&#xff09;和几台ESXi 7.0的虚拟主机&#xff08;VMWare ESXi 7.0快速部署操作指南&#xff09;&#xff0c;我们可以继续测试之前操作失败的热迁移…

【练】要求打印,倒置线程,顺序执行。运行顺序为:线程1 线程2 线程1 线程2

要求定义一个全局变量 char buf[] "1234567"&#xff0c;创建两个线程&#xff0c;不考虑退出条件&#xff0c;另&#xff1a; A线程循环打印buf字符串&#xff0c;B线程循环倒置buf字符串&#xff0c;即buf中本来存储1234567&#xff0c;倒置后buf中存储7654321. 不…

RabbitMQ 教程 | 第9章 RabbitMQ 高阶

&#x1f468;&#x1f3fb;‍&#x1f4bb; 热爱摄影的程序员 &#x1f468;&#x1f3fb;‍&#x1f3a8; 喜欢编码的设计师 &#x1f9d5;&#x1f3fb; 擅长设计的剪辑师 &#x1f9d1;&#x1f3fb;‍&#x1f3eb; 一位高冷无情的编码爱好者 大家好&#xff0c;我是 DevO…

【MySQL】数据去重,仅保留一条(效率最高)

系列文章 C#底层库–MySQLBuilder脚本构建类&#xff08;select、insert、update、in、带条件的SQL自动生成&#xff09; 本文链接&#xff1a;https://blog.csdn.net/youcheng_ge/article/details/129179216 C#底层库–MySQL数据库操作辅助类&#xff08;推荐阅读&#xff0…

一键生成logo的小妙招,这个方法值得收藏

在现代&#xff0c;每个品牌都需要一个标志性的logo&#xff0c;这个logo能够代表品牌&#xff0c;并且让消费者能够轻松识别出这个品牌。然而&#xff0c;对于许多人来说&#xff0c;制作一个漂亮的logo是一项艰巨的任务&#xff0c;需要花费大量的时间和精力。但是&#xff0…

2023 电赛E题--可能会出现的问题以及解决方法

2023年电赛E题报告模板&#xff08;K210版&#xff09;--可直接使用 本文链接&#xff1a;2023年电赛E题报告模板&#xff08;K210版&#xff09;--可直接使用_皓悦编程记的博客-CSDN博客 解决激光笔在黑色区域无法识别 本文链接&#xff1a; 2023 电赛 E 题 激光笔识别有误-…

W5500-EVB-PICO做DNS Client进行域名解析(四)

前言 在上一章节中我们用W5500-EVB-PICO通过dhcp获取ip地址&#xff08;网关&#xff0c;子网掩码&#xff0c;dns服务器&#xff09;等信息&#xff0c;给我们的开发板配置网络信息&#xff0c;成功的接入网络中&#xff0c;那么本章将教大家如何让我们的开发板进行DNS域名解析…

Python(六十三)获取字典视图

❤️ 专栏简介&#xff1a;本专栏记录了我个人从零开始学习Python编程的过程。在这个专栏中&#xff0c;我将分享我在学习Python的过程中的学习笔记、学习路线以及各个知识点。 ☀️ 专栏适用人群 &#xff1a;本专栏适用于希望学习Python编程的初学者和有一定编程基础的人。无…

设计模式行为型——中介者模式

目录 什么是中介者模式 中介者模式的实现 中介者模式角色 中介者模式类图 中介者模式代码实现 中介者模式的特点 优点 缺点 使用场景 注意事项 实际应用 什么是中介者模式 中介者模式&#xff08;Mediator Pattern&#xff09;属于行为型模式&#xff0c;是用来降低…

Filebeat+ELK 部署

Node1节点&#xff08;2C/4G&#xff09;&#xff1a;node1/192.168.8.10 Elasticsearch Kibana Node2节点&#xff08;2C/4G&#xff09;&#xff1a;node2/192.168.8.11 Elasticsearch Apache节点&#xff1a;apache/192.168.8.13 …

Java反射学习(大综合)

第一天 Java反射及动态代理... 2 一、 Java反射... 2 1、什么是反射&#xff1a;... 2 2、反射的原理... 2 3、反射的优缺点&#xff1a;... 2 4、反射的用途&#xff1a;... 3 5、反射机制常用的类&#xff1a;... 3 1、获得Class&#xff1a;主要有三…

计算机基础:数据库-Sqlserver

数据库-Sqlserver 前言参考链接&#xff1a;关键词数据库代码案例视图触发器索引窗口函数游标小记 前言 妥妥的复习&#xff0c;我相信chatjpt,也相信笔记。 说实话&#xff0c;真正碰到问题还是先想到搜索引擎或chatjpt&#xff08;即使印象中自己的笔记记过相关内容&#xf…

NVIDIA 535.86.05 Linux 图形驱动程序改进 Wayland 支持

导读NVIDIA公司近日发布了适用于 Linux、FreeBSD 和 Solaris 系统的 NVIDIA 535.86.05 图形驱动程序&#xff0c;作为其生产分支的维护更新&#xff0c;解决了各种错误和问题。 NVIDIA 535.86.05 是在 NVIDIA 535.54.03 发布一个多月之后发布的&#xff0c;它通过解决在使用某…

量子机器学习解决方案新鲜出炉!Rigetti和ADIALab签署合作

​ &#xff08;图片来源&#xff1a;网络&#xff09; 近日&#xff0c;美国全栈量子经典计算的先驱Rigetti Computing宣布与阿拉伯联合酋长国的ADIA Lab签署了合作协议&#xff0c;双方将共同设计、构建、运行和优化量子计算解决方案&#xff0c;旨在解决概率分布分类问题&am…

【腾讯云Cloud Studio实战训练营】如何成为一名合格的Python爬虫“念咒师”(基于ChatGpt)

【前言】 不管是新手程序猿&#xff0c;还是秃头程序猿&#xff0c;在工作学习中&#xff0c;都无法避免一项看似简单却又异常重要的环节——搭建开发环境&#xff0c;这常常让我们程序猿们头痛不已&#xff01;毫不夸张的说&#xff0c;它可能是整个开发过程中最具挑战性和耗时…

Xcode protobuf2.5添加arm64编译器补丁生成静态库

项目需求&#xff0c;protobuf源码编成静态库使用 但是&#xff0c;github上的protobuf源码没有对应arm64的编译器定义&#xff0c;编译出来的静态库使用时报错。 下面的连接是arm64编译器代码补丁包&#xff0c;把编译器代码放到src/google/protobuf/stubs/atomicops_intern…

【安装】阿里云轻量服务器安装Ubuntu图形化界面(端口号/灰屏问题)

阿里云官网链接 https://help.aliyun.com/zh/simple-application-server/use-cases/use-vnc-to-build-guis-on-ubuntu-18-04-and-20-04 网上搜了很多教程&#xff0c;但是我没在界面看到有vnc连接&#xff0c;后面才发现官网有教程。 其实官网很详细了&#xff0c;不过这里还是…

Golang空结构体struct{}的作用是什么?

文章目录 占位符&#xff1a;通道标识&#xff1a;键集合&#xff1a;内存占用优化&#xff1a;总结&#xff1a; 在Go语言中&#xff0c;空结构体 struct{}是一种特殊的数据类型&#xff0c;它不占用任何内存空间。空结构体没有任何字段&#xff0c;也没有任何方法。尽管它看起…

Android Studio 的Gradle版本修改

使用Android Studio构建项目时&#xff0c;需要配置Gradle&#xff0c;与Gradle插件。 Gradle是一个构建工具&#xff0c;用于管理和自动化Android项目的构建过程。它使用Groovy或Kotlin作为脚本语言&#xff0c;并提供了强大的配置能力来定义项目的依赖关系、编译选项、打包方…