Commit 907ab05b authored by 田翔's avatar 田翔

fix: 代码修复

parent 51a1aac9
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.4.5", "version": "5.4.6",
"description": "5.4.5 手写签名增加必填,关联表单中的本人信息修复", "description": "5.4.6 关联表单配置统一",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -2585,6 +2585,12 @@ const advancedWidgets = [ ...@@ -2585,6 +2585,12 @@ const advancedWidgets = [
default: [], default: [],
dependencies: ['台账名称'], dependencies: ['台账名称'],
}, },
hiddenCondition: {
title: '隐藏条件',
type: 'string',
description: '所有形态默认显示',
widget: 'HiddenCondition'
},
'控制规则': { '控制规则': {
title: '控制规则', title: '控制规则',
type: 'string', type: 'string',
......
...@@ -54,6 +54,7 @@ const RelationForm = (props) => { ...@@ -54,6 +54,7 @@ const RelationForm = (props) => {
}, [addons?.formData]) }, [addons?.formData])
const show = useMemo(() => { const show = useMemo(() => {
console.log('str', formDataObj, defaultShow)
if (addons) { if (addons) {
let str = controlShow let str = controlShow
try { try {
...@@ -69,7 +70,9 @@ const RelationForm = (props) => { ...@@ -69,7 +70,9 @@ const RelationForm = (props) => {
str = str.replace(/=/g, '==') str = str.replace(/=/g, '==')
str = str.replace(/and/g, '&&') str = str.replace(/and/g, '&&')
str = str.replace(/or/, '||') str = str.replace(/or/, '||')
console.log('str', str)
if (str && eval(str)) { if (str && eval(str)) {
// addons.setSchemaByPath(addons.dataPath, { ...schema, hidden: !schema.hidden }) // addons.setSchemaByPath(addons.dataPath, { ...schema, hidden: !schema.hidden })
return !defaultShow return !defaultShow
} }
......
...@@ -29,6 +29,7 @@ const Formatting = (props) => { ...@@ -29,6 +29,7 @@ const Formatting = (props) => {
return ( return (
<div className={styles.formatting}> <div className={styles.formatting}>
<Select <Select
value={value}
style={{ width: '100%', color: options.map(v => v.value).includes(value) ? '#4096ff' : '' }} style={{ width: '100%', color: options.map(v => v.value).includes(value) ? '#4096ff' : '' }}
options={options} options={options}
onChange={selectChange} onChange={selectChange}
......
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