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

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

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