From 30e84b58a4cbb5653e4190b15801ecfdfb284c90 Mon Sep 17 00:00:00 2001 From: jmal Date: Wed, 20 Jan 2021 18:44:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=A0=91=E5=BD=A2?= =?UTF-8?q?=E5=A4=9A=E9=80=89=E9=80=89=E6=8B=A9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/select/MultipleTree.vue | 156 ++++++++++++++++++ src/components/table/TableList.vue | 6 +- src/views/setting/articles/articleManager.vue | 67 ++++++-- src/views/setting/sys/menuManager.vue | 2 +- src/views/setting/sys/roleManager.vue | 4 +- 5 files changed, 214 insertions(+), 21 deletions(-) create mode 100644 src/components/select/MultipleTree.vue diff --git a/src/components/select/MultipleTree.vue b/src/components/select/MultipleTree.vue new file mode 100644 index 0000000..895ebb2 --- /dev/null +++ b/src/components/select/MultipleTree.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/src/components/table/TableList.vue b/src/components/table/TableList.vue index ce53645..142285b 100644 --- a/src/components/table/TableList.vue +++ b/src/components/table/TableList.vue @@ -6,7 +6,7 @@ :data="tableData" :max-height="tableMaxHeight" row-key="id" - border + :border="border" size="medium" fit highlight-current-row @@ -96,6 +96,10 @@ export default { return []; } }, + border: { + type: Boolean, + default: true + }, loading: { type: Boolean, default: false diff --git a/src/views/setting/articles/articleManager.vue b/src/views/setting/articles/articleManager.vue index 527ef81..c8e2744 100644 --- a/src/views/setting/articles/articleManager.vue +++ b/src/views/setting/articles/articleManager.vue @@ -16,7 +16,7 @@
{{ alonePage ? '管理独立页面':'管理文章' }} - 新建 + 写文章
删除 @@ -42,19 +42,34 @@
取消筛选 - + + + + + + + + + + + + + + + + + + + + + + + 筛选
@@ -124,14 +139,25 @@
+ layout="total, prev, pager, next"> + + + + + + + + + + @@ -142,9 +168,11 @@ import MarkdownEditor from '@/views/markdown/index' import markdownApi from "@/api/markdown-api"; import categoryApi from "@/api/category"; import api from "@/api/file-api"; +import MultipleTreeSelect from "@/components/select/MultipleTree"; export default { name: 'articleManager', components: { + MultipleTreeSelect, MarkdownEditor }, props: { @@ -295,12 +323,14 @@ export default { if(this.$route.query.categoryIds){ this.query.categoryIds = this.$route.query.categoryIds } + console.log('this.categoryIdsList', this.categoryIdsList) if(this.categoryIdsList.length > 0){ - this.categoryIdsList.forEach(categoryIdList => { - this.query.categoryIds += categoryIdList[categoryIdList.length - 1] + ',' + this.categoryIdsList.forEach(categoryId => { + this.query.categoryIds += categoryId + ',' }) this.query.categoryIds = this.query.categoryIds.substring(0, this.query.categoryIds.length - 1) } + console.log('this.query.categoryIds', this.query.categoryIds) this.isFilter = this.query.keyword.length > 0 || this.query.categoryIds.length > 0; if(this.isFilter){ this.$router.push({query: {keyword: this.query.keyword, categoryIds: this.query.categoryIds}}) @@ -447,4 +477,7 @@ export default { cursor: move; } } +/deep/.el-pagination{ + padding: 15px 5px 0; +} diff --git a/src/views/setting/sys/menuManager.vue b/src/views/setting/sys/menuManager.vue index 0e5de73..c522e12 100644 --- a/src/views/setting/sys/menuManager.vue +++ b/src/views/setting/sys/menuManager.vue @@ -183,7 +183,7 @@ export default { } }, {prop: 'createTime', label: '创建时间'}, - {label: '操作', minWidth: 130, active: [ + {label: '操作', minWidth: this.$pc ? 0 : 130, active: [ {name: '修改', icon: 'el-icon-edit', handle: (row) => this.handleEdit(row.id)}, {name: '删除', icon: 'el-icon-delete', color: '#ff4d4f', handle: (row) => this.handleDelete([row.id])}, ], diff --git a/src/views/setting/sys/roleManager.vue b/src/views/setting/sys/roleManager.vue index 6e0eab1..af8ac4d 100644 --- a/src/views/setting/sys/roleManager.vue +++ b/src/views/setting/sys/roleManager.vue @@ -130,8 +130,8 @@ export default { {prop: 'name',label: '角色名称', minWidth: 110, sortable: 'custom'}, {prop: 'code',label: '角色标识', minWidth: 110, sortable: 'custom'}, {prop: 'remarks',label: '备注', minWidth: 110, sortable: 'custom'}, - {prop: 'createTime',label: '创建时间',sortable: 'custom'}, - {label: '操作', minWidth: 160, active: [ + {prop: 'createTime',label: '创建时间', minWidth: 110, sortable: 'custom'}, + {label: '操作', minWidth: this.$pc ? 0 : 160, active: [ {name: '修改', icon: 'el-icon-edit', handle: (row) => this.handleEdit(row.id)}, {name: '分配权限', icon: 'el-icon-finished', handle: (row) => this.authorization(row.id)}, ],