Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
holo-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
xinkong
holo-web
Commits
fef3b6dd
Commit
fef3b6dd
authored
Dec 18, 2023
by
ninglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除蒙自大屏路由拦截 修改大屏自适应方案
parent
e8ee156e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
42 deletions
+41
-42
App.vue
wj-data-vision-new/src/App.vue
+38
-39
permission.js
wj-data-vision-new/src/permission.js
+3
-3
No files found.
wj-data-vision-new/src/App.vue
View file @
fef3b6dd
<
template
>
<div
class=
"full-w full-h situation-main screen"
id=
"screen"
>
<
vision-header
/
>
<
!--
<vision-header
/>
--
>
<router-view
class=
"router-view-main"
/>
</div>
</
template
>
...
...
@@ -17,40 +17,39 @@ export default {
computed
:
{},
created
()
{},
mounted
()
{
window
.
onkeydown
=
()
=>
{
// alt + e 编辑
if
(
event
.
ctrlKey
&&
event
.
altKey
&&
event
.
keyCode
===
69
)
{
this
.
$store
.
commit
(
"
troggleEditorStatus
"
);
}
// alt + 1
if
(
event
.
altKey
&&
event
.
keyCode
===
49
)
{
this
.
$router
.
push
(
"
/home
"
);
}
// alt + 2
if
(
event
.
altKey
&&
event
.
keyCode
===
50
)
{
this
.
$router
.
push
(
"
/situation0
"
);
}
// alt + 3
if
(
event
.
altKey
&&
event
.
keyCode
===
51
)
{
this
.
$router
.
push
(
"
/situation1
"
);
}
// alt + 4
if
(
event
.
altKey
&&
event
.
keyCode
===
52
)
{
this
.
$router
.
push
(
"
/situation2
"
);
}
// alt + 5
if
(
event
.
altKey
&&
event
.
keyCode
===
53
)
{
this
.
$router
.
push
(
"
/situation3
"
);
}
};
this
.
handleScreenAuto
();
window
.
onresize
=
()
=>
this
.
handleScreenAuto
();
//
window.onkeydown = () => {
//
// alt + e 编辑
//
if (event.ctrlKey && event.altKey && event.keyCode === 69) {
//
this.$store.commit("troggleEditorStatus");
//
}
//
// alt + 1
//
if (event.altKey && event.keyCode === 49) {
//
this.$router.push("/home");
//
}
//
// alt + 2
//
if (event.altKey && event.keyCode === 50) {
//
this.$router.push("/situation0");
//
}
//
// alt + 3
//
if (event.altKey && event.keyCode === 51) {
//
this.$router.push("/situation1");
//
}
//
// alt + 4
//
if (event.altKey && event.keyCode === 52) {
//
this.$router.push("/situation2");
//
}
//
// alt + 5
//
if (event.altKey && event.keyCode === 53) {
//
this.$router.push("/situation3");
//
}
//
};
//
this.handleScreenAuto();
//
window.onresize = () => this.handleScreenAuto();
},
methods
:
{
handleScreenAuto
()
{
const
designDraftWidth
=
this
.
$store
.
state
.
dataset
.
clientWidth
||
3840
;
//设计稿的宽度
const
designDraftHeight
=
this
.
$store
.
state
.
dataset
.
clientHeight
||
1728
;
//设计稿的高度
console
.
log
(
'
hhhhhhhhh
'
,
designDraftWidth
,
designDraftHeight
);
document
.
querySelector
(
"
#screen
"
).
style
.
width
=
`
${
designDraftWidth
}
px`
;
document
.
querySelector
(
"
#screen
"
).
style
.
height
=
`
${
designDraftHeight
}
px`
;
// 根据屏幕的变化适配的比例
...
...
@@ -91,13 +90,13 @@ export default {
height: 100%;
}
}
.screen {
width: 3840px;
height: 1728px;
display: inline-block;
transform-origin: 0 0;
position: absolute;
left: 50%;
top: 50%;
}
//
.screen {
//
width: 3840px;
//
height: 1728px;
//
display: inline-block;
//
transform-origin: 0 0;
//
position: absolute;
//
left: 50%;
//
top: 50%;
//
}
</
style
>
wj-data-vision-new/src/permission.js
View file @
fef3b6dd
...
...
@@ -18,8 +18,8 @@ router.beforeEach((to, from, next) => {
// // }
// // }
// });
const
parentId
=
"
1783337E5E9547B6A6E99C60443B90A2
"
;
queryMenu
({
parentId
:
parentId
,
isRecursion
:
true
}).
then
((
res
)
=>
{
//
const parentId = "1783337E5E9547B6A6E99C60443B90A2";
//
queryMenu({ parentId: parentId, isRecursion: true }).then((res) => {
// console.log('res',res);
// let routes = res.content;
// for (let route of routes) {
...
...
@@ -27,6 +27,6 @@ router.beforeEach((to, from, next) => {
next
();
// }
// }
});
//
});
}
});
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