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
f147400a
Commit
f147400a
authored
5 months ago
by
杨子龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改表格配置项
parent
2e77d3e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
8 deletions
+22
-8
index.js
src/core/widgets/coord/DataTable/index.js
+17
-3
index.js
src/core/widgets/settings/groupSource/OptionRender/index.js
+4
-4
index.js
src/core/widgets/settings/groupSource/StatusOption/index.js
+1
-1
No files found.
src/core/widgets/coord/DataTable/index.js
View file @
f147400a
...
@@ -6,6 +6,8 @@ import FileView from '../../../Account/components/TablePack/components/FileView'
...
@@ -6,6 +6,8 @@ import FileView from '../../../Account/components/TablePack/components/FileView'
import
TagPack
from
'../../../components/TagPack'
import
TagPack
from
'../../../components/TagPack'
import
eventEmitter
from
'../../../../utils/eventEmitter'
import
eventEmitter
from
'../../../../utils/eventEmitter'
import
{
isArray
}
from
"lodash"
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
const
DataTable
=
props
=>
{
const
DataTable
=
props
=>
{
...
@@ -54,7 +56,7 @@ const DataTable = props => {
...
@@ -54,7 +56,7 @@ const DataTable = props => {
break
break
}
}
eventEmitter
.
emit
(
`
${
addons
?.
dataPath
}
_
$
{
actionItem
.
action
}
` , {
eventEmitter
.
emit
(
`
${
addons
?.
dataPath
}
_
event
` , {
...row,
...row,
action: actionItem.action
action: actionItem.action
})
})
...
@@ -221,8 +223,6 @@ const DataTable = props => {
...
@@ -221,8 +223,6 @@ const DataTable = props => {
return <FileView value={row[`
$
{
item
.
fieldType
}
-
$
{
item
.
fieldName
}
`]} {...schema} />;
return <FileView value={row[`
$
{
item
.
fieldType
}
-
$
{
item
.
fieldName
}
`]} {...schema} />;
},
},
});
});
} else if (item.fieldType === '台账' && item.fieldName === '反馈状态') {
//统一最后一行添加
} else {
} else {
const dataIndex = !isGIS ? item.fieldName : `
$
{
item
.
fieldType
}
-
$
{
item
.
fieldName
}
`;
const dataIndex = !isGIS ? item.fieldName : `
$
{
item
.
fieldType
}
-
$
{
item
.
fieldName
}
`;
...
@@ -316,7 +316,21 @@ const DataTable = props => {
...
@@ -316,7 +316,21 @@ const DataTable = props => {
const columns = getColumns();
const columns = getColumns();
useEffect(() => {
useEffect(() => {
const list = [...dataSource];
eventEmitter.on(addons?.dataPath , (res) => {
eventEmitter.on(addons?.dataPath , (res) => {
if(isArray(res)){
res.forEach((item) => {
const currentItem = list.find(l => l['gis-GIS编号'] === item['gis-GIS编号']);
if(!currentItem){
list.push(item);
}
})
} else {
if(list.some(v=> v['gis-GIS编号'] === res['gis-GIS编号'])) return;
list.push(res);
}
setVisible(false);
setVisible(false);
res.forEach((item , index) => {
res.forEach((item , index) => {
...
...
This diff is collapsed.
Click to expand it.
src/core/widgets/settings/groupSource/OptionRender/index.js
View file @
f147400a
...
@@ -149,7 +149,7 @@ const OptionRender = (props) => {
...
@@ -149,7 +149,7 @@ const OptionRender = (props) => {
<
Space
>
<
Space
>
<
Switch
checkedChildren
=
"开启"
<
Switch
checkedChildren
=
"开启"
unCheckedChildren
=
"关闭"
unCheckedChildren
=
"关闭"
value
=
{
r
}
checked
=
{
r
}
onChange
=
{(
e
)
=>
inputChange
(
e
,
i
,
"isMapped"
,
_
)}
onChange
=
{(
e
)
=>
inputChange
(
e
,
i
,
"isMapped"
,
_
)}
/
>
/
>
{
{
...
@@ -226,12 +226,12 @@ const OptionRender = (props) => {
...
@@ -226,12 +226,12 @@ const OptionRender = (props) => {
value
:
"update"
value
:
"update"
},
},
{
{
label
:
"
跳转
"
,
label
:
"
自定义事件
"
,
value
:
"
href
"
value
:
"
selfEvent
"
}
}
]}
value
=
{
r
}
]}
value
=
{
r
}
style
=
{{
style
=
{{
width
:
8
0
width
:
10
0
}}
}}
onChange
=
{(
e
)
=>
inputChange
(
e
,
i
,
"action"
)}
/
>
onChange
=
{(
e
)
=>
inputChange
(
e
,
i
,
"action"
)}
/
>
<
/Fragment
>
<
/Fragment
>
...
...
This diff is collapsed.
Click to expand it.
src/core/widgets/settings/groupSource/StatusOption/index.js
View file @
f147400a
...
@@ -192,7 +192,7 @@ const StatusOption = (props) => {
...
@@ -192,7 +192,7 @@ const StatusOption = (props) => {
<
Space
>
<
Space
>
<
Switch
checkedChildren
=
"开启"
<
Switch
checkedChildren
=
"开启"
unCheckedChildren
=
"关闭"
unCheckedChildren
=
"关闭"
value
=
{
r
}
checked
=
{
r
}
onChange
=
{(
e
)
=>
inputChange
(
e
,
i
,
"isMapped"
,
_
)}
onChange
=
{(
e
)
=>
inputChange
(
e
,
i
,
"isMapped"
,
_
)}
/
>
/
>
{
{
...
...
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