Commit 7bd88dbe authored by 彭俊龙's avatar 彭俊龙

电子签名增加水印、地图控件增加切换地图

parent eb02c310
{
"name": "panda-xform",
"version": "6.10.29",
"description": "6.10.29 站点选择器默认选项逻辑优化",
"version": "6.10.30",
"description": "6.10.30 电子签名增加水印、地图控件增加切换地图",
"keywords": [
"panda-xform"
],
......
......@@ -4465,6 +4465,14 @@ const advancedWidgets = [
displayType: 'row',
labelWidth: 80,
},
showDate: {
title: '是否显示签名日期',
type: 'boolean',
widget: 'IsHidden',
default: false,
displayType: 'row',
labelWidth: 137,
},
hiddenCondition: {
title: '隐藏条件',
type: 'string',
......
......@@ -4,17 +4,17 @@ import Drag from '../../../components/Drag'
import { UploadFileReturnUrl, getUserSignature, SaveUserSignature } from '../../../../apis/process'
import styles from './index.less'
import { Button, Checkbox } from 'antd'
import moment from 'moment'
const Signature = (props) => {
const userID = window?.globalConfig?.userInfo?.OID || 1;
const { addons, value, onChange, schema } = props
const { disabled, presetValue } = schema
const { disabled, presetValue, showDate } = schema
const [visible, setVisible] = useState(false)
const [count, setCount] = useState(0)
const [checked, setChecked] = useState(false)
const [signature, setSignature] = useState('')
const canvasRef = useRef(null)
const open = () => {
if (addons) {
getSignature()
......@@ -75,6 +75,23 @@ const Signature = (props) => {
setChecked(e.target.checked)
}
useEffect(()=>{
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";
ctx.textAlign = "left";
ctx.fillText(moment().format('YYYY.MM.DD'), canvas.width / 1.3, canvas.height - 20);
}else{
setTimeout(() => {
setCount(count + 1)
}, 50);
}
}, [canvasRef.current])
useEffect(() => {
addons?.setValue(addons?.dataPath, presetValue || '')
}, [presetValue])
......
......@@ -407,7 +407,7 @@ const Coordinate = (props) => {
}
<Drag
width={'80%'}
title="选取坐标"
title="选取坐标111"
visible={visible}
onOk={onOk}
onCancel={onCancel}
......@@ -420,7 +420,12 @@ const Coordinate = (props) => {
<div style={{ height: '90%' }}>
<ArcGISSceneMap
getMapInfo={getView}
widgets={[]}
widgets={[{
label: '底图切换',
right: 60,
bottom: 45,
config: {},
}]}
token={token}
client={token ? client : 'sandbox'}
/>
......
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