Commit 8003312d by 潘际乾

页签关闭

parent 9b8aaa91
...@@ -20,9 +20,7 @@ ...@@ -20,9 +20,7 @@
v-if="isAffix(tag) && tag.meta.icon" v-if="isAffix(tag) && tag.meta.icon"
:class="tag.meta.icon" :class="tag.meta.icon"
></span> ></span>
{{ {{ typeof tag.title === "function" ? tag.title(tag) : tag.title }}
typeof tag.title === "function" ? tag.title(tag) : tag.title
}}
<span <span
v-if="!isAffix(tag)" v-if="!isAffix(tag)"
class="el-icon-close" class="el-icon-close"
...@@ -74,9 +72,9 @@ export default { ...@@ -74,9 +72,9 @@ export default {
watch: { watch: {
$route() { $route() {
if (this.$route.path.startsWith("/review")) { if (this.$route.path.startsWith("/review")) {
this.$store.commit("setMode", "display") this.$store.commit("setMode", "display");
} else { } else {
this.$store.commit("setMode", "normal") this.$store.commit("setMode", "normal");
} }
this.addTags(); this.addTags();
this.moveToCurrentTag(); this.moveToCurrentTag();
...@@ -163,19 +161,27 @@ export default { ...@@ -163,19 +161,27 @@ export default {
}); });
}, },
closeSelectedTag(view) { closeSelectedTag(view) {
const title = typeof view.title === "function" ? view.title(view) : view.title
if (title.indexOf("详情") > - 1 || title.indexOf("info") > -1 || title.indexOf("查询") > -1) {
this.closeTagView(view);
return
}
this.$confirm("您有未保存的数据,确定退出吗, 是否继续?", "提示", { this.$confirm("您有未保存的数据,确定退出吗, 是否继续?", "提示", {
showCancelButton: true, showCancelButton: true,
type: "warning", type: "warning",
}).then(() => { }).then(() => {
this.$store this.closeTagView(view);
.dispatch("TagsView/delView", view)
.then(({ visitedViews }) => {
if (this.isActive(view)) {
this.toLastView(visitedViews, view);
}
});
}); });
}, },
closeTagView(view) {
this.$store
.dispatch("TagsView/delView", view)
.then(({ visitedViews }) => {
if (this.isActive(view)) {
this.toLastView(visitedViews, view);
}
});
},
closeOthersTags() { closeOthersTags() {
this.$router.push(this.selectedTag); this.$router.push(this.selectedTag);
this.$store this.$store
...@@ -259,7 +265,7 @@ export default { ...@@ -259,7 +265,7 @@ export default {
font-size: 12px; font-size: 12px;
/* margin-left: 4px; */ /* margin-left: 4px; */
/* margin-top: 4px; */ /* margin-top: 4px; */
margin:0 4px 0 0; margin: 0 4px 0 0;
} }
.tags-view-container .tags-view-wrapper .tags-view-item:first-of-type { .tags-view-container .tags-view-wrapper .tags-view-item:first-of-type {
margin-left: 10px; margin-left: 10px;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
待经办列表 待经办列表
<el-badge v-if="$store.state.Status.taskList.sptsel>0" :value="$store.state.Status.taskList.sptsel" :max="99"/> <el-badge v-if="$store.state.Status.taskList.sptsel>0" :value="$store.state.Status.taskList.sptsel" :max="99"/>
</span> </span>
<c-content :height="120"> <c-content :height="160">
<t-sptsel /> <t-sptsel />
</c-content> </c-content>
</el-tab-pane> </el-tab-pane>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
待复核列表 待复核列表
<el-badge v-if="$store.state.Status.taskList.trnrel>0" :value="$store.state.Status.taskList.trnrel" :max="99"/> <el-badge v-if="$store.state.Status.taskList.trnrel>0" :value="$store.state.Status.taskList.trnrel" :max="99"/>
</span> </span>
<c-content :height="120"> <c-content :height="160">
<t-trnrel /> <t-trnrel />
</c-content> </c-content>
</el-tab-pane> </el-tab-pane>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
已完成列表 已完成列表
<el-badge v-if="$store.state.Status.taskList.trnfnd>0" :value="$store.state.Status.taskList.trnfnd" :max="99"/> <el-badge v-if="$store.state.Status.taskList.trnfnd>0" :value="$store.state.Status.taskList.trnfnd" :max="99"/>
</span> </span>
<c-content :height="120"> <c-content :height="160">
<t-trnfnd /> <t-trnfnd />
</c-content> </c-content>
</el-tab-pane> </el-tab-pane>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
到期提示 到期提示
<el-badge v-if="$store.state.Status.taskList.diasel>0" :value="$store.state.Status.taskList.diasel" :max="99"/> <el-badge v-if="$store.state.Status.taskList.diasel>0" :value="$store.state.Status.taskList.diasel" :max="99"/>
</span> </span>
<c-content :height="120"> <c-content :height="160">
<t-diasel/> <t-diasel/>
</c-content> </c-content>
</el-tab-pane> </el-tab-pane>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment