Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
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
lihuizhen
ec-report-refactor
Commits
ff621b41
Commit
ff621b41
authored
May 10, 2022
by
leon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://106.15.103.105/lihuizhen/ec-report-refactor
into develop
parents
d0669e4a
f72527c8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
1 deletion
+65
-1
.gitignore
.gitignore
+2
-1
DatePicker.vue
components/DatePicker/DatePicker.vue
+44
-0
index.vue
pages/index/index.vue
+19
-0
No files found.
.gitignore
View file @
ff621b41
unpackage
unpackage
unpackage/dist
unpackage/dist
uni_modules
\ No newline at end of file
components/DatePicker/DatePicker.vue
0 → 100644
View file @
ff621b41
<
template
>
<view
class=
"timer"
>
<NormalTitle
:elementInfo=
"elementInfo"
></NormalTitle>
<uni-datetime-picker
:type=
"elementInfo.option.dateTime.showTime ? 'datetime' : 'date'"
v-model=
"elementInfo.option.dateTime.date"
/>
</view>
</
template
>
<
script
>
export
default
{
name
:
"DatePicker"
,
props
:
{
elementInfo
:
{
type
:
Object
,
required
:
true
}
},
data
()
{
return
{
};
},
onReady
()
{
},
onUnLoad
()
{
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.timer
{
display
:
flex
;
flex-flow
:
column
;
justify-content
:
center
;
width
:
100%
;
color
:
#fff
;
}
</
style
>
pages/index/index.vue
View file @
ff621b41
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
zIndex: `${element.type == 'NormalTabs' ? 999999 : index + 1}`
zIndex: `${element.type == 'NormalTabs' ? 999999 : index + 1}`
}"
}"
>
>
<DatePicker
v-if=
"element.type == 'DateTimePicker'"
:elementInfo=
"element"
></DatePicker>
<!-- 普通柱状图 -->
<!-- 普通柱状图 -->
<NormalBar
v-if=
"element.type == 'NormalBar'"
:elementInfo=
"element"
></NormalBar>
<NormalBar
v-if=
"element.type == 'NormalBar'"
:elementInfo=
"element"
></NormalBar>
<!-- 普通折线图 -->
<!-- 普通折线图 -->
...
@@ -140,6 +141,19 @@
...
@@ -140,6 +141,19 @@
clearInterval
(
this
.
timename
)
clearInterval
(
this
.
timename
)
},
},
methods
:
{
methods
:
{
// 日期时间格式化
dateTimeFormat
(
val
){
let
date
=
new
Date
(
val
)
let
year
=
date
.
getFullYear
()
// 在日期格式中,月份是从0开始的,因此要加0,使用三元表达式在小于10的前面加0,以达到格式统一 如 09:11:05
let
month
=
date
.
getMonth
()
+
1
<
10
?
"0"
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
;
let
day
=
date
.
getDate
()
<
10
?
"0"
+
date
.
getDate
()
:
date
.
getDate
();
let
hours
=
date
.
getHours
()
<
10
?
"0"
+
date
.
getHours
()
:
date
.
getHours
();
let
minutes
=
date
.
getMinutes
()
<
10
?
"0"
+
date
.
getMinutes
()
:
date
.
getMinutes
();
let
seconds
=
date
.
getSeconds
()
<
10
?
"0"
+
date
.
getSeconds
()
:
date
.
getSeconds
();
// 拼接
return
year
+
"-"
+
month
+
"-"
+
day
+
" "
+
hours
+
":"
+
minutes
+
":"
+
seconds
;
},
/**
/**
* 递归 - 隐藏子项为NormalTabs的所有关联组件
* 递归 - 隐藏子项为NormalTabs的所有关联组件
*/
*/
...
@@ -208,6 +222,11 @@
...
@@ -208,6 +222,11 @@
},
parseInt
(
info
.
dataPollingInterval
)
*
1000
)
},
parseInt
(
info
.
dataPollingInterval
)
*
1000
)
}
}
}
}
res
.
data
.
Result
.
list
.
forEach
(
item
=>
{
if
(
item
.
type
===
'DateTimePicker'
)
{
item
.
option
.
dateTime
.
date
=
this
.
dateTimeFormat
(
item
.
option
.
dateTime
.
date
)
}
})
that
.
reportInfo
=
res
.
data
.
Result
that
.
reportInfo
=
res
.
data
.
Result
}
}
},
},
...
...
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