Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
9721a406
提交
9721a406
authored
5月 21, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/main' into main
上级
c7cf7505
ff24ab3d
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
60 行增加
和
4 行删除
+60
-4
DeDate.vue
frontend/src/components/widget/DeWidget/DeDate.vue
+33
-0
en.js
frontend/src/lang/en.js
+2
-1
tw.js
frontend/src/lang/tw.js
+2
-1
zh.js
frontend/src/lang/zh.js
+2
-1
index.js
frontend/src/utils/index.js
+20
-0
index.vue
frontend/src/views/system/about/index.vue
+1
-1
没有找到文件。
frontend/src/components/widget/DeWidget/DeDate.vue
浏览文件 @
9721a406
<
template
>
<
template
>
<el-date-picker
<el-date-picker
v-if=
"options!== null && options.attrs!==null"
v-if=
"options!== null && options.attrs!==null"
ref=
"dateRef"
v-model=
"options.value"
v-model=
"options.value"
:type=
"options.attrs.type"
:type=
"options.attrs.type"
:range-separator=
"options.attrs.rangeSeparator"
:range-separator=
"options.attrs.rangeSeparator"
...
@@ -12,6 +13,7 @@
...
@@ -12,6 +13,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
dateFormat
}
from
'@/utils'
export
default
{
export
default
{
props
:
{
props
:
{
...
@@ -44,10 +46,41 @@ export default {
...
@@ -44,10 +46,41 @@ export default {
value
:
Array
.
isArray
(
this
.
options
.
value
)
?
this
.
options
.
value
:
[
this
.
options
.
value
],
value
:
Array
.
isArray
(
this
.
options
.
value
)
?
this
.
options
.
value
:
[
this
.
options
.
value
],
operator
:
this
.
operator
operator
:
this
.
operator
}
}
param
.
value
=
this
.
formatValues
(
param
.
value
)
this
.
inDraw
&&
this
.
$store
.
dispatch
(
'conditions/add'
,
param
)
this
.
inDraw
&&
this
.
$store
.
dispatch
(
'conditions/add'
,
param
)
},
},
dateChange
(
value
)
{
dateChange
(
value
)
{
// const nvalue = dateFormat(value, this.getFormat())
// console.log(nvalue)
this
.
setCondition
()
this
.
setCondition
()
},
formatValues
(
values
)
{
if
(
!
values
||
values
.
length
===
0
)
{
return
[]
}
return
values
.
map
(
value
=>
dateFormat
(
value
,
this
.
getFormat
()))
},
getFormat
()
{
let
format
=
'yyyy'
switch
(
this
.
options
.
attrs
.
type
)
{
case
'year'
:
format
=
'yyyy'
break
case
'month'
:
format
=
'yyyy-MM'
break
case
'date'
:
format
=
'yyyy-MM-dd'
break
case
'daterange'
:
format
=
'yyyy-MM-dd'
this
.
operator
=
'in'
break
default
:
format
=
'yyyy'
break
}
return
format
}
}
}
}
}
}
...
...
frontend/src/lang/en.js
浏览文件 @
9721a406
...
@@ -944,6 +944,7 @@ export default {
...
@@ -944,6 +944,7 @@ export default {
version_num
:
'Version number'
,
version_num
:
'Version number'
,
standard
:
'Standard'
,
standard
:
'Standard'
,
enterprise
:
'Enterprise'
,
enterprise
:
'Enterprise'
,
suport
:
'Get technical support'
suport
:
'Get technical support'
,
update_success
:
'Update Success'
}
}
}
}
frontend/src/lang/tw.js
浏览文件 @
9721a406
...
@@ -943,6 +943,7 @@ export default {
...
@@ -943,6 +943,7 @@ export default {
version_num
:
'版本號'
,
version_num
:
'版本號'
,
standard
:
'標準版'
,
standard
:
'標準版'
,
enterprise
:
'企業版'
,
enterprise
:
'企業版'
,
suport
:
'獲取技術支持'
suport
:
'獲取技術支持'
,
update_success
:
'更新成功'
}
}
}
}
frontend/src/lang/zh.js
浏览文件 @
9721a406
...
@@ -945,6 +945,7 @@ export default {
...
@@ -945,6 +945,7 @@ export default {
version_num
:
'版本号'
,
version_num
:
'版本号'
,
standard
:
'标准版'
,
standard
:
'标准版'
,
enterprise
:
'企业版'
,
enterprise
:
'企业版'
,
suport
:
'获取技术支持'
suport
:
'获取技术支持'
,
update_success
:
'更新成功'
}
}
}
}
frontend/src/utils/index.js
浏览文件 @
9721a406
...
@@ -2,6 +2,26 @@
...
@@ -2,6 +2,26 @@
* Created by PanJiaChen on 16/11/18.
* Created by PanJiaChen on 16/11/18.
*/
*/
export
function
dateFormat
(
date
,
fmt
)
{
let
ret
const
opt
=
{
'y+'
:
date
.
getFullYear
().
toString
(),
// 年
'M+'
:
(
date
.
getMonth
()
+
1
).
toString
(),
// 月
'd+'
:
date
.
getDate
().
toString
(),
// 日
'H+'
:
date
.
getHours
().
toString
(),
// 时
'm+'
:
date
.
getMinutes
().
toString
(),
// 分
's+'
:
date
.
getSeconds
().
toString
()
// 秒
// 有其他格式化字符需求可以继续添加,必须转化成字符串
}
for
(
const
k
in
opt
)
{
ret
=
new
RegExp
(
'('
+
k
+
')'
).
exec
(
fmt
)
if
(
ret
)
{
fmt
=
fmt
.
replace
(
ret
[
1
],
(
ret
[
1
].
length
===
1
)
?
(
opt
[
k
])
:
(
opt
[
k
].
padStart
(
ret
[
1
].
length
,
'0'
)))
}
}
return
fmt
}
/**
/**
* Parse the time to string
* Parse the time to string
* @param {(Object|string|number)} time
* @param {(Object|string|number)} time
...
...
frontend/src/views/system/about/index.vue
浏览文件 @
9721a406
...
@@ -138,7 +138,7 @@ export default {
...
@@ -138,7 +138,7 @@ export default {
const
param
=
{
license
:
this
.
licenseKey
}
const
param
=
{
license
:
this
.
licenseKey
}
updateInfo
(
param
).
then
(
response
=>
{
updateInfo
(
param
).
then
(
response
=>
{
if
(
response
.
data
.
status
===
'valid'
)
{
if
(
response
.
data
.
status
===
'valid'
)
{
this
.
$success
(
this
.
$t
(
'
i18n_mc_
update_success'
))
this
.
$success
(
this
.
$t
(
'
about.
update_success'
))
this
.
license
=
this
.
getLicense
(
response
.
data
)
this
.
license
=
this
.
getLicense
(
response
.
data
)
}
else
{
}
else
{
this
.
$warning
(
response
.
data
.
message
)
this
.
$warning
(
response
.
data
.
message
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论