From 5210a140ba2e01d8b6af72fb635d798a7e41f526 Mon Sep 17 00:00:00 2001 From: ouhaolan Date: Fri, 17 Apr 2026 09:46:21 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/directives/permission/hasPermi.ts | 9 +- src/hooks/web/useTagsView.ts | 9 +- .../components/TagsView/src/TagsView.vue | 62 +- src/utils/routerHelper.ts | 3 +- src/views/system/user/DeptTree.vue | 19 +- .../ydoyun/report/lijun/reportpage6/index.vue | 109 +- .../ydoyun/report/productDaily/index.vue | 2365 +++++++++++++++++ types/router.d.ts | 4 + 日志汇总统计.html | 143 + 9 files changed, 2675 insertions(+), 48 deletions(-) create mode 100644 src/views/ydoyun/report/productDaily/index.vue create mode 100644 日志汇总统计.html diff --git a/src/directives/permission/hasPermi.ts b/src/directives/permission/hasPermi.ts index 90cd025..44bae36 100644 --- a/src/directives/permission/hasPermi.ts +++ b/src/directives/permission/hasPermi.ts @@ -1,4 +1,5 @@ import type { App } from 'vue' +import { toRaw } from 'vue' import { useUserStore } from '@/store/modules/user' const { t } = useI18n() // 国际化 @@ -24,8 +25,8 @@ export function hasPermi(app: App) { const userStore = useUserStore() const all_permission = '*:*:*' export const hasPermission = (permission: string[]) => { - return ( - userStore.permissions.has(all_permission) || - permission.some((permission) => userStore.permissions.has(permission)) - ) + // Vue 3.5+ 对响应式 Set 存字符串时,直接 .has 可能触发 WeakMap keys must be objects + const raw = toRaw(userStore.permissions) as Set | undefined + if (!raw?.size) return false + return raw.has(all_permission) || permission.some((p) => raw.has(p)) } diff --git a/src/hooks/web/useTagsView.ts b/src/hooks/web/useTagsView.ts index 31eadb0..619fc99 100644 --- a/src/hooks/web/useTagsView.ts +++ b/src/hooks/web/useTagsView.ts @@ -15,17 +15,20 @@ export const useTagsView = () => { } const closeLeft = (callback?: Fn) => { - tagsViewStore.delLeftViews(unref(selectedTag) as RouteLocationNormalizedLoaded) + const tag = unref(selectedTag) + if (tag) tagsViewStore.delLeftViews(tag as RouteLocationNormalizedLoaded) callback?.() } const closeRight = (callback?: Fn) => { - tagsViewStore.delRightViews(unref(selectedTag) as RouteLocationNormalizedLoaded) + const tag = unref(selectedTag) + if (tag) tagsViewStore.delRightViews(tag as RouteLocationNormalizedLoaded) callback?.() } const closeOther = (callback?: Fn) => { - tagsViewStore.delOthersViews(unref(selectedTag) as RouteLocationNormalizedLoaded) + const tag = unref(selectedTag) + if (tag) tagsViewStore.delOthersViews(tag as RouteLocationNormalizedLoaded) callback?.() } diff --git a/src/layout/components/TagsView/src/TagsView.vue b/src/layout/components/TagsView/src/TagsView.vue index af492ba..1e10f09 100644 --- a/src/layout/components/TagsView/src/TagsView.vue +++ b/src/layout/components/TagsView/src/TagsView.vue @@ -1,6 +1,10 @@ diff --git a/src/views/ydoyun/report/productDaily/index.vue b/src/views/ydoyun/report/productDaily/index.vue new file mode 100644 index 0000000..6022feb --- /dev/null +++ b/src/views/ydoyun/report/productDaily/index.vue @@ -0,0 +1,2365 @@ + + + + + + diff --git a/types/router.d.ts b/types/router.d.ts index 03e91f1..eee2cee 100644 --- a/types/router.d.ts +++ b/types/router.d.ts @@ -36,6 +36,8 @@ import { defineComponent } from 'vue' **/ declare module 'vue-router' { interface RouteMeta extends Record { + /** 后台菜单 id(动态路由由 generateRoute 从菜单节点写入,用于 Dify 知识库命名等) */ + menuId?: number hidden?: boolean alwaysShow?: boolean title?: string @@ -68,6 +70,8 @@ declare global { } interface AppCustomRouteRecordRaw extends Omit { + /** 菜单编号,与后端 MenuVO.id 一致 */ + id?: number icon: any name: string meta: RouteMeta diff --git a/日志汇总统计.html b/日志汇总统计.html new file mode 100644 index 0000000..a3222ab --- /dev/null +++ b/日志汇总统计.html @@ -0,0 +1,143 @@ + + + + + + 日志填报明细 - 已填报 + + + + + + +
+
+

日志填报明细

+

查看已完成提交的员工日志内容

+
+
+ + +
+
+ +
+
+

+ 部门结构 +

+
    + +
  • + 店铺日报 45 +
  • +
  • + 采购日报 32 +
  • +
  • + 商品日报 51 +
  • +
+
+ +
+
+
+ + +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
姓名部门填报内容提交状态
+ + 王小明 + +
零售事业部
+
Chenzhou Store · Manager
+
+
+

+ 今日郴州店客流量较昨日回升,成交额达到预期目标。主推的春季新款T恤表现优异,转化率约12%。下午对新入职导购进行了系统培训。 +

+
详情 >
+
+
+ + 已提交 + +
+ + 李华 + +
采购部
+
Supply Chain · Buyer
+
+
+

+ 完成了与面料供应商的本周对账工作。确认了下周到货的夏季轻薄款面料数量及颜色。注意到原材料价格有小幅波动,已汇报给商品中心。 +

+
详情 >
+
+
+ + 已提交 + +
+ +
+ 显示 1 到 10 条,共 112 条已填报记录 +
+ + + + + +
+
+
+
+ + + \ No newline at end of file