|
@@ -142,6 +142,19 @@ const isShowLogin = () => {
|
|
|
}, settimeouttime);
|
|
}, settimeouttime);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 退出登录后隐藏icon
|
|
|
|
|
+const Logout = () => {
|
|
|
|
|
+ AIIconVisible.value = false
|
|
|
|
|
+ AIRobotHoverVisible.value = false
|
|
|
|
|
+ isShowDefault.value = false
|
|
|
|
|
+ isShowAIRobotTop.value = false
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 退出登录后隐藏icon
|
|
|
|
|
+const checknoPrompt = () => {
|
|
|
|
|
+ AIIconVisible.value = true
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 点击问题
|
|
// 点击问题
|
|
|
const handelClick = (item: any) => {
|
|
const handelClick = (item: any) => {
|
|
|
emit('handelClickAIDefault',item)
|
|
emit('handelClickAIDefault',item)
|
|
@@ -154,10 +167,9 @@ const handelClick = (item: any) => {
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
prepareGroups()
|
|
prepareGroups()
|
|
|
emitter.on('login-success', isShowLogin)
|
|
emitter.on('login-success', isShowLogin)
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
-onUnmounted(() => {
|
|
|
|
|
- emitter.off('login-success', isShowLogin)
|
|
|
|
|
|
|
+ emitter.on('login-out', Logout)
|
|
|
|
|
+ emitter.on('checkPrompt', Logout)
|
|
|
|
|
+ emitter.on('checknoPrompt', checknoPrompt)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
defineExpose({
|
|
defineExpose({
|
|
@@ -168,7 +180,7 @@ defineExpose({
|
|
|
<!-- 上方显示的弹窗 -->
|
|
<!-- 上方显示的弹窗 -->
|
|
|
<div class="AIRobot-top" v-if="isShowDefault">
|
|
<div class="AIRobot-top" v-if="isShowDefault">
|
|
|
<div class="flex_end" @click="HideAIRobotTop">
|
|
<div class="flex_end" @click="HideAIRobotTop">
|
|
|
- <div class="icon flex_center">
|
|
|
|
|
|
|
+ <div class="icon flex_center icon-AI">
|
|
|
<span class="iconfont_icon icon_dark AI_icon">
|
|
<span class="iconfont_icon icon_dark AI_icon">
|
|
|
<svg class="iconfont" aria-hidden="true">
|
|
<svg class="iconfont" aria-hidden="true">
|
|
|
<use xlink:href="#icon-icon_reject_b"></use>
|
|
<use xlink:href="#icon-icon_reject_b"></use>
|
|
@@ -209,7 +221,7 @@ defineExpose({
|
|
|
</div>
|
|
</div>
|
|
|
<div class="AIRobot-top" v-if="isShowAIRobotTop">
|
|
<div class="AIRobot-top" v-if="isShowAIRobotTop">
|
|
|
<div class="flex_end" @click="HideAIRobotTopTwo">
|
|
<div class="flex_end" @click="HideAIRobotTopTwo">
|
|
|
- <div class="icon flex_center">
|
|
|
|
|
|
|
+ <div class="icon flex_center icon-AI">
|
|
|
<span class="iconfont_icon icon_dark AI_icon">
|
|
<span class="iconfont_icon icon_dark AI_icon">
|
|
|
<svg class="iconfont" aria-hidden="true">
|
|
<svg class="iconfont" aria-hidden="true">
|
|
|
<use xlink:href="#icon-icon_reject_b"></use>
|
|
<use xlink:href="#icon-icon_reject_b"></use>
|
|
@@ -220,7 +232,7 @@ defineExpose({
|
|
|
<div class="dialogue_title">Hi! I'm your Freight Assistant, always on call</div>
|
|
<div class="dialogue_title">Hi! I'm your Freight Assistant, always on call</div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 悬浮icon -->
|
|
<!-- 悬浮icon -->
|
|
|
- <div class="AIRobot flex_center">
|
|
|
|
|
|
|
+ <div class="AIRobot flex_center" v-if="AIIconVisible">
|
|
|
<el-popover :visible="visible" placement="top-end" width="auto">
|
|
<el-popover :visible="visible" placement="top-end" width="auto">
|
|
|
<template #reference>
|
|
<template #reference>
|
|
|
<el-avatar
|
|
<el-avatar
|
|
@@ -286,7 +298,7 @@ defineExpose({
|
|
|
fill: var(--color-theme);
|
|
fill: var(--color-theme);
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
}
|
|
}
|
|
|
-.icon {
|
|
|
|
|
|
|
+.icon-AI {
|
|
|
width: 24px;
|
|
width: 24px;
|
|
|
height: 24px;
|
|
height: 24px;
|
|
|
background-color: var(--management-bg-color);
|
|
background-color: var(--management-bg-color);
|