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

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

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