From 35968630a8702fcd0092757436f20751f51d3387 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期四, 18 九月 2025 14:03:17 +0800
Subject: [PATCH] Merge branch 'ywx' into dev

---
 src/views/collaborativeApproval/sealManagement/index.vue |   74 ++++++++++++++++++++-----------------
 1 files changed, 40 insertions(+), 34 deletions(-)

diff --git a/src/views/collaborativeApproval/sealManagement/index.vue b/src/views/collaborativeApproval/sealManagement/index.vue
index 4cf5a14..42d3ecf 100644
--- a/src/views/collaborativeApproval/sealManagement/index.vue
+++ b/src/views/collaborativeApproval/sealManagement/index.vue
@@ -3,22 +3,19 @@
     <el-card class="box-card">
       <template #header>
         <div class="card-header">
-          <span>鐢ㄥ嵃绠$悊涓庤绔犲埗搴﹀彂甯�</span>
-          <el-button type="primary" @click="showSealApplyDialog = true">
-            <el-icon><Plus /></el-icon>
-            鐢宠鐢ㄥ嵃
-          </el-button>
+          <span>鐢ㄥ嵃绠$悊鍙戝竷</span>
         </div>
       </template>
 
-      <el-tabs v-model="activeTab" type="border-card">
-        <!-- 鐢ㄥ嵃鐢宠绠$悊 -->
-        <el-tab-pane label="鐢ㄥ嵃鐢宠绠$悊" name="seal">
-          <div class="tab-content">
-            <el-row :gutter="20" class="mb-20">
+      
+   <!-- 鐢ㄥ嵃鐢宠绠$悊 -->
+        <div class="tab-content">
+            <el-row :gutter="20" class="mb-20 ">
+              <span class="ml-10">鐢ㄥ嵃鏍囬锛�</span>
               <el-col :span="6">
                 <el-input v-model="sealSearchForm.title" placeholder="璇疯緭鍏ョ敵璇锋爣棰�" clearable />
               </el-col>
+              <span class="search_title">瀹℃壒鐘舵�侊細</span>
               <el-col :span="4">
                 <el-select v-model="sealSearchForm.status" placeholder="瀹℃壒鐘舵��" clearable>
                   <el-option label="寰呭鎵�" value="pending" />
@@ -29,6 +26,8 @@
               <el-col :span="4">
                 <el-button type="primary" @click="searchSealApplications">鎼滅储</el-button>
                 <el-button @click="resetSealSearch">閲嶇疆</el-button>
+                <el-button type="primary" @click="showSealApplyDialog = true">鐢宠鐢ㄥ嵃
+                </el-button>
               </el-col>
             </el-row>
 
@@ -72,12 +71,16 @@
                 </template>
               </el-table-column>
             </el-table>
-          </div>
-        </el-tab-pane>
+        </div> 
+    </el-card>
+      
+        
+          
+        
 
         <!-- 瑙勭珷鍒跺害绠$悊 -->
-        <el-tab-pane label="瑙勭珷鍒跺害绠$悊" name="regulations">
-          <div class="tab-content">
+        
+          <!-- <div class="tab-content">
             <el-row :gutter="20" class="mb-20">
               <el-col :span="6">
                 <el-input v-model="regulationSearchForm.title" placeholder="璇疯緭鍏ュ埗搴︽爣棰�" clearable />
@@ -128,19 +131,9 @@
                 </template>
               </el-table-column>
             </el-table>
-                  <!-- 鍒嗛〉
-            <pagination
-              v-show="total > 0"
-              :total="total"
-              layout="total, sizes, prev, pager, next, jumper"
-              :page="page.current"
-              :limit="page.size"
-              @pagination="paginationChange"
-            /> -->
-          </div>
-        </el-tab-pane>
-      </el-tabs>
-    </el-card>
+                
+          </div> -->
+        
 
     <!-- 鐢ㄥ嵃鐢宠瀵硅瘽妗� -->
     <el-dialog v-model="showSealApplyDialog" title="鐢宠鐢ㄥ嵃" width="600px">
@@ -179,7 +172,7 @@
     </el-dialog>
 
     <!-- 瑙勭珷鍒跺害鍙戝竷瀵硅瘽妗� -->
-    <el-dialog v-model="showRegulationDialog" :title="operationType === 'add' ? '鍙戝竷鍒跺害' : '缂栬緫鍒跺害'" width="800px">
+    <!-- <el-dialog v-model="showRegulationDialog" :title="operationType === 'add' ? '鍙戝竷鍒跺害' : '缂栬緫鍒跺害'" width="800px">
       <el-form :model="regulationForm" :rules="regulationRules" ref="regulationFormRef" label-width="100px">
         <el-form-item label="鍒跺害缂栧彿" prop="regulationNum">
           <el-input v-model="regulationForm.regulationNum" placeholder="璇疯緭鍏ュ埗搴︾紪鍙�" />
@@ -225,7 +218,7 @@
           <el-button type="primary" @click="submitRegulation">鍙戝竷鍒跺害</el-button>
         </span>
       </template>
-    </el-dialog>
+    </el-dialog> -->
 
     <!-- 鐢ㄥ嵃璇︽儏瀵硅瘽妗� -->
     <el-dialog v-model="showSealDetailDialog" title="鐢ㄥ嵃鐢宠璇︽儏" width="700px">
@@ -312,6 +305,8 @@
 import { el } from 'element-plus/es/locales.mjs'
 import { getUserProfile } from '@/api/system/user.js'
 import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js";
+import useUserStore from '@/store/modules/user'
+import { userLoginFacotryList } from "@/api/system/user.js"
 
 // 鍝嶅簲寮忔暟鎹�
 const currentUser = ref(null)
@@ -319,6 +314,7 @@
 const operationType = ref('add')
 const tableData = ref([])
 // 鐢ㄥ嵃鐢宠鐩稿叧
+const userStore = useUserStore()
 const showSealApplyDialog = ref(false)
 const tableLoading = ref(false)
 const showSealDetailDialog = ref(false)
@@ -727,16 +723,26 @@
   })
 }
 
-
-
 // 鑾峰彇鍗扮珷鐢宠鍒楄〃鏁版嵁
 const getSealApplicationList = async () => {
   tableLoading.value = true
   listSealApplication(page,sealSearchForm)
   .then(res => {
-
-    sealApplications.value = res.data.records
-    page.value.total = res.data.total;
+    //鑾峰彇褰撳墠鐧诲綍鐨勯儴闂ㄤ俊鎭�
+// 鑾峰彇褰撳墠鐧诲綍鐨勯儴闂ㄤ俊鎭苟杩囨护鏁版嵁
+    const currentFactoryName = userStore.currentFactoryName
+    if (currentFactoryName) {
+      // 鏍规嵁currentFactoryName杩囨护鍑篸epartment鐩稿悓鐨勬暟鎹�
+      sealApplications.value = res.data.records.filter(item => item.department === currentFactoryName)
+      // 鏇存柊杩囨护鍚庣殑鎬绘暟
+      page.value.total = sealApplications.value.length
+    } else {
+      // 濡傛灉娌℃湁currentFactoryName锛屽垯鏄剧ず鎵�鏈夋暟鎹�
+      sealApplications.value = res.data.records
+      page.value.total = res.data.total
+    }
+    // sealApplications.value = res.data.records
+    // page.value.total = res.data.total;
     tableLoading.value = false;
 
   }).catch(err => {

--
Gitblit v1.9.3