Commit 69f85fbe authored by 彭俊龙's avatar 彭俊龙

feat: '自定义地图描述字段修改,手签显隐逻辑优化'

parent ac9ba07f
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "6.10.52", "version": "6.10.54",
"description": "6.10.52 formjson解析检查非空", "description": "6.10.54 自定义地图描述字段修改,手签显隐逻辑优化",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
"@ant-design/icons": "^4.7.0", "@ant-design/icons": "^4.7.0",
"@babel/plugin-proposal-private-property-in-object": "^7.15.4", "@babel/plugin-proposal-private-property-in-object": "^7.15.4",
"@babel/runtime": "^7.19.0", "@babel/runtime": "^7.19.0",
"@wangeditor/editor": "^5.1.22", "@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-react": "^1.0.6", "@wangeditor/editor-for-react": "^1.0.6",
"antd": "4.20.7", "antd": "4.20.7",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
......
...@@ -3990,10 +3990,10 @@ const mapWidgets = [ ...@@ -3990,10 +3990,10 @@ const mapWidgets = [
dependencies: ['isHidden'], dependencies: ['isHidden'],
}, },
addressSync: { addressSync: {
title: '地址同步', title: '数据同步',
type: 'string', type: 'string',
widget: 'AddressSync', widget: 'AddressSync',
description: '位置信息将会同步到下方字段中', description: '地图数据信息将同步到下方字段中',
otherProps: { otherProps: {
mode: "multiple" mode: "multiple"
} }
...@@ -4533,7 +4533,7 @@ const advancedWidgets = [ ...@@ -4533,7 +4533,7 @@ const advancedWidgets = [
showDate: { showDate: {
title: '是否显示签名日期', title: '是否显示签名日期',
type: 'boolean', type: 'boolean',
widget: 'IsHidden', widget: 'switch',
default: false, default: false,
displayType: 'row', displayType: 'row',
labelWidth: 137, labelWidth: 137,
...@@ -4543,7 +4543,7 @@ const advancedWidgets = [ ...@@ -4543,7 +4543,7 @@ const advancedWidgets = [
isShowSave: { isShowSave: {
title: '是否隐藏保存电子签章选项', title: '是否隐藏保存电子签章选项',
type: 'boolean', type: 'boolean',
widget: 'IsHidden', widget: 'switch',
default: false, default: false,
}, },
hiddenCondition: { hiddenCondition: {
......
...@@ -120,7 +120,7 @@ const Signature = (props) => { ...@@ -120,7 +120,7 @@ const Signature = (props) => {
} }
<div className={styles.right}> <div className={styles.right}>
<Button onClick={() => setVisible(false)}>取消</Button> <Button onClick={() => setVisible(false)}>取消</Button>
{signature ? <Button type='primary' ghost onClick={() => getValues()}>电子签章</Button> : null} {(signature && !isShowSave) ? <Button type='primary' ghost onClick={() => getValues()}>电子签章</Button> : null}
<Button type='primary' onClick={() => onOk()}>确定</Button> <Button type='primary' onClick={() => onOk()}>确定</Button>
</div> </div>
</div> </div>
......
...@@ -4,13 +4,10 @@ import { Switch } from 'antd' ...@@ -4,13 +4,10 @@ import { Switch } from 'antd'
const IsHidden = (props) => { const IsHidden = (props) => {
const { value, onChange, addons } = props const { value, onChange, addons } = props
const { baseControl, checkedTxt, unCheckedTxt } = props.schema
const switchChange = (checked) => { const switchChange = (checked) => {
if (addons) { if (addons) {
onChange(checked) onChange(checked)
// baseControl是否为基础组件,是则不做联动逻辑
if(baseControl) return;
if (checked) { if (checked) {
addons.setValue('hiddenCondition', '1=1') addons.setValue('hiddenCondition', '1=1')
addons.setValue('hiddenRules', []) addons.setValue('hiddenRules', [])
...@@ -24,8 +21,8 @@ const IsHidden = (props) => { ...@@ -24,8 +21,8 @@ const IsHidden = (props) => {
return ( return (
<Switch <Switch
checked={value} checked={value}
checkedChildren={ checkedTxt || '隐藏'} checkedChildren={'隐藏'}
unCheckedChildren={ unCheckedTxt || '显示'} unCheckedChildren={'显示'}
onChange={switchChange} onChange={switchChange}
> >
</Switch> </Switch>
......
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