Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-record
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6b1e2aae
authored
Nov 09, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加时间格式
1 parent
e8eebc08
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
src/base.js
src/views/customer/operations/index.vue
src/base.js
View file @
6b1e2aa
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-11-08 10:23:20
* @Date: 2022-11-08 10:23:20
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2022-11-09 1
5:09:29
* @LastEditTime: 2022-11-09 1
6:42:11
*/
*/
// The Vue build version to load with the `import` command
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
...
@@ -78,6 +78,23 @@ var mixin = {
...
@@ -78,6 +78,23 @@ var mixin = {
}
}
}
}
}
}
Date
.
prototype
.
format
=
function
(
fmt
)
{
let
o
=
{
"M+"
:
this
.
getMonth
()
+
1
,
//月份
"d+"
:
this
.
getDate
(),
//日
"h+"
:
this
.
getHours
(),
//小时
"m+"
:
this
.
getMinutes
(),
//分
"s+"
:
this
.
getSeconds
(),
//秒
//季度
"q+"
:
Math
.
floor
((
this
.
getMonth
()
+
3
)
/
3
),
"S"
:
this
.
getMilliseconds
()
//毫秒
}
if
(
/
(
y+
)
/
.
test
(
fmt
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
this
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
))
for
(
let
k
in
o
)
{
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
fmt
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
RegExp
.
$1
.
length
==
1
)
?
(
o
[
k
])
:
((
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
)))
}
return
fmt
}
const
URL
=
const
URL
=
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
const
getConfig
=
(
url
=
URL
+
'/record-config'
)
=>
{
const
getConfig
=
(
url
=
URL
+
'/record-config'
)
=>
{
...
...
src/views/customer/operations/index.vue
View file @
6b1e2aa
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-11-08 10:38:40
* @Date: 2022-11-08 10:38:40
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2022-11-09 16:
12:42
* @LastEditTime: 2022-11-09 16:
43:50
-->
-->
<
template
>
<
template
>
<div
class=
"table-box"
>
<div
class=
"table-box"
>
...
@@ -54,7 +54,7 @@ export default {
...
@@ -54,7 +54,7 @@ export default {
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
if
(
cellValue
.
createTime
)
{
if
(
cellValue
.
createTime
)
{
return
new
Date
(
cellValue
.
createTime
).
format
(
return
new
Date
(
cellValue
.
createTime
).
format
(
'yyyy-MM-dd
HH
:mm:ss'
'yyyy-MM-dd
hh
:mm:ss'
)
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment