Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xform
Project
Project
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
田翔
xform
Commits
ab76f76d
Commit
ab76f76d
authored
Dec 12, 2024
by
杨子龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- 电子签章增加是否显示保存电子签章配置
parent
6f69b94f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
settings.js
src/core/FormDesigner/config/settings.js
+6
-0
index.js
src/core/widgets/advanced/Signature/index.js
+9
-6
No files found.
src/core/FormDesigner/config/settings.js
View file @
ab76f76d
...
...
@@ -4540,6 +4540,12 @@ const advancedWidgets = [
checkedTxt
:
'显示'
,
unCheckedTxt
:
'隐藏'
},
isShowSave
:
{
title
:
'是否隐藏保存电子签章选项'
,
type
:
'boolean'
,
widget
:
'IsHidden'
,
default
:
false
,
},
hiddenCondition
:
{
title
:
'隐藏条件'
,
type
:
'string'
,
...
...
src/core/widgets/advanced/Signature/index.js
View file @
ab76f76d
...
...
@@ -9,7 +9,7 @@ const Signature = (props) => {
const
userID
=
window
?.
globalConfig
?.
userInfo
?.
OID
||
1
;
const
{
addons
,
value
,
onChange
,
schema
}
=
props
const
{
disabled
,
presetValue
,
showDate
}
=
schema
const
{
disabled
,
presetValue
,
showDate
,
isShowSave
}
=
schema
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
[
count
,
setCount
]
=
useState
(
0
)
const
[
checked
,
setChecked
]
=
useState
(
false
)
...
...
@@ -79,7 +79,7 @@ const Signature = (props) => {
if
(
canvasRef
.
current
&&
showDate
)
{
const
canvas
=
canvasRef
.
current
.
getCanvas
();
// 获取底层的Canvas元素
const
ctx
=
canvas
.
getContext
(
'2d'
);
// 在这里绘制你的水印
ctx
.
font
=
"20px 'Brush Script MT', 'Lucida Handwriting', cursive"
;
ctx
.
fillStyle
=
"black"
;
...
...
@@ -88,7 +88,7 @@ const Signature = (props) => {
}
else
{
setTimeout
(()
=>
{
setCount
(
count
+
1
)
},
50
);
},
50
);
}
},
[
canvasRef
.
current
])
...
...
@@ -113,7 +113,11 @@ const Signature = (props) => {
onCancel
=
{()
=>
setVisible
(
false
)}
footer
=
{
<
div
className
=
{
styles
.
footer
}
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
Checkbox
onChange
=
{
checkChange
}
checked
=
{
checked
}
>
保存到电子签章中
<
/Checkbox
>
{
!
isShowSave
&&
(
<
Checkbox
onChange
=
{
checkChange
}
checked
=
{
checked
}
>
保存到电子签章中
<
/Checkbox
>
)
}
<
div
className
=
{
styles
.
right
}
>
<
Button
onClick
=
{()
=>
setVisible
(
false
)}
>
取消
<
/Button
>
{
signature
?
<
Button
type
=
'primary'
ghost
onClick
=
{()
=>
getValues
()}
>
电子签章
<
/Button> : null
}
...
...
@@ -141,4 +145,4 @@ const Signature = (props) => {
}
export
default
Signature
\ No newline at end of file
export
default
Signature
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