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
dc6ceea2
Commit
dc6ceea2
authored
Apr 19, 2023
by
田翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 封装代码
parent
a1ea1f83
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
4 deletions
+60
-4
index.js
...Render/components/TablePack/components/CoordView/index.js
+15
-0
index.less
...nder/components/TablePack/components/CoordView/index.less
+0
-0
index.js
...eRender/components/TablePack/components/FileView/index.js
+31
-0
index.less
...ender/components/TablePack/components/FileView/index.less
+4
-0
index.js
src/core/TableRender/components/TablePack/index.js
+7
-3
index.js
src/core/TableRender/index.js
+3
-1
No files found.
src/core/TableRender/components/TablePack/components/CoordView/index.js
0 → 100644
View file @
dc6ceea2
import
React
from
'react'
import
styles
from
'./index.less'
const
CoordView
=
(
props
)
=>
{
const
{
value
}
=
props
return
(
<
div
className
=
{
styles
.
coordView
}
>
{
value
}
<
/div
>
)
}
export
default
CoordView
\ No newline at end of file
src/core/TableRender/components/TablePack/components/CoordView/index.less
0 → 100644
View file @
dc6ceea2
src/core/TableRender/components/TablePack/components/FileView/index.js
0 → 100644
View file @
dc6ceea2
import
React
from
'react'
import
styles
from
'./index.less'
const
FileView
=
(
props
)
=>
{
const
{
value
,
fileType
}
=
props
if
(
fileType
===
'图片'
)
{
let
fileList
=
value
?
value
.
split
(
','
)
:
null
if
(
!
fileList
)
return
null
return
(
<
div
className
=
{
styles
.
fileView
}
>
{
fileList
.
map
(
v
=>
{
return
(
<
img
style
=
{{
width
:
'65px'
}}
src
=
{
`
${
'http://192.168.10.167:8088'
}
/PandaWorkFlow/WorkFlow/AccountManage/DownloadFiles?filePath=
${
v
}
`
}
><
/img
>
)
})
}
<
/div
>
)
}
return
(
<
div
className
=
{
styles
.
fileView
}
>
{
value
}
<
/div
>
)
}
export
default
FileView
\ No newline at end of file
src/core/TableRender/components/TablePack/components/FileView/index.less
0 → 100644
View file @
dc6ceea2
.fileView {
display: flex;
}
\ No newline at end of file
src/core/TableRender/components/TablePack/index.js
View file @
dc6ceea2
import
React
,
{
useMemo
}
from
'react'
import
{
Table
,
Tooltip
}
from
'antd'
import
FileView
from
'./components/FileView'
import
CoordView
from
'./components/CoordView'
const
TablePack
=
(
props
)
=>
{
const
{
value
,
widget
}
=
props
// console.log('props', props)
if
(
widget
===
'FileUpload'
)
{
return
<
FileView
{...
props
}
/
>
}
if
(
widget
)
{
console
.
log
(
'widget'
,
widget
)
if
(
[
'Coordinate'
,
'Device'
,
'SearchLocation'
].
includes
(
widget
)
)
{
return
<
CoordView
{...
props
}
/
>
}
return
(
...
...
src/core/TableRender/index.js
View file @
dc6ceea2
...
...
@@ -63,12 +63,14 @@ const TableRender = (props) => {
dataIndex
:
'r'
,
key
:
'r'
,
width
:
50
,
align
:
'center'
,
fixed
:
'left'
,
},
...
fileColumns
,
{
title
:
'操作'
,
width
:
120
,
align
:
'center'
,
fixed
:
'right'
,
render
:
(
r
)
=>
{
let
btns
=
[
...
...
@@ -86,7 +88,7 @@ const TableRender = (props) => {
}
]
return
(
<
div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'center'
}}
>
{
btns
.
map
(
v
=>
{
return
(
...
...
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