diff --git a/src/api/system/dept.js b/src/api/system/dept.js index 60527cd..c723fa1 100644 --- a/src/api/system/dept.js +++ b/src/api/system/dept.js @@ -2,65 +2,65 @@ import request from '@/utils/request' // 查询部门列表 export function listDept(query) { - return request({ - url: '/system/dept/list', - method: 'get', - params: query - }) + return request({ + url: '/system/dept/list', + method: 'get', + params: query, + }) } // 查询部门列表(排除节点) export function listDeptExcludeChild(deptId) { - return request({ - url: '/system/dept/list/exclude/' + deptId, - method: 'get' - }) + return request({ + url: '/system/dept/list/exclude/' + deptId, + method: 'get', + }) } // 查询部门详细 export function getDept(deptId) { - return request({ - url: '/system/dept/' + deptId, - method: 'get' - }) + return request({ + url: '/system/dept/' + deptId, + method: 'get', + }) } // 新增部门 export function addDept(data) { - return request({ - url: '/system/dept', - method: 'post', - data: data - }) + return request({ + url: '/system/dept', + method: 'post', + data: data, + }) } // 修改部门 export function updateDept(data) { - return request({ - url: '/system/dept', - method: 'put', - data: data - }) + return request({ + url: '/system/dept', + method: 'put', + data: data, + }) } // 删除部门 export function delDept(deptId) { - return request({ - url: '/system/dept/' + deptId, - method: 'delete' - }) + return request({ + url: '/system/dept/' + deptId, + method: 'delete', + }) } // 上级获取 export function apiGetPartTree() { - return request({ - url: '/material/select/getPartTree', - method: 'post', - data:{} - }) + return request({ + url: '/material/select/getPartTree', + method: 'post', + data: {}, + }) } - - - - +// 新增公司 +export const addCompanyApi = (data) => { + return request.post('/system/dept/addCompany', data) +} diff --git a/src/views/nw-login.vue b/src/views/nw-login.vue index 5fb395c..2a108af 100644 --- a/src/views/nw-login.vue +++ b/src/views/nw-login.vue @@ -51,7 +51,7 @@ -
- - - - - - - - - - - 搜索 - 重置 - - - - - - 新增 - - - 展开/折叠 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ - + - - - - + + + + - + + 搜索 + 重置 + + + + + + + 新增公司 + + + 新增部门 + + + 展开/折叠 + + - - - - - - - - - - - - - - - - - - - - - - {{dict.label}} - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ dict.label }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +