Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
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
CivWeb
Commits
17f4cec2
Commit
17f4cec2
authored
Dec 02, 2024
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref: 宿州登录页全景调试
parent
87f61707
Pipeline
#94289
passed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
120 additions
and
21 deletions
+120
-21
index.js
src/pages/user/login/components/Krpano/index.js
+19
-14
index.js
src/pages/user/login/template/project/suzhou/index.js
+47
-7
index.less
src/pages/user/login/template/project/suzhou/index.less
+54
-0
No files found.
src/pages/user/login/components/Krpano/index.js
View file @
17f4cec2
import
{
Preview
}
from
'@wisdom-cesium/krpano'
/*
* @Title:
* @Author: hongmye
* @Date: 2024-05-24 17:27:53
*/
import
{
Preview
}
from
'@wisdom-cesium/krpano'
;
const
Krpano
=
props
=>
{
const
Krpano
=
props
=>
{
const
{
projectName
,
loadedHook
,
sceneLoadedHook
}
=
props
;
const
{
projectName
}
=
props
return
(
<
div
return
(
<
div
style
=
{{
style
=
{{
position
:
'relative'
,
position
:
"relative"
,
width
:
'100%'
,
width
:
"100%"
,
height
:
'100%'
,
height
:
"100%"
}}
}}
>
>
<
Preview
projectName
=
{
projectName
}
/
>
<
Preview
projectName
=
{
projectName
}
loadedHook
=
{
loadedHook
}
sceneLoadedHook
=
{
sceneLoadedHook
}
/
>
<
/div>
)
<
/div
>
}
);
};
export
default
Krpano
export
default
Krpano
;
\ No newline at end of file
src/pages/user/login/template/project/suzhou/index.js
View file @
17f4cec2
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*/
*/
import
React
,
{
forwardRef
,
useEffect
,
useRef
,
useState
}
from
'react'
;
import
React
,
{
forwardRef
,
useEffect
,
useRef
,
useState
}
from
'react'
;
import
{
CaretUpOutlined
,
CaretDownOutlined
}
from
'@ant-design/icons'
;
import
{
Modal
,
Popover
}
from
'antd'
;
import
{
Modal
,
Popover
}
from
'antd'
;
import
{
Helmet
,
HelmetProvider
}
from
'react-helmet-async'
;
import
{
Helmet
,
HelmetProvider
}
from
'react-helmet-async'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
...
@@ -39,7 +39,11 @@ const Login = forwardRef((props, _ref) => {
...
@@ -39,7 +39,11 @@ const Login = forwardRef((props, _ref) => {
const
isValidate
=
true
;
const
isValidate
=
true
;
const
loginFormRef
=
useRef
();
const
loginFormRef
=
useRef
();
const
formRef
=
useRef
(
null
);
const
formRef
=
useRef
(
null
);
const
krpanoObjRef
=
useRef
(
null
);
const
krpanoRef
=
useRef
(
null
);
const
krpanoSceneIdRef
=
useRef
(
localStorage
.
getItem
(
'loginKrpanoSceneId'
));
const
[
status
,
setStatus
]
=
useState
(
'normal'
);
const
[
status
,
setStatus
]
=
useState
(
'normal'
);
const
[
showList
,
setShowList
]
=
useState
(
true
);
const
[
autoLogin
,
setAutoLogin
]
=
useState
(
false
);
const
[
autoLogin
,
setAutoLogin
]
=
useState
(
false
);
const
[
submitting
,
setSubmitting
]
=
useState
(
false
);
const
[
submitting
,
setSubmitting
]
=
useState
(
false
);
const
[
type
,
setType
]
=
useState
(
'Account'
);
const
[
type
,
setType
]
=
useState
(
'Account'
);
...
@@ -48,6 +52,7 @@ const Login = forwardRef((props, _ref) => {
...
@@ -48,6 +52,7 @@ const Login = forwardRef((props, _ref) => {
const
[
action
,
setAction
]
=
useState
(()
=>
new
LoginAction
(
Object
.
assign
({},
props
,
{
history
}),
setVisible
,
false
));
const
[
action
,
setAction
]
=
useState
(()
=>
new
LoginAction
(
Object
.
assign
({},
props
,
{
history
}),
setVisible
,
false
));
const
[
dateObj
,
setDateObj
]
=
useState
({});
const
[
dateObj
,
setDateObj
]
=
useState
({});
const
{
projectName
}
=
props
.
loginParams
;
const
{
projectName
}
=
props
.
loginParams
;
const
[
tabShow
,
setTabShow
]
=
useState
(
false
);
const
handleSubmit
=
values
=>
{
const
handleSubmit
=
values
=>
{
/* eslint-disable */
/* eslint-disable */
action
&&
action
&&
...
@@ -141,7 +146,26 @@ const Login = forwardRef((props, _ref) => {
...
@@ -141,7 +146,26 @@ const Login = forwardRef((props, _ref) => {
}
}
return
weekDayName
;
return
weekDayName
;
};
};
const
onChangeShow
=
()
=>
{
setShowList
(
!
showList
);
};
const
loadedHook
=
({
krpanoSwfObject
,
krpano
,
json
,
eventEmitter
})
=>
{
krpanoObjRef
.
current
=
krpanoSwfObject
;
if
(
krpanoSceneIdRef
.
current
&&
krpanoObjRef
.
current
)
{
krpanoSwfObject
.
callKrpano
(
`autorotate.interrupt();loadscene(
${
krpanoSceneIdRef
.
current
}
,null, MERGE, BLEND(1.0))`
,
);
}
krpanoRef
.
current
=
krpano
;
window
.
krpano
=
krpano
;
setTabShow
(
true
);
};
const
sceneLoadedHook
=
scenename
=>
{
if
(
krpanoRef
.
current
)
{
const
id
=
krpanoRef
.
current
.
get
(
'xml.scene'
);
localStorage
.
setItem
(
'loginKrpanoSceneId'
,
id
||
null
);
}
};
useEffect
(()
=>
{
useEffect
(()
=>
{
const
timer
=
setInterval
(()
=>
{
const
timer
=
setInterval
(()
=>
{
setDateObj
({
setDateObj
({
...
@@ -212,14 +236,30 @@ const Login = forwardRef((props, _ref) => {
...
@@ -212,14 +236,30 @@ const Login = forwardRef((props, _ref) => {
<
/QueueAnim
>
<
/QueueAnim
>
<
/div
>
<
/div
>
{
/* <div className={styles['copyright']}>
{
/* <div className={styles['copyright']}>
Copyright ©
重庆泽足
水务投资建设有限公司All Rights Reserved{' '}
Copyright ©水务投资建设有限公司All Rights Reserved{' '}
<a target="_blank" id="IndexCaseNumber" href="https://
beian.miit.gov.cn
">
<a target="_blank" id="IndexCaseNumber" href="https://">
渝ICP备
20000008号-2
渝ICP备
</a>
</a>
</div> */
}
</div> */
}
<
/div
>
<
/div
>
<
div
className
=
{
styles
[
'krpano'
]}
>
<
div
className
=
{
classnames
(
styles
[
'krpano'
],
'suzhou_krpano'
,
!
showList
?
'suzhou_hideList'
:
''
)}
>
<
Krpano
projectName
=
{
projectName
}
/
>
{
tabShow
?
(
<
div
className
=
{
classnames
(
styles
.
krpano_btn
,
'krpano_btn'
)}
onClick
=
{
onChangeShow
}
>
{
showList
?
(
<
CaretDownOutlined
className
=
{
styles
.
krpano_btn_icon
}
/
>
)
:
(
<
CaretUpOutlined
className
=
{
styles
.
krpano_btn_icon
}
/
>
)}
切换全景
<
/div
>
)
:
null
}
<
Krpano
projectName
=
{
projectName
}
style
=
{{
background
:
'#fff'
}}
loadedHook
=
{
loadedHook
}
sceneLoadedHook
=
{
sceneLoadedHook
}
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/HelmetProvider
>
<
/HelmetProvider
>
...
...
src/pages/user/login/template/project/suzhou/index.less
View file @
17f4cec2
...
@@ -290,4 +290,57 @@
...
@@ -290,4 +290,57 @@
background-color: #fff;
background-color: #fff;
}
}
}
}
.suzhou_krpano {
.panda-krpano-es-preview-footer-footer-footerContainer .panda-krpano-es-preview-footer-footer-mask {
bottom: 0;
background: linear-gradient(0deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4) 70%, rgba(0, 99, 163, 0.6))
}
.panda-krpano-es-preview-menu-menu-itemIcon{
display: none!important;
}
}
.suzhou_hideList {
.panda-krpano-es-preview-footer-footer-footerContainer .panda-krpano-es-preview-footer-footer-mask {
bottom: -130px;
transition: all 0.3s;
}
.krpano_btn {
bottom: 0px !important;
transition: all 0.3s;
}
}
}
.krpano {
.krpano_btn {
position: absolute;
bottom: 108px;
width: 130px;
height: 32px;
font-weight: bold;
font-size: 14px;
color: #FFFFFF;
text-align: center;
line-height: 32px;
left: calc(50% - 65px);
background: url(./images/展开bg.png) no-repeat center center !important;
background-size: 100% 100%;
z-index: 1000;
cursor: pointer;
}
.krpano_btn:active {
opacity: 0.8;
}
.krpano_btn_icon {
color: #fff;
margin-right: 3px;
}
}
}
\ No newline at end of file
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