zhengyiming
2025-11-11 7f4fd9a7d182b8da1a7130355c718914cc086293
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">批量解约</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"
            >批量解约</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: '解约',
    },
  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();