From 8550c7090368487be0a9f13ff5ff955b1ae9d028 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 11 十一月 2025 16:45:11 +0800
Subject: [PATCH] Merge branch 'dev-1.3.0.2' of http://120.26.58.240:8888/r/flexJobUndertake into dev-1.3.0.2

---
 src/views/FlexJobManage/FlexJobManage.vue |  168 ++++++++++++++++++++++++++++---------------------------
 1 files changed, 85 insertions(+), 83 deletions(-)

diff --git a/src/views/FlexJobManage/FlexJobManage.vue b/src/views/FlexJobManage/FlexJobManage.vue
index 833ab97..75e4801 100644
--- a/src/views/FlexJobManage/FlexJobManage.vue
+++ b/src/views/FlexJobManage/FlexJobManage.vue
@@ -101,18 +101,48 @@
           </QueryFilterItem>
         </template>
         <template #btn>
-          <el-button @click="handleDownloadTemplate()" type="primary" link>妯℃澘涓嬭浇</el-button>
-          <el-button @click="handleBatchImportAdd()" type="primary">鎵归噺瀵煎叆</el-button>
-          <el-button @click="handleStaffInfoAdd()" type="primary">鏂板缓</el-button>
-          <!-- <el-button @click="handleBatchUnSign()" type="primary">鎵归噺瑙g害</el-button>
-          <el-button @click="handleSendShotMessage()" type="primary">鐭俊鍙戦��</el-button>
-          <el-button @click="handleBatchSign()" type="primary">鎵归噺绛剧害</el-button>
-          <el-button @click="handleEnterpriseBatchSign()" type="primary">鎵归噺浼佷笟绛剧害</el-button> -->
+          <el-button
+            v-if="checkSubModuleItemShow('pageButton', 'importBtn')"
+            @click="handleDownloadTemplate()"
+            type="primary"
+            link
+            >妯℃澘涓嬭浇</el-button
+          >
+          <el-button
+            v-if="checkSubModuleItemShow('pageButton', 'importBtn')"
+            @click="handleBatchImportAdd()"
+            type="primary"
+            >鎵归噺瀵煎叆</el-button
+          >
+          <el-button
+            v-if="checkSubModuleItemShow('pageButton', 'batchUnSignBtn')"
+            @click="handleBatchUnSign()"
+            type="primary"
+            >鎵归噺瑙g害</el-button
+          >
+          <el-button
+            v-if="checkSubModuleItemShow('pageButton', 'sendShotBtn')"
+            @click="handleSendShotMessage()"
+            type="primary"
+            >鐭俊鍙戦��</el-button
+          >
+          <el-button
+            v-if="checkSubModuleItemShow('pageButton', 'batchSignBtn')"
+            @click="handleBatchSign()"
+            type="primary"
+            >鎵归噺绛剧害</el-button
+          >
+          <el-button
+            v-if="checkSubModuleItemShow('pageButton', 'enterpriseBatchSignBtn')"
+            @click="handleEnterpriseBatchSign()"
+            type="primary"
+            >鎵归噺浼佷笟绛剧害</el-button
+          >
         </template>
       </ProTableQueryFilterBar>
       <ProTableV2
         v-bind="proTableProps"
-        :columns="FlexJobManageColumns"
+        :columns="column"
         :operationBtns="operationBtns"
         show-column-check
         ref="proTable"
@@ -146,12 +176,10 @@
   FieldDatePicker,
   FieldRadio,
   FieldSelect,
-  defineOperationBtns,
   useFormDialog,
   UploadUserFile,
   XLSXUtils,
 } from '@bole-core/components';
-import { FlexJobManageColumns } from './constants';
 import { EnumTaskUserHireStatusText, EnumTaskUserSignContractStatusText } from '@/constants';
 import { Message } from '@bole-core/core';
 import { convertApi2FormUrlOnlyOne, downloadFileByUrl, format } from '@/utils';
@@ -168,85 +196,59 @@
   name: 'FlexJobManageList',
 });
 
