|
|
|
<!DOCTYPE html>
|
|
|
|
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
|
|
|
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
|
|
|
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
|
|
|
<!--[if gt IE 8]><!-->
|
|
|
|
<html>
|
|
|
|
<!--<![endif]-->
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta name="viewport"
|
|
|
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,user-scalable=no,viewport-fit=cover">
|
|
|
|
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
|
|
|
<meta http-equiv="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta http-equiv="Pragma" content="no-cache">
|
|
|
|
<meta http-equiv="Cache" content="no-cache">
|
|
|
|
<meta http-equiv="Expires" content="0">
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>签名页</title>
|
|
|
|
<script src="__CDN__/assets/js/signature.js"></script>
|
|
|
|
<script src="__CDN__/assets/js/jquery-3.4.1.min.js"></script>
|
|
|
|
<title>项目审核</title>
|
|
|
|
<link rel="stylesheet" href="http://i.gtimg.cn/vipstyle/frozenui/2.0.0/css/frozen.css">
|
|
|
|
|
|
|
|
<style>
|
|
|
|
[v-cloak] {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
canvas{
|
|
|
|
width: 100vh;
|
|
|
|
}
|
|
|
|
|
|
|
|
* {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
html,
|
|
|
|
body {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
text-align: center;
|
|
|
|
background-color: #FFFFFF;
|
|
|
|
}
|
|
|
|
|
|
|
|
canvas {
|
|
|
|
max-width: 100%;
|
|
|
|
border: 2px dotted #ccc;
|
|
|
|
}
|
|
|
|
|
|
|
|
.opinion {
|
|
|
|
width: 100%;
|
|
|
|
height: 235px;
|
|
|
|
font-size: 16px;
|
|
|
|
border: 1px solid #000;
|
|
|
|
}
|
|
|
|
|
|
|
|
.opinion::-webkit-input-placeholder {
|
|
|
|
line-height: 235px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 使用webkit内核的浏览器 */
|
|
|
|
.opinion:-moz-placeholder {
|
|
|
|
line-height: 235px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Firefox版本4-18 */
|
|
|
|
.opinion::-moz-placeholder {
|
|
|
|
line-height: 235px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Firefox版本19+ */
|
|
|
|
.opinion:-ms-input-placeholder {
|
|
|
|
line-height: 235px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*elmeentui文本 textarea字体*/
|
|
|
|
.is-disabled .el-input__inner {
|
|
|
|
font-weight: bold !important;
|
|
|
|
font-size: 14px !important;
|
|
|
|
color: #4A5560 !important;
|
|
|
|
}
|
|
|
|
.is-disabled .el-textarea__inner {
|
|
|
|
font-weight: bold !important;
|
|
|
|
font-size: 14px !important;
|
|
|
|
color: #4A5560 !important;
|
|
|
|
}
|
|
|
|
.el-form-item__label {
|
|
|
|
color: black !important;
|
|
|
|
font-weight: bold !important;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<script src="__CDN__/assets/js/jquery-3.4.1.min.js"></script>
|
|
|
|
<script src="/assets/js/index.js"></script>
|
|
|
|
<script src="/assets/ele/vue.js"></script>
|
|
|
|
|
|
|
|
<body style="margin: 0;">
|
|
|
|
<div class="popverBox">
|
|
|
|
<div class="titleBox">项目审核</div>
|
|
|
|
<div id="signSure" class="signSure">
|
|
|
|
<input type="hidden" name="id" id="id" value="{$id}">
|
|
|
|
<div class="topBtnBox">
|
|
|
|
<div class="topTitle">电子签名</div>
|
|
|
|
<canvas class="whiteBord" id="whiteBord">
|
|
|
|
您的浏览器不支持canvas技术,请升级浏览器!
|
|
|
|
</canvas>
|
|
|
|
<link rel="stylesheet" href="__CDN__/assets/ele/element/element.css">
|
|
|
|
<script src="__CDN__/assets/ele/element/element.js"></script>
|
|
|
|
<script src="__CDN__/assets/ele/Sortable.min.js"></script>
|
|
|
|
<script src="__CDN__/assets/ele/vuedraggable.js"></script>
|
|
|
|
<script src="__CDN__/assets/ele/moment.js"></script>
|
|
|
|
|
|
|
|
<div id="app">
|
|
|
|
|
|
|
|
<input type="hidden" name="id" id="id" value="{$id}">
|
|
|
|
<div v-if="step==1" style="padding:0 15px;margin-top: 25px;">
|
|
|
|
<el-form size="mini">
|
|
|
|
<div>
|
|
|
|
<el-form-item label="审核状态">
|
|
|
|
<div>
|
|
|
|
<el-radio v-model="v_status" label="1" border>通过</el-radio>
|
|
|
|
<el-radio v-model="v_status" label="2" border>退回</el-radio>
|
|
|
|
</div>
|
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div class="topTitle">审核意见</div>
|
|
|
|
<textarea class="opinion" placeholder="输入审核意见,不超过200个字" name="opinion" id="opinion"></textarea>
|
|
|
|
<el-form-item label="审核意见">
|
|
|
|
<el-input type="textarea" rows="8" v-model="option"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
<div class="bottomBtnBox">
|
|
|
|
<button class="primaryBtn" id="againWrite">重写</button>
|
|
|
|
<button class="primaryBtn activeBtn" id="sureWrite">通过</button>
|
|
|
|
<button class="primaryBtn backBtn" id="back">退回</button>
|
|
|
|
</el-form>
|
|
|
|
<button @click="draw" class="ui-btn-lg ui-btn-primary">确认</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-if="step==3" class="buttons" style="position: absolute;left:15px;bottom:100px;">
|
|
|
|
<button type="button" style="width:40px;height:130px;background-color:#C2C7CC;" @click="clear" class="ui-btn clear">重签</button>
|
|
|
|
<button type="button" @click="toDetail" style="width:40px;height:130px;margin-top:8px" class="ui-btn ui-btn-primary ouput back">项目详情</button>
|
|
|
|
<button type="button" @click="pass" style="width:40px;height:130px;margin-top:10px" class="ui-btn ui-btn-primary ouput pass">确认签名</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
function sureWriteCallback(imageBase64,type){
|
|
|
|
new Vue({
|
|
|
|
el: '#app',
|
|
|
|
data: {
|
|
|
|
step: 1,
|
|
|
|
sign : null,
|
|
|
|
id : "{$id}",
|
|
|
|
option:'',
|
|
|
|
v_status:'1',
|
|
|
|
},
|
|
|
|
mounted(){
|
|
|
|
var _this = this;
|
|
|
|
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
clear:function(){
|
|
|
|
this.sign.clear();
|
|
|
|
},
|
|
|
|
draw :function(){
|
|
|
|
this.step = 3;
|
|
|
|
//初始化
|
|
|
|
this.sign = sign = new Draw({
|
|
|
|
lineWidth: 10, // 线条宽度
|
|
|
|
width: 400, // canvas 宽
|
|
|
|
height: window.screen.height, //canvas 高
|
|
|
|
strokeStyle: '#333333' // 线条颜色
|
|
|
|
});
|
|
|
|
},
|
|
|
|
toDetail(){
|
|
|
|
var _this = this;
|
|
|
|
_this.sign.destroyed();
|
|
|
|
$('canvas').remove();
|
|
|
|
window.location.href = '/teacher/container/container_detail/detail_view?id=' + _this.id;
|
|
|
|
},
|
|
|
|
pass:function(){
|
|
|
|
var img = new Image();
|
|
|
|
img.style.width = '200px';
|
|
|
|
img.src = this.sign.ouput();
|
|
|
|
this.sureWriteCallback(this.sign.ouput(), 1);
|
|
|
|
},
|
|
|
|
sureWriteCallback:function(imageBase64, type) {
|
|
|
|
// 签名完成后的的逻辑代码
|
|
|
|
|
|
|
|
if(this.sign.state.undopath.length <= 0){
|
|
|
|
alert("还没有签名");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
var _this = this;
|
|
|
|
$.ajax({
|
|
|
|
type : "POST", //提交方式
|
|
|
|
url : "canvas",//路径
|
|
|
|
data : {
|
|
|
|
"imgbase64" : imageBase64,
|
|
|
|
'type' : type,
|
|
|
|
'id' : $('#id').val(),
|
|
|
|
'opinion' : $('#opinion').val()
|
|
|
|
},//数据,这里使用的是Json格式进行传输
|
|
|
|
success:function (data) {
|
|
|
|
console.log('成功');
|
|
|
|
type: "POST", //提交方式
|
|
|
|
url: "canvas", //路径
|
|
|
|
data: {
|
|
|
|
"imgbase64": imageBase64,
|
|
|
|
'type': _this.v_status,
|
|
|
|
'id': _this.id,
|
|
|
|
'opinion': _this.option,
|
|
|
|
'status':_this.v_status
|
|
|
|
}, //数据,这里使用的是Json格式进行传输
|
|
|
|
success: function(data) {
|
|
|
|
alert(data.msg)
|
|
|
|
// window.location.href = '/teacher/container/container_detail/detail_view?id=' + _this.id;
|
|
|
|
},
|
|
|
|
error:function (data) {
|
|
|
|
console.log('失败')
|
|
|
|
error: function(data) {
|
|
|
|
alert(data.msg)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
let params = {
|
|
|
|
whiteBord:'whiteBord',//canvas标签的id名称
|
|
|
|
againWrite:'againWrite',//重写按钮id名
|
|
|
|
sureWrite:'sureWrite',//确认按钮id名
|
|
|
|
back:'back',//退回按钮id名
|
|
|
|
whiteBordPtions:{},//白板的配置项(空对象时取默认值)
|
|
|
|
sureWriteCallback,// 签名完成后的回调函数
|
|
|
|
}
|
|
|
|
signature(params) // signature.js里封装好的函数,把参数传进去,调用一下即可
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.popverBox{
|
|
|
|
background: #f2f2f2;
|
|
|
|
position: relative;
|
|
|
|
font-size: 30px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
flex-direction: column;
|
|
|
|
height: 100vh;
|
|
|
|
}
|
|
|
|
.signSure{
|
|
|
|
width: 90%;
|
|
|
|
border-radius: 16px;
|
|
|
|
padding: 20px 12px 28px 12px;
|
|
|
|
}
|
|
|
|
.titleBox{
|
|
|
|
color: #fff;
|
|
|
|
background-color: #4285dc;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
width: 100%;
|
|
|
|
height: 7rem;
|
|
|
|
font-size: 2.5rem;
|
|
|
|
}
|
|
|
|
.topTitle{
|
|
|
|
margin: 20px 0 12px 12px;
|
|
|
|
font-size: 2.3rem;
|
|
|
|
}
|
|
|
|
.whiteBord{
|
|
|
|
width: 100%;
|
|
|
|
height: 95%;
|
|
|
|
border: 1px solid #000;
|
|
|
|
background: #fff;
|
|
|
|
margin: 0 auto;
|
|
|
|
border-radius: 4px;
|
|
|
|
margin-bottom: 12px;
|
|
|
|
}
|
|
|
|
.bottomBtnBox{
|
|
|
|
padding: 60px 7px;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
.primaryBtn{
|
|
|
|
width: 25%;
|
|
|
|
height: 80px;
|
|
|
|
color: #666;
|
|
|
|
border: 1px solid #ccc;
|
|
|
|
border-radius: 4px;
|
|
|
|
background: #fff;
|
|
|
|
font-size: 30px;
|
|
|
|
}
|
|
|
|
.activeBtn{
|
|
|
|
/*background: #315294;*/
|
|
|
|
background: rgb(38,198,218);
|
|
|
|
color: #fff;
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
.backBtn{
|
|
|
|
/*background: #315294;*/
|
|
|
|
background: rgb(252,75,108);
|
|
|
|
color: #fff;
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
.opinion{
|
|
|
|
width: 100%;
|
|
|
|
height: 235px;
|
|
|
|
font-size: 30px;
|
|
|
|
border: 1px solid #000;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
.opinion::-webkit-input-placeholder{
|
|
|
|
line-height: 235px;text-align: center;
|
|
|
|
}/* 使用webkit内核的浏览器 */
|
|
|
|
.opinion:-moz-placeholder{
|
|
|
|
line-height: 235px;text-align: center;
|
|
|
|
}/* Firefox版本4-18 */
|
|
|
|
.opinion::-moz-placeholder{
|
|
|
|
line-height: 235px;text-align: center;
|
|
|
|
}/* Firefox版本19+ */
|
|
|
|
.opinion:-ms-input-placeholder{
|
|
|
|
line-height: 235px;text-align: center;
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</style>
|
|
|
|
</html> |
...
|
...
|
|