Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hnxtbaboot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨亮
hnxtbaboot
Commits
7a7f738d
Commit
7a7f738d
authored
Apr 25, 2022
by
wuchengwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人像拍摄
parent
b76dfde5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
123 additions
and
0 deletions
+123
-0
hnxtba-core/src/main/resources/static/rygl/js/catchimgUpload.js
+38
-0
hnxtba-core/src/main/resources/static/rygl/js/clipimgUpload.js
+0
-0
hnxtba-core/src/main/resources/templates/rygl/fileupload.html
+85
-0
No files found.
hnxtba-core/src/main/resources/static/rygl/js/catchimgUpload.js
0 → 100644
View file @
7a7f738d
var
clipimg
=
Clipimg
(
document
.
querySelector
(
'.dialog_clip'
));
function
demo_loadFile
(
files
)
{
debugger
if
(
files
.
length
>
0
)
{
clipimg
.
loadFile
(
files
[
0
]);
}
}
function
demo_zoomIn
()
{
clipimg
.
zoomIn
();
}
function
demo_zoomOut
()
{
clipimg
.
zoomOut
();
}
function
demo_rotate
()
{
clipimg
.
rotate
();
}
function
demo_getDataURL
()
{
var
url
=
clipimg
.
getDataURL
(
450
);
document
.
querySelector
(
'.dialog_clipped_img'
).
src
=
url
;
savePic
();
}
function
demo_good
()
{
alert
(
'真棒!'
);
}
hnxtba-core/src/main/resources/static/rygl/js/clipimgUpload.js
0 → 100644
View file @
7a7f738d
This diff is collapsed.
Click to expand it.
hnxtba-core/src/main/resources/templates/rygl/fileupload.html
0 → 100644
View file @
7a7f738d
<!DOCTYPE html>
<html>
<head
lang=
"en"
>
<meta
charset=
"UTF-8"
>
<meta
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;"
name=
"viewport"
/>
<title>
clipimg
</title>
<script
type=
"text/javascript"
src=
"static/rygl/js/clipimgUpload.js"
></script>
<script
type=
"text/javascript"
src=
"static/easyui-window/js/jquery.easyui.min.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"static/easyui-window/css/easyui.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"static/easyui-window/css/icon.css"
>
<script
type=
"text/javascript"
src=
"/static/js/function_tck.js"
></script>
<link
type=
"text/css"
href=
"/static/rygl/css/catchimg.css"
rel=
"stylesheet"
/>
<script
LANGUAGE=
"javaScript"
>
function
savePic
()
{
debugger
;
var
imgs
=
document
.
getElementById
(
"thisimg"
).
src
;
var
tishixingxi
=
imgs
.
substring
(
0
,
imgs
.
indexOf
(
"data/image/png/base64/"
));
//提示信息
tishixingxi
=
imgs
.
substring
(
tishixingxi
.
length
+
"data/image/png/base64/"
.
length
,
imgs
.
length
);
var
zpbw
=
window
.
parent
.
document
.
getElementById
(
"zpbw"
).
value
;
if
(
zpbw
==
2
){
window
.
parent
.
document
.
getElementById
(
"imghead2"
).
src
=
document
.
getElementById
(
"thisimg"
).
src
;
window
.
parent
.
document
.
getElementById
(
"R_ZMZP64"
).
value
=
tishixingxi
;
window
.
parent
.
document
.
getElementById
(
"zmzpflag"
).
value
=
"1"
;
// window.parent.document.getElementById("R_ZMZP_File").value="";
}
else
if
(
zpbw
==
3
){
window
.
parent
.
document
.
getElementById
(
"imghead3"
).
src
=
document
.
getElementById
(
"thisimg"
).
src
;
window
.
parent
.
document
.
getElementById
(
"R_CMZP64"
).
value
=
tishixingxi
;
window
.
parent
.
document
.
getElementById
(
"cmzpflag"
).
value
=
"1"
;
// window.parent.document.getElementById("R_CMZP_File").value="";
}
else
if
(
zpbw
==
4
){
window
.
parent
.
document
.
getElementById
(
"imghead4"
).
src
=
document
.
getElementById
(
"thisimg"
).
src
;
window
.
parent
.
document
.
getElementById
(
"R_YCMZP64"
).
value
=
tishixingxi
;
window
.
parent
.
document
.
getElementById
(
"ycmzpflag"
).
value
=
"1"
;
// window.parent.document.getElementById("R_YCMZP_File").value="";
}
else
if
(
zpbw
==
31
){
window
.
parent
.
document
.
getElementById
(
"imghead31"
).
src
=
document
.
getElementById
(
"thisimg"
).
src
;
window
.
parent
.
document
.
getElementById
(
"tstz1Base64"
).
value
=
tishixingxi
;
window
.
parent
.
document
.
getElementById
(
"tstzflag1"
).
value
=
"0"
;
}
else
if
(
zpbw
==
32
){
window
.
parent
.
document
.
getElementById
(
"imghead32"
).
src
=
document
.
getElementById
(
"thisimg"
).
src
;
window
.
parent
.
document
.
getElementById
(
"tstz2Base64"
).
value
=
tishixingxi
;
window
.
parent
.
document
.
getElementById
(
"tstzflag2"
).
value
=
"0"
;
}
}
function
cjwc
()
{
window
.
parent
.
jtwc
();
}
</script>
</head>
<body>
<div
id=
"jt"
class=
"dialog"
style=
"height: 100%;width: 100%;"
>
<div
class=
"dialog_mask"
></div>
<div
class=
"dialog_wrap"
style=
"height: 100%;width: 100%;margin-top: 0px;"
>
<div
class=
"dialog_container_clip"
style=
"height: 100%;width: 100%;margin-top: 0px;"
>
<div
style=
"height: 100%;width: 49%;float: left;margin-top: 50px;"
>
<div
class=
"dialog_center_div"
>
<div
class=
"dialog_clip"
></div>
<!-- 这里放置图片 -->
</div>
<div
class=
"dialog_center_div dialog_buttons"
>
<input
id=
"dialog_picture"
onchange=
"demo_loadFile(this.files)"
type=
"file"
style=
"position:absolute; z-index: -1; visibility: hidden;"
accept=
"image/*"
/>
<label
for=
"dialog_picture"
class=
"dialog_button"
>
上传
</label>
<!-- 这个label对应上面的input,这是为了不显示input的文件名和按钮 -->
<div
id=
"dialog_ok"
onclick=
"demo_getDataURL()"
class=
"dialog_button"
>
截取
</div>
<div
onclick=
"cjwc()"
class=
"dialog_button"
>
完成
</div>
</div>
<div
class=
"dialog_center_div dialog_buttons"
>
<div
id=
"dialog_zoomIn"
onclick=
"demo_zoomIn()"
class=
"dialog_button"
>
放大
</div>
<div
id=
"dialog_zoomOut"
onclick=
"demo_zoomOut()"
class=
"dialog_button"
>
缩小
</div>
<div
id=
"dialog_rotate"
onclick=
"demo_rotate()"
class=
"dialog_button"
>
旋转
</div>
</div>
</div>
<div
style=
"height: 100%;width: 49%;float: right;margin-top: 0px;"
>
<div
class=
"dialog_center_div"
>
<img
id=
"thisimg"
class=
"dialog_clipped_img"
src=
""
/>
<!-- 这里放置截图后图片 -->
</div>
</div>
</div>
</div>
</div>
<canvas
width=
"900"
height=
"1200"
style=
"width: 450px;height: 600px;"
id=
"canvas"
></canvas>
<script
type=
"text/javascript"
src=
"static/rygl/js/catchimgUpload.js"
></script>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment