修改:分类界面改为树形表格展示
This commit is contained in:
parent
8342b47dd7
commit
1a3e4cea3a
@ -233,9 +233,6 @@ export default {
|
|||||||
&:hover {
|
&:hover {
|
||||||
background-color: #00000006;
|
background-color: #00000006;
|
||||||
}
|
}
|
||||||
svg {
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-dropdown-menu__item {
|
.el-dropdown-menu__item {
|
||||||
|
|||||||
@ -69,7 +69,7 @@
|
|||||||
}
|
}
|
||||||
.newFileMenu li > .menuitem > .text {
|
.newFileMenu li > .menuitem > .text {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-left: 8%;font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
.newFileMenu li > .menuitem > .svg-icon {
|
.newFileMenu li > .menuitem > .svg-icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@ -76,6 +76,7 @@
|
|||||||
:max-height="tableMaxHeight"
|
:max-height="tableMaxHeight"
|
||||||
:class="{'el-table-alone-page': alonePage}"
|
:class="{'el-table-alone-page': alonePage}"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
|
size="medium"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|||||||
@ -53,6 +53,9 @@
|
|||||||
<el-table
|
<el-table
|
||||||
:data="categoryList"
|
:data="categoryList"
|
||||||
stripe
|
stripe
|
||||||
|
row-key="id"
|
||||||
|
:expand-row-keys="expandRowKeys"
|
||||||
|
size="medium"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
@cell-mouse-enter="cellMouseEnter"
|
@cell-mouse-enter="cellMouseEnter"
|
||||||
@cell-mouse-leave="cellMouseLeave"
|
@cell-mouse-leave="cellMouseLeave"
|
||||||
@ -92,9 +95,10 @@
|
|||||||
prop="quota"
|
prop="quota"
|
||||||
label="文章数">
|
label="文章数">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<router-link :to="'/setting/website/manager-articles?categoryIds='+scope.row.id">
|
<router-link v-if="scope.row.articleNum > 0" :to="'/setting/website/manager-articles?categoryIds='+scope.row.id">
|
||||||
<el-tag class="article-num" >{{scope.row.articleNum}}</el-tag>
|
<el-tag class="article-num" >{{scope.row.articleNum}}</el-tag>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
<span v-else><el-tag class="article-num" >{{scope.row.articleNum}}</el-tag></span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -115,6 +119,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
title: "分类管理",
|
title: "分类管理",
|
||||||
categoryList: [],
|
categoryList: [],
|
||||||
|
expandRowKeys: [],
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogTitle: '',
|
dialogTitle: '',
|
||||||
categoryUpdateLoading: false,
|
categoryUpdateLoading: false,
|
||||||
@ -168,6 +173,11 @@ export default {
|
|||||||
parentCategoryId: this.$route.query.parent
|
parentCategoryId: this.$route.query.parent
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.categoryList = res.data
|
this.categoryList = res.data
|
||||||
|
this.categoryList.forEach(category => {
|
||||||
|
if(category.children){
|
||||||
|
this.expandRowKeys.push(category.id)
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
categoryTree() {
|
categoryTree() {
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
<el-input placeholder="请输入账号" v-model="form.showName" />
|
<el-input placeholder="请输入账号" v-model="form.showName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="角色:" prop="roles">
|
<el-form-item label="角色:" prop="roles">
|
||||||
<el-select v-model="form.roles" multiple placeholder="请选择角色">
|
<el-select ref="selectRole" v-model="form.roles" multiple placeholder="请选择角色" @change="changeRole">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in roleList"
|
v-for="item in roleList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -281,6 +281,9 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
changeRole() {
|
||||||
|
this.$refs.selectRole.blur()
|
||||||
|
},
|
||||||
resetPassword() {
|
resetPassword() {
|
||||||
this.$confirm('确定重置该用户密码吗, 是否继续?', '提示', {
|
this.$confirm('确定重置该用户密码吗, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user