-const operationBtns = defineOperationBtns([
-  // {
-  //   data: {
-  //     enCode: 'editBtn',
-  //     name: '缂栬緫',
-  //   },
-  //   emits: {
-  //     onClick: (role) => openDialog(role),
-  //   },
-  // },
-  {
-    data: {
-      enCode: 'detailBtn',
-      name: '璇︽儏',
+const operationBtnMap: Record<string, OperationBtnType> = {
+  editBtn: {
+    emits: {
+      onClick: (role) => openDialog(role),
     },
+  },
+  detailBtn: {
     emits: {
       onClick: (role: API.GetEnterpriseEmployeesQueryResultItem) =>
         handleStaffDetailEdit({ id: role.id, tabType: 'info' }),
     },
   },
-  // {
-  //   data: {
-  //     enCode: 'enterpriseSignBtn',
-  //     name: '浼佷笟绛剧害',
-  //   },
-  //   emits: {
-  //     onClick: (role) => handleEnterpriseSign(role),
-  //   },
-  //   extraProps: {
-  //     hide: (row: API.GetEnterpriseEmployeesQueryResultItem) =>
-  //       !(
-  //         row.userSignContractStatus === EnumTaskUserSignContractStatus.Pass &&
-  //         row.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Wait
-  //       ),
-  //   },
-  // },
-  // {
-  //   data: {
-  //     enCode: 'inviteSignBtn',
-  //     name: '閭�璇风绾�',
-  //   },
-  //   emits: {
-  //     onClick: (role) => handleInviteSign(role),
-  //   },
-  //   extraProps: {
-  //     hide: (row: API.GetEnterpriseEmployeesQueryResultItem) =>
-  //       !(
-  //         row.userSignContractStatus !== EnumTaskUserSignContractStatus.Pass &&
-  //         row.hireStatus === EnumTaskUserHireStatus.Pass
-  //       ),
-  //   },
-  // },
-  // {
-  //   data: {
-  //     enCode: 'unSignBtn',
-  //     name: '瑙g害',
-  //   },
-  //   emits: {
-  //     onClick: (role) => handleUnSign(role),
-  //   },
-  //   extraProps: {
-  //     hide: (row: API.GetEnterpriseEmployeesQueryResultItem) =>
-  //       !(
-  //         row.userSignContractStatus === EnumTaskUserSignContractStatus.Pass &&
-  //         row.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Pass
-  //       ),
-  //   },
-  // },
-  // {
-  //   data: {
-  //     enCode: 'delBtn',
-  //     name: '鍒犻櫎',
-  //   },
-  //   props: { type: 'danger' },
-  //   emits: {
-  //     onClick: (role) => handleDelete(role),
-  //   },
-  // },
-]);
+  enterpriseSignBtn: {
+    emits: {
+      onClick: (role) => handleEnterpriseSign(role),
+    },
+    extraProps: {
+      hide: (row: API.GetEnterpriseEmployeesQueryResultItem) =>
+        !(
+          row.userSignContractStatus === EnumTaskUserSignContractStatus.Pass &&
+          row.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Wait
+        ),
+    },
+  },
+  inviteSignBtn: {
+    emits: {
+      onClick: (role) => handleInviteSign(role),
+    },
+    extraProps: {
+      hide: (row: API.GetEnterpriseEmployeesQueryResultItem) =>
+        !(
+          row.userSignContractStatus !== EnumTaskUserSignContractStatus.Pass &&
+          row.hireStatus === EnumTaskUserHireStatus.Pass
+        ),
+    },
+  },
+  unSignBtn: {
+    emits: {
+      onClick: (role) => handleUnSign(role),
+    },
+    extraProps: {
+      hide: (row: API.GetEnterpriseEmployeesQueryResultItem) =>
+        !(
+          row.userSignContractStatus === EnumTaskUserSignContractStatus.Pass &&
+          row.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Pass
+        ),
+    },
+  },
+};
+
+const { checkSubModuleItemShow, column, operationBtns } = useAccess({
+  operationBtnMap,
+});
 
 const router = useRouter();
 

--
Gitblit v1.9.1