diff --git a/apps/web-antd/src/api/license/customer/index.ts b/apps/web-antd/src/api/license/customer/index.ts
index b95ff4f..020b125 100644
--- a/apps/web-antd/src/api/license/customer/index.ts
+++ b/apps/web-antd/src/api/license/customer/index.ts
@@ -25,6 +25,7 @@ export namespace CustomerApi {
contractCount: number;
signingRate: number;
completionRate: number;
+ permanentCount: number;
}
}
diff --git a/apps/web-antd/src/views/dashboard/analytics-visits-data.vue b/apps/web-antd/src/views/dashboard/analytics-visits-lic.vue
similarity index 86%
rename from apps/web-antd/src/views/dashboard/analytics-visits-data.vue
rename to apps/web-antd/src/views/dashboard/analytics-visits-lic.vue
index 437bad2..103995d 100644
--- a/apps/web-antd/src/views/dashboard/analytics-visits-data.vue
+++ b/apps/web-antd/src/views/dashboard/analytics-visits-lic.vue
@@ -28,7 +28,7 @@ function renderChart() {
series: [
{
// 总授权
- name: '授权License数',
+ name: 'License总数',
type: 'bar',
data: [props.dashboardValue.licenseCount],
barWidth: 20,
@@ -41,16 +41,16 @@ function renderChart() {
},
{
// 已签合同
- name: '已签合同数',
+ name: '永久license数',
type: 'bar',
- data: [props.dashboardValue.contractCount],
+ data: [props.dashboardValue.permanentCount],
barWidth: 20,
itemStyle: { color: '#91c7ae' },
z: 2,
label: {
show: true,
position: 'right',
- formatter: `{c}/${props.dashboardValue.licenseCount} (${props.dashboardValue.completionRate}%)`,
+ formatter: `{c}/${props.dashboardValue.licenseCount}`,
rich: { per: { color: '#333', fontWeight: 'bold' } },
},
},
@@ -74,5 +74,5 @@ watch(
-
+
diff --git a/apps/web-antd/src/views/dashboard/analytics-visits-source.vue b/apps/web-antd/src/views/dashboard/analytics-visits-pie.vue
similarity index 74%
rename from apps/web-antd/src/views/dashboard/analytics-visits-source.vue
rename to apps/web-antd/src/views/dashboard/analytics-visits-pie.vue
index 6df433f..fcf61f8 100644
--- a/apps/web-antd/src/views/dashboard/analytics-visits-source.vue
+++ b/apps/web-antd/src/views/dashboard/analytics-visits-pie.vue
@@ -19,22 +19,26 @@ function renderChart() {
{
type: 'pie',
roseType: 'radius',
- radius: [20, 100],
- label: { show: true, fontSize: 14 },
+ radius: [15, 60],
+ label: {
+ show: true,
+ fontSize: 14,
+ formatter: '{b}:{c}',
+ },
data: [
- {
- value: props.dashboardValue.userCount,
- name: '员工',
- itemStyle: { color: '#4F81BD' },
- },
+ // {
+ // value: props.dashboardValue.userCount,
+ // name: '员工',
+ // itemStyle: { color: '#4F81BD' },
+ // },
{
value: props.dashboardValue.customerCount,
- name: '客户',
+ name: '客户数',
itemStyle: { color: '#9BBB59' },
},
{
value: props.dashboardValue.projectCount,
- name: '项目',
+ name: '项目数',
itemStyle: { color: '#C0504D' },
},
],
@@ -60,5 +64,5 @@ watch(
-
+
diff --git a/apps/web-antd/src/views/dashboard/analytics-visits-sales.vue b/apps/web-antd/src/views/dashboard/analytics-visits-sales.vue
deleted file mode 100644
index 9701e7f..0000000
--- a/apps/web-antd/src/views/dashboard/analytics-visits-sales.vue
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
diff --git a/apps/web-antd/src/views/dashboard/analytics-visits-sign.vue b/apps/web-antd/src/views/dashboard/analytics-visits-sign.vue
new file mode 100644
index 0000000..c9eecbe
--- /dev/null
+++ b/apps/web-antd/src/views/dashboard/analytics-visits-sign.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
diff --git a/apps/web-antd/src/views/dashboard/index.vue b/apps/web-antd/src/views/dashboard/index.vue
index cc295b7..a2fe460 100644
--- a/apps/web-antd/src/views/dashboard/index.vue
+++ b/apps/web-antd/src/views/dashboard/index.vue
@@ -5,7 +5,11 @@ import type { CustomerApi } from '#/api/license/customer';
import { onMounted, ref, shallowRef } from 'vue';
-import { AnalysisChartCard, WorkbenchTrends } from '@vben/common-ui';
+import {
+ AnalysisChartCard,
+ AnalysisOverviewCard,
+ WorkbenchTrends,
+} from '@vben/common-ui';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
@@ -16,11 +20,11 @@ import { getLicenseExpiry } from '#/api/license/license';
// import { DictTag } from '#/components/dict-tag';
import { DICT_TYPE, getDictObj } from '#/utils';
-import AnalyticsVisitsData from './analytics-visits-data.vue';
-import AnalyticsVisitsSales from './analytics-visits-sales.vue';
-import AnalyticsVisitsSource from './analytics-visits-source.vue';
+import AnalyticsVisitsData from './analytics-visits-lic.vue';
+import AnalyticsVisitsSource from './analytics-visits-pie.vue';
+import AnalyticsVisitsSales from './analytics-visits-sign.vue';
-const overviewItems = shallowRef([]);
+const overviewItems = shallowRef();
const trendItems = shallowRef([]);
const projectProgressItems = shallowRef([]);
dayjs.extend(relativeTime);
@@ -32,50 +36,13 @@ onMounted(async () => {
dashboardValue.value = data;
- overviewItems.value = [
- {
- icon: 'icon-[streamline-plump-color--user-pin-flat] size-8 flex-shrink-0',
- title: '员工总数',
- totalTitle: '总用户量',
- totalValue: data.userCount || 0,
- value: data.userCount || 0,
- },
- {
- icon: 'icon-[streamline-color--key-flat] size-8 flex-shrink-0',
- title: '授权License数',
- totalTitle: '总License量',
- totalValue: data?.licenseCount || 0,
- value: data?.licenseCount || 0,
- },
- {
- icon: 'icon-[streamline-sharp-color--laptop-project-screen-flat] size-8 flex-shrink-0',
- title: '项目总数',
- totalTitle: '总项目量',
- totalValue: data?.projectCount || 0,
- value: data?.projectCount || 0,
- },
- {
- icon: 'icon-[material-icon-theme--folder-contract-open] size-8 flex-shrink-0',
- title: '已签合同数',
- totalTitle: '总合同量',
- totalValue: data?.contractCount || 0,
- value: data?.contractCount || 0,
- },
- {
- icon: 'icon-[streamline-color--information-desk-customer] size-8 flex-shrink-0',
- title: '客户总数',
- totalTitle: '总客户量',
- totalValue: data?.customerCount || 0,
- value: data?.customerCount || 0,
- },
- {
- icon: 'icon-[streamline-plump-color--fill-and-sign-flat] size-8 flex-shrink-0',
- title: '签单率',
- totalTitle: '总签单率',
- totalValue: data?.signingRate || 0,
- value: data?.signingRate || 0,
- },
- ];
+ overviewItems.value = {
+ icon: 'icon-[streamline-plump-color--user-pin-flat] size-9 flex-shrink-0',
+ title: '员工数',
+ totalTitle: '总用户量',
+ totalValue: data.userCount || 0,
+ value: data.userCount || 0,
+ };
const licenses = await getLicenseExpiry();
trendItems.value = licenses.map((item) => {
@@ -140,14 +107,24 @@ onMounted(async () => {