diff --git a/components/ContentDashboard.vue b/components/ContentDashboard.vue
index b666490..daf0200 100644
--- a/components/ContentDashboard.vue
+++ b/components/ContentDashboard.vue
@@ -154,6 +154,8 @@ import { ref, onMounted } from 'vue';
import { getTaskStatusType, getTaskStatusStyle, getStatusText } from '@/utils/taskConfig.js';
import { getDashboardBrief, getTaskList } from '@/common/api';
import { useUserStore } from '@/store/user';
+import {truncateText} from "@/utils/textSolve/truncateText";
+
// 任务统计
const taskStats = ref([
@@ -192,15 +194,7 @@ const customerStatus = ref([
{ label: '即将跟进', count: 0 }
]);
-const truncateText = (text, maxLength = 30, suffix = '...')=> {
- if (!text || typeof text !== 'string') return ''
- if (text.length <= maxLength) {
- return text
- }
-
- return text.substring(0, maxLength) + suffix
-}
// 加载状态
const loading = ref(false);
diff --git a/pages/task/list/index.vue b/pages/task/list/index.vue
index d6c12d9..e785f37 100644
--- a/pages/task/list/index.vue
+++ b/pages/task/list/index.vue
@@ -13,24 +13,37 @@
>
-
-
-
- 立即处理
-
-
+
@@ -79,6 +84,8 @@ import { onLoad } from '@dcloudio/uni-app';
import { getStatusText, getTaskStatusType, getTaskStatusStyle } from '@/utils/taskConfig.js';
import { getTaskList } from '@/common/api';
import { useTaskStore } from '@/store/task';
+import {truncateText} from "@/utils/textSolve/truncateText";
+
// 获取页面参数
const statusFilter = ref('');
@@ -454,6 +461,7 @@ onLoad((options) => {
align-items: center;
gap: 12px;
margin-bottom: 12px;
+ justify-content: space-between;
}
.task-badge-wrapper {
@@ -543,7 +551,7 @@ onLoad((options) => {
}
.task-action {
- margin-top: 12px;
+
display: flex;
justify-content: flex-end;
}
diff --git a/utils/textSolve/truncateText.js b/utils/textSolve/truncateText.js
new file mode 100644
index 0000000..6354216
--- /dev/null
+++ b/utils/textSolve/truncateText.js
@@ -0,0 +1,9 @@
+export const truncateText = (text, maxLength = 30, suffix = '...')=> {
+ if (!text || typeof text !== 'string') return ''
+
+ if (text.length <= maxLength) {
+ return text
+ }
+
+ return text.substring(0, maxLength) + suffix
+}
\ No newline at end of file