Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
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
platform
hp-smart
Commits
ad8ae226
Commit
ad8ae226
authored
Apr 23, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.二维码展示和放大
parent
48c199c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
HPSC003.js
src/main/webapp/HP/SC/HPSC003.js
+33
-0
HPSC003.jsp
src/main/webapp/HP/SC/HPSC003.jsp
+7
-0
No files found.
src/main/webapp/HP/SC/HPSC003.js
View file @
ad8ae226
...
...
@@ -39,6 +39,16 @@ $(function () {
}
return
template
;
}
},
{
field
:
"qrcodeDocId"
,
template
:
function
(
item
)
{
if
(
isBlank
(
item
.
qrcodeDocId
))
{
return
""
;
}
else
{
return
'<img src="'
+
downloadHref
(
item
.
qrcodeDocId
)
+
'" width="20px" height="20px"'
+
' onclick="imgClick(
\'
'
+
item
.
qrcodeDocId
+
'
\'
)" />'
;
}
}
}],
/**
* 翻页事件,点翻页按钮,输入页数跳转时触发
...
...
@@ -410,3 +420,26 @@ function saveDetail(btn) {
});
}
}
/**
* 图片放大
*/
let
imgClick
=
function
(
docId
)
{
// 图片路径
$
(
"#bigImg"
).
attr
(
"src"
,
downloadHref
(
docId
));
$
(
"#bigImg"
).
css
({
'width'
:
400
});
// 图片淡入
$
(
"#back-curtain"
).
fadeIn
(
"fast"
);
// 遮罩效果
$
(
"#back-curtain"
).
css
({
'position'
:
'fixed'
,
'overflow-y'
:
'auto'
,
'width'
:
'100%'
,
'height'
:
'100%'
,
'z-index'
:
'998'
}).
show
();
// 点击图片或遮罩,图片淡出
$
(
"#back-curtain"
).
on
(
'click'
,
function
()
{
$
(
this
).
fadeOut
(
"fast"
);
});
}
src/main/webapp/HP/SC/HPSC003.jsp
View file @
ad8ae226
...
...
@@ -29,6 +29,7 @@
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
enable=
"false"
ename=
"qrcodeDocId"
cname=
"二维码"
width=
"50"
align=
"center"
/>
<EF:EFColumn
enable=
"false"
ename=
"projCode"
cname=
"项目号"
readonly=
"true"
hidden=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"planInfoNo"
cname=
"生产计划单号"
readonly=
"true"
hidden=
"true"
width=
"100"
/>
<EF:EFColumn
enable=
"false"
ename=
"projName"
cname=
"项目名称"
width=
"120"
readonly=
"true"
/>
...
...
@@ -86,3 +87,9 @@
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<div
id=
"back-curtain"
style=
"position:fixed; top:0; left:0; background:rgba(0,0,0,0.5); z-index:998; width:100%;
display:none;display: flex; justify-content: center; align-items: center;"
>
<img
id=
"bigImg"
src=
""
/>
</div>
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