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
053b5dfd
Commit
053b5dfd
authored
Nov 20, 2023
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 组态增加当前设备视频查看
parent
0e86d7ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
15 deletions
+39
-15
HistoryModel.js
...xtend-components/EC_ConfigurationView/src/HistoryModel.js
+0
-2
RealModel.js
...s/extend-components/EC_ConfigurationView/src/RealModel.js
+39
-13
No files found.
packages/extend-components/EC_ConfigurationView/src/HistoryModel.js
View file @
053b5dfd
...
...
@@ -1410,7 +1410,6 @@ const ConfigurationView = (props) => {
// 画板跳转
switch (data.opType) {
case '画板跳转': // 图片模型
drawBoardMethod(data);
break;
case '功能跳转': // 功能模型
menuJumpMethod(data);
...
...
@@ -1711,7 +1710,6 @@ const ConfigurationView = (props) => {
menuJumpMethod(data);
break;
case '视频查看': // 视频查看
videoScanMethod(data);
break;
case '自定义交互': // 自定义交互
customBack(data);
...
...
packages/extend-components/EC_ConfigurationView/src/RealModel.js
View file @
053b5dfd
...
...
@@ -121,7 +121,9 @@ const ConfigurationView = (props) => {
screenshot
:
false
,
},
loadingText
:
'视频加载中'
,
decoder
:
widgets
?
`/
${
widgets
.
product
}
/JessibucaVideo/decoder.js`
:
'/JessibucaVideo/decoder.js'
,
decoder
:
widgets
?
`/
${
widgets
.
product
}
/JessibucaVideo/decoder.js`
:
'/JessibucaVideo/decoder.js'
,
};
/** **********************************获取工艺图画板信息*********************** */
...
...
@@ -903,7 +905,7 @@ const ConfigurationView = (props) => {
loginauthen
();
loginTimer
.
current
=
setInterval
(()
=>
{
loginauthen
();
},
1000
*
28800
);
},
1000
*
28800
);
return
()
=>
{
clearInterval
(
loginTimer
.
current
);
loginTimer
.
current
=
null
;
...
...
@@ -945,7 +947,7 @@ const ConfigurationView = (props) => {
controlback: controlData,
})
: null;
const diagramJson =
typeof fromJson === '
string
' ? fromJson : JSON.stringify(fromJson);
const diagramJson = typeof fromJson === '
string
' ? fromJson : JSON.stringify(fromJson);
diagramRender(diagramJson, list);
setNoInitial(false);
try {
...
...
@@ -953,7 +955,7 @@ const ConfigurationView = (props) => {
const nodeDataArray = JSON.parse(diagramJson)?.nodeDataArray || [];
nodeDataArray.forEach((item) => {
if (item.category === '
bgCase
') dataSources = item.dataSources || '
MQTT
';
})
})
;
if (dataSources === '
MQTT
') {
mqttView && mqttView.saveWaterMqtt();
} else {
...
...
@@ -1471,8 +1473,12 @@ const ConfigurationView = (props) => {
const videoScanMethod = async (data) => {
try {
const opRule = JSON.parse(data.opRule);
const { vdCode, vdList, vdName } = opRule;
if (!vdCode || !vdList) return setVideoData([]);
const bindList = bindData.find((item) => {
return item.name === data.stationName;
});
const { vdCode = bindList.code, vdList = '', vdName = '', vdType = '' } = opRule;
if (!vdCode) return setVideoData([]);
if (vdType && !vdList) return setVideoData([]);
const detail = await getVideoDetail({
UserID: 1,
DeviceCode: vdCode,
...
...
@@ -1482,14 +1488,30 @@ const ConfigurationView = (props) => {
: '',
});
const dataList = detail?.data;
const videoList = vdList.split('
,
');
if (!dataList) return setVideoData([]);
const detailList = [];
videoList.forEach((item, index) => {
const list = dataList.find((obj) => {
return item === obj.vmS_DeviceID;
if (vdType) {
const videoList = vdList.split('
,
');
videoList.forEach((item, index) => {
const list = dataList.find((obj) => {
return item === obj.vmS_DeviceID;
});
if (list)
detailList.push({
id: list.vmS_DeviceID,
name: list.channelName,
protocol: list.protocol,
username: list.username,
password: list.password,
dataRate: '
Sub
',
pandavmsHost: getVideoUrl(),
gateway: true,
address: list.address,
channel: list.channelID * 1,
});
});
if (list)
} else {
dataList.forEach((list) => {
detailList.push({
id: list.vmS_DeviceID,
name: list.channelName,
...
...
@@ -1502,7 +1524,8 @@ const ConfigurationView = (props) => {
address: list.address,
channel: list.channelID * 1,
});
});
});
}
setVideoTitle(vdName + '
视频查看
');
setVideoData(detailList);
detailList.length && setIsVideoVisible(true);
...
...
@@ -3173,7 +3196,10 @@ const ConfigurationView = (props) => {
// title={historyInfoParams.length ? historyInfoParams[0].sensors || '' : ''}
wrapClassName={classNames(`
$
{
prefixCls
}
-
historyInfoModal
`)}
>
<HistoryView deviceParams={historyInfoParams} title={historyInfoParams.length ? historyInfoParams[0].sensors || '' : ''} />
<HistoryView
deviceParams={historyInfoParams}
title={historyInfoParams.length ? historyInfoParams[0].sensors || '' : ''}
/>
</Modal>
)}
{/* 统计历史曲线 */}
...
...
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