Commit 821ffaff authored by 田翔's avatar 田翔

fix: 计算规则配置后强行只读

parent 044eaad7
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "2.5.3", "version": "2.5.4",
"description": "2.5.3: 人员选择器分组形态存储ID回显问题", "description": "2.5.4: 计算规则配置后强行只读",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -89,6 +89,10 @@ const textWidgets = [ ...@@ -89,6 +89,10 @@ const textWidgets = [
title: '提示语', title: '提示语',
type: 'string', type: 'string',
}, },
description: {
title: '说明',
type: 'string',
},
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
...@@ -167,14 +171,6 @@ const textWidgets = [ ...@@ -167,14 +171,6 @@ const textWidgets = [
labelWidth: 120, labelWidth: 120,
description: '是否解析为二维码格式(手持端专用)', description: '是否解析为二维码格式(手持端专用)',
}, },
// hiddenCondition: {
// title: '隐藏条件',
// type: 'string'
// },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -248,6 +244,10 @@ const textWidgets = [ ...@@ -248,6 +244,10 @@ const textWidgets = [
type: 'string', type: 'string',
widget: 'Placeholder', widget: 'Placeholder',
}, },
description: {
title: '说明',
type: 'string',
},
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
...@@ -284,10 +284,6 @@ const textWidgets = [ ...@@ -284,10 +284,6 @@ const textWidgets = [
default: false, default: false,
description: '自动获取当前地址(手持端专用)', description: '自动获取当前地址(手持端专用)',
}, },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -360,6 +356,10 @@ const textWidgets = [ ...@@ -360,6 +356,10 @@ const textWidgets = [
title: '提示语', title: '提示语',
type: 'string', type: 'string',
}, },
description: {
title: '说明',
type: 'string',
},
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
...@@ -382,16 +382,14 @@ const textWidgets = [ ...@@ -382,16 +382,14 @@ const textWidgets = [
widget: 'checkbox', widget: 'checkbox',
default: false, default: false,
width: '30%', width: '30%',
hidden: '{{Boolean(formData.calculateRule)}}',
dependencies: ['calculateRule']
}, },
calculateRule: { calculateRule: {
title: '计算规则', title: '计算规则',
type: 'string', type: 'string',
widget: 'CalculateRule', widget: 'CalculateRule',
}, },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -465,6 +463,10 @@ const textWidgets = [ ...@@ -465,6 +463,10 @@ const textWidgets = [
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
}, },
description: {
title: '说明',
type: 'string',
},
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
...@@ -499,10 +501,6 @@ const textWidgets = [ ...@@ -499,10 +501,6 @@ const textWidgets = [
default: false, default: false,
width: '30%', width: '30%',
}, },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -560,10 +558,9 @@ const textWidgets = [ ...@@ -560,10 +558,9 @@ const textWidgets = [
type: 'string', type: 'string',
widget: 'htmlInput', widget: 'htmlInput',
}, },
groupSetting: { description: {
title: '控件设置', title: '说明',
type: 'object', type: 'string',
properties: {}
}, },
required: { required: {
title: '必填', title: '必填',
...@@ -607,10 +604,6 @@ const textWidgets = [ ...@@ -607,10 +604,6 @@ const textWidgets = [
enumNames: ['前缀-年份-六位编码', '前缀-年份月份-六位编码', '前缀 -八位编码'], enumNames: ['前缀-年份-六位编码', '前缀-年份月份-六位编码', '前缀 -八位编码'],
description: '{{rootValue.codingType === "1" ?"示例:XJ-2019-000001" : (rootValue.codingType === "2" ? "示例: XJ-201909-000001" : "示例: XJ00000001")}}' description: '{{rootValue.codingType === "1" ?"示例:XJ-2019-000001" : (rootValue.codingType === "2" ? "示例: XJ-201909-000001" : "示例: XJ00000001")}}'
}, },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -671,6 +664,10 @@ const selectWidgets = [ ...@@ -671,6 +664,10 @@ const selectWidgets = [
type: 'string', type: 'string',
default: '点击下拉选择内容', default: '点击下拉选择内容',
}, },
description: {
title: '说明',
type: 'string',
},
presetValue: { presetValue: {
title: '默认值', title: '默认值',
type: 'string', type: 'string',
...@@ -805,10 +802,6 @@ const selectWidgets = [ ...@@ -805,10 +802,6 @@ const selectWidgets = [
description: '勾选后可直接输入选项,可编辑选择仅支持多选', description: '勾选后可直接输入选项,可编辑选择仅支持多选',
hidden: '{{formData.sourceType !== "手动输入"}}' hidden: '{{formData.sourceType !== "手动输入"}}'
}, },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -867,6 +860,10 @@ const selectWidgets = [ ...@@ -867,6 +860,10 @@ const selectWidgets = [
title: '默认值', title: '默认值',
type: 'string', type: 'string',
}, },
description: {
title: '说明',
type: 'string',
},
sourceType: { sourceType: {
title: '来源方式', title: '来源方式',
name: '单选框', name: '单选框',
...@@ -934,10 +931,6 @@ const selectWidgets = [ ...@@ -934,10 +931,6 @@ const selectWidgets = [
default: false, default: false,
width: '30%', width: '30%',
}, },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -996,6 +989,10 @@ const selectWidgets = [ ...@@ -996,6 +989,10 @@ const selectWidgets = [
title: '默认值', title: '默认值',
type: 'string', type: 'string',
}, },
description: {
title: '说明',
type: 'string',
},
sourceType: { sourceType: {
title: '来源方式', title: '来源方式',
name: '复选框', name: '复选框',
...@@ -1066,10 +1063,6 @@ const selectWidgets = [ ...@@ -1066,10 +1063,6 @@ const selectWidgets = [
default: false, default: false,
width: '30%', width: '30%',
}, },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -1129,6 +1122,10 @@ const selectWidgets = [ ...@@ -1129,6 +1122,10 @@ const selectWidgets = [
type: 'boolean', type: 'boolean',
widget: 'BooleanSwitch', widget: 'BooleanSwitch',
}, },
description: {
title: '说明',
type: 'string',
},
disabled: { disabled: {
title: '只读', title: '只读',
type: 'boolean', type: 'boolean',
...@@ -1223,6 +1220,10 @@ const selectWidgets = [ ...@@ -1223,6 +1220,10 @@ const selectWidgets = [
widget: 'CascadeDefault', widget: 'CascadeDefault',
dependencies: ['sourceType'] dependencies: ['sourceType']
}, },
description: {
title: '说明',
type: 'string',
},
fieldParent: { fieldParent: {
title: '父字段名', title: '父字段名',
type: 'string', type: 'string',
...@@ -1297,6 +1298,10 @@ const selectWidgets = [ ...@@ -1297,6 +1298,10 @@ const selectWidgets = [
type: 'string', type: 'string',
widget: 'CascadeDefault', widget: 'CascadeDefault',
}, },
description: {
title: '说明',
type: 'string',
},
sourceType: { sourceType: {
title: '来源方式', title: '来源方式',
name: '来源方式', name: '来源方式',
...@@ -1325,10 +1330,6 @@ const selectWidgets = [ ...@@ -1325,10 +1330,6 @@ const selectWidgets = [
default: false, default: false,
width: '30%', width: '30%',
}, },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -1392,6 +1393,10 @@ const businessWidgets = [ ...@@ -1392,6 +1393,10 @@ const businessWidgets = [
title: '默认值', title: '默认值',
type: 'string', type: 'string',
}, },
description: {
title: '说明',
type: 'string',
},
role: { role: {
title: '机构角色', title: '机构角色',
type: 'string', type: 'string',
...@@ -1443,10 +1448,6 @@ const businessWidgets = [ ...@@ -1443,10 +1448,6 @@ const businessWidgets = [
type: 'boolean', type: 'boolean',
default: false, default: false,
}, },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -1519,6 +1520,10 @@ const businessWidgets = [ ...@@ -1519,6 +1520,10 @@ const businessWidgets = [
title: '默认值', title: '默认值',
type: 'string', type: 'string',
}, },
description: {
title: '说明',
type: 'string',
},
required: { required: {
title: '必填', title: '必填',
type: 'boolean', type: 'boolean',
...@@ -1545,10 +1550,6 @@ const businessWidgets = [ ...@@ -1545,10 +1550,6 @@ const businessWidgets = [
type: 'boolean', type: 'boolean',
default: false, default: false,
}, },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -1609,6 +1610,10 @@ const businessWidgets = [ ...@@ -1609,6 +1610,10 @@ const businessWidgets = [
title: '默认值', title: '默认值',
type: 'string', type: 'string',
}, },
description: {
title: '说明',
type: 'string',
},
accountName: { accountName: {
title: '台账名称', title: '台账名称',
name: '台账名称', name: '台账名称',
...@@ -1680,13 +1685,6 @@ const businessWidgets = [ ...@@ -1680,13 +1685,6 @@ const businessWidgets = [
default: false, default: false,
width: '23%', width: '23%',
}, },
description: {
title: '说明',
type: 'string',
displayType: 'row',
labelWidth: 55,
widget: 'input',
},
...groupStyle, ...groupStyle,
} }
} }
...@@ -1726,6 +1724,10 @@ const dateWidgets = [ ...@@ -1726,6 +1724,10 @@ const dateWidgets = [
title: '提示语', title: '提示语',
type: 'string', type: 'string',
}, },
description: {
title: '说明',
type: 'string',
},
required: { required: {
title: '必填', title: '必填',
type: 'boolean', type: 'boolean',
...@@ -1824,6 +1826,10 @@ const dateWidgets = [ ...@@ -1824,6 +1826,10 @@ const dateWidgets = [
format: '{{formData.format}}', format: '{{formData.format}}',
description: '勾选默认当前时间此处配置无效' description: '勾选默认当前时间此处配置无效'
}, },
description: {
title: '说明',
type: 'string',
},
options: { options: {
title: '选项', title: '选项',
type: 'string', type: 'string',
...@@ -1832,10 +1838,6 @@ const dateWidgets = [ ...@@ -1832,10 +1838,6 @@ const dateWidgets = [
default: '默认为空', default: '默认为空',
enumNames: ['默认为空', '默认为当前时间', '不超过当前时间'], enumNames: ['默认为空', '默认为当前时间', '不超过当前时间'],
}, },
description: {
title: '说明',
type: 'string',
},
required: { required: {
title: '必填', title: '必填',
type: 'boolean', type: 'boolean',
...@@ -1921,6 +1923,10 @@ const fileWidgets = [ ...@@ -1921,6 +1923,10 @@ const fileWidgets = [
title: '提示语', title: '提示语',
type: 'string', type: 'string',
}, },
description: {
title: '说明',
type: 'string',
},
fileType: { fileType: {
title: '文件类型', title: '文件类型',
type: 'string', type: 'string',
...@@ -2031,6 +2037,10 @@ const mapWidgets = [ ...@@ -2031,6 +2037,10 @@ const mapWidgets = [
title: '提示语', title: '提示语',
type: 'string', type: 'string',
}, },
description: {
title: '说明',
type: 'string',
},
currentAddress: { currentAddress: {
title: '自动获取', title: '自动获取',
type: 'Boolean', type: 'Boolean',
...@@ -2051,10 +2061,6 @@ const mapWidgets = [ ...@@ -2051,10 +2061,6 @@ const mapWidgets = [
default: false, default: false,
width: '25%', width: '25%',
}, },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -2111,6 +2117,10 @@ const mapWidgets = [ ...@@ -2111,6 +2117,10 @@ const mapWidgets = [
title: '提示语', title: '提示语',
type: 'string', type: 'string',
}, },
description: {
title: '说明',
type: 'string',
},
required: { required: {
title: '必填', title: '必填',
type: 'boolean', type: 'boolean',
...@@ -2125,10 +2135,6 @@ const mapWidgets = [ ...@@ -2125,10 +2135,6 @@ const mapWidgets = [
default: false, default: false,
width: '25%', width: '25%',
}, },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -2185,6 +2191,10 @@ const mapWidgets = [ ...@@ -2185,6 +2191,10 @@ const mapWidgets = [
title: '提示语', title: '提示语',
type: 'string', type: 'string',
}, },
description: {
title: '说明',
type: 'string',
},
required: { required: {
title: '必填', title: '必填',
type: 'boolean', type: 'boolean',
...@@ -2199,10 +2209,6 @@ const mapWidgets = [ ...@@ -2199,10 +2209,6 @@ const mapWidgets = [
default: false, default: false,
width: '25%', width: '25%',
}, },
description: {
title: '说明',
type: 'string',
},
groupStyle: { groupStyle: {
title: '控件样式', title: '控件样式',
type: 'object', type: 'object',
...@@ -2260,6 +2266,11 @@ const advancedWidgets = [ ...@@ -2260,6 +2266,11 @@ const advancedWidgets = [
widget: 'htmlInput', widget: 'htmlInput',
default: '关联表单', default: '关联表单',
}, },
description: {
title: '说明',
type: 'string',
widget: 'htmlInput',
},
disabled: { disabled: {
title: '只读', title: '只读',
type: 'boolean', type: 'boolean',
...@@ -2272,11 +2283,6 @@ const advancedWidgets = [ ...@@ -2272,11 +2283,6 @@ const advancedWidgets = [
} }
} }
}, },
description: {
title: '说明',
type: 'string',
widget: 'htmlInput',
},
'台账名称': { '台账名称': {
title: '台账名称', title: '台账名称',
type: 'string', type: 'string',
...@@ -2329,89 +2335,6 @@ const advancedWidgets = [ ...@@ -2329,89 +2335,6 @@ const advancedWidgets = [
}, },
}, },
}, },
// {
// text: '自动计算',
// name: '自动计算',
// icon: <IconPack.AutoCalculate />,
// schema: {
// title: '自动计算',
// type: 'string',
// widget: 'AutoCalculate',
// },
// setting: {
// widget: {
// title: '控件类型',
// type: 'string',
// widget: 'WidgetType',
// displayType: 'row',
// labelWidth: 80,
// },
// $id: {
// title: '数据源',
// type: 'string',
// widget: 'FieldNames',
// required: true,
// },
// title: {
// title: '展示名称',
// type: 'string',
// required: true,
// },
// presetValue: {
// title: '默认值',
// type: 'number',
// widget: 'NumerDefault',
// },
// required: {
// title: '必填',
// type: 'boolean',
// default: false,
// width: '40%',
// props: {
// style: {
// marginLeft: '10px'
// }
// }
// },
// disabled: {
// title: '只读',
// type: 'boolean',
// widget: 'checkbox',
// default: true,
// width: '30%',
// },
// description: {
// title: '说明',
// type: 'string',
// },
// calculateRule: {
// title: '计算规则',
// type: 'string',
// widget: 'CalculateRule',
// },
// groupStyle: {
// title: '控件样式',
// type: 'object',
// properties: {},
// },
// width: {
// title: '元素宽度',
// type: 'string',
// widget: 'percentSlider',
// },
// labelWidth: {
// title: '标签宽度',
// description: '默认值110',
// default: 110,
// type: 'number',
// widget: 'slider',
// max: 400,
// props: {
// hideNumber: true,
// },
// },
// },
// },
] ]
const settings = [ const settings = [
...@@ -2433,18 +2356,14 @@ const settings = [ ...@@ -2433,18 +2356,14 @@ const settings = [
}, },
{ {
title: '时间控件', title: '时间控件',
show: true,
widgets: dateWidgets, widgets: dateWidgets,
}, },
{ {
title: '附件控件', title: '附件控件',
show: true,
useCommon: true,
widgets: fileWidgets, widgets: fileWidgets,
}, },
{ {
title: 'GIS控件', title: 'GIS控件',
show: true,
widgets: mapWidgets, widgets: mapWidgets,
}, },
{ {
......
...@@ -101,6 +101,8 @@ const XRender = (props, ref) => { ...@@ -101,6 +101,8 @@ const XRender = (props, ref) => {
mapping={{ mapping={{
object: 'Header', object: 'Header',
}} }}
// scrollToFirstError
// removeHiddenData={false}
widgets={widgets} widgets={widgets}
watch={watch} watch={watch}
onMount={onMount} onMount={onMount}
......
...@@ -338,7 +338,7 @@ const RelationForm = (props) => { ...@@ -338,7 +338,7 @@ const RelationForm = (props) => {
const addClick = () => { const addClick = () => {
if (!localForm.length) { if (!localForm.length) {
return message.error('配置出错!') return message.info('台账添加字段未配置!')
} }
if (addons) { if (addons) {
if (JSON.stringify(schemaGroup) === '{}') { if (JSON.stringify(schemaGroup) === '{}') {
......
...@@ -20,7 +20,7 @@ const fnList = [ ...@@ -20,7 +20,7 @@ const fnList = [
const CalculateRule = (props) => { const CalculateRule = (props) => {
const { value, onChange, addons } = props const { value, onChange, addons } = props
const { tableNameParent } = addons.formData const { tableNameParent, widget } = addons.formData
const [visible, setVisible] = useState(false) const [visible, setVisible] = useState(false)
const [fieldList, setFieldList] = useState([]) const [fieldList, setFieldList] = useState([])
const [rule, setRule] = useState([]) const [rule, setRule] = useState([])
...@@ -77,9 +77,16 @@ const CalculateRule = (props) => { ...@@ -77,9 +77,16 @@ const CalculateRule = (props) => {
addons.setValue('rules', data) addons.setValue('rules', data)
setVisible(false) setVisible(false)
onChange(rule) onChange(rule)
if (widget === 'NumberInput') {
addons.setValue('disabled', true)
}
} else { } else {
message.error(msg) message.error(msg)
} }
} else {
addons.setValue('rules', [])
setVisible(false)
onChange(rule)
} }
} }
......
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