Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
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
Damon
study
Commits
7a420c89
Commit
7a420c89
authored
Jul 29, 2021
by
linwenqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:证书更新时间
parent
3f1b73f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
17 deletions
+43
-17
detail.vue
src/pages/cert/detail.vue
+17
-10
cert.vue
src/pages/index/cert.vue
+26
-7
No files found.
src/pages/cert/detail.vue
View file @
7a420c89
...
...
@@ -48,6 +48,7 @@ export default {
learnData
:
{},
certName
:
[],
topImage
:
process
.
uniEnv
.
qn_base_url
+
'tezhongzuoyepingtai@2x.png'
,
logDate
:
null
,
}
},
onLoad
:
function
()
{
...
...
@@ -55,16 +56,21 @@ export default {
},
computed
:
{
nowDate
()
{
var
Today
=
new
Date
()
let
m
=
Today
.
getMonth
()
+
1
let
d
=
Today
.
getDate
()
return
(
Today
.
getFullYear
()
+
'.'
+
(
String
(
m
).
length
>
1
?
m
:
'0'
+
m
)
+
'.'
+
(
String
(
d
).
length
>
1
?
d
:
'0'
+
d
)
)
if
(
this
.
logDate
)
{
console
.
log
(
'取数据的日期'
)
return
this
.
logDate
.
split
(
' '
)[
0
].
replace
(
'-'
,
'.'
)
}
else
{
var
Today
=
new
Date
()
let
m
=
Today
.
getMonth
()
+
1
let
d
=
Today
.
getDate
()
return
(
Today
.
getFullYear
()
+
'.'
+
(
String
(
m
).
length
>
1
?
m
:
'0'
+
m
)
+
'.'
+
(
String
(
d
).
length
>
1
?
d
:
'0'
+
d
)
)
}
},
startDate
()
{
return
this
.
learnData
.
startDate
||
' '
...
...
@@ -127,6 +133,7 @@ export default {
countryData
[
k
][
key
].
push
(
list
[
key
][
'filedValue_'
+
i
])
}
}
this
.
logDate
=
certData
[
k
].
logDate
||
null
}
this
.
certName
=
certName
this
.
dataList
=
countryData
...
...
src/pages/index/cert.vue
View file @
7a420c89
...
...
@@ -143,6 +143,7 @@ export default {
name
:
'我的证书'
,
},
],
logTime
:
null
,
certType
:
''
,
certId
:
''
,
certName
:
''
,
...
...
@@ -182,13 +183,13 @@ export default {
this
.
checkType
=
'特种作业操作证查询'
},
onShow
:
function
(
param
)
{
try
{
if
(
param
.
tabs
)
{
this
.
current
=
param
.
tabs
this
.
swiperCurrent
=
param
.
tabs
}
}
catch
(
e
)
{}
this
.
tabsChange
(
this
.
current
)
//
try {
//
if (param.tabs) {
//
this.current = param.tabs
//
this.swiperCurrent = param.tabs
//
}
//
} catch (e) {}
//
this.tabsChange(this.current)
},
methods
:
{
submit
(){
...
...
@@ -237,21 +238,28 @@ export default {
}
this
.
isEmptyList
=
true
let
data
=
[]
let
logDate
=
'2000-01-01 00:00:00'
for
(
let
key
in
res
){
//判断是否是table数据格式,否则暂不展示,后面如果有再补充显示图片格式
if
(
Number
(
res
[
key
].
certificateType
)
!=
2
){
continue
}
//获取最新查询时间当做最近登录查询时间
this
.
logTime
=
this
.
compareDate
(
logDate
,
res
[
key
].
updateTime
)
let
item
=
{}
item
.
certificateName
=
res
[
key
].
certificateName
.
replace
(
'作业'
,
'证'
)
item
.
bgImage
=
this
.
countryCertImage
item
.
type
=
'country'
item
.
key
=
key
item
.
data
=
res
[
key
]
//传给详情页
item
.
logDate
=
this
.
logTime
data
.
push
(
item
)
}
this
.
logTime
=
logDate
this
.
countryCertList
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
console
.
log
(
'list data'
,
this
.
countryCertList
)
})
},
//获取学时数据
...
...
@@ -302,6 +310,17 @@ export default {
})
}
},
compareDate
(
date1
,
date2
){
var
oDate1
=
new
Date
(
date1
)
var
oDate2
=
new
Date
(
date2
)
if
(
oDate1
.
getTime
()
>
oDate2
.
getTime
()){
return
date1
// console.log('第一个大')
}
else
{
return
date2
// console.log('第二个大')
}
},
actionSheetCallback
(
index
)
{
this
.
value
=
this
.
actionSheetList
[
index
].
text
},
...
...
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