From 66e24cfea0e7f06db76d40c8aabfbc3a9557ff91 Mon Sep 17 00:00:00 2001 From: Zheng Jie <201507802@qq.com> Date: Fri, 7 Jul 2023 17:36:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=9A=E4=BF=AE=E6=94=B9=E9=94=99=E5=88=AB=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/dept/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index d02b846..f5811fe 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -162,9 +162,9 @@ export default { }, getSupDepts(id) { crudDept.getDeptSuperior(id).then(res => { - const date = res.content - this.buildDepts(date) - this.depts = date + const data = res.content + this.buildDepts(data) + this.depts = data }) }, buildDepts(depts) { From 9e874e9b5fc2efa597745308ec127a92e236a23e Mon Sep 17 00:00:00 2001 From: Zheng Jie <201507802@qq.com> Date: Fri, 7 Jul 2023 17:49:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E3=80=90=E9=83=A8=E9=97=A8=E3=80=91?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E8=8A=82=E7=82=B9=E6=97=B6=E5=87=BA=E7=8E=B0?= =?UTF-8?q?PID=E6=95=B0=E6=8D=AE=E7=8E=AF=E5=BD=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/dept.js | 5 +++-- src/views/system/dept/index.vue | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api/system/dept.js b/src/api/system/dept.js index ed4f944..8f920d0 100644 --- a/src/api/system/dept.js +++ b/src/api/system/dept.js @@ -8,10 +8,11 @@ export function getDepts(params) { }) } -export function getDeptSuperior(ids) { +export function getDeptSuperior(ids, exclude) { + exclude = exclude !== undefined ? exclude : false const data = ids.length || ids.length === 0 ? ids : Array.of(ids) return request({ - url: 'api/dept/superior', + url: 'api/dept/superior?exclude=' + exclude, method: 'post', data }) diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index f5811fe..62ee78f 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -161,7 +161,7 @@ export default { } }, getSupDepts(id) { - crudDept.getDeptSuperior(id).then(res => { + crudDept.getDeptSuperior(id, true).then(res => { const data = res.content this.buildDepts(data) this.depts = data