Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BCDH-APP
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
首开风险隐患双控平台
BCDH-APP
Commits
d519b1e1
Commit
d519b1e1
authored
Aug 05, 2022
by
王李辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ios高度适配和时间格式化问题
parent
23747f2d
Pipeline
#8678
passed with stage
in 5 minutes and 15 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
16 deletions
+44
-16
src/App.vue
src/App.vue
+30
-8
src/utils/format.js
src/utils/format.js
+2
-2
src/views/danger/dangerPatrol/dangerPatrolTime/index.vue
src/views/danger/dangerPatrol/dangerPatrolTime/index.vue
+8
-3
src/views/danger/dangerPatrol/implement/index.vue
src/views/danger/dangerPatrol/implement/index.vue
+2
-2
vue.config.js
vue.config.js
+2
-1
No files found.
src/App.vue
View file @
d519b1e1
...
@@ -9,7 +9,8 @@
...
@@ -9,7 +9,8 @@
-->
-->
<
template
>
<
template
>
<div
id=
"app"
>
<div
id=
"app"
>
<div
:style=
"
{ height: showTab ?appHeight:'100%' }" id="app-content">
<!-- :style="
{ height: showTab ?appHeight:'100%' }" 之前是给id为app-content 设置的内联样式 id="app-content" -->
<div>
<transition
:name=
"transitionName"
>
<transition
:name=
"transitionName"
>
<keep-alive
:include=
"cachePage"
>
<keep-alive
:include=
"cachePage"
>
<router-view
class=
"router-view"
/>
<router-view
class=
"router-view"
/>
...
@@ -111,17 +112,21 @@ export default {
...
@@ -111,17 +112,21 @@ export default {
<
style
lang=
"less"
>
<
style
lang=
"less"
>
body{
background-color: #f0f1f5;
}
#app {
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-moz-osx-font-smoothing: grayscale;
// text-align: center;
// text-align: center;
color: #2c3e50;
color: #2c3e50;
box-sizing: border-box;
// box-sizing: border-box;
overflow: hidden;
// overflow: hidden;
position: relative;
// position: relative;
overflow: hidden;
// overflow: hidden;
height: 100vh;
// height: 100vh;
// background-color: #f0f1f5;
// z-index:999999999999
// z-index:999999999999
}
}
#app-content {
#app-content {
...
@@ -132,18 +137,35 @@ export default {
...
@@ -132,18 +137,35 @@ export default {
top: 0;
top: 0;
width: 100%;
width: 100%;
overflow: hidden;
overflow: hidden;
// padding-bottom: 1.3333rem;
height: 100%; // 此处新增height 为了解决ios适配问题
}
}
.router-view {
.router-view {
// width: 100%;
// height: 100%;
// position: absolute;
// top: 0;
// bottom: 0;
// margin: 0 auto;
// -webkit-overflow-scrolling: touch;
// background-color: #f0f1f5;
// overflow: auto;
width: 100%;
width: 100%;
height: auto;
height: auto;
-webkit-overflow-scrolling: touch;
background-color: #f0f1f5;
overflow: auto;
position: absolute;
position: absolute;
top: 0;
top: 0;
bottom: 0;
bottom: 0;
margin: 0 auto;
margin: 0 auto;
-webkit-overflow-scrolling: touch;
-webkit-overflow-scrolling: touch;
background-color: #f0f1f5
;
padding-bottom: 50px
;
overflow: auto
;
box-sizing: border-box
;
}
}
.slide-right-enter-active,
.slide-right-enter-active,
...
...
src/utils/format.js
View file @
d519b1e1
export
function
timestampToTime
(
time
,
type
,
zero
,
num
)
{
export
function
timestampToTime
(
time
,
type
,
zero
,
num
)
{
if
(
!
time
){
return
''
}
if
(
!
time
){
return
''
}
try
{
try
{
var
date
=
new
Date
(
time
)
var
date
=
new
Date
(
time
.
toString
().
replace
(
/-/g
,
"
/
"
)
)
if
(
num
&&
typeof
parseInt
(
num
)
==
"
number
"
){
if
(
num
&&
typeof
parseInt
(
num
)
==
"
number
"
){
date
=
new
Date
(
new
Date
(
time
).
getTime
()
+
num
*
60
*
60
*
24
*
1000
)
//时间戳以毫秒为单位,也可用其他日期格式
date
=
new
Date
(
new
Date
(
time
.
toString
().
replace
(
/-/g
,
"
/
"
)
).
getTime
()
+
num
*
60
*
60
*
24
*
1000
)
//时间戳以毫秒为单位,也可用其他日期格式
}
}
let
yy
=
date
.
getFullYear
();
//年
let
yy
=
date
.
getFullYear
();
//年
let
mm
=
date
.
getMonth
()
+
1
;
//月
let
mm
=
date
.
getMonth
()
+
1
;
//月
...
...
src/views/danger/dangerPatrol/dangerPatrolTime/index.vue
View file @
d519b1e1
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
<div
class=
"icon_wrap_text"
>
<div
class=
"icon_wrap_text"
>
<div
class=
"icon_wrap_text1"
>
{{
item
.
content
}}
</div>
<div
class=
"icon_wrap_text1"
>
{{
item
.
content
}}
</div>
<span
class=
"icon_wrap_text2"
v-if=
"item.content=='日查清单'"
>
{{
util
.
timestampToTime
(
item
.
startTime
,
'
DT7
'
,
true
)
}}
</span>
<span
class=
"icon_wrap_text2"
v-if=
"item.content=='日查清单'"
>
{{
item
.
startTime
|
formatDate
}}
</span>
<span
class=
"icon_wrap_text2"
v-else
>
{{
util
.
timestampToTime
(
item
.
startTime
,
'
DT7
'
,
true
)
}}
至
{{
util
.
timestampToTime
(
item
.
validityTime
,
'
DT7
'
,
true
)
}}
</span>
<span
class=
"icon_wrap_text2"
v-else
>
{{
item
.
startTime
|
formatDate
}}
至
{{
item
.
validityTime
|
formatDate
}}
</span>
</div>
</div>
</div>
</div>
...
@@ -129,7 +129,12 @@ export default {
...
@@ -129,7 +129,12 @@ export default {
}
}
});
});
}
}
}
},
filters
:
{
formatDate
(
time
)
{
return
timestampToTime
(
time
,
"
DT7
"
,
true
)
}
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
...
src/views/danger/dangerPatrol/implement/index.vue
View file @
d519b1e1
...
@@ -426,9 +426,9 @@ export default {
...
@@ -426,9 +426,9 @@ export default {
}
}
.operation-btn {
.operation-btn {
width: 95%;
width: 95%;
margin: 10px 10px;
margin:
20px
10px 10px;
position: fixed;
position: fixed;
bottom:
50px
;
bottom:
1.3333rem
;
right: 0;
right: 0;
left: 0;
left: 0;
}
}
...
...
vue.config.js
View file @
d519b1e1
...
@@ -5,7 +5,8 @@ module.exports = {
...
@@ -5,7 +5,8 @@ module.exports = {
proxy
:
{
proxy
:
{
'
/app-api
'
:
{
'
/app-api
'
:
{
// target: 'http://192.168.0.108:8096',
// target: 'http://192.168.0.108:8096',
target
:
'
http://192.168.15.146:8096
'
,
target
:
'
http://192.168.124.7:8096
'
,
// target: 'http://192.168.15.169:8096',
// changeOrigin: true,
// changeOrigin: true,
// logLevel:'debug',
// logLevel:'debug',
}
}
...
...
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