Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-v32-xwx
Showing
3 changed files
with
34 additions
and
2 deletions
@@ -59,3 +59,10 @@ custom-class="config-dialog" | @@ -59,3 +59,10 @@ custom-class="config-dialog" | ||
59 | .button-more{ | 59 | .button-more{ |
60 | position: absolute;right: 0;top: 33px;z-index: 1;background: #f5f7fa;width: 80px; padding: 10px; | 60 | position: absolute;right: 0;top: 33px;z-index: 1;background: #f5f7fa;width: 80px; padding: 10px; |
61 | } | 61 | } |
62 | +.breadcrumb .el-breadcrumb{ | ||
63 | + background: #ffffff; | ||
64 | + padding: 20px 5px 0; | ||
65 | +} | ||
66 | +.breadcrumb .el-breadcrumb .el-breadcrumb__item{ | ||
67 | + cursor: pointer; | ||
68 | +} |
@@ -91,6 +91,17 @@ | @@ -91,6 +91,17 @@ | ||
91 | </div> | 91 | </div> |
92 | <!--列表--> | 92 | <!--列表--> |
93 | <div v-if="activeBtn == 'list'"> | 93 | <div v-if="activeBtn == 'list'"> |
94 | + <el-row> | ||
95 | + <el-col :span="24" class="breadcrumb"> | ||
96 | + <el-breadcrumb :separator-icon="ArrowRight"> | ||
97 | + <template v-for="(item,index) in breadcrumbList"> | ||
98 | + <el-breadcrumb-item :key="index" v-if="item.data.name" @click="nodeClick(item, item.data)">{{item.data.name}}</el-breadcrumb-item> | ||
99 | + </template> | ||
100 | + | ||
101 | + </el-breadcrumb> | ||
102 | + </el-col> | ||
103 | + </el-row> | ||
104 | + | ||
94 | <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true" | 105 | <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true" |
95 | :showBorder="false" :showSelection="false" :showTools="isEditName" | 106 | :showBorder="false" :showSelection="false" :showTools="isEditName" |
96 | :showPage="false" :height="height - 54"> | 107 | :showPage="false" :height="height - 54"> |
@@ -132,6 +132,11 @@ export default { | @@ -132,6 +132,11 @@ export default { | ||
132 | let historyNode = Vue.ref([]); | 132 | let historyNode = Vue.ref([]); |
133 | let isUserFolder = Vue.ref(false); | 133 | let isUserFolder = Vue.ref(false); |
134 | 134 | ||
135 | + /*面包屑路径数据 | ||
136 | + * lu | ||
137 | + */ | ||
138 | + let breadcrumbList=Vue.ref([]); | ||
139 | + | ||
135 | let addHistoryNode = (item) => { | 140 | let addHistoryNode = (item) => { |
136 | 141 | ||
137 | if (item.name == undefined && item.fileName) { | 142 | if (item.name == undefined && item.fileName) { |
@@ -148,6 +153,8 @@ export default { | @@ -148,6 +153,8 @@ export default { | ||
148 | arr.push(item); | 153 | arr.push(item); |
149 | historyNode.value = arr; | 154 | historyNode.value = arr; |
150 | } | 155 | } |
156 | + breadcrumbList.value.push({data:item}); | ||
157 | + console.log("breadcrumbList",breadcrumbList.value) | ||
151 | 158 | ||
152 | currentNodeData.value = item; | 159 | currentNodeData.value = item; |
153 | } | 160 | } |
@@ -307,8 +314,14 @@ export default { | @@ -307,8 +314,14 @@ export default { | ||
307 | let arr = []; | 314 | let arr = []; |
308 | arr.push(id); | 315 | arr.push(id); |
309 | defaultExpandedKeys.value = arr; | 316 | defaultExpandedKeys.value = arr; |
310 | - | ||
311 | - | 317 | + let indexSlice=''; |
318 | + let arrList= breadcrumbList.value; | ||
319 | + arrList.map((item,index)=>{ | ||
320 | + if(id == item.data.id){ | ||
321 | + indexSlice=index | ||
322 | + } | ||
323 | + }) | ||
324 | + breadcrumbList.value=arrList.slice(0,indexSlice) | ||
312 | addHistoryNode(data); | 325 | addHistoryNode(data); |
313 | 326 | ||
314 | getPage(id); | 327 | getPage(id); |
@@ -866,6 +879,7 @@ export default { | @@ -866,6 +879,7 @@ export default { | ||
866 | 879 | ||
867 | return { | 880 | return { |
868 | /* viewEdit,*/ | 881 | /* viewEdit,*/ |
882 | + breadcrumbList, | ||
869 | editFileName, | 883 | editFileName, |
870 | isInput, | 884 | isInput, |
871 | iconclass, | 885 | iconclass, |
-
Please register or login to post a comment