Browse Source

1

lwx_v11^2
hreenshan112 1 year ago
parent
commit
eea07cd7aa
  1. 36
      src/layout/components/Top.vue
  2. 10
      src/layout/index.vue
  3. 46
      src/views/dashboard/index.vue

36
src/layout/components/Top.vue

@ -13,23 +13,23 @@ const myPasswordBoxIsShow = ref(false);
const date: Date = new Date();
const tipsType = ref<number>(1)
const tipsType = ref<number>(1);
//
const greetings = computed(() => {
if (date.getHours() >= 6 && date.getHours() < 8) {
tipsType.value = 1
tipsType.value = 1;
return "晨起披衣出草堂,轩窗已自喜微凉🌅!";
} else if (date.getHours() >= 8 && date.getHours() < 12) {
tipsType.value = 2
tipsType.value = 2;
return "上午好🌞!";
} else if (date.getHours() >= 12 && date.getHours() < 18) {
tipsType.value = 3
tipsType.value = 3;
return "下午好☕!";
} else if (date.getHours() >= 18 && date.getHours() < 24) {
tipsType.value = 4
tipsType.value = 4;
return "晚上好🌃!";
} else if (date.getHours() >= 0 && date.getHours() < 6) {
tipsType.value = 5
tipsType.value = 5;
return "偷偷向银河要了一把碎星,只等你闭上眼睛撒入你的梦中,晚安🌛!";
}
});
@ -58,9 +58,7 @@ function logout() {
/**
* 打开个人资料
*/
const openMyContBox = () => {
}
const openMyContBox = () => {};
/**
* 修改个人密码
*/
@ -68,17 +66,15 @@ const editMyPasswordForm = () => {
// console.log("");
myPasswordBoxIsShow.value = true;
// console.log("",myPasswordBoxIsShow.value );
}
};
</script>
<template>
<div class="top">
<div class="logo">
<img src="../../assets/images/logo.png">
<img src="../../assets/images/logo.png" />
</div>
<div class="flex">
<!-- &lt;!&ndash; 导航栏设置(窄屏隐藏)&ndash;&gt;-->
<div v-if="device !== 'mobile'" class="setting-container">
<!-- <el-text v-if="tipsType==1" class="mx-1" type="success">{{ greetings }}</el-text>-->
@ -88,9 +84,7 @@ const editMyPasswordForm = () => {
<!-- <el-text v-if="tipsType==5" class="mx-1">{{ greetings }}</el-text>-->
<!--全屏 -->
<div class="setting-item" @click="toggle">
<svg-icon
:icon-class="isFullscreen ? 'exit-fullscreen' : 'fullscreen'"
/>
<svg-icon :icon-class="isFullscreen ? 'exit-fullscreen' : 'fullscreen'" />
</div>
<!-- 布局大小 -->
<el-tooltip content="布局大小" effect="dark" placement="bottom">
@ -112,8 +106,12 @@ const editMyPasswordForm = () => {
<router-link to="/">
<el-dropdown-item>{{ $t("navbar.dashboard") }}</el-dropdown-item>
</router-link>
<el-dropdown-item @click="openMyContBox">{{ $t("navbar.archives") }}</el-dropdown-item>
<el-dropdown-item @click="editMyPasswordForm">{{ $t("navbar.password") }}</el-dropdown-item>
<el-dropdown-item @click="openMyContBox">{{
$t("navbar.archives")
}}</el-dropdown-item>
<el-dropdown-item @click="editMyPasswordForm">{{
$t("navbar.password")
}}</el-dropdown-item>
<el-dropdown-item divided @click="logout">
{{ $t("navbar.logout") }}
</el-dropdown-item>
@ -128,7 +126,7 @@ const editMyPasswordForm = () => {
<style scoped lang="scss">
.top {
height: 68px;
background: #1E5EFF;
background: #1e5eff;
position: fixed;
padding: 0 20px;
top: 0;

10
src/layout/index.vue

@ -4,7 +4,7 @@ import {useWindowSize} from "@vueuse/core";
import { AppMain, Navbar, Settings, TagsView } from "./components/index";
import Sidebar from "./components/Sidebar/index.vue";
import RightPanel from "@/components/RightPanel/index.vue";
import Top from './components/Top.vue'
import Top from "./components/Top.vue";
import { useAppStore } from "@/store/modules/app";
import { useSettingsStore } from "@/store/modules/settings";
@ -56,9 +56,7 @@ function handleOutsideClick() {
</script>
<template>
<div :class="classObj" class="app-wrapper">
<!-- 手机设备侧边栏打开遮罩层 -->
<div
v-if="classObj.mobile && classObj.openSidebar"
@ -67,11 +65,10 @@ function handleOutsideClick() {
></div>
<top></top>
<Sidebar class="sidebar-container" />
<div :class="{ hasTagsView: showTagsView }" class="main-container">
<div :class="{ 'fixed-header': fixedHeader }" style="margin: 10px 20px 0 20px;">
<div :class="{ 'fixed-header': fixedHeader }" style="margin: 10px 20px 0 20px">
<navbar></navbar>
<tags-view v-if="showTagsView" />
</div>
@ -89,7 +86,7 @@ function handleOutsideClick() {
<style lang="scss" scoped>
.app-wrapper {
background: #F5F6FA;
background: #f5f6fa;
position: relative;
width: 100%;
height: 100%;
@ -100,7 +97,6 @@ function handleOutsideClick() {
// content: "";
// }
&.mobile.openSidebar {
position: fixed;
top: 0;

46
src/views/dashboard/index.vue

@ -3,14 +3,17 @@
@ 时间: 2023-11-06 13:39:13
@ 备注: 首页
-->
<script lang='ts' setup>
import * as echarts from 'echarts'; //
<script lang="ts" setup>
import * as echarts from "echarts"; //
import { useUserStore } from "@/store/modules/user";
import { orgInfo } from '@/api/displayboardapi/types'
import { getOrgChiled,getCompanyDeparment,targetListForDepartment } from '@/api/displayboardapi/indexapi'
import { orgInfo } from "@/api/displayboardapi/types";
import {
getOrgChiled,
getCompanyDeparment,
targetListForDepartment,
} from "@/api/displayboardapi/indexapi";
import UserInfo from "@/views/dashboard/components/userinfo.vue";
import SanLianpIng from "@/views/dashboard/components/sanlianping.vue";
@ -22,36 +25,31 @@ import Application from "@/views/dashboard/components/application.vue";
import HostNews from "@/views/dashboard/components/hostnews.vue";
const userStore = useUserStore();
const orgListCont = ref<orgInfo[]>([])
const educationOrgId = ref<number>(309)
const masterBody = ref<any>(null)
const drawerWidht = ref<any>()
const orgListCont = ref<orgInfo[]>([]);
const educationOrgId = ref<number>(309);
const masterBody = ref<any>(null);
const drawerWidht = ref<any>();
/**
* 获取行政组织
*/
function getOrgList() {
getOrgChiled({id:313})
.then(( {data} )=>{
getOrgChiled({ id: 313 }).then(({ data }) => {
// console.log("-2-->",data)
orgListCont.value = data.list
educationOrgId.value = data.current
})
orgListCont.value = data.list;
educationOrgId.value = data.current;
});
}
const orgAllYears = ref<any>(); //
const orgAllYears = ref<any>() //
const oenOrg = ref<any>() //
const oenOrg = ref<any>(); //
//
onMounted(() => {
drawerWidht.value = masterBody.value?.clientWidth
drawerWidht.value = masterBody.value?.clientWidth;
getOrgList();
// console.log("----100---->",drawerWidht.value)
})
});
</script>
<template>
<div ref="masterBody" class="app_container">
@ -81,10 +79,9 @@ onMounted(() => {
<SanLianpIng />
</el-col>
</el-row>
</div>
</template>
<style lang='scss' scoped>
<style lang="scss" scoped>
.app_container {
padding: 10px 20px 0px 20px;
height: calc(100% - 10px);
@ -97,7 +94,6 @@ onMounted(() => {
display: flex;
align-items: center;
justify-content: space-between;
}
.span_icon_left {
margin-right: 10px;

Loading…
Cancel
Save