From 3970913f43aa2b7f912ca73a87eb62901f4af498 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 18 May 2021 18:16:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E6=96=B0=E5=8A=A0=E4=BA=86=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E5=90=8E=EF=BC=8C=E7=BC=96=E8=BE=91=E5=B7=B2=E6=9C=89?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=97=B6=EF=BC=8C=E6=97=A0=E6=B3=95=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E7=9C=8B=E8=A7=81=E6=96=B0=E5=8A=A0=E7=9A=84=E7=BB=84?= =?UTF-8?q?=E7=BB=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/system/user/form.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frontend/src/views/system/user/form.vue b/frontend/src/views/system/user/form.vue index 8e8263e1ff..7a52313e18 100644 --- a/frontend/src/views/system/user/form.vue +++ b/frontend/src/views/system/user/form.vue @@ -28,11 +28,13 @@ @@ -257,6 +259,15 @@ export default { }, backToList() { this.$router.push({ name: '用户管理' }) + }, + testOpen(instanceId) { + const results = this.depts.map(node => { + if (node.hasChildren) { + node.children = null + } + return node + }) + this.depts = results } } } From a0b6661c5f2889b594c8176b5e4ac9517e4c63ca Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 18 May 2021 18:33:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=9B=BD=E9=99=85=E5=8C=96=E5=A4=B4?= =?UTF-8?q?=E9=83=A8=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/utils/request.js | 4 ++-- frontend/src/views/system/user/form.vue | 4 ++-- frontend/src/views/system/user/index.vue | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/utils/request.js b/frontend/src/utils/request.js index 0eb14bbc4e..8bdc5387fd 100644 --- a/frontend/src/utils/request.js +++ b/frontend/src/utils/request.js @@ -35,8 +35,8 @@ service.interceptors.request.use( config.headers[LinkTokenKey] = linkToken } - if (store.getters.language) { - config.headers['Accept-Language'] = store.getters.language + if (i18n.locale) { + config.headers['Accept-Language'] = i18n.locale } // 增加loading diff --git a/frontend/src/views/system/user/form.vue b/frontend/src/views/system/user/form.vue index 7a52313e18..7d67c8e519 100644 --- a/frontend/src/views/system/user/form.vue +++ b/frontend/src/views/system/user/form.vue @@ -34,7 +34,7 @@ :load-options="loadDepts" :auto-load-root-options="false" :placeholder="$t('user.choose_org')" - @open="testOpen" + @open="filterData" /> @@ -260,7 +260,7 @@ export default { backToList() { this.$router.push({ name: '用户管理' }) }, - testOpen(instanceId) { + filterData(instanceId) { const results = this.depts.map(node => { if (node.hasChildren) { node.children = null diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue index bda6a482fe..c155dbe4cf 100644 --- a/frontend/src/views/system/user/index.vue +++ b/frontend/src/views/system/user/index.vue @@ -175,7 +175,7 @@ export default { } ], searchConfig: { - useQuickSearch: false, + useQuickSearch: true, quickPlaceholder: '按姓名搜索', components: [ { field: 'nick_name', label: '姓名', component: 'FuComplexInput' },