2024-08-22 11:27:06 +08:00
|
|
|
<template>
|
2024-08-27 16:17:42 +08:00
|
|
|
<div class="footer flx-align-center pl10">
|
|
|
|
|
<el-dropdown>
|
2024-08-27 18:37:46 +08:00
|
|
|
<!-- <span class="el-dropdown-link">
|
2024-08-27 16:17:42 +08:00
|
|
|
{{ title }}
|
|
|
|
|
<el-icon class="el-icon--right">
|
|
|
|
|
<arrow-down />
|
|
|
|
|
</el-icon>
|
|
|
|
|
</span> -->
|
2024-10-31 14:53:29 +08:00
|
|
|
<!-- <el-button dictType="primary"> -->
|
2024-08-27 20:34:02 +08:00
|
|
|
<div class="change_mode">
|
|
|
|
|
{{ title }}
|
|
|
|
|
<el-icon class="el-icon--right change_mode_down"
|
|
|
|
|
><arrow-down
|
|
|
|
|
/></el-icon>
|
|
|
|
|
<el-icon class="el-icon--right change_mode_up"><arrow-up /></el-icon>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- </el-button> -->
|
2024-08-27 18:37:46 +08:00
|
|
|
<template #dropdown>
|
|
|
|
|
<el-dropdown-menu>
|
2024-12-05 11:07:45 +08:00
|
|
|
<el-dropdown-item @click="handelOpen('模拟式')"
|
2024-08-27 18:37:46 +08:00
|
|
|
>模拟式模块</el-dropdown-item
|
|
|
|
|
>
|
2024-12-05 11:07:45 +08:00
|
|
|
<el-dropdown-item @click="handelOpen('数字式')"
|
2024-08-27 18:37:46 +08:00
|
|
|
>数字式模块</el-dropdown-item
|
|
|
|
|
>
|
2024-12-05 11:07:45 +08:00
|
|
|
<el-dropdown-item @click="handelOpen('比对式')"
|
2024-11-20 15:13:50 +08:00
|
|
|
>比对式模块</el-dropdown-item
|
2024-08-27 18:37:46 +08:00
|
|
|
>
|
|
|
|
|
</el-dropdown-menu>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dropdown>
|
2024-09-02 16:10:33 +08:00
|
|
|
<p style="margin: 0;">
|
2024-08-27 20:34:02 +08:00
|
|
|
<a href="http://www.shining-electric.com/" target="_blank">
|
|
|
|
|
2024 © 南京灿能电力自动化股份有限公司
|
|
|
|
|
</a>
|
|
|
|
|
</p>
|
2024-08-22 11:27:06 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
2024-08-27 16:17:42 +08:00
|
|
|
<script lang="ts" setup>
|
2024-11-21 14:42:26 +08:00
|
|
|
import { ref, reactive, computed, onMounted, watch } from "vue";
|
2024-12-05 11:07:45 +08:00
|
|
|
import { useAuthStore } from "@/stores/modules/auth";
|
2024-11-21 14:42:26 +08:00
|
|
|
import { useModeStore } from '@/stores/modules/mode'; // 引入模式 store
|
2024-12-05 11:07:45 +08:00
|
|
|
import { useRouter } from "vue-router";
|
2024-12-05 13:51:47 +08:00
|
|
|
const title = ref("模拟式模块");
|
2024-12-05 11:07:45 +08:00
|
|
|
const router = useRouter();
|
|
|
|
|
const authStore = useAuthStore();
|
2024-11-21 14:42:26 +08:00
|
|
|
const modeStore = useModeStore();
|
2024-12-05 13:51:47 +08:00
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
switch (modeStore.currentMode) {
|
2024-11-21 14:42:26 +08:00
|
|
|
case '模拟式':
|
|
|
|
|
title.value = '模拟式模块';
|
|
|
|
|
break;
|
|
|
|
|
case '数字式':
|
|
|
|
|
title.value = '数字式模块';
|
|
|
|
|
break;
|
|
|
|
|
case '比对式':
|
|
|
|
|
title.value = '比对式模块';
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
title.value = '模拟式模块';
|
|
|
|
|
}
|
|
|
|
|
});
|
2024-12-05 11:07:45 +08:00
|
|
|
|
|
|
|
|
const handelOpen = async (item: string) => {
|
2024-12-17 14:08:01 +08:00
|
|
|
await authStore.setShowMenu();
|
|
|
|
|
modeStore.setCurrentMode(item); // 将模式code存入 store
|
|
|
|
|
if (router.currentRoute.value.path === '/home/index') {
|
|
|
|
|
// 强制刷新页面
|
|
|
|
|
window.location.reload();
|
|
|
|
|
} else {
|
|
|
|
|
router.push({ path: '/home/index' });
|
|
|
|
|
}
|
2024-12-05 11:07:45 +08:00
|
|
|
};
|
|
|
|
|
|
2024-08-27 16:17:42 +08:00
|
|
|
</script>
|
2024-08-22 11:27:06 +08:00
|
|
|
<style scoped lang="scss">
|
|
|
|
|
@import "./index.scss";
|
2024-08-27 20:34:02 +08:00
|
|
|
.footer {
|
2024-08-27 18:37:46 +08:00
|
|
|
position: relative;
|
2024-08-27 20:34:02 +08:00
|
|
|
background-color: var(--el-color-primary);
|
|
|
|
|
// .el-button:hover {
|
|
|
|
|
// background-color: var(--el-color-primary) !important;
|
|
|
|
|
// border: none !important;
|
|
|
|
|
// outline: none !important;
|
|
|
|
|
// }
|
|
|
|
|
.change_mode {
|
|
|
|
|
color: #fff;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: auto;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
.change_mode_down {
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
.change_mode_up {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.change_mode:hover {
|
|
|
|
|
.change_mode_down {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
.change_mode_up {
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.el-dropdown {
|
|
|
|
|
z-index: 1001;
|
|
|
|
|
}
|
|
|
|
|
p {
|
2024-08-27 18:37:46 +08:00
|
|
|
position: absolute;
|
2024-08-27 20:34:02 +08:00
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
a {
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
2024-08-27 18:37:46 +08:00
|
|
|
}
|
|
|
|
|
}
|
2024-08-22 11:27:06 +08:00
|
|
|
</style>
|