From 7f4fd9a7d182b8da1a7130355c718914cc086293 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 11 十一月 2025 16:41:55 +0800
Subject: [PATCH] feat: s
---
src/views/FlexJobManage/FlexJobManage.vue | 95 ++++++++++++++++++++++++-----------------------
1 files changed, 49 insertions(+), 46 deletions(-)
diff --git a/src/views/FlexJobManage/FlexJobManage.vue b/src/views/FlexJobManage/FlexJobManage.vue
index b4522c1..67a3486 100644
--- a/src/views/FlexJobManage/FlexJobManage.vue
+++ b/src/views/FlexJobManage/FlexJobManage.vue
@@ -79,17 +79,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="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"
@@ -123,12 +154,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';
@@ -145,31 +174,19 @@
name: 'FlexJobManageList',
});
-const operationBtns = defineOperationBtns([
- {
- data: {
- enCode: 'editBtn',
- name: '缂栬緫',
- },
+const operationBtnMap: Record<string, OperationBtnType> = {
+ editBtn: {
emits: {
onClick: (role) => openDialog(role),
},
},
- {
- data: {
- enCode: 'detailBtn',
- name: '璇︽儏',
- },
+ detailBtn: {
emits: {
onClick: (role: API.GetEnterpriseEmployeesQueryResultItem) =>
handleStaffDetailEdit({ id: role.id, tabType: 'info' }),
},
},
- {
- data: {
- enCode: 'enterpriseSignBtn',
- name: '浼佷笟绛剧害',
- },
+ enterpriseSignBtn: {
emits: {
onClick: (role) => handleEnterpriseSign(role),
},
@@ -181,11 +198,7 @@
),
},
},
- {
- data: {
- enCode: 'inviteSignBtn',
- name: '閭�璇风绾�',
- },
+ inviteSignBtn: {
emits: {
onClick: (role) => handleInviteSign(role),
},
@@ -197,11 +210,7 @@
),
},
},
- {
- data: {
- enCode: 'unSignBtn',
- name: '瑙g害',
- },
+ unSignBtn: {
emits: {
onClick: (role) => handleUnSign(role),
},
@@ -213,17 +222,11 @@
),
},
},
- // {
- // data: {
- // enCode: 'delBtn',
- // name: '鍒犻櫎',
- // },
- // props: { type: 'danger' },
- // emits: {
- // onClick: (role) => handleDelete(role),
- // },
- // },
-]);
+};
+
+const { checkSubModuleItemShow, column, operationBtns } = useAccess({
+ operationBtnMap,
+});
const router = useRouter();
--
Gitblit v1.9.1