mirror of
https://gitee.com/anji-plus/report.git
synced 2026-03-20 09:38:35 +08:00
时间控件添加星期
This commit is contained in:
@@ -578,6 +578,9 @@ const widgetTools = [
|
||||
{code: 'MM-dd', name: '日期无年'},
|
||||
{code: 'hh:mm', name: '时分'},
|
||||
{code: 'hh:mm:ss', name: '时分秒'},
|
||||
{code: 'year-week', name: '日期+星期'},
|
||||
{code: 'year-h-m-week', name: '日期+时分+星期'},
|
||||
{code: 'year-h-m-s-week', name: '日期+时分秒+星期'},
|
||||
{code: 'week', name: '星期'}
|
||||
],
|
||||
value: 'yyyy-MM-dd hh:mm:ss'
|
||||
|
||||
@@ -106,7 +106,39 @@ export default {
|
||||
dayCycle = "星期" + dayCycleArray[i];
|
||||
}
|
||||
}
|
||||
return dayCycle;
|
||||
if (fmt == "year-week") {
|
||||
return year + "-" + month + "-" + day + dayCycle;
|
||||
} else if (fmt == "year-h-m-week") {
|
||||
return (
|
||||
year +
|
||||
"-" +
|
||||
month +
|
||||
"-" +
|
||||
day +
|
||||
" " +
|
||||
hours +
|
||||
":" +
|
||||
minutes +
|
||||
dayCycle
|
||||
);
|
||||
} else if (fmt == "year-h-m-s-week") {
|
||||
return (
|
||||
year +
|
||||
"-" +
|
||||
month +
|
||||
"-" +
|
||||
day +
|
||||
" " +
|
||||
hours +
|
||||
":" +
|
||||
minutes +
|
||||
":" +
|
||||
seconds +
|
||||
dayCycle
|
||||
);
|
||||
} else if (fmt == "week") {
|
||||
return dayCycle;
|
||||
}
|
||||
},
|
||||
displayTime() {
|
||||
this.timestr =
|
||||
|
||||
Reference in New Issue
Block a user