Commit ab76f76d authored by 杨子龙's avatar 杨子龙

- 电子签章增加是否显示保存电子签章配置

parent 6f69b94f
......@@ -4540,6 +4540,12 @@ const advancedWidgets = [
checkedTxt: '显示',
unCheckedTxt: '隐藏'
},
isShowSave: {
title: '是否隐藏保存电子签章选项',
type: 'boolean',
widget: 'IsHidden',
default: false,
},
hiddenCondition: {
title: '隐藏条件',
type: 'string',
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment