Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
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
ReactWeb5
wisdom-components
Commits
711d3b09
Commit
711d3b09
authored
Dec 06, 2022
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 组态修改
parent
60870a00
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
7 deletions
+52
-7
EC_ConfigurationView.md
...mponents/EC_ConfigurationView/src/EC_ConfigurationView.md
+1
-0
Basic.tsx
...xtend-components/EC_ConfigurationView/src/demos/Basic.tsx
+8
-4
index.js
packages/extend-components/EC_ConfigurationView/src/index.js
+43
-3
No files found.
packages/extend-components/EC_ConfigurationView/src/EC_ConfigurationView.md
View file @
711d3b09
...
...
@@ -27,6 +27,7 @@ group:
| ----------------------- | ------------------------------- | ------- | ------ |
| name
`必需`
| 画板名称 | string | '' |
| devices
`必需`
| 画板设备 | array |
[
] |
| deviceName | 画板设备名称 | array |
[
] |
| dictionaryParams
`必需`
| 图标颜色数据字典参数 | object | {} |
| config
`必需`
| 全局 globalConfig | object | {} |
| isZoom | 是否可缩放(手持上建议设置 true) | boolean | false |
...
...
packages/extend-components/EC_ConfigurationView/src/demos/Basic.tsx
View file @
711d3b09
import
React
from
'react'
;
import
PandaConfigurationView
from
'../index'
;
// import PandaConfigurationView from '../../es/index';
const
Demo
=
()
=>
{
return
(
<
div
style=
{
{
width
:
'100%'
,
height
:
'600px'
,
background
:
'#242835'
}
}
>
<
PandaConfigurationView
name=
{
'水厂工艺流程段'
}
devices=
{
'EQZT00000008,EQZT00000007,CPDA00000001,JYBZ00000003,JYBZ00000005,JYBZ00000004,SC00000003'
.
split
(
// name={'水厂工艺流程段'}
// devices={'EQZT00000008,EQZT00000007,CPDA00000001,JYBZ00000003,JYBZ00000005,JYBZ00000004,SC00000003'.split(
// ',',
// )}
name=
{
'崇左丽江水厂原水泵房'
}
devices=
{
'EQZT00000007,CPBA00000001,CPAA00000001,EQZT00000008,CPDA00000001,CPAD00000001,LJSC00000002,EQZT00000005,EQZT00000004,EQZT00000002,EQZT00000003'
.
split
(
','
,
)
}
// name={'崇左丽江水厂原水泵房'}
// devices={'EQZT00000007,CPBA00000001,CPAA00000001,EQZT00000008,CPDA00000001,CPAD00000001,LJSC00000002,EQZT00000005,EQZT00000004,EQZT00000002,EQZT00000003'.split(",")}
// name={'丽江水厂原水提升泵D单元'}
// devices={'CPAA00000001, CPAD00000001, LJSC00000002'.split(',')}
dictionaryParams=
{
{
nodeID
:
149
}
}
config=
{
globalConfig
}
deviceName=
{
[
'工艺流程1'
,
'工艺流程2'
,
'工艺流程3'
]
}
// isZoom={true}
/>
</
div
>
...
...
packages/extend-components/EC_ConfigurationView/src/index.js
View file @
711d3b09
...
...
@@ -107,8 +107,16 @@ const ConfigurationView = (props) => {
twoID
=
`TDG
${
Date
.
now
().
toString
(
36
)}
`
;
const
AdjustControlInput
=
useRef
();
const
AuthorFrom
=
useRef
();
const
ConfigurationRef
=
useRef
();
const
customBack
=
props
.
customBack
?
props
.
customBack
:
()
=>
{};
const
{
devices
=
[],
dictionaryParams
,
config
,
isZoom
=
false
,
flowShow
=
true
}
=
props
;
const
{
devices
=
[],
dictionaryParams
,
config
,
isZoom
=
false
,
flowShow
=
true
,
deviceName
=
[],
}
=
props
;
const
globalConfig
=
window
.
globalConfig
||
config
;
let
poolWater
=
null
;
let
tubeWater
=
null
;
...
...
@@ -1320,7 +1328,7 @@ const ConfigurationView = (props) => {
'Auto'
,
nodeStyle
(),
'Spot'
,
{
locationSpot
:
go
.
Spot
.
Center
,
zOrder
:
2
},
{
locationSpot
:
go
.
Spot
.
Center
,
zOrder
:
3
},
new
go
.
Binding
(
'zOrder'
,
'zOrder'
).
makeTwoWay
(),
new
go
.
Binding
(
'location'
,
'loc'
,
go
.
Point
.
parse
).
makeTwoWay
(
go
.
Point
.
stringify
),
new
go
.
Binding
(
'angle'
).
makeTwoWay
(),
...
...
@@ -1352,6 +1360,26 @@ const ConfigurationView = (props) => {
new
go
.
Binding
(
'stroke'
,
'fontStroke'
).
makeTwoWay
(),
new
go
.
Binding
(
'textAlign'
,
'fontAlign'
),
),
{
click
(
e
,
node
)
{
const
{
data
}
=
node
;
nodeData
=
data
;
const
list
=
bindData
.
find
((
item
)
=>
{
return
item
.
name
===
data
.
stationName
;
});
if
(
!
list
)
return
false
;
switch
(
data
.
opType
)
{
case
'画板跳转'
:
// 图片模型
drawBoardMethod
(
data
);
break
;
case
'自定义交互'
:
// 自定义交互
customBack
(
data
);
break
;
default
:
break
;
}
},
},
),
);
...
...
@@ -2087,12 +2115,18 @@ const ConfigurationView = (props) => {
if
(
item
.
category
===
'modelCase'
||
item
.
category
===
'ellipseCase'
)
{
item
.
dtzOrder
=
item
.
zOrder
;
}
if
(
item
.
category
==
'deviceCase'
&&
deviceName
&&
deviceName
.
length
)
{
var
device
=
deviceName
.
find
(
function
(
arr
,
index
)
{
return
'设备'
+
stationList
[
index
]
==
item
.
stationName
;
});
if
(
device
)
item
.
text
=
device
;
}
});
myDiagram
.
model
=
go
.
Model
.
fromJson
(
json
);
};
return
(
<
div
className
=
{
classNames
(
prefixCls
)}
>
<
div
className
=
{
classNames
(
prefixCls
)}
ref
=
{
ConfigurationRef
}
>
<
div
id
=
{
twoID
}
className
=
{
classNames
(
'configurationView'
)}
>
<
LoadBox
spinning
=
{
spinning
}
/
>
{
isEmpty
&&
<
Empty
theme
=
{
'dark'
}
description
=
{
description
}
/>
}
...
...
@@ -2108,6 +2142,7 @@ const ConfigurationView = (props) => {
onOk
=
{
handleOk
}
onCancel
=
{
handleCancel
}
wrapClassName
=
{
classNames
(
`
${
prefixCls
}
-modal`
)}
getContainer
=
{
ConfigurationRef
.
current
}
{...
modalProps
}
>
{
renderModalContent
()}
...
...
@@ -2123,6 +2158,7 @@ const ConfigurationView = (props) => {
visible
=
{
isAuModalVisible
}
onOk
=
{
handleAuOk
}
onCancel
=
{()
=>
setIsAuModalVisible
(
false
)}
getContainer
=
{
ConfigurationRef
.
current
}
wrapClassName
=
{
classNames
(
`
${
prefixCls
}
-modal`
)}
>
<
Form
className
=
{
classNames
(
'authorizeControlContent'
)}
ref
=
{
AuthorFrom
}
name
=
"loginForm"
>
...
...
@@ -2144,6 +2180,7 @@ const ConfigurationView = (props) => {
visible
=
{
isHIModalVisible
}
onOk
=
{()
=>
setIsHIModalVisible
(
false
)}
onCancel
=
{()
=>
setIsHIModalVisible
(
false
)}
getContainer
=
{
ConfigurationRef
.
current
}
wrapClassName
=
{
classNames
(
`
${
prefixCls
}
-historyInfoModal`
)}
>
<
HistoryInfo
...
...
@@ -2167,6 +2204,7 @@ const ConfigurationView = (props) => {
limit
=
{
true
}
onCancel
=
{()
=>
setIsJumpModalVisible
(
false
)}
wrapClassName
=
{
classNames
(
`
${
prefixCls
}
-jumpModal`
)}
getContainer
=
{
ConfigurationRef
.
current
}
componentPrefix
=
{
componentPrefix
}
style
=
{{
height
:
jumpModalProps
.
height
?
`
${
Number
(
jumpModalProps
.
height
)
+
103
}
px`
:
'100%'
,
...
...
@@ -2190,6 +2228,7 @@ const ConfigurationView = (props) => {
ConfigurationView
.
defaultProps
=
{
name
:
''
,
devices
:
[],
deviceName
:
[],
dictionaryParams
:
{},
config
:
{},
isZoom
:
false
,
...
...
@@ -2199,6 +2238,7 @@ ConfigurationView.defaultProps = {
ConfigurationView
.
propTypes
=
{
name
:
PropTypes
.
string
,
devices
:
PropTypes
.
array
,
deviceName
:
PropTypes
.
array
,
dictionaryParams
:
PropTypes
.
object
,
config
:
PropTypes
.
object
,
isZoom
:
PropTypes
.
bool
,
...
...
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