|
1
|
<!DOCTYPE html>
|
1
|
<!DOCTYPE html>
|
|
|
|
2
|
+<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
|
|
|
3
|
+<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
|
|
|
4
|
+<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
|
|
|
5
|
+<!--[if gt IE 8]><!-->
|
|
2
|
<html>
|
6
|
<html>
|
|
|
|
7
|
+<!--<![endif]-->
|
|
3
|
|
8
|
|
|
4
|
<head>
|
9
|
<head>
|
|
|
|
10
|
+ <meta name="viewport"
|
|
|
|
11
|
+ content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,user-scalable=no,viewport-fit=cover">
|
|
|
|
12
|
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
|
|
|
13
|
+ <meta http-equiv="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
|
|
|
14
|
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
|
15
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
16
|
+ <meta http-equiv="Pragma" content="no-cache">
|
|
|
|
17
|
+ <meta http-equiv="Cache" content="no-cache">
|
|
|
|
18
|
+ <meta http-equiv="Expires" content="0">
|
|
5
|
<meta charset="utf-8">
|
19
|
<meta charset="utf-8">
|
|
6
|
- <title>签名页</title>
|
|
|
|
7
|
- <script src="__CDN__/assets/js/signature.js"></script>
|
|
|
|
8
|
- <script src="__CDN__/assets/js/jquery-3.4.1.min.js"></script>
|
20
|
+ <title>项目审核</title>
|
|
|
|
21
|
+ <link rel="stylesheet" href="http://i.gtimg.cn/vipstyle/frozenui/2.0.0/css/frozen.css">
|
|
|
|
22
|
+
|
|
|
|
23
|
+ <style>
|
|
|
|
24
|
+ [v-cloak] {
|
|
|
|
25
|
+ display: none;
|
|
|
|
26
|
+ }
|
|
|
|
27
|
+
|
|
|
|
28
|
+ canvas{
|
|
|
|
29
|
+ width: 100vh;
|
|
|
|
30
|
+ }
|
|
|
|
31
|
+
|
|
|
|
32
|
+ * {
|
|
|
|
33
|
+ margin: 0;
|
|
|
|
34
|
+ padding: 0;
|
|
|
|
35
|
+ }
|
|
|
|
36
|
+
|
|
|
|
37
|
+ html,
|
|
|
|
38
|
+ body {
|
|
|
|
39
|
+ width: 100%;
|
|
|
|
40
|
+ height: 100%;
|
|
|
|
41
|
+ text-align: center;
|
|
|
|
42
|
+ background-color: #FFFFFF;
|
|
|
|
43
|
+ }
|
|
|
|
44
|
+
|
|
|
|
45
|
+ canvas {
|
|
|
|
46
|
+ max-width: 100%;
|
|
|
|
47
|
+ border: 2px dotted #ccc;
|
|
|
|
48
|
+ }
|
|
|
|
49
|
+
|
|
|
|
50
|
+ .opinion {
|
|
|
|
51
|
+ width: 100%;
|
|
|
|
52
|
+ height: 235px;
|
|
|
|
53
|
+ font-size: 16px;
|
|
|
|
54
|
+ border: 1px solid #000;
|
|
|
|
55
|
+ }
|
|
|
|
56
|
+
|
|
|
|
57
|
+ .opinion::-webkit-input-placeholder {
|
|
|
|
58
|
+ line-height: 235px;
|
|
|
|
59
|
+ text-align: center;
|
|
|
|
60
|
+ }
|
|
|
|
61
|
+
|
|
|
|
62
|
+ /* 使用webkit内核的浏览器 */
|
|
|
|
63
|
+ .opinion:-moz-placeholder {
|
|
|
|
64
|
+ line-height: 235px;
|
|
|
|
65
|
+ text-align: center;
|
|
|
|
66
|
+ }
|
|
|
|
67
|
+
|
|
|
|
68
|
+ /* Firefox版本4-18 */
|
|
|
|
69
|
+ .opinion::-moz-placeholder {
|
|
|
|
70
|
+ line-height: 235px;
|
|
|
|
71
|
+ text-align: center;
|
|
|
|
72
|
+ }
|
|
|
|
73
|
+
|
|
|
|
74
|
+ /* Firefox版本19+ */
|
|
|
|
75
|
+ .opinion:-ms-input-placeholder {
|
|
|
|
76
|
+ line-height: 235px;
|
|
|
|
77
|
+ text-align: center;
|
|
|
|
78
|
+ }
|
|
|
|
79
|
+
|
|
|
|
80
|
+ /*elmeentui文本 textarea字体*/
|
|
|
|
81
|
+ .is-disabled .el-input__inner {
|
|
|
|
82
|
+ font-weight: bold !important;
|
|
|
|
83
|
+ font-size: 14px !important;
|
|
|
|
84
|
+ color: #4A5560 !important;
|
|
|
|
85
|
+ }
|
|
|
|
86
|
+ .is-disabled .el-textarea__inner {
|
|
|
|
87
|
+ font-weight: bold !important;
|
|
|
|
88
|
+ font-size: 14px !important;
|
|
|
|
89
|
+ color: #4A5560 !important;
|
|
|
|
90
|
+ }
|
|
|
|
91
|
+ .el-form-item__label {
|
|
|
|
92
|
+ color: black !important;
|
|
|
|
93
|
+ font-weight: bold !important;
|
|
|
|
94
|
+ }
|
|
|
|
95
|
+ </style>
|
|
|
|
96
|
+
|
|
9
|
</head>
|
97
|
</head>
|
|
|
|
98
|
+<body>
|
|
|
|
99
|
+<script src="__CDN__/assets/js/jquery-3.4.1.min.js"></script>
|
|
|
|
100
|
+<script src="/assets/js/index.js"></script>
|
|
|
|
101
|
+<script src="/assets/ele/vue.js"></script>
|
|
10
|
|
102
|
|
|
11
|
-<body style="margin: 0;">
|
|
|
|
12
|
-<div class="popverBox">
|
|
|
|
13
|
- <div class="titleBox">项目审核</div>
|
|
|
|
14
|
- <div id="signSure" class="signSure">
|
|
|
|
15
|
- <input type="hidden" name="id" id="id" value="{$id}">
|
|
|
|
16
|
- <div class="topBtnBox">
|
|
|
|
17
|
- <div class="topTitle">电子签名</div>
|
|
|
|
18
|
- <canvas class="whiteBord" id="whiteBord">
|
|
|
|
19
|
- 您的浏览器不支持canvas技术,请升级浏览器!
|
|
|
|
20
|
- </canvas>
|
103
|
+<link rel="stylesheet" href="__CDN__/assets/ele/element/element.css">
|
|
|
|
104
|
+<script src="__CDN__/assets/ele/element/element.js"></script>
|
|
|
|
105
|
+<script src="__CDN__/assets/ele/Sortable.min.js"></script>
|
|
|
|
106
|
+<script src="__CDN__/assets/ele/vuedraggable.js"></script>
|
|
|
|
107
|
+<script src="__CDN__/assets/ele/moment.js"></script>
|
|
|
|
108
|
+
|
|
|
|
109
|
+<div id="app">
|
|
21
|
|
110
|
|
|
|
|
111
|
+ <input type="hidden" name="id" id="id" value="{$id}">
|
|
|
|
112
|
+ <div v-if="step==1" style="padding:0 15px;margin-top: 25px;">
|
|
|
|
113
|
+ <el-form size="mini">
|
|
|
|
114
|
+ <div>
|
|
|
|
115
|
+ <el-form-item label="审核状态">
|
|
|
|
116
|
+ <div>
|
|
|
|
117
|
+ <el-radio v-model="v_status" label="1" border>通过</el-radio>
|
|
|
|
118
|
+ <el-radio v-model="v_status" label="2" border>退回</el-radio>
|
|
|
|
119
|
+ </div>
|
|
|
|
120
|
+ </el-form-item>
|
|
22
|
</div>
|
121
|
</div>
|
|
23
|
<div>
|
122
|
<div>
|
|
24
|
- <div class="topTitle">审核意见</div>
|
|
|
|
25
|
- <textarea class="opinion" placeholder="输入审核意见,不超过200个字" name="opinion" id="opinion"></textarea>
|
123
|
+ <el-form-item label="审核意见">
|
|
|
|
124
|
+ <el-input type="textarea" rows="8" v-model="option"></el-input>
|
|
|
|
125
|
+ </el-form-item>
|
|
26
|
</div>
|
126
|
</div>
|
|
27
|
- <div class="bottomBtnBox">
|
|
|
|
28
|
- <button class="primaryBtn" id="againWrite">重写</button>
|
|
|
|
29
|
- <button class="primaryBtn activeBtn" id="sureWrite">通过</button>
|
|
|
|
30
|
- <button class="primaryBtn backBtn" id="back">退回</button>
|
127
|
+ </el-form>
|
|
|
|
128
|
+ <button @click="draw" class="ui-btn-lg ui-btn-primary">确认</button>
|
|
31
|
</div>
|
129
|
</div>
|
|
|
|
130
|
+
|
|
|
|
131
|
+ <div v-if="step==3" class="buttons" style="position: absolute;left:15px;bottom:100px;">
|
|
|
|
132
|
+ <button type="button" style="width:40px;height:130px;background-color:#C2C7CC;" @click="clear" class="ui-btn clear">重签</button>
|
|
|
|
133
|
+ <button type="button" @click="toDetail" style="width:40px;height:130px;margin-top:8px" class="ui-btn ui-btn-primary ouput back">项目详情</button>
|
|
|
|
134
|
+ <button type="button" @click="pass" style="width:40px;height:130px;margin-top:10px" class="ui-btn ui-btn-primary ouput pass">确认签名</button>
|
|
32
|
</div>
|
135
|
</div>
|
|
33
|
</div>
|
136
|
</div>
|
|
34
|
-</body>
|
|
|
|
35
|
|
137
|
|
|
36
|
<script>
|
138
|
<script>
|
|
37
|
- function sureWriteCallback(imageBase64,type){
|
139
|
+ new Vue({
|
|
|
|
140
|
+ el: '#app',
|
|
|
|
141
|
+ data: {
|
|
|
|
142
|
+ step: 1,
|
|
|
|
143
|
+ sign : null,
|
|
|
|
144
|
+ id : "{$id}",
|
|
|
|
145
|
+ option:'',
|
|
|
|
146
|
+ v_status:'1',
|
|
|
|
147
|
+ },
|
|
|
|
148
|
+ mounted(){
|
|
|
|
149
|
+ var _this = this;
|
|
|
|
150
|
+
|
|
|
|
151
|
+ },
|
|
|
|
152
|
+ methods:{
|
|
|
|
153
|
+ clear:function(){
|
|
|
|
154
|
+ this.sign.clear();
|
|
|
|
155
|
+ },
|
|
|
|
156
|
+ draw :function(){
|
|
|
|
157
|
+ this.step = 3;
|
|
|
|
158
|
+ //初始化
|
|
|
|
159
|
+ this.sign = sign = new Draw({
|
|
|
|
160
|
+ lineWidth: 10, // 线条宽度
|
|
|
|
161
|
+ width: 400, // canvas 宽
|
|
|
|
162
|
+ height: window.screen.height, //canvas 高
|
|
|
|
163
|
+ strokeStyle: '#333333' // 线条颜色
|
|
|
|
164
|
+ });
|
|
|
|
165
|
+ },
|
|
|
|
166
|
+ toDetail(){
|
|
|
|
167
|
+ var _this = this;
|
|
|
|
168
|
+ _this.sign.destroyed();
|
|
|
|
169
|
+ $('canvas').remove();
|
|
|
|
170
|
+ window.location.href = '/teacher/container/container_detail/detail_view?id=' + _this.id;
|
|
|
|
171
|
+ },
|
|
|
|
172
|
+ pass:function(){
|
|
|
|
173
|
+ var img = new Image();
|
|
|
|
174
|
+ img.style.width = '200px';
|
|
|
|
175
|
+ img.src = this.sign.ouput();
|
|
|
|
176
|
+ this.sureWriteCallback(this.sign.ouput(), 1);
|
|
|
|
177
|
+ },
|
|
|
|
178
|
+ sureWriteCallback:function(imageBase64, type) {
|
|
38
|
// 签名完成后的的逻辑代码
|
179
|
// 签名完成后的的逻辑代码
|
|
|
|
180
|
+
|
|
|
|
181
|
+ if(this.sign.state.undopath.length <= 0){
|
|
|
|
182
|
+ alert("还没有签名");
|
|
|
|
183
|
+ return false;
|
|
|
|
184
|
+ }
|
|
|
|
185
|
+ var _this = this;
|
|
39
|
$.ajax({
|
186
|
$.ajax({
|
|
40
|
- type : "POST", //提交方式
|
|
|
|
41
|
- url : "canvas",//路径
|
|
|
|
42
|
- data : {
|
|
|
|
43
|
- "imgbase64" : imageBase64,
|
|
|
|
44
|
- 'type' : type,
|
|
|
|
45
|
- 'id' : $('#id').val(),
|
|
|
|
46
|
- 'opinion' : $('#opinion').val()
|
|
|
|
47
|
- },//数据,这里使用的是Json格式进行传输
|
|
|
|
48
|
- success:function (data) {
|
|
|
|
49
|
- console.log('成功');
|
187
|
+ type: "POST", //提交方式
|
|
|
|
188
|
+ url: "canvas", //路径
|
|
|
|
189
|
+ data: {
|
|
|
|
190
|
+ "imgbase64": imageBase64,
|
|
|
|
191
|
+ 'type': _this.v_status,
|
|
|
|
192
|
+ 'id': _this.id,
|
|
|
|
193
|
+ 'opinion': _this.option,
|
|
|
|
194
|
+ 'status':_this.v_status
|
|
|
|
195
|
+ }, //数据,这里使用的是Json格式进行传输
|
|
|
|
196
|
+ success: function(data) {
|
|
50
|
alert(data.msg)
|
197
|
alert(data.msg)
|
|
|
|
198
|
+ // window.location.href = '/teacher/container/container_detail/detail_view?id=' + _this.id;
|
|
51
|
},
|
199
|
},
|
|
52
|
- error:function (data) {
|
|
|
|
53
|
- console.log('失败')
|
200
|
+ error: function(data) {
|
|
54
|
alert(data.msg)
|
201
|
alert(data.msg)
|
|
55
|
}
|
202
|
}
|
|
56
|
})
|
203
|
})
|
|
57
|
- }
|
|
|
|
58
|
|
204
|
|
|
59
|
- let params = {
|
|
|
|
60
|
- whiteBord:'whiteBord',//canvas标签的id名称
|
|
|
|
61
|
- againWrite:'againWrite',//重写按钮id名
|
|
|
|
62
|
- sureWrite:'sureWrite',//确认按钮id名
|
|
|
|
63
|
- back:'back',//退回按钮id名
|
|
|
|
64
|
- whiteBordPtions:{},//白板的配置项(空对象时取默认值)
|
|
|
|
65
|
- sureWriteCallback,// 签名完成后的回调函数
|
|
|
|
66
|
}
|
205
|
}
|
|
67
|
- signature(params) // signature.js里封装好的函数,把参数传进去,调用一下即可
|
|
|
|
68
|
-</script>
|
|
|
|
69
|
-
|
|
|
|
70
|
-<style>
|
|
|
|
71
|
- .popverBox{
|
|
|
|
72
|
- background: #f2f2f2;
|
|
|
|
73
|
- position: relative;
|
|
|
|
74
|
- font-size: 30px;
|
|
|
|
75
|
- display: flex;
|
|
|
|
76
|
- align-items: center;
|
|
|
|
77
|
- flex-direction: column;
|
|
|
|
78
|
- height: 100vh;
|
|
|
|
79
|
- }
|
|
|
|
80
|
- .signSure{
|
|
|
|
81
|
- width: 90%;
|
|
|
|
82
|
- border-radius: 16px;
|
|
|
|
83
|
- padding: 20px 12px 28px 12px;
|
|
|
|
84
|
- }
|
|
|
|
85
|
- .titleBox{
|
|
|
|
86
|
- color: #fff;
|
|
|
|
87
|
- background-color: #4285dc;
|
|
|
|
88
|
- display: flex;
|
|
|
|
89
|
- align-items: center;
|
|
|
|
90
|
- justify-content: center;
|
|
|
|
91
|
- width: 100%;
|
|
|
|
92
|
- height: 7rem;
|
|
|
|
93
|
- font-size: 2.5rem;
|
|
|
|
94
|
- }
|
|
|
|
95
|
- .topTitle{
|
|
|
|
96
|
- margin: 20px 0 12px 12px;
|
|
|
|
97
|
- font-size: 2.3rem;
|
|
|
|
98
|
- }
|
|
|
|
99
|
- .whiteBord{
|
|
|
|
100
|
- width: 100%;
|
|
|
|
101
|
- height: 95%;
|
|
|
|
102
|
- border: 1px solid #000;
|
|
|
|
103
|
- background: #fff;
|
|
|
|
104
|
- margin: 0 auto;
|
|
|
|
105
|
- border-radius: 4px;
|
|
|
|
106
|
- margin-bottom: 12px;
|
|
|
|
107
|
- }
|
|
|
|
108
|
- .bottomBtnBox{
|
|
|
|
109
|
- padding: 60px 7px;
|
|
|
|
110
|
- display: flex;
|
|
|
|
111
|
- justify-content: space-between;
|
|
|
|
112
|
- }
|
|
|
|
113
|
- .primaryBtn{
|
|
|
|
114
|
- width: 25%;
|
|
|
|
115
|
- height: 80px;
|
|
|
|
116
|
- color: #666;
|
|
|
|
117
|
- border: 1px solid #ccc;
|
|
|
|
118
|
- border-radius: 4px;
|
|
|
|
119
|
- background: #fff;
|
|
|
|
120
|
- font-size: 30px;
|
|
|
|
121
|
- }
|
|
|
|
122
|
- .activeBtn{
|
|
|
|
123
|
- /*background: #315294;*/
|
|
|
|
124
|
- background: rgb(38,198,218);
|
|
|
|
125
|
- color: #fff;
|
|
|
|
126
|
- border: none;
|
|
|
|
127
|
- }
|
|
|
|
128
|
- .backBtn{
|
|
|
|
129
|
- /*background: #315294;*/
|
|
|
|
130
|
- background: rgb(252,75,108);
|
|
|
|
131
|
- color: #fff;
|
|
|
|
132
|
- border: none;
|
|
|
|
133
|
- }
|
|
|
|
134
|
- .opinion{
|
|
|
|
135
|
- width: 100%;
|
|
|
|
136
|
- height: 235px;
|
|
|
|
137
|
- font-size: 30px;
|
|
|
|
138
|
- border: 1px solid #000;
|
|
|
|
139
|
}
|
206
|
}
|
|
|
|
207
|
+ })
|
|
140
|
|
208
|
|
|
141
|
- .opinion::-webkit-input-placeholder{
|
|
|
|
142
|
- line-height: 235px;text-align: center;
|
|
|
|
143
|
- }/* 使用webkit内核的浏览器 */
|
|
|
|
144
|
- .opinion:-moz-placeholder{
|
|
|
|
145
|
- line-height: 235px;text-align: center;
|
|
|
|
146
|
- }/* Firefox版本4-18 */
|
|
|
|
147
|
- .opinion::-moz-placeholder{
|
|
|
|
148
|
- line-height: 235px;text-align: center;
|
|
|
|
149
|
- }/* Firefox版本19+ */
|
|
|
|
150
|
- .opinion:-ms-input-placeholder{
|
|
|
|
151
|
- line-height: 235px;text-align: center;
|
|
|
|
152
|
- }
|
209
|
+</script>
|
|
|
|
210
|
+
|
|
|
|
211
|
+</body>
|
|
153
|
|
212
|
|
|
154
|
-</style>
|
|
|
|
155
|
</html> |
213
|
</html> |