Compare commits

..

No commits in common. "6b3eb0dca963c21c2c4a0caed80af3173e0f2166" and "5edd2902c075f34d78d9bb95dd804ec2c7bb4d6b" have entirely different histories.

5 changed files with 11 additions and 132 deletions

View File

@ -30,8 +30,7 @@
"three": "^0.148.0", "three": "^0.148.0",
"vue": "3.2.45", "vue": "3.2.45",
"vue-cropper": "1.0.3", "vue-cropper": "1.0.3",
"vue-router": "4.1.4", "vue-router": "4.1.4"
"dayjs": "^1.11.10"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "3.1.0", "@vitejs/plugin-vue": "3.1.0",

View File

@ -123,8 +123,7 @@ aside {
//main-container //main-container
.app-container { .app-container {
height: 80px; padding: 20px;
} }
.components-container { .components-container {

View File

@ -1,24 +1,8 @@
<template> <template>
<div class="navbar"> <div class="navbar">
<!-- <top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" /> --> <top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" />
<div class="left">
<img src="@/assets/logo/logo.png" alt="dark" />
<span>
若依管理系统
</span>
</div>
<div class="middle">
BIM运维管理系统
</div>
<div class="right-menu"> <div class="right-menu">
<template v-if="appStore.device !== 'mobile'"> <template v-if="appStore.device !== 'mobile'">
<p class="time">
<font> {{ time }} </font>
<div class="currentTime-week">
<div>{{ currentTime }}</div>
<div>{{ week }}</div>
</div>
</p>
<header-search id="header-search" class="right-menu-item" /> <header-search id="header-search" class="right-menu-item" />
<el-tooltip content="源码地址" effect="dark" placement="bottom"> <el-tooltip content="源码地址" effect="dark" placement="bottom">
@ -73,23 +57,11 @@ import RuoYiDoc from '@/components/RuoYi/Doc'
import useAppStore from '@/store/modules/app' import useAppStore from '@/store/modules/app'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import useSettingsStore from '@/store/modules/settings' import useSettingsStore from '@/store/modules/settings'
import dayjs from "dayjs";
const appStore = useAppStore() const appStore = useAppStore()
const userStore = useUserStore() const userStore = useUserStore()
const settingsStore = useSettingsStore() const settingsStore = useSettingsStore()
const data = reactive({
interval: "",
currentTime: "",
time: "",
week: ""
});
const { interval, currentTime, time, week } = toRefs(data);
onMounted(() => {
setInterval(updateTime, 1000);
});
function toggleSideBar() { function toggleSideBar() {
appStore.toggleSideBar() appStore.toggleSideBar()
} }
@ -118,37 +90,7 @@ function logout() {
}) })
}).catch(() => { }); }).catch(() => { });
} }
const updateTime = () => {
currentTime.value = dayjs().format("YYYY年 MM月 DD日");
time.value = dayjs().format("HH:mm");
week.value = format(dayjs().day());
};
const format = (week) => {
switch (week) {
case 1:
return '星期一';
break;
case 2:
return '星期二';
break;
case 3:
return '星期三';
break;
case 4:
return '星期四';
break;
case 5:
return '星期五';
break;
case 6:
return '星期六';
break;
case 0:
return '星期日';
break;
}
}
const emits = defineEmits(['setLayout']) const emits = defineEmits(['setLayout'])
function setLayout() { function setLayout() {
emits('setLayout'); emits('setLayout');
@ -162,55 +104,6 @@ function setLayout() {
position: relative; position: relative;
background: #fff; background: #fff;
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08); box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
display: flex;
justify-content: space-between;
.left {
width: 33%;
display: flex;
align-items: center;
height: 100%;
// border: 1px solid red;
}
.middle {
width: 33%;
// border: 1px solid red;
display: flex;
align-items: center;
justify-content: center;
}
.right-menu {
width: 33%;
// border: 1px solid red;
display: flex;
align-items: center;
justify-content: end;
.time {
display: flex;
align-items: center;
height: 100%;
font {
font-size: 30px;
}
.currentTime-week {
height: 100%;
margin: 0 10px;
>div {
width: 100%;
height: 50% !important;
display: flex !important;
align-items: center !important;
justify-content: center;
}
}
}
}
.hamburger-container { .hamburger-container {
line-height: 46px; line-height: 46px;
@ -291,4 +184,5 @@ function setLayout() {
} }
} }
} }
}</style> }
</style>

View File

@ -1,8 +0,0 @@
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn' // 导入中文语言包
import weekOfYear from 'dayjs/plugin/weekOfYear'
import weekday from 'dayjs/plugin/weekday'
dayjs.extend(weekOfYear)
dayjs.extend(weekday)
dayjs.locale('zh-cn') // 设置语言为中文

View File

@ -33,20 +33,15 @@ const gotoPage = (item) => {
.home { .home {
.topMenu { .topMenu {
width: 100%; width: 100%;
height: 100%; height: 45px;
// border: 1px solid red; border: 1px solid red;
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
background: rgba(0, 225, 255, 0.445);
> div { > div {
width: 260px; width: 240px;
height: 100%;
cursor: pointer; cursor: pointer;
display: flex; background: red;
align-items: center;
border-right: 1px solid #fff;
justify-content: center;
font-size: 20px;
} }
} }
} }