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
91621f11
Commit
91621f11
authored
Apr 26, 2023
by
田翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 增加标签样式
parent
878adb02
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
134 additions
and
65 deletions
+134
-65
index.js
src/constant/index.js
+28
-0
index.js
...ccount/components/TablePack/components/CoordView/index.js
+23
-2
index.js
...Account/components/TablePack/components/FileView/index.js
+41
-5
index.less
...count/components/TablePack/components/FileView/index.less
+2
-0
index.js
...count/components/TablePack/components/SelectView/index.js
+34
-0
index.js
.../Account/components/TablePack/components/TagPack/index.js
+0
-14
index.js
src/core/Account/components/TablePack/index.js
+2
-2
index.js
src/core/FormDesigner/index.js
+0
-12
index.js
src/core/widgets/select/CheckBox/index.js
+1
-1
index.js
src/core/widgets/settings/groupBase/FieldNames/index.js
+1
-1
index.js
src/core/widgets/settings/groupBase/WidgetType/index.js
+1
-1
index.js
src/core/widgets/settings/groupSource/SimpleList/index.js
+1
-27
No files found.
src/constant/
constant
.js
→
src/constant/
index
.js
View file @
91621f11
...
...
@@ -57,6 +57,33 @@ const RegExpObject = {
const
dateArray
=
{
timeControl
:
[
'时间'
,
'仅时间'
,
'日期'
,
'日期月份'
,
'日期年份'
,
'时分秒'
]
}
const
doNotDisplayInEditModelShape
=
[
'编码'
]
const
colors
=
[
// '#ffccc7', '#ffe7ba', '#fffb8f', '#d9f7be', '#b5f5ec',
// '#bae7ff', '#d6e4ff', '#efdbff', '#ffd6e7', '#e8e8e8',
// '#ff4d4f', '#ffa940', '#fbce00', '#73d13d', '#36cfc9',
// '#40a9ff', '#597ef7', '#9254de', '#f759ab', '#8c8c8c',
'rgb(255, 77, 79)'
,
'rgb(255, 169, 64)'
,
'rgb(251, 206, 0)'
,
'rgba(115, 209, 61)'
,
'rgba(54, 207, 201)'
,
'rgba(64, 169, 255)'
,
'rgba(89, 126, 247)'
,
'rgba(146, 84, 222)'
,
'rgba(247, 89, 171)'
,
'rgba(140, 140, 140)'
,
// 'rgba(255, 204, 199)',
// 'rgba(255, 231, 186)',
// 'rgba(255, 251, 143)',
// 'rgba(217, 247, 190)',
// 'rgba(181, 245, 236)',
// 'rgba(186, 231, 255)',
// 'rgba(214, 228, 255)',
// 'rgba(239, 219, 255)',
// 'rgba(255, 214, 231)',
// 'rgba(232, 232, 232)',
]
const
widgetData
=
{
'TextInput'
:
{
name
:
'文本'
,
...
...
@@ -176,6 +203,7 @@ export {
RegExpObject
,
dateArray
,
doNotDisplayInEditModelShape
,
colors
,
widgetData
,
getStyles
,
}
src/core/Account/components/TablePack/components/CoordView/index.js
View file @
91621f11
...
...
@@ -7,8 +7,11 @@ import {
GraphicsLayer
,
Graphic
,
Point
,
SimpleLineSymbol
,
SimpleFillSymbol
,
}
from
'@wisdom-map/arcgismap/lib'
import
Drag
from
'../../../../../components/Drag'
import
{
isJson
}
from
'../../../../../../utils/index'
import
point
from
'../../../../../../assets/images/cood/point.png'
...
...
@@ -103,9 +106,27 @@ const CoordView = (props) => {
},
2000
)
}
}
else
if
(
widget
===
'DrawPath'
)
{
if
(
isJson
(
value
))
{
let
layer
=
new
Graphic
({
geometry
:
geomUtils
.
toGeometry
(
JSON
.
parse
(
value
)),
symbol
:
new
SimpleLineSymbol
({
}),
})
let
layers
=
new
GraphicsLayer
()
layers
.
add
(
layer
)
mapObj
.
map
.
add
(
layers
)
}
}
else
if
(
widget
===
'DrawArea'
)
{
if
(
isJson
(
value
))
{
let
layer
=
new
Graphic
({
geometry
:
geomUtils
.
toGeometry
(
JSON
.
parse
(
value
)),
symbol
:
new
SimpleFillSymbol
({
}),
})
let
layers
=
new
GraphicsLayer
()
layers
.
add
(
layer
)
mapObj
.
map
.
add
(
layers
)
}
}
},
500
)
}
...
...
src/core/Account/components/TablePack/components/FileView/index.js
View file @
91621f11
import
React
from
'react'
import
React
,
{
useState
}
from
'react'
import
styles
from
'./index.less'
import
{
Button
}
from
'antd'
import
{
SnippetsOutlined
,
PlusOutlined
,
FormOutlined
,
DeleteOutlined
,
ImportOutlined
,
ExportOutlined
,
FileZipOutlined
,
FileImageOutlined
,
CustomerServiceOutlined
,
VideoCameraOutlined
,
ExclamationCircleOutlined
,
QuestionCircleOutlined
,
EditOutlined
,
DownOutlined
}
from
'@ant-design/icons'
import
Viewer
from
'viewerjs-react'
import
Drag
from
'../../../../../components/Drag'
const
FileView
=
(
props
)
=>
{
const
{
value
,
fileType
}
=
props
const
{
value
,
fileType
,
title
}
=
props
let
fileList
=
value
?
value
.
split
(
','
)
:
[]
const
[
visible
,
setVisible
]
=
useState
(
false
)
if
(
!
fileList
.
length
)
return
null
if
(
fileType
===
'图片'
)
{
let
fileList
=
value
?
value
.
split
(
','
)
:
null
if
(
!
fileList
)
return
null
return
(
<
div
className
=
{
styles
.
fileView
}
>
<
Viewer
>
...
...
@@ -25,7 +45,23 @@ const FileView = (props) => {
}
return
(
<
div
className
=
{
styles
.
fileView
}
>
{
value
}
<
/div
>
<
div
className
=
{
styles
.
fileView
}
>
<
Button
size
=
'small'
icon
=
{
<
FileZipOutlined
/>
}
onClick
=
{()
=>
setVisible
(
true
)}
>
{
fileList
.
length
}
条记录
<
/Button
>
<
Drag
onOk
=
{()
=>
setVisible
(
false
)}
title
=
{
title
}
visible
=
{
visible
}
>
<
/Drag
>
<
/div
>
)
}
...
...
src/core/Account/components/TablePack/components/FileView/index.less
View file @
91621f11
.fileView {
display: flex;
justify-content: center;
align-items: center;
.img {
width: 65px;
margin-right: 5px;
...
...
src/core/Account/components/TablePack/components/SelectView/index.js
0 → 100644
View file @
91621f11
import
React
from
'react'
import
TagPack
from
'../../../../../components/TagPack'
const
SelectView
=
(
props
)
=>
{
const
{
value
,
sourceType
,
options
}
=
props
let
tag
=
value
?
value
.
split
(
','
)
:
[]
if
(
sourceType
===
'手动输入'
)
{
return
(
<
div
>
{
tag
.
map
((
v
,
i
)
=>
{
let
color
=
options
.
find
(
s
=>
s
.
value
===
v
)?.
color
return
(
<
span
style
=
{{
margin
:
'0 5px'
}}
>
{
color
?
<
TagPack
color
=
{
color
}
text
=
{
v
}
/> :
v
}
<
/span
>
)
})
}
<
/div
>
)
}
return
<
div
>
{
value
}
<
/div
>
}
export
default
SelectView
\ No newline at end of file
src/core/Account/components/TablePack/components/TagPack/index.js
deleted
100644 → 0
View file @
878adb02
import
React
from
'react'
const
TagPack
=
(
props
)
=>
{
const
{
value
}
=
props
return
(
<
div
>
{
value
}
<
/div
>
)
}
export
default
TagPack
\ No newline at end of file
src/core/Account/components/TablePack/index.js
View file @
91621f11
...
...
@@ -2,7 +2,7 @@ import React, { useMemo } from 'react'
import
{
Table
,
Tooltip
}
from
'antd'
import
FileView
from
'./components/FileView'
import
CoordView
from
'./components/CoordView'
import
TagPack
from
'./components/TagPack
'
import
SelectView
from
'./components/SelectView
'
const
TablePack
=
(
props
)
=>
{
...
...
@@ -17,7 +17,7 @@ const TablePack = (props) => {
}
if
([
'RadioButton'
,
'CheckBox'
].
includes
(
widget
))
{
return
<
TagPack
{...
props
}
/
>
return
<
SelectView
{...
props
}
/
>
}
return
(
...
...
src/core/FormDesigner/index.js
View file @
91621f11
...
...
@@ -149,10 +149,6 @@ const FormDesigner = (props, ref) => {
}
const
preview
=
()
=>
{
// const errors = designerRef.current.getErrorFields()
// if (errors.length) {
// return message.error('请按照提示完善表单内容')
// }
let
json
=
getJSON
(
designerRef
.
current
.
getValue
(),
fieldName
)
let
verify
=
getVerify
(
json
)
if
(
verify
===
true
)
{
...
...
@@ -164,10 +160,6 @@ const FormDesigner = (props, ref) => {
}
const
submit
=
async
()
=>
{
// const errors = designerRef.current.getErrorFields()
// if (errors.length) {
// return message.error('请按照提示完善表单内容')
// }
let
json
=
getJSON
(
designerRef
.
current
.
getValue
(),
fieldName
)
let
verify
=
getVerify
(
json
)
if
(
verify
===
true
)
{
...
...
@@ -182,10 +174,6 @@ const FormDesigner = (props, ref) => {
}
const
initLayout
=
()
=>
{
// const errors = designerRef.current.getErrorFields()
// if (errors.length) {
// return message.error('请按照提示完善表单内容')
// }
let
json
=
getJSON
(
designerRef
.
current
.
getValue
(),
fieldName
)
let
verify
=
getVerify
(
json
)
if
(
verify
===
true
)
{
...
...
src/core/widgets/select/CheckBox/index.js
View file @
91621f11
...
...
@@ -35,7 +35,7 @@ const CheckBox = (props) => {
{
color
?
<
TagPack
color
=
{
v
.
color
}
text
=
{
v
.
value
}
/> : v.valu
e
}
<
/Checkbox
>
<
/Checkbox
>
)
}
else
{
children
.
push
(
<
Checkbox
key
=
{
v
}
value
=
{
v
}
>
{
v
}
<
/Checkbox>
)
...
...
src/core/widgets/settings/groupBase/FieldNames/index.js
View file @
91621f11
...
...
@@ -4,7 +4,7 @@ import Drag from '../../../../components/Drag'
import
{
PlusOutlined
}
from
'@ant-design/icons'
import
{
LoadTableFields
,
ReloadTableFields
}
from
'../../../../../apis/process'
import
styles
from
'./index.less'
import
{
widgetData
,
getStyles
}
from
'../../../../../constant
/constant
'
import
{
widgetData
,
getStyles
}
from
'../../../../../constant'
const
FieldNames
=
(
props
)
=>
{
...
...
src/core/widgets/settings/groupBase/WidgetType/index.js
View file @
91621f11
import
React
,
{
useMemo
}
from
'react'
import
{
Select
}
from
'antd'
import
{
widgetData
,
getStyles
}
from
'../../../../../constant
/constant
'
import
{
widgetData
,
getStyles
}
from
'../../../../../constant'
const
WidgetType
=
(
props
)
=>
{
...
...
src/core/widgets/settings/groupSource/SimpleList/index.js
View file @
91621f11
...
...
@@ -4,33 +4,7 @@ import { Switch, Input, Table, Form, Popconfirm, Popover } from 'antd'
import
Drag
from
'./../../../../components/Drag'
import
DragTable
from
'../../../../components/DragTable'
import
{
CheckOutlined
,
DeleteOutlined
,
MenuOutlined
}
from
'@ant-design/icons'
const
colors
=
[
// '#ffccc7', '#ffe7ba', '#fffb8f', '#d9f7be', '#b5f5ec',
// '#bae7ff', '#d6e4ff', '#efdbff', '#ffd6e7', '#e8e8e8',
// '#ff4d4f', '#ffa940', '#fbce00', '#73d13d', '#36cfc9',
// '#40a9ff', '#597ef7', '#9254de', '#f759ab', '#8c8c8c',
'rgb(255, 77, 79)'
,
'rgb(255, 169, 64)'
,
'rgb(251, 206, 0)'
,
'rgba(115, 209, 61)'
,
'rgba(54, 207, 201)'
,
'rgba(64, 169, 255)'
,
'rgba(89, 126, 247)'
,
'rgba(146, 84, 222)'
,
'rgba(247, 89, 171)'
,
'rgba(140, 140, 140)'
,
// 'rgba(255, 204, 199)',
// 'rgba(255, 231, 186)',
// 'rgba(255, 251, 143)',
// 'rgba(217, 247, 190)',
// 'rgba(181, 245, 236)',
// 'rgba(186, 231, 255)',
// 'rgba(214, 228, 255)',
// 'rgba(239, 219, 255)',
// 'rgba(255, 214, 231)',
// 'rgba(232, 232, 232)',
]
import
{
colors
}
from
'../../../../../constant'
const
SimpleList
=
(
props
)
=>
{
...
...
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