Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
digital-construction
Project
Project
Details
Activity
Releases
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
张牧越
digital-construction
Commits
da344cd0
Commit
da344cd0
authored
Apr 17, 2023
by
张牧越
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
563dfdf0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
11 deletions
+53
-11
index.js
src/api/index.js
+7
-0
Index.vue
src/components/Index.vue
+45
-10
request.js
src/utils/request.js
+1
-1
No files found.
src/api/index.js
View file @
da344cd0
import
request
from
"@/utils/request"
import
request
from
"@/utils/request"
export
function
getXAccessToken
(
token
)
{
export
function
getXAccessToken
(
token
)
{
return
request
({
return
request
({
url
:
`/pweb/s/token/
${
token
}
`
,
url
:
`/pweb/s/token/
${
token
}
`
,
method
:
'get'
,
method
:
'get'
,
})
})
}
}
export
function
getBaseInfo
()
{
return
request
({
url
:
`/pweb/s/base`
,
method
:
'get'
,
})
}
export
function
getBaseData
()
{
export
function
getBaseData
()
{
return
request
({
return
request
({
url
:
'/pweb/s/project/basedata'
,
url
:
'/pweb/s/project/basedata'
,
...
...
src/components/Index.vue
View file @
da344cd0
...
@@ -5,19 +5,32 @@
...
@@ -5,19 +5,32 @@
<span
style=
"font-size: 14px; cursor: pointer"
@
click=
"jumpBack"
<span
style=
"font-size: 14px; cursor: pointer"
@
click=
"jumpBack"
>
工程项目后台管理系统
</span
>
工程项目后台管理系统
</span
>
>
<router-link
:to=
"
{ path: '/', query: { token_code: token } }" exact
<router-link
>数字工地
</router-link
v-for=
"(router, index) in leftNav"
:key=
"index"
:to=
"
{ path: router.menu_url, query: { token_code: token } }"
>
>
<router-link
to=
"/realname"
>
实名制
</router-link>
{{
router
.
right_name
}}
</router-link
<router-link
to=
"/supervisory"
>
视频监控
</router-link>
>
<router-link
to=
"/earlywarning"
>
AI预警
</router-link>
</div>
<div
class=
"mid-title"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"screenDetail.project_name"
placement=
"bottom"
>
<div
class=
"overflowed"
>
{{
screenDetail
.
short_name
}}
</div>
</el-tooltip>
</div>
</div>
<div
class=
"mid-title"
>
绍兴二院兰亭院区(康复医院)工程
</div>
<div
class=
"right-nav"
style=
"padding-left: 40px"
>
<div
class=
"right-nav"
>
<router-link
<router-link
to=
"/tower"
style=
"margin-left: 40px"
v-for=
"(router, index) in rightNav"
>
塔吊监测
</router-link
:key=
"index"
:to=
"
{ path: router.menu_url, query: { token_code: token } }"
>
{{
router
.
right_name
}}
</router-link
>
>
<router-link
to=
"/noise"
>
扬尘噪音
</router-link>
<div
class=
"clock"
>
<div
class=
"clock"
>
<div
class=
"time"
>
<div
class=
"time"
>
{{
time
}}
{{
time
}}
...
@@ -35,6 +48,7 @@
...
@@ -35,6 +48,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getBaseInfo
,
getBaseData
}
from
"@/api/index"
;
export
default
{
export
default
{
name
:
"Index"
,
name
:
"Index"
,
data
()
{
data
()
{
...
@@ -43,6 +57,11 @@ export default {
...
@@ -43,6 +57,11 @@ export default {
weekDay
:
""
,
weekDay
:
""
,
date
:
""
,
date
:
""
,
zoom
:
1
,
zoom
:
1
,
mainTitle
:
"绍兴二院兰亭院区(康复医院)工程绍兴二院兰亭院区(康复医院)工程绍兴二院兰亭院区(康复医院)工程绍兴二院兰亭院区(康复医院)工程"
,
screenDetail
:
{},
leftNav
:
[],
rightNav
:
[],
};
};
},
},
methods
:
{
methods
:
{
...
@@ -108,6 +127,16 @@ export default {
...
@@ -108,6 +127,16 @@ export default {
},
},
},
},
mounted
()
{
mounted
()
{
getBaseInfo
().
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
screenDetail
=
res
.
data
;
if
(
res
.
data
.
menu
.
length
>=
4
)
{
this
.
leftNav
=
res
.
data
.
menu
.
slice
(
0
,
4
);
this
.
rightNav
=
res
.
data
.
menu
.
slice
(
4
,
res
.
data
.
menu
.
length
);
}
else
{
this
.
leftNav
=
[...
res
.
data
.
menu
];
}
});
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
bodyScale
();
this
.
bodyScale
();
});
});
...
@@ -220,4 +249,10 @@ a {
...
@@ -220,4 +249,10 @@ a {
border-bottom: solid 6px #22c3ed;
border-bottom: solid 6px #22c3ed;
filter: drop-shadow(0px -1px 3px rgba(0, 234, 255, 0.8));
filter: drop-shadow(0px -1px 3px rgba(0, 234, 255, 0.8));
}
}
.overflowed {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
padding: 0 30px;
}
</
style
>
</
style
>
\ No newline at end of file
src/utils/request.js
View file @
da344cd0
...
@@ -64,7 +64,7 @@ request.interceptors.response.use(
...
@@ -64,7 +64,7 @@ request.interceptors.response.use(
})
})
}
}
if
(
response
.
data
.
status
==
401
)
{
if
(
response
.
data
.
status
==
401
)
{
window
.
location
.
href
=
process
.
env
.
VUE_APP_RESOURCE_URL
+
'pweb/m/login?is_screen=1'
//
window.location.href = process.env.VUE_APP_RESOURCE_URL + 'pweb/m/login?is_screen=1'
}
}
return
response
.
data
return
response
.
data
},
},
...
...
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