|
@@ -1,11 +1,8 @@
|
|
|
<template>
|
|
|
<div class="avue-tags" v-if="showTag">
|
|
|
<!-- tag盒子 -->
|
|
|
- <div
|
|
|
- v-if="contextmenuFlag"
|
|
|
- class="avue-tags__contentmenu"
|
|
|
- :style="{ left: contentmenuX + 'px', top: contentmenuY + 'px' }"
|
|
|
- >
|
|
|
+ <div v-if="contextmenuFlag" class="avue-tags__contentmenu"
|
|
|
+ :style="{ left: contentmenuX + 'px', top: contentmenuY + 'px' }">
|
|
|
<div class="item" @click="clearCacheTags">
|
|
|
{{ $t("tagsView.clearCache") }}
|
|
|
</div>
|
|
@@ -17,40 +14,17 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="display:flex;align-items: center;">
|
|
|
- <div
|
|
|
- class="avue-breadcrumb"
|
|
|
- :class="[{ 'avue-breadcrumb--active': isCollapse }]"
|
|
|
- v-if="showCollapse"
|
|
|
- >
|
|
|
+ <div class="avue-breadcrumb" :class="[{ 'avue-breadcrumb--active': isCollapse }]" v-if="showCollapse">
|
|
|
<i class="icon-navicon" @click="setCollapse"></i>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="avue-tags__box"
|
|
|
- :class="{ 'avue-tags__box--close': !website.isFirstPage }"
|
|
|
- >
|
|
|
- <el-tabs
|
|
|
- v-model="active"
|
|
|
- type="card"
|
|
|
- @contextmenu.native="handleContextmenu"
|
|
|
- :closable="tagLen !== 1"
|
|
|
- @tab-click="openTag"
|
|
|
- @edit="menuTag"
|
|
|
- >
|
|
|
- <el-tab-pane
|
|
|
- :key="item.value"
|
|
|
- v-for="item in tagList"
|
|
|
- :label="generateTitle(item)"
|
|
|
- :name="item.value"
|
|
|
- >
|
|
|
+ <div class="avue-tags__box" :class="{ 'avue-tags__box--close': !website.isFirstPage }">
|
|
|
+ <el-tabs v-model="active" type="card" @contextmenu.native="handleContextmenu" :closable="tagLen !== 1"
|
|
|
+ @tab-click="openTag" @edit="menuTag">
|
|
|
+ <el-tab-pane :key="item.value" v-for="item in tagList" :label="generateTitle(item)" :name="item.value">
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<div class="avue-tags__menu avue-tags-top-foot">
|
|
|
- <el-tooltip
|
|
|
- v-if="showColor"
|
|
|
- effect="dark"
|
|
|
- :content="$t('navbar.color')"
|
|
|
- placement="bottom"
|
|
|
- >
|
|
|
+ <el-tooltip v-if="showColor" effect="dark" :content="$t('navbar.color')" placement="bottom">
|
|
|
<top-color></top-color>
|
|
|
</el-tooltip>
|
|
|
<!-- <el-tooltip
|
|
@@ -80,44 +54,26 @@
|
|
|
<top-theme></top-theme>
|
|
|
</div>
|
|
|
</el-tooltip> -->
|
|
|
- <el-tooltip
|
|
|
- effect="dark"
|
|
|
- :content="$t('navbar.notice')"
|
|
|
- placement="bottom"
|
|
|
- style="margin-right:12px"
|
|
|
- >
|
|
|
+ <el-tooltip effect="dark" :content="$t('navbar.notice')" placement="bottom" style="margin-right:12px">
|
|
|
<div class="top-bar__item--show">
|
|
|
<top-notice></top-notice>
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
- <el-tooltip
|
|
|
- effect="dark"
|
|
|
- :content="$t('navbar.language')"
|
|
|
- placement="bottom"
|
|
|
- >
|
|
|
+ <el-tooltip effect="dark" :content="$t('navbar.language')" placement="bottom">
|
|
|
<div class="top-bar__item--show">
|
|
|
<top-lang></top-lang>
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
- <el-tooltip
|
|
|
- v-if="showFullScren"
|
|
|
- effect="dark"
|
|
|
- :content="
|
|
|
- isFullScren ? $t('navbar.screenfullF') : $t('navbar.screenfull')
|
|
|
- "
|
|
|
- placement="bottom"
|
|
|
- >
|
|
|
+ <el-tooltip v-if="showFullScren" effect="dark" :content="
|
|
|
+ isFullScren ? $t('navbar.screenfullF') : $t('navbar.screenfull')
|
|
|
+ " placement="bottom">
|
|
|
<div>
|
|
|
- <i
|
|
|
- :class="isFullScren ? 'icon-tuichuquanping' : 'icon-quanping'"
|
|
|
- @click="handleScreen"
|
|
|
- ></i>
|
|
|
+ <i :class="isFullScren ? 'icon-tuichuquanping' : 'icon-quanping'" @click="handleScreen"></i>
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
<el-dropdown>
|
|
|
<div class="avue-tags-more">
|
|
|
- <span style="margin-right:2px">{{ $t("tagsView.menu") }}</span
|
|
|
- ><i class="tradingIcon icon-more"></i>
|
|
|
+ <span style="margin-right:2px">{{ $t("tagsView.menu") }}</span><i class="tradingIcon icon-more"></i>
|
|
|
<!-- <el-button size="mini" icon="el-icon-more" circle></el-button> -->
|
|
|
</div>
|
|
|
<!-- <el-button type="primary" size="mini">
|
|
@@ -130,41 +86,37 @@
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item @click.native="$parent.isSearch = true">{{
|
|
|
$t("tagsView.search")
|
|
|
- }}
|
|
|
+ }}
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item @click.native="openBug">{{
|
|
|
$t("navbar.bug")
|
|
|
- }}
|
|
|
+ }}
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item @click.native="openLock">{{
|
|
|
$t("navbar.lock")
|
|
|
- }}
|
|
|
+ }}
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item @click.native="openTheme">{{
|
|
|
$t("navbar.theme")
|
|
|
- }}
|
|
|
+ }}
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item @click.native="closeOthersTags">{{
|
|
|
$t("tagsView.closeOthers")
|
|
|
- }}
|
|
|
+ }}
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item @click.native="closeAllTags">{{
|
|
|
$t("tagsView.closeAll")
|
|
|
- }}
|
|
|
+ }}
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item @click.native="clearCacheTags">{{
|
|
|
$t("tagsView.clearCache")
|
|
|
- }}
|
|
|
+ }}
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
<el-dropdown>
|
|
|
<span class="el-dropdown-link">
|
|
|
- <img
|
|
|
- class="top-bar__img"
|
|
|
- :src="userInfo.avatar"
|
|
|
- style="margin-left:8px"
|
|
|
- />
|
|
|
+ <img class="top-bar__img" :src="userInfo.avatar" style="margin-left:8px" />
|
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
@@ -174,11 +126,10 @@
|
|
|
<el-dropdown-item>
|
|
|
<router-link to="/info/index">{{
|
|
|
$t("navbar.userinfo")
|
|
|
- }}
|
|
|
+ }}
|
|
|
</router-link>
|
|
|
</el-dropdown-item>
|
|
|
- <el-dropdown-item @click.native="logout" divided
|
|
|
- >{{ $t("navbar.logOut") }}
|
|
|
+ <el-dropdown-item @click.native="logout" divided>{{ $t("navbar.logOut") }}
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
@@ -188,10 +139,10 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import {resetRouter} from "@/router/router";
|
|
|
-import {fullscreenToggel, listenfullscreen} from "@/util/util";
|
|
|
-import {mapGetters, mapState} from "vuex";
|
|
|
-import {clearCache} from "@/api/user";
|
|
|
+import { resetRouter } from "@/router/router";
|
|
|
+import { fullscreenToggel, listenfullscreen } from "@/util/util";
|
|
|
+import { mapGetters, mapState } from "vuex";
|
|
|
+import { clearCache } from "@/api/user";
|
|
|
import topColor from "./top/top-color.vue";
|
|
|
import topLock from "./top/top-lock";
|
|
|
import topTheme from "./top/top-theme";
|
|
@@ -268,7 +219,7 @@ export default {
|
|
|
this.$store.commit("DEL_ALL_DETAIL");
|
|
|
this.$store.dispatch("LogOut").then(() => {
|
|
|
resetRouter();
|
|
|
- this.$router.push({path: "/login"});
|
|
|
+ this.$router.push({ path: "/login" });
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -277,8 +228,8 @@ export default {
|
|
|
},
|
|
|
generateTitle(item) {
|
|
|
return this.$router.$avueRouter.generateTitle(
|
|
|
- item.label,
|
|
|
- (item.meta || {}).i18n
|
|
|
+ item.label,
|
|
|
+ (item.meta || {}).i18n
|
|
|
);
|
|
|
},
|
|
|
watchContextmenu(event) {
|
|
@@ -312,7 +263,7 @@ export default {
|
|
|
},
|
|
|
menuTag(value, action) {
|
|
|
if (action === "remove") {
|
|
|
- let {tag, key} = this.findTag(value);
|
|
|
+ let { tag, key } = this.findTag(value);
|
|
|
if (tag.label == "报价(E)") {
|
|
|
this.$store.commit("OUT_BJ_STATUS");
|
|
|
}
|
|
@@ -388,6 +339,9 @@ export default {
|
|
|
if (tag.label == "销售订单(D)") {
|
|
|
this.$store.commit('JXSSALE_OUT_DETAIL');
|
|
|
}
|
|
|
+ if (tag.label == "销售机会") {
|
|
|
+ this.$store.commit('XSJH_OUT_DETAIL');
|
|
|
+ }
|
|
|
this.$store.commit("DEL_TAG", tag);
|
|
|
if (tag.value === this.tag.value) {
|
|
|
tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个
|
|
@@ -408,7 +362,7 @@ export default {
|
|
|
tag = item;
|
|
|
}
|
|
|
this.$router.push({
|
|
|
- path: this.$router.$avueRouter.getPath({name: tag.label,src: tag.value},tag.meta),
|
|
|
+ path: this.$router.$avueRouter.getPath({ name: tag.label, src: tag.value }, tag.meta),
|
|
|
query: tag.query
|
|
|
});
|
|
|
|
|
@@ -444,7 +398,7 @@ export default {
|
|
|
key = index;
|
|
|
}
|
|
|
});
|
|
|
- return {tag: tag, key: key};
|
|
|
+ return { tag: tag, key: key };
|
|
|
},
|
|
|
closeAllTags() {
|
|
|
this.contextmenuFlag = false;
|