徐滕 1 settimana fa
parent
commit
724bdb14ee

+ 10 - 0
forge-admin-ui/src/components/flow/FlowTaskCardList.vue

@@ -43,6 +43,10 @@
       </div>
     </div>
 
+    <div v-if="$slots.tabs" class="task-list-tabs">
+      <slot name="tabs" />
+    </div>
+
     <n-spin :show="loading">
       <div v-if="items.length > 0" class="task-card-stack">
         <article
@@ -286,6 +290,12 @@ function clearSelection() {
   line-height: 1;
 }
 
+.task-list-tabs {
+  flex: 0 0 auto;
+  padding: 0 14px;
+  border-bottom: 1px solid var(--border-light);
+}
+
 .task-card-stack {
   display: flex;
   width: 100%;

+ 18 - 12
forge-admin-ui/src/views/flow/notification.vue

@@ -17,13 +17,18 @@
       @update:page="pagination.onChange"
       @update:page-size="pagination.onUpdatePageSize"
     >
+      <template #tabs>
+        <NTabs v-model:value="activeTab" type="line" @update:value="handleTabChange">
+          <NTabPane name="unread" tab="未读" />
+          <NTabPane name="read" tab="已读" />
+        </NTabs>
+      </template>
       <template #filters>
         <n-select
-          v-model:value="queryParams.isRead"
-          placeholder="已读状态"
+          v-model:value="queryParams.title"
+          placeholder="通过名称搜索"
           clearable
           class="category-select"
-          :options="readStatusOptions"
           @update:value="handleSearch"
         />
         <NButton secondary @click="handleReset">
@@ -240,8 +245,8 @@
 </template>
 
 <script setup>
-import { NButton, NEmpty } from 'naive-ui'
-import { computed, onMounted, reactive, ref } from 'vue'
+import { NButton, NEmpty, NTabPane, NTabs } from 'naive-ui'
+import { onMounted, reactive, ref } from 'vue'
 import flowApi from '@/api/flow'
 import UserAvatar from '@/components/common/UserAvatar.vue'
 import DingFlowViewer from '@/components/flow-designer/viewer/DingFlowViewer.vue'
@@ -255,6 +260,7 @@ import { getRowDisplayTitle, getTaskDisplayName } from './utils/processDisplay'
 const userStore = useUserStore()
 const loading = ref(false)
 const dataSource = ref([])
+const activeTab = ref('unread') // 默认未读
 const pagination = reactive({
   page: 1,
   pageSize: 10,
@@ -272,7 +278,7 @@ const pagination = reactive({
   },
 })
 
-const queryParams = reactive({ title: '', isRead: null })
+const queryParams = reactive({ title: '', isRead: 0 }) // 默认查询未读
 const categoryTreeOptions = ref([])
 const unreadCount = ref(0)
 const selectedTaskKeys = ref([])
@@ -284,11 +290,6 @@ const approvalHistory = ref([])
 const orderDetail = ref(null)
 const orderLoading = ref(false)
 
-const readStatusOptions = computed(() => [
-  { label: '未读', value: 0 },
-  { label: '已读', value: 1 },
-])
-
 function getCategoryDisplayName(row) {
   return row?.categoryName || resolveFlowCategoryLabel(row?.category, categoryTreeOptions.value, '-') || '-'
 }
@@ -377,6 +378,11 @@ async function loadUnreadCount() {
   }
 }
 
+function handleTabChange(tab) {
+  queryParams.isRead = tab === 'unread' ? 0 : 1
+  handleSearch()
+}
+
 function handleSearch() {
   pagination.page = 1
   loadData()
@@ -384,7 +390,7 @@ function handleSearch() {
 
 function handleReset() {
   queryParams.title = ''
-  queryParams.isRead = null
+  queryParams.isRead = activeTab.value === 'unread' ? 0 : 1
   handleSearch()
 }
 

File diff suppressed because it is too large
+ 770 - 1686
forge-admin-ui/src/views/home/index.vue


File diff suppressed because it is too large
+ 4 - 4
forge-server/forge-business/forge-restaurant/餐饮模块迁移分析文档.md