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 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -14,7 +35,6 @@
-
@@ -26,13 +46,60 @@ import NoticePanel from '@/views/bst/index/components/NoticePanel.vue';
import MonthProjectChart from '@/views/dashboard/MonthProjectChart.vue';
import ProjectRateChart from '@/views/dashboard/ProjectRateChart.vue';
import ProjectListPanel from './components/ProjectListPanel.vue';
+import Project from '@/views/bst/project/index.vue';
+import Task from '@/views/bst/task/index.vue';
+import Customer from '@/views/bst/customer/index.vue';
+import { checkPermi } from '@/utils/permission';
+import { parseTime } from '@/utils/ruoyi';
export default {
name: 'Index',
- components: { PanelGroup, NoticePanel, MonthProjectChart, ProjectRateChart, ProjectListPanel },
+ components: { PanelGroup, NoticePanel, MonthProjectChart, ProjectRateChart, ProjectListPanel, Project, Task, Customer },
data() {
return {
+ today: parseTime(new Date(), '{y}-{m}-{d}'),
+ projectHideColumns: [
+ 'id',
+ 'no',
+ 'status',
+ 'customerName',
+ 'expireTime',
+ 'expectedCompleteDate',
+ 'maintenanceEndDate',
+ 'ownerName',
+ 'followName',
+ 'amount',
+ 'receivedAmount',
+ 'operationAmount',
+ 'remark',
+ 'createTime'
+ ],
+ taskHideColumns: [
+ 'id',
+ 'no',
+ 'status',
+ 'level',
+ 'type',
+ 'createId',
+ 'createName',
+ 'createTime',
+ 'remark',
+ 'submitCount',
+ 'passCount',
+ ],
+ customerHideColumns: [
+ 'id',
+ 'code',
+ 'source',
+ 'followName',
+ 'remark',
+ 'createName',
+ 'createTime'
+ ],
}
},
+ methods: {
+ checkPermi,
+ }
}
diff --git a/src/views/bst/notice/noticeTip/index.vue b/src/views/bst/notice/noticeTip/index.vue
index 8666f8b..2fe2bdc 100644
--- a/src/views/bst/notice/noticeTip/index.vue
+++ b/src/views/bst/notice/noticeTip/index.vue
@@ -153,7 +153,9 @@ export default {
// 处理消息
let message = JSON.parse(event.data);
this.showDesktopNotification(message);
- this.unreadCount ++;
+ if (message.id != null) {
+ this.unreadCount ++;
+ }
};
this.ws.onclose = (event) => {
diff --git a/src/views/bst/project/index.vue b/src/views/bst/project/index.vue
index 1a475b1..0a87b67 100644
--- a/src/views/bst/project/index.vue
+++ b/src/views/bst/project/index.vue
@@ -117,7 +117,7 @@
/
{{ d.row.taskPassCount | dv }}
/
- {{ d.row.taskWaitConfirmCount | dv }}
+ {{ d.row.taskProcessCount | dv }}
@@ -232,7 +232,12 @@
@@ -280,6 +285,10 @@ export default {
initData: {
type: Object,
default: () => {}
+ },
+ initShowSearch: {
+ type: Boolean,
+ default: true
}
},
data() {
@@ -309,7 +318,7 @@ export default {
{key: 'remark', visible: true, label: '备注', minWidth: null, sortable: true, overflow: true, align: 'center', width: null},
{key: 'time', visible: true, label: '截止时间', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
{key: 'createTime', visible: false, label: '创建时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
- {key: 'taskCount', visible: true, label: '任务(总数/已通过/待审核)', minWidth: null, sortable: true, overflow: false, align: 'center', width: "200"},
+ {key: 'taskCount', visible: true, label: '任务(总数/已通过/进行中)', minWidth: null, sortable: false, overflow: false, align: 'center', width: "200"},
],
// 排序方式
orderSorts: ['ascending', 'descending', null],
@@ -350,6 +359,7 @@ export default {
},
created() {
this.initColumns();
+ this.showSearch = this.initShowSearch;
this.queryParams = {
...this.queryParams,
diff --git a/src/views/bst/project/utils.js b/src/views/bst/project/utils.js
index fcf0e62..d857fa8 100644
--- a/src/views/bst/project/utils.js
+++ b/src/views/bst/project/utils.js
@@ -39,6 +39,6 @@ export const ProjectUtils = {
const expireTime = new Date(value);
const now = new Date();
const days = (expireTime - now) / 24 / 60 / 60 / 1000;
- return days <= 7 && days > 0;
+ return days <= 2 && days > 0;
}
}
diff --git a/src/views/bst/task/components/TaskStatistics.vue b/src/views/bst/task/components/TaskStatistics.vue
new file mode 100644
index 0000000..1fe9a49
--- /dev/null
+++ b/src/views/bst/task/components/TaskStatistics.vue
@@ -0,0 +1,43 @@
+
+
+ 今日完成:{{ brief.task.todayCompleted | dv }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/bst/task/index.vue b/src/views/bst/task/index.vue
index 1eade09..4c2fb5c 100644
--- a/src/views/bst/task/index.vue
+++ b/src/views/bst/task/index.vue
@@ -41,6 +41,17 @@
正常
+
+
+
@@ -88,6 +99,10 @@
+
+
+
+
@@ -119,7 +134,7 @@
-
+
创建:{{d.row.createTime | dv}}
截止:{{d.row.expireTime | dv}}
完成:{{d.row.passTime | dv}}
@@ -135,7 +150,7 @@
-
+
({})
+ },
+ initShowSearch: {
+ type: Boolean,
+ default: true
}
},
data() {
@@ -235,7 +255,7 @@ export default {
{key: 'createName', visible: true, label: '创建人', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'submitCount', visible: true, label: '提交', minWidth: null, sortable: false, overflow: false, align: 'center', width: "50"},
{key: 'passCount', visible: true, label: '完成', minWidth: null, sortable: false, overflow: false, align: 'center', width: "50"},
- {key: 'createTime', visible: true, label: '时间', minWidth: null, sortable: true, overflow: false, align: 'left', width: "190"},
+ {key: 'expireTime', visible: true, label: '时间', minWidth: null, sortable: true, overflow: false, align: 'left', width: "190"},
],
// 排序方式
orderSorts: ['ascending', 'descending', null],
@@ -264,6 +284,7 @@ export default {
pageSize: 20,
orderByColumn: defaultSort.prop,
isAsc: defaultSort.order,
+ passDateRange: [],
id: null,
projectId: null,
name: null,
@@ -281,7 +302,7 @@ export default {
},
created() {
this.initColumns();
-
+ this.showSearch = this.initShowSearch;
this.queryParams = {
...this.queryParams,
...this.query
diff --git a/src/views/dashboard/PanelGroup.vue b/src/views/dashboard/PanelGroup.vue
index 30ae4f0..8c0a541 100644
--- a/src/views/dashboard/PanelGroup.vue
+++ b/src/views/dashboard/PanelGroup.vue
@@ -1,269 +1,67 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/system/user/view/components/UserStatistics.vue b/src/views/system/user/view/components/UserStatistics.vue
index 39ffe53..2f15cc7 100644
--- a/src/views/system/user/view/components/UserStatistics.vue
+++ b/src/views/system/user/view/components/UserStatistics.vue
@@ -87,6 +87,7 @@