diff --git a/resources/assets/js/pages/manage/components/DialogView.vue b/resources/assets/js/pages/manage/components/DialogView.vue
index 6bfb7d64..dd248e39 100644
--- a/resources/assets/js/pages/manage/components/DialogView.vue
+++ b/resources/assets/js/pages/manage/components/DialogView.vue
@@ -23,7 +23,7 @@
@@ -129,19 +129,6 @@ export default {
});
},
- formatTime(date) {
- let time = Math.round($A.Date(date).getTime() / 1000),
- string = '';
- if ($A.formatDate('Ymd') === $A.formatDate('Ymd', time)) {
- string = $A.formatDate('H:i', time)
- } else if ($A.formatDate('Y') === $A.formatDate('Y', time)) {
- string = $A.formatDate('m-d', time)
- } else {
- string = $A.formatDate('Y-m-d', time)
- }
- return string || '';
- },
-
textMsg(text) {
if (!text) {
return ""
diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue
index bed2e394..ecaeaa41 100644
--- a/resources/assets/js/pages/manage/components/DialogWrapper.vue
+++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue
@@ -39,7 +39,7 @@
:class="{self:item.userid == userId, 'history-tip': topId == item.id}">
{{$L('历史消息')}}
-
+
@@ -49,7 +49,7 @@
:key="'tmp_' + item.id"
:class="{self:item.userid == userId}">
-
+
@@ -358,19 +358,6 @@ export default {
this.$emit("on-active");
},
- formatTime(date) {
- let time = Math.round($A.Date(date).getTime() / 1000),
- string = '';
- if ($A.formatDate('Ymd') === $A.formatDate('Ymd', time)) {
- string = $A.formatDate('H:i', time)
- } else if ($A.formatDate('Y') === $A.formatDate('Y', time)) {
- string = $A.formatDate('m-d', time)
- } else {
- string = $A.formatDate('Y-m-d', time)
- }
- return string || '';
- },
-
openProject() {
if (!this.dialogData.group_info) {
return;
diff --git a/resources/assets/js/pages/manage/components/ProjectList.vue b/resources/assets/js/pages/manage/components/ProjectList.vue
index 98bb1027..a2cf6fb4 100644
--- a/resources/assets/js/pages/manage/components/ProjectList.vue
+++ b/resources/assets/js/pages/manage/components/ProjectList.vue
@@ -1298,51 +1298,9 @@ export default {
this.tempShowTasks = [];
},
- formatTime(date) {
- let time = Math.round($A.Date(date).getTime() / 1000),
- string = '';
- if ($A.formatDate('Ymd') === $A.formatDate('Ymd', time)) {
- string = $A.formatDate('H:i', time)
- } else if ($A.formatDate('Y') === $A.formatDate('Y', time)) {
- string = $A.formatDate('m-d', time)
- } else {
- string = $A.formatDate('Y-m-d', time)
- }
- return string || '';
- },
-
- formatBit(val) {
- val = +val
- return val > 9 ? val : '0' + val
- },
-
- formatSeconds(second) {
- let duration
- let days = Math.floor(second / 86400);
- let hours = Math.floor((second % 86400) / 3600);
- let minutes = Math.floor(((second % 86400) % 3600) / 60);
- let seconds = Math.floor(((second % 86400) % 3600) % 60);
- if (days > 0) {
- if (hours > 0) duration = days + "d," + this.formatBit(hours) + "h";
- else if (minutes > 0) duration = days + "d," + this.formatBit(minutes) + "min";
- else if (seconds > 0) duration = days + "d," + this.formatBit(seconds) + "s";
- else duration = days + "d";
- }
- else if (hours > 0) duration = this.formatBit(hours) + ":" + this.formatBit(minutes) + ":" + this.formatBit(seconds);
- else if (minutes > 0) duration = this.formatBit(minutes) + ":" + this.formatBit(seconds);
- else if (seconds > 0) duration = this.formatBit(seconds) + "s";
- return duration;
- },
-
expiresFormat(date) {
- let time = Math.round($A.Date(date).getTime() / 1000) - this.nowTime;
- if (time < 86400 * 7 && time > 0 ) {
- return this.formatSeconds(time);
- } else if (time <= 0) {
- return '-' + this.formatSeconds(time * -1);
- }
- return this.formatTime(date)
- }
+ return $A.countDownFormat(date, this.nowTime)
+ },
}
}
diff --git a/resources/assets/js/pages/manage/components/TaskAdd.vue b/resources/assets/js/pages/manage/components/TaskAdd.vue
index 156b60d3..5a48d7c8 100644
--- a/resources/assets/js/pages/manage/components/TaskAdd.vue
+++ b/resources/assets/js/pages/manage/components/TaskAdd.vue
@@ -302,21 +302,21 @@ export default {
text: this.$L('3天'),
value() {
let e = new Date();
- e.setDate(e.getDate() + 3);
+ e.setDate(e.getDate() + 2);
return [new Date(), lastSecond(e.getTime())];
}
}, {
text: this.$L('5天'),
value() {
let e = new Date();
- e.setDate(e.getDate() + 5);
+ e.setDate(e.getDate() + 4);
return [new Date(), lastSecond(e.getTime())];
}
}, {
text: this.$L('7天'),
value() {
let e = new Date();
- e.setDate(e.getDate() + 7);
+ e.setDate(e.getDate() + 6);
return [new Date(), lastSecond(e.getTime())];
}
}]
diff --git a/resources/assets/js/pages/manage/components/TaskDetail.vue b/resources/assets/js/pages/manage/components/TaskDetail.vue
index 99a9eb6a..3eb70990 100644
--- a/resources/assets/js/pages/manage/components/TaskDetail.vue
+++ b/resources/assets/js/pages/manage/components/TaskDetail.vue
@@ -84,7 +84,7 @@