iv-npm 1.7.74 → 1.7.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,743 +1,694 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1
+ <!DOCTYPE html
2
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
  <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>文豆高拍仪多浏览器V1.26.2版测试Demo</title>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- </head>
7
-
8
- <!-- 引入高拍仪JS接口-->
9
- <script src="wdgpy.js" type="text/javascript" charset="utf-8"></script>
10
- <script src="postMessage.js" type="text/javascript" charset="utf-8"></script>
11
-
12
- <script type="text/javascript">
13
- function getMessageId(length, chars) {
14
- var result = "";
15
- for (var i = length; i > 0; --i)
16
- result += chars[Math.floor(Math.random() * chars.length)];
17
- return result;
18
- }
19
- var messageId = null
20
-
21
- var fileBase64Str = "";
22
- var file_path = "";
23
-
24
- //时间格式化显示
25
- function formatDate(time) {
26
- var date = new Date(time);
27
- var year = date.getFullYear(),
28
- month = date.getMonth() + 1,
29
- day = date.getDate(),
30
- hour = date.getHours(),
31
- min = date.getMinutes(),
32
- sec = date.getSeconds();
33
- var newTime =
34
- year +
35
- (month < 10 ? "0" + month : month) +
36
- (day < 10 ? "0" + day : day) +
37
- (hour < 10 ? "0" + hour : hour) +
38
- (min < 10 ? "0" + min : min) +
39
- (sec < 10 ? "0" + sec : sec);
40
- return newTime;
41
- }
42
-
43
- function sleep(milliSeconds) {
44
- var startTime = new Date().getTime();
45
- while (new Date().getTime() < startTime + milliSeconds);
46
- }
47
-
48
- function ShowInfo(op) {
49
- console.log(op);
50
- }
51
-
52
- /*----------------------------------------------------
4
+
5
+ <head>
6
+ <title>文豆高拍仪多浏览器V1.26.2版测试Demo</title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+ </head>
9
+
10
+ <!-- 引入高拍仪JS接口-->
11
+ <script src="wdgpy.js" type="text/javascript" charset="utf-8"></script>
12
+ <script src="postMessage.js" type="text/javascript" charset="utf-8"></script>
13
+
14
+ <script type="text/javascript">
15
+ var fileBase64Str = "";
16
+ var file_path = "";
17
+
18
+ //时间格式化显示
19
+ function formatDate(time) {
20
+ var date = new Date(time);
21
+ var year = date.getFullYear(),
22
+ month = date.getMonth() + 1,
23
+ day = date.getDate(),
24
+ hour = date.getHours(),
25
+ min = date.getMinutes(),
26
+ sec = date.getSeconds();
27
+ var newTime = year +
28
+ (month < 10 ? '0' + month : month) +
29
+ (day < 10 ? '0' + day : day) +
30
+ (hour < 10 ? '0' + hour : hour) +
31
+ (min < 10 ? '0' + min : min) +
32
+ (sec < 10 ? '0' + sec : sec);
33
+ return newTime;
34
+ }
35
+
36
+
37
+ function sleep(milliSeconds) {
38
+ var startTime = new Date().getTime();
39
+ while (new Date().getTime() < startTime + milliSeconds);
40
+ }
41
+
42
+ function ShowInfo(op) {
43
+ console.log(op)
44
+ }
45
+
46
+
47
+ /*----------------------------------------------------
53
48
  ---(必须重写该函数)返回获取的设备数目及设备名称 ---
54
49
  -----------------------------------------------------*/
