From a7b1ff61130d132f4a17c97ca618a6d13c10ba0a Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 4 Sep 2024 10:57:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=AC=E5=8F=B8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/dept.js | 72 +-- src/views/nw-login.vue | 2 +- src/views/system/dept/index.vue | 946 +++++++++++++++++++++----------- 3 files changed, 660 insertions(+), 360 deletions(-) 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 }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +