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
b9f395ff
Commit
b9f395ff
authored
Apr 17, 2023
by
张牧越
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
32511e2e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
18 deletions
+31
-18
App.vue
src/App.vue
+2
-3
index.js
src/api/index.js
+6
-0
Index.vue
src/components/Index.vue
+15
-1
Index.vue
src/components/construction/Index.vue
+4
-10
request.js
src/utils/request.js
+4
-4
No files found.
src/App.vue
View file @
b9f395ff
...
@@ -10,9 +10,8 @@ export default {
...
@@ -10,9 +10,8 @@ export default {
components
:
{},
components
:
{},
methods
:
{},
methods
:
{},
mounted
()
{
mounted
()
{
if
(
this
.
$route
.
query
.
token
)
{
if
(
this
.
$route
.
query
.
token_code
)
{
localStorage
.
setItem
(
"token"
,
this
.
$route
.
query
.
token
);
localStorage
.
setItem
(
"token"
,
this
.
$route
.
query
.
token_code
);
// this.$router.push("/");
}
}
},
},
};
};
...
...
src/api/index.js
View file @
b9f395ff
import
request
from
"@/utils/request"
import
request
from
"@/utils/request"
export
function
getXAccessToken
(
token
)
{
return
request
({
url
:
`/pweb/s/token/
${
token
}
`
,
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 @
b9f395ff
...
@@ -29,12 +29,13 @@
...
@@ -29,12 +29,13 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div
v-if=
"signIn"
>
<router-view></router-view>
<router-view></router-view>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getXAccessToken
}
from
"@/api/index"
;
export
default
{
export
default
{
name
:
"Index"
,
name
:
"Index"
,
data
()
{
data
()
{
...
@@ -43,6 +44,7 @@ export default {
...
@@ -43,6 +44,7 @@ export default {
weekDay
:
""
,
weekDay
:
""
,
date
:
""
,
date
:
""
,
zoom
:
1
,
zoom
:
1
,
signIn
:
false
,
};
};
},
},
methods
:
{
methods
:
{
...
@@ -101,6 +103,16 @@ export default {
...
@@ -101,6 +103,16 @@ export default {
jumpBack
()
{
jumpBack
()
{
window
.
location
.
href
=
window
.
location
.
origin
+
"/pweb/m/"
;
window
.
location
.
href
=
window
.
location
.
origin
+
"/pweb/m/"
;
},
},
getXAccessToken
()
{
getXAccessToken
(
localStorage
.
getItem
(
"token"
)).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
localStorage
.
setItem
(
"Authorization"
,
res
.
data
.
access_token
);
this
.
$nextTick
(()
=>
{
this
.
signIn
=
true
;
});
}
});
},
},
},
computed
:
{
computed
:
{
token
()
{
token
()
{
...
@@ -110,7 +122,9 @@ export default {
...
@@ -110,7 +122,9 @@ export default {
mounted
()
{
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
bodyScale
();
this
.
bodyScale
();
this
.
getXAccessToken
();
});
});
this
.
getTime
();
this
.
getTime
();
setInterval
(()
=>
{
setInterval
(()
=>
{
this
.
getTime
();
this
.
getTime
();
...
...
src/components/construction/Index.vue
View file @
b9f395ff
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
<img
class=
"rt"
src=
"@/assets/rt.png"
alt=
""
/>
<img
class=
"rt"
src=
"@/assets/rt.png"
alt=
""
/>
<img
class=
"rb"
src=
"@/assets/rb.png"
alt=
""
/>
<img
class=
"rb"
src=
"@/assets/rb.png"
alt=
""
/>
<img
class=
"lb"
src=
"@/assets/lb.png"
alt=
""
/>
<img
class=
"lb"
src=
"@/assets/lb.png"
alt=
""
/>
<el-carousel
:interval=
"5000"
arrow=
"always"
height=
"
60
0px"
>
<el-carousel
:interval=
"5000"
arrow=
"always"
height=
"
52
0px"
>
<el-carousel-item
<el-carousel-item
v-for=
"(item, index) in screenDetail.plane_image_arr"
v-for=
"(item, index) in screenDetail.plane_image_arr"
:key=
"index"
:key=
"index"
...
@@ -486,13 +486,7 @@ export default {
...
@@ -486,13 +486,7 @@ export default {
});
});
getDeviceStatus
().
then
((
res
)
=>
{
getDeviceStatus
().
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
if
(
res
.
status
==
200
)
{
this
.
deviceStatus
=
res
.
data
.
map
((
item
)
=>
{
this
.
deviceStatus
=
res
.
data
;
return
{
...
item
,
icon_path
:
process
.
env
.
VUE_APP_RESOURCE_URL
+
"/"
+
item
.
icon_path
,
};
});
}
}
});
});
getProgressDetail
().
then
((
res
)
=>
{
getProgressDetail
().
then
((
res
)
=>
{
...
@@ -721,7 +715,7 @@ export default {
...
@@ -721,7 +715,7 @@ export default {
position: relative;
position: relative;
.container-img {
.container-img {
width: 100%;
width: 100%;
height:
calc(100vh - 500px)
;
height:
520px
;
vertical-align: top;
vertical-align: top;
}
}
.lt,
.lt,
...
@@ -784,7 +778,7 @@ export default {
...
@@ -784,7 +778,7 @@ export default {
}
}
}
}
.unit-scroll {
.unit-scroll {
max-height:
20
0px;
max-height:
16
0px;
overflow: scroll;
overflow: scroll;
}
}
.construction-status {
.construction-status {
...
...
src/utils/request.js
View file @
b9f395ff
...
@@ -41,9 +41,9 @@ const request = axios.create({
...
@@ -41,9 +41,9 @@ const request = axios.create({
request
.
interceptors
.
request
.
use
(
request
.
interceptors
.
request
.
use
(
config
=>
{
config
=>
{
const
token
=
localStorage
.
getItem
(
'toke
n'
)
const
Authorization
=
localStorage
.
getItem
(
'Authorizatio
n'
)
if
(
toke
n
)
{
if
(
Authorizatio
n
)
{
config
.
headers
[
'
token'
]
=
toke
n
config
.
headers
[
'
Authorization'
]
=
Authorizatio
n
}
}
showLoading
()
showLoading
()
return
config
return
config
...
@@ -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'
window
.
location
.
href
=
process
.
env
.
VUE_APP_RESOURCE_URL
+
'pweb/m/login'
}
}
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