55
- function GetDevCountAndNameResultCB(devCount, devNameArr) {
56
- if (devCount > 0) {
57
- var obj = document.getElementById("DevName");
58
- obj.options.length = 0;
59
- for (var i = 0; i < devCount; i++) {
60
- var objOption = document.createElement("option");
61
- objOption.text = devNameArr[i];
62
- objOption.value = i;
63
- obj.options.add(objOption);
64
- }
65
- obj.selectedIndex = 0;
66
- var CamID = obj.selectedIndex;
67
-
68
- //获取分辨率
69
- Cam_GetDevResolution(CamID);
70
- } else {
71
- window.parent.postMessage(
72
- { error: "没有发现合适的设备!", messageId: messageId },
73
- "*"
74
- );
50
+ function GetDevCountAndNameResultCB(devCount, devNameArr) {
51
+
52
+ if (devCount > 0) {
53
+
54
+ var obj = document.getElementById("DevName");
55
+ obj.options.length = 0;
56
+ for (var i = 0; i < devCount; i++) {
57
+ var objOption = document.createElement("option");
58
+ objOption.text = devNameArr[i];
59
+ objOption.value = i;
60
+ obj.options.add(objOption);
75
61
  }
62
+ obj.selectedIndex = 0;
63
+ var CamID = obj.selectedIndex;
64
+
65
+ //获取分辨率
66
+ Cam_GetDevResolution(CamID);
67
+
68
+ }
69
+ else {
70
+ window.parent.postMessage({ error: "没有发现合适的设备!" }, '*')
76
71
  }
72
+ }
77
73
 
78
- /*---------------------------------------------------
74
+ /*---------------------------------------------------
79
75
  --- (必须重写该函数)返回获取的设备分辨率信息 ---
80
76
  ----------------------------------------------------*/
81
- function GetResolutionResultCB(resCount, resArr) {
82
- if (resCount > 0) {
83
- var selectIndex = 0;
84
- var obj = document.getElementById("DevResolution");
85
- obj.options.length = 0;
86
- for (var i = 0; i < resCount; i++) {
87
- var objOption = document.createElement("option");
88
- objOption.text = resArr[i];
89
- objOption.value = i;
90
- obj.options.add(objOption);
91
- //默认1000万分辨率打开
92
- if (resArr[i] == "3672*2856") {
93
- selectIndex = i;
94
- }
77
+ function GetResolutionResultCB(resCount, resArr) {
78
+
79
+ if (resCount > 0) {
80
+ var selectIndex = 0;
81
+ var obj = document.getElementById("DevResolution");
82
+ obj.options.length = 0;
83
+ for (var i = 0; i < resCount; i++) {
84
+ var objOption = document.createElement("option");
85
+ objOption.text = resArr[i];
86
+ objOption.value = i;
87
+ obj.options.add(objOption);
88
+ //默认1000万分辨率打开
89
+ if (resArr[i] == "3672*2856") {
90
+ selectIndex = i;
95
91
  }
96
- obj.selectedIndex = selectIndex;
97
-
98
- //打开摄像头
99
- Cam_Close();
100
- var restr = obj[obj.selectedIndex].text;
101
- var pos = restr.lastIndexOf("*");
102
- var width = parseInt(restr.substring(0, pos));
103
- var height = parseInt(restr.substring(pos + 1, restr.length));
104
- var CamID = document.getElementById("DevName").selectedIndex;
105
- Cam_Open(CamID, width, height);
106
- } else {
107
- window.parent.postMessage({ error: "获取分辨率信息失败!" , messageId: messageId}, "*");
108
92
  }
93
+ obj.selectedIndex = selectIndex;
94
+
95
+ //打开摄像头
96
+ Cam_Close();
97
+ var restr = obj[obj.selectedIndex].text;
98
+ var pos = restr.lastIndexOf("*");
99
+ var width = parseInt(restr.substring(0, pos));
100
+ var height = parseInt(restr.substring(pos + 1, restr.length));
101
+ var CamID = document.getElementById("DevName").selectedIndex;
102
+ Cam_Open(CamID, width, height);
103
+ }
104
+ else {
105
+ window.parent.postMessage({ error: "获取分辨率信息失败!" }, '*')
109
106
  }
107
+ }
110
108
 
111
- /*---------------------------------------------------
109
+
110
+ /*---------------------------------------------------
112
111
  --- (必须重写该函数)返回摄像头开启状态 ---
113
112
  ----------------------------------------------------*/
114
- function GetCameraOnOffStatus(status) {
115
- if (status == 0) {
116
- window.parent.postMessage({ message: "设备开启成功", messageId: messageId }, "*");
117
- Cam_SetCutMode(1); //设备开启后自动裁剪
118
- } else {
119
- window.parent.postMessage({ error: "设备开启失败", messageId: messageId }, "*");
120
- }
113
+ function GetCameraOnOffStatus(status) {
114
+ if (status == 0) {
115
+ window.parent.postMessage({ message: "设备开启成功" }, '*')
116
+ Cam_SetCutMode(1); //设备开启后自动裁剪
121
117
  }
118
+ else {
119
+ window.parent.postMessage({ error: "设备开启失败" }, '*')
120
+ }
121
+
122
+ }
122
123
 
123
- /*---------------------------------------------------
124
+
125
+ /*---------------------------------------------------
124
126
  -------- (必须重写该函数)拍照结果 ---------
125
127
  ----------------------------------------------------*/
126
- function GetCaptrueImgResultCB(flag, path, base64Str) {
127
- if (flag == 0) {
128
- file_path = path;
129
- fileBase64Str = base64Str;
130
- var obj = document.getElementById("CameraPhoto");
131
- obj.src = "data:;base64," + base64Str;
132
- if (path == "") {
133
- window.parent.postMessage({ message: "拍照成功", messageId: messageId }, "*");
134
- } else {
135
- console.log(messageId,'135');
136
-
137
- window.parent.postMessage(
138
- {
139
- message: "拍照成功,图片保存位置:" + path,
140
- GetCaptrueImgResultCB: "data:;base64," + base64Str,
141
- messageId: messageId
142
- },
143
- "*"
144
- );
145
- }
146
- } else {
147
- window.parent.postMessage({ error: "拍照失败", messageId: messageId }, "*");
128
+ function GetCaptrueImgResultCB(flag, path, base64Str) {
129
+ if (flag == 0) {
130
+ file_path = path;
131
+ fileBase64Str = base64Str;
132
+ var obj = document.getElementById("CameraPhoto");
133
+ obj.src = "data:;base64," + base64Str;
134
+ if (path == "") {
135
+ window.parent.postMessage({ message: "拍照成功" }, '*')
148
136
  }
137
+ else {
138
+ window.parent.postMessage({ message: "拍照成功,图片保存位置:" + path, GetCaptrueImgResultCB: "data:;base64," + base64Str }, '*')
139
+ }
140
+ }
141
+ else {
142
+ window.parent.postMessage({ error: "拍照失败" }, '*')
149
143
  }
150
144
 
151
- /*---------------------------------------------------
145
+ }
146
+
147
+
148
+ /*---------------------------------------------------
152
149
  ------ (必须重写该函数)身份证信息返回结果 ------
153
150
  ----------------------------------------------------*/
154
- function GetIdCardInfoResultCB(
155
- flag,
156
- Name,
157
- Sex,
158
- Nation,
159
- Born,
160
- Address,
161
- CardNum,
162
- IssuedAt,
163
- EffectedDate,
164
- CardImgPath,
165
- CardImgBase64
166
- ) {
167
- if (flag == 0) {
168
- document.getElementById("CardName").value = Name;
169
- document.getElementById("CardSex").value = Sex;
170
- document.getElementById("CardNation").value = Nation;
171
- document.getElementById("CardBorn").value = Born;
172
- document.getElementById("CardAddress").value = Address;
173
- document.getElementById("CardNum").value = CardNum;
174
- document.getElementById("CardIssuedAt").value = IssuedAt;
175
- document.getElementById("CardEffectDate").value = EffectedDate;
176
- var obj = document.getElementById("IdCardPhoto");
177
- obj.src = "data:;base64," + CardImgBase64;
178
- window.parent.postMessage({ message: "读卡成功", messageId: messageId }, "*");
179
- } else {
180
- window.parent.postMessage({ error: "读卡失败" , messageId: messageId}, "*");
181
- }
151
+ function GetIdCardInfoResultCB(flag, Name, Sex, Nation, Born, Address, CardNum, IssuedAt, EffectedDate, CardImgPath, CardImgBase64) {
152
+ if (flag == 0) {
153
+ document.getElementById("CardName").value = Name;
154
+ document.getElementById("CardSex").value = Sex;
155
+ document.getElementById("CardNation").value = Nation;
156
+ document.getElementById("CardBorn").value = Born;
157
+ document.getElementById("CardAddress").value = Address;
158
+ document.getElementById("CardNum").value = CardNum;
159
+ document.getElementById("CardIssuedAt").value = IssuedAt;
160
+ document.getElementById("CardEffectDate").value = EffectedDate;
161
+ var obj = document.getElementById("IdCardPhoto");
162
+ obj.src = "data:;base64," + CardImgBase64;
163
+ window.parent.postMessage({ message: "读卡成功" }, '*')
164
+ }
165
+ else {
166
+ window.parent.postMessage({ error: "读卡失败" }, '*')
182
167
  }
183
168
 
184
- /*---------------------------------------------------
169
+ }
170
+
171
+
172
+ /*---------------------------------------------------
185
173
  ------ (必须重写该函数)条码二维码识别返回结果------
186
174
  ----------------------------------------------------*/
187
- function QrBarCodeRecogResultCB(flag, codeStr) {
188
- if (flag == 0)
189
- window.parent.postMessage(
190
- { message: "条码/二维码识别结果:" + codeStr, messageId: messageId },
191
- "*"
192
- );
193
- else window.parent.postMessage({ error: "未识别到内容", messageId: messageId }, "*");
194
- }
175
+ function QrBarCodeRecogResultCB(flag, codeStr) {
176
+ if (flag == 0)
177
+ window.parent.postMessage({ message: "条码/二维码识别结果:" + codeStr }, '*')
178
+ else
179
+ window.parent.postMessage({ error: "未识别到内容" }, '*')
180
+ }
195
181
 
196
- /*********************
197
- *** 初始化操作 ***
198
- **********************/
199
182
 
200
- function LoadCameraDocument() {
201
- if (!window.WebSocket) {
202
- alert("浏览器不支持HTML5,请更新或者使用其它浏览器!");
203
- }
204
- //console.log("LoadCameraDocument");
205
- messageId = getMessageId(
206
- 10,
207
- "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
208
- );
209
- console.log(messageId,'207');
210
- var obj = document.getElementById("CameraCtl");
211
- Cam_ControlInit(obj, 0, 0, 600, 400);
212
- }
213
183
 
214
- window.onload = function () {
215
- console.log("window.onload");
216
- };
184
+ /*********************
185
+ *** 初始化操作 ***
186
+ **********************/
217
187
 
218
- /*********************
219
- *** 打开摄像头 ***
220
- **********************/
221
- function toOpenCamera() {
222
- var CamID = document.getElementById("DevName").selectedIndex;
223
- var obj = document.getElementById("DevResolution");
224
- var restr = obj[obj.selectedIndex].text;
225
- var pos = restr.lastIndexOf("*");
226
- var width = parseInt(restr.substring(0, pos));
227
- var height = parseInt(restr.substring(pos + 1, restr.length));
228
- Cam_Open(CamID, width, height);
229
- }
230
188
 
231
- /*********************
232
- *** 关闭摄像头 ***
233
- **********************/
234
- function toCloseCamera() {
235
- Cam_Close();
236
- }
189
+ function LoadCameraDocument() {
237
190
 
238
- /*********************
239
- *** 关闭弹窗 ***
240
- **********************/
241
- function toCloseModal() {
242
- window.onbeforeunload();
191
+ if (!window.WebSocket) {
192
+ alert("浏览器不支持HTML5,请更新或者使用其它浏览器!");
243
193
  }
194
+ //console.log("LoadCameraDocument");
195
+ var obj = document.getElementById("CameraCtl");
196
+ Cam_ControlInit(obj, 0, 0, 600, 400);
197
+ }
244
198
 
245
- /*********************
246
- *** 切换摄像头 ***
247
- **********************/
248
- function SelectDevice() {
249
- var CamID = document.getElementById("DevName").selectedIndex;
250
- //获取分辨率
251
- Cam_GetDevResolution(CamID);
252
- }
253
199
 
254
- /*********************
255
- *** 切换分辨率 ***
256
- **********************/
257
- function SelectResolution() {
258
- var obj = document.getElementById("DevResolution");
259
- var restr = obj[obj.selectedIndex].text;
260
- var pos = restr.lastIndexOf("*");
261
- var width = parseInt(restr.substring(0, pos));
262
- var height = parseInt(restr.substring(pos + 1, restr.length));
263
- var CamID = document.getElementById("DevName").selectedIndex;
264
- Cam_Open(CamID, width, height);
265
- }
200
+ window.onload = function () {
201
+ console.log("window.onload");
202
+ }
203
+
204
+
205
+ /*********************
206
+ *** 打开摄像头 ***
207
+ **********************/
208
+ function toOpenCamera() {
209
+ var CamID = document.getElementById("DevName").selectedIndex;
210
+ var obj = document.getElementById("DevResolution");
211
+ var restr = obj[obj.selectedIndex].text;
212
+ var pos = restr.lastIndexOf("*");
213
+ var width = parseInt(restr.substring(0, pos));
214
+ var height = parseInt(restr.substring(pos + 1, restr.length));
215
+ Cam_Open(CamID, width, height);
216
+ }
217
+
218
+ /*********************
219
+ *** 关闭摄像头 ***
220
+ **********************/
221
+ function toCloseCamera() {
222
+ Cam_Close();
223
+ }
266
224
 
267
225
  /*********************
268
- *** 拍照 ***
269
- **********************/
270
- function TakePhoto() {
271
- var name = formatDate(new Date().getTime());
272
-
273
- var obj = document.getElementById("FileType");
274
- var path;
275
- Cam_SetFileType(obj.selectedIndex); //设置文件格式
276
- if (obj.selectedIndex == 0) {
277
- path = "D:\\" + name + ".jpg";
278
- } else if (obj.selectedIndex == 1) {
279
- path = "D:\\" + name + ".png";
280
- } else if (obj.selectedIndex == 2) {
281
- path = "D:\\" + name + ".tif";
282
- } else if (obj.selectedIndex == 3) {
283
- path = "D:\\" + name + ".pdf";
284
- } else {
285
- path = "D:\\" + name + ".jpg";
286
- }
226
+ *** 关闭弹窗 ***
227
+ **********************/
228
+ function toCloseModal() {
229
+ window.onbeforeunload()
230
+ }
231
+
232
+
233
+ /*********************
234
+ *** 切换摄像头 ***
235
+ **********************/
236
+ function SelectDevice() {
237
+ var CamID = document.getElementById("DevName").selectedIndex;
238
+ //获取分辨率
239
+ Cam_GetDevResolution(CamID);
240
+ }
241
+
242
+
243
+ /*********************
244
+ *** 切换分辨率 ***
245
+ **********************/
246
+ function SelectResolution() {
247
+ var obj = document.getElementById("DevResolution");
248
+ var restr = obj[obj.selectedIndex].text;
249
+ var pos = restr.lastIndexOf("*");
250
+ var width = parseInt(restr.substring(0, pos));
251
+ var height = parseInt(restr.substring(pos + 1, restr.length));
252
+ var CamID = document.getElementById("DevName").selectedIndex;
253
+ Cam_Open(CamID, width, height);
254
+ }
255
+
256
+
257
+ /*********************
258
+ *** 拍照 ***
259
+ **********************/
260
+ function TakePhoto() {
261
+
262
+ var name = formatDate(new Date().getTime());
263
+
264
+ var obj = document.getElementById("FileType");
265
+ var path;
266
+ Cam_SetFileType(obj.selectedIndex); //设置文件格式
267
+ if (obj.selectedIndex == 0) {
268
+ path = "D:\\" + name + ".jpg";
269
+ }
270
+ else if (obj.selectedIndex == 1) {
271
+ path = "D:\\" + name + ".png";
272
+ }
273
+ else if (obj.selectedIndex == 2) {
274
+ path = "D:\\" + name + ".tif";
275
+ }
276
+ else if (obj.selectedIndex == 3) {
277
+ path = "D:\\" + name + ".pdf";
278
+ }
279
+ else {
280
+ path = "D:\\" + name + ".jpg";
281
+ }
282
+
283
+ Cam_Photo(path); //主摄像头拍照
284
+ //Cam_Photo(""); //传空路径拍照获取Base64
285
+
286
+
287
+ }
288
+
289
+
290
+ function SetCameraCutMode() {
291
+ Cam_SetCutMode(1);
292
+ // if (document.getElementById("Radio1").checked) {
293
+ // Cam_SetCutMode(0);
294
+ // }
295
+ // if (document.getElementById("Radio3").checked) {
296
+ // Cam_SetCutMode(1);
297
+ // }
298
+ // if (document.getElementById("Radio2").checked) {
299
+ // Cam_SetCutMode(2);
300
+ // }
301
+ // if (document.getElementById("Radio4").checked) {
302
+
303
+ // Cam_SetCutMode(3);
304
+ // //设置裁剪区域
305
+ // //toSleep(100);
306
+ // //console.log("SetCustomArea");
307
+ // SetCustomArea(3000, 3000, 9000, 9000);
308
+ // }
309
+ }
287
310
 
288
- Cam_Photo(path); //主摄像头拍照
289
- //Cam_Photo(""); //传空路径拍照获取Base64
290
- }
291
311
 
292
- function SetCameraCutMode() {
293
- Cam_SetCutMode(1);
294
- // if (document.getElementById("Radio1").checked) {
295
- // Cam_SetCutMode(0);
296
- // }
297
- // if (document.getElementById("Radio3").checked) {
298
- // Cam_SetCutMode(1);
299
- // }
300
- // if (document.getElementById("Radio2").checked) {
301
- // Cam_SetCutMode(2);
302
- // }
303
- // if (document.getElementById("Radio4").checked) {
312
+ /*********************
313
+ *** 读取身份证 ***
314
+ **********************/
315
+ function GetIdCardInfo() {
316
+ var path = "D:\\IdCard.jpg";
317
+ Cam_ReadIdCard(path);
318
+ //Cam_ReadIdCard("");
319
+ }
304
320
 
305
- // Cam_SetCutMode(3);
306
- // //设置裁剪区域
307
- // //toSleep(100);
308
- // //console.log("SetCustomArea");
309
- // SetCustomArea(3000, 3000, 9000, 9000);
310
- // }
311
- }
312
321
 
313
- /*********************
314
- *** 读取身份证 ***
315
- **********************/
316
- function GetIdCardInfo() {
317
- var path = "D:\\IdCard.jpg";
318
- Cam_ReadIdCard(path);
319
- //Cam_ReadIdCard("");
320
- }
322
+ /*********************
323
+ *** 设置文件格式 ***
324
+ **********************/
325
+ function toSetFileType() {
326
+ var obj = document.getElementById("FileType");
327
+ Cam_SetFileType(obj.selectedIndex);
328
+ }
321
329
 
322
- /*********************
323
- *** 设置文件格式 ***
324
- **********************/
325
- function toSetFileType() {
326
- var obj = document.getElementById("FileType");
327
- Cam_SetFileType(obj.selectedIndex);
328
- }
329
330
 
330
- /*********************
331
- *** 设置色彩模式 ***
332
- **********************/
333
- function toSetColorModel() {
334
- var obj = document.getElementById("ColorMode");
335
- Cam_SetColorMode(obj.selectedIndex);
336
- }
331
+ /*********************
332
+ *** 设置色彩模式 ***
333
+ **********************/
334
+ function toSetColorModel() {
335
+ var obj = document.getElementById("ColorMode");
336
+ Cam_SetColorMode(obj.selectedIndex);
337
+ }
337
338
 
338
- /*********************
339
- *** 设置JPG图像质量 ***
340
- **********************/
341
- function toSetJpgQuality() {
342
- var obj = document.getElementById("JpgQuality");
343
- var val = obj[obj.selectedIndex].text;
344
- Cam_SetJpgQuality(parseInt(val));
345
- }
346
339
 
347
- /*********************
348
- *** 设置去黑边 ***
349
- **********************/
350
- function toSetDeleteBlackEdge() {
351
- var obj = document.getElementById("Checkbox1");
352
- if (obj.checked) {
353
- Cam_SetDeleteBlackEdge(1);
354
- } else {
355
- Cam_SetDeleteBlackEdge(0);
356
- }
357
- }
340
+ /*********************
341
+ *** 设置JPG图像质量 ***
342
+ **********************/
343
+ function toSetJpgQuality() {
344
+ var obj = document.getElementById("JpgQuality");
345
+ var val = obj[obj.selectedIndex].text;
346
+ Cam_SetJpgQuality(parseInt(val));
347
+ }
358
348
 
359
- /*********************
360
- *** 设置去底色 ***
361
- **********************/
362
- function toSetDeleteBgColor() {
363
- var obj = document.getElementById("Checkbox2");
364
- if (obj.checked) {
365
- Cam_SetDeleteBgColor(1);
366
- } else {
367
- Cam_SetDeleteBgColor(0);
368
- }
369
- }
370
349
 
371
- /*********************
372
- ****** 上传方法2 ******
373
- **********************/
374
-
375
- function HttpUploadFile() {
376
- //fileBase64Str在拍照回调函数中赋值,用于测试上传方法2
377
- if (fileBase64Str != "") {
378
- var pos = file_path.lastIndexOf("\\");
379
- var filename = file_path.substring(pos + 1, file_path.length);
380
- //UpladFile方法在upload.js实现
381
- // UpladFile("http://localhost:/api/contract-management/upload/contract", fileBase64Str, filename, HttpResultCallBak);
382
- }
350
+ /*********************
351
+ *** 设置去黑边 ***
352
+ **********************/
353
+ function toSetDeleteBlackEdge() {
354
+ var obj = document.getElementById("Checkbox1");
355
+ if (obj.checked) {
356
+ Cam_SetDeleteBlackEdge(1);
383
357
  }
384
-
385
- //从摄像头中识别二维码
386
- function RecogQrCodeFromCamera(type) {
387
- Cam_RecogQrBarCodeFromCamera(type);
358
+ else {
359
+ Cam_SetDeleteBlackEdge(0);
388
360
  }
361
+ }
389
362
 
390
- //从图片文件中识别二维码
391
- function RecogBarCodeFromFile(type) {
392
- var imgpath = "D:\\123.jpg";
393
- Cam_RecogQrBarCodeFromFile(type, imgpath);
363
+ /*********************
364
+ *** 设置去底色 ***
365
+ **********************/
366
+ function toSetDeleteBgColor() {
367
+ var obj = document.getElementById("Checkbox2");
368
+ if (obj.checked) {
369
+ Cam_SetDeleteBgColor(1);
394
370
  }
371
+ else {
372
+ Cam_SetDeleteBgColor(0);
373
+ }
374
+ }
395
375
 
396
- //添加要合并的PDF文件
397
- function ToAddPDFFile() {
398
- // Cam_AddImgFileToPDF("D:\\1.jpg");
399
- // sleep(100);
400
- // Cam_AddImgFileToPDF("D:\\2.jpg");
401
- // sleep(100);
402
- // Cam_AddImgFileToPDF("D:\\3.jpg");
403
- // sleep(100);
404
376
 
405
- Cam_AddImgFileToPDF("");
406
- sleep(100);
407
- }
408
377
 
409
- /*---------------------------------------------------
378
+ /*********************
379
+ ****** 上传方法2 ******
380
+ **********************/
381
+
382
+ function HttpUploadFile() {
383
+ //fileBase64Str在拍照回调函数中赋值,用于测试上传方法2
384
+ if (fileBase64Str != "") {
385
+ var pos = file_path.lastIndexOf("\\");
386
+ var filename = file_path.substring(pos + 1, file_path.length);
387
+ //UpladFile方法在upload.js实现
388
+ // UpladFile("http://localhost:/api/contract-management/upload/contract", fileBase64Str, filename, HttpResultCallBak);
389
+ }
390
+ }
391
+
392
+
393
+ //从摄像头中识别二维码
394
+ function RecogQrCodeFromCamera(type) {
395
+ Cam_RecogQrBarCodeFromCamera(type)
396
+ }
397
+
398
+ //从图片文件中识别二维码
399
+ function RecogBarCodeFromFile(type) {
400
+ var imgpath = "D:\\123.jpg";
401
+ Cam_RecogQrBarCodeFromFile(type, imgpath)
402
+ }
403
+
404
+
405
+
406
+
407
+ //添加要合并的PDF文件
408
+ function ToAddPDFFile() {
409
+ // Cam_AddImgFileToPDF("D:\\1.jpg");
410
+ // sleep(100);
411
+ // Cam_AddImgFileToPDF("D:\\2.jpg");
412
+ // sleep(100);
413
+ // Cam_AddImgFileToPDF("D:\\3.jpg");
414
+ // sleep(100);
415
+
416
+ Cam_AddImgFileToPDF("");
417
+ sleep(100);
418
+ }
419
+
420
+ /*---------------------------------------------------
410
421
  -------- 添加合并的PDF文件返回结果 ---------
411
422
  ----------------------------------------------------*/
412
- function AddImgFileToPDFResultCB(flag, base64Str) {
413
- if (flag == 0) {
414
- window.parent.postMessage({ message: "添加合并的PDF文件成功", messageId: messageId }, "*");
415
- var obj = document.getElementById("CameraPhoto");
416
- obj.src = "data:;base64," + base64Str;
417
- } else {
418
- window.parent.postMessage({ error: "添加合并的PDF文件失败", messageId: messageId }, "*");
419
- }
423
+ function AddImgFileToPDFResultCB(flag, base64Str) {
424
+ if (flag == 0) {
425
+ window.parent.postMessage({ message: "添加合并的PDF文件成功" }, '*')
426
+ var obj = document.getElementById("CameraPhoto");
427
+ obj.src = "data:;base64," + base64Str;
420
428
  }
421
-
422
- //PDF合并测试
423
- function ToCombinePDF() {
424
- Cam_CombinePDF("D:\\test.pdf");
425
- //Cam_CombinePDF("");
429
+ else {
430
+ window.parent.postMessage({ error: "添加合并的PDF文件失败" }, '*')
426
431
  }
432
+ }
433
+
427
434
 
428
- /*---------------------------------------------------
435
+ //PDF合并测试
436
+ function ToCombinePDF() {
437
+ Cam_CombinePDF("D:\\test.pdf");
438
+ //Cam_CombinePDF("");
439
+ }
440
+
441
+ /*---------------------------------------------------
429
442
  -------- (必须重写该函数)合并PDF结果 ---------
430
443
  ----------------------------------------------------*/
431
- function PdfCombineResultCB(flag, PdfBase64Str) {
432
- if (flag == 0) {
433
- window.parent.postMessage({ message: "合并PDF完成, messageId: messageId" }, "*");
434
- console.log(PdfBase64Str);
435
- } else {
436
- window.parent.postMessage({ error: "合并PDF失败", messageId: messageId }, "*");
437
- }
444
+ function PdfCombineResultCB(flag, PdfBase64Str) {
445
+ if (flag == 0) {
446
+ window.parent.postMessage({ message: "合并PDF完成" }, '*')
447
+ console.log(PdfBase64Str);
448
+ }
449
+ else {
450
+ window.parent.postMessage({ error: "合并PDF失败" }, '*')
438
451
  }
452
+ }
439
453
 
440
- //添加要合并的图像文件
441
- var MergeCount = 0;
442
- function ToAddMergeImageFile() {
443
- MergeCount++;
444
- if (MergeCount > 4) {
445
- window.parent.postMessage(
446
- { error: "提示:图像合并最多支持四页合并", messageId: messageId },
447
- "*"
448
- );
449
- return;
450
- }
451
- Cam_AddMergeImageFile("");
452
- sleep(100);
454
+
455
+ //添加要合并的图像文件
456
+ var MergeCount = 0;
457
+ function ToAddMergeImageFile() {
458
+ MergeCount++;
459
+ if (MergeCount > 4) {
460
+ window.parent.postMessage({ error: "提示:图像合并最多支持四页合并" }, '*')
461
+ return;
453
462
  }
463
+ Cam_AddMergeImageFile("");
464
+ sleep(100);
465
+ }
454
466
 
455
- /*---------------------------------------------------
467
+ /*---------------------------------------------------
456
468
  -------- 添加合并图像文件返回结果 ---------
457
469
  ----------------------------------------------------*/
458
- function AddMergeImageFileResultCB(flag, base64Str) {
459
- if (flag == 0) {
460
- window.parent.postMessage({ message: "添加合并图像文件成功", messageId: messageId }, "*");
461
- var obj = document.getElementById("CameraPhoto");
462
- obj.src = "data:;base64," + base64Str;
463
- } else {
464
- window.parent.postMessage({ error: "添加合并图像文件失败", messageId: messageId }, "*");
465
- }
470
+ function AddMergeImageFileResultCB(flag, base64Str) {
471
+ if (flag == 0) {
472
+ window.parent.postMessage({ message: "添加合并图像文件成功" }, '*')
473
+ var obj = document.getElementById("CameraPhoto");
474
+ obj.src = "data:;base64," + base64Str;
466
475
  }
467
-
468
- //图像合并测试
469
- function ToMergeImages() {
470
- MergeCount = 0;
471
- Cam_MergeImages("D:\\merge.jpg", 0);
476
+ else {
477
+ window.parent.postMessage({ error: "添加合并图像文件失败" }, '*')
472
478
  }
479
+ }
480
+
481
+
482
+ //图像合并测试
483
+ function ToMergeImages() {
484
+ MergeCount = 0;
485
+ Cam_MergeImages("D:\\merge.jpg", 0);
486
+ }
473
487
 
474
- /*---------------------------------------------------
488
+ /*---------------------------------------------------
475
489
  -------- (必须重写该函数)图像合并结果 ---------
476
490
  ----------------------------------------------------*/
477
- function MergeImagesResultCB(flag, base64Str) {
478
- if (flag == 0) {
479
- window.parent.postMessage({ message: "图像合并完成" , messageId: messageId}, "*");
480
- var obj = document.getElementById("CameraPhoto");
481
- obj.src = "data:;base64," + base64Str;
482
- } else {
483
- window.parent.postMessage({ error: "图像合并失败", messageId: messageId }, "*");
484
- }
491
+ function MergeImagesResultCB(flag, base64Str) {
492
+ if (flag == 0) {
493
+ window.parent.postMessage({ message: "图像合并完成" }, '*')
494
+ var obj = document.getElementById("CameraPhoto");
495
+ obj.src = "data:;base64," + base64Str;
496
+ }
497
+ else {
498
+ window.parent.postMessage({ error: "图像合并失败" }, '*')
485
499
  }
500
+ }
501
+
502
+
486
503
 
487
- /*---------------------------------------------------
504
+
505
+ /*---------------------------------------------------
488
506
  -------(必须重写该函数)获取驱动盘符返回结果--------
489
507
  ----------------------------------------------------*/
490
- function GetDriveResultCB(driveStr) {
491
- if (driveStr == "") {
492
- window.parent.postMessage({ error: "获取盘符失败", messageId: messageId }, "*");
493
- } else {
494
- window.parent.postMessage({ message: "获取盘符:" + driveStr , messageId: messageId}, "*");
495
- }
496
- }
508
+ function GetDriveResultCB(driveStr) {
509
+ if (driveStr == "") {
510
+ window.parent.postMessage({ error: "获取盘符失败" }, '*')
511
+ }
512
+ else {
513
+ window.parent.postMessage({ message: "获取盘符:" + driveStr }, '*')
514
+ }
515
+ }
516
+
517
+
518
+ //设置水印
519
+ function toSetWaterMarkParams() {
520
+ var isAddMark;
521
+ var isAddTime;
522
+ var wTransp;
523
+ var wPos;
524
+ var wSize;
525
+ var wColor;
526
+ var szInfo;
527
+ var obj = document.getElementById("Checkbox3");
528
+ if (obj.checked)
529
+ isAddMark = 1;
530
+ else
531
+ isAddMark = 0;
532
+ obj = document.getElementById("Checkbox4");
533
+ if (obj.checked)
534
+ isAddTime = 1;
535
+ else
536
+ isAddTime = 0;
537
+ szInfo = document.getElementById("Text1").value; //水印内容
538
+ wTransp = parseInt(document.getElementById("Text2").value); //透明度
539
+ wSize = parseInt(document.getElementById("Text3").value); //水印大小
540
+ wPos = document.getElementById("Select1").selectedIndex; //水印位置
541
+ wColor = document.getElementById("Select2").selectedIndex; //水印颜色
542
+ SetWaterMark(isAddMark, 0, isAddTime, wTransp, wPos, wSize, wColor, szInfo); //生效水印设置
543
+ }
544
+
545
+
546
+
547
+ //删除文件
548
+ function ToDeleteFile() {
549
+ var path = "D:\\20220623140215.jpg";
550
+ DeleteFile(path);
551
+ }
552
+
553
+ //删除文件返回结果
554
+ function GetDeleteFileResultCB(flag) {
555
+ if (flag == 0) {
556
+ window.parent.postMessage({ message: "删除文件成功" }, '*')
557
+ }
558
+ else {
559
+ window.parent.postMessage({ error: "删除文件失败!" }, '*')
560
+ }
561
+ }
562
+
563
+
564
+ </script>
565
+
566
+ <body onload="LoadCameraDocument()">
567
+
568
+ <div style="width:602px; height: 400px; border: 1px solid white; background:#DEDEBE; font-size:14px; float:left;">
569
+
570
+ <div id='Div1' style="width:600px; height: 300px">
571
+ <div id='CameraCtl' style="width:600px; height: 300px; float:left"> </div>
572
+ </div>
573
+ <div style="visibility: hidden;" >
574
+ 设备
575
+ <select style="width:140px" id="DevName" onchange="SelectDevice()"></select>
576
+ 分辨率
577
+ <select style="width:140px" id="DevResolution" onchange="SelectResolution()"></select>
578
+ <input type="button" value=" 打开设备 " onclick="toOpenCamera();" />
579
+ <input type="button" id="closeDeviceButton" onclick="toCloseModal()" />
580
+ <br />
497
581
 
498
- //设置水印
499
- function toSetWaterMarkParams() {
500
- var isAddMark;
501
- var isAddTime;
502
- var wTransp;
503
- var wPos;
504
- var wSize;
505
- var wColor;
506
- var szInfo;
507
- var obj = document.getElementById("Checkbox3");
508
- if (obj.checked) isAddMark = 1;
509
- else isAddMark = 0;
510
- obj = document.getElementById("Checkbox4");
511
- if (obj.checked) isAddTime = 1;
512
- else isAddTime = 0;
513
- szInfo = document.getElementById("Text1").value; //水印内容
514
- wTransp = parseInt(document.getElementById("Text2").value); //透明度
515
- wSize = parseInt(document.getElementById("Text3").value); //水印大小
516
- wPos = document.getElementById("Select1").selectedIndex; //水印位置
517
- wColor = document.getElementById("Select2").selectedIndex; //水印颜色
518
- SetWaterMark(
519
- isAddMark,
520
- 0,
521
- isAddTime,
522
- wTransp,
523
- wPos,
524
- wSize,
525
- wColor,
526
- szInfo
527
- ); //生效水印设置
528
- }
529
-
530
- //删除文件
531
- function ToDeleteFile() {
532
- var path = "D:\\20220623140215.jpg";
533
- DeleteFile(path);
534
- }
535
-
536
- //删除文件返回结果
537
- function GetDeleteFileResultCB(flag) {
538
- if (flag == 0) {
539
- window.parent.postMessage({ message: "删除文件成功", messageId: messageId }, "*");
540
- } else {
541
- window.parent.postMessage({ error: "删除文件失败!", messageId: messageId }, "*");
542
- }
543
- }
544
- </script>
545
-
546
- <body onload="LoadCameraDocument()">
547
- <div
548
- style="
549
- width: 602px;
550
- height: 400px;
551
- border: 1px solid white;
552
- background: #dedebe;
553
- font-size: 14px;
554
- float: left;
555
- "
556
- >
557
- <div id="Div1" style="width: 600px; height: 300px">
558
- <div
559
- id="CameraCtl"
560
- style="width: 600px; height: 300px; float: left"
561
- ></div>
562
- </div>
563
- <div style="visibility: hidden">
564
- 设备
565
- <select
566
- style="width: 140px"
567
- id="DevName"
568
- onchange="SelectDevice()"
569
- ></select>
570
- 分辨率
571
- <select
572
- style="width: 140px"
573
- id="DevResolution"
574
- onchange="SelectResolution()"
575
- ></select>
576
- <input type="button" value=" 打开设备 " onclick="toOpenCamera();" />
577
- <input type="button" id="closeDeviceButton" onclick="toCloseModal()" />
578
- <br />
579
-
580
- 裁切模式:
581
- <input
582
- id="Radio1"
583
- name="R1"
584
- type="radio"
585
- value="V1"
586
- onclick="SetCameraCutMode()"
587
- checked="checked"
588
- />不裁切
589
- <input
590
- id="Radio2"
591
- name="R1"
592
- type="radio"
593
- value="V2"
594
- onclick="SetCameraCutMode()"
595
- />手动裁切
596
- <input
597
- id="Radio3"
598
- name="R1"
599
- type="radio"
600
- value="V3"
601
- onclick="SetCameraCutMode()"
602
- />自动裁切
603
- <input
604
- id="Radio4"
605
- name="R1"
606
- type="radio"
607
- value="V4"
608
- onclick="SetCameraCutMode()"
609
- />自定义
610
- <br />
611
-
612
- 文件格式:
613
- <select id="FileType" onchange="toSetFileType()">
614
- <option value="0">jpg</option>
615
- <option value="1">png</option>
616
- <option value="2">tif</option>
617
- <option value="3">pdf</option>
618
- </select>
619
-
620
- 色彩模式:
621
- <select id="ColorMode" onchange="toSetColorModel()">
622
- <option value="0">彩色</option>
623
- <option value="1">灰度</option>
624
- <option value="2">黑白</option>
625
- </select>
626
-
627
- 图像质量:
628
- <select id="JpgQuality" onchange="toSetJpgQuality()">
629
- <option value="0">10</option>
630
- <option value="1">20</option>
631
- <option value="2">30</option>
632
- <option value="3">40</option>
633
- <option value="4">50</option>
634
- <option value="5" selected="true">60</option>
635
- <option value="6">70</option>
636
- <option value="7">80</option>
637
- <option value="8">90</option>
638
- <option value="9">100</option>
639
- </select>
640
-
641
- <input
642
- id="Checkbox1"
643
- type="checkbox"
644
- onclick="toSetDeleteBlackEdge()"
645
- />
646
- 去黑边
647
- <input id="Checkbox2" type="checkbox" onclick="toSetDeleteBgColor()" />
648
- 去底色
649
- </div>
582
+ 裁切模式:
583
+ <input id="Radio1" name="R1" type="radio" value="V1" onclick="SetCameraCutMode()" checked="checked" />不裁切
584
+ <input id="Radio2" name="R1" type="radio" value="V2" onclick="SetCameraCutMode()" />手动裁切
585
+ <input id="Radio3" name="R1" type="radio" value="V3" onclick="SetCameraCutMode()" />自动裁切
586
+ <input id="Radio4" name="R1" type="radio" value="V4" onclick="SetCameraCutMode()" />自定义
650
587
  <br />
651
588
 
652
- <div style="border: 1px dashed #000; visibility: hidden; height: 0">
653
- <input id="Checkbox3" type="checkbox" /> 添加水印 水印内容<input
654
- id="Text1"
655
- type="text"
656
- value="水印测试"
657
- />
658
- 透明度<input id="Text2" type="text" value="127" style="width: 40px" />
659
- 大小<input id="Text3" type="text" value="80" style="width: 40px" />
660
- <br />
661
- 位置
662
- <select id="Select1">
663
- <option value="0">左上</option>
664
- <option value="1">右上</option>
665
- <option value="2">左下</option>
666
- <option value="3">右下</option>
667
- <option value="4">中间</option>
668
- </select>
669
- 颜色
670
- <select id="Select2">
671
- <option value="0">红色</option>
672
- <option value="1">绿色</option>
673
- <option value="2">蓝色</option>
674
- <option value="3">青色</option>
675
- <option value="4">黄色</option>
676
- <option value="5">白色</option>
677
- <option value="6">黑色</option>
678
- </select>
679
- <input id="Checkbox4" type="checkbox" /> 添加时间水印
680
- <input
681
- type="button"
682
- value="生效水印参数设置"
683
- onclick="toSetWaterMarkParams()"
684
- />
685
- </div>
589
+ 文件格式:
590
+ <select id="FileType" onchange="toSetFileType()">
591
+ <option value="0">jpg</option>
592
+ <option value="1">png</option>
593
+ <option value="2">tif</option>
594
+ <option value="3">pdf</option>
595
+ </select>
596
+
597
+ 色彩模式:
598
+ <select id="ColorMode" onchange="toSetColorModel()">
599
+ <option value="0">彩色</option>
600
+ <option value="1">灰度</option>
601
+ <option value="2">黑白</option>
602
+ </select>
603
+
604
+ 图像质量:
605
+ <select id="JpgQuality" onchange="toSetJpgQuality()">
606
+ <option value="0">10</option>
607
+ <option value="1">20</option>
608
+ <option value="2">30</option>
609
+ <option value="3">40</option>
610
+ <option value="4">50</option>
611
+ <option value="5" selected="true">60</option>
612
+ <option value="6">70</option>
613
+ <option value="7">80</option>
614
+ <option value="8">90</option>
615
+ <option value="9">100</option>
616
+ </select>
617
+
618
+ <input id="Checkbox1" type="checkbox" onclick="toSetDeleteBlackEdge()" /> 去黑边
619
+ <input id="Checkbox2" type="checkbox" onclick="toSetDeleteBgColor()" /> 去底色
686
620
 
687
- <br />
621
+ </div>
622
+ <br />
623
+
624
+ <div style="border:1px dashed #000;visibility: hidden;height:0;">
625
+ <input id="Checkbox3" type="checkbox" /> 添加水印
626
+ 水印内容<input id="Text1" type="text" value="水印测试" />
627
+ 透明度<input id="Text2" type="text" value="127" style="width:40px" />
628
+ 大小<input id="Text3" type="text" value="80" style="width:40px" /> <br />
629
+ 位置
630
+ <select id="Select1">
631
+ <option value="0">左上</option>
632
+ <option value="1">右上</option>
633
+ <option value="2">左下</option>
634
+ <option value="3">右下</option>
635
+ <option value="4">中间</option>
636
+ </select>
637
+ 颜色
638
+ <select id="Select2">
639
+ <option value="0">红色</option>
640
+ <option value="1">绿色</option>
641
+ <option value="2">蓝色</option>
642
+ <option value="3">青色</option>
643
+ <option value="4">黄色</option>
644
+ <option value="5">白色</option>
645
+ <option value="6">黑色</option>
646
+ </select>
647
+ <input id="Checkbox4" type="checkbox" /> 添加时间水印
648
+ <input type="button" value="生效水印参数设置" onclick="toSetWaterMarkParams()" />
649
+ </div>
688
650
 
689
- <div style="visibility: hidden; height: 0; margin-bottom: 20px">
690
- <input type="button" value="获取盘符" onclick="GetDrives();" />
691
- <input type="button" value="放大" onclick="Cam_ZoomIn();" />
692
- <input type="button" value="缩小" onclick="Cam_ZoomOut();" />
693
- <input type="button" value="适屏" onclick="Cam_BestSize();" />
694
- <input type="button" value="1:1" onclick="Cam_TrueSize();" />
695
- <input type="button" value="左旋" onclick="Cam_RotateLeft();" />
696
- <input type="button" value="右旋" onclick="Cam_RotateRight();" />
697
- <input type="button" value="对焦" onclick="Cam_Focus();" />
698
- <input type="button" value="设置" onclick="Cam_ShowVideoProp();" />
699
- <input type="button" value="拍照" onclick="TakePhoto();" />
700
- <!-- <input type="button" value="读身份证" onclick="GetIdCardInfo();" /> -->
701
- <input
702
- type="button"
703
- value="从摄像头中识别二维码"
704
- onclick="RecogQrCodeFromCamera(1);"
705
- />
706
- <!-- <input type="button" value="从图片中识别二维码" onclick="RecogBarCodeFromFile(1);" /> -->
707
- <input
708
- type="button"
709
- value="添加合并PDF文件"
710
- onclick="ToAddPDFFile();"
711
- />
712
- <input type="button" value="合并PDF" onclick="ToCombinePDF();" />
713
- <!-- <input type="button" value="添加合并图像文件" onclick="ToAddMergeImageFile();" />
651
+ <br />
652
+
653
+ <div style="visibility: hidden;height:0;margin-bottom: 20px;" >
654
+ <input type="button" value="获取盘符" onclick="GetDrives();" />
655
+ <input type="button" value="放大" onclick="Cam_ZoomIn();" />
656
+ <input type="button" value="缩小" onclick="Cam_ZoomOut();" />
657
+ <input type="button" value="适屏" onclick="Cam_BestSize();" />
658
+ <input type="button" value="1:1" onclick="Cam_TrueSize();" />
659
+ <input type="button" value="左旋" onclick="Cam_RotateLeft();" />
660
+ <input type="button" value="右旋" onclick="Cam_RotateRight();" />
661
+ <input type="button" value="对焦" onclick="Cam_Focus();" />
662
+ <input type="button" value="设置" onclick="Cam_ShowVideoProp();" />
663
+ <input type="button" value="拍照" onclick="TakePhoto();" />
664
+ <!-- <input type="button" value="读身份证" onclick="GetIdCardInfo();" /> -->
665
+ <input type="button" value="从摄像头中识别二维码" onclick="RecogQrCodeFromCamera(1);" />
666
+ <!-- <input type="button" value="从图片中识别二维码" onclick="RecogBarCodeFromFile(1);" /> -->
667
+ <input type="button" value="添加合并PDF文件" onclick="ToAddPDFFile();" />
668
+ <input type="button" value="合并PDF" onclick="ToCombinePDF();" />
669
+ <!-- <input type="button" value="添加合并图像文件" onclick="ToAddMergeImageFile();" />
714
670
  <input type="button" value="合并图像" onclick="ToMergeImages();" /> -->
715
- <!-- <input type="button" value="删除文件" onclick="ToDeleteFile();" /> -->
716
- <!-- <input type="button" value="上传" onclick="HttpUploadFile();" /> -->
717
- </div>
718
- <input
719
- style="width: 100%; height: 30px"
720
- type="button"
721
- value="拍照"
722
- onclick="TakePhoto();"
723
- />
724
-
725
- <div></div>
671
+ <!-- <input type="button" value="删除文件" onclick="ToDeleteFile();" /> -->
672
+ <!-- <input type="button" value="上传" onclick="HttpUploadFile();" /> -->
726
673
  </div>
674
+ <input style="width: 100%;height: 30px;" type="button" value="拍照" onclick="TakePhoto();" />
675
+
676
+ <div>
727
677
 
728
- <div
729
- style="
730
- width: 202px;
731
- border: 1px solid white;
732
- background: #dedebe;
733
- font-size: 14px;
734
- float: left;
735
- display: none;
736
- "
737
- >
738
- 拍照图片
739
- <br />
740
- <img id="CameraPhoto" src="" style="width: 200px" />
741
678
  </div>
742
- </body>
743
- </html>
679
+
680
+ </div>
681
+
682
+
683
+ <div style="width:202px; border: 1px solid white; background:#DEDEBE; font-size:14px; float:left;display: none;">
684
+ 拍照图片
685
+ <br />
686
+ <img id="CameraPhoto" src="" style="width: 200px;" />
687
+ </div>
688
+
689
+ </body>
690
+
691
+
692
+
693
+
694
+ </html>