|
@@ -124,9 +124,10 @@ export default {
|
|
* 删除tab元素触发关闭页面的逻辑
|
|
* 删除tab元素触发关闭页面的逻辑
|
|
* @param {Object} e 事件对象
|
|
* @param {Object} e 事件对象
|
|
* @param {Object} item 当前点击的tab元素数据
|
|
* @param {Object} item 当前点击的tab元素数据
|
|
- * @param {Object} index 当前tab的下标
|
|
|
|
|
|
+ * @param {Object} index 当前tab的下标p
|
|
*/
|
|
*/
|
|
handleClose(e, item, index) {
|
|
handleClose(e, item, index) {
|
|
|
|
+ console.log(item);
|
|
this.$store.commit(
|
|
this.$store.commit(
|
|
"removePagesByName",
|
|
"removePagesByName",
|
|
(item.rountPath == undefined ? item.jspUrl : item.rountPath).replace(
|
|
(item.rountPath == undefined ? item.jspUrl : item.rountPath).replace(
|
|
@@ -142,43 +143,38 @@ export default {
|
|
(item.rountPath == undefined ? item.jspUrl : item.rountPath) !=
|
|
(item.rountPath == undefined ? item.jspUrl : item.rountPath) !=
|
|
this.getDefaultActive
|
|
this.getDefaultActive
|
|
) {
|
|
) {
|
|
- list.splice(index, 1);
|
|
|
|
|
|
+ if (item.jspUrl != "/leader" && item.rountPath != "/leader") {
|
|
|
|
+ list.splice(index, 1);
|
|
|
|
+ }
|
|
this.$store.commit("setTabList", list);
|
|
this.$store.commit("setTabList", list);
|
|
} else {
|
|
} else {
|
|
- if (list[index - 1]) {
|
|
|
|
- let rountPath = list[index - 1].hasOwnProperty("rountPath")
|
|
|
|
- ? list[index - 1].rountPath
|
|
|
|
- : list[index - 1].jspUrl;
|
|
|
|
- this.$store.commit("setDefaultActive", rountPath);
|
|
|
|
- if (
|
|
|
|
- (item.rountPath == undefined ? item.jspUrl : item.rountPath) !=
|
|
|
|
- this.getDefaultActive
|
|
|
|
- ) {
|
|
|
|
- list.splice(index, 1);
|
|
|
|
- this.$store.commit("setTabList", list);
|
|
|
|
- this.$router.push(rountPath);
|
|
|
|
- }
|
|
|
|
- } else if (list[index + 1]) {
|
|
|
|
- let rountPath = list[index + 1].hasOwnProperty("rountPath")
|
|
|
|
- ? list[index + 1].rountPath
|
|
|
|
- : list[index + 1].jspUrl;
|
|
|
|
- this.$store.commit("setDefaultActive", rountPath);
|
|
|
|
- if (
|
|
|
|
- (item.rountPath == undefined ? item.jspUrl : item.rountPath) !=
|
|
|
|
- this.getDefaultActive
|
|
|
|
- ) {
|
|
|
|
- list.splice(index, 1);
|
|
|
|
- this.$store.commit("setTabList", list);
|
|
|
|
- this.$router.push(rountPath);
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- if (
|
|
|
|
- (item.rountPath == undefined ? item.jspUrl : item.rountPath) !=
|
|
|
|
- this.getDefaultActive
|
|
|
|
- ) {
|
|
|
|
- list.splice(index, 1);
|
|
|
|
- this.$store.commit("setTabList", list);
|
|
|
|
- this.$router.push("/");
|
|
|
|
|
|
+ if (item.jspUrl != "/leader" && item.rountPath != "/leader") {
|
|
|
|
+ if (list[index - 1]) {
|
|
|
|
+ let rountPath = list[index - 1].hasOwnProperty("rountPath")
|
|
|
|
+ ? list[index - 1].rountPath
|
|
|
|
+ : list[index - 1].jspUrl;
|
|
|
|
+ this.$store.commit("setDefaultActive", rountPath);
|
|
|
|
+ if (item.jspUrl != "/leader" && item.rountPath != "/leader") {
|
|
|
|
+ list.splice(index, 1);
|
|
|
|
+ this.$store.commit("setTabList", list);
|
|
|
|
+ this.$router.push(rountPath);
|
|
|
|
+ }
|
|
|
|
+ } else if (list[index + 1]) {
|
|
|
|
+ let rountPath = list[index + 1].hasOwnProperty("rountPath")
|
|
|
|
+ ? list[index + 1].rountPath
|
|
|
|
+ : list[index + 1].jspUrl;
|
|
|
|
+ this.$store.commit("setDefaultActive", rountPath);
|
|
|
|
+ if (item.jspUrl != "/leader" && item.rountPath != "/leader") {
|
|
|
|
+ list.splice(index, 1);
|
|
|
|
+ this.$store.commit("setTabList", list);
|
|
|
|
+ this.$router.push(rountPath);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (item.jspUrl != "/leader" && item.rountPath != "/leader") {
|
|
|
|
+ list.splice(index, 1);
|
|
|
|
+ this.$store.commit("setTabList", list);
|
|
|
|
+ this.$router.push("/");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -403,7 +399,7 @@ export default {
|
|
line-height: 50px;
|
|
line-height: 50px;
|
|
color: black;
|
|
color: black;
|
|
position: relative;
|
|
position: relative;
|
|
- width: 160px;
|
|
|
|
|
|
+ width: 180px;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
border-radius: 0px 5px 0px 0px;
|
|
border-radius: 0px 5px 0px 0px;
|
|
// margin-left: 15px;
|
|
// margin-left: 15px;
|
|
@@ -457,6 +453,7 @@ export default {
|
|
|
|
|
|
.tab-item-active {
|
|
.tab-item-active {
|
|
border-bottom: 3px solid #41a2fd;
|
|
border-bottom: 3px solid #41a2fd;
|
|
|
|
+
|
|
.skew {
|
|
.skew {
|
|
background: #fff;
|
|
background: #fff;
|
|
}
|
|
}
|