|
@@ -6,7 +6,8 @@
|
|
class="aside-menu--first-item"
|
|
class="aside-menu--first-item"
|
|
:class="{
|
|
:class="{
|
|
active: String(active.apex) === first._compute._key,
|
|
active: String(active.apex) === first._compute._key,
|
|
- 'tip-active': String(tipActive) === first._compute._key
|
|
|
|
|
|
+ 'guide-active':
|
|
|
|
+ String(guideActive) === first._compute._key && menuGuide.show
|
|
}"
|
|
}"
|
|
v-for="(first, index) in filterMenus"
|
|
v-for="(first, index) in filterMenus"
|
|
:key="first._compute._key"
|
|
:key="first._compute._key"
|
|
@@ -100,7 +101,7 @@
|
|
</el-menu>
|
|
</el-menu>
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
- v-if="tipActive !== -1"
|
|
|
|
|
|
+ v-if="menuGuide.show"
|
|
v-loading.fullscreen="loading"
|
|
v-loading.fullscreen="loading"
|
|
element-loading-background="transparent"
|
|
element-loading-background="transparent"
|
|
element-loading-spinner="el-empty-spinner"
|
|
element-loading-spinner="el-empty-spinner"
|
|
@@ -110,9 +111,9 @@
|
|
<div class="guide-line"></div>
|
|
<div class="guide-line"></div>
|
|
<div class="guide-dialog">
|
|
<div class="guide-dialog">
|
|
<div class="dialog-content">
|
|
<div class="dialog-content">
|
|
- <h3 class="content-title">阳光直采上线了!</h3>
|
|
|
|
|
|
+ <h3 class="content-title">{{ menuGuide.title }}</h3>
|
|
<p class="content-text">
|
|
<p class="content-text">
|
|
- 海量企业直发采购需求,供应商可直接对接采购部门
|
|
|
|
|
|
+ {{ menuGuide.content }}
|
|
</p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
@@ -147,8 +148,10 @@ export default {
|
|
newFilterSubMenus() {
|
|
newFilterSubMenus() {
|
|
return this.filterSubMenus.filter((v) => v.child && v.child.length > 0)
|
|
return this.filterSubMenus.filter((v) => v.child && v.child.length > 0)
|
|
},
|
|
},
|
|
- tipActive() {
|
|
|
|
- return this.filterMenus.findIndex((ele) => ele.name === '直采')
|
|
|
|
|
|
+ guideActive() {
|
|
|
|
+ return this.filterMenus.findIndex(
|
|
|
|
+ (ele) => ele.name === this.menuGuide.name
|
|
|
|
+ )
|
|
}
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -157,16 +160,27 @@ export default {
|
|
floatMenusList: [],
|
|
floatMenusList: [],
|
|
openedSubMenu: [], // 鼠标悬浮默认打开的子菜单索引(index)列表
|
|
openedSubMenu: [], // 鼠标悬浮默认打开的子菜单索引(index)列表
|
|
asideTipTop: 0,
|
|
asideTipTop: 0,
|
|
- loading: true
|
|
|
|
|
|
+ loading: true,
|
|
|
|
+ menuGuide: {
|
|
|
|
+ name: '',
|
|
|
|
+ show: false,
|
|
|
|
+ title: '',
|
|
|
|
+ content: ''
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- tipActive(val) {
|
|
|
|
|
|
+ guideActive(val) {
|
|
if (val > 0) {
|
|
if (val > 0) {
|
|
- this.setTipBoxStyle()
|
|
|
|
|
|
+ this.setGuideBoxStyle()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ mounted() {
|
|
|
|
+ this.onListenGuideInfo()
|
|
|
|
+ // 模拟子应用冒泡过来的事件
|
|
|
|
+ //
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
...mapMutations('work-bench/menu', ['setActiveOfType']),
|
|
...mapMutations('work-bench/menu', ['setActiveOfType']),
|
|
...mapActions('work-bench/menu', ['setMenuType']),
|
|
...mapActions('work-bench/menu', ['setMenuType']),
|
|
@@ -277,21 +291,28 @@ export default {
|
|
this.showFloatMenus = false
|
|
this.showFloatMenus = false
|
|
this.floatMenusList = []
|
|
this.floatMenusList = []
|
|
},
|
|
},
|
|
- setTipBoxStyle() {
|
|
|
|
|
|
+ onListenGuideInfo() {
|
|
|
|
+ this.$BRACE.$on('menu-guide', (data = {}) => {
|
|
|
|
+ Object.assign(this.menuGuide, data)
|
|
|
|
+ console.log(this.menuGuide)
|
|
|
|
+ this.setGuideBoxStyle()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ setGuideBoxStyle() {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- const tipActive = document.querySelector(
|
|
|
|
- '.aside-menu--first-item.tip-active'
|
|
|
|
|
|
+ const guideActive = document.querySelector(
|
|
|
|
+ '.aside-menu--first-item.guide-active'
|
|
)
|
|
)
|
|
- console.log(tipActive.offsetTop)
|
|
|
|
- if (tipActive) {
|
|
|
|
- const offsetTop = tipActive?.offsetTop
|
|
|
|
|
|
+ if (guideActive) {
|
|
|
|
+ const offsetTop = guideActive?.offsetTop
|
|
this.asideTipTop = offsetTop + 6 - 20
|
|
this.asideTipTop = offsetTop + 6 - 20
|
|
}
|
|
}
|
|
}, 0)
|
|
}, 0)
|
|
},
|
|
},
|
|
onKnow() {
|
|
onKnow() {
|
|
try {
|
|
try {
|
|
- this.$BRACE.$emit('update-sunshine-guide', 'close')
|
|
|
|
|
|
+ this.menuGuide.show = false
|
|
|
|
+ this.$BRACE.$emit('close-guide', 'close')
|
|
} catch (e) {}
|
|
} catch (e) {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -382,7 +403,7 @@ $aside-menu--apex-bg: $aside-menu--color-black;
|
|
background: $aside-menu--color-secondary;
|
|
background: $aside-menu--color-secondary;
|
|
color: $aside-menu--color;
|
|
color: $aside-menu--color;
|
|
}
|
|
}
|
|
- &.tip-active {
|
|
|
|
|
|
+ &.guide-active {
|
|
position: relative;
|
|
position: relative;
|
|
&::after {
|
|
&::after {
|
|
position: absolute;
|
|
position: absolute;
|