diff --git a/src/apis/employee/index.ts b/src/apis/employee/index.ts index ae68c25..9614a80 100644 --- a/src/apis/employee/index.ts +++ b/src/apis/employee/index.ts @@ -1,5 +1,5 @@ import http from '@/utils/http' -import type { CertificationInfo, CertificationListParams, CertificationListResponse, SimpleUserInfo } from './type' +import type { CertificationInfo, CertificationListParams, CertificationListResponse, SimpleUserInfo,CertificationPageResponse, CertificationReq } from './type' const { request } = http @@ -7,7 +7,7 @@ const { request } = http export type { CertificationInfo, CertificationListParams, CertificationListResponse, SimpleUserInfo } // 新增人员资质 -export function createCertification(data: CertificationInfo) { +export function createCertification(data: CertificationReq) { return request({ url: '/certification', method: 'post', @@ -74,4 +74,12 @@ export function getUserList() { url: '/user/list', method: 'get' }) -} \ No newline at end of file +} +// 查询人员资质信息分页列表(新接口) +export function getCertificationPage(params: CertificationListParams) { + return request({ + url: '/certification/page', + method: 'get', + params + }) +} \ No newline at end of file diff --git a/src/apis/employee/type.ts b/src/apis/employee/type.ts index 6f87b83..b54e3ff 100644 --- a/src/apis/employee/type.ts +++ b/src/apis/employee/type.ts @@ -11,19 +11,25 @@ export interface CertificationInfo { createTime?: string updateTime?: string } - +export interface CertificationReq { + certificationCode: string + certificationImage: string + certificationName: string + certificationType: string + userId: string + validityDateBegin: string + validityDateEnd: string +} /** 人员资质列表查询参数 */ export interface CertificationListParams { certificationName?: string certificationType?: string userName?: string - current?: number - size?: number } /** 人员资质列表响应 */ export interface CertificationListResponse { - records: CertificationInfo[] + data: CertificationInfo[] total: number current: number size: number @@ -32,7 +38,22 @@ export interface CertificationListResponse { /** 用户信息简化版 */ export interface SimpleUserInfo { userId: string - userName: string - account: string name: string -} \ No newline at end of file + account: string +} +export interface CertificationInfo { + certificationId?: string + certificationCode: string + certificationName: string + userId: string + userName?: string // 新增,后端会返回 +} + +// 分页响应 +export interface CertificationPageResponse { + rows: CertificationInfo[] + total: number + code?: number + msg?: string + [key: string]: any +} \ No newline at end of file diff --git a/src/views/hr/salary/certification/index.vue b/src/views/hr/salary/certification/index.vue index 82a00ce..fe4e1c0 100644 --- a/src/views/hr/salary/certification/index.vue +++ b/src/views/hr/salary/certification/index.vue @@ -15,30 +15,15 @@ - + - + - + @@ -62,28 +47,15 @@ - + @@ -105,19 +77,9 @@ - - + + @@ -141,19 +103,9 @@ - - + + {{ user.name }}({{ user.account }}) @@ -164,43 +116,24 @@ - + - + - +