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
6b058a3f
Commit
6b058a3f
authored
Oct 07, 2023
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改视频查看组件问题
parent
4e3d3abc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
RealModel.js
...s/extend-components/EC_ConfigurationView/src/RealModel.js
+5
-1
utils.js
...es/extend-components/EC_ConfigurationView/src/js/utils.js
+17
-6
No files found.
packages/extend-components/EC_ConfigurationView/src/RealModel.js
View file @
6b058a3f
...
...
@@ -45,6 +45,7 @@ import {
hexSwitch
,
textStyle
,
querySkipUrl
,
queryProduct
,
isJson
,
stationData
,
getVideoUrl
,
...
...
@@ -112,12 +113,13 @@ const ConfigurationView = (props) => {
let
devicesCode
=
[];
const
globalConfig
=
window
.
globalConfig
||
config
;
let
isClose
=
false
;
const
product
=
queryProduct
(
globalConfig
?.
widgets
||
[],
decodeURI
(
window
.
location
.
pathname
));
const
_JessibucaObj
=
{
operateBtns
:
{
screenshot
:
false
,
},
loadingText
:
'视频加载中'
,
decoder
:
'/JessibucaVideo/decoder.js'
,
decoder
:
product
?
`/
${
product
}
/JessibucaVideo/decoder.js`
:
'/JessibucaVideo/decoder.js'
,
};
/** **********************************获取工艺图画板信息*********************** */
...
...
@@ -1484,7 +1486,9 @@ const ConfigurationView = (props) => {
password: list.password,
dataRate: '
Sub
',
pandavmsHost: getVideoUrl(),
gateway: true,
address: list.address,
channel: list.channelID * 1,
});
});
setVideoTitle(vdName + '
视频查看
');
...
...
packages/extend-components/EC_ConfigurationView/src/js/utils.js
View file @
6b058a3f
...
...
@@ -153,13 +153,9 @@ export const stationData = [
];
export
const
getVideoUrl
=
()
=>
{
const
hasGateWay
=
window
.
globalConfig
?.
hasGateWay
;
const
protocol
=
window
.
location
.
protocol
;
const
address
=
window
.
location
.
origin
.
replace
(
protocol
,
'ws:'
);
const
port
=
window
.
location
.
port
;
const
defaultAddress
=
address
.
replace
(
port
,
7000
);
return
hasGateWay
?
`
${
address
}
/`
:
`
${
defaultAddress
}
/`
;
const
address
=
protocol
===
"https:"
?
window
.
location
.
origin
.
replace
(
protocol
,
'wss:'
)
:
window
.
location
.
origin
.
replace
(
protocol
,
'ws:'
);
return
`
${
address
}
/`
;
};
export
const
loginauthen
=
()
=>
{
...
...
@@ -176,3 +172,18 @@ export const loginauthen = () => {
})
.
catch
((
err
)
=>
{});
};
// 菜单查找Product
export
const
queryProduct
=
(
data
,
url
)
=>
{
let
res
=
null
;
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
url
.
indexOf
(
data
[
i
].
url
)
>
-
1
)
{
res
=
data
[
i
];
return
data
[
i
];
}
else
if
(
data
[
i
].
widgets
&&
data
[
i
].
widgets
.
length
>
0
)
{
res
=
queryProduct
(
data
[
i
].
widgets
,
url
);
}
if
(
res
)
break
;
}
return
res
;
};
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