diff --git a/src/api/Archive/Attendance.js b/src/api/Archive/Attendance.js index f638fc3..83ea6dc 100644 --- a/src/api/Archive/Attendance.js +++ b/src/api/Archive/Attendance.js @@ -1,61 +1,59 @@ import fetch from '@/utils/fetch' -export function GetAttenListToday(params){ - return fetch({ - url: '/Attendance/PullPersonAttenListWithToday', - method: 'post', - params - }) +export function GetAttenListToday(params) { + return fetch({ + url: '/Attendance/PullPersonAttenListWithToday', + method: 'post', + params, + }) } -export function DeleteAtten(ID){ - return fetch({ - url: '/Attendance/DelAtten', - method: 'post', - params:{ID} - }) +export function DeleteAtten(ID) { + return fetch({ + url: '/Attendance/DelAtten', + method: 'post', + params: { ID }, + }) } -export function AttenDetailByPerson(ID){ - return fetch({ - url: '/Attendance/PullAttenDetailByPerson', - method: 'post', - params:{ID} - }) +export function AttenDetailByPerson(ID) { + return fetch({ + url: '/Attendance/PullAttenDetailByPerson', + method: 'post', + params: { ID }, + }) } - -export function UpdateAtten(data){ - return fetch({ - url: '/Attendance/SaveAtten', - method: 'post', - data - }) +export function UpdateAtten(data) { + return fetch({ + url: '/Attendance/SaveAtten', + method: 'post', + data, + }) } -export function SearchPersonByMonth(data){ - return fetch({ - url: '/Attendance/SearchPersonByMonth', - method: 'post', - params:{ - name:data.name, - month:data.month - } +export function SearchPersonByMonth(data) { + return fetch({ + url: '/Attendance/SearchPersonByMonth', + method: 'post', + params: { + name: data.name, + month: data.month, + }, - }) + }) } -export function SearchPersonByYear(data){ - return fetch({ - url: '/Attendance/SearchPersonByYear', - method: 'post', - params:{ - name:data.name - } +export function SearchPersonByYear(data) { + return fetch({ + url: '/Attendance/SearchPersonByYear', + method: 'post', + params: { + name: data.name, + }, - }) + }) } - diff --git a/src/api/Archive/person.js b/src/api/Archive/person.js index bfc6d46..7b2ccea 100644 --- a/src/api/Archive/person.js +++ b/src/api/Archive/person.js @@ -1,56 +1,57 @@ import fetch from '@/utils/fetch' -export function GetUsers(data){ - return fetch({ - url: '/person/list', - method: 'post', - data - }) + +export function GetUsers(data) { + return fetch({ + url: '/person/list', + method: 'post', + data, + }) } -export function DeleteUser(id){ - return fetch({ - url: '/person/delete', - method: 'post', - params:{id} - }) +export function DeleteUser(id) { + return fetch({ + url: '/person/delete', + method: 'post', + params: { id }, + }) } -export function GetUsersDetail(id){ - return fetch({ - url: '/person/detail', - method: 'post', - params:{id} - }) +export function GetUsersDetail(id) { + return fetch({ + url: '/person/detail', + method: 'post', + params: { id }, + }) } -export function SaveNewUsers(data){ - return fetch({ - url: '/person/add', - method: 'post', - data - }) +export function SaveNewUsers(data) { + return fetch({ + url: '/person/add', + method: 'post', + data, + }) } -export function UpdateUsers(data){ - return fetch({ - url: '/person/update', - method: 'post', - data - }) +export function UpdateUsers(data) { + return fetch({ + url: '/person/update', + method: 'post', + data, + }) } -export function getKey(){ - return fetch({ - url: '/person/Getkey', - method: 'post', - }) +export function getKey() { + return fetch({ + url: '/person/Getkey', + method: 'post', + }) } -export function getObj(){ - return fetch({ - url: '/person/getObj', - method: 'post', - }) +export function getObj() { + return fetch({ + url: '/person/getObj', + method: 'post', + }) } diff --git a/src/api/Public/file.js b/src/api/Public/file.js index a8a144f..1a30501 100644 --- a/src/api/Public/file.js +++ b/src/api/Public/file.js @@ -4,10 +4,10 @@ export function upload(MasterID) { return fetch({ url: '/file/Upload', method: 'post', - contentType : false, + contentType: false, params: { - MasterID - } + MasterID, + }, }) } @@ -15,18 +15,18 @@ export function download(AffixID) { return fetch({ url: '/file/download', method: 'get', - params:{ - AffixID - } + params: { + AffixID, + }, }) } export function deletefile(AffixID) { return fetch({ url: '/file/delete', method: 'get', - params:{ - AffixID - } + params: { + AffixID, + }, }) } @@ -34,11 +34,9 @@ export function GetFileList(MasterID) { return fetch({ url: '/file/list', method: 'post', - - params:{ - MasterID - } + + params: { + MasterID, + }, }) } - - diff --git a/src/api/login.js b/src/api/login.js index 38563dc..a1694b1 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -6,25 +6,22 @@ export function login(username, password) { method: 'post', params: { username, - password - } + password, + }, }) } -export function getInfo(token) { +export function getInfo() { return fetch({ url: '/login/userinfo', method: 'post', - // data: { - // auth:token - // } }) } export function logout() { return fetch({ url: '/login/logout', - method: 'post' + method: 'post', }) } @@ -33,6 +30,6 @@ export function ChangePassword(data) { return fetch({ url: '/login/changepassword', method: 'post', - params: data + params: data, }) } diff --git a/src/api/system/form.js b/src/api/system/form.js index 0fca5ee..bc516fe 100644 --- a/src/api/system/form.js +++ b/src/api/system/form.js @@ -1,45 +1,45 @@ import fetch from '@/utils/fetch' -export function getTables(){ - return fetch({ - url: '/form/getTables', - method: 'post', - }) +export function getTables() { + return fetch({ + url: '/form/getTables', + method: 'post', + + }) } -export function getKeyBytableName(tablename){ - return fetch({ - url: '/form/getKey', - method: 'post', - params:{ - tablename - } +export function getKeyBytableName(tablename) { + return fetch({ + url: '/form/getKey', + method: 'post', + params: { + tablename, + }, - }) + }) } -export function GetFormDetail(tablename){ - return fetch({ - url: '/form/detail', - method: 'post', +export function GetFormDetail(tablename) { + return fetch({ + url: '/form/detail', + method: 'post', - params:{tablename} - }) + params: { tablename }, + }) } -export function AddForm(data){ - return fetch({ - url: '/form/add', - method: 'post', - data - }) +export function AddForm(data) { + return fetch({ + url: '/form/add', + method: 'post', + data, + }) } -export function UpdateForm(data){ - return fetch({ - url: '/form/update', - method: 'post', - data - }) +export function UpdateForm(data) { + return fetch({ + url: '/form/update', + method: 'post', + data, + }) } - diff --git a/src/api/system/menu.js b/src/api/system/menu.js index 25e59ec..b096cb0 100644 --- a/src/api/system/menu.js +++ b/src/api/system/menu.js @@ -1,57 +1,58 @@ import fetch from '@/utils/fetch' -export function MenuList(params){ - return fetch({ - url: '/menu/list', - method: 'post', - params - }) + +export function MenuList(params) { + return fetch({ + url: '/menu/list', + method: 'post', + params, + }) } -export function MenuTree(){ - return fetch({ - url: '/menu/treelist', - method: 'post' - }) +export function MenuTree() { + return fetch({ + url: '/menu/treelist', + method: 'post', + }) } -export function DeleteMenu(id){ - return fetch({ - url: '/menu/delete', - method: 'post', - params:{id} - }) +export function DeleteMenu(id) { + return fetch({ + url: '/menu/delete', + method: 'post', + params: { id }, + }) } -export function GetMenuDetail(id){ - return fetch({ - url: '/menu/detail', - method: 'post', - params:{id} - }) +export function GetMenuDetail(id) { + return fetch({ + url: '/menu/detail', + method: 'post', + params: { id }, + }) } -export function AddMenu(data){ - return fetch({ - url: '/menu/add', - method: 'post', - data - }) +export function AddMenu(data) { + return fetch({ + url: '/menu/add', + method: 'post', + data, + }) } -export function UpdateMenu(data){ - return fetch({ - url: '/menu/update', - method: 'post', - data - }) +export function UpdateMenu(data) { + return fetch({ + url: '/menu/update', + method: 'post', + data, + }) } -export function GetMenuTreeByRoleID(roleid){ - return fetch({ - url: '/menu/MenuTreeByRoleID', - method: 'post', - params:{ - roleid - } - }) +export function GetMenuTreeByRoleID(roleid) { + return fetch({ + url: '/menu/MenuTreeByRoleID', + method: 'post', + params: { + roleid, + }, + }) } diff --git a/src/api/system/role.js b/src/api/system/role.js index 94555a3..32b3496 100644 --- a/src/api/system/role.js +++ b/src/api/system/role.js @@ -1,49 +1,49 @@ import fetch from '@/utils/fetch' -export function RoleList(params){ - return fetch({ - url: '/role/list', - method: 'post', - params - }) -} -export function GetRolesOptions(){ - return fetch({ - url: '/role/list', - method: 'post', - - }) +export function RoleList(params) { + return fetch({ + url: '/role/list', + method: 'post', + params, + }) } -export function DeleteRole(id){ - return fetch({ - url: '/role/delete', - method: 'post', - params:{id} - }) +export function GetRolesOptions() { + return fetch({ + url: '/role/list', + method: 'post', + + }) } -export function GetRoleDetail(id){ - return fetch({ - url: '/role/detail', - method: 'post', - params:{id} - }) +export function DeleteRole(id) { + return fetch({ + url: '/role/delete', + method: 'post', + params: { id }, + }) } -export function AddRole(data){ - return fetch({ - url: '/role/add', - method: 'post', - data - }) +export function GetRoleDetail(id) { + return fetch({ + url: '/role/detail', + method: 'post', + params: { id }, + }) } -export function UpdateRole(data){ - return fetch({ - url: '/role/update', - method: 'post', - data - }) +export function AddRole(data) { + return fetch({ + url: '/role/add', + method: 'post', + data, + }) } +export function UpdateRole(data) { + return fetch({ + url: '/role/update', + method: 'post', + data, + }) +} diff --git a/src/api/system/users.js b/src/api/system/users.js index 8b63100..6442d0e 100644 --- a/src/api/system/users.js +++ b/src/api/system/users.js @@ -1,42 +1,41 @@ import fetch from '@/utils/fetch' -export function UsersList(params){ - return fetch({ - url: '/users/list', - method: 'post', - params - }) -} -export function DeleteUsers(id){ - return fetch({ - url: '/users/delete', - method: 'post', - params:{id} - }) +export function UsersList(params) { + return fetch({ + url: '/users/list', + method: 'post', + params, + }) } -export function GetUsersDetail(id){ - return fetch({ - url: '/users/detail', - method: 'post', - params:{id} - }) +export function DeleteUsers(id) { + return fetch({ + url: '/users/delete', + method: 'post', + params: { id }, + }) } -export function AddUsers(data){ - return fetch({ - url: '/users/add', - method: 'post', - data - }) +export function GetUsersDetail(id) { + return fetch({ + url: '/users/detail', + method: 'post', + params: { id }, + }) } -export function UpdateUsers(data){ - return fetch({ - url: '/users/update', - method: 'post', - data - }) +export function AddUsers(data) { + return fetch({ + url: '/users/add', + method: 'post', + data, + }) } - +export function UpdateUsers(data) { + return fetch({ + url: '/users/update', + method: 'post', + data, + }) +} diff --git a/src/api/table.js b/src/api/table.js index 7079817..5c28173 100644 --- a/src/api/table.js +++ b/src/api/table.js @@ -1,9 +1,10 @@ import fetch from '@/utils/fetch' +// eslint-disable-next-line import/prefer-default-export export function getList(params) { return fetch({ url: '/table/list', method: 'get', - params + params, }) }