From 6d476230e23f74cdfbc4799193d92bb6eb0c7d0c Mon Sep 17 00:00:00 2001 From: jym503558564 <503558564@qq.com> Date: Wed, 13 May 2020 14:51:09 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DetailCard/ItemValue.vue | 2 +- src/i18n/langs/cn/route.json | 1 + src/i18n/langs/cn/tickets.json | 4 +- src/utils/index.js | 5 + .../tickets/TicketDetail/TicketDetail.vue | 109 ++++++++++++------ src/views/tickets/TicketDetail/index.vue | 10 +- src/views/tickets/index.js | 2 +- 7 files changed, 91 insertions(+), 42 deletions(-) diff --git a/src/components/DetailCard/ItemValue.vue b/src/components/DetailCard/ItemValue.vue index 3cd965844..252cd827c 100644 --- a/src/components/DetailCard/ItemValue.vue +++ b/src/components/DetailCard/ItemValue.vue @@ -3,7 +3,7 @@ export default { name: 'ItemValue', props: { value: { - type: [String, Function], + type: [String, Function, Array], default: '' }, item: { diff --git a/src/i18n/langs/cn/route.json b/src/i18n/langs/cn/route.json index 44b8c1da8..91d6062b2 100644 --- a/src/i18n/langs/cn/route.json +++ b/src/i18n/langs/cn/route.json @@ -43,6 +43,7 @@ "BatchCommand": "批量命令", "TaskMonitor": "任务监控", "Tickets": "工单管理", + "TicketDetail": "工单详情", "Audits": "日志审计", "LoginLog": "登录日志", "FtpLog": "FTP日志", diff --git a/src/i18n/langs/cn/tickets.json b/src/i18n/langs/cn/tickets.json index 661feb46c..9bd5520f1 100644 --- a/src/i18n/langs/cn/tickets.json +++ b/src/i18n/langs/cn/tickets.json @@ -7,5 +7,7 @@ "MyTickets": "我的工单", "AssignedMe": "待处理", "Assignees": "待处理人", - "Assignee": "处理人" + "Assignee": "处理人", + "Open": "开启", + "Closed": "关闭" } diff --git a/src/utils/index.js b/src/utils/index.js index 7e3fc1ab0..ad4b79983 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -105,3 +105,8 @@ export function param2Obj(url) { '"}' ) } + +// 将标准时间转换成时间戳 +export function getDateTimeStamp(dateStr) { + return Date.parse(dateStr.replace(/-/gi, '/')) +} diff --git a/src/views/tickets/TicketDetail/TicketDetail.vue b/src/views/tickets/TicketDetail/TicketDetail.vue index ab657bfae..eeedfd450 100644 --- a/src/views/tickets/TicketDetail/TicketDetail.vue +++ b/src/views/tickets/TicketDetail/TicketDetail.vue @@ -7,24 +7,24 @@
- {{ object.user_display }} {{ object.date_created }} + {{ object.user_display }} {{ formatTime(object.date_created) }}
- {{ object.date_created }} + {{ toSafeLocalDateStr(object.date_created) }}
-