fix: 解决计划任务时区显示不一致的问题 (#5230)

Refs  #5211
pull/5237/head
ssongliu 6 months ago committed by GitHub
parent ea40e32991
commit bf7a4f3254
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -99,7 +99,7 @@ type SearchRecord struct {
type Record struct { type Record struct {
ID uint `json:"id"` ID uint `json:"id"`
StartTime time.Time `json:"startTime"` StartTime string `json:"startTime"`
Records string `json:"records"` Records string `json:"records"`
Status string `json:"status"` Status string `json:"status"`
Message string `json:"message"` Message string `json:"message"`

@ -71,6 +71,7 @@ func (u *CronjobService) SearchRecords(search dto.SearchRecord) (int64, interfac
if err := copier.Copy(&item, &record); err != nil { if err := copier.Copy(&item, &record); err != nil {
return 0, nil, errors.WithMessage(constant.ErrStructTransform, err.Error()) return 0, nil, errors.WithMessage(constant.ErrStructTransform, err.Error())
} }
item.StartTime = record.StartTime.Format("2006-01-02 15:04:05")
dtoCronjobs = append(dtoCronjobs, item) dtoCronjobs = append(dtoCronjobs, item)
} }
return total, dtoCronjobs, err return total, dtoCronjobs, err

@ -19488,6 +19488,9 @@ const docTemplate = `{
"pageSize": { "pageSize": {
"type": "integer" "type": "integer"
}, },
"sync": {
"type": "boolean"
},
"tags": { "tags": {
"type": "array", "type": "array",
"items": { "items": {

@ -19481,6 +19481,9 @@
"pageSize": { "pageSize": {
"type": "integer" "type": "integer"
}, },
"sync": {
"type": "boolean"
},
"tags": { "tags": {
"type": "array", "type": "array",
"items": { "items": {

@ -3323,6 +3323,8 @@ definitions:
type: integer type: integer
pageSize: pageSize:
type: integer type: integer
sync:
type: boolean
tags: tags:
items: items:
type: string type: string

@ -90,8 +90,7 @@ export namespace Cronjob {
export interface Record { export interface Record {
id: number; id: number;
file: string; file: string;
startTime: Date; startTime: string;
endTime: Date;
records: string; records: string;
status: string; status: string;
message: string; message: string;

@ -108,7 +108,7 @@
{{ $t('commons.status.failed') }} {{ $t('commons.status.failed') }}
</el-tag> </el-tag>
<span> <span>
{{ dateFormat(0, 0, row.startTime) }} {{ row.startTime }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>

Loading…
Cancel
Save