Commit 84b5c05c authored by 田翔's avatar 田翔

fix: 附件类增加模板配置与自动计算增加逻辑规则

parent 8c699885
{
"name": "panda-xform",
"version": "5.9.8",
"description": "5.9.8 导出模板定制",
"version": "5.9.9",
"description": "5.9.9 附件类增加模板配置与自动计算增加逻辑规则",
"keywords": [
"panda-xform"
],
......@@ -137,4 +137,4 @@
"publishConfig": {
"registry": "https://g.civnet.cn:4873"
}
}
}
\ No newline at end of file
......@@ -61,7 +61,7 @@ export function getTableNumberList(tableName) {
return request({
// headers: {
// 'Civ-Site': window?.globalConfig?.userInfo?.site
// },
// },
url: `/PandaOMS/OMS/CaseManage/GetTableNumberList${tableName ? `?tableName=${tableName}` : ''}`,
method: 'get',
});
......
......@@ -30,14 +30,36 @@ const CalculateRule = (props) => {
const fnList = useMemo(() => {
let disabled = ['DateTime', 'Time'].includes(widget)
return [
{ label: '最大值', value: '$sql.max()', disabled },
{ label: '最小值', value: '$sql.min()', disabled },
{ label: '求和', value: '$sql.sum()', disabled },
{ label: '平均值', value: '$sql.avg()', disabled },
{ label: '时间差', value: '$sql.datediff()', disabled: false },
{ label: '时间计算', value: '$sql.dateadd()', disabled: false },
{ label: '向下取整', value: '$sql.ceiling()', disabled: false },
{ label: '向上取整', value: '$sql.floor()', disabled: false },
{
label: '数学函数',
key: '数学函数',
type: 'group',
children: [
{ label: '最大值', key: '$sql.max()', disabled },
{ label: '最小值', key: '$sql.min()', disabled },
{ label: '求和', key: '$sql.sum()', disabled },
{ label: '平均值', key: '$sql.avg()', disabled },
{ label: '向下取整', key: '$sql.ceiling()', disabled: false },
{ label: '向上取整', key: '$sql.floor()', disabled: false },
]
},
{
label: '日期函数',
key: '日期函数',
type: 'group',
children: [
{ label: '时间差', key: '$sql.datediff()', disabled: false },
{ label: '时间计算', key: '$sql.dateadd()', disabled: false },
]
},
{
label: '逻辑函数',
key: '逻辑函数',
type: 'group',
children: [
{ label: 'IF', key: '$sql.if()', disabled: false },
]
}
]
}, [widget])
......@@ -122,10 +144,16 @@ const CalculateRule = (props) => {
const fnListRender = (
<Menu>
{fnList.map(item => (
<Menu.Item key={item.value} disabled={item.disabled} onClick={() => insertFn(item.value)}>
{item.label}
</Menu.Item>
{fnList.map(v => (
<Menu.SubMenu title={v.label} key={v.key}>
{
v.children.map(item => (
<Menu.Item key={item.key} disabled={item.disabled} onClick={() => insertFn(item.key)}>
{item.label}
</Menu.Item>
))
}
</Menu.SubMenu>
))}
</Menu>
)
......
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