wupengfei
9 小时以前 ecaa5e0af0a087f256d497f7b7656f2900342226
Merge branch 'master' of http://120.26.58.240:8888/r/flexJobAdmin
1个文件已添加
11个文件已修改
232 ■■■■■ 已修改文件
.eslintrc-auto-import.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
auto-imports.d.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/constants/apiEnum.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/hooks/electronSign.ts 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/hooks/index.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/electronSign.ts 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/enterpriseEmployee.ts 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/typings.d.ts 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/EnterpriseManage/EnterpriseManageList.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ProtocolManage/EditTemplate.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ProtocolManage/components/AddOrEditTemplateDialog.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
types/api.d.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.eslintrc-auto-import.json
@@ -221,6 +221,7 @@
    "useCssModule": true,
    "useCssVars": true,
    "useDictionaryDataSelect": true,
    "useEnabledElectronSignSettings": true,
    "useGetDictionaryCategorySelect": true,
    "useGlobalEventContext": true,
    "useGlobalEventProvide": true,
auto-imports.d.ts
@@ -222,6 +222,7 @@
  const toValue: typeof import('vue')['toValue']
  const triggerRef: typeof import('vue')['triggerRef']
  const unref: typeof import('vue')['unref']
  const useAA: typeof import('./src/hooks/electronSign')['useAA']
  const useAccess: typeof import('./src/hooks/useAccess')['useAccess']
  const useAllAreaList: typeof import('./src/hooks/dic')['useAllAreaList']
  const useAllRoleList: typeof import('./src/hooks/useUser')['useAllRoleList']
@@ -233,6 +234,7 @@
  const useCssModule: typeof import('vue')['useCssModule']
  const useCssVars: typeof import('vue')['useCssVars']
  const useDictionaryDataSelect: typeof import('./src/hooks/dic')['useDictionaryDataSelect']
  const useEnabledElectronSignSettings: typeof import('./src/hooks/electronSign')['useEnabledElectronSignSettings']
  const useGetDictionaryCategorySelect: typeof import('./src/hooks/dic')['useGetDictionaryCategorySelect']
  const useGlobalEventContext: typeof import('./src/hooks/useEvent')['useGlobalEventContext']
  const useGlobalEventProvide: typeof import('./src/hooks/useEvent')['useGlobalEventProvide']
@@ -511,6 +513,7 @@
    readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
    readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
    readonly useDictionaryDataSelect: UnwrapRef<typeof import('./src/hooks/dic')['useDictionaryDataSelect']>
    readonly useEnabledElectronSignSettings: UnwrapRef<typeof import('./src/hooks/electronSign')['useEnabledElectronSignSettings']>
    readonly useGetDictionaryCategorySelect: UnwrapRef<typeof import('./src/hooks/dic')['useGetDictionaryCategorySelect']>
    readonly useGlobalEventContext: UnwrapRef<typeof import('./src/hooks/useEvent')['useGlobalEventContext']>
    readonly useGlobalEventProvide: UnwrapRef<typeof import('./src/hooks/useEvent')['useGlobalEventProvide']>
src/constants/apiEnum.ts
@@ -331,6 +331,10 @@
  Pass = 20,
  /**已拒签 */
  Refuse = 30,
  /**生效中 */
  Effect = 40,
  /**已终止 */
  Stop = 50,
}
/** 任务验收状态 */
src/hooks/electronSign.ts
New file
@@ -0,0 +1,43 @@
import { useQuery, useQueryClient } from '@tanstack/vue-query';
import * as electronSignServices from '@/services/api/electronSign';
type UseEnabledElectronSignSettingsOptions = {
  enterpriseId?: MaybeRef<string>;
};
export function useEnabledElectronSignSettings(
  options: UseEnabledElectronSignSettingsOptions = {}
) {
  const { enterpriseId } = options;
  const queryClient = useQueryClient();
  const { data } = useQuery({
    queryKey: ['electronSignServices/getEnabledElectronSignSettings', enterpriseId],
    queryFn: async () => {
      let res = await electronSignServices.getEnabledElectronSignSettings(
        { enterpriseId: unref(enterpriseId) },
        { showLoading: false }
      );
      return res;
    },
    select(data) {
      return data.map((x) => ({
        ...x,
        accessName: EnumElectronSignAccessText[x.access],
      }));
    },
    placeholderData: () => [] as API.GetEnabledElectronSignSettingsQueryResultItem[],
  });
  function invalidateQueries() {
    return queryClient.invalidateQueries({
      queryKey: ['electronSignServices/getEnabledElectronSignSettings', enterpriseId],
    });
  }
  return {
    enabledElectronSignSettings: data,
    invalidateQueries,
  };
}
src/hooks/index.ts
@@ -9,3 +9,4 @@
export * from './dic';
export * from './menu';
export * from './portraitTable';
export * from './electronSign';
src/services/api/electronSign.ts
@@ -65,6 +65,24 @@
  );
}
/** 查询已启用的电子签配置 GET /api/user/electronSign/getEnabledElectronSignSettings */
export async function getEnabledElectronSignSettings(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIgetEnabledElectronSignSettingsParams,
  options?: API.RequestConfig
) {
  return request<API.GetEnabledElectronSignSettingsQueryResultItem[]>(
    '/api/user/electronSign/getEnabledElectronSignSettings',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}
/** 查询企业合同模板日志分页列表数据 POST /api/user/electronSign/getEnterpriseContractTemplateLogs */
export async function getEnterpriseContractTemplateLogs(
  body: API.GetEnterpriseContractTemplateLogsQuery,
src/services/api/enterpriseEmployee.ts
@@ -35,6 +35,44 @@
  );
}
/** 查询个人用户签约详情 GET /api/user/enterpriseEmployee/getEnterpriseEmployeeElectronSign */
export async function getEnterpriseEmployeeElectronSign(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIgetEnterpriseEmployeeElectronSignParams,
  options?: API.RequestConfig
) {
  return request<API.GetEnterpriseEmployeeElectronSignQueryResult>(
    '/api/user/enterpriseEmployee/getEnterpriseEmployeeElectronSign',
    {
      method: 'GET',
      params: {
        ...params,
        request: undefined,
        ...params['request'],
      },
      ...(options || {}),
    }
  );
}
/** 查询个人用户签约列表 POST /api/user/enterpriseEmployee/getEnterpriseEmployeeElectronSigns */
export async function getEnterpriseEmployeeElectronSigns(
  body: API.GetEnterpriseEmployeeElectronSignsQuery,
  options?: API.RequestConfig
) {
  return request<API.GetEnterpriseEmployeeElectronSignsQueryResult>(
    '/api/user/enterpriseEmployee/getEnterpriseEmployeeElectronSigns',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json-patch+json',
      },
      data: body,
      ...(options || {}),
    }
  );
}
/** 查询灵工分页列表数据 POST /api/user/enterpriseEmployee/getEnterpriseEmployees */
export async function getEnterpriseEmployees(
  body: API.GetEnterpriseEmployeesQuery,
src/services/api/typings.d.ts
@@ -66,9 +66,19 @@
    withChildren?: boolean;
  }
  interface APIgetEnabledElectronSignSettingsParams {
    /** 企业Id */
    enterpriseId?: string;
  }
  interface APIgetEnterpriseElectronSignSettingParams {
    /** Id */
    id?: string;
  }
  interface APIgetEnterpriseEmployeeElectronSignParams {
    /** 查询个人用户签约详情 */
    request?: GetEnterpriseEmployeeElectronSignQuery;
  }
  interface APIgetEnterpriseEmployeeParams {
@@ -665,6 +675,10 @@
    Pass = 20,
    /**已拒签 */
    Refuse = 30,
    /**生效中 */
    Effect = 40,
    /**已终止 */
    Stop = 50,
  }
  enum EnumTaskUserSubmitCheckReceiveStatus {
@@ -940,6 +954,42 @@
    /** 错误码 */
    errorCode?: string;
    data?: GetEnterpriseElectronSignSettingQueryResult;
    /** 执行成功 */
    success?: boolean;
    /** 错误信息 */
    msg?: any;
    /** 附加数据 */
    extras?: any;
    /** 时间戳 */
    timestamp?: number;
  }
  interface FriendlyResultGetEnterpriseEmployeeElectronSignQueryResult {
    /** 跟踪Id */
    traceId?: string;
    /** 状态码 */
    code?: number;
    /** 错误码 */
    errorCode?: string;
    data?: GetEnterpriseEmployeeElectronSignQueryResult;
    /** 执行成功 */
    success?: boolean;
    /** 错误信息 */
    msg?: any;
    /** 附加数据 */
    extras?: any;
    /** 时间戳 */
    timestamp?: number;
  }
  interface FriendlyResultGetEnterpriseEmployeeElectronSignsQueryResult {
    /** 跟踪Id */
    traceId?: string;
    /** 状态码 */
    code?: number;
    /** 错误码 */
    errorCode?: string;
    data?: GetEnterpriseEmployeeElectronSignsQueryResult;
    /** 执行成功 */
    success?: boolean;
    /** 错误信息 */
@@ -1591,6 +1641,25 @@
    errorCode?: string;
    /** 数据 */
    data?: GetAreaSelectQueryResultOption[];
    /** 执行成功 */
    success?: boolean;
    /** 错误信息 */
    msg?: any;
    /** 附加数据 */
    extras?: any;
    /** 时间戳 */
    timestamp?: number;
  }
  interface FriendlyResultListGetEnabledElectronSignSettingsQueryResultItem {
    /** 跟踪Id */
    traceId?: string;
    /** 状态码 */
    code?: number;
    /** 错误码 */
    errorCode?: string;
    /** 数据 */
    data?: GetEnabledElectronSignSettingsQueryResultItem[];
    /** 执行成功 */
    success?: boolean;
    /** 错误信息 */
@@ -2367,6 +2436,16 @@
    isDisabled?: boolean;
  }
  interface GetEnabledElectronSignSettingsQueryResultItem {
    access?: EnumElectronSignAccess;
    /** 实名费用 */
    realVerifyCost?: number;
    /** 签约费用 */
    signCost?: number;
    /** 一口价 */
    mergeSignCost?: number;
  }
  interface GetEnterpriseContractTemplateLogsQuery {
    /** 模板Id */
    id?: string;
@@ -2444,6 +2523,29 @@
    electronSignAccesses?: EnumElectronSignAccess[];
  }
  type GetEnterpriseEmployeeElectronSignQuery = Record<string, any>;
  type GetEnterpriseEmployeeElectronSignQueryResult = Record<string, any>;
  interface GetEnterpriseEmployeeElectronSignsQuery {
    userSignContractStatus?: EnumTaskUserSignContractStatus;
    pageModel?: PagedListQueryPageModel;
  }
  interface GetEnterpriseEmployeeElectronSignsQueryResult {
    pageModel?: PagedListQueryResultPageModel;
    /** 数据 */
    data?: GetEnterpriseEmployeeElectronSignsQueryResultItem[];
  }
  interface GetEnterpriseEmployeeElectronSignsQueryResultItem {
    /** Id */
    id?: string;
    /** 企业全称 */
    enterpriseName?: string;
    userSignContractStatus?: EnumTaskUserSignContractStatus;
  }
  interface GetEnterpriseEmployeeQueryResult {
    /** 灵工Id */
    id?: string;
src/views/EnterpriseManage/EnterpriseManageList.vue
@@ -91,6 +91,8 @@
const state = reactive({ ...BaseState });
const { invalidateQueries } = useEnabledElectronSignSettings();
onMounted(async () => {
  await getList();
  state.loading = false;
@@ -219,13 +221,16 @@
//     return await flexEnterpriseServices.createOrEditFlexEnterpriseBankSetting(params);
//   } catch (error) {}
// }
async function createOrEditFlexEnterpriseSignSetting() {
  try {
    let params: API.SetEnterpriseElectronSignSettingCommand = {
      id: editForm.id,
      electronSignAccesses: editForm.electronSignAccesses.filter(Boolean),
    };
    return await enterpriseServices.setEnterpriseElectronSignSetting(params);
    let res = await enterpriseServices.setEnterpriseElectronSignSetting(params);
    invalidateQueries();
    return res;
  } catch (error) {}
}
async function createOrEditFlexEnterpriseMessageSetting() {
src/views/ProtocolManage/EditTemplate.vue
@@ -197,6 +197,7 @@
    title: '新增模板',
    isEnterpriseUserCreated: false,
    templateEditData: '',
    enterpriseId: '',
  },
});
@@ -213,6 +214,7 @@
        access: row.access,
        isEnterpriseUserCreated: detail.isEnterpriseUserCreated,
        templateEditData: detail.templateEditData,
        enterpriseId: enterpriseId,
      });
    } else {
      handleAdd();
src/views/ProtocolManage/components/AddOrEditTemplateDialog.vue
@@ -22,7 +22,9 @@
        <ProFormSelect
          placeholder="请选择电子签通道"
          v-model="form.access"
          :value-enum="EnumElectronSignAccessText"
          :value-enum="enabledElectronSignSettings"
          enum-value-key="access"
          enum-label-key="accessName"
        ></ProFormSelect>
      </ProFormItemV2>
      <ProFormItemV2 label="业务编码:" prop="code" :check-rules="[{ message: '请输入业务编码' }]">
@@ -91,6 +93,7 @@
  file: UploadUserFile[];
  access: EnumElectronSignAccess;
  isEnterpriseUserCreated: boolean;
  enterpriseId: string;
};
const form = defineModel<Form>('form');
@@ -100,6 +103,10 @@
  (e: 'onCancel'): void;
}>();
const { enabledElectronSignSettings } = useEnabledElectronSignSettings({
  enterpriseId: computed(() => form.value.enterpriseId),
});
const dialogForm = ref<FormInstance>();
function onDialogClose() {
types/api.d.ts
@@ -43,4 +43,8 @@
    quickQuery?: string
  }
  interface GetEnabledElectronSignSettingsQueryResultItem{
    accessName?: string;
  }
}