From a0636c093f96017f9e1bf4ce9574560625c13b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?= <14103883+leaf-phos@user.noreply.gitee.com> Date: Mon, 24 Feb 2025 14:56:31 +0800 Subject: [PATCH] =?UTF-8?q?0.5.1=20=E6=9B=B4=E6=96=B0=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- src/api/dashboard/dashboard.js | 8 - src/components/Avatar/index.vue | 18 +- src/components/Dashboard/StatCard.vue | 121 +++++ src/utils/enums.js | 26 + src/views/bst/customer/index.vue | 21 +- .../bst/index/components/NoticePanel.vue | 4 +- src/views/bst/index/index.vue | 81 ++- src/views/bst/notice/noticeTip/index.vue | 4 +- src/views/bst/project/index.vue | 16 +- src/views/bst/project/utils.js | 2 +- .../bst/task/components/TaskStatistics.vue | 43 ++ src/views/bst/task/index.vue | 31 +- src/views/dashboard/PanelGroup.vue | 486 +++--------------- .../user/view/components/UserStatistics.vue | 12 +- 15 files changed, 420 insertions(+), 455 deletions(-) create mode 100644 src/components/Dashboard/StatCard.vue create mode 100644 src/views/bst/task/components/TaskStatistics.vue diff --git a/.env.production b/.env.production index 0fdd40b..760e4e6 100644 --- a/.env.production +++ b/.env.production @@ -11,4 +11,4 @@ VUE_APP_BASE_API = '/prod-api' VUE_APP_QINIU_DOMAIN = 'https://api.ccttiot.com' # WebSocket地址 -VUE_APP_WS_HOST = 'wss://pm.chuangtewl.com' \ No newline at end of file +VUE_APP_WS_HOST = 'wss://pm.chuangtewl.com/prod-api' \ No newline at end of file diff --git a/src/api/dashboard/dashboard.js b/src/api/dashboard/dashboard.js index d073205..c99fa19 100644 --- a/src/api/dashboard/dashboard.js +++ b/src/api/dashboard/dashboard.js @@ -1,13 +1,5 @@ import request from '@/utils/request' -// 获取本人概览 -export function getMineBrief() { - return request({ - url: '/dashboard/mineBrief', - method: 'get' - }) -} - // 获取概览 export function getBrief(params) { return request({ diff --git a/src/components/Avatar/index.vue b/src/components/Avatar/index.vue index bc2311b..21c6031 100644 --- a/src/components/Avatar/index.vue +++ b/src/components/Avatar/index.vue @@ -43,14 +43,16 @@ export default { }, backgroundColor() { const colors = [ - '#BBDEFB', // 浅蓝色 - '#E1BEE7', // 浅紫色 - '#C8E6C9', // 浅绿色 - '#FFE0B2', // 浅橙色 - '#CFD8DC', // 浅灰蓝色 - '#B3E5FC', // 天蓝色 - '#F8BBD0', // 浅粉色 - '#D7CCC8' // 浅棕色 + '#90CAF9', // 蓝色 + '#CE93D8', // 紫色 + '#FFB74D', // 橙色 + '#81D4FA', // 天蓝色 + '#F48FB1', // 粉色 + '#E57373', // 红色 + '#9575CD', // 深紫色 + '#4DB6AC', // 青色 + '#FF8A65', // 珊瑚色 + '#7986CB' // 靛蓝色 ] // 将中文字符串转换为数字 const nameStr = this.name || '' diff --git a/src/components/Dashboard/StatCard.vue b/src/components/Dashboard/StatCard.vue new file mode 100644 index 0000000..1163088 --- /dev/null +++ b/src/components/Dashboard/StatCard.vue @@ -0,0 +1,121 @@ + + + + + \ No newline at end of file diff --git a/src/utils/enums.js b/src/utils/enums.js index 1cdc8a1..37b1cfa 100644 --- a/src/utils/enums.js +++ b/src/utils/enums.js @@ -110,3 +110,29 @@ export const MessageBstType = { CUSTOMER: "customer", // 客户 } +// 统计数据键值 +export const BriefKeys = { + // 项目 + PROJECT_STATUS: "projectStatus", // 项目状态 + PROJECT_DEV_COMPLETED: "projectDevCompleted", // 项目开发完成 + PROJECT_OVERDUE_DEV_UNCOMPLETED: "projectOverdueDevUncompleted", // 项目逾期开发未完成 + PROJECT_OVERDUE_DEV_COMPLETED: "projectOverdueDevCompleted", // 项目逾期开发完成 + PROJECT_DEV_OVERDUE: "projectDevOverdue", // 项目开发逾期 + PROJECT_DEV_SOON_EXPIRE: "projectDevSoonExpire", // 开发即将到期项目 + + // 任务 + TASK_STATUS: "taskStatus", // 状态数据 + TASK_TYPE: "taskType", // 类型分组数据 + TASK_OVERDUE_UNCOMPLETED: "taskOverdueUncompleted", // 逾期未完成 + TASK_OVERDUE_COMPLETED: "taskOverdueCompleted", // 逾期完成 + TASK_TODAY_COMPLETED: "taskTodayCompleted", // 今日完成任务 + TASK_SOON_EXPIRE: "taskSoonExpire", // 即将到期任务 + + // 客户 + CUSTOMER_STATUS: "customerStatus", // 状态分组数据 + CUSTOMER_TODAY_CREATE: "customerTodayCreate", // 今日新增客户 + CUSTOMER_TODAY_FOLLOWED: "customerTodayFollowed", // 今日已跟进客户 + CUSTOMER_TODAY_WAIT_FOLLOW: "customerTodayWaitFollow", // 今日待跟进客户 + CUSTOMER_SOON_FOLLOW: "customerSoonFollow", // 即将需要跟进的客户 +} + diff --git a/src/views/bst/customer/index.vue b/src/views/bst/customer/index.vue index d9e3f49..1bae1a6 100644 --- a/src/views/bst/customer/index.vue +++ b/src/views/bst/customer/index.vue @@ -222,6 +222,17 @@ export default { mixins: [$showColumns], dicts: ['customer_intent_level', 'customer_status'], components: {FormCol, CustomerLink, CustomerFollowEditDialog}, + props: { + query: { + type: Object, + default: () => ({}) + }, + // 初始化是否显示搜索条件 + initShowSearch: { + type: Boolean, + default: true + } + }, data() { return { showFollowDialog: false, @@ -229,7 +240,7 @@ export default { span: 24, // 字段列表 columns: [ - {key: 'id', visible: true, label: '编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"}, + {key: 'id', visible: false, label: '编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"}, {key: 'name', visible: true, label: '名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, {key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, {key: 'intentLevel', visible: true, label: '意向强度', minWidth: null, sortable: true, overflow: false, align: 'center', width: null}, @@ -289,6 +300,14 @@ export default { }; }, created() { + this.initColumns(); + this.showSearch = this.initShowSearch; + + this.queryParams = { + ...this.queryParams, + ...this.query + } + this.getList(); }, methods: { diff --git a/src/views/bst/index/components/NoticePanel.vue b/src/views/bst/index/components/NoticePanel.vue index da1b447..3156ddf 100644 --- a/src/views/bst/index/components/NoticePanel.vue +++ b/src/views/bst/index/components/NoticePanel.vue @@ -99,9 +99,7 @@ export default { detail: {}, queryParams: { pageNum: 1, - pageSize: 5, - orderByColumn: 'top', - isAsc: 'desc' + pageSize: 2, }, } }, diff --git a/src/views/bst/index/index.vue b/src/views/bst/index/index.vue index fb3c632..48d51ab 100644 --- a/src/views/bst/index/index.vue +++ b/src/views/bst/index/index.vue @@ -1,11 +1,32 @@