diff --git a/apps/web-antd/src/api/license/comment/index.ts b/apps/web-antd/src/api/license/comment/index.ts index c0be6e2..e96e118 100644 --- a/apps/web-antd/src/api/license/comment/index.ts +++ b/apps/web-antd/src/api/license/comment/index.ts @@ -18,6 +18,10 @@ export namespace CommentApi { content?: string; // 评论内容 children?: Comment[]; // 子评论 projectName?: string; // 项目名称 + status?: string; + serialNo?: string; + businessOwner?: string; + technicalOwnerA?: string; } } diff --git a/apps/web-antd/src/api/license/customer/index.ts b/apps/web-antd/src/api/license/customer/index.ts index 512bdb8..ecfae1d 100644 --- a/apps/web-antd/src/api/license/customer/index.ts +++ b/apps/web-antd/src/api/license/customer/index.ts @@ -22,6 +22,7 @@ export namespace CustomerApi { projectCount: number; licenseCount: number; userCount: number; + contractCount: number; } } diff --git a/apps/web-antd/src/locales/langs/en-US/project.json b/apps/web-antd/src/locales/langs/en-US/project.json index e8804ca..2745cb7 100644 --- a/apps/web-antd/src/locales/langs/en-US/project.json +++ b/apps/web-antd/src/locales/langs/en-US/project.json @@ -20,7 +20,7 @@ "name": "Project Name", "envInfoFile": "Environment Info Attachment", "list": "Project List", - "progress": "Progress", + "progress": "Comment", "updateTime": "Last Modified Time", "commentNum": "Comment Count" } diff --git a/apps/web-antd/src/locales/langs/zh-CN/project.json b/apps/web-antd/src/locales/langs/zh-CN/project.json index 40bdba9..96d78aa 100644 --- a/apps/web-antd/src/locales/langs/zh-CN/project.json +++ b/apps/web-antd/src/locales/langs/zh-CN/project.json @@ -2,7 +2,7 @@ "project": "项目", "operation": "操作", "creationTime": "创建时间", - "remarks": "备注", + "remarks": "软件版本信息", "envInfo": "环境信息", "status": "项目状态", "endTime": "项目结束时间", @@ -20,7 +20,7 @@ "name": "项目名称", "envInfoFile": "环境信息附件", "list": "项目列表", - "progress": "进展", + "progress": "评论", "updateTime": "最后修改时间", "commentNum": "评论数" } diff --git a/apps/web-antd/src/views/dashboard/index.vue b/apps/web-antd/src/views/dashboard/index.vue index 2700af0..f28a6ed 100644 --- a/apps/web-antd/src/views/dashboard/index.vue +++ b/apps/web-antd/src/views/dashboard/index.vue @@ -4,12 +4,6 @@ import type { AnalysisOverviewItem, WorkbenchTrendItem } from '@vben/common-ui'; import { onMounted, shallowRef } from 'vue'; import { AnalysisOverview, WorkbenchTrends } from '@vben/common-ui'; -import { - SvgBellIcon, - SvgCakeIcon, - SvgCardIcon, - SvgDownloadIcon, -} from '@vben/icons'; import dayjs from 'dayjs'; import relativeTime from 'dayjs/plugin/relativeTime'; @@ -17,6 +11,8 @@ import relativeTime from 'dayjs/plugin/relativeTime'; import { getLatestCommentList } from '#/api/license/comment'; import { dashboard } from '#/api/license/customer'; import { getLicenseExpiry } from '#/api/license/license'; +// import { DictTag } from '#/components/dict-tag'; +import { DICT_TYPE, getDictObj } from '#/utils'; const overviewItems = shallowRef([]); const trendItems = shallowRef([]); @@ -28,28 +24,35 @@ onMounted(async () => { overviewItems.value = [ { - icon: SvgCardIcon, + icon: 'icon-[streamline-plump-color--user-pin-flat] size-8 flex-shrink-0', title: '用户量', totalTitle: '总用户量', totalValue: data.userCount || 0, value: data.userCount || 0, }, { - icon: SvgCakeIcon, + icon: 'icon-[streamline-color--information-desk-customer] size-8 flex-shrink-0', title: '客户量', totalTitle: '总客户量', totalValue: data?.customerCount || 0, value: data?.customerCount || 0, }, { - icon: SvgBellIcon, + 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: SvgDownloadIcon, + 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--key-flat] size-8 flex-shrink-0', title: 'License量', totalTitle: '总License量', totalValue: data?.licenseCount || 0, @@ -64,16 +67,35 @@ onMounted(async () => { content: `客户【${item.customerName}】项目【${item.projectName}】的License即将在 ${dayjs(item.expiryDate).fromNow(true)} 后到期`, date: dayjs(item.expiryDate).format('YYYY-MM-DD HH:mm:ss') || '', title: item.serialNo || '', + status: '', + info: '', }; }); const comments = await getLatestCommentList(); + projectProgressItems.value = comments.map((item) => { + // 获取字典对象 + const dict = getDictObj(DICT_TYPE.LIC_PROJECT_STATUS, String(item.status)); + + let dataContent = item.content || ''; + if (dataContent) { + const position = dataContent.indexOf('>') + 1; + const originalString = dataContent; + const stringToInsert = `${item.author}:`; + dataContent = + originalString.slice(0, position) + + stringToInsert + + originalString.slice(position); + } + return { avatar: '', - content: item.content || '', + content: dataContent, date: dayjs(item.updateTime).format('YYYY-MM-DD HH:mm:ss') || '', - title: item.projectName || '', + title: `${item.projectName ?? ''} `, + status: dict, + info: `${item.serialNo ?? ''}  ${item.businessOwner ?? ''}  ${item.technicalOwnerA ?? ''}`, }; }); }); diff --git a/apps/web-antd/src/views/license/customer/modules/form.vue b/apps/web-antd/src/views/license/customer/modules/form.vue index b8c72be..e3a9f94 100644 --- a/apps/web-antd/src/views/license/customer/modules/form.vue +++ b/apps/web-antd/src/views/license/customer/modules/form.vue @@ -94,7 +94,7 @@ const [Modal, modalApi] = useVbenModal({ diff --git a/apps/web-antd/src/views/license/project/comment/child-comment.vue b/apps/web-antd/src/views/license/project/comment/child-comment.vue index 28aba1c..59fdfbd 100644 --- a/apps/web-antd/src/views/license/project/comment/child-comment.vue +++ b/apps/web-antd/src/views/license/project/comment/child-comment.vue @@ -83,8 +83,8 @@ const formatContent = computed(() => {