Commit f22149be authored by 彭俊龙's avatar 彭俊龙

电子手签加入非空校验

parent 01d2a77c
{
"name": "panda-xform",
"version": "6.10.63",
"description": "6.10.63 坐标选择增加爆管分析逻辑",
"version": "6.10.64",
"description": "6.10.64 电子手签加入非空校验",
"keywords": [
"panda-xform"
],
......
......@@ -3,7 +3,7 @@ import ReactSignatureCanvas from 'react-signature-canvas'
import Drag from '../../../components/Drag'
import { UploadFileReturnUrl, getUserSignature, SaveUserSignature } from '../../../../apis/process'
import styles from './index.less'
import { Button, Checkbox } from 'antd'
import { Button, Checkbox, message } from 'antd'
import moment from 'moment'
const Signature = (props) => {
......@@ -26,6 +26,10 @@ const Signature = (props) => {
if (disabled) {
setVisible(false)
} else {
if(canvasRef.current.isEmpty()){
message.warn('请签名后再保存')
return
}
if (addons) {
const dataUrl = canvasRef.current.toDataURL(); // 获取 Base64 编码的字符串
const byteString = atob(dataUrl.split(',')[1]); // 将 Base64 编码的字符串转换为字节数组
......
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