<template>
|
<div id="app">
|
<router-view />
|
<theme-picker />
|
<!-- <Assistant v-if="routertf" /> -->
|
<Assistant
|
v-if="Assvite"
|
:initial-position="{ x: 50, y: 200 }"
|
:auto-hide="false"
|
:hide-delay="3000"
|
primary-color="#1890ff"
|
/>
|
<!-- 右下角:当前登录人待处理随访任务(按出院年月) -->
|
<PendingTaskBox v-if="Assvite" />
|
<!-- 临近超时任务登录后弹窗(仅景宁/新华两家机构触发) -->
|
<!-- <NearTimeoutDialog v-if="Assvite" /> -->
|
</div>
|
</template>
|
|
<script>
|
import ThemePicker from "@/components/ThemePicker";
|
|
export default {
|
name: "App",
|
components: {
|
ThemePicker,
|
Assistant: () => import("./components/Assistant"),
|
PendingTaskBox: () => import("./components/PendingTaskBox"),
|
NearTimeoutDialog: () => import("./components/NearTimeoutDialog"),
|
},
|
data() {
|
return {
|
Assvite: true,
|
};
|
},
|
created() {
|
// 初始化判断
|
this.checkAndUpdateAssvite();
|
},
|
watch: {
|
// 监听路由变化
|
'$route'(to, from) {
|
this.checkAndUpdateAssvite();
|
}
|
},
|
methods: {
|
checkAndUpdateAssvite() {
|
const isLoginPage = window.location.pathname.includes("/login");
|
this.Assvite = !isLoginPage;
|
console.log('当前路由:', this.$route.path, '是否登录页:', isLoginPage, '显示悬浮球:', this.Assvite);
|
}
|
},
|
metaInfo() {
|
return {
|
title:
|
this.$store.state.settings.dynamicTitle &&
|
this.$store.state.settings.title,
|
titleTemplate: (title) => {
|
return title
|
? `${title} - ${process.env.VUE_APP_TITLE}`
|
: process.env.VUE_APP_TITLE;
|
},
|
};
|
},
|
};
|
</script>
|
<style scoped>
|
#app {
|
overflow-y: scroll;
|
height: 100vh;
|
background: #f8fafd;
|
/* font-family: "Microsoft YaHei", Arial, Helvetica, sans-serif, "宋体"; */
|
font-family: "Hiragino Sans GB";
|
}
|
#app .theme-picker {
|
display: none;
|
}
|
</style>
|