From e4b4d43c860e32a4b954f8f77cf68ac934a93f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CXCYH=E2=80=9D?= <“1561381013@qq.com”> Date: Fri, 19 Apr 2024 18:40:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/personal/project/childSystem/manage.vue | 4 +++- src/views/personal/project/childSystem/participate.vue | 4 +++- src/views/personal/project/childmodel/manage.vue | 4 +++- src/views/personal/project/childmodel/participate.vue | 4 +++- src/views/personal/project/detail/manage.vue | 8 ++------ src/views/personal/project/detail/participate.vue | 2 +- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/views/personal/project/childSystem/manage.vue b/src/views/personal/project/childSystem/manage.vue index 08fc903..1305120 100644 --- a/src/views/personal/project/childSystem/manage.vue +++ b/src/views/personal/project/childSystem/manage.vue @@ -38,7 +38,9 @@ - + + {{ new Date(row.deadLine).toLocaleDateString() }} + 查看详情 diff --git a/src/views/personal/project/childSystem/participate.vue b/src/views/personal/project/childSystem/participate.vue index 444657a..7f5eef3 100644 --- a/src/views/personal/project/childSystem/participate.vue +++ b/src/views/personal/project/childSystem/participate.vue @@ -37,7 +37,9 @@ {{ row.description.description }} - + + {{ new Date(row.deadLine).toLocaleDateString() }} + 查看详情 diff --git a/src/views/personal/project/childmodel/manage.vue b/src/views/personal/project/childmodel/manage.vue index 0f17115..355f1dd 100644 --- a/src/views/personal/project/childmodel/manage.vue +++ b/src/views/personal/project/childmodel/manage.vue @@ -39,7 +39,9 @@ {{row.description.description}} - + + {{ new Date(row.deadLine).toLocaleDateString() }} + 查看详情 diff --git a/src/views/personal/project/childmodel/participate.vue b/src/views/personal/project/childmodel/participate.vue index ba6a044..a49c2e7 100644 --- a/src/views/personal/project/childmodel/participate.vue +++ b/src/views/personal/project/childmodel/participate.vue @@ -36,7 +36,9 @@ {{ row.description.description }} - + + {{ new Date(row.deadLine).toLocaleDateString() }} + 查看详情 diff --git a/src/views/personal/project/detail/manage.vue b/src/views/personal/project/detail/manage.vue index d74863c..295917f 100644 --- a/src/views/personal/project/detail/manage.vue +++ b/src/views/personal/project/detail/manage.vue @@ -71,11 +71,7 @@ const selectedStatus = ref('进行中'); const route = useRoute(); const projectId = route.query.id; -//修改时间方法 -function renderTime(date) { - var dateee = new Date(date).toJSON(); - return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') - } + //加载数据 //修改表单内数据 @@ -94,7 +90,7 @@ projectItems.value.forEach(item => { } else if (item.label === '05.状态') { item.value = data.status ? data.status : '未知'; } else if (item.label === '06.时间') { - item.value = renderTime(data.deadLine) ? data.deadLine : '2024-01-01 12:00:00'; + item.value = new Date(data.deadLine).toLocaleDateString(); } else if (item.label === '07.简介') { item.value = data.description; } diff --git a/src/views/personal/project/detail/participate.vue b/src/views/personal/project/detail/participate.vue index d08edfd..56926b8 100644 --- a/src/views/personal/project/detail/participate.vue +++ b/src/views/personal/project/detail/participate.vue @@ -90,7 +90,7 @@ const parseData = (data) => { } else if (item.label === '05.状态') { item.value = data.status ? data.status : '未知'; } else if (item.label === '06.时间') { - item.value = data.deadLine ? data.deadLine : '2024-01-01 12:00:00'; + item.value = new Date(data.deadLine).toLocaleDateString(); } else if (item.label === '07.简介') { item.value = data.description; }