From 2af5f043b60c1f7ac38ecccc8f5bf44743134325 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 12 十二月 2025 18:08:00 +0800
Subject: [PATCH] test

---
 pages/task/infos/task-log-item.vue |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/pages/task/infos/task-log-item.vue b/pages/task/infos/task-log-item.vue
index adcd347..df3b586 100644
--- a/pages/task/infos/task-log-item.vue
+++ b/pages/task/infos/task-log-item.vue
@@ -10,7 +10,7 @@
 				</view>
 			</view>
 			<view class="line"><text class="text">{{ startTime}} - {{endTime}} </text>
-				<text class="text">{{Math.ceil((taskData.end_time- taskData.start_time) / (60* 1000)) }}min</text>
+				<text class="text">{{Math.ceil((taskData.end_time- taskData.start_time) / (60* 1000)) }}{{translate("minute")}}</text>
 			</view>
 		</view>
 	</view>
@@ -41,7 +41,7 @@
 		computed: {
 			startTime() {
 				const date = new Date(Number(this.taskData.start_time))
-				return`${date.getHours()}:${date.getMinutes()}`;
+				return `${date.getHours()}:${date.getMinutes()}`;
 			},
 			endTime() {
 				const date = new Date(Number(this.taskData.end_time))
@@ -50,9 +50,9 @@
 			taskStatusText() {
 				let statusText = ""
 				if (this.taskData.task_status == "finish") {
-					statusText = "浠诲姟瀹屾垚"
+					statusText = this.translate("task_completed")
 				} else if (this.taskData.task_status == "cancel") {
-					statusText = "浠诲姟寮傚父"
+					statusText = this.translate("task_exception")
 				} else {
 					statusText = this.taskData.task_status
 				}
@@ -61,9 +61,9 @@
 			taskStatusText() {
 				let statusText = ""
 				if (this.taskData.task_status == "finish") {
-					statusText = "浠诲姟瀹屾垚"
+					statusText =  this.translate("task_completed")
 				} else if (this.taskData.task_status == "cancel") {
-					statusText = "浠诲姟寮傚父"
+					statusText =this.translate("task_exception")
 				} else {
 					statusText = this.taskData.task_status
 				}
@@ -106,7 +106,11 @@
 			},
 			clickTask() {
 				this.$emit('click-item', this.taskData)
-			}
+			},
+			translate(t) {
+				if (typeof this.$t == "function") return this.$t(`page.${t}`)
+				else return t;
+			},
 
 		}
 	}

--
Gitblit v1.9.1