From e8dcc0d7be2904a9a7f908bfc3227020e98de7bb Mon Sep 17 00:00:00 2001 From: ouhaolan Date: Fri, 3 Apr 2026 16:51:26 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9=EF=BC=8C?= =?UTF-8?q?=E9=97=A8=E5=BA=97=E7=94=A8=E6=88=B7=E5=8A=A0=E5=85=A5=E5=88=86?= =?UTF-8?q?=E9=85=8D=E8=A7=92=E8=89=B2=20=E6=9F=A5=E8=AF=A2=E8=A7=92?= =?UTF-8?q?=E8=89=B2=20=E9=97=A8=E5=BA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ydoyun/storeuser/index.ts | 4 + src/router/modules/remaining.ts | 87 ------------ src/views/ydoyun/store/StoreTree.vue | 21 ++- src/views/ydoyun/storeuser/index.vue | 191 ++++++++++++++++++++++++--- 4 files changed, 196 insertions(+), 107 deletions(-) diff --git a/src/api/ydoyun/storeuser/index.ts b/src/api/ydoyun/storeuser/index.ts index 9e95b7d..3a4980b 100644 --- a/src/api/ydoyun/storeuser/index.ts +++ b/src/api/ydoyun/storeuser/index.ts @@ -12,6 +12,10 @@ export interface StoreUser { password?: string // 密码 mobile?: string // 手机号码 status?: number // 状态 + /** 角色名称(逗号拼接,列表接口返回) */ + roleNames?: string + /** 门店名称(列表接口返回) */ + storeName?: string } // 门店-用户绑定 API diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index af47fb1..39a10c0 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -757,93 +757,6 @@ const remainingRouter: AppRouteRecordRaw[] = [ } ] }, - { - path: '/reports', - component: Layout, - name: 'Reports', - meta: { - hidden: false, - title: '数据报表' - }, - children: [ - { - path: 'sales-daily', - name: 'SalesDailyAI', - meta: { - title: '销售日报', - icon: 'ep:calendar', - noCache: true, - hidden: false - }, - component: () => import('@/views/ydoyun/report/salesdaily/index.vue') - }, - { - path: 'lijun/category-diagnostic', - name: 'CategoryDiagnostic', - meta: { - title: '品类诊断', - noCache: true, - hidden: true, - canTo: true - }, - component: () => import('@/views/ydoyun/report/lijun/reportpage6/components/categoryCardListComponents.vue') - }, - { - path: 'lijun/supplier-ranking', - name: 'SupplierRanking', - meta: { - title: '供货商销售排行', - noCache: true, - hidden: true, - canTo: true - }, - component: () => import('@/views/ydoyun/report/lijun/reportpage6/components/SupplierRanking.vue') - }, - { - path: 'lijun/supplier-performance', - name: 'SupplierPerformance', - meta: { - title: '供应商详情', - hidden: true, - canTo: true - }, - component: () => import('@/views/ydoyun/report/lijun/reportpage6/components/SupplierPerformancePage.vue') - }, - { - path: 'lijun/middle-class-ranking', - name: 'MiddleClassRanking', - meta: { - title: '中类销售排名', - noCache: true, - hidden: true, - canTo: true - }, - component: () => import('@/views/ydoyun/report/lijun/reportpage6/components/MiddleClassRanking.vue') - }, - { - path: 'lijun/product-cards', - name: 'ProductCards', - meta: { - title: '查看更多产品卡片', - noCache: true, - hidden: true, - canTo: true - }, - component: () => import('@/views/ydoyun/report/lijun/reportpage6/components/ProductCardsPage.vue') - }, - { - path: 'lijun/reportpage6/detail', - name: 'ProductDetailPage', - meta: { - title: '商品明细详情', - noCache: true, - hidden: true, - canTo: true - }, - component: () => import('@/views/ydoyun/report/lijun/reportpage6/detail.vue') - } - ] - }, { path: '/ydoyuntag', component: Layout, diff --git a/src/views/ydoyun/store/StoreTree.vue b/src/views/ydoyun/store/StoreTree.vue index b6df557..fb455ab 100644 --- a/src/views/ydoyun/store/StoreTree.vue +++ b/src/views/ydoyun/store/StoreTree.vue @@ -18,13 +18,13 @@
- ([]) const loading = ref(false) const total = ref(0) const currentStore = ref(null) +const tableRef = ref() +/** 程序化清空选中时,不向父组件派发 node-click,避免与右侧「重置」重复请求 */ +let suppressNodeClickEmit = false const queryParams = reactive({ pageNo: 1, pageSize: 10, @@ -85,15 +88,24 @@ const handleSearch = () => { /** 处理门店选择 */ const handleStoreChange = (row: Store | null) => { + currentStore.value = row + if (suppressNodeClickEmit) { + suppressNodeClickEmit = false + return + } if (row) { - currentStore.value = row emits('node-click', row) } else { - currentStore.value = null emits('node-click', undefined) } } +/** 取消当前门店选中(清表格高亮;不向父组件派发 node-click,由父组件重置查询条件) */ +const clearStoreSelection = () => { + suppressNodeClickEmit = true + tableRef.value?.setCurrentRow(null) +} + /** 初始化 */ onMounted(async () => { await getList() @@ -101,6 +113,7 @@ onMounted(async () => { // 暴露getList方法供父组件调用 defineExpose({ - getList + getList, + clearStoreSelection }) diff --git a/src/views/ydoyun/storeuser/index.vue b/src/views/ydoyun/storeuser/index.vue index 36ec911..882eac8 100644 --- a/src/views/ydoyun/storeuser/index.vue +++ b/src/views/ydoyun/storeuser/index.vue @@ -43,6 +43,31 @@ class="!w-240px" /> + + + + + + + + 批量删除 + + 导出 + - + + + + + + + - +