|
|
|
|
@ -3,7 +3,8 @@
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<div ref="lxHeader">
|
|
|
|
|
<lx-header icon="md-apps" :text="$route.meta.title+select.catalog_name" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
|
|
|
|
<lx-header icon="md-apps" :text="$route.meta.title+select.catalog_name"
|
|
|
|
|
style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
|
|
|
|
<div slot="content" v-if="!hasMenu">
|
|
|
|
|
<div class="searchwrap" style="display: flex;align-items: center;">
|
|
|
|
|
<div>
|
|
|
|
|
@ -66,9 +67,9 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<el-button type="primary" size="small" v-if="!is_search" @click="editIndex('add')">新增</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<el-button type="primary" size="small" v-if="!hasMenu && !is_search" @click="goBack()">返回上一级</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<el-button type="primary" size="small" v-if="!hasMenu && !is_search" @click="goBack()">返回上一级</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -86,19 +87,21 @@
|
|
|
|
|
<div v-if="hasMenu" class="catalog_list">
|
|
|
|
|
<div v-for="item in showData" class='catalog_item' @click="clickIn(item)">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="catalog_count" v-if="!(item.children&&item.children.length>0)">{{item.records_total}}</div>
|
|
|
|
|
|
|
|
|
|
<i :class="item.children&&item.children.length>0?'el-icon-folder-opened':'el-icon-document-copy'"></i>
|
|
|
|
|
<div>{{item.name}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div @click="clickOut" class="catalog_item">
|
|
|
|
|
<i v-if="historyList.length>0"
|
|
|
|
|
class="el-icon-arrow-left"></i>
|
|
|
|
|
<div>{{historyList.length>0?"返回上一级":""}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div @click="clickOut" class="catalog_item">
|
|
|
|
|
<i v-if="historyList.length>0" class="el-icon-arrow-left"></i>
|
|
|
|
|
<div>{{historyList.length>0?"返回上一级":""}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="catalog_right" v-else>
|
|
|
|
|
<xy-table @getHeight="initHeight" :defaultExpandAll='false' :isPage="false" rowKey="id" :list="list" :table-item="table_item">
|
|
|
|
|
<xy-table @getHeight="initHeight" :defaultExpandAll='false' :isPage="false" rowKey="id" :list="list"
|
|
|
|
|
:table-item="table_item">
|
|
|
|
|
<template v-slot:catalog_name>
|
|
|
|
|
<el-table-column align='center' label="所属目录" width="240" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
@ -139,7 +142,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template v-slot:link_id>
|
|
|
|
|
<!-- <template v-slot:link_id>
|
|
|
|
|
<el-table-column align='center' label="前续文档" width="120" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div style="color:#b3241d;cursor: pointer;text-decoration: underline;" v-if="scope.row.link_id"
|
|
|
|
|
@ -315,9 +318,9 @@
|
|
|
|
|
label: 'name'
|
|
|
|
|
},
|
|
|
|
|
catalogList: [],
|
|
|
|
|
historyList: [],
|
|
|
|
|
menuName:[],
|
|
|
|
|
showData:[],
|
|
|
|
|
historyList: [],
|
|
|
|
|
menuName: [],
|
|
|
|
|
showData: [],
|
|
|
|
|
catalogChildren: [], // 存储所有数据
|
|
|
|
|
areaList: [],
|
|
|
|
|
tagList: [],
|
|
|
|
|
@ -433,10 +436,10 @@
|
|
|
|
|
this.hasMenu = true
|
|
|
|
|
this.getCatalogList(path[1])
|
|
|
|
|
} else {
|
|
|
|
|
this.getCatalogList()
|
|
|
|
|
this.getCatalogList()
|
|
|
|
|
this.getList()
|
|
|
|
|
}
|
|
|
|
|
this.getAreaList()
|
|
|
|
|
}
|
|
|
|
|
this.getAreaList()
|
|
|
|
|
this.getTagList()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -484,34 +487,34 @@
|
|
|
|
|
},
|
|
|
|
|
clickIn(i) {
|
|
|
|
|
if (i.children && i.children.length > 0) {
|
|
|
|
|
this.historyList.push(this.showData);
|
|
|
|
|
this.historyList.push(this.showData);
|
|
|
|
|
|
|
|
|
|
this.showData = i.children;
|
|
|
|
|
this.menuName.push(i.name)
|
|
|
|
|
this.showData = i.children;
|
|
|
|
|
this.menuName.push(i.name)
|
|
|
|
|
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
|
|
|
|
|
console.log(this.historyList);
|
|
|
|
|
}else{
|
|
|
|
|
this.select.catalog_id = i.id
|
|
|
|
|
this.menuName.push(i.name)
|
|
|
|
|
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
|
|
|
|
|
this.hasMenu = false
|
|
|
|
|
this.getList()
|
|
|
|
|
} else {
|
|
|
|
|
this.select.catalog_id = i.id
|
|
|
|
|
this.menuName.push(i.name)
|
|
|
|
|
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
|
|
|
|
|
this.hasMenu = false
|
|
|
|
|
this.getList()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
clickOut() {
|
|
|
|
|
if (this.historyList && this.historyList.length > 0) {
|
|
|
|
|
this.showData = this.historyList[this.historyList.length - 1]
|
|
|
|
|
this.menuName.splice(this.menuName.length-1,1)
|
|
|
|
|
this.showData = this.historyList[this.historyList.length - 1]
|
|
|
|
|
this.menuName.splice(this.menuName.length - 1, 1)
|
|
|
|
|
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
|
|
|
|
|
this.historyList.pop()
|
|
|
|
|
console.log(this.historyList);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
goBack(){
|
|
|
|
|
this.select.catalog_id = ''
|
|
|
|
|
this.menuName.splice(this.menuName.length-1,1)
|
|
|
|
|
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
|
|
|
|
|
this.hasMenu = true
|
|
|
|
|
},
|
|
|
|
|
goBack() {
|
|
|
|
|
this.select.catalog_id = ''
|
|
|
|
|
this.menuName.splice(this.menuName.length - 1, 1)
|
|
|
|
|
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
|
|
|
|
|
this.hasMenu = true
|
|
|
|
|
},
|
|
|
|
|
async getCatalogList(pid) {
|
|
|
|
|
const res = await index({
|
|
|
|
|
@ -527,7 +530,7 @@
|
|
|
|
|
if (pid) {
|
|
|
|
|
let pList = this.base.findNodesById(this.catalogList, pid)
|
|
|
|
|
console.log("pList", pList)
|
|
|
|
|
this.catalogChildren = pList[0].children
|
|
|
|
|
this.catalogChildren = pList[0].children
|
|
|
|
|
this.showData = this.catalogChildren
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -641,8 +644,8 @@
|
|
|
|
|
// this.list = res.data
|
|
|
|
|
if (res.data.length > 0) {
|
|
|
|
|
this.list = this.base.buildTree(res.data, 'link_id')
|
|
|
|
|
}else{
|
|
|
|
|
this.list = []
|
|
|
|
|
} else {
|
|
|
|
|
this.list = []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
deleteList(id) {
|
|
|
|
|
@ -683,7 +686,7 @@
|
|
|
|
|
.catalog {
|
|
|
|
|
&_list {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -693,15 +696,27 @@
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
margin: 20px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
color: #b3241d;
|
|
|
|
|
width:150px;
|
|
|
|
|
height:130px;
|
|
|
|
|
color: #b3241d;
|
|
|
|
|
width: 150px;
|
|
|
|
|
height: 130px;
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
i {
|
|
|
|
|
font-size: 40px;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&_count {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
padding: 0px 10px;
|
|
|
|
|
background: #b3241d;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-checkbox__input .el-checkbox__inner {
|
|
|
|
|
|