diff --git a/src/api/measure/person.ts b/src/api/measure/person.ts new file mode 100644 index 0000000..a193040 --- /dev/null +++ b/src/api/measure/person.ts @@ -0,0 +1,51 @@ +// 计量人员相关接口api +import request from '../index' +import type { StaffListType } from '@/views/measure/person/person-interface' +// 计量人员列表 +export function getStaffList(data: StaffListType) { + return request({ + url: `/staff/selectStaffList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 人员详细信息 +export function getStaffDetail(data: object) { + return request({ + url: '/staff/selectStaffInfo', + method: 'post', + data, + }) +} +// 删除人员 +export function getStaffDelete(data: object) { + return request({ + url: '/staff/deleteStaff', + method: 'post', + data, + }) +} +// 新增人员 +export function getStaffAdd(data: object) { + return request({ + url: '/staff/addStaffInfo', + method: 'post', + data, + }) +} +// 编辑人员 +export function getStaffupdate(data: object) { + return request({ + url: '/staff/updateStaffInfo', + method: 'post', + data, + }) +} +// 列表导出 +export function exportList(data: object) { + return request({ + url: '/staff/exportStaffList', + method: 'post', + data, + }) +} diff --git a/src/api/measure/person.ts b/src/api/measure/person.ts new file mode 100644 index 0000000..a193040 --- /dev/null +++ b/src/api/measure/person.ts @@ -0,0 +1,51 @@ +// 计量人员相关接口api +import request from '../index' +import type { StaffListType } from '@/views/measure/person/person-interface' +// 计量人员列表 +export function getStaffList(data: StaffListType) { + return request({ + url: `/staff/selectStaffList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 人员详细信息 +export function getStaffDetail(data: object) { + return request({ + url: '/staff/selectStaffInfo', + method: 'post', + data, + }) +} +// 删除人员 +export function getStaffDelete(data: object) { + return request({ + url: '/staff/deleteStaff', + method: 'post', + data, + }) +} +// 新增人员 +export function getStaffAdd(data: object) { + return request({ + url: '/staff/addStaffInfo', + method: 'post', + data, + }) +} +// 编辑人员 +export function getStaffupdate(data: object) { + return request({ + url: '/staff/updateStaffInfo', + method: 'post', + data, + }) +} +// 列表导出 +export function exportList(data: object) { + return request({ + url: '/staff/exportStaffList', + method: 'post', + data, + }) +} diff --git a/src/api/system/login.ts b/src/api/system/login.ts index 9569655..9b594da 100644 --- a/src/api/system/login.ts +++ b/src/api/system/login.ts @@ -1,8 +1,15 @@ import request from '../index' const prefix = 'sys/' // 登录 -export function doLogin(data: { username: string; password: string; kaptcha: string }) { - return request.post(`${prefix}user/login`, data) +export function doLogin(data: { sid: string; username: string; password: string; kaptcha: string }) { + return request({ + url: `${prefix}user/login`, + method: 'post', + headers: { + sid: data.sid, + }, + data, + }) } // 获取用户信息 diff --git a/src/api/measure/person.ts b/src/api/measure/person.ts new file mode 100644 index 0000000..a193040 --- /dev/null +++ b/src/api/measure/person.ts @@ -0,0 +1,51 @@ +// 计量人员相关接口api +import request from '../index' +import type { StaffListType } from '@/views/measure/person/person-interface' +// 计量人员列表 +export function getStaffList(data: StaffListType) { + return request({ + url: `/staff/selectStaffList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 人员详细信息 +export function getStaffDetail(data: object) { + return request({ + url: '/staff/selectStaffInfo', + method: 'post', + data, + }) +} +// 删除人员 +export function getStaffDelete(data: object) { + return request({ + url: '/staff/deleteStaff', + method: 'post', + data, + }) +} +// 新增人员 +export function getStaffAdd(data: object) { + return request({ + url: '/staff/addStaffInfo', + method: 'post', + data, + }) +} +// 编辑人员 +export function getStaffupdate(data: object) { + return request({ + url: '/staff/updateStaffInfo', + method: 'post', + data, + }) +} +// 列表导出 +export function exportList(data: object) { + return request({ + url: '/staff/exportStaffList', + method: 'post', + data, + }) +} diff --git a/src/api/system/login.ts b/src/api/system/login.ts index 9569655..9b594da 100644 --- a/src/api/system/login.ts +++ b/src/api/system/login.ts @@ -1,8 +1,15 @@ import request from '../index' const prefix = 'sys/' // 登录 -export function doLogin(data: { username: string; password: string; kaptcha: string }) { - return request.post(`${prefix}user/login`, data) +export function doLogin(data: { sid: string; username: string; password: string; kaptcha: string }) { + return request({ + url: `${prefix}user/login`, + method: 'post', + headers: { + sid: data.sid, + }, + data, + }) } // 获取用户信息 diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 1a20584..2aa9097 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -141,7 +141,7 @@