From 60f24769048e3c36f8bdde0ac4649ee6f15df334 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期三, 06 八月 2025 14:59:57 +0800
Subject: [PATCH] '项目管理多选操作'

---
 src/views/system/dept/index.vue |   65 ++++++++++++++++++++++++++++++--
 1 files changed, 60 insertions(+), 5 deletions(-)

diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index f156df0..684bc00 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { ref, reactive, onMounted } from "vue";
+import { ref, reactive, onMounted, computed } from "vue";
 import { useDept } from "./utils/hook";
 import { PureTableBar } from "@/components/RePureTableBar";
 import { useRenderIcon } from "@/components/ReIcon/src/hooks";
@@ -8,6 +8,7 @@
 import EditPen from "~icons/ep/edit-pen";
 import Refresh from "~icons/ep/refresh";
 import AddFill from "~icons/ri/add-circle-line";
+import { useUserStoreHook } from "@/store/modules/user";
 
 defineOptions({
   name: "SystemDept"
@@ -15,11 +16,14 @@
 
 const formRef = ref();
 const tableRef = ref();
+
 const {
   form,
   state,
   loading,
   columns,
+  CGRcolumns,
+  selectedNum,
   dataList,
   onSearch,
   resetForm,
@@ -29,13 +33,18 @@
   handleSizeChange,
   handleCurrentChange,
   pagination,
-  checkboxAsRadio
-} = useDept();
+  checkboxAsRadio,
+  onSelectionCancel,
+  onbatchDel
+} = useDept(tableRef);
 
 function onFullscreen() {
   // 閲嶇疆琛ㄦ牸楂樺害
   tableRef.value.setAdaptive();
 }
+const nowRole = computed(() => {
+  return useUserStoreHook().nowRole;
+});
 
 onMounted(() => {});
 </script>
@@ -147,11 +156,35 @@
               />
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
+          <el-col
+            v-if="nowRole.code == 'CGR'"
+            :xs="24"
+            :sm="12"
+            :md="8"
+            :lg="6"
+            :xl="4"
+          >
             <el-form-item label="浠g悊鏈烘瀯锛�">
               <el-input
                 v-model="form.dailijigoumingcheng"
                 placeholder="璇疯緭鍏ヤ唬鐞嗘満鏋�"
+                clearable
+                class="w-[100%]!"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col
+            v-if="nowRole.code == 'DLJG'"
+            :xs="24"
+            :sm="12"
+            :md="8"
+            :lg="6"
+            :xl="4"
+          >
+            <el-form-item label="閲囪喘浜猴細">
+              <el-input
+                v-model="form.caigourenmingcheng"
+                placeholder="璇疯緭鍏ラ噰璐汉"
                 clearable
                 class="w-[100%]!"
               />
@@ -196,7 +229,7 @@
     </el-card>
     <PureTableBar
       title=""
-      :columns="columns"
+      :columns="nowRole.code == 'CGR' ? CGRcolumns : columns"
       :tableRef="tableRef?.getTableRef()"
       @refresh="onSearch"
       @fullscreen="onFullscreen"
@@ -211,6 +244,28 @@
         </el-button>
       </template> -->
       <template v-slot="{ size, dynamicColumns }">
+        <div
+          v-if="selectedNum > 0"
+          v-motion-fade
+          class="bg-[var(--el-fill-color-light)] w-full h-[46px] mb-2 pl-4 flex items-center"
+        >
+          <div class="flex-auto">
+            <span
+              style="font-size: var(--el-font-size-base)"
+              class="text-[rgba(42,46,54,0.5)] dark:text-[rgba(220,220,242,0.5)]"
+            >
+              宸查�� {{ selectedNum }} 椤�
+            </span>
+            <el-button type="primary" text @click="onSelectionCancel">
+              鍙栨秷閫夋嫨
+            </el-button>
+          </div>
+          <el-popconfirm title="鏄惁纭鍒犻櫎?" @confirm="onbatchDel">
+            <template #reference>
+              <el-button type="danger" text class="mr-1!"> 鎵归噺鍒犻櫎 </el-button>
+            </template>
+          </el-popconfirm>
+        </div>
         <pure-table
           ref="tableRef"
           adaptive

--
Gitblit v1.9.1