From f7c91252cd7d03ea3ce5b232bcc9ad41742444cf Mon Sep 17 00:00:00 2001 From: tk Date: Wed, 18 Dec 2024 15:24:27 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=94=A8=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=B7=A6=E4=BE=A7=E9=83=A8=E9=97=A8=E6=A0=91?= =?UTF-8?q?=E5=BD=A2=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/src/views/sys/dept/index.vue | 4 +- .../admin/src/views/sys/role/save.vue | 37 +++-- .../admin/src/views/sys/user/index.vue | 153 +++++++++++------- 3 files changed, 115 insertions(+), 79 deletions(-) diff --git a/src/frontend/admin/src/views/sys/dept/index.vue b/src/frontend/admin/src/views/sys/dept/index.vue index 2aca7b25..999a589a 100644 --- a/src/frontend/admin/src/views/sys/dept/index.vue +++ b/src/frontend/admin/src/views/sys/dept/index.vue @@ -86,12 +86,12 @@ row-key="id" stripe> - + diff --git a/src/frontend/admin/src/views/sys/role/save.vue b/src/frontend/admin/src/views/sys/role/save.vue index e9dec981..0f2fff6f 100644 --- a/src/frontend/admin/src/views/sys/role/save.vue +++ b/src/frontend/admin/src/views/sys/role/save.vue @@ -38,19 +38,23 @@
- + - - - - + + + +
@@ -63,16 +67,11 @@ show-checkbox>
-
-
- - - - - - - -
{{ $t('用于控制角色登录后控制台的视图') }}
+ + + + + - {{ - $t('JSON 格式化') - }} + {{ $t('JSON 格式化') }} +
diff --git a/src/frontend/admin/src/views/sys/user/index.vue b/src/frontend/admin/src/views/sys/user/index.vue index 386ecec4..15678b17 100644 --- a/src/frontend/admin/src/views/sys/user/index.vue +++ b/src/frontend/admin/src/views/sys/user/index.vue @@ -36,14 +36,6 @@ placeholder: $t('用户编号 / 用户名 / 手机号 / 邮箱 / 备注'), style: 'width:25rem', }, - { - type: 'cascader', - field: ['filter', 'deptId'], - api: $API.sys_dept.query, - props: { label: 'name', value: 'id', checkStrictly: true, expandTrigger: 'hover', emitPath: false }, - placeholder: $t('所属部门'), - style: 'width:15rem', - }, { type: 'remote-select', field: ['filter', 'roleId'], @@ -80,54 +72,79 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -167,7 +184,17 @@ export default { return table }, }, - created() { + async created() { + const res = await this.$API.sys_dept.query.post({}) + + this.deptTree = [ + { + id: 0, + name: '所有部门', + children: res.data, + }, + ] + if (this.roleId) { this.query.filter.roleId = this.roleId } @@ -177,6 +204,7 @@ export default { }, data() { return { + deptTree: null, statistics: { total: '...', }, @@ -200,6 +228,10 @@ export default { }, inject: ['reload'], methods: { + deptClick(e) { + this.$refs.search.form.filter.deptId = e.id + this.$refs.search.search() + }, async getStatistics() { this.statistics.total = this.$refs.table?.total const res = await Promise.all([ @@ -260,6 +292,7 @@ export default { onReset() { Object.entries(this.$refs.selectFilter.selected).forEach(([key, _]) => (this.$refs.selectFilter.selected[key] = [''])) this.$refs.selectFilter.selected['enabled'] = [true] + this.$refs.tree.setCurrentKey(0) }, //搜索 async onSearch(form) { @@ -322,4 +355,8 @@ export default { } - \ No newline at end of file + \ No newline at end of file