Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cocktail-party-server
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
cocktail-party
cocktail-party-server
Commits
319dfc2d
提交
319dfc2d
authored
10月 09, 2019
作者:
RuoYi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改函数命名防止冲突
上级
3ba458b1
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
52 行增加
和
40 行删除
+52
-40
main.js
ruoyi-ui/src/main.js
+2
-2
ruoyi.js
ruoyi-ui/src/utils/ruoyi.js
+38
-26
index.vue
ruoyi-ui/src/views/monitor/logininfor/index.vue
+1
-1
index.vue
ruoyi-ui/src/views/monitor/operlog/index.vue
+2
-2
index.vue
ruoyi-ui/src/views/system/config/index.vue
+1
-1
index.vue
ruoyi-ui/src/views/system/dept/index.vue
+1
-1
data.vue
ruoyi-ui/src/views/system/dict/data.vue
+1
-1
index.vue
ruoyi-ui/src/views/system/dict/index.vue
+1
-1
index.vue
ruoyi-ui/src/views/system/menu/index.vue
+1
-1
index.vue
ruoyi-ui/src/views/system/notice/index.vue
+1
-1
index.vue
ruoyi-ui/src/views/system/post/index.vue
+1
-1
index.vue
ruoyi-ui/src/views/system/role/index.vue
+1
-1
index.vue
ruoyi-ui/src/views/system/user/index.vue
+1
-1
没有找到文件。
ruoyi-ui/src/main.js
浏览文件 @
319dfc2d
...
@@ -18,13 +18,13 @@ import './assets/icons' // icon
...
@@ -18,13 +18,13 @@ import './assets/icons' // icon
import
'./permission'
// permission control
import
'./permission'
// permission control
import
{
getDicts
}
from
"@/api/system/dict/data"
;
import
{
getDicts
}
from
"@/api/system/dict/data"
;
import
{
getConfigKey
}
from
"@/api/system/config"
;
import
{
getConfigKey
}
from
"@/api/system/config"
;
import
{
dateFormat
,
resetForm
,
addDateRange
,
selectDictLabel
}
from
"@/utils/ruoyi"
;
import
{
parseTime
,
resetForm
,
addDateRange
,
selectDictLabel
}
from
"@/utils/ruoyi"
;
import
Pagination
from
"@/components/Pagination"
;
import
Pagination
from
"@/components/Pagination"
;
// 全局方法挂载
// 全局方法挂载
Vue
.
prototype
.
getDicts
=
getDicts
Vue
.
prototype
.
getDicts
=
getDicts
Vue
.
prototype
.
getConfigKey
=
getConfigKey
Vue
.
prototype
.
getConfigKey
=
getConfigKey
Vue
.
prototype
.
dateFormat
=
dateFormat
Vue
.
prototype
.
parseTime
=
parseTime
Vue
.
prototype
.
resetForm
=
resetForm
Vue
.
prototype
.
resetForm
=
resetForm
Vue
.
prototype
.
addDateRange
=
addDateRange
Vue
.
prototype
.
addDateRange
=
addDateRange
Vue
.
prototype
.
selectDictLabel
=
selectDictLabel
Vue
.
prototype
.
selectDictLabel
=
selectDictLabel
...
...
ruoyi-ui/src/utils/ruoyi.js
浏览文件 @
319dfc2d
...
@@ -4,12 +4,42 @@
...
@@ -4,12 +4,42 @@
*/
*/
// 日期格式化
// 日期格式化
export
function
dateFormat
(
date
,
pattern
)
{
export
function
parseTime
(
time
,
pattern
)
{
var
d
=
new
Date
(
date
).
Format
(
"yyyy-MM-dd hh:mm:ss"
);
if
(
arguments
.
length
===
0
)
{
if
(
pattern
)
{
return
null
d
=
new
Date
(
date
).
Format
(
pattern
);
}
}
const
format
=
pattern
||
'{y}-{m}-{d} {h}:{i}:{s}'
return
d
.
toLocaleString
();
let
date
if
(
typeof
time
===
'object'
)
{
date
=
time
}
else
{
if
((
typeof
time
===
'string'
)
&&
(
/^
[
0-9
]
+$/
.
test
(
time
)))
{
time
=
parseInt
(
time
)
}
if
((
typeof
time
===
'number'
)
&&
(
time
.
toString
().
length
===
10
))
{
time
=
time
*
1000
}
date
=
new
Date
(
time
)
}
const
formatObj
=
{
y
:
date
.
getFullYear
(),
m
:
date
.
getMonth
()
+
1
,
d
:
date
.
getDate
(),
h
:
date
.
getHours
(),
i
:
date
.
getMinutes
(),
s
:
date
.
getSeconds
(),
a
:
date
.
getDay
()
}
const
time_str
=
format
.
replace
(
/{
(
y|m|d|h|i|s|a
)
+}/g
,
(
result
,
key
)
=>
{
let
value
=
formatObj
[
key
]
// Note: getDay() returns 0 on Sunday
if
(
key
===
'a'
)
{
return
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
][
value
]
}
if
(
result
.
length
>
0
&&
value
<
10
)
{
value
=
'0'
+
value
}
return
value
||
0
})
return
time_str
}
}
// 表单重置
// 表单重置
...
@@ -55,22 +85,4 @@ export function sprintf(str) {
...
@@ -55,22 +85,4 @@ export function sprintf(str) {
return
arg
;
return
arg
;
});
});
return
flag
?
str
:
''
;
return
flag
?
str
:
''
;
}
}
\ No newline at end of file
Date
.
prototype
.
Format
=
function
(
fmt
)
{
var
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
(
var
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
;
}
\ No newline at end of file
ruoyi-ui/src/views/monitor/logininfor/index.vue
浏览文件 @
319dfc2d
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<el-table-column
label=
"操作信息"
align=
"center"
prop=
"msg"
/>
<el-table-column
label=
"操作信息"
align=
"center"
prop=
"msg"
/>
<el-table-column
label=
"登录日期"
align=
"center"
prop=
"loginTime"
width=
"180"
>
<el-table-column
label=
"登录日期"
align=
"center"
prop=
"loginTime"
width=
"180"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
dateFormat
(
scope
.
row
.
loginTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
loginTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
ruoyi-ui/src/views/monitor/operlog/index.vue
浏览文件 @
319dfc2d
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
<el-table-column
label=
"操作状态"
align=
"center"
prop=
"status"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"操作状态"
align=
"center"
prop=
"status"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"操作日期"
align=
"center"
prop=
"operTime"
width=
"180"
>
<el-table-column
label=
"操作日期"
align=
"center"
prop=
"operTime"
width=
"180"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
dateFormat
(
scope
.
row
.
operTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
operTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"操作时间:"
>
{{
dateFormat
(form.operTime) }}
</el-form-item>
<el-form-item
label=
"操作时间:"
>
{{
parseTime
(form.operTime) }}
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"异常信息:"
v-if=
"form.status === 1"
>
{{ form.errorMsg }}
</el-form-item>
<el-form-item
label=
"异常信息:"
v-if=
"form.status === 1"
>
{{ form.errorMsg }}
</el-form-item>
...
...
ruoyi-ui/src/views/system/config/index.vue
浏览文件 @
319dfc2d
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
dateFormat
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
...
...
ruoyi-ui/src/views/system/dept/index.vue
浏览文件 @
319dfc2d
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<el-table-column
prop=
"status"
label=
"状态"
:formatter=
"statusFormat"
width=
"100"
></el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
:formatter=
"statusFormat"
width=
"100"
></el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"200"
>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"200"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
dateFormat
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
...
...
ruoyi-ui/src/views/system/dict/data.vue
浏览文件 @
319dfc2d
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
dateFormat
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
...
...
ruoyi-ui/src/views/system/dict/index.vue
浏览文件 @
319dfc2d
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
dateFormat
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
...
...
ruoyi-ui/src/views/system/menu/index.vue
浏览文件 @
319dfc2d
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<el-table-column
prop=
"visible"
label=
" 可见"
:formatter=
"visibleFormat"
width=
"80px"
></el-table-column>
<el-table-column
prop=
"visible"
label=
" 可见"
:formatter=
"visibleFormat"
width=
"80px"
></el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
dateFormat
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"180"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
width=
"180"
class-name=
"small-padding fixed-width"
>
...
...
ruoyi-ui/src/views/system/notice/index.vue
浏览文件 @
319dfc2d
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
<el-table-column
label=
"创建者"
align=
"center"
prop=
"createBy"
width=
"100"
/>
<el-table-column
label=
"创建者"
align=
"center"
prop=
"createBy"
width=
"100"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"100"
>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"100"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
dateFormat
(
scope
.
row
.
createTime
,
'yyyy-MM-dd
'
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span>
<
/template>
<
/template>
<
/el-table-column>
<
/el-table-column>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
...
...
ruoyi-ui/src/views/system/post/index.vue
浏览文件 @
319dfc2d
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
dateFormat
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
...
...
ruoyi-ui/src/views/system/role/index.vue
浏览文件 @
319dfc2d
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
dateFormat
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
...
...
ruoyi-ui/src/views/system/user/index.vue
浏览文件 @
319dfc2d
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"160"
>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"160"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
dateFormat
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论