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
7acd3208
Commit
7acd3208
authored
Dec 02, 2022
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 组态修改
parent
b82d8435
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
17 deletions
+28
-17
DatePickerCustom.md
.../base-components/DatePickerCustom/src/DatePickerCustom.md
+6
-2
SelectCustom.md
packages/base-components/SelectCustom/src/SelectCustom.md
+2
-0
index.js
packages/extend-components/EC_ConfigurationView/src/index.js
+15
-10
DragModal.js
...xtend-components/EC_ConfigurationView/src/js/DragModal.js
+5
-5
No files found.
packages/base-components/DatePickerCustom/src/DatePickerCustom.md
View file @
7acd3208
...
...
@@ -19,7 +19,9 @@ group:
api 参考 Antd DatePicker 组件 https://ant.design/components/date-picker-cn/#API
## 时间选择器 - 日期
## 代码演示
### 时间选择器 - 日期
<code
src=
"./demos/base.tsx"
>
...
...
@@ -31,7 +33,9 @@ api 参考 Antd DatePicker 组件 https://ant.design/components/date-picker-cn/#
| --- | --- | --- | --- |
| onChange | 改变选择的时间,重写 antd 方法,返回起始时间对象 | function(date, dateString){ } | -- |
## 时间选择器 - 范围
## 代码演示
### 时间选择器 - 范围
<code
src=
"./demos/base2.tsx"
>
...
...
packages/base-components/SelectCustom/src/SelectCustom.md
View file @
7acd3208
...
...
@@ -39,6 +39,8 @@ api 参考 Antd Select 组件 https://ant.design/components/select-cn#api
| ---------- | ------------------------ | --------- | ------ |
| prefixIcon | 自定义的选择框前缀缀图标 | ReactNode | -- |
## 代码演示
### 下拉选择器 - 树单选
<code
src=
"./demos/Basic5.tsx"
>
...
...
packages/extend-components/EC_ConfigurationView/src/index.js
View file @
7acd3208
...
...
@@ -5,7 +5,7 @@ import moment from 'moment';
import
sha1
from
'sha1'
;
import
Empty
from
'@wisdom-components/empty'
;
import
LoadBox
from
'@wisdom-components/loadbox'
;
import
{
Input
,
message
,
Modal
,
Form
,
ConfigProvider
,
Button
,
Spin
}
from
'antd'
;
import
{
Input
,
message
,
Modal
,
Form
,
ConfigProvider
,
Button
}
from
'antd'
;
import
{
ExclamationCircleOutlined
,
DoubleLeftOutlined
,
...
...
@@ -49,16 +49,11 @@ let modalComponent = null; // 点击节点展示的模态框内容
let
modalConfirmFn
=
null
;
// 点击节点展示的模态框的确定事件
let
auModalConfirmFn
=
null
;
// 登录模态框的确定事件
let
jumpModalProps
=
null
;
// let nodeData = null; // 选中节点的数据
// const guidAggre = {};
// const bindData = [];
// const stationList = [];
// let mqttView = null;
let
modalProps
=
{};
let
modalWidth
=
520
;
let
historyInfoParams
=
{};
let
nodeData
=
null
;
// 选中节点的数据
// let editionArr = []
;
let
twoID
=
``
;
const
waterFlow
=
new
WaterFlowControlView
();
...
...
@@ -92,7 +87,6 @@ const StationList = [
];
const
ConfigurationView
=
(
props
)
=>
{
let
twoID
=
`TDG
${
Date
.
now
().
toString
(
36
)}
`
;
let
myDiagram
=
null
;
let
mqttView
=
null
;
let
editionArr
=
[];
...
...
@@ -101,12 +95,14 @@ const ConfigurationView = (props) => {
const
stationList
=
[];
const
{
getPrefixCls
}
=
useContext
(
ConfigProvider
.
ConfigContext
);
const
prefixCls
=
getPrefixCls
(
'ec-configuration-view'
);
const
componentPrefix
=
getPrefixCls
(
''
);
const
[
isModalVisible
,
setIsModalVisible
]
=
useState
(
false
);
const
[
isAuModalVisible
,
setIsAuModalVisible
]
=
useState
(
false
);
// 登录模态框
const
[
isHIModalVisible
,
setIsHIModalVisible
]
=
useState
(
false
);
// 历史曲线模态框
const
[
isJumpModalVisible
,
setIsJumpModalVisible
]
=
useState
(
false
);
// 画板跳转模态框
const
[
spinning
,
setSpinning
]
=
useState
(
true
);
// 画板loading
const
[
isEmpty
,
setIsEmpty
]
=
useState
(
false
);
// 画板无数据状态
const
[
description
,
setDescription
]
=
useState
(
''
);
// 画板无数据描述
twoID
=
`TDG
${
Date
.
now
().
toString
(
36
)}
`
;
const
AdjustControlInput
=
useRef
();
...
...
@@ -150,11 +146,13 @@ const ConfigurationView = (props) => {
}
getDiagramJson
(
data
[
0
],
siteInfo
);
}
else
{
setDescription
(
'咦~未查询到工艺图画板信息哦~'
);
setIsEmpty
(
true
);
setSpinning
(
false
);
return
message
.
info
(
'咦~未查询到工艺图画板信息哦~'
)
;
return
false
;
}
}
else
{
setDescription
(
'咦~工艺图画板信息报错啦~'
);
setIsEmpty
(
true
);
setSpinning
(
false
);
return
message
.
error
(
drawInfo
.
msg
);
...
...
@@ -617,6 +615,12 @@ const ConfigurationView = (props) => {
};
useEffect
(()
=>
{
if
(
!
props
.
name
||
!
props
.
devices
||
!
props
.
devices
.
length
)
{
setDescription
(
'咦~工艺图配置信息不全哦~'
);
setIsEmpty
(
true
);
setSpinning
(
false
);
return
false
;
}
const
url
=
globalConfig
.
mainserver
?
globalConfig
.
mainserver
:
'https://panda-water.cn/'
;
onlineMethod
(
`
${
url
}
civweb4/assets/images/bootPage/熊猫图标.png`
,
url
);
return
()
=>
{
...
...
@@ -2091,7 +2095,7 @@ const ConfigurationView = (props) => {
<
div
className
=
{
classNames
(
prefixCls
)}
>
<
div
id
=
{
twoID
}
className
=
{
classNames
(
'configurationView'
)}
>
<
LoadBox
spinning
=
{
spinning
}
/
>
{
isEmpty
&&
<
Empty
theme
=
{
'dark'
}
description
=
{
'咦~未查询到工艺图画板信息哦~'
}
/>
}
{
isEmpty
&&
<
Empty
theme
=
{
'dark'
}
description
=
{
description
}
/>
}
<
/div
>
{
/* 远程控制 */
}
{
isModalVisible
&&
(
...
...
@@ -2163,6 +2167,7 @@ const ConfigurationView = (props) => {
limit
=
{
true
}
onCancel
=
{()
=>
setIsJumpModalVisible
(
false
)}
wrapClassName
=
{
classNames
(
`
${
prefixCls
}
-jumpModal`
)}
componentPrefix
=
{
componentPrefix
}
style
=
{{
height
:
jumpModalProps
.
height
?
`
${
Number
(
jumpModalProps
.
height
)
+
103
}
px`
:
'100%'
,
left
:
`calc(50% -
${
jumpModalProps
.
width
?
jumpModalProps
.
width
/
2
+
'px'
:
'50%'
}
)`
,
...
...
packages/extend-components/EC_ConfigurationView/src/js/DragModal.js
View file @
7acd3208
/* eslint-disable */
import
React
from
'react'
;
import
{
Modal
}
from
'antd'
;
import
React
,
{
useContext
}
from
'react'
;
import
{
Modal
,
ConfigProvider
}
from
'antd'
;
class
DragModal
extends
React
.
Component
{
constructor
()
{
...
...
@@ -50,7 +50,7 @@ class DragModal extends React.Component {
// eslint-disable-next-line consistent-return
create
=
(
visible
)
=>
{
if
(
this
.
init
)
return
false
;
const
{
title
,
dragable
=
true
,
autoIndex
=
true
,
style
=
{}
}
=
this
.
props
;
const
{
title
,
dragable
=
true
,
autoIndex
=
true
,
style
=
{}
,
componentPrefix
}
=
this
.
props
;
if
(
title
&&
dragable
&&
visible
)
{
this
.
init
=
true
;
setTimeout
(()
=>
{
...
...
@@ -58,7 +58,7 @@ class DragModal extends React.Component {
this
.
contain
=
document
.
getElementsByClassName
(
this
.
simpleClass
)[
0
];
if
(
!
autoIndex
)
{
// eslint-disable-next-line prefer-destructuring
this
.
contain
=
this
.
contain
.
getElementsByClassName
(
'ant-modal'
)[
0
];
this
.
contain
=
this
.
contain
.
getElementsByClassName
(
`
${
componentPrefix
}
-modal`
)[
0
];
this
.
contain
.
style
.
paddingBottom
=
0
;
this
.
contain
.
style
.
display
=
'inline-block'
;
}
else
{
...
...
@@ -71,7 +71,7 @@ class DragModal extends React.Component {
this
.
toTop
();
}
// eslint-disable-next-line prefer-destructuring
this
.
header
=
this
.
contain
.
getElementsByClassName
(
'ant-modal-header'
)[
0
];
this
.
header
=
this
.
contain
.
getElementsByClassName
(
`
${
componentPrefix
}
-modal-header`
)[
0
];
this
.
header
.
style
.
cursor
=
'all-scroll'
;
this
.
header
.
onmousedown
=
()
=>
{
document
.
body
.
onselectstart
=
()
=>
false
;
...
...
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