Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
田翔
xform
Commits
dae7deda
Commit
dae7deda
authored
2 years ago
by
田翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 增加台账选择器列表显示
parent
700f0cf1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
118 additions
and
9 deletions
+118
-9
index.js
src/core/Account/components/SearchGroup/index.js
+1
-1
index.js
src/core/Account/components/TablePack/index.js
+8
-3
settings.js
src/core/FormDesigner/config/settings.js
+8
-2
index.js
src/core/FormRender/index.js
+1
-0
index.js
src/core/widgets/business/AccountSelector/index.js
+16
-3
index.js
src/core/widgets/settings/groupSource/FieldList/index.js
+82
-0
index.js
src/core/widgets/settings/groupSource/index.js
+2
-0
No files found.
src/core/Account/components/SearchGroup/index.js
View file @
dae7deda
...
@@ -202,7 +202,7 @@ const SearchGroup = forwardRef((props, ref) => {
...
@@ -202,7 +202,7 @@ const SearchGroup = forwardRef((props, ref) => {
};
};
const
btnsClick
=
type
=>
{
const
btnsClick
=
type
=>
{
props
&&
props
.
btnsClick
(
type
,
null
);
props
?.
btnsClick
?.
(
type
,
null
);
};
};
return
(
return
(
...
...
This diff is collapsed.
Click to expand it.
src/core/Account/components/TablePack/index.js
View file @
dae7deda
...
@@ -29,7 +29,7 @@ const TablePack = (props, ref) => {
...
@@ -29,7 +29,7 @@ const TablePack = (props, ref) => {
setFilteredInfo
,
setFilteredInfo
,
}))
}))
const
{
parent
,
readOnly
,
config
,
loading
,
dataSource
,
rowSelection
,
onRow
,
tableChange
,
btnsClick
}
=
props
const
{
parent
,
readOnly
,
config
,
fieldList
,
loading
,
dataSource
,
rowSelection
,
onRow
,
tableChange
,
btnsClick
}
=
props
const
[
filteredInfo
,
setFilteredInfo
]
=
useState
({})
const
[
filteredInfo
,
setFilteredInfo
]
=
useState
({})
const
inputRef
=
useRef
()
const
inputRef
=
useRef
()
...
@@ -126,7 +126,12 @@ const TablePack = (props, ref) => {
...
@@ -126,7 +126,12 @@ const TablePack = (props, ref) => {
const
fileColumns
=
useMemo
(()
=>
{
const
fileColumns
=
useMemo
(()
=>
{
const
{
webShowFieldGroup
,
formJson
}
=
config
const
{
webShowFieldGroup
,
formJson
}
=
config
let
showField
=
webShowFieldGroup
?
webShowFieldGroup
.
split
(
','
).
filter
(
v
=>
v
)
:
[]
let
showField
=
[]
if
(
Array
.
isArray
(
fieldList
)
&&
fieldList
.
length
>
0
)
{
showField
=
fieldList
}
else
{
showField
=
webShowFieldGroup
?
webShowFieldGroup
.
split
(
','
).
filter
(
v
=>
v
)
:
[]
}
let
json
=
getFileInfo
(
formJson
)
let
json
=
getFileInfo
(
formJson
)
let
array
=
[]
let
array
=
[]
showField
.
forEach
(
v
=>
{
showField
.
forEach
(
v
=>
{
...
@@ -157,7 +162,7 @@ const TablePack = (props, ref) => {
...
@@ -157,7 +162,7 @@ const TablePack = (props, ref) => {
})
})
})
})
return
array
return
array
},
[
config
,
filteredInfo
])
},
[
config
,
fi
eldList
,
fi
lteredInfo
])
const
columns
=
useMemo
(()
=>
{
const
columns
=
useMemo
(()
=>
{
let
columns
=
[
let
columns
=
[
...
...
This diff is collapsed.
Click to expand it.
src/core/FormDesigner/config/settings.js
View file @
dae7deda
...
@@ -1761,18 +1761,24 @@ const businessWidgets = [
...
@@ -1761,18 +1761,24 @@ const businessWidgets = [
name
:
'台账名称'
,
name
:
'台账名称'
,
type
:
'string'
,
type
:
'string'
,
widget
:
'AccountName'
,
widget
:
'AccountName'
,
// required: true,
},
},
fieldshine
:
{
fieldshine
:
{
title
:
'映射字段'
,
title
:
'映射字段'
,
name
:
'映射字段'
,
name
:
'映射字段'
,
type
:
'array'
,
type
:
'array'
,
widget
:
'Fieldshine'
,
widget
:
'Fieldshine'
,
// required: true,
dependencies
:
[
'accountName'
,
'$id'
],
dependencies
:
[
'accountName'
,
'$id'
],
default
:
[],
default
:
[],
description
:
'多字段映射仅支持单选'
,
description
:
'多字段映射仅支持单选'
,
},
},
fieldList
:
{
title
:
'前端显示字段'
,
type
:
'array'
,
default
:
[],
widget
:
'FieldList'
,
dependencies
:
[
'accountName'
,
'$id'
],
description
:
'默认获取前端台账字段'
,
},
siteFilter
:
{
siteFilter
:
{
title
:
'站点过滤'
,
title
:
'站点过滤'
,
name
:
'站点过滤'
,
name
:
'站点过滤'
,
...
...
This diff is collapsed.
Click to expand it.
src/core/FormRender/index.js
View file @
dae7deda
...
@@ -90,6 +90,7 @@ const XRender = (props, ref) => {
...
@@ -90,6 +90,7 @@ const XRender = (props, ref) => {
},
[
schemaForm
,
form
,
startTime
])
},
[
schemaForm
,
form
,
startTime
])
const
getValues
=
async
()
=>
{
const
getValues
=
async
()
=>
{
console
.
log
(
'form'
,
form
)
let
{
data
,
errors
}
=
await
form
.
submit
()
let
{
data
,
errors
}
=
await
form
.
submit
()
let
formValue
=
[]
let
formValue
=
[]
Object
.
keys
(
data
).
map
((
k
)
=>
{
Object
.
keys
(
data
).
map
((
k
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/core/widgets/business/AccountSelector/index.js
View file @
dae7deda
import
React
,
{
useState
,
useEffect
}
from
'react'
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
{
Input
,
message
,
Pagination
}
from
'antd'
import
{
Input
,
message
,
Pagination
}
from
'antd'
import
{
SnippetsOutlined
}
from
'@ant-design/icons'
import
{
SnippetsOutlined
}
from
'@ant-design/icons'
import
{
GetAccountConfigInfo
,
GetAccountPageList
,
getStationListByUserID
}
from
'../../../../apis/process'
import
{
GetAccountConfigInfo
,
GetAccountPageList
,
getStationListByUserID
}
from
'../../../../apis/process'
...
@@ -12,7 +12,7 @@ const AccountSelector = (props) => {
...
@@ -12,7 +12,7 @@ const AccountSelector = (props) => {
const
userID
=
window
?.
globalConfig
?.
userInfo
?.
OID
||
1
const
userID
=
window
?.
globalConfig
?.
userInfo
?.
OID
||
1
const
{
value
,
onChange
,
schema
,
addons
}
=
props
const
{
value
,
onChange
,
schema
,
addons
}
=
props
const
{
disabled
,
accountName
,
fieldshine
,
siteFilter
,
sql
,
isMultiple
,
presetValue
,
placeholder
}
=
schema
const
{
disabled
,
accountName
,
fieldshine
,
siteFilter
,
sql
,
isMultiple
,
presetValue
,
placeholder
,
fieldList
}
=
schema
const
[
params
,
setParams
]
=
useState
({
const
[
params
,
setParams
]
=
useState
({
userID
:
userID
,
userID
:
userID
,
...
@@ -28,6 +28,7 @@ const AccountSelector = (props) => {
...
@@ -28,6 +28,7 @@ const AccountSelector = (props) => {
const
[
config
,
setConfig
]
=
useState
({
webShowFieldGroup
:
''
})
const
[
config
,
setConfig
]
=
useState
({
webShowFieldGroup
:
''
})
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
[
keys
,
setKeys
]
=
useState
([])
const
[
keys
,
setKeys
]
=
useState
([])
const
tablePackRef
=
useRef
(
null
)
const
iconClick
=
()
=>
{
const
iconClick
=
()
=>
{
if
(
addons
)
{
if
(
addons
)
{
...
@@ -154,6 +155,15 @@ const AccountSelector = (props) => {
...
@@ -154,6 +155,15 @@ const AccountSelector = (props) => {
getDataSource
({
...
values
})
getDataSource
({
...
values
})
}
}
const
btnsClick
=
(
type
)
=>
{
if
(
type
===
'重置'
)
{
console
.
log
(
'type'
,
type
)
tablePackRef
.
current
.
setFilteredInfo
({})
setParams
({
...
params
,
queryWheres
:
[]
})
getDataSource
({
queryWheres
:
[]
})
}
}
const
pageChange
=
(
pageIndex
,
pageSize
)
=>
{
const
pageChange
=
(
pageIndex
,
pageSize
)
=>
{
getDataSource
({
pageIndex
,
pageSize
})
getDataSource
({
pageIndex
,
pageSize
})
}
}
...
@@ -191,15 +201,18 @@ const AccountSelector = (props) => {
...
@@ -191,15 +201,18 @@ const AccountSelector = (props) => {
<
SearchGroup
<
SearchGroup
onChange
=
{
search
}
onChange
=
{
search
}
readOnly
=
{
true
}
readOnly
=
{
true
}
btnsClick
=
{
btnsClick
}
/
>
/
>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
bottom
}
>
<
div
className
=
{
styles
.
bottom
}
>
<
TablePack
<
TablePack
ref
=
{
tablePackRef
}
loading
=
{
loading
}
loading
=
{
loading
}
readOnly
=
{
true
}
readOnly
=
{
true
}
config
=
{
config
}
config
=
{
config
}
dataSource
=
{
dataSource
}
dataSource
=
{
dataSource
}
btnsClick
=
{()
=>
{
}}
btnsClick
=
{
btnsClick
}
fieldList
=
{
fieldList
}
tableChange
=
{
tableChange
}
tableChange
=
{
tableChange
}
parent
=
'台账选择器'
parent
=
'台账选择器'
rowSelection
=
{{
rowSelection
=
{{
...
...
This diff is collapsed.
Click to expand it.
src/core/widgets/settings/groupSource/FieldList/index.js
0 → 100644
View file @
dae7deda
import
React
,
{
useMemo
,
useState
}
from
'react'
import
{
Input
,
message
,
Row
,
Col
,
Checkbox
}
from
'antd'
import
Drag
from
'../../../../components/Drag'
import
{
GetAccountPageList
,
GetAccountConfigInfo
,
GetTableGroupMeta
,
GetTableDataInfo
,
SaveTableDataInfo
,
EditTableDataInfo
,
DeleteTableDataInfo
}
from
'../../../../../apis/process'
const
FieldList
=
(
props
)
=>
{
const
{
value
,
addons
,
onChange
}
=
props
const
{
accountName
}
=
addons
.
formData
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
[
conifg
,
setConfig
]
=
useState
({})
const
options
=
useMemo
(()
=>
{
const
{
webShowFieldGroup
}
=
conifg
return
webShowFieldGroup
?
webShowFieldGroup
.
split
(
','
).
filter
(
v
=>
v
)
:
[]
},
[
conifg
])
const
getConfig
=
async
()
=>
{
const
{
code
,
data
}
=
await
GetAccountConfigInfo
(
accountName
)
if
(
code
===
0
)
{
setConfig
(
data
)
}
}
const
onOk
=
()
=>
{
setVisible
(
false
)
}
const
checkChange
=
(
value
)
=>
{
onChange
(
value
)
}
const
inputClick
=
()
=>
{
if
(
!
accountName
)
{
return
message
.
error
(
'请配置台账名称!'
)
}
getConfig
()
setVisible
(
true
)
}
return
(
<
div
>
<
Input
value
=
{
value
}
onClick
=
{
inputClick
}
/
>
<
Drag
title
=
'前端显示字段'
onOk
=
{
onOk
}
onCancel
=
{()
=>
setVisible
(
false
)}
visible
=
{
visible
}
>
<
Checkbox
.
Group
value
=
{
value
}
style
=
{{
width
:
'100%'
}}
onChange
=
{
checkChange
}
>
<
Row
>
{
options
.
map
(
v
=>
{
return
(
<
Col
span
=
{
8
}
>
<
Checkbox
value
=
{
v
}
>
{
v
}
<
/Checkbox
>
<
/Col
>
)
})
}
<
/Row
>
<
/Checkbox.Group
>
<
/Drag
>
<
/div
>
)
}
export
default
FieldList
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/core/widgets/settings/groupSource/index.js
View file @
dae7deda
...
@@ -6,6 +6,7 @@ import MappedField from './MappedField'
...
@@ -6,6 +6,7 @@ import MappedField from './MappedField'
import
ControlRules
from
'./ControlRules'
import
ControlRules
from
'./ControlRules'
import
SourceType
from
'./SourceType'
import
SourceType
from
'./SourceType'
import
TableName
from
'./TableName'
import
TableName
from
'./TableName'
import
FieldList
from
'./FieldList'
import
FieldName
from
'./FieldName'
import
FieldName
from
'./FieldName'
import
CalculateRule
from
'./CalculateRule'
import
CalculateRule
from
'./CalculateRule'
import
AddressSync
from
'./AddressSync'
import
AddressSync
from
'./AddressSync'
...
@@ -21,6 +22,7 @@ const groupSource = {
...
@@ -21,6 +22,7 @@ const groupSource = {
ControlRules
,
ControlRules
,
SourceType
,
SourceType
,
TableName
,
TableName
,
FieldList
,
FieldName
,
FieldName
,
CalculateRule
,
CalculateRule
,
AddressSync
,
AddressSync
